From b28b18797aeaa40f831e76cbfe098c8c3c653d54 Mon Sep 17 00:00:00 2001 From: sugar1569 Date: Tue, 2 Apr 2019 17:52:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=90=8E=E5=8F=B0=E5=85=B3?= =?UTF-8?q?=E9=94=AE=E5=AD=97=E9=A1=B5=E9=9D=A2=E5=AD=97=E4=B9=B1=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controller/wechat/Reply.php | 18 +++++++++++++++--- application/admin/view/wechat/reply/index.php | 2 +- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/application/admin/controller/wechat/Reply.php b/application/admin/controller/wechat/Reply.php index ff7b9a01..9ab04280 100644 --- a/application/admin/controller/wechat/Reply.php +++ b/application/admin/controller/wechat/Reply.php @@ -23,10 +23,22 @@ class Reply extends AuthController { if(empty(input('key'))) return $this->failed('请输入参数key'); if(empty(input('title'))) return $this->failed('请输入参数title'); - $replay = WechatReply::getDataByKey(input('key')); + $key = input('key'); + switch($key){ + case 'subscribe': + $title = '编辑关注回复'; + break; + case 'default': + $title = '编辑关键字默认回复'; + break; + default: + $title = '编辑关键字回复'; + break; + } + $replay = WechatReply::getDataByKey($key); $this->assign('replay_arr',json_encode($replay)); - $this->assign('key',input('key')); - $this->assign('title',urldecode(input('title'))); + $this->assign('key',$key); + $this->assign('title',$title); return $this->fetch(); } diff --git a/application/admin/view/wechat/reply/index.php b/application/admin/view/wechat/reply/index.php index b6e5f4d6..21d347c6 100644 --- a/application/admin/view/wechat/reply/index.php +++ b/application/admin/view/wechat/reply/index.php @@ -216,7 +216,7 @@ methods: { submit: function(){ if(!this.check()) return false; - $eb.axios.post("{:Url('save',array('key'=>$key,'title'=>$title))}",{key:this.key,status:this.status,data:this.dataGroup[this.type],type:this.type}).then(function(res){ + $eb.axios.post("{:Url('save',array('key'=>$key))}",{key:this.key,status:this.status,data:this.dataGroup[this.type],type:this.type}).then(function(res){ if(res.status == 200 && res.data.code == 200){ $eb.message('success','设置成功!'); }