/** 微信公众号 **/ (function (vc) { var DEFAULT_PAGE = 1; var DEFAULT_ROWS = 100; vc.extends({ data: { communityMiniInfo: { smallWeChats: [], total: 0, records: 1, moreCondition: false, name: '', wetConfig: false, conditions: { name: '', appId: '', weChatType: '1000', communityId:'' } } }, _initMethod: function () { $that._listAdminSmallWeChats(DEFAULT_PAGE, DEFAULT_ROWS); vc.on('selectAdminCommunity','changeCommunity',function(_community){ $that.communityMiniInfo.conditions.communityId = _community.communityId; $that._listAdminSmallWeChats(DEFAULT_PAGE, DEFAULT_ROWS); }) }, _initEvent: function () { vc.on('communityMini', 'listSmallWeChat', function (_param) { $that._listAdminSmallWeChats(DEFAULT_PAGE, DEFAULT_ROWS); }); }, methods: { _listAdminSmallWeChats: function (_page, _rows) { $that.communityMiniInfo.conditions.page = _page; $that.communityMiniInfo.conditions.row = _rows; let param = { params: $that.communityMiniInfo.conditions }; //发送get请求 vc.http.apiGet('/smallWeChat.listAdminSmallWeChats', param, function (json, res) { let _json = JSON.parse(json); $that.communityMiniInfo.smallWeChats = _json.data; }, function (errInfo, error) { console.log('请求失败处理'); } ); }, _openAddCommunityMiniModal: function () { vc.emit('addCommunityWechat', 'openAddCommunityWechatModal', { objId:$that.communityMiniInfo.conditions.communityId, communityId:$that.communityMiniInfo.conditions.communityId, weChatType: '1000', }); }, _openEditCommunityMiniModel: function (_smallWeChat) { vc.emit('editCommunityWechat', 'openEditCommunityWechatModal', _smallWeChat); }, _querySmallWeChatMethod: function () { $that._listAdminSmallWeChats(DEFAULT_PAGE, DEFAULT_ROWS); }, _switchWeChatType: function (type) { $that.communityMiniInfo.conditions.weChatType = type; $that._listAdminSmallWeChats(DEFAULT_PAGE, DEFAULT_ROWS); }, } }); })(window.vc);