Commit 391d9995 by zhangzhen

细节优化

parent ddba3710
...@@ -49,16 +49,23 @@ ...@@ -49,16 +49,23 @@
<view v-if="val.deviceList" class="flex-col device-list"> <view v-if="val.deviceList" class="flex-col device-list">
<view class="part" v-if="val.deviceList.door" > <view class="part" v-if="val.deviceList.door" >
<text class="text-title">门禁控制</text> <text class="text-title">门禁控制</text>
<view class=""> <view v-if="val.deviceList.door.status ==1" class="">
<button @tap="onDeviceRun(10,val.deviceList.door.devId)" class="cu-btn bg-blue margin-right-sm">开启</button> <text>电量:{{val.deviceList.door.voltage}}</text>
<button @tap="onDeviceRun(30,val.deviceList.door.devId)" class="cu-btn bg-blue">关闭</button> <button @tap="onDeviceRun(10,val.deviceList.door.devId)" class="cu-btn bg-blue margin-left-sm">开启</button>
</view>
<view v-else-if="val.deviceList.door.status =='0'" class="">
<text>离线</text>
</view> </view>
</view> </view>
<view class="part" v-if="val.deviceList.el"> <view class="part" v-if="val.deviceList.el">
<text class="text-title">取电开关</text> <text class="text-title">取电开关</text>
<view class=""> <view v-if="val.deviceList.el.status >=1" class="">
<button @tap="onDeviceRun(20,val.deviceList.el.devId)" class="cu-btn bg-blue margin-right-sm">开启</button> <!-- <button @tap="onDeviceRun(20,val.deviceList.el.devId)" class="cu-btn bg-blue margin-right-sm">开启</button>
<button @tap="onDeviceRun(40,val.deviceList.el.devId)" class="cu-btn bg-blue">关闭</button> <button @tap="onDeviceRun(40,val.deviceList.el.devId)" class="cu-btn bg-blue">关闭</button> -->
<switch class='red' data-type="door" :data-index="index" :data-k="k" :data-id="val.deviceList.el.devId" @change="onSwitchDoor" :class="val.deviceList.el.status==3?'checked':''" :checked="val.deviceList.el.status==3?true:false" color="#e54d42"></switch>
</view>
<view v-else class="">
<text>离线</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -172,11 +179,14 @@ import moment from "@/common/moment"; ...@@ -172,11 +179,14 @@ import moment from "@/common/moment";
deviceList['door'] = { deviceList['door'] = {
devType: item.devType, devType: item.devType,
devId:item.devId, devId:item.devId,
voltage:item.voltage,
status:item.status
} }
}else{ }else{
deviceList['el'] = { deviceList['el'] = {
devType: item.devType, devType: item.devType,
devId:item.devId, devId:item.devId,
status:item.status
} }
} }
...@@ -219,6 +229,13 @@ import moment from "@/common/moment"; ...@@ -219,6 +229,13 @@ import moment from "@/common/moment";
this.list[index].show = !this.list[index].show; this.list[index].show = !this.list[index].show;
this.$forceUpdate(); this.$forceUpdate();
}, },
onSwitchDoor(e){
console.log(e,909090)
let t = e.target.value? 20: 40
this.onDeviceRun(t,e.target.dataset.id)
},
onDeviceRun(opType,devId){ onDeviceRun(opType,devId){
let that = this; let that = this;
if(this.deviceTime[devId]){ if(this.deviceTime[devId]){
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<image :src="assetsPath +'/logo_icon.png'" mode="widthFix"></image> <image :src="assetsPath +'/logo_icon.png'" mode="widthFix"></image>
</view> </view>
<view class="flex-col content"> <view class="flex-col content">
<view class="flex-row title-content "> <view class="flex-row title-content">
<text>凑角共享棋牌室</text> <text>凑角共享棋牌室</text>
<button class="cu-btn round text-bold" <button class="cu-btn round text-bold"
@tap="onNavToChangeStore">切换门店</button> @tap="onNavToChangeStore">切换门店</button>
......
...@@ -213,7 +213,7 @@ ...@@ -213,7 +213,7 @@
<view class="btn-box"> <view class="btn-box">
<button class="cu-btn cu-btn-1 margin-right" <button class="cu-btn cu-btn-1 margin-right"
@tap="onNavToCheckedCoupon">团购验券</button> @tap="onNavToCheckedCoupon">团购验券</button>
<button class="cu-btn cu-btn-2 " @tap="onOrderConfirm">{{orderType===1?'预约':'续单'}} </button> <button class="cu-btn cu-btn-2 " @tap="onOrderConfirmBefore">{{orderType===1?'预约':'续单'}} </button>
</view> </view>
</view> </view>
...@@ -1159,6 +1159,21 @@ ...@@ -1159,6 +1159,21 @@
onCancle() { onCancle() {
this.$refs.confirmPop.close(); this.$refs.confirmPop.close();
}, },
onOrderConfirmBefore(){
wx.requestSubscribeMessage({
tmplIds: [
'UkvsRnZkZB_w3MqXPbRhi4jEk8ML4N9PWT3rnd3Bhxg',
],
success: (res) => {
},
complete: (res) => {
console.log(res,909090)
// this.$refs.confirmPop.open();
this.onOrderConfirm();
}
})
},
onOrderConfirm() { onOrderConfirm() {
let nowDate = moment().format("MMDD") let nowDate = moment().format("MMDD")
...@@ -1212,13 +1227,13 @@ ...@@ -1212,13 +1227,13 @@
wx.requestSubscribeMessage({ wx.requestSubscribeMessage({
tmplIds: [ tmplIds: [
'HB2_moQRQrXC2cKw6zE08FF8UZJ5ue1h_qXZhvOkacc', 'HB2_moQRQrXC2cKw6zE08FF8UZJ5ue1h_qXZhvOkacc',
'UkvsRnZkZB_w3MqXPbRhi4jEk8ML4N9PWT3rnd3Bhxg',
'K8fbcKVq46w9o7Ekpesn70wK3mYjXqdSfFUth4AufqU' 'K8fbcKVq46w9o7Ekpesn70wK3mYjXqdSfFUth4AufqU'
], ],
success: (res) => { success: (res) => {
uni.setStorageSync("orderUseMessage", true);
}, },
complete: (res) => { complete: (res) => {
console.log(res,909090)
// this.$refs.confirmPop.open(); // this.$refs.confirmPop.open();
this.onOrderCreate(); this.onOrderCreate();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment