46 lines
1.0 KiB
PHP
46 lines
1.0 KiB
PHP
<?php
|
|
|
|
/**
|
|
* @author Any
|
|
* @description KISS
|
|
* @date 2020-11-5
|
|
* @version 1.0.0
|
|
*
|
|
* _____LOG_____
|
|
*
|
|
*/
|
|
namespace app\modules\admin\controllers;
|
|
|
|
use Yii;
|
|
use app\models\Admin;
|
|
use yii\helpers\VarDumper;
|
|
use app\modules\admin\behaviors\LoginBehavior;
|
|
use app\modules\admin\models\ThemeCustomiseForm;
|
|
|
|
class ThemeController extends Controller
|
|
{
|
|
public function behaviors()
|
|
{
|
|
return array_merge(parent::behaviors(), [
|
|
'login' => [
|
|
'class' => LoginBehavior::className(),
|
|
],
|
|
]);
|
|
}
|
|
|
|
/**
|
|
* 装饰\自定义
|
|
*/
|
|
public function actionCustomise(){
|
|
$model = new ThemeCustomiseForm();
|
|
$model->cx_mch_id = $this->cx_mch_id;
|
|
if(\Yii::$app->request->isPost){
|
|
$model->attributes = \Yii::$app->request->post();
|
|
$data = $model->save();
|
|
return $this->responseHandler($data);
|
|
}
|
|
return $this->render("customise",[
|
|
'model' => $model,
|
|
]);
|
|
}
|
|
} |