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','设置成功!'); }