共享茶室

This commit is contained in:
吴鹏 2025-02-15 14:15:09 +08:00
parent 746fe6ffb7
commit 798a7ba909
17 changed files with 825 additions and 288 deletions

View File

@ -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

View File

@ -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;

View File

@ -48,7 +48,7 @@
包厢名称竹韵 包厢名称竹韵
</view> </view>
<view class=""> <view class="">
预计结束时间{{item.endTime}} 预计结束时间{{item.endTime == null ? '--' : item.endTime}}
</view> </view>
<view class=""> <view class="">
完成时间-- 完成时间--

View File

@ -21,6 +21,14 @@
{{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>
<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 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;

View File

@ -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){
if (res.code == 200) { uni.showToast({
uni.showToast({ title: '开启成功',
title: '关闭成功', icon: 'success',
icon: 'success', duration: 2000
duration: 2000 })
}) }
this.gateSnobj.powerStatus = 0 })
} else { // if (num == 0) { //
uni.showToast({ // this.$u.put(`/app/device/admin/${this.gateSnobj.deviceId}/switch?open=false`).then(res => {
title: res.msg, // if (res.code == 200) {
icon: 'none', // uni.showToast({
duration: 2000 // title: '',
}) // icon: 'success',
} // duration: 2000
}) // })
} else { // // this.gateSnobj.powerStatus = 0
this.$u.put(`/app/device/admin/${this.gateSnobj.deviceId}/switch?open=true`).then(res => { // } else {
if (res.code == 200) { // uni.showToast({
uni.showToast({ // title: res.msg,
title: '开启成功', // icon: 'none',
icon: 'success', // duration: 2000
duration: 2000 // })
}) // }
this.gateSnobj.powerStatus = 1 // })
} else { // } else { //
uni.showToast({ // this.$u.put(`/app/device/admin/${this.gateSnobj.deviceId}/switch?open=true`).then(res => {
title: res.msg, // if (res.code == 200) {
icon: 'none', // uni.showToast({
duration: 2000 // 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 {

View File

@ -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() {

View File

@ -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,21 +137,64 @@
bgc: { bgc: {
backgroundColor: "", backgroundColor: "",
}, },
userobj:[],
menuobj:[],
yiyouobj:[],
list:[]
} }
}, },
onLoad() { onLoad() {
// this.getinfo()
this.$u.get(`/getAppInfo`).then(res => {
if (res.code == 200) {
}else if(res.code == 401){
uni.reLaunch({
url:'/pages/login/index'
})
}
})
}, },
methods: { 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 => {
if (res.code == 200) {
this.userobj = res.user
this.getmenu()
}else if(res.code == 401){
uni.reLaunch({
url:'/pages/login/index'
})
}
})
},
// //
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'

View File

@ -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>

View File

@ -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{

View File

@ -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>

View File

@ -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>
@ -113,16 +118,16 @@
温馨提示 温馨提示
</view> </view>
<view class="wenzi"> <view class="wenzi">
1订单转发好友后好友也可直接自助开门进入 门店包厢 1订单转发好友后好友也可直接自助开门进入门店包厢
</view> </view>
<view class="wenzi"> <view class="wenzi">
2订单续单可能碰到后续时间段被人预定而无法 续单的情况请提前规划好预约时间段 2订单续单可能碰到后续时间段被人预定而无法续单的情况请提前规划好预约时间段
</view> </view>
<view class="wenzi"> <view class="wenzi">
3如果临时有事无法到店消费请在订单开始前 进行取消订单操作开始后不支持退款请合 理规划您的时间 3如果临时有事无法到店消费请在订单开始前进行取消订单操作开始后不支持退款请合理规划您的时间
</view> </view>
<view class="wenzi"> <view class="wenzi">
4若您迟到订单仍按预定开始时间计费迟到 部分时长不进行退款不进行延期请合理规划 预定时间段 4若您迟到订单仍按预定开始时间计费迟到部分时长不进行退款不进行延期请合理规划预定时间段
</view> </view>
<view class="wenzi"> <view class="wenzi">
5请勿大声喧哗订单结束离店请爱护财务 5请勿大声喧哗订单结束离店请爱护财务
@ -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,39 +232,65 @@
}, },
// //
btnkdm(){ btnkdm(){
this.$u.get(`app/store/openGate/${this.orderobj.storeId}`).then(res => { if(this.orderobj.userId != this.user.userId){
if (res.code == 200) { this.$u.get(`app/store/openGate/${this.orderobj.storeId}`).then(res => {
uni.showToast({ if (res.code == 200) {
title: '开启店门成功', uni.showToast({
icon: 'success', title: '开启店门成功',
duration: 2000 icon: 'success',
}) duration: 2000
}else{ })
uni.showToast({ }else{
title: res.msg, uni.showToast({
icon: 'none', title: res.msg,
duration: 2000 icon: 'none',
}) duration: 2000
} })
}) }
})
}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(){
this.$u.get(`app/room/openRoomGate/${this.orderobj.roomId}`).then(res => { if(this.orderobj.roomType2 == 1){
if (res.code == 200) { this.$u.get(`app/room/openRoomGate/${this.orderobj.roomId}`).then(res => {
uni.showToast({ if (res.code == 200) {
title: '开启包厢门成功', uni.showToast({
icon: 'success', title: '开启包厢门成功',
duration: 2000 icon: 'success',
}) duration: 2000
}else{ })
uni.showToast({ }else{
title: res.msg, uni.showToast({
icon: 'none', title: res.msg,
duration: 2000 icon: 'none',
}) duration: 2000
} })
}) }
})
}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{

View File

@ -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

View File

@ -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,18 +53,12 @@
</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>
<view class="cun">
</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">
@ -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.sceneValue = option.q;
let decodedValue = decodeURIComponent(this.sceneValue);
// URL
function getQueryParam(url, paramName) {
let regex = new RegExp(`[?&]${paramName}=([^&]*)`);
let results = regex.exec(url);
return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null;
}
// storeId roomId
let storeId = getQueryParam(decodedValue, 'storeId');
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.jinxinflag = false //tab
this.getbiaoqian()
this.getstorebiaoqian()
this.getorder()
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 this.storeId = option.storeId
uni.setStorageSync('storeId', this.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 { } else {
this.storeId = uni.getStorageSync('storeId') 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() { onShow() {
this.tabindex = 0
this.getroombq()
this.jinxinflag = false //tab
this.getbiaoqian()
this.getstorebiaoqian()
this.getorder()
this.hourPointsArray = this.getCurrentHourPoints() //24
}, },
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,11 +656,21 @@
} }
}) })
}else{ }else{
uni.showToast({ this.$u.get(`app/store/openGate/${this.storeId}`).then(res => {
title: '您当前没有订单', if(res.code == 200){
icon: 'none', uni.showToast({
duration: 2000 title: '开启店门成功',
}) icon: 'success',
duration: 2000
})
}else{
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
})
}
})
} }
}else if(num == 2){ }else if(num == 2){
if(this.jinxinglist.length > 1){ if(this.jinxinglist.length > 1){
@ -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;

View File

@ -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: '温馨提示',

View File

@ -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">
时长选择 时长选择
@ -186,10 +186,10 @@
1预定的订单将全时段保留迟到不可顺延和退款 1预定的订单将全时段保留迟到不可顺延和退款
</view> </view>
<view class=""> <view class="">
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 {

View File

@ -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({
title: '该设备已被绑定',
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({ uni.showToast({
title: '扫描失败', title: '打开成功',
icon: 'none' 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;
} }

View File

@ -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;