From 6b415444a012229163b0764207a131857e7d7a97 Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Tue, 23 Jun 2020 13:19:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=85=AC=E4=BC=97=E5=8F=B7?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../property/addWechatMenu/addWechatMenu.js | 6 +-- .../property/editWechatMenu/editWechatMenu.js | 6 +-- .../property/weChatAttr/weChatAttr.js | 2 +- .../wechatMenuManage/wechatMenuManage.js | 40 ++++++++++++++----- 4 files changed, 37 insertions(+), 17 deletions(-) diff --git a/public/components/property/addWechatMenu/addWechatMenu.js b/public/components/property/addWechatMenu/addWechatMenu.js index 4a676ab20..a4d4fbfff 100644 --- a/public/components/property/addWechatMenu/addWechatMenu.js +++ b/public/components/property/addWechatMenu/addWechatMenu.js @@ -57,7 +57,7 @@ }, { limit: "maxLength", - param: "10", + param: "50", errInfo: "菜单类型格式错误" }, ], @@ -76,8 +76,8 @@ 'addWechatMenuInfo.menuValue': [ { limit: "maxLength", - param: "50", - errInfo: "值不能超过50位" + param: "200", + errInfo: "值不能超过200位" } ], 'addWechatMenuInfo.appId': [ diff --git a/public/components/property/editWechatMenu/editWechatMenu.js b/public/components/property/editWechatMenu/editWechatMenu.js index b060396ac..38aecd6f3 100644 --- a/public/components/property/editWechatMenu/editWechatMenu.js +++ b/public/components/property/editWechatMenu/editWechatMenu.js @@ -51,7 +51,7 @@ }, { limit: "maxLength", - param: "10", + param: "50", errInfo: "菜单类型格式错误" }, ], @@ -70,8 +70,8 @@ 'editWechatMenuInfo.menuValue': [ { limit: "maxLength", - param: "50", - errInfo: "值不能超过50位" + param: "200", + errInfo: "值不能超过200位" }, ], 'editWechatMenuInfo.appId': [ diff --git a/public/components/property/weChatAttr/weChatAttr.js b/public/components/property/weChatAttr/weChatAttr.js index 33d02f05f..875666746 100644 --- a/public/components/property/weChatAttr/weChatAttr.js +++ b/public/components/property/weChatAttr/weChatAttr.js @@ -30,7 +30,7 @@ $that.wechatAttrInfo.wId = _param.wId; $that.wechatAttrInfo.wechatServerUrl = window.location.protocol + "//" + window.location.host - + '/app/wechat/gateway?java110AppId=992019111758490006&wId=' + + '/app/wechat/gateway?java110AppId=992020061452450002&wId=' + $that.wechatAttrInfo.wId; $that._listListWechatAttrs(DEFAULT_PAGE, DEFAULT_ROWS); }); diff --git a/public/pages/property/wechatMenuManage/wechatMenuManage.js b/public/pages/property/wechatMenuManage/wechatMenuManage.js index 9a0ce8dcc..061238686 100644 --- a/public/pages/property/wechatMenuManage/wechatMenuManage.js +++ b/public/pages/property/wechatMenuManage/wechatMenuManage.js @@ -45,10 +45,10 @@ function (json, res) { var _wechatMenuManageInfo = JSON.parse(json); vc.component.wechatMenuManageInfo.wechatMenus = _wechatMenuManageInfo.data; - if(_wechatMenuManageInfo.data.length > 0){ + if (_wechatMenuManageInfo.data.length > 0) { $that.wechatMenuManageInfo.curParentMenuId = _wechatMenuManageInfo.data[0].wechatMenuId; $that._listSubWechatMenus(); - } + } }, function (errInfo, error) { console.log('请求失败处理'); } @@ -57,8 +57,8 @@ _listSubWechatMenus: function () { - if($that.wechatMenuManageInfo.curParentMenuId == ''){ - return ; + if ($that.wechatMenuManageInfo.curParentMenuId == '') { + return; } var param = { @@ -84,17 +84,17 @@ }, _openAddWechatMenuModal: function (_menuLevel) { let _parentMenuId = '-1'; - if(_menuLevel == '202'){ + if (_menuLevel == '202') { _parentMenuId = $that.wechatMenuManageInfo.curParentMenuId; - if(_parentMenuId == ''){ + if (_parentMenuId == '') { vc.toast("请先选择一级菜单"); - return ; + return; } - }else{ + } else { $that.wechatMenuManageInfo.curParentMenuId = '-1'; } vc.emit('addWechatMenu', 'openAddWechatMenuModal', { - menuLevel:_menuLevel, + menuLevel: _menuLevel, parentMenuId: _parentMenuId }); }, @@ -112,8 +112,28 @@ $that.wechatMenuManageInfo.curParentMenuId = _wechatMenu.wechatMenuId; $that._listSubWechatMenus(); }, - _publishMenu:function(){ + _publishMenu: function () { //发布菜单 + var data = { + communityId: vc.getCurrentCommunity().communityId + }; + + //发送get请求 + vc.http.apiPost('smallWeChat.publicWechatMenu', + JSON.stringify(data), + { + emulateJSON: true + }, + function (json, res) { + var _wechatMenuManageInfo = JSON.parse(json); + console.log("_wechatMenuManageInfo", _wechatMenuManageInfo); + vc.toast(_wechatMenuManageInfo.msg); + }, function (errInfo, error) { + console.log('请求失败处理'); + vc.toast(errInfo); + + } + ); }