You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.1 KiB
47 lines
1.1 KiB
<?php
|
|
|
|
namespace backend\modules\wechat_public_account\controllers;
|
|
|
|
use Yii;
|
|
use yii\web\Controller;
|
|
use yii\filters\VerbFilter;
|
|
use backend\modules\shop\models\ars\Config;
|
|
use backend\modules\wechat_public_account\logic\PublicAccountManager;
|
|
|
|
/**
|
|
* PublicAccountController manage WeChat public account platform.
|
|
*/
|
|
class PublicAccountController extends Controller
|
|
{
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function behaviors()
|
|
{
|
|
return [
|
|
'verbs' => [
|
|
'class' => VerbFilter::className(),
|
|
'actions' => [
|
|
'delete' => ['POST'],
|
|
],
|
|
],
|
|
];
|
|
}
|
|
|
|
/**
|
|
* Lists all AfterSale models.
|
|
* @return mixed
|
|
*/
|
|
public function actionCustomMenu()
|
|
{
|
|
$config = Config::find()->one();
|
|
if (Yii::$app->request->isPost) {
|
|
Yii::$app->response->format = 'json';
|
|
$data = Yii::$app->request->post('data');
|
|
}
|
|
return $this->render('custom_menu', [
|
|
'customPageList' => [],
|
|
'data' => $config->menu_setting ?: '[]'
|
|
]);
|
|
}
|
|
}
|