mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-02-23 21:36:38 +08:00
优化代码
This commit is contained in:
parent
3712bd6344
commit
d67c8e2d58
@ -89,6 +89,6 @@
|
|||||||
},
|
},
|
||||||
"domain" : "owner.demo.winqi.cn",
|
"domain" : "owner.demo.winqi.cn",
|
||||||
"publicPath" : "./",
|
"publicPath" : "./",
|
||||||
"title" : "HC智慧家园"
|
"title" : "业主版"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view>
|
<view>
|
||||||
<image src="../../static/images/openDoorTop.png" class="heard-location-icon"></image>
|
<image src="/static/images/openDoorTop.png" class="heard-location-icon"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="cu-list grid" :class="'col-2'">
|
<view class="cu-list grid" :class="'col-2'">
|
||||||
<view class="cu-item" @click="showOpenDoor(item);"
|
<view class="cu-item" @click="showOpenDoor(item);"
|
||||||
@ -20,7 +20,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="padding-xl">
|
<view class="padding-xl">
|
||||||
您确认{{curMachine.machineName}}开门? 请勿频繁操作!
|
您确认{{curMachine.machineName}}开门? 开门次数有限,请勿频繁操作!
|
||||||
</view>
|
</view>
|
||||||
<view class="cu-bar bg-white justify-end">
|
<view class="cu-bar bg-white justify-end">
|
||||||
<view class="action margin-0 flex-sub solid-left" @tap="_cancleOpenDoor()">取消</view>
|
<view class="action margin-0 flex-sub solid-left" @tap="_cancleOpenDoor()">取消</view>
|
||||||
@ -90,18 +90,22 @@
|
|||||||
},
|
},
|
||||||
_doOpenDoor:function(){
|
_doOpenDoor:function(){
|
||||||
let _that = this;
|
let _that = this;
|
||||||
|
wx.showLoading({
|
||||||
|
title: '请求中'
|
||||||
|
});
|
||||||
openDoor({
|
openDoor({
|
||||||
communityId:this.communityId,
|
communityId:this.communityId,
|
||||||
userRole:'owner',
|
userRole:'owner',
|
||||||
machineCode:_that.curMachine.machineCode,
|
machineCode:_that.curMachine.machineCode,
|
||||||
userId:this.memberId
|
userId:this.memberId
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
|
wx.hideLoading();
|
||||||
let data = res.data;
|
let data = res.data;
|
||||||
let msg = '';
|
let msg = '';
|
||||||
if(data.code == 0){
|
if(data.code == 0){
|
||||||
msg = '请求发送至门禁'
|
msg = '请求发送至门禁'
|
||||||
}else{
|
}else{
|
||||||
msg = '开门失败'
|
msg = data.msg;
|
||||||
}
|
}
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: msg,
|
title: msg,
|
||||||
@ -110,6 +114,7 @@
|
|||||||
});
|
});
|
||||||
_that._cancleOpenDoor();
|
_that._cancleOpenDoor();
|
||||||
},(err)=>{
|
},(err)=>{
|
||||||
|
wx.hideLoading();
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '开门失败',
|
title: '开门失败',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user