mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
44 lines
1.6 KiB
JavaScript
44 lines
1.6 KiB
JavaScript
(function (vc, vm) {
|
|
vc.extends({
|
|
data: {
|
|
deleteMerchantInfo: {}
|
|
},
|
|
_initMethod: function () {
|
|
},
|
|
_initEvent: function () {
|
|
vc.on('deleteMerchant', 'openDeleteMerchantModal', function (_params) {
|
|
$that.deleteMerchantInfo = _params;
|
|
$('#deleteMerchantModel').modal('show');
|
|
});
|
|
},
|
|
methods: {
|
|
deleteMerchant: function () {
|
|
vc.http.apiPost(
|
|
'/property.deleteProperty',
|
|
JSON.stringify($that.deleteMerchantInfo), {
|
|
emulateJSON: true
|
|
},
|
|
function (json, res) {
|
|
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
|
let _json = JSON.parse(json);
|
|
if (_json.code == 0) {
|
|
//关闭model
|
|
$('#deleteMerchantModel').modal('hide');
|
|
vc.emit('merchantManage', 'listMerchant', {});
|
|
vc.toast("删除成功");
|
|
return;
|
|
} else {
|
|
vc.toast(_json.msg);
|
|
}
|
|
},
|
|
function (errInfo, error) {
|
|
console.log('请求失败处理');
|
|
vc.message(json);
|
|
});
|
|
},
|
|
closeDeleteMerchantModel: function () {
|
|
$('#deleteMerchantModel').modal('hide');
|
|
}
|
|
}
|
|
});
|
|
})(window.vc, window.$that); |