diff --git a/modules/admin/controllers/WechatController.php b/modules/admin/controllers/WechatController.php index 464f620..8327738 100644 --- a/modules/admin/controllers/WechatController.php +++ b/modules/admin/controllers/WechatController.php @@ -5,16 +5,12 @@ * @description KISS * @date 2020-11-23 * @version 1.0.0 - * + * * _____LOG_____ - * + * */ namespace app\modules\admin\controllers; -use app\models\Box; -use app\models\cms\Notice; -use app\models\cms\RichText; -use app\models\Store; use app\modules\admin\behaviors\LoginBehavior; use app\modules\admin\models\wechat\WechatAppForm; use app\modules\admin\models\wechat\WechatOfficalAccountForm; @@ -32,7 +28,7 @@ use app\models\PickLinkForm; -class WechatController extends Controller +class WechatController extends Controller { public function behaviors() { @@ -42,7 +38,7 @@ class WechatController extends Controller ], ]); } - + public function actionMp() { $this->wechat_app = $this->wechat_app == null ? new WechatApp() : $this->wechat_app; @@ -55,10 +51,10 @@ class WechatController extends Controller return $this->responseHandler($data); } return $this->render('mp',[ - 'model' => $this->wechat_app + 'model' => $this->wechat_app ]); } - + public function actionMpTplMsg() { $form = new WechatAppTplMsgForm(); @@ -72,9 +68,9 @@ class WechatController extends Controller $list = $form->search(); return $this->render('mp-tpl-msg',[ 'list' => $list - ]); + ]); } - + public function actionMpSlide() { $form = new SlideListForm(); @@ -84,7 +80,7 @@ class WechatController extends Controller $data = $form->search(); return $this->render('mp-slide', $data); } - + public function actionMpSlideEdit($id = 0) { $zone_id = Banner::ZONE_ID_WXAPP_INDEX; @@ -114,28 +110,14 @@ class WechatController extends Controller $data = $form->save(); return $this->responseHandler($data); } - $store = Store::find()->select('id,name')->where(['is_delete' => 0])->asArray()->all(); - $box = Box::find()->select('id,name,store_id')->where(['is_delete' => 0])->asArray()->all(); - $notice = Notice::find()->alias('n') - ->select('n.id,n.store_id,rt.title as name') - ->leftJoin(['rt' => RichText::tableName()],'rt.id=n.rich_text_id') - ->where([ - 'n.cx_mch_id' => $this->cx_mch_id, - 'n.is_delete' => 0, - 'n.is_index' => 1, - ])->asArray()->all(); - $return_url = \Yii::$app->request->referrer; return $this->render('mp-slide-edit', [ 'model' => $model, 'return_url' => $return_url, - 'links' => (new PickLinkForm())->getPickLink(), - 'store' => $store, - 'box' => $box, - 'notice' => $notice, + 'links' => (new PickLinkForm())->getPickLink() ]); } - + public function actionMpSlideShow() { if(!\Yii::$app->request->isPost){ @@ -149,7 +131,7 @@ class WechatController extends Controller $data = $form->show(); return $this->responseHandler($data); } - + public function actionMpSlideHide() { if(!\Yii::$app->request->isPost){ @@ -163,7 +145,7 @@ class WechatController extends Controller $data = $form->hide(); return $this->responseHandler($data); } - + public function actionMpSlideDel() { if(!\Yii::$app->request->isPost){ @@ -177,5 +159,5 @@ class WechatController extends Controller $data = $form->delete(); return $this->responseHandler($data); } - + } \ No newline at end of file diff --git a/modules/admin/models/SlideEditForm.php b/modules/admin/models/SlideEditForm.php index d2a7e62..e72329e 100644 --- a/modules/admin/models/SlideEditForm.php +++ b/modules/admin/models/SlideEditForm.php @@ -5,9 +5,9 @@ * @description KISS * @date 2020-11-23 * @version 1.0.0 - * + * * _____LOG_____ - * + * */ namespace app\modules\admin\models; @@ -15,10 +15,10 @@ use app\models\Banner; use app\models\Model; -class SlideEditForm extends AdminModel +class SlideEditForm extends AdminModel { public $model; - + public $cx_mch_id; public $user_id; public $zone_id; @@ -29,7 +29,7 @@ class SlideEditForm extends AdminModel public $title; public $page_url; public $sort; - + public $media; public $status; public $video_url; @@ -47,7 +47,7 @@ class SlideEditForm extends AdminModel [['video_url'], 'required', 'on' => 'video'], ]; } - + public function attributeLabels() { return [ 'app_id' => '小程序AppId', @@ -95,7 +95,7 @@ class SlideEditForm extends AdminModel } if(!$this->model->save()){ return $this->getModelError($this->model); - } + } return [ 'code' => 0, 'msg' => '保存成功' diff --git a/modules/admin/views/wechat/mp-slide-edit.php b/modules/admin/views/wechat/mp-slide-edit.php index 3ceb213..a10e068 100644 --- a/modules/admin/views/wechat/mp-slide-edit.php +++ b/modules/admin/views/wechat/mp-slide-edit.php @@ -5,9 +5,9 @@ * @description KISS * @date 2020-11-24 * @version 1.0.0 - * + * * _____LOG_____ - * + * */ use app\widgets\PickLinker; @@ -22,214 +22,222 @@ $url_type_labels = Banner::urlTypeLabels(); $status_labels = Banner::statusLabels(); $media_labels = Banner::mediaLabels(); ?> -
-
-
title ?>
-
-
-
-
-
- -
- +
+
+
title ?>
+
+
+
+
+
+ +
+ +
+
-
-
-
-
- -
- $val):?> - url_type == $key ? 'checked=""' : ''?>> - -
-
-
-
- -
- -
-
- -
-
-
-
- -
- -
-
-
-
- -
- -
-
-
-
- -
- -
-
升序,值越小排序越靠前
-
+
+
+ +
+ $val):?> + url_type == $key ? 'checked=""' : ''?>> + +
+
+
+
+ +
+ +
+
+ +
+
+
+
+ +
+ +
+
+
+
+ +
+ +
+
+
+
+ +
+ +
+
升序,值越小排序越靠前
+
-
- 'images', - 'id' => 'img_url_upload', - 'name' => 'img_url', - 'label' => '图片', - 'value' => $model->img_url, - 'tip' => '图片大小750×800', - 'imageCompressEnable' => 1, - 'imageCompressBorder' => 750 - ])?> - 'video', - 'id' => 'video_url_upload', - 'name' => 'video_url', - 'label' => '视频', - 'value' => $model->video_url, - 'tip' => '' - ])?> - -
- -
- status == 0 ? 'checked=""' : ''?>> - status == 1 ? 'checked=""' : ''?>> +
+ +
+ $val):?> + media == $key ? 'checked=""' : ''?>> + +
+
+
-
-
-
-
-
- - + 'images', + 'id' => 'img_url_upload', + 'name' => 'img_url', + 'label' => '图片', + 'value' => $model->img_url, + 'tip' => '图片大小750×330', + 'imageCompressEnable' => 1, + 'imageCompressBorder' => 750 + ])?> + 'video', + 'id' => 'video_url_upload', + 'name' => 'video_url', + 'label' => '视频', + 'value' => $model->video_url, + 'tip' => '' + ])?> + +
+ +
+ status == 0 ? 'checked=""' : ''?>> + status == 1 ? 'checked=""' : ''?>> +
+
+
+
+
+
+ +
-
-
-
+
+
+
-
- $links, "store" => $store,"box" => $box,"notice" => $notice,"link_input_class" => ".page-url", "link_select_btn" => '.pick-link-btn'])?> + $links, "link_input_class" => ".page-url", "link_select_btn" => '.pick-link-btn'])?> - + endBlock(); ?> + registerJs($this->blocks['js_script_wrap'], \yii\web\View::POS_END); ?> \ No newline at end of file diff --git a/modules/admin/views/wechat/mp-slide.php b/modules/admin/views/wechat/mp-slide.php index c170f9d..60e1709 100644 --- a/modules/admin/views/wechat/mp-slide.php +++ b/modules/admin/views/wechat/mp-slide.php @@ -1,417 +1,417 @@ -title = '轮播图'; -$this->params['breadcrumbs'][] = $this->title; -$status_labels = Banner::statusLabels(); -$status = \Yii::$app->request->get('status'); -?> -
-
-
- title ?> -
-
-
- -
-
-
-
- -
-
-
-
-
- -
-
-
- -
- "> -
-
-
- -
-
-
-
-
- - - - - - - - - - - - - - - - $item):?> - - - - - - - - - - - - - -
-
- -
-
ID标题内容链接排序添加时间状态操作
-
- -
-
- - " style="width:168px;max-width: 168px;"> - - - - - - - - - - - - - - - - - - - - " class="layui-btn layui-btn-normal layui-btn-xs show-btn">显示 - " class="layui-btn layui-btn-danger layui-btn-xs del-btn">删除 - - " class="layui-btn layui-btn-warm layui-btn-xs hide-btn">隐藏 - - 编辑 -
-
- $pagination, - 'prevPageLabel' => '上一页', - 'nextPageLabel' => '下一页', - 'firstPageLabel' => '首页', - 'lastPageLabel' => '尾页', - 'maxButtonCount' => 5, - 'options' => [ - 'class' => 'layui-pagination layui-laypage', - ], - 'prevPageCssClass' => 'layui-laypage-prev', - 'pageCssClass' => "layui-laypage-item", - 'nextPageCssClass' => 'layui-laypage-first', - 'firstPageCssClass' => 'layui-laypage-last', - 'lastPageCssClass' => 'layui-laypage-last', - 'linkOptions' => [ - 'class' => 'page-link', - ], - 'disabledListItemSubTagOptions' => ['tag' => 'a', 'class' => 'layui-disabled'], - ]) - ?> -
-
-
-
- +title = '轮播图'; +$this->params['breadcrumbs'][] = $this->title; +$status_labels = Banner::statusLabels(); +$status = \Yii::$app->request->get('status'); +?> +
+
+
+ title ?> +
+
+
+ +
+
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+ "> +
+
+
+ +
+
+
+
+
+ + + + + + + + + + + + + + + + $item):?> + + + + + + + + + + + + + +
+
+ +
+
ID标题内容链接排序添加时间状态操作
+
+ +
+
+ + " style="width:168px;max-width: 168px;"> + + + + + + + + + + + + + + + + + + + + " class="layui-btn layui-btn-normal layui-btn-xs show-btn">显示 + " class="layui-btn layui-btn-danger layui-btn-xs del-btn">删除 + + " class="layui-btn layui-btn-warm layui-btn-xs hide-btn">隐藏 + + 编辑 +
+
+ $pagination, + 'prevPageLabel' => '上一页', + 'nextPageLabel' => '下一页', + 'firstPageLabel' => '首页', + 'lastPageLabel' => '尾页', + 'maxButtonCount' => 5, + 'options' => [ + 'class' => 'layui-pagination layui-laypage', + ], + 'prevPageCssClass' => 'layui-laypage-prev', + 'pageCssClass' => "layui-laypage-item", + 'nextPageCssClass' => 'layui-laypage-first', + 'firstPageCssClass' => 'layui-laypage-last', + 'lastPageCssClass' => 'layui-laypage-last', + 'linkOptions' => [ + 'class' => 'page-link', + ], + 'disabledListItemSubTagOptions' => ['tag' => 'a', 'class' => 'layui-disabled'], + ]) + ?> +
+
+
+
+ registerJs($this->blocks['js_script_wrap'], \yii\web\View::POS_END); ?> \ No newline at end of file diff --git a/modules/admin/views/wechat/mp-tpl-msg.php b/modules/admin/views/wechat/mp-tpl-msg.php index 98e50cd..debf1ef 100644 --- a/modules/admin/views/wechat/mp-tpl-msg.php +++ b/modules/admin/views/wechat/mp-tpl-msg.php @@ -1,107 +1,107 @@ -title = '订阅消息'; -$this->params['breadcrumbs'][] = $this->title; -?> -
-
-
title ?>
-
-
-
-
- $item): ?> -
- -
- ]" lay-verify="required" placeholder="" value="" autocomplete="off" class="layui-input"> -
-
-
- -
-
-
- -
-
-
-
-
-
-
-
-
- -registerJs($this->blocks['js_script_wrap'], \yii\web\View::POS_END); ?> +title = '订阅消息'; +$this->params['breadcrumbs'][] = $this->title; +?> +
+
+
title ?>
+
+
+
+
+ $item): ?> +
+ +
+ ]" lay-verify="required" placeholder="" value="" autocomplete="off" class="layui-input"> +
+
+
+ +
+
+
+ +
+
+
+
+
+
+
+
+
+ +registerJs($this->blocks['js_script_wrap'], \yii\web\View::POS_END); ?> diff --git a/modules/admin/views/wechat/mp.php b/modules/admin/views/wechat/mp.php index 960bd78..384b98c 100644 --- a/modules/admin/views/wechat/mp.php +++ b/modules/admin/views/wechat/mp.php @@ -1,169 +1,159 @@ -title = '微信配置'; -$this->params['breadcrumbs'][] = $this->title; -?> -
-
-
title?>
-
-
-
-
-
- -
- -
-
-
-
- -
- -
-
-
-
- -
- -
-
-
-
- -
- -
-
-
-
- -
-
- -
已隐藏内容,点击查看或编辑
-
-
-
-
-
- -
-
- -
已隐藏内容,点击查看或编辑
-
-
-
-
-
- -
-
- -
已隐藏内容,点击查看或编辑
-
-
使用文本编辑器打开apiclient_cert.pem文件,将文件的全部内容复制进来
-
-
-
- -
-
- -
已隐藏内容,点击查看或编辑
-
-
使用文本编辑器打开apiclient_key.pem文件,将文件的全部内容复制进来
-
-
- -
-
-
- -
-
-
-
-
-
-
-
-
- -registerJs($this->blocks['js_script_wrap'],\yii\web\View::POS_END); ?> +title = '微信配置'; +$this->params['breadcrumbs'][] = $this->title; +?> +
+
+
title?>
+
+
+
+
+
+ +
+ +
+
+
+
+ +
+ +
+
+
+
+ +
+ +
+
+
+
+ +
+ +
+
+
+
+ +
+
+ +
已隐藏内容,点击查看或编辑
+
+
+
+
+
+ +
+
+ +
已隐藏内容,点击查看或编辑
+
+
使用文本编辑器打开apiclient_cert.pem文件,将文件的全部内容复制进来
+
+
+
+ +
+
+ +
已隐藏内容,点击查看或编辑
+
+
使用文本编辑器打开apiclient_key.pem文件,将文件的全部内容复制进来
+
+
+ +
+
+
+ +
+
+
+
+
+
+
+
+
+ +registerJs($this->blocks['js_script_wrap'],\yii\web\View::POS_END); ?> diff --git a/widgets/views/pick-linker.php b/widgets/views/pick-linker.php index 0e2fad0..23c899f 100644 --- a/widgets/views/pick-linker.php +++ b/widgets/views/pick-linker.php @@ -9,181 +9,99 @@ ?> registerJs($this->blocks['js_script_wrap'], \yii\web\View::POS_END); ?>