共享茶室
This commit is contained in:
parent
746fe6ffb7
commit
798a7ba909
|
|
@ -20,8 +20,8 @@ const install = (Vue, vm) => {
|
||||||
// },
|
// },
|
||||||
// https://yxd.ccttiot.com/prod-api});
|
// https://yxd.ccttiot.com/prod-api});
|
||||||
Vue.prototype.$u.http.setConfig({
|
Vue.prototype.$u.http.setConfig({
|
||||||
baseUrl: 'http://192.168.2.56:8089',
|
// baseUrl: 'http://192.168.2.56:8089',
|
||||||
// baseUrl: 'https://testcha.chuangtewl.com/prod-api',
|
baseUrl: 'https://testcha.chuangtewl.com/prod-api',
|
||||||
loadingText: '努力加载中~',
|
loadingText: '努力加载中~',
|
||||||
loadingTime: 800,
|
loadingTime: 800,
|
||||||
// 设置自定义头部content-type
|
// 设置自定义头部content-type
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,7 @@
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
// overflow: scroll;
|
// overflow: scroll;
|
||||||
padding-bottom: 70rpx;
|
padding-bottom: 20rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding-top: 8rpx;
|
padding-top: 8rpx;
|
||||||
padding-left: 36rpx;
|
padding-left: 36rpx;
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@
|
||||||
包厢名称:竹韵
|
包厢名称:竹韵
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
预计结束时间:{{item.endTime}}
|
预计结束时间:{{item.endTime == null ? '--' : item.endTime}}
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
完成时间:--
|
完成时间:--
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,14 @@
|
||||||
<view class="rt" @click="show = true">
|
<view class="rt" @click="show = true">
|
||||||
{{leixing}} <image src="https://api.ccttiot.com/smartmeter/img/static/uCta8cp7uXd1lGjZS6sc" mode=""></image>
|
{{leixing}} <image src="https://api.ccttiot.com/smartmeter/img/static/uCta8cp7uXd1lGjZS6sc" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="name" @click="btnewm">
|
||||||
|
<view class="lt">
|
||||||
|
生成二维码
|
||||||
|
</view>
|
||||||
|
<view class="rt">
|
||||||
|
<image src="https://api.ccttiot.com/smartmeter/img/static/uCta8cp7uXd1lGjZS6sc" mode=""></image>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="name" style="border: none;" @click="dtflags = true">
|
<view class="name" style="border: none;" @click="dtflags = true">
|
||||||
<view class="lt">
|
<view class="lt">
|
||||||
|
|
@ -194,6 +202,12 @@
|
||||||
uni.removeStorageSync('ruleIdlist')
|
uni.removeStorageSync('ruleIdlist')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 点击生成二维码
|
||||||
|
btnewm(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/page_shanghu/erwm?roomId=' + this.roomId
|
||||||
|
})
|
||||||
|
},
|
||||||
// 点击未投列表放选择
|
// 点击未投列表放选择
|
||||||
btntouf(){
|
btntouf(){
|
||||||
this.dtflags = false
|
this.dtflags = false
|
||||||
|
|
@ -209,7 +223,7 @@
|
||||||
success: res => {
|
success: res => {
|
||||||
function getQueryParam(url, paramName) {
|
function getQueryParam(url, paramName) {
|
||||||
let regex = new RegExp(`[?&]${paramName}=([^&]*)`)
|
let regex = new RegExp(`[?&]${paramName}=([^&]*)`)
|
||||||
let results = regex.exec(url);
|
let results = regex.exec(url)
|
||||||
return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null
|
return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null
|
||||||
}
|
}
|
||||||
console.log(res);
|
console.log(res);
|
||||||
|
|
@ -285,15 +299,15 @@
|
||||||
},
|
},
|
||||||
// 点击选择标签
|
// 点击选择标签
|
||||||
btnbq(dictValue,index) {
|
btnbq(dictValue,index) {
|
||||||
const indexExists = this.selectedIndices.includes(dictValue);
|
const indexExists = this.selectedIndices.includes(dictValue)
|
||||||
if (indexExists) {
|
if (indexExists) {
|
||||||
this.selectedIndices = this.selectedIndices.filter(i => i !== dictValue);
|
this.selectedIndices = this.selectedIndices.filter(i => i !== dictValue)
|
||||||
} else {
|
} else {
|
||||||
this.selectedIndices.push(dictValue);
|
this.selectedIndices.push(dictValue)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isSelected(dictValue) {
|
isSelected(dictValue) {
|
||||||
return this.selectedIndices.includes(dictValue);
|
return this.selectedIndices.includes(dictValue)
|
||||||
},
|
},
|
||||||
// 获取标签
|
// 获取标签
|
||||||
getbiaoqian(){
|
getbiaoqian(){
|
||||||
|
|
@ -670,7 +684,7 @@
|
||||||
}
|
}
|
||||||
.box{
|
.box{
|
||||||
width: 680rpx;
|
width: 680rpx;
|
||||||
max-height: 408rpx;
|
max-height: 470rpx;
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
margin-top: 22rpx;
|
margin-top: 22rpx;
|
||||||
|
|
|
||||||
|
|
@ -51,12 +51,12 @@
|
||||||
<view class="rt" v-if="!gateSnflag">
|
<view class="rt" v-if="!gateSnflag">
|
||||||
<text></text> 未绑定
|
<text></text> 未绑定
|
||||||
</view>
|
</view>
|
||||||
<view class="rt" v-if="gateSnobj.powerStatus == 0">
|
<!-- <view class="rt" v-if="gateSnobj.powerStatus == 0">
|
||||||
<text></text> 已关闭
|
<text></text> 已关闭
|
||||||
</view>
|
</view>
|
||||||
<view class="rt" style="color: #48893B;" v-if="gateSnobj.powerStatus == 1">
|
<view class="rt" style="color: #48893B;" v-if="gateSnobj.powerStatus == 1">
|
||||||
<text style="background-color: #48893B;"></text> 已开启
|
<text style="background-color: #48893B;"></text> 已开启
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="bot" v-if="gateSnobj.sn">
|
<view class="bot" v-if="gateSnobj.sn">
|
||||||
<view class="lt" style="color: #ccc;font-size: 24rpx;" v-if="gateobj.unlockCondition == 1">
|
<view class="lt" style="color: #ccc;font-size: 24rpx;" v-if="gateobj.unlockCondition == 1">
|
||||||
|
|
@ -119,16 +119,16 @@
|
||||||
<view class="rt" v-if="!val.device.sn">
|
<view class="rt" v-if="!val.device.sn">
|
||||||
<text></text> 未绑定
|
<text></text> 未绑定
|
||||||
</view>
|
</view>
|
||||||
<view class="rt" v-if="val.device.powerStatus == 0">
|
<!-- <view class="rt" v-if="val.device.powerStatus == 0">
|
||||||
<text></text> 已关闭
|
<text></text> 已关闭
|
||||||
</view>
|
</view>
|
||||||
<view class="rt" style="color: #48893B;" v-if="val.device.powerStatus == 1">
|
<view class="rt" style="color: #48893B;" v-if="val.device.powerStatus == 1">
|
||||||
<text style="background-color: #48893B;"></text> 已开启
|
<text style="background-color: #48893B;"></text> 已开启
|
||||||
</view>
|
</view> -->
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u4Btme5ARjeAyvvTjgBF"
|
<image src="https://api.ccttiot.com/smartmeter/img/static/u4Btme5ARjeAyvvTjgBF"
|
||||||
@click.stop="btnroomkg(1,indexs,item)" mode=""
|
@click.stop="btnroomkg(1,indexs,item)" mode=""
|
||||||
v-if="val.device.powerStatus == 0"></image>
|
v-if="val.device.powerStatus == 0"></image>
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/ua6R9hsgQZTfahcpaA8G"
|
<image src="https://api.ccttiot.com/smartmeter/img/static/u4Btme5ARjeAyvvTjgBF"
|
||||||
@click.stop="btnroomkg(0,indexs,item)" mode=""
|
@click.stop="btnroomkg(0,indexs,item)" mode=""
|
||||||
v-if="val.device.powerStatus == 1"></image>
|
v-if="val.device.powerStatus == 1"></image>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -201,9 +201,9 @@
|
||||||
<!-- <view class="rt" v-if="item.device.powerStatus == 0">
|
<!-- <view class="rt" v-if="item.device.powerStatus == 0">
|
||||||
<text></text> 已关闭
|
<text></text> 已关闭
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="rt" style="color: #48893B;" v-if="item.deviceId != null">
|
<!-- <view class="rt" style="color: #48893B;" v-if="item.deviceId != null">
|
||||||
<text style="background-color: #48893B;"></text> 开门
|
<text style="background-color: #48893B;"></text> 开门
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="bot" v-if="item.device.sn">
|
<view class="bot" v-if="item.device.sn">
|
||||||
<view class="lt" v-if="item.unlockCondition == 1">
|
<view class="lt" v-if="item.unlockCondition == 1">
|
||||||
|
|
@ -221,7 +221,7 @@
|
||||||
<view class="rt">
|
<view class="rt">
|
||||||
<!-- <image src="https://api.ccttiot.com/smartmeter/img/static/u4Btme5ARjeAyvvTjgBF"
|
<!-- <image src="https://api.ccttiot.com/smartmeter/img/static/u4Btme5ARjeAyvvTjgBF"
|
||||||
@click.stop="btncskg(1,index,item)" mode="" v-if="item.device.powerStatus == 0"></image> -->
|
@click.stop="btncskg(1,index,item)" mode="" v-if="item.device.powerStatus == 0"></image> -->
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/ua6R9hsgQZTfahcpaA8G" v-if="item.deviceId != null"
|
<image src="https://api.ccttiot.com/smartmeter/img/static/u4Btme5ARjeAyvvTjgBF" v-if="item.deviceId != null"
|
||||||
@click.stop="btncskg(0,index,item)" mode=""></image>
|
@click.stop="btncskg(0,index,item)" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -413,7 +413,7 @@
|
||||||
},
|
},
|
||||||
// 点击控制大厅设施
|
// 点击控制大厅设施
|
||||||
btndtkg(num, index, item) {
|
btndtkg(num, index, item) {
|
||||||
console.log(item);
|
console.log(item)
|
||||||
let equipmentId = item.equipmentList[0].equipmentId
|
let equipmentId = item.equipmentList[0].equipmentId
|
||||||
if (num == 0) { //关闭
|
if (num == 0) { //关闭
|
||||||
this.$u.put(`/app/device/adminMch/${equipmentId}/switch?open=false`).then(res => {
|
this.$u.put(`/app/device/adminMch/${equipmentId}/switch?open=false`).then(res => {
|
||||||
|
|
@ -461,6 +461,7 @@
|
||||||
},
|
},
|
||||||
// 点击控制房间设施
|
// 点击控制房间设施
|
||||||
btnroomkg(num, index, item) {
|
btnroomkg(num, index, item) {
|
||||||
|
console.log(item,'1000');
|
||||||
let equipmentId = item.equipmentList[index].equipmentId
|
let equipmentId = item.equipmentList[index].equipmentId
|
||||||
if (num == 0) { //关闭
|
if (num == 0) { //关闭
|
||||||
this.$u.put(`/app/device/adminMch/${equipmentId}/switch?open=false`).then(res => {
|
this.$u.put(`/app/device/adminMch/${equipmentId}/switch?open=false`).then(res => {
|
||||||
|
|
@ -512,41 +513,50 @@
|
||||||
},
|
},
|
||||||
// 点击控制大门
|
// 点击控制大门
|
||||||
btndmkg(num) {
|
btndmkg(num) {
|
||||||
if (num == 0) { //关闭
|
this.$u.get(`app/store/openGate/${this.storeId}`).then(res => {
|
||||||
this.$u.put(`/app/device/admin/${this.gateSnobj.deviceId}/switch?open=false`).then(res => {
|
|
||||||
if (res.code == 200) {
|
|
||||||
uni.showToast({
|
|
||||||
title: '关闭成功',
|
|
||||||
icon: 'success',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
this.gateSnobj.powerStatus = 0
|
|
||||||
} else {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else { //开启
|
|
||||||
this.$u.put(`/app/device/admin/${this.gateSnobj.deviceId}/switch?open=true`).then(res => {
|
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '开启成功',
|
title: '开启成功',
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
duration: 2000
|
duration: 2000
|
||||||
})
|
})
|
||||||
this.gateSnobj.powerStatus = 1
|
|
||||||
} else {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
// if (num == 0) { //关闭
|
||||||
|
// this.$u.put(`/app/device/admin/${this.gateSnobj.deviceId}/switch?open=false`).then(res => {
|
||||||
|
// if (res.code == 200) {
|
||||||
|
// uni.showToast({
|
||||||
|
// title: '关闭成功',
|
||||||
|
// icon: 'success',
|
||||||
|
// duration: 2000
|
||||||
|
// })
|
||||||
|
// this.gateSnobj.powerStatus = 0
|
||||||
|
// } else {
|
||||||
|
// uni.showToast({
|
||||||
|
// title: res.msg,
|
||||||
|
// icon: 'none',
|
||||||
|
// duration: 2000
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// } else { //开启
|
||||||
|
// this.$u.put(`/app/device/admin/${this.gateSnobj.deviceId}/switch?open=true`).then(res => {
|
||||||
|
// if (res.code == 200) {
|
||||||
|
// uni.showToast({
|
||||||
|
// title: '开启成功',
|
||||||
|
// icon: 'success',
|
||||||
|
// duration: 2000
|
||||||
|
// })
|
||||||
|
// this.gateSnobj.powerStatus = 1
|
||||||
|
// } else {
|
||||||
|
// uni.showToast({
|
||||||
|
// title: res.msg,
|
||||||
|
// icon: 'none',
|
||||||
|
// duration: 2000
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
|
|
||||||
// 点击添加大厅and厕所设施
|
// 点击添加大厅and厕所设施
|
||||||
|
|
@ -807,7 +817,7 @@
|
||||||
image {
|
image {
|
||||||
width: 50rpx;
|
width: 50rpx;
|
||||||
height: 50rpx;
|
height: 50rpx;
|
||||||
margin-top: 30rpx;
|
margin-top: 50rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.rt {
|
.rt {
|
||||||
|
|
|
||||||
|
|
@ -33,27 +33,19 @@
|
||||||
},
|
},
|
||||||
sn:'',
|
sn:'',
|
||||||
roomId:'',
|
roomId:'',
|
||||||
viewType:'',
|
|
||||||
equipmentId:'',
|
|
||||||
https:''
|
https:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
if(option.equipmentId){ //设施
|
if(option.roomId){ //房间and大厅
|
||||||
this.equipmentId = option.equipmentId
|
|
||||||
if(option.viewType){ //判断是否为卫生间
|
|
||||||
this.viewType = option.viewType
|
|
||||||
}else{
|
|
||||||
this.viewType = ''
|
|
||||||
}
|
|
||||||
this.https = 'https://testcha.chuangtewl.com?equipmentId=' + this.equipmentId + '&viewType=' + this.viewType
|
|
||||||
}else if(option.roomId){ //房间
|
|
||||||
this.roomId = option.roomId
|
this.roomId = option.roomId
|
||||||
this.viewType = option.viewType
|
this.https = 'https://testcha.chuangtewl.com?roomId=' + this.roomId
|
||||||
this.https = 'https://testcha.chuangtewl.com?roomId=' + this.roomId + '&viewType=' + this.viewType
|
}else if(option.storeId){ //大门-店铺
|
||||||
}else if(option.storeId){ //大门
|
|
||||||
this.storeId = option.storeId
|
this.storeId = option.storeId
|
||||||
this.https = 'https://testcha.chuangtewl.com?storeId=' + this.storeId
|
this.https = 'https://testcha.chuangtewl.com?storeId=' + this.storeId
|
||||||
|
}else if(option.toiletId){ //厕所
|
||||||
|
this.toiletId = option.toiletId
|
||||||
|
this.https = 'https://testcha.chuangtewl.com?toiletId=' + this.toiletId
|
||||||
}
|
}
|
||||||
console.log(option)
|
console.log(option)
|
||||||
this.qrFun()
|
this.qrFun()
|
||||||
|
|
@ -63,31 +55,31 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
drawCanvas() {
|
drawCanvas() {
|
||||||
const ctx = uni.createCanvasContext('qrcode', this);
|
const ctx = uni.createCanvasContext('qrcode', this)
|
||||||
ctx.setFillStyle('#fff');
|
ctx.setFillStyle('#fff')
|
||||||
ctx.fillRect(10, 10, 250, 250);
|
ctx.fillRect(10, 10, 250, 250)
|
||||||
ctx.draw();
|
ctx.draw()
|
||||||
},
|
},
|
||||||
// 保存二维码
|
// 保存二维码
|
||||||
saveCanvas() {
|
saveCanvas() {
|
||||||
uni.canvasToTempFilePath({
|
uni.canvasToTempFilePath({
|
||||||
canvasId: 'qrcode',
|
canvasId: 'qrcode',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
console.log(res.tempFilePath); // 打印图片路径
|
console.log(res.tempFilePath) // 打印图片路径
|
||||||
uni.saveImageToPhotosAlbum({
|
uni.saveImageToPhotosAlbum({
|
||||||
filePath: res.tempFilePath,
|
filePath: res.tempFilePath,
|
||||||
success: function() {
|
success: function() {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '保存成功',
|
title: '保存成功',
|
||||||
icon: 'success'
|
icon: 'success'
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
console.error(err);
|
console.error(err)
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
//**生成二维码**//
|
//**生成二维码**//
|
||||||
qrFun: function() {
|
qrFun: function() {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
</u-navbar>
|
</u-navbar>
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uAtuf76AiYArdJHLSjhO" class="imgbj" mode=""></image>
|
<image src="https://api.ccttiot.com/smartmeter/img/static/uAtuf76AiYArdJHLSjhO" class="imgbj" mode=""></image>
|
||||||
<view class="listbox">
|
<view class="listbox">
|
||||||
<view class="gongxiang">
|
<!-- <view class="gongxiang">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
共享设备与订单
|
共享设备与订单
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -26,10 +26,10 @@
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uuZkDhgdQoAOwLOAIeBS" mode=""></image>
|
<image src="https://api.ccttiot.com/smartmeter/img/static/uuZkDhgdQoAOwLOAIeBS" mode=""></image>
|
||||||
<view class="wz">退款审批</view>
|
<view class="wz">退款审批</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="listul_item">
|
<view class="listul_item">
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uIP0yWqUvEhRulj8pnWF" mode=""></image>
|
<image src="https://api.ccttiot.com/smartmeter/img/static/uIP0yWqUvEhRulj8pnWF" mode=""></image>
|
||||||
<view class="wz">充值优惠</view>
|
<view class="wz">充值优惠</view>
|
||||||
</view> -->
|
</view>
|
||||||
<view class="listul_item" @click="btnpage(6)">
|
<view class="listul_item" @click="btnpage(6)">
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uVlTMg8p52AQC38bGYR1" mode=""></image>
|
<image src="https://api.ccttiot.com/smartmeter/img/static/uVlTMg8p52AQC38bGYR1" mode=""></image>
|
||||||
<view class="wz">充值记录</view>
|
<view class="wz">充值记录</view>
|
||||||
|
|
@ -70,8 +70,8 @@
|
||||||
<view class="wz">销售统计</view>
|
<view class="wz">销售统计</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="gongxiang">
|
<!-- <view class="gongxiang">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
其他
|
其他
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -113,9 +113,19 @@
|
||||||
<view class="wz">设备录入</view>
|
<view class="wz">设备录入</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</view> -->
|
||||||
|
<view class="gongxiang" v-for="(item,index) in list" :key="index">
|
||||||
|
<view class="top">
|
||||||
|
{{item.menuName}}
|
||||||
|
</view>
|
||||||
|
<view class="listul">
|
||||||
|
<view class="listul_item" v-for="(val,indexs) in item.children" :key="indexs" @click="btnurl(val.url)">
|
||||||
|
<image :src="val.icon" mode=""></image>
|
||||||
|
<view class="wz">{{val.menuName}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<tab-bars :indexs='0' style=""></tab-bars>
|
<tab-bars :indexs='0' style=""></tab-bars>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -127,13 +137,57 @@
|
||||||
bgc: {
|
bgc: {
|
||||||
backgroundColor: "",
|
backgroundColor: "",
|
||||||
},
|
},
|
||||||
|
userobj:[],
|
||||||
|
menuobj:[],
|
||||||
|
yiyouobj:[],
|
||||||
|
list:[]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
// 一进来请求个人信息 判断有无登录
|
this.getinfo()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 点击进行页面跳转
|
||||||
|
btnurl(url){
|
||||||
|
console.log(url);
|
||||||
|
if(url == null){
|
||||||
|
uni.showToast({
|
||||||
|
title: '此功能暂未开放',
|
||||||
|
icon: 'none',
|
||||||
|
duration:2000
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
uni.navigateTo({
|
||||||
|
url:url
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 查询菜单列表
|
||||||
|
getmenu(){
|
||||||
|
this.$u.get('/app/appMenu/allList').then(res => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.menuobj = res.data
|
||||||
|
let topLevelMenus = this.menuobj.filter(item => item.parentId == 0)
|
||||||
|
let menuMap = new Map(topLevelMenus.map(item => [item.menuId, { ...item, children: [] }]))
|
||||||
|
this.yiyouobj = this.menuobj.filter(item =>
|
||||||
|
this.userobj.appMenus.includes(item.menuId)
|
||||||
|
)
|
||||||
|
this.yiyouobj.forEach(item => {
|
||||||
|
if (menuMap.has(item.parentId)) {
|
||||||
|
menuMap.get(item.parentId).children.push(item)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.list = Array.from(menuMap.values())
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 查询个人信息
|
||||||
|
getinfo(){
|
||||||
this.$u.get(`/getAppInfo`).then(res => {
|
this.$u.get(`/getAppInfo`).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
this.userobj = res.user
|
||||||
|
this.getmenu()
|
||||||
}else if(res.code == 401){
|
}else if(res.code == 401){
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url:'/pages/login/index'
|
url:'/pages/login/index'
|
||||||
|
|
@ -141,7 +195,6 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
|
||||||
// 点击这些提示未开放
|
// 点击这些提示未开放
|
||||||
btnwei(){
|
btnwei(){
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
@ -187,9 +240,14 @@
|
||||||
url:'/page_moban/baojieorder'
|
url:'/page_moban/baojieorder'
|
||||||
})
|
})
|
||||||
}else if(num == 8){ //跳转到对账单页面
|
}else if(num == 8){ //跳转到对账单页面
|
||||||
uni.navigateTo({
|
uni.showToast({
|
||||||
url:'/page_fenbaotwo/duizhangdan'
|
title: '此功能暂未开放',
|
||||||
|
icon: 'none',
|
||||||
|
duration:2000
|
||||||
})
|
})
|
||||||
|
// uni.navigateTo({
|
||||||
|
// url:'/page_fenbaotwo/duizhangdan'
|
||||||
|
// })
|
||||||
}else if(num == 9){ //跳转到配置WIFI页面
|
}else if(num == 9){ //跳转到配置WIFI页面
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/page_fenbaotwo/wifipz'
|
url:'/page_fenbaotwo/wifipz'
|
||||||
|
|
|
||||||
|
|
@ -89,20 +89,20 @@
|
||||||
<view class="rt" v-if="!item.device.sn">
|
<view class="rt" v-if="!item.device.sn">
|
||||||
<text></text> 未绑定
|
<text></text> 未绑定
|
||||||
</view>
|
</view>
|
||||||
<view class="rt" v-if="item.device.powerStatus == 0">
|
<!-- <view class="rt" v-if="item.device.powerStatus == 0">
|
||||||
<text></text> 已关闭
|
<text></text> 已关闭
|
||||||
</view>
|
</view>
|
||||||
<view class="rt" style="color: #48893B;" v-if="item.device.powerStatus == 1">
|
<view class="rt" style="color: #48893B;" v-if="item.device.powerStatus == 1">
|
||||||
<text style="background-color: #48893B;"></text> 已开启
|
<text style="background-color: #48893B;"></text> 已开启
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="bot" v-if="item.device.sn">
|
<view class="bot" v-if="item.device.sn">
|
||||||
<view class="lt">
|
<view class="lt">
|
||||||
SN:{{item.device.sn}}
|
SN:{{item.device.sn}}
|
||||||
</view>
|
</view>
|
||||||
<view class="rt">
|
<view class="rt">
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u4Btme5ARjeAyvvTjgBF" @click.stop="btnroomkg(1,index,item)" mode="" v-if="item.device.powerStatus == 0"></image>
|
<image src="https://api.ccttiot.com/smartmeter/img/static/u4Btme5ARjeAyvvTjgBF" @click.stop="btnroomkg(1,index,item)" mode=""></image>
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/ua6R9hsgQZTfahcpaA8G" @click.stop="btnroomkg(0,index,item)" mode="" v-if="item.device.powerStatus == 1"></image>
|
<!-- <image src="https://api.ccttiot.com/smartmeter/img/static/ua6R9hsgQZTfahcpaA8G" @click.stop="btnroomkg(0,index,item)" mode="" v-if="item.device.powerStatus == 1"></image> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -53,12 +53,12 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="sbm" @click.stop="btnewm(item.deviceId)">
|
<!-- <view class="sbm" @click.stop="btnewm(item.deviceId)">
|
||||||
<text></text>
|
<text></text>
|
||||||
<view class="">
|
<view class="">
|
||||||
设备码
|
设备码
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="" style="width: 100%;text-align: center;margin-top: 100rpx;font-size: 34rpx;color: #ccc;">
|
<view class="" style="width: 100%;text-align: center;margin-top: 100rpx;font-size: 34rpx;color: #ccc;">
|
||||||
没有更多设备啦...
|
没有更多设备啦...
|
||||||
|
|
@ -148,11 +148,11 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 点击跳转到二维码
|
// 点击跳转到二维码
|
||||||
btnewm(sn){
|
// btnewm(deviceId){
|
||||||
uni.navigateTo({
|
// uni.navigateTo({
|
||||||
url:'/page_shanghu/erwm?deviceId=' + deviceId
|
// url:'/page_shanghu/erwm?deviceId=' + deviceId
|
||||||
})
|
// })
|
||||||
},
|
// },
|
||||||
// 点击进行搜索
|
// 点击进行搜索
|
||||||
btnsousuo(){
|
btnsousuo(){
|
||||||
this.pagesum = 1
|
this.pagesum = 1
|
||||||
|
|
@ -306,7 +306,7 @@
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
.list_item{
|
.list_item{
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
height: 422rpx;
|
height: 340rpx;
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
.sbm{
|
.sbm{
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,6 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<tab-bars :indexs='1' style=""></tab-bars>
|
<tab-bars :indexs='1' style=""></tab-bars>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
<view class="dianpu">
|
<view class="dianpu">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<view class="lt">
|
<view class="lt">
|
||||||
【{{orderobj.storeName == null ? '--' : orderobj.storeName}}】
|
【{{orderobj.storeName == null ? '--' : orderobj.storeName}}】 <text v-if="orderobj.roomType2 == 1">房间</text> <text v-else>大厅</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="rt" @click="btndaohang">
|
<view class="rt" @click="btndaohang">
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u5yJpwCHAhqWlEwpbRsu" mode=""></image>
|
<image src="https://api.ccttiot.com/smartmeter/img/static/u5yJpwCHAhqWlEwpbRsu" mode=""></image>
|
||||||
|
|
@ -67,6 +67,10 @@
|
||||||
<text v-if="orderobj.payType == 'wx'">微信支付</text>
|
<text v-if="orderobj.payType == 'wx'">微信支付</text>
|
||||||
<text v-if="orderobj.payType == 'ye'">门店余额</text>
|
<text v-if="orderobj.payType == 'ye'">门店余额</text>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="bianh_val">
|
||||||
|
<text>套餐名称:</text>
|
||||||
|
<text>{{orderobj.explain == null ? '--' : orderobj.explain}}</text>
|
||||||
|
</view>
|
||||||
<view class="bianh_val">
|
<view class="bianh_val">
|
||||||
<text>付款金额:</text>
|
<text>付款金额:</text>
|
||||||
<text>¥{{orderobj.price == null ? '--' : orderobj.price}}({{orderobj.hours == null ? '--' : orderobj.hours}}小时套餐)</text>
|
<text>¥{{orderobj.price == null ? '--' : orderobj.price}}({{orderobj.hours == null ? '--' : orderobj.hours}}小时套餐)</text>
|
||||||
|
|
@ -89,7 +93,8 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="imglist">
|
<view class="imglist">
|
||||||
<image @click="btnkdm" src="https://api.ccttiot.com/smartmeter/img/static/uk2rqBfNYDmDwcEPdojx" mode=""></image>
|
<image @click="btnkdm" src="https://api.ccttiot.com/smartmeter/img/static/uk2rqBfNYDmDwcEPdojx" mode=""></image>
|
||||||
<image @click="btnkbxm" src="https://api.ccttiot.com/smartmeter/img/static/usV5AH49VApLz92J1w19" mode=""></image>
|
<image v-if="orderobj.roomType2 == 1" @click="btnkbxm" src="https://api.ccttiot.com/smartmeter/img/static/usV5AH49VApLz92J1w19" mode=""></image>
|
||||||
|
<image v-if="orderobj.roomType2 == 2" @click="btnkai" src="https://api.ccttiot.com/smartmeter/img/static/u1V3rc8uoZLRzKFO7K1r" mode=""></image>
|
||||||
<!-- <image v-if="flag" @click="btnhuanzuo" src="https://api.ccttiot.com/smartmeter/img/static/uv6wjMeqhbc07ZWGkdS7" mode=""></image> -->
|
<!-- <image v-if="flag" @click="btnhuanzuo" src="https://api.ccttiot.com/smartmeter/img/static/uv6wjMeqhbc07ZWGkdS7" mode=""></image> -->
|
||||||
<image v-if="orderobj.userId == user.userId" @click="btnxudan" src="https://api.ccttiot.com/smartmeter/img/static/utXKDITJDghq6PRyLWTA" mode=""></image>
|
<image v-if="orderobj.userId == user.userId" @click="btnxudan" src="https://api.ccttiot.com/smartmeter/img/static/utXKDITJDghq6PRyLWTA" mode=""></image>
|
||||||
<button v-if="orderobj.userId == user.userId" open-type="share"><image src="https://api.ccttiot.com/smartmeter/img/static/uJrkufnmzJju3xpmxqFE" mode=""></image></button>
|
<button v-if="orderobj.userId == user.userId" open-type="share"><image src="https://api.ccttiot.com/smartmeter/img/static/uJrkufnmzJju3xpmxqFE" mode=""></image></button>
|
||||||
|
|
@ -201,7 +206,24 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 如果是大厅设施则点击开启
|
||||||
|
btnkai(){
|
||||||
|
this.$u.get(`/app/room/openRoomGate/${this.orderobj.roomId}`).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '开启成功',
|
||||||
|
icon: 'success',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 自定义导航栏返回
|
// 自定义导航栏返回
|
||||||
btns(){
|
btns(){
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
|
|
@ -210,6 +232,7 @@
|
||||||
},
|
},
|
||||||
// 点击开店门
|
// 点击开店门
|
||||||
btnkdm(){
|
btnkdm(){
|
||||||
|
if(this.orderobj.userId != this.user.userId){
|
||||||
this.$u.get(`app/store/openGate/${this.orderobj.storeId}`).then(res => {
|
this.$u.get(`app/store/openGate/${this.orderobj.storeId}`).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
@ -225,9 +248,27 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}else{
|
||||||
|
this.$u.get(`app/store/openGate/${this.orderobj.storeId}&isVerify=false`).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '开启店门成功',
|
||||||
|
icon: 'success',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 点击开包厢门
|
// 点击开包厢门
|
||||||
btnkbxm(){
|
btnkbxm(){
|
||||||
|
if(this.orderobj.roomType2 == 1){
|
||||||
this.$u.get(`app/room/openRoomGate/${this.orderobj.roomId}`).then(res => {
|
this.$u.get(`app/room/openRoomGate/${this.orderobj.roomId}`).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
@ -243,6 +284,13 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title: '大厅无需开包厢门',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 请求订单详情(被分享人)
|
// 请求订单详情(被分享人)
|
||||||
getxqs(){
|
getxqs(){
|
||||||
|
|
@ -478,7 +526,7 @@
|
||||||
width: 288rpx;
|
width: 288rpx;
|
||||||
height: 78rpx;
|
height: 78rpx;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
margin-left: 34rpx;
|
margin-left: 40rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
border-radius: 50rpx;
|
border-radius: 50rpx;
|
||||||
image{
|
image{
|
||||||
|
|
@ -535,7 +583,7 @@
|
||||||
}
|
}
|
||||||
.dianpu{
|
.dianpu{
|
||||||
width: 674rpx;
|
width: 674rpx;
|
||||||
max-height: 526rpx;
|
max-height: 600rpx;
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
box-shadow: 0rpx 2rpx 12rpx 0rpx rgba(0,0,0,0.15);
|
box-shadow: 0rpx 2rpx 12rpx 0rpx rgba(0,0,0,0.15);
|
||||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||||
|
|
@ -580,6 +628,13 @@
|
||||||
color: #3D3D3D;
|
color: #3D3D3D;
|
||||||
border-left: 8rpx solid #48893B;
|
border-left: 8rpx solid #48893B;
|
||||||
border-radius: 4rpx;
|
border-radius: 4rpx;
|
||||||
|
text{
|
||||||
|
padding: 4rpx;
|
||||||
|
border: 1px solid #48893B;
|
||||||
|
font-size: 24rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #48893B;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.rt{
|
.rt{
|
||||||
image{
|
image{
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="bd">
|
<view class="bd">
|
||||||
<view class="lt">
|
<view class="lt">
|
||||||
<image :src="shopobj.picture" mode=""></image>
|
<image :src="shopobj.pictures[0]" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="rt">
|
<view class="rt">
|
||||||
<view class="name">
|
<view class="name">
|
||||||
|
|
@ -38,19 +38,19 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="tcxz" v-if="tclist[0].mode == 2">
|
<view class="tcxz">
|
||||||
<view class="tcxzname">
|
<view class="tcxzname">
|
||||||
套餐选择:
|
套餐选择:
|
||||||
</view>
|
</view>
|
||||||
<view class="taocan">
|
<view class="taocan">
|
||||||
<view class="tclist" v-for="(item,index) in tclist" :id="indextwo == index ? 'active' : ''"
|
<view class="tclist" v-for="(item,index) in tclist" :id="indextwo == index ? 'active' : ''"
|
||||||
:key="index" @click="btntc(index,item)">
|
:key="index" @click="btntc(index,item)">
|
||||||
<view style="font-weight: 600;" :id="indextwo == index ? 'active' : ''">{{item.explain == null ? '--' : item.explain}}</view>
|
<view style="font-weight: 600;" :id="indextwo == index ? 'active' : ''">{{item.explain.length > 5 ? item.explain.slice(0,4) + '...' : item.explain}}</view>
|
||||||
<view style="font-weight: 600;" :id="indextwo == index ? 'active' : ''">¥{{item.price == null ? '--' : item.price}}</view>
|
<view style="font-weight: 600;" :id="indextwo == index ? 'active' : ''">¥{{item.price == null ? '--' : item.price}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="tcxz" v-else style="display: block;">
|
<!-- <view class="tcxz" v-else style="display: block;">v-if="tclist[0].mode == 2"
|
||||||
<view class="tcxzname">
|
<view class="tcxzname">
|
||||||
收费方式:
|
收费方式:
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -60,7 +60,7 @@
|
||||||
flex-wrap: wrap;">
|
flex-wrap: wrap;">
|
||||||
{{tclist[0].price == null ? '--' : tclist[0].price}}元/小时,最低消费{{tclist[0].minHours == null ? '--' : tclist[0].minHours}}小时,押金金额{{tclist[0].deposit == null ? '--' : tclist[0].deposit}}元
|
{{tclist[0].price == null ? '--' : tclist[0].price}}元/小时,最低消费{{tclist[0].minHours == null ? '--' : tclist[0].minHours}}小时,押金金额{{tclist[0].deposit == null ? '--' : tclist[0].deposit}}元
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="shichangxz">
|
<view class="shichangxz">
|
||||||
<view class="tcxzname">
|
<view class="tcxzname">
|
||||||
时长选择:
|
时长选择:
|
||||||
|
|
@ -247,7 +247,8 @@
|
||||||
timeshijian:'',
|
timeshijian:'',
|
||||||
orderNo:'',
|
orderNo:'',
|
||||||
biaoqianlist:[],
|
biaoqianlist:[],
|
||||||
viewType:''
|
viewType:'',
|
||||||
|
ruleId:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
|
|
@ -509,9 +510,9 @@
|
||||||
// let formattedDateString = time.replace(/\//g, "-")
|
// let formattedDateString = time.replace(/\//g, "-")
|
||||||
let data = {
|
let data = {
|
||||||
payType: this.zfssid,
|
payType: this.zfssid,
|
||||||
ruleId:this.tclist[0].mode == 2 ? this.tcobj.ruleId : this.tclist[0].mode,
|
ruleId:this.ruleId,
|
||||||
viewType:this.viewType,
|
type2:this.viewType,
|
||||||
type: 2,
|
// type: 2,
|
||||||
mode: this.tclist[0].mode,
|
mode: this.tclist[0].mode,
|
||||||
hours: this.hourstime,
|
hours: this.hourstime,
|
||||||
price: this.price,
|
price: this.price,
|
||||||
|
|
@ -817,6 +818,7 @@
|
||||||
// 选择套餐
|
// 选择套餐
|
||||||
btntc(index, item) {
|
btntc(index, item) {
|
||||||
this.tcobj = item
|
this.tcobj = item
|
||||||
|
this.ruleId = item.ruleId
|
||||||
this.price = item.price //订单金额
|
this.price = item.price //订单金额
|
||||||
this.hourstime = item.hours //订单时间
|
this.hourstime = item.hours //订单时间
|
||||||
this.indextwo = index
|
this.indextwo = index
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="page">
|
<view class="page">
|
||||||
<u-navbar :title="tit" :border-bottom="false" :background="bgc" back-icon-color="#262B37" title-color='#262B37'
|
<u-navbar :title="shopobj.name" :border-bottom="false" :background="bgc" back-icon-color="#262B37" title-color='#262B37'
|
||||||
:custom-back="btns" title-size='36' height='36' id="navbar">
|
:custom-back="btns" title-size='36' height='36' id="navbar">
|
||||||
</u-navbar>
|
</u-navbar>
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u3lZnmhqSqkMd7gHKtMD" mode="" class="imgbj"></image>
|
<image src="https://api.ccttiot.com/smartmeter/img/static/u3lZnmhqSqkMd7gHKtMD" mode="" class="imgbj"></image>
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="juwo">
|
<view class="juwo">
|
||||||
距我{{distance}}km <text></text>
|
<span v-if="distance != ''">距我{{distance}}km</span> <text></text>
|
||||||
{{shopobj.address == undefined ? '--' : shopobj.address}}
|
{{shopobj.address == undefined ? '--' : shopobj.address}}
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
@ -33,28 +33,19 @@
|
||||||
<view class="one" @click="btngundong(item.type,index)" v-for="(item,index) in tabarr" :key="index">
|
<view class="one" @click="btngundong(item.type,index)" v-for="(item,index) in tabarr" :key="index">
|
||||||
<view class="kg">空闲 <text>{{item.idleNum}}</text></view>
|
<view class="kg">空闲 <text>{{item.idleNum}}</text></view>
|
||||||
<view class="gn">{{item.tag}}</view>
|
<view class="gn">{{item.tag}}</view>
|
||||||
<image v-if="tabindex == index" src="https://api.ccttiot.com/smartmeter/img/static/uZNimi3DEsGWsjfJm2Bg"
|
<image v-if="tabindex == item.type" src="https://api.ccttiot.com/smartmeter/img/static/uZNimi3DEsGWsjfJm2Bg"
|
||||||
mode=""></image>
|
mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="typewz" v-if="tabindex == 0">
|
|
||||||
<text class="one">茶室</text> <text class="two">干净舒适品好茶</text>
|
|
||||||
</view>
|
|
||||||
<view class="typewz" v-if="tabindex == 1">
|
|
||||||
<text class="one">棋牌</text> <text class="two">轻松消费无压力</text>
|
|
||||||
</view>
|
|
||||||
<view class="typewz" v-if="tabindex == 2">
|
|
||||||
<text class="one">台球</text> <text class="two">好台打好球,赛事级桌台</text>
|
|
||||||
</view> -->
|
|
||||||
<!-- 台球 --><!-- 台球 --><!-- 台球 --><!-- 台球 --><!-- 台球 --><!-- 台球 --><!-- 台球 --><!-- 台球 -->
|
<!-- 台球 --><!-- 台球 --><!-- 台球 --><!-- 台球 --><!-- 台球 --><!-- 台球 --><!-- 台球 --><!-- 台球 -->
|
||||||
<view class="taiqiubox" v-if="tabindex == 2" @touchstart="onTouchStart" @touchend="onTouchEnd"
|
<view class="taiqiubox" v-if="tabindex == 3" @touchstart="onTouchStart" @touchend="onTouchEnd"
|
||||||
@touchcancel="onTouchCancel">
|
@touchcancel="onTouchCancel">
|
||||||
<view class="zhuozi">
|
<view class="zhuozi">
|
||||||
<view class="tqlist">
|
<view class="tqlist">
|
||||||
<view class="tqlist_item" v-for="(item,index) in shopobj.roomList" :key="index" @click="btndetail(item)"> <!-- btntq -->
|
<view class="tqlist_item" v-for="(item,index) in shopobj.roomList" :key="index" @click="btndetail(item)"> <!-- btntq -->
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uqv5RPXXtMydaBdU7sqG" mode=""></image>
|
<image src="https://api.ccttiot.com/smartmeter/img/static/uqv5RPXXtMydaBdU7sqG" mode=""></image>
|
||||||
<view class="name">
|
<view class="name">
|
||||||
{{item.roomName}}
|
{{item.roomName.length > 5 ? item.roomName.slice(0,5) + '...' : item.roomName}}
|
||||||
</view>
|
</view>
|
||||||
<view class="kaitai">
|
<view class="kaitai">
|
||||||
开台
|
开台
|
||||||
|
|
@ -62,19 +53,13 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="tqname">
|
<!-- <view class="tqname">
|
||||||
杆柜
|
杆柜
|
||||||
</view>
|
</view>
|
||||||
<view class="gangui" @click="btncungan">
|
<view class="gangui" @click="btncungan">
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uQPXhfkhmvvvPXbW65WF" mode=""></image>
|
<image src="https://api.ccttiot.com/smartmeter/img/static/uQPXhfkhmvvvPXbW65WF" mode=""></image>
|
||||||
<!-- <view class="cun">
|
|
||||||
存
|
|
||||||
</view>
|
|
||||||
<view class="cun">
|
|
||||||
取
|
|
||||||
</view> -->
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="shoplist" v-else @touchstart="onTouchStart" @touchend="onTouchEnd" @touchcancel="onTouchCancel">
|
<view class="shoplist" v-else @touchstart="onTouchStart" @touchend="onTouchEnd" @touchcancel="onTouchCancel">
|
||||||
<view class="shop_item" v-for="(item,index) in shopobj.roomList" :key="index"
|
<view class="shop_item" v-for="(item,index) in shopobj.roomList" :key="index"
|
||||||
|
|
@ -165,6 +150,8 @@
|
||||||
</image>
|
</image>
|
||||||
<image @click="btnopen(2)" src="https://api.ccttiot.com/smartmeter/img/static/u4lmGbm77OWC2Uik2737" mode="">
|
<image @click="btnopen(2)" src="https://api.ccttiot.com/smartmeter/img/static/u4lmGbm77OWC2Uik2737" mode="">
|
||||||
</image>
|
</image>
|
||||||
|
<image @click="btnopen(6)" src="https://api.ccttiot.com/smartmeter/img/static/u3AxwRFjWnSAAYyNS70w" mode="">
|
||||||
|
</image>
|
||||||
<image @click="btnopen(3)" src="https://api.ccttiot.com/smartmeter/img/static/uUjamKC7Kvd9KMLLOeBD" mode="">
|
<image @click="btnopen(3)" src="https://api.ccttiot.com/smartmeter/img/static/uUjamKC7Kvd9KMLLOeBD" mode="">
|
||||||
</image>
|
</image>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -173,6 +160,8 @@
|
||||||
</image>
|
</image>
|
||||||
<image @click="btnopen(2)" src="https://api.ccttiot.com/smartmeter/img/static/u4lmGbm77OWC2Uik2737" mode="">
|
<image @click="btnopen(2)" src="https://api.ccttiot.com/smartmeter/img/static/u4lmGbm77OWC2Uik2737" mode="">
|
||||||
</image>
|
</image>
|
||||||
|
<image @click="btnopen(6)" src="https://api.ccttiot.com/smartmeter/img/static/u3AxwRFjWnSAAYyNS70w" mode="">
|
||||||
|
</image>
|
||||||
<image @click="btnopen(3)" src="https://api.ccttiot.com/smartmeter/img/static/uUjamKC7Kvd9KMLLOeBD" mode="">
|
<image @click="btnopen(3)" src="https://api.ccttiot.com/smartmeter/img/static/uUjamKC7Kvd9KMLLOeBD" mode="">
|
||||||
</image>
|
</image>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -210,6 +199,23 @@
|
||||||
<image v-if="jinxinflag" @click="btnyc" class="jinxinx"
|
<image v-if="jinxinflag" @click="btnyc" class="jinxinx"
|
||||||
src="https://api.ccttiot.com/smartmeter/img/static/uH5fAInJQYhf3wlXkuYI" mode=""></image>
|
src="https://api.ccttiot.com/smartmeter/img/static/uH5fAInJQYhf3wlXkuYI" mode=""></image>
|
||||||
<view class="mask" v-if="jinxinflag"></view>
|
<view class="mask" v-if="jinxinflag"></view>
|
||||||
|
<!-- 厕所 --><!-- 厕所 --><!-- 厕所 --><!-- 厕所 --><!-- 厕所 --><!-- 厕所 --><!-- 厕所 --><!-- 厕所 --><!-- 厕所 -->
|
||||||
|
<view class="cesuoul" v-if="cesuoflag">
|
||||||
|
<view class="cesuoli" v-for="(item,index) in cesuolist" :key="index">
|
||||||
|
<view class="caocuo">
|
||||||
|
<view class="name">
|
||||||
|
{{item.name}}
|
||||||
|
</view>
|
||||||
|
<view class="kaiguan" @click="btncs(item)">
|
||||||
|
开门
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="anniuqx" @click="cesuoflag = false">
|
||||||
|
取消
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="mask" v-if="cesuoflag"></view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -222,7 +228,7 @@
|
||||||
backgroundColor: "",
|
backgroundColor: "",
|
||||||
},
|
},
|
||||||
list: [{
|
list: [{
|
||||||
image: 'https://api.ccttiot.com/smartmeter/img/static/uqYdRLVlB5b61Qdnbirn'
|
image: 'https://api.ccttiot.com/smartmeter/img/static/uuoqWaq7HnXBteQayaz4'
|
||||||
}],
|
}],
|
||||||
imgflag: true,
|
imgflag: true,
|
||||||
storeId: '',
|
storeId: '',
|
||||||
|
|
@ -235,7 +241,7 @@
|
||||||
jinxinglist: [],
|
jinxinglist: [],
|
||||||
jinxinflag: false,
|
jinxinflag: false,
|
||||||
jinxintxt: '开包厢',
|
jinxintxt: '开包厢',
|
||||||
tabindex: 0,
|
tabindex: 1,
|
||||||
biaoqianlist: [],
|
biaoqianlist: [],
|
||||||
biaostoreqianlist: [],
|
biaostoreqianlist: [],
|
||||||
mdindex:-1,
|
mdindex:-1,
|
||||||
|
|
@ -243,32 +249,129 @@
|
||||||
tit:'',
|
tit:'',
|
||||||
tabarr:[],
|
tabarr:[],
|
||||||
type:'',
|
type:'',
|
||||||
distance:''
|
distance:'',
|
||||||
|
roomId:'',
|
||||||
|
sceneValue:'',
|
||||||
|
cesuolist:[],
|
||||||
|
cesuoflag:false,
|
||||||
|
csindex:-1,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
this.tit = option.tit
|
console.log(option);
|
||||||
this.distance = option.distance
|
if (option.q) {
|
||||||
if (option.storeId) {
|
// 解码扫码结果
|
||||||
this.storeId = option.storeId
|
this.sceneValue = option.q;
|
||||||
uni.setStorageSync('storeId', this.storeId)
|
let decodedValue = decodeURIComponent(this.sceneValue);
|
||||||
} else {
|
// 解析 URL 参数的函数
|
||||||
this.storeId = uni.getStorageSync('storeId')
|
function getQueryParam(url, paramName) {
|
||||||
|
let regex = new RegExp(`[?&]${paramName}=([^&]*)`);
|
||||||
|
let results = regex.exec(url);
|
||||||
|
return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null;
|
||||||
}
|
}
|
||||||
},
|
// 判断是 storeId 还是 roomId
|
||||||
onShow() {
|
let storeId = getQueryParam(decodedValue, 'storeId');
|
||||||
this.tabindex = 0
|
let roomId = getQueryParam(decodedValue, 'roomId');
|
||||||
|
if (storeId) {
|
||||||
|
console.log('这是 storeId:', storeId);
|
||||||
|
// 执行 storeId 相关的逻辑
|
||||||
|
this.storeId = storeId
|
||||||
|
uni.setStorageSync('storeId', this.storeId)
|
||||||
|
this.tabindex = 1
|
||||||
this.getroombq()
|
this.getroombq()
|
||||||
this.jinxinflag = false //如果进行了tab切换 则隐藏
|
this.jinxinflag = false //如果进行了tab切换 则隐藏
|
||||||
this.getbiaoqian()
|
this.getbiaoqian()
|
||||||
this.getstorebiaoqian()
|
this.getstorebiaoqian()
|
||||||
this.getorder()
|
this.getorder()
|
||||||
this.hourPointsArray = this.getCurrentHourPoints() //计算从当前时间往后推24小时
|
this.hourPointsArray = this.getCurrentHourPoints() //计算从当前时间往后推24小时
|
||||||
|
} else if (roomId) {
|
||||||
|
console.log('这是 roomId:', roomId);
|
||||||
|
// 执行 roomId 相关的逻辑
|
||||||
|
this.roomId = roomId
|
||||||
|
this.$u.get(`/app/order/getInProgressOrderList`).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
if(res.data == null || res.data.length == 0){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/myorder/index?roomId=' + this.roomId
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/page_user/dingdanxq?orderNo=' + res.data[0].orderNo + '&viewType=' + res.data[0].roomType2
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}else if(res.code == 401){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pages/login/index'
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
console.log('URL 中未找到 storeId 或 roomId');
|
||||||
|
}
|
||||||
|
}else if(option.storeId) {
|
||||||
|
this.storeId = option.storeId
|
||||||
|
uni.setStorageSync('storeId', this.storeId)
|
||||||
|
this.tabindex = 1
|
||||||
|
this.getroombq()
|
||||||
|
this.jinxinflag = false //如果进行了tab切换 则隐藏
|
||||||
|
this.getbiaoqian()
|
||||||
|
this.getstorebiaoqian()
|
||||||
|
this.getorder()
|
||||||
|
this.hourPointsArray = this.getCurrentHourPoints() //计算从当前时间往后推24小时
|
||||||
|
} else {
|
||||||
|
this.storeId = uni.getStorageSync('storeId')
|
||||||
|
this.tabindex = 1
|
||||||
|
this.getroombq()
|
||||||
|
this.jinxinflag = false //如果进行了tab切换 则隐藏
|
||||||
|
this.getbiaoqian()
|
||||||
|
this.getstorebiaoqian()
|
||||||
|
this.getorder()
|
||||||
|
this.hourPointsArray = this.getCurrentHourPoints() //计算从当前时间往后推24小时
|
||||||
|
}
|
||||||
|
if(option.distance){
|
||||||
|
this.distance = option.distance
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 点击打开厕所门
|
||||||
|
btncs(item){
|
||||||
|
if(item.deviceId == null){
|
||||||
|
uni.showToast({
|
||||||
|
title: '该厕所未安装设备',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
this.$u.get(`/app/room/openToilet/${item.toiletId}`).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '打开成功',
|
||||||
|
icon: 'success',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
this.cesuoflag = false
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
// 点击存取球杆进行跳转
|
// 点击存取球杆进行跳转
|
||||||
btncungan(){
|
btncungan(){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|
@ -278,7 +381,7 @@
|
||||||
|
|
||||||
// 点击包厢切换高亮
|
// 点击包厢切换高亮
|
||||||
btnmd(index,item){
|
btnmd(index,item){
|
||||||
this.viewType = item.viewType
|
this.viewType = item.reType
|
||||||
this.mdindex = index
|
this.mdindex = index
|
||||||
},
|
},
|
||||||
// 点击隐藏进行中订单
|
// 点击隐藏进行中订单
|
||||||
|
|
@ -353,12 +456,13 @@
|
||||||
|
|
||||||
// 点击切换tab类型
|
// 点击切换tab类型
|
||||||
btngundong(type, index) {
|
btngundong(type, index) {
|
||||||
this.tabindex = index
|
console.log(type)
|
||||||
|
this.shopobj.roomList = []
|
||||||
|
this.tabindex = type
|
||||||
this.type = type
|
this.type = type
|
||||||
this.getstoredetail()
|
this.getstoredetail()
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
// 拿到当前时间后24小时格式成两位数
|
// 拿到当前时间后24小时格式成两位数
|
||||||
initializeData() {
|
initializeData() {
|
||||||
// 获取当前时间
|
// 获取当前时间
|
||||||
|
|
@ -387,12 +491,12 @@
|
||||||
// 更新房间的预订状态且与initializeData进行匹对
|
// 更新房间的预订状态且与initializeData进行匹对
|
||||||
updateRoomReservationStatus() {
|
updateRoomReservationStatus() {
|
||||||
this.roomList.forEach(room => {
|
this.roomList.forEach(room => {
|
||||||
if (room.reservationStatus == null) {
|
// if (room.reservationStatus == null) {
|
||||||
room.reservationStatus = {} // 为每个房间创建一个新的预订状态对象
|
// room.reservationStatus = {} // 为每个房间创建一个新的预订状态对象
|
||||||
this.hours.forEach(hour => {
|
// this.hours.forEach(hour => {
|
||||||
room.reservationStatus[hour] = false // 初始化为未预订状态
|
// room.reservationStatus[hour] = false // 初始化为未预订状态
|
||||||
})
|
// })
|
||||||
} else {
|
// } else {
|
||||||
room.reservationStatus = {} // 为每个房间创建一个新的预订状态对象
|
room.reservationStatus = {} // 为每个房间创建一个新的预订状态对象
|
||||||
this.hours.forEach(hour => {
|
this.hours.forEach(hour => {
|
||||||
room.reservationStatus[hour] = false // 初始化为未预订状态
|
room.reservationStatus[hour] = false // 初始化为未预订状态
|
||||||
|
|
@ -434,12 +538,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
// }
|
||||||
})
|
})
|
||||||
console.log(this.roomList, '00')
|
console.log(this.roomList, '00')
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
//计算从当前时间往后推24小时
|
//计算从当前时间往后推24小时
|
||||||
getCurrentHourPoints() {
|
getCurrentHourPoints() {
|
||||||
let now = new Date()
|
let now = new Date()
|
||||||
|
|
@ -553,12 +656,22 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
|
this.$u.get(`app/store/openGate/${this.storeId}`).then(res => {
|
||||||
|
if(res.code == 200){
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '您当前没有订单',
|
title: '开启店门成功',
|
||||||
|
icon: 'success',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 2000
|
duration: 2000
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}else if(num == 2){
|
}else if(num == 2){
|
||||||
if(this.jinxinglist.length > 1){
|
if(this.jinxinglist.length > 1){
|
||||||
this.jinxinflag = true
|
this.jinxinflag = true
|
||||||
|
|
@ -619,12 +732,43 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}else if(num == 6){
|
||||||
|
this.$u.get(`/app/toilet/list?storeId=${this.storeId}`).then(res =>{
|
||||||
|
if(res.code == 200){
|
||||||
|
if(res.rows == null || res.rows.length == 0){
|
||||||
|
uni.showToast({
|
||||||
|
title: '暂无卫生间',
|
||||||
|
icon: 'none',
|
||||||
|
duration:2000
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
this.cesuolist = res.rows
|
||||||
|
if(this.cesuolist.length == 1){
|
||||||
|
this.$u.get(`/app/room/openToilet/${this.cesuolist[0].toiletId}`).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '打开成功',
|
||||||
|
icon: 'success',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
this.cesuoflag = false
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
this.cesuoflag = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 点击进行导航
|
// 点击进行导航
|
||||||
btndaohang() {
|
btndaohang() {
|
||||||
uni.openLocation({
|
uni.openLocation({
|
||||||
|
|
@ -649,7 +793,7 @@
|
||||||
// 点击跳转包厢详情页
|
// 点击跳转包厢详情页
|
||||||
btndetail(item) {
|
btndetail(item) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/myorder/index?roomId=' + item.roomId + '&viewType=' + item.viewType
|
url: '/pages/myorder/index?roomId=' + item.roomId + '&viewType=' + item.type2
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 点击自定义导航栏返回首页
|
// 点击自定义导航栏返回首页
|
||||||
|
|
@ -674,7 +818,6 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -699,7 +842,53 @@
|
||||||
background-color: #226914 !important;
|
background-color: #226914 !important;
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
}
|
}
|
||||||
|
.cesuoul{
|
||||||
|
width: 260rpx;
|
||||||
|
max-height: 500rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
position: fixed;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
z-index: 99;
|
||||||
|
padding: 30rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
.anniuqx{
|
||||||
|
width: 100%;
|
||||||
|
height: 80rpx;
|
||||||
|
border: 1px solid #226914;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 80rpx;
|
||||||
|
color: #226914;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.cesuoli{
|
||||||
|
width: 100%;
|
||||||
|
.caocuo{
|
||||||
|
.name{
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
}
|
||||||
|
.kaiguan{
|
||||||
|
padding: 10rpx;
|
||||||
|
background-color: #226914;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
margin: auto;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
width: 100rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
.taiqiubox {
|
.taiqiubox {
|
||||||
max-height: 710rpx;
|
max-height: 710rpx;
|
||||||
overflow: scroll;
|
overflow: scroll;
|
||||||
|
|
@ -959,7 +1148,7 @@
|
||||||
|
|
||||||
.xuanfu {
|
.xuanfu {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 62%;
|
top: 58%;
|
||||||
right: 30rpx;
|
right: 30rpx;
|
||||||
animation: fadeInDowns .5s ease-out forwards;
|
animation: fadeInDowns .5s ease-out forwards;
|
||||||
|
|
||||||
|
|
@ -997,7 +1186,7 @@
|
||||||
|
|
||||||
.xuanfus {
|
.xuanfus {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 62%;
|
top: 58%;
|
||||||
right: -80rpx;
|
right: -80rpx;
|
||||||
animation: fadeInDown .5s ease-out forwards;
|
animation: fadeInDown .5s ease-out forwards;
|
||||||
|
|
||||||
|
|
|
||||||
32
pages/my.vue
32
pages/my.vue
|
|
@ -224,23 +224,23 @@
|
||||||
url:'/pages/nearbystores/index'
|
url:'/pages/nearbystores/index'
|
||||||
})
|
})
|
||||||
}else if(num == 2){
|
}else if(num == 2){
|
||||||
uni.navigateTo({
|
// uni.navigateTo({
|
||||||
url:'/page_user/huogui'
|
// url:'/page_user/huogui'
|
||||||
|
// })
|
||||||
|
uni.scanCode({
|
||||||
|
onlyFromCamera: true,
|
||||||
|
scanType: ['qrCode'],
|
||||||
|
success: res => {
|
||||||
|
console.log(res);
|
||||||
|
},
|
||||||
|
fail: err => {
|
||||||
|
console.error('扫描失败:', err)
|
||||||
|
uni.showToast({
|
||||||
|
title: '扫描失败',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
// uni.scanCode({
|
|
||||||
// onlyFromCamera: true,
|
|
||||||
// scanType: ['qrCode'],
|
|
||||||
// success: res => {
|
|
||||||
// console.log(res);
|
|
||||||
// },
|
|
||||||
// fail: err => {
|
|
||||||
// console.error('扫描失败:', err)
|
|
||||||
// uni.showToast({
|
|
||||||
// title: '扫描失败',
|
|
||||||
// icon: 'none'
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
}else if(num == 7){
|
}else if(num == 7){
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '温馨提示',
|
title: '温馨提示',
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="page">
|
<view class="page">
|
||||||
<u-navbar title="包厢预定" :border-bottom="false" :background="bgc" back-icon-color="#262B37" title-color='#262B37'
|
<u-navbar title="包厢预定" :border-bottom="false" :background="bgc" back-icon-color="#262B37" title-color='#262B37'
|
||||||
title-size='36' height='36' id="navbar">
|
title-size='36' height='36' id="navbar" :custom-back="btns">
|
||||||
</u-navbar>
|
</u-navbar>
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u3lZnmhqSqkMd7gHKtMD" mode="" class="imgbj"></image>
|
<image src="https://api.ccttiot.com/smartmeter/img/static/u3lZnmhqSqkMd7gHKtMD" mode="" class="imgbj"></image>
|
||||||
<view class="boxda">
|
<view class="boxda">
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="bd">
|
<view class="bd">
|
||||||
<view class="lt">
|
<view class="lt">
|
||||||
<image :src="shopobj.picture" mode=""></image>
|
<image :src="shopobj.pictures[0]" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="rt">
|
<view class="rt">
|
||||||
<view class="name">
|
<view class="name">
|
||||||
|
|
@ -41,19 +41,19 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="tcxz" v-if="tclist[0].mode == 2">
|
<view class="tcxz" >
|
||||||
<view class="tcxzname">
|
<view class="tcxzname">
|
||||||
套餐选择:
|
套餐选择:
|
||||||
</view>
|
</view>
|
||||||
<view class="taocan">
|
<view class="taocan">
|
||||||
<view class="tclist" v-for="(item,index) in tclist" :id="indextwo == index ? 'active' : ''"
|
<view class="tclist" v-for="(item,index) in tclist" :id="indextwo == index ? 'active' : ''"
|
||||||
:key="index" @click="btntc(index,item)">
|
:key="index" @click="btntc(index,item)">
|
||||||
<view style="font-weight: 600;" :id="indextwo == index ? 'active' : ''">{{item.explain == null ? '--' : item.explain}}</view>
|
<view style="font-weight: 600;" :id="indextwo == index ? 'active' : ''">{{item.explain.length > 6 ? item.explain.slice(0,4) + '...' : item.explain}}</view>
|
||||||
<view style="font-weight: 600;" :id="indextwo == index ? 'active' : ''">¥{{item.price == null ? '--' : item.price}}</view>
|
<view style="font-weight: 600;" :id="indextwo == index ? 'active' : ''">¥{{item.price == null ? '--' : item.price}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="tcxz" v-else>
|
<!-- <view class="tcxz" v-else> v-if="tclist[0].mode == 2"
|
||||||
<view class="tcxzname">
|
<view class="tcxzname">
|
||||||
收费方式:
|
收费方式:
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -63,7 +63,7 @@
|
||||||
flex-wrap: wrap;">
|
flex-wrap: wrap;">
|
||||||
{{tclist[0].price == null ? '--' : tclist[0].price}}元/小时,最低消费{{tclist[0].minHours == null ? '--' : tclist[0].minHours}}小时,押金金额{{tclist[0].deposit == null ? '--' : tclist[0].deposit}}元
|
{{tclist[0].price == null ? '--' : tclist[0].price}}元/小时,最低消费{{tclist[0].minHours == null ? '--' : tclist[0].minHours}}小时,押金金额{{tclist[0].deposit == null ? '--' : tclist[0].deposit}}元
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="shichangxz">
|
<view class="shichangxz">
|
||||||
<view class="tcxzname">
|
<view class="tcxzname">
|
||||||
时长选择:
|
时长选择:
|
||||||
|
|
@ -189,7 +189,7 @@
|
||||||
2、为避免包厢被其他用户预约而给您带来不好的体验,如需续单,请提前续单!
|
2、为避免包厢被其他用户预约而给您带来不好的体验,如需续单,请提前续单!
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
3、订单开始前1小时内取消订单需核收15%退单费, 请合理规划您的时间;
|
3、订单开始前{{mintime}}分钟内取消订单需核收{{weiyueprice}}%退单费, 请合理规划您的时间;
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="anniu">
|
<view class="anniu">
|
||||||
|
|
@ -257,15 +257,19 @@
|
||||||
zfss: '微信支付',
|
zfss: '微信支付',
|
||||||
zfssid: 'wx',
|
zfssid: 'wx',
|
||||||
timeshijian:'',
|
timeshijian:'',
|
||||||
viewType:''
|
viewType:'',
|
||||||
|
weiyueprice:'',
|
||||||
|
mintime:'',
|
||||||
|
ruleId:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
this.roomId = option.roomId
|
this.roomId = option.roomId
|
||||||
this.viewType = option.viewType
|
// this.viewType = option.viewType
|
||||||
this.getbiaoqian()
|
this.getbiaoqian()
|
||||||
this.getstoredetail()
|
this.getstoredetail()
|
||||||
this.gettaocan()
|
this.gettaocan()
|
||||||
|
this.getweiyue()
|
||||||
this.hourPointsArray = this.getCurrentHourPoints() //计算从当前时间往后推24小时
|
this.hourPointsArray = this.getCurrentHourPoints() //计算从当前时间往后推24小时
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
|
@ -312,6 +316,20 @@
|
||||||
// 默认选中第一个日期// 默认选中第一个日期// 默认选中第一个日期// 默认选中第一个日期// 默认选中第一个日期// 默认选中第一个日期
|
// 默认选中第一个日期// 默认选中第一个日期// 默认选中第一个日期// 默认选中第一个日期// 默认选中第一个日期// 默认选中第一个日期
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
btns(){
|
||||||
|
uni.reLaunch({
|
||||||
|
url:'/pages/index/index?storeId=' + this.shopobj.storeId
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 拿到违约基础信息
|
||||||
|
getweiyue(){
|
||||||
|
this.$u.get(`/getAppInfo`).then(res => {
|
||||||
|
if(res.code == 200){
|
||||||
|
this.mintime = res.user.agoCancel
|
||||||
|
this.weiyueprice = res.user.penalty * 10
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 拿到标签进行对比
|
// 拿到标签进行对比
|
||||||
getMatchingLabel(item) {
|
getMatchingLabel(item) {
|
||||||
const matchingItem = this.biaoqianlist.find(items => items.dictValue === item)
|
const matchingItem = this.biaoqianlist.find(items => items.dictValue === item)
|
||||||
|
|
@ -429,6 +447,7 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.roomList = this.mergeReservationStatuses(this.roomList)
|
this.roomList = this.mergeReservationStatuses(this.roomList)
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 将this.roomlist中的三个数组合并成一个
|
// 将this.roomlist中的三个数组合并成一个
|
||||||
|
|
@ -542,10 +561,10 @@
|
||||||
// let formattedDateString = time.replace(/\//g, "-")
|
// let formattedDateString = time.replace(/\//g, "-")
|
||||||
let data = {
|
let data = {
|
||||||
roomId: this.roomId,
|
roomId: this.roomId,
|
||||||
viewType:this.viewType,
|
type2:this.viewType,
|
||||||
payType: this.zfssid,
|
payType: this.zfssid,
|
||||||
ruleId:this.tclist[0].mode == 2 ? this.tcobj.ruleId : this.tclist[0].ruleId,
|
ruleId:this.ruleId,
|
||||||
type: 1,
|
// type: 1,
|
||||||
reserveStartTime: this.timeshijian,
|
reserveStartTime: this.timeshijian,
|
||||||
mode: this.tclist[0].mode,
|
mode: this.tclist[0].mode,
|
||||||
hours: this.hourstime,
|
hours: this.hourstime,
|
||||||
|
|
@ -789,7 +808,8 @@
|
||||||
this.$u.get(`/app/room/${this.roomId}`).then(res => {
|
this.$u.get(`/app/room/${this.roomId}`).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.shopobj = res.data
|
this.shopobj = res.data
|
||||||
if(res.data.reservedTimePeriods == null){
|
this.viewType = res.data.type2
|
||||||
|
if(res.data.reservedTimePeriods == null || res.data.reservedTimePeriods.length == 0){
|
||||||
this.roomList = []
|
this.roomList = []
|
||||||
for(let i = 0;i < 24;i++){
|
for(let i = 0;i < 24;i++){
|
||||||
this.roomList.push(false)
|
this.roomList.push(false)
|
||||||
|
|
@ -903,6 +923,7 @@
|
||||||
// 选择套餐
|
// 选择套餐
|
||||||
btntc(index, item) {
|
btntc(index, item) {
|
||||||
this.tcobj = item
|
this.tcobj = item
|
||||||
|
this.ruleId = item.ruleId
|
||||||
this.price = item.price //订单金额
|
this.price = item.price //订单金额
|
||||||
this.hourstime = item.hours //订单时间
|
this.hourstime = item.hours //订单时间
|
||||||
this.indextwo = index
|
this.indextwo = index
|
||||||
|
|
@ -1490,7 +1511,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.tcxz .taocan .tclist {
|
.tcxz .taocan .tclist {
|
||||||
width: 186rpx;
|
width: 200rpx;
|
||||||
height: 110rpx;
|
height: 110rpx;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
border: 2rpx solid #7C7C7C;
|
border: 2rpx solid #7C7C7C;
|
||||||
|
|
@ -1507,7 +1528,7 @@
|
||||||
color: #3D3D3D;
|
color: #3D3D3D;
|
||||||
// font-weight: 600;
|
// font-weight: 600;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 182rpx;
|
width: 200rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.riqi {
|
.riqi {
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
<u-navbar :is-back="false" :border-bottom="false" :background="bgc" title-color='#2E4975' title-size='36'
|
<u-navbar :is-back="false" :border-bottom="false" :background="bgc" title-color='#2E4975' title-size='36'
|
||||||
height='8'></u-navbar>
|
height='8'></u-navbar>
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u3lZnmhqSqkMd7gHKtMD" mode="" class="imgbj"></image>
|
<image src="https://api.ccttiot.com/smartmeter/img/static/u3lZnmhqSqkMd7gHKtMD" mode="" class="imgbj"></image>
|
||||||
<view class="title" @click="btnshanghu">
|
<view class="title">
|
||||||
商户中心
|
<text v-if="userType != 00" @click="btnshanghu">商户中心</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="serchshop">
|
<view class="serchshop">
|
||||||
<view class="dingwei" @click="btnweizhi">
|
<view class="dingwei" @click="btnweizhi">
|
||||||
|
|
@ -41,9 +41,9 @@
|
||||||
<view class="shop_item" v-for="(item,index) in listshop" :key="index" @click="btndetail(item.storeId,item)">
|
<view class="shop_item" v-for="(item,index) in listshop" :key="index" @click="btndetail(item.storeId,item)">
|
||||||
<view class="lt">
|
<view class="lt">
|
||||||
<image :src="item.pictures[0]" mode="aspectFill"></image>
|
<image :src="item.pictures[0]" mode="aspectFill"></image>
|
||||||
<view class="hour">
|
<!-- <view class="hour">
|
||||||
{{item.minimumTime == undefined ? '--' : item.minimumTime}}小时起订
|
{{item.minimumTime == undefined ? '--' : item.minimumTime}}小时起订
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="rt">
|
<view class="rt">
|
||||||
<view class="name">
|
<view class="name">
|
||||||
|
|
@ -53,9 +53,9 @@
|
||||||
{{item.address.length > 13 ? item.address.slice(0,13) + '...' : item.address}}
|
{{item.address.length > 13 ? item.address.slice(0,13) + '...' : item.address}}
|
||||||
</view>
|
</view>
|
||||||
<view class="storebq">
|
<view class="storebq">
|
||||||
<image v-if="item.type == 1" src="https://api.ccttiot.com/smartmeter/img/static/u7ilmXTNlXUbbvfSgOa1" mode=""></image>
|
<image v-if="item.typeTags && item.typeTags.some(tag => tag == 1)" src="https://api.ccttiot.com/smartmeter/img/static/u7ilmXTNlXUbbvfSgOa1" mode=""></image>
|
||||||
<image v-if="item.type == 2" src="https://api.ccttiot.com/smartmeter/img/static/umA2EUZkovZEA0hCLmP3" mode=""></image>
|
<image v-if="item.typeTags && item.typeTags.some(tag => tag == 2)" src="https://api.ccttiot.com/smartmeter/img/static/umA2EUZkovZEA0hCLmP3" mode=""></image>
|
||||||
<image v-if="item.type == 3" src="https://api.ccttiot.com/smartmeter/img/static/uPjeCCnwjiJlCNqURltX" mode=""></image>
|
<image v-if="item.typeTags && item.typeTags.some(tag => tag == 3)" src="https://api.ccttiot.com/smartmeter/img/static/uPjeCCnwjiJlCNqURltX" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="juli">
|
<view class="juli">
|
||||||
<view class="kmjuli">
|
<view class="kmjuli">
|
||||||
|
|
@ -85,13 +85,17 @@
|
||||||
<image @click="btnopen(1)" src="https://api.ccttiot.com/smartmeter/img/static/uKeCHdot1z4QJldDe3UL" mode=""></image>
|
<image @click="btnopen(1)" src="https://api.ccttiot.com/smartmeter/img/static/uKeCHdot1z4QJldDe3UL" mode=""></image>
|
||||||
<image @click="btnopen(2)" src="https://api.ccttiot.com/smartmeter/img/static/u4lmGbm77OWC2Uik2737" mode=""></image>
|
<image @click="btnopen(2)" src="https://api.ccttiot.com/smartmeter/img/static/u4lmGbm77OWC2Uik2737" mode=""></image>
|
||||||
<image @click="btnopen(3)" src="https://api.ccttiot.com/smartmeter/img/static/uUjamKC7Kvd9KMLLOeBD" mode=""></image>
|
<image @click="btnopen(3)" src="https://api.ccttiot.com/smartmeter/img/static/uUjamKC7Kvd9KMLLOeBD" mode=""></image>
|
||||||
|
<image @click="btnopen(6)" src="https://api.ccttiot.com/smartmeter/img/static/u3AxwRFjWnSAAYyNS70w" mode=""></image>
|
||||||
<image @click="btnopen(4)" src="https://api.ccttiot.com/smartmeter/img/static/u9ccoP5o6Gt6rCKwsXva" mode=""></image>
|
<image @click="btnopen(4)" src="https://api.ccttiot.com/smartmeter/img/static/u9ccoP5o6Gt6rCKwsXva" mode=""></image>
|
||||||
|
<image @click="btnopen(5)" src="https://api.ccttiot.com/smartmeter/img/static/uONMVGcplNBtVnjlHaeh" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="xuanfus" v-else>
|
<view class="xuanfus" v-else>
|
||||||
<image @click="btnopen(1)" src="https://api.ccttiot.com/smartmeter/img/static/uKeCHdot1z4QJldDe3UL" mode=""></image>
|
<image @click="btnopen(1)" src="https://api.ccttiot.com/smartmeter/img/static/uKeCHdot1z4QJldDe3UL" mode=""></image>
|
||||||
<image @click="btnopen(2)" src="https://api.ccttiot.com/smartmeter/img/static/u4lmGbm77OWC2Uik2737" mode=""></image>
|
<image @click="btnopen(2)" src="https://api.ccttiot.com/smartmeter/img/static/u4lmGbm77OWC2Uik2737" mode=""></image>
|
||||||
|
<image @click="btnopen(6)" src="https://api.ccttiot.com/smartmeter/img/static/u3AxwRFjWnSAAYyNS70w" mode=""></image>
|
||||||
<image @click="btnopen(3)" src="https://api.ccttiot.com/smartmeter/img/static/uUjamKC7Kvd9KMLLOeBD" mode=""></image>
|
<image @click="btnopen(3)" src="https://api.ccttiot.com/smartmeter/img/static/uUjamKC7Kvd9KMLLOeBD" mode=""></image>
|
||||||
<image @click="btnopen(4)" src="https://api.ccttiot.com/smartmeter/img/static/u9ccoP5o6Gt6rCKwsXva" mode=""></image>
|
<image @click="btnopen(4)" src="https://api.ccttiot.com/smartmeter/img/static/u9ccoP5o6Gt6rCKwsXva" mode=""></image>
|
||||||
|
<image @click="btnopen(5)" src="https://api.ccttiot.com/smartmeter/img/static/uONMVGcplNBtVnjlHaeh" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="karaokeroom" v-if="jinxinflag">
|
<view class="karaokeroom" v-if="jinxinflag">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
|
|
@ -124,6 +128,24 @@
|
||||||
</view>
|
</view>
|
||||||
<image v-if="jinxinflag" @click="jinxinflag = false" class="jinxinx" src="https://api.ccttiot.com/smartmeter/img/static/uH5fAInJQYhf3wlXkuYI" mode=""></image>
|
<image v-if="jinxinflag" @click="jinxinflag = false" class="jinxinx" src="https://api.ccttiot.com/smartmeter/img/static/uH5fAInJQYhf3wlXkuYI" mode=""></image>
|
||||||
<view class="mask" v-if="jinxinflag"></view>
|
<view class="mask" v-if="jinxinflag"></view>
|
||||||
|
<!-- 厕所 --><!-- 厕所 --><!-- 厕所 --><!-- 厕所 --><!-- 厕所 --><!-- 厕所 --><!-- 厕所 --><!-- 厕所 --><!-- 厕所 -->
|
||||||
|
<view class="cesuoul" v-if="cesuoflag">
|
||||||
|
<view class="cesuoli" v-for="(item,index) in cesuolist" :key="index">
|
||||||
|
<view class="caocuo">
|
||||||
|
<view class="name">
|
||||||
|
{{item.name}}
|
||||||
|
</view>
|
||||||
|
<view class="kaiguan" @click="btncs(item)">
|
||||||
|
开门
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="anniuqx" @click="cesuoflag = false">
|
||||||
|
取消
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="mask" v-if="cesuoflag"></view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -151,7 +173,11 @@
|
||||||
jinxinflag:false,
|
jinxinflag:false,
|
||||||
sousuovalue:'',
|
sousuovalue:'',
|
||||||
tabindex:1,
|
tabindex:1,
|
||||||
type:1
|
type:1,
|
||||||
|
userType:'00',
|
||||||
|
cesuolist:[],
|
||||||
|
cesuoflag:false,
|
||||||
|
csindex:-1,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
|
|
@ -184,7 +210,7 @@
|
||||||
},
|
},
|
||||||
// 点击选择开包厢
|
// 点击选择开包厢
|
||||||
btnmd(index,item){
|
btnmd(index,item){
|
||||||
this.viewType = item.viewType
|
this.viewType = item.reType
|
||||||
this.mdindex = index
|
this.mdindex = index
|
||||||
},
|
},
|
||||||
// 请求正在进行中的订单
|
// 请求正在进行中的订单
|
||||||
|
|
@ -352,16 +378,129 @@
|
||||||
onlyFromCamera: true,
|
onlyFromCamera: true,
|
||||||
scanType: ['qrCode'],
|
scanType: ['qrCode'],
|
||||||
success: res => {
|
success: res => {
|
||||||
console.log(res)
|
function getQueryParam(url, paramName) {
|
||||||
uni.navigateTo({
|
let regex = new RegExp(`[?&]${paramName}=([^&]*)`)
|
||||||
url:'/pages/myorder/orderxd?roomId=' + 65
|
let results = regex.exec(url);
|
||||||
})
|
return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null
|
||||||
},
|
}
|
||||||
fail: err => {
|
console.log(res);
|
||||||
console.error('扫描失败:', err)
|
let sceneValue = res.result
|
||||||
|
let decodedValue = decodeURIComponent(sceneValue)
|
||||||
|
let id = getQueryParam(decodedValue, 'sn')
|
||||||
|
if(id){
|
||||||
|
let that = this
|
||||||
|
let data = {
|
||||||
|
sn: id,
|
||||||
|
}
|
||||||
|
that.$u.get(`/app/device/isBind?deviceNo=${id}`).then(res => {
|
||||||
|
if (res.data == 2) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '扫描失败',
|
title: '该设备已被绑定',
|
||||||
icon: 'none'
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
} else if (res.data == 1) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '该设备未绑定,你需进行绑定吗?',
|
||||||
|
success: function(res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
that.$u.put("/app/device/bind", data).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '绑定成功',
|
||||||
|
icon: 'success',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
that.userType = '01'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else if(res.data == 0){
|
||||||
|
uni.showToast({
|
||||||
|
title: '该设备为录入,请先录入',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else if(num == 5){
|
||||||
|
uni.switchTab({
|
||||||
|
url:'/pages/tj'
|
||||||
|
})
|
||||||
|
}else if(num == 6){
|
||||||
|
if(this.jinxinglist.length > 0){
|
||||||
|
let storeId = this.jinxinglist[0].storeId
|
||||||
|
this.$u.get(`/app/toilet/list?storeId=${storeId}`).then(res =>{
|
||||||
|
if(res.code == 200){
|
||||||
|
if(res.rows == null || res.rows.length == 0){
|
||||||
|
uni.showToast({
|
||||||
|
title: '暂无卫生间',
|
||||||
|
icon: 'none',
|
||||||
|
duration:2000
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
this.cesuolist = res.rows
|
||||||
|
if(this.cesuolist.length == 1){
|
||||||
|
this.$u.get(`/app/room/openToilet/${this.cesuolist[0].toiletId}`).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '打开成功',
|
||||||
|
icon: 'success',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
this.cesuoflag = false
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
this.cesuoflag = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title: '当前没有订单,请先下单',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 点击打开厕所门
|
||||||
|
btncs(item){
|
||||||
|
console.log(item);
|
||||||
|
if(item.deviceId == null){
|
||||||
|
uni.showToast({
|
||||||
|
title: '该厕所未安装设备',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
this.$u.get(`/app/room/openToilet/${item.toiletId}`).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '打开成功',
|
||||||
|
icon: 'success',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
this.cesuoflag = false
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -401,6 +540,7 @@
|
||||||
getinfo(){
|
getinfo(){
|
||||||
this.$u.get(`/getAppInfo`).then(res => {
|
this.$u.get(`/getAppInfo`).then(res => {
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
|
this.userType = res.user.userType
|
||||||
uni.setStorageSync('user', res.data)
|
uni.setStorageSync('user', res.data)
|
||||||
}else if(res.code == 401){
|
}else if(res.code == 401){
|
||||||
this.jingmo()
|
this.jingmo()
|
||||||
|
|
@ -420,6 +560,7 @@
|
||||||
that.$u.post(`/loginByopenid?jsCode=${res.code}`,data).then(res=>{
|
that.$u.post(`/loginByopenid?jsCode=${res.code}`,data).then(res=>{
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
console.log("老用户登录",res)
|
console.log("老用户登录",res)
|
||||||
|
that.getinfo()
|
||||||
wx.setStorageSync('token', res.token)
|
wx.setStorageSync('token', res.token)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -459,7 +600,7 @@
|
||||||
onTouchEnd(e) {
|
onTouchEnd(e) {
|
||||||
this.imgflag = true
|
this.imgflag = true
|
||||||
let deltaX = e.changedTouches[0].clientX - this.touchStartX
|
let deltaX = e.changedTouches[0].clientX - this.touchStartX
|
||||||
let deltaY = e.changedTouches[0].clientY - this.touchStartY;
|
let deltaY = e.changedTouches[0].clientY - this.touchStartY
|
||||||
if (Math.abs(deltaX) > 50 && Math.abs(deltaX) > Math.abs(deltaY)) {
|
if (Math.abs(deltaX) > 50 && Math.abs(deltaX) > Math.abs(deltaY)) {
|
||||||
if (deltaX >= 0) {
|
if (deltaX >= 0) {
|
||||||
// console.log("左滑")
|
// console.log("左滑")
|
||||||
|
|
@ -522,6 +663,53 @@
|
||||||
font-size: 40rpx !important;
|
font-size: 40rpx !important;
|
||||||
color: #3D3D3D !important;
|
color: #3D3D3D !important;
|
||||||
}
|
}
|
||||||
|
.cesuoul{
|
||||||
|
width: 260rpx;
|
||||||
|
max-height: 500rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
position: fixed;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
z-index: 99;
|
||||||
|
padding: 30rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
.anniuqx{
|
||||||
|
width: 100%;
|
||||||
|
height: 80rpx;
|
||||||
|
border: 1px solid #226914;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 80rpx;
|
||||||
|
color: #226914;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.cesuoli{
|
||||||
|
width: 100%;
|
||||||
|
.caocuo{
|
||||||
|
.name{
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
}
|
||||||
|
.kaiguan{
|
||||||
|
padding: 10rpx;
|
||||||
|
background-color: #226914;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
margin: auto;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
width: 100rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
.tabqh{
|
.tabqh{
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
@ -707,10 +895,10 @@
|
||||||
.shop_item{
|
.shop_item{
|
||||||
margin: auto;
|
margin: auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-top: 40rpx;
|
margin-top: 30rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 674rpx;
|
width: 674rpx;
|
||||||
height: 350rpx;
|
height: 330rpx;
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
padding: 20rpx 18rpx;
|
padding: 20rpx 18rpx;
|
||||||
box-shadow: 0rpx 2rpx 12rpx 0rpx rgba(0,0,0,0.15);
|
box-shadow: 0rpx 2rpx 12rpx 0rpx rgba(0,0,0,0.15);
|
||||||
|
|
@ -781,7 +969,7 @@
|
||||||
margin-right: 38rpx;
|
margin-right: 38rpx;
|
||||||
image{
|
image{
|
||||||
width: 186rpx;
|
width: 186rpx;
|
||||||
height: 236rpx;
|
height: 220rpx;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
}
|
}
|
||||||
.hour{
|
.hour{
|
||||||
|
|
@ -841,6 +1029,7 @@
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
color: #226914;
|
color: #226914;
|
||||||
line-height: 50rpx;
|
line-height: 50rpx;
|
||||||
|
height: 50rpx;
|
||||||
padding-left: 34rpx;
|
padding-left: 34rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
38
pages/tj.vue
38
pages/tj.vue
|
|
@ -15,16 +15,16 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="list" @touchstart="touchStart" @touchend="touchEnd">
|
<view class="list" @touchstart="touchStart" @touchend="touchEnd">
|
||||||
<view class="list_item" v-for="(item,index) in orderlist" :key="index" @click="btnxq(item.orderNo)">
|
<view class="list_item" v-for="(item,index) in orderlist" :key="index" @click="btnxq(item.orderNo,item.roomType2)">
|
||||||
<view class="rts" v-if="item.status == 0"><text>订单状态</text> <text class="ones">待支付</text></view>
|
<view class="rts" v-if="item.status == 0"><text>订单状态 <text v-if="item.reType == 1" class="ydd">预订单</text> <text v-if="item.reType == 2" class="ydd">续单</text></text> <text class="ones">待支付</text></view>
|
||||||
<view class="rts" v-if="item.status == 1"><text>订单状态</text> <text class="ones">支付中</text></view>
|
<view class="rts" v-if="item.status == 1"><text>订单状态 <text v-if="item.reType == 1" class="ydd">预订单</text> <text v-if="item.reType == 2" class="ydd">续单</text></text> <text class="ones">支付中</text></view>
|
||||||
<view class="rts" v-if="item.status == 2"><text>订单状态</text> <text class="ones">待使用</text></view>
|
<view class="rts" v-if="item.status == 2"><text>订单状态 <text v-if="item.reType == 1" class="ydd">预订单</text> <text v-if="item.reType == 2" class="ydd">续单</text></text> <text class="ones">待使用</text></view>
|
||||||
<view class="rts" v-if="item.status == 3"><text>订单状态</text> <text class="ones">使用中</text></view>
|
<view class="rts" v-if="item.status == 3"><text>订单状态 <text v-if="item.reType == 1" class="ydd">预订单</text> <text v-if="item.reType == 2" class="ydd">续单</text></text> <text class="ones">使用中</text></view>
|
||||||
<view class="rts" v-if="item.status == 4"><text>订单状态</text> <text class="ones">已完成</text></view>
|
<view class="rts" v-if="item.status == 4"><text>订单状态 <text v-if="item.reType == 1" class="ydd">预订单</text> <text v-if="item.reType == 2" class="ydd">续单</text></text> <text class="ones">已完成</text></view>
|
||||||
<view class="rts" v-if="item.status == 5"><text>订单状态</text> <text class="ones">超时自动取消</text></view>
|
<view class="rts" v-if="item.status == 5"><text>订单状态 <text v-if="item.reType == 1" class="ydd">预订单</text> <text v-if="item.reType == 2" class="ydd">续单</text></text> <text class="ones">超时自动取消</text></view>
|
||||||
<view class="rts" v-if="item.status == 6"><text>订单状态</text> <text class="ones">用户取消订单</text></view>
|
<view class="rts" v-if="item.status == 6"><text>订单状态 <text v-if="item.reType == 1" class="ydd">预订单</text> <text v-if="item.reType == 2" class="ydd">续单</text></text> <text class="ones">用户取消订单</text></view>
|
||||||
<view class="rts" v-if="item.status == 7"><text>订单状态</text> <text class="ones">退款中</text></view>
|
<view class="rts" v-if="item.status == 7"><text>订单状态 <text v-if="item.reType == 1" class="ydd">预订单</text> <text v-if="item.reType == 2" class="ydd">续单</text></text> <text class="ones">退款中</text></view>
|
||||||
<view class="rts" v-if="item.status == 8"><text>订单状态</text> <text class="ones">已退款</text></view>
|
<view class="rts" v-if="item.status == 8"><text>订单状态 <text v-if="item.reType == 1" class="ydd">预订单</text> <text v-if="item.reType == 2" class="ydd">续单</text></text> <text class="ones">已退款</text></view>
|
||||||
<view class="zt" v-if="item.status == 9">用户结束订单</view>
|
<view class="zt" v-if="item.status == 9">用户结束订单</view>
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<view class="lt">
|
<view class="lt">
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="two">
|
<view class="two">
|
||||||
<view class="lt">
|
<view class="lt">
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/ulun23wQhiiETNXRlAu4" mode=""></image>
|
<image :src="item.picture" mode=""></image>
|
||||||
<view class="shuo">
|
<view class="shuo">
|
||||||
<view class="">
|
<view class="">
|
||||||
预定包厢
|
预定包厢
|
||||||
|
|
@ -218,9 +218,9 @@
|
||||||
this.getlist()
|
this.getlist()
|
||||||
},
|
},
|
||||||
// 点击跳转到详情页
|
// 点击跳转到详情页
|
||||||
btnxq(orderNo){
|
btnxq(orderNo,roomType2){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/page_user/dingdanxq?orderNo=' + orderNo
|
url:'/page_user/dingdanxq?orderNo=' + orderNo + '&viewType=' + roomType2
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 点击结束订单
|
// 点击结束订单
|
||||||
|
|
@ -247,7 +247,7 @@
|
||||||
}else{
|
}else{
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
icon: 'success',
|
icon: 'none',
|
||||||
duration:2000
|
duration:2000
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -303,7 +303,7 @@
|
||||||
fail: function(err) {
|
fail: function(err) {
|
||||||
console.error('拨打电话失败', err)
|
console.error('拨打电话失败', err)
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '取消拨打电话',
|
title: '暂无店长电话',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -459,6 +459,14 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
.ydd{
|
||||||
|
padding: 4rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border: 1px solid #48893B;
|
||||||
|
color: #48893B;
|
||||||
|
font-size: 24rpx;
|
||||||
|
margin-left: 10rpx;
|
||||||
|
}
|
||||||
.ones{
|
.ones{
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user