mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-27 00:20:01 +08:00
45 lines
1.8 KiB
JavaScript
45 lines
1.8 KiB
JavaScript
(function (vc, vm) {
|
|
vc.extends({
|
|
data: {
|
|
deleteCommunityShopInfo: {}
|
|
},
|
|
_initMethod: function () {
|
|
},
|
|
_initEvent: function () {
|
|
vc.on('deleteCommunityShop', 'openDeleteCommunityShopModal', function (_params) {
|
|
vc.component.deleteCommunityShopInfo = _params;
|
|
$('#deleteCommunityShopModel').modal('show');
|
|
});
|
|
},
|
|
methods: {
|
|
deleteCommunityShop: function () {
|
|
vc.component.deleteCommunityShopInfo.communityId = vc.getCurrentCommunity().communityId;
|
|
vc.http.apiPost(
|
|
'/store.propertyDeleteStoreAndShop',
|
|
JSON.stringify(vc.component.deleteCommunityShopInfo), {
|
|
emulateJSON: true
|
|
},
|
|
function (json, res) {
|
|
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
|
let _json = JSON.parse(json);
|
|
if (_json.code == 0) {
|
|
//关闭model
|
|
$('#deleteCommunityShopModel').modal('hide');
|
|
vc.emit('communityShop', 'listCommunityShop', {});
|
|
vc.toast("删除成功");
|
|
return;
|
|
} else {
|
|
vc.toast(_json.msg);
|
|
}
|
|
},
|
|
function (errInfo, error) {
|
|
console.log('请求失败处理');
|
|
vc.message(json);
|
|
});
|
|
},
|
|
closeDeleteCommunityShopModel: function () {
|
|
$('#deleteCommunityShopModel').modal('hide');
|
|
}
|
|
}
|
|
});
|
|
})(window.vc, window.vc.component); |