From fbf64d3b46bc6f28fd17030f39227f055e9ede42 Mon Sep 17 00:00:00 2001 From: 15178832520 <121184950@qq.com> Date: Thu, 18 Jun 2020 23:57:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=85=AC=E4=BC=97=E5=8F=B7?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 1 + .../addSmallWeChat/addSmallWeChat.html | 11 -- .../property/addSmallWeChat/addSmallWeChat.js | 11 +- .../wetChatAttrConfig/wetChatAttrConfig.html | 47 +++++++ .../wetChatAttrConfig/wetChatAttrConfig.js | 66 ++++++++++ .../publicWeChatManage.html | 116 ++++++++++++++++++ .../publicWeChatManage/publicWeChatManage.js | 93 ++++++++++++++ .../smallWeChatManage/smallWeChatManage.html | 16 +-- .../smallWeChatManage/smallWeChatManage.js | 4 +- 9 files changed, 330 insertions(+), 35 deletions(-) create mode 100644 public/components/property/wetChatAttrConfig/wetChatAttrConfig.html create mode 100644 public/components/property/wetChatAttrConfig/wetChatAttrConfig.js create mode 100644 public/pages/property/publicWeChatManage/publicWeChatManage.html create mode 100644 public/pages/property/publicWeChatManage/publicWeChatManage.js diff --git a/app.js b/app.js index 241ae6b35..924af7230 100644 --- a/app.js +++ b/app.js @@ -34,6 +34,7 @@ let opts = { //app.use('/callComponent',proxy('https://app.demo.winqi.cn/',opts)); //app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012/',opts)); app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts)); +//app.use('/callComponent',proxy('http://127.0.0.1:8012',opts)); //app.listen(3000); diff --git a/public/components/property/addSmallWeChat/addSmallWeChat.html b/public/components/property/addSmallWeChat/addSmallWeChat.html index 95c9abd1a..fcb8f5eb8 100644 --- a/public/components/property/addSmallWeChat/addSmallWeChat.html +++ b/public/components/property/addSmallWeChat/addSmallWeChat.html @@ -7,17 +7,6 @@
-
- -
- -
-
diff --git a/public/components/property/addSmallWeChat/addSmallWeChat.js b/public/components/property/addSmallWeChat/addSmallWeChat.js index 2bb3b2a57..0bad8e383 100644 --- a/public/components/property/addSmallWeChat/addSmallWeChat.js +++ b/public/components/property/addSmallWeChat/addSmallWeChat.js @@ -32,7 +32,9 @@ }, _initEvent: function () { - vc.on('addSmallWeChat', 'openAddSmallWeChatModal', function () { + vc.on('addSmallWeChat', 'openAddSmallWeChatModal', function (type) { + console.log(type); + vc.component.addSmallWeChatInfo.weChatType = type; $('#addSmallWeChatModel').modal('show'); }); }, @@ -89,13 +91,6 @@ errInfo: "支付密码不能超过200个字符" }, ], - 'addSmallWeChatInfo.weChatType': [ - { - limit: "required", - param: "", - errInfo: "配置不能为空" - } - ], 'addSmallWeChatInfo.mchId': [ { limit: "required", diff --git a/public/components/property/wetChatAttrConfig/wetChatAttrConfig.html b/public/components/property/wetChatAttrConfig/wetChatAttrConfig.html new file mode 100644 index 000000000..2fe2c0a39 --- /dev/null +++ b/public/components/property/wetChatAttrConfig/wetChatAttrConfig.html @@ -0,0 +1,47 @@ +
+
+
+
+ +
+
商户信息
+
+ +
+
+
+ + + + + + + + + + + + + + +
{{storeAttr.name}}{{storeAttr.value}} +
+ +
+
+
    +
    +
    + + +
    +
    +
    + + +
    diff --git a/public/components/property/wetChatAttrConfig/wetChatAttrConfig.js b/public/components/property/wetChatAttrConfig/wetChatAttrConfig.js new file mode 100644 index 000000000..7a7512b7f --- /dev/null +++ b/public/components/property/wetChatAttrConfig/wetChatAttrConfig.js @@ -0,0 +1,66 @@ +(function (vc) { + var DEFAULT_PAGE = 1; + var DEFAULT_ROWS = 10; + vc.extends({ + data: { + listStoreManageInfo: { + listStores: [], + storeAttrDtoList:[], + total: 0, + records: 1, + conditions: { + name: '', + storeTypeCd: '', + tel: '' + } + } + }, + _initMethod: function () { + vc.component._listListStores(DEFAULT_PAGE, DEFAULT_ROWS); + }, + _initEvent: function () { + + vc.on('storeInfoManage', 'getStoreInfo', function (_param) { + vc.component._listListStores(DEFAULT_PAGE, DEFAULT_ROWS); + }); + }, + methods: { + _listListStores: function (_page, _rows) { + vc.component.listStoreManageInfo.conditions.page = _page; + vc.component.listStoreManageInfo.conditions.row = _rows; + var param = { + params: vc.component.listStoreManageInfo.conditions + }; + + //发送get请求 + vc.http.get('listStoreManage', + 'getStoreInfo', + param, + function (json, res) { + var _listStoreManageInfo = JSON.parse(json); + vc.component.listStoreManageInfo.listStores = _listStoreManageInfo.stores; + vc.component.listStoreManageInfo.storeAttrDtoList = vc.component.listStoreManageInfo.listStores[0].storeAttrDtoList; + vc.emit('pagination', 'init', { + total: vc.component.listStoreManageInfo.records, + currentPage: _page + }); + }, function (errInfo, error) { + console.log('请求失败处理'); + } + ); + }, + _queryListStoreMethod: function () { + vc.component._listListStores(DEFAULT_PAGE, DEFAULT_ROWS); + + }, + _openEditStoreInfoModel(_storeInfo){ + vc.emit('editStoreInfo', 'openEditStoreModal', {_storeInfo}); + }, + _openEditStoreAttrModel(_storeAttr){ + vc.emit('editStoreAttr', 'openEditStoreAttrModal', {_storeAttr}); + } + + + } + }); +})(window.vc); diff --git a/public/pages/property/publicWeChatManage/publicWeChatManage.html b/public/pages/property/publicWeChatManage/publicWeChatManage.html new file mode 100644 index 000000000..da13e356d --- /dev/null +++ b/public/pages/property/publicWeChatManage/publicWeChatManage.html @@ -0,0 +1,116 @@ +
    +
    +
    +
    +
    +
    查询条件
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    名称APPID应用密钥支付密码商户ID描述操作
    {{smallWeChat.name}}{{smallWeChat.appId}}******************{{smallWeChat.mchId}}{{smallWeChat.remarks}} +
    + +
    +
    + +
    +
    +
      +
      + + +
      +
      +
      +
      + + + + + + + +
      + +
      + + + +
      diff --git a/public/pages/property/publicWeChatManage/publicWeChatManage.js b/public/pages/property/publicWeChatManage/publicWeChatManage.js new file mode 100644 index 000000000..501771c79 --- /dev/null +++ b/public/pages/property/publicWeChatManage/publicWeChatManage.js @@ -0,0 +1,93 @@ +/** + 微信公众号 + **/ +(function (vc) { + var DEFAULT_PAGE = 1; + var DEFAULT_ROWS = 10; + vc.extends({ + data: { + smallWeChatManageInfo: { + smallWeChats: [], + total: 0, + records: 1, + moreCondition: false, + name: '', + wetConfig:false, + conditions: { + name: '', + appId: '', + weChatType:'1100' + + } + } + }, + _initMethod: function () { + vc.component._listSmallWeChats(DEFAULT_PAGE, DEFAULT_ROWS); + }, + _initEvent: function () { + + vc.on('smallWeChatManage', 'listSmallWeChat', function (_param) { + vc.component._listSmallWeChats(DEFAULT_PAGE, DEFAULT_ROWS); + }); + vc.on('pagination', 'page_event', function (_currentPage) { + vc.component._listSmallWeChats(_currentPage, DEFAULT_ROWS); + }); + }, + methods: { + _listSmallWeChats: function (_page, _rows) { + + vc.component.smallWeChatManageInfo.conditions.page = _page; + vc.component.smallWeChatManageInfo.conditions.row = _rows; + var param = { + params: vc.component.smallWeChatManageInfo.conditions + }; + + //发送get请求 + vc.http.apiGet('smallWeChat.listSmallWeChats', + param, + function (json, res) { + var _smallWeChatManageInfo = JSON.parse(json); + vc.component.smallWeChatManageInfo.total = _smallWeChatManageInfo.total; + vc.component.smallWeChatManageInfo.records = _smallWeChatManageInfo.records; + vc.component.smallWeChatManageInfo.smallWeChats = _smallWeChatManageInfo.smallWeChats; + vc.emit('pagination', 'init', { + total: vc.component.smallWeChatManageInfo.records, + currentPage: _page + }); + }, function (errInfo, error) { + console.log('请求失败处理'); + } + ); + }, + _openAddSmallWeChatModal: function (type) { + vc.emit('addSmallWeChat', 'openAddSmallWeChatModal', type); + }, + _openEditSmallWeChatModel: function (_smallWeChat) { + vc.emit('editSmallWeChat', 'openEditSmallWeChatModal', _smallWeChat); + }, + _openDeleteSmallWeChatModel: function (_smallWeChat) { + vc.emit('deleteSmallWeChat', 'openDeleteSmallWeChatModal', _smallWeChat); + }, + _querySmallWeChatMethod: function () { + vc.component._listSmallWeChats(DEFAULT_PAGE, DEFAULT_ROWS); + }, + _switchWeChatType:function(type){ + console.log(type); + vc.component.smallWeChatManageInfo.conditions.weChatType = type; + vc.component._listSmallWeChats(DEFAULT_PAGE, DEFAULT_ROWS); + }, + _moreCondition: function () { + if (vc.component.smallWeChatManageInfo.moreCondition) { + vc.component.smallWeChatManageInfo.moreCondition = false; + } else { + vc.component.smallWeChatManageInfo.moreCondition = true; + } + }, + _openWeChatTemplateModel:function (smallWeChat) { + vc.component.smallWeChatManageInfo.wetConfig = true; + } + + + } + }); +})(window.vc); diff --git a/public/pages/property/smallWeChatManage/smallWeChatManage.html b/public/pages/property/smallWeChatManage/smallWeChatManage.html index 833ec6dbf..01d7d3a61 100644 --- a/public/pages/property/smallWeChatManage/smallWeChatManage.html +++ b/public/pages/property/smallWeChatManage/smallWeChatManage.html @@ -38,22 +38,10 @@
      -
      - - -
      -
      diff --git a/public/pages/property/smallWeChatManage/smallWeChatManage.js b/public/pages/property/smallWeChatManage/smallWeChatManage.js index 2601f5d94..4850d538f 100644 --- a/public/pages/property/smallWeChatManage/smallWeChatManage.js +++ b/public/pages/property/smallWeChatManage/smallWeChatManage.js @@ -58,8 +58,8 @@ } ); }, - _openAddSmallWeChatModal: function () { - vc.emit('addSmallWeChat', 'openAddSmallWeChatModal', {}); + _openAddSmallWeChatModal: function (type) { + vc.emit('addSmallWeChat', 'openAddSmallWeChatModal', type); }, _openEditSmallWeChatModel: function (_smallWeChat) { vc.emit('editSmallWeChat', 'openEditSmallWeChatModal', _smallWeChat);