mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-02-23 21:36:38 +08:00
推送代码
This commit is contained in:
parent
620a569477
commit
366e067c4e
@ -28,6 +28,9 @@ const baseUrl = 'https://app.demo.winqi.cn/';
|
||||
const queryAppUserBindingOwner = baseUrl + 'app/owner.listAppUserBindingOwners';
|
||||
|
||||
|
||||
//解绑业主
|
||||
const appUserUnBindingOwner = baseUrl + 'app/owner.deleteAppUserBindingOwner';
|
||||
|
||||
|
||||
module.exports = {
|
||||
baseUrl: baseUrl,
|
||||
@ -38,5 +41,6 @@ module.exports = {
|
||||
listOwnerRepairs: listOwnerRepairs,
|
||||
saveOwner: saveOwner,
|
||||
appUserBindingOwner: appUserBindingOwner,
|
||||
queryAppUserBindingOwner: queryAppUserBindingOwner
|
||||
queryAppUserBindingOwner: queryAppUserBindingOwner,
|
||||
appUserUnBindingOwner: appUserUnBindingOwner
|
||||
};
|
||||
@ -108,5 +108,44 @@ Page({
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
unbindOwner:function(){
|
||||
//调用解绑业主,并且删除本地缓存
|
||||
let obj = {
|
||||
"appUserId": this.data.appUserId,
|
||||
"communityId": this.data.communityId
|
||||
}
|
||||
let msg = "";
|
||||
if (obj.appUserId == "" || obj.communityId == "") {
|
||||
msg = "数据异常";
|
||||
wx.showToast({
|
||||
title: msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return ;
|
||||
}
|
||||
wx.request({
|
||||
url: constant.url.appUserUnBindingOwner,
|
||||
header: context.getHeaders(),
|
||||
method: "POST",
|
||||
data: obj, //动态数据
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
//成功情况下跳转
|
||||
wx.navigateTo({
|
||||
url: "/pages/viewBindOwner/viewBindOwner"
|
||||
});
|
||||
},
|
||||
fail: function (e) {
|
||||
wx.showToast({
|
||||
title: "服务器异常了",
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
@ -21,6 +21,6 @@
|
||||
<view class="button_up_blank"></view>
|
||||
|
||||
<block wx:if="{{active == 1}}">
|
||||
<van-button type="danger" size="large" catchtap="bindOwner">解绑业主</van-button>
|
||||
<van-button type="danger" size="large" catchtap="unbindOwner">解绑业主</van-button>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user