共享茶室

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});
Vue.prototype.$u.http.setConfig({
baseUrl: 'http://192.168.2.56:8089',
// baseUrl: 'https://testcha.chuangtewl.com/prod-api',
// baseUrl: 'http://192.168.2.56:8089',
baseUrl: 'https://testcha.chuangtewl.com/prod-api',
loadingText: '努力加载中~',
loadingTime: 800,
// 设置自定义头部content-type

View File

@ -158,7 +158,7 @@
background-color: #fff;
border-radius: 20rpx;
// overflow: scroll;
padding-bottom: 70rpx;
padding-bottom: 20rpx;
box-sizing: border-box;
padding-top: 8rpx;
padding-left: 36rpx;

View File

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

View File

@ -21,6 +21,14 @@
{{leixing}} <image src="https://api.ccttiot.com/smartmeter/img/static/uCta8cp7uXd1lGjZS6sc" mode=""></image>
</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="lt">
设备绑定
@ -194,6 +202,12 @@
uni.removeStorageSync('ruleIdlist')
},
methods: {
//
btnewm(){
uni.navigateTo({
url:'/page_shanghu/erwm?roomId=' + this.roomId
})
},
//
btntouf(){
this.dtflags = false
@ -209,7 +223,7 @@
success: res => {
function getQueryParam(url, paramName) {
let regex = new RegExp(`[?&]${paramName}=([^&]*)`)
let results = regex.exec(url);
let results = regex.exec(url)
return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null
}
console.log(res);
@ -285,15 +299,15 @@
},
//
btnbq(dictValue,index) {
const indexExists = this.selectedIndices.includes(dictValue);
const indexExists = this.selectedIndices.includes(dictValue)
if (indexExists) {
this.selectedIndices = this.selectedIndices.filter(i => i !== dictValue);
this.selectedIndices = this.selectedIndices.filter(i => i !== dictValue)
} else {
this.selectedIndices.push(dictValue);
this.selectedIndices.push(dictValue)
}
},
isSelected(dictValue) {
return this.selectedIndices.includes(dictValue);
return this.selectedIndices.includes(dictValue)
},
//
getbiaoqian(){
@ -439,7 +453,7 @@
}
})
} else if (res.cancel) {
}
}
})
@ -670,7 +684,7 @@
}
.box{
width: 680rpx;
max-height: 408rpx;
max-height: 470rpx;
background: #FFFFFF;
margin: auto;
margin-top: 22rpx;

View File

@ -51,12 +51,12 @@
<view class="rt" v-if="!gateSnflag">
<text></text> 未绑定
</view>
<view class="rt" v-if="gateSnobj.powerStatus == 0">
<!-- <view class="rt" v-if="gateSnobj.powerStatus == 0">
<text></text> 已关闭
</view>
<view class="rt" style="color: #48893B;" v-if="gateSnobj.powerStatus == 1">
<text style="background-color: #48893B;"></text> 已开启
</view>
</view> -->
</view>
<view class="bot" v-if="gateSnobj.sn">
<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">
<text></text> 未绑定
</view>
<view class="rt" v-if="val.device.powerStatus == 0">
<!-- <view class="rt" v-if="val.device.powerStatus == 0">
<text></text> 已关闭
</view>
<view class="rt" style="color: #48893B;" v-if="val.device.powerStatus == 1">
<text style="background-color: #48893B;"></text> 已开启
</view>
</view> -->
<image src="https://api.ccttiot.com/smartmeter/img/static/u4Btme5ARjeAyvvTjgBF"
@click.stop="btnroomkg(1,indexs,item)" mode=""
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=""
v-if="val.device.powerStatus == 1"></image>
</view>
@ -201,9 +201,9 @@
<!-- <view class="rt" v-if="item.device.powerStatus == 0">
<text></text> 已关闭
</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> 开门
</view>
</view> -->
</view>
<view class="bot" v-if="item.device.sn">
<view class="lt" v-if="item.unlockCondition == 1">
@ -221,7 +221,7 @@
<view class="rt">
<!-- <image src="https://api.ccttiot.com/smartmeter/img/static/u4Btme5ARjeAyvvTjgBF"
@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>
</view>
</view>
@ -413,7 +413,7 @@
},
//
btndtkg(num, index, item) {
console.log(item);
console.log(item)
let equipmentId = item.equipmentList[0].equipmentId
if (num == 0) { //
this.$u.put(`/app/device/adminMch/${equipmentId}/switch?open=false`).then(res => {
@ -461,6 +461,7 @@
},
//
btnroomkg(num, index, item) {
console.log(item,'1000');
let equipmentId = item.equipmentList[index].equipmentId
if (num == 0) { //
this.$u.put(`/app/device/adminMch/${equipmentId}/switch?open=false`).then(res => {
@ -512,41 +513,50 @@
},
//
btndmkg(num) {
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
})
}
})
}
this.$u.get(`app/store/openGate/${this.storeId}`).then(res => {
if(res.code == 200){
uni.showToast({
title: '开启成功',
icon: 'success',
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
@ -807,7 +817,7 @@
image {
width: 50rpx;
height: 50rpx;
margin-top: 30rpx;
margin-top: 50rpx;
}
.rt {

View File

@ -33,27 +33,19 @@
},
sn:'',
roomId:'',
viewType:'',
equipmentId:'',
https:''
}
},
onLoad(option) {
if(option.equipmentId){ //
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){ //
if(option.roomId){ //and
this.roomId = option.roomId
this.viewType = option.viewType
this.https = 'https://testcha.chuangtewl.com?roomId=' + this.roomId + '&viewType=' + this.viewType
}else if(option.storeId){ //
this.https = 'https://testcha.chuangtewl.com?roomId=' + this.roomId
}else if(option.storeId){ //-
this.storeId = option.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)
this.qrFun()
@ -63,31 +55,31 @@
},
methods: {
drawCanvas() {
const ctx = uni.createCanvasContext('qrcode', this);
ctx.setFillStyle('#fff');
ctx.fillRect(10, 10, 250, 250);
ctx.draw();
const ctx = uni.createCanvasContext('qrcode', this)
ctx.setFillStyle('#fff')
ctx.fillRect(10, 10, 250, 250)
ctx.draw()
},
//
saveCanvas() {
uni.canvasToTempFilePath({
canvasId: 'qrcode',
success: (res) => {
console.log(res.tempFilePath); //
console.log(res.tempFilePath) //
uni.saveImageToPhotosAlbum({
filePath: res.tempFilePath,
success: function() {
uni.showToast({
title: '保存成功',
icon: 'success'
});
})
}
});
})
},
fail: (err) => {
console.error(err);
console.error(err)
}
});
})
},
//****//
qrFun: function() {

View File

@ -5,7 +5,7 @@
</u-navbar>
<image src="https://api.ccttiot.com/smartmeter/img/static/uAtuf76AiYArdJHLSjhO" class="imgbj" mode=""></image>
<view class="listbox">
<view class="gongxiang">
<!-- <view class="gongxiang">
<view class="top">
共享设备与订单
</view>
@ -26,10 +26,10 @@
<image src="https://api.ccttiot.com/smartmeter/img/static/uuZkDhgdQoAOwLOAIeBS" mode=""></image>
<view class="wz">退款审批</view>
</view>
<!-- <view class="listul_item">
<view class="listul_item">
<image src="https://api.ccttiot.com/smartmeter/img/static/uIP0yWqUvEhRulj8pnWF" mode=""></image>
<view class="wz">充值优惠</view>
</view> -->
</view>
<view class="listul_item" @click="btnpage(6)">
<image src="https://api.ccttiot.com/smartmeter/img/static/uVlTMg8p52AQC38bGYR1" mode=""></image>
<view class="wz">充值记录</view>
@ -70,8 +70,8 @@
<view class="wz">销售统计</view>
</view>
</view>
</view>
<view class="gongxiang">
</view> -->
<!-- <view class="gongxiang">
<view class="top">
其他
</view>
@ -113,9 +113,19 @@
<view class="wz">设备录入</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>
<tab-bars :indexs='0' style=""></tab-bars>
</view>
</template>
@ -127,21 +137,64 @@
bgc: {
backgroundColor: "",
},
userobj:[],
menuobj:[],
yiyouobj:[],
list:[]
}
},
onLoad() {
//
this.$u.get(`/getAppInfo`).then(res => {
if (res.code == 200) {
}else if(res.code == 401){
uni.reLaunch({
url:'/pages/login/index'
})
}
})
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 => {
if (res.code == 200) {
this.userobj = res.user
this.getmenu()
}else if(res.code == 401){
uni.reLaunch({
url:'/pages/login/index'
})
}
})
},
//
btnwei(){
uni.showToast({
@ -187,9 +240,14 @@
url:'/page_moban/baojieorder'
})
}else if(num == 8){ //
uni.navigateTo({
url:'/page_fenbaotwo/duizhangdan'
})
uni.showToast({
title: '此功能暂未开放',
icon: 'none',
duration:2000
})
// uni.navigateTo({
// url:'/page_fenbaotwo/duizhangdan'
// })
}else if(num == 9){ //WIFI
uni.navigateTo({
url:'/page_fenbaotwo/wifipz'

View File

@ -89,20 +89,20 @@
<view class="rt" v-if="!item.device.sn">
<text></text> 未绑定
</view>
<view class="rt" v-if="item.device.powerStatus == 0">
<!-- <view class="rt" v-if="item.device.powerStatus == 0">
<text></text> 已关闭
</view>
<view class="rt" style="color: #48893B;" v-if="item.device.powerStatus == 1">
<text style="background-color: #48893B;"></text> 已开启
</view>
</view> -->
</view>
<view class="bot" v-if="item.device.sn">
<view class="lt">
SN{{item.device.sn}}
</view>
<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/ua6R9hsgQZTfahcpaA8G" @click.stop="btnroomkg(0,index,item)" mode="" v-if="item.device.powerStatus == 1"></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> -->
</view>
</view>
</view>

View File

@ -53,12 +53,12 @@
</view>
</view>
</view>
<view class="sbm" @click.stop="btnewm(item.deviceId)">
<!-- <view class="sbm" @click.stop="btnewm(item.deviceId)">
<text></text>
<view class="">
设备码
</view>
</view>
</view> -->
</view>
<view class="" style="width: 100%;text-align: center;margin-top: 100rpx;font-size: 34rpx;color: #ccc;">
没有更多设备啦...
@ -148,11 +148,11 @@
})
},
//
btnewm(sn){
uni.navigateTo({
url:'/page_shanghu/erwm?deviceId=' + deviceId
})
},
// btnewm(deviceId){
// uni.navigateTo({
// url:'/page_shanghu/erwm?deviceId=' + deviceId
// })
// },
//
btnsousuo(){
this.pagesum = 1
@ -306,7 +306,7 @@
box-sizing: border-box;
.list_item{
width: 750rpx;
height: 422rpx;
height: 340rpx;
background: #FFFFFF;
margin-top: 20rpx;
.sbm{

View File

@ -137,7 +137,6 @@
</view>
</view>
</view>
<tab-bars :indexs='1' style=""></tab-bars>
</view>
</template>

View File

@ -34,7 +34,7 @@
<view class="dianpu">
<view class="top">
<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 class="rt" @click="btndaohang">
<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 == 'ye'">门店余额</text>
</view>
<view class="bianh_val">
<text>套餐名称</text>
<text>{{orderobj.explain == null ? '--' : orderobj.explain}}</text>
</view>
<view class="bianh_val">
<text>付款金额</text>
<text>{{orderobj.price == null ? '--' : orderobj.price}}({{orderobj.hours == null ? '--' : orderobj.hours}}小时套餐)</text>
@ -89,7 +93,8 @@
</view>
<view class="imglist">
<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="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>
@ -113,16 +118,16 @@
温馨提示
</view>
<view class="wenzi">
1订单转发好友后好友也可直接自助开门进入 门店包厢
1订单转发好友后好友也可直接自助开门进入门店包厢
</view>
<view class="wenzi">
2订单续单可能碰到后续时间段被人预定而无法 续单的情况请提前规划好预约时间段
2订单续单可能碰到后续时间段被人预定而无法续单的情况请提前规划好预约时间段
</view>
<view class="wenzi">
3如果临时有事无法到店消费请在订单开始前 进行取消订单操作开始后不支持退款请合 理规划您的时间
3如果临时有事无法到店消费请在订单开始前进行取消订单操作开始后不支持退款请合理规划您的时间
</view>
<view class="wenzi">
4若您迟到订单仍按预定开始时间计费迟到 部分时长不进行退款不进行延期请合理规划 预定时间段
4若您迟到订单仍按预定开始时间计费迟到部分时长不进行退款不进行延期请合理规划预定时间段
</view>
<view class="wenzi">
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(){
uni.reLaunch({
@ -210,39 +232,65 @@
},
//
btnkdm(){
this.$u.get(`app/store/openGate/${this.orderobj.storeId}`).then(res => {
if (res.code == 200) {
uni.showToast({
title: '开启店门成功',
icon: 'success',
duration: 2000
})
}else{
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
})
}
})
if(this.orderobj.userId != this.user.userId){
this.$u.get(`app/store/openGate/${this.orderobj.storeId}`).then(res => {
if (res.code == 200) {
uni.showToast({
title: '开启店门成功',
icon: 'success',
duration: 2000
})
}else{
uni.showToast({
title: res.msg,
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(){
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
})
}
})
if(this.orderobj.roomType2 == 1){
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
})
}
})
}else{
uni.showToast({
title: '大厅无需开包厢门',
icon: 'none',
duration: 2000
})
}
},
// ()
getxqs(){
@ -478,7 +526,7 @@
width: 288rpx;
height: 78rpx;
margin-top: 20rpx;
margin-left: 34rpx;
margin-left: 40rpx;
position: relative;
border-radius: 50rpx;
image{
@ -535,7 +583,7 @@
}
.dianpu{
width: 674rpx;
max-height: 526rpx;
max-height: 600rpx;
background: #FFFFFF;
box-shadow: 0rpx 2rpx 12rpx 0rpx rgba(0,0,0,0.15);
border-radius: 18rpx 18rpx 18rpx 18rpx;
@ -580,6 +628,13 @@
color: #3D3D3D;
border-left: 8rpx solid #48893B;
border-radius: 4rpx;
text{
padding: 4rpx;
border: 1px solid #48893B;
font-size: 24rpx;
font-weight: 400;
color: #48893B;
}
}
.rt{
image{

View File

@ -11,7 +11,7 @@
</view>
<view class="bd">
<view class="lt">
<image :src="shopobj.picture" mode=""></image>
<image :src="shopobj.pictures[0]" mode=""></image>
</view>
<view class="rt">
<view class="name">
@ -38,19 +38,19 @@
</view>
</view>
</view> -->
<view class="tcxz" v-if="tclist[0].mode == 2">
<view class="tcxz">
<view class="tcxzname">
套餐选择
</view>
<view class="taocan">
<view class="tclist" v-for="(item,index) in tclist" :id="indextwo == index ? 'active' : ''"
: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>
</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>
@ -60,7 +60,7 @@
flex-wrap: wrap;">
{{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 class="shichangxz">
<view class="tcxzname">
时长选择
@ -247,7 +247,8 @@
timeshijian:'',
orderNo:'',
biaoqianlist:[],
viewType:''
viewType:'',
ruleId:''
}
},
onLoad(option) {
@ -509,9 +510,9 @@
// let formattedDateString = time.replace(/\//g, "-")
let data = {
payType: this.zfssid,
ruleId:this.tclist[0].mode == 2 ? this.tcobj.ruleId : this.tclist[0].mode,
viewType:this.viewType,
type: 2,
ruleId:this.ruleId,
type2:this.viewType,
// type: 2,
mode: this.tclist[0].mode,
hours: this.hourstime,
price: this.price,
@ -817,6 +818,7 @@
//
btntc(index, item) {
this.tcobj = item
this.ruleId = item.ruleId
this.price = item.price //
this.hourstime = item.hours //
this.indextwo = index

View File

@ -1,6 +1,6 @@
<template>
<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">
</u-navbar>
<image src="https://api.ccttiot.com/smartmeter/img/static/u3lZnmhqSqkMd7gHKtMD" mode="" class="imgbj"></image>
@ -25,7 +25,7 @@
</view>
</view>
<view class="juwo">
距我{{distance}}km <text></text>
<span v-if="distance != ''">距我{{distance}}km</span> <text></text>
{{shopobj.address == undefined ? '--' : shopobj.address}}
</view>
@ -33,28 +33,19 @@
<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="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>
</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">
<view class="zhuozi">
<view class="tqlist">
<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>
<view class="name">
{{item.roomName}}
{{item.roomName.length > 5 ? item.roomName.slice(0,5) + '...' : item.roomName}}
</view>
<view class="kaitai">
开台
@ -62,18 +53,12 @@
</view>
</view>
</view>
<view class="tqname">
<!-- <view class="tqname">
杆柜
</view>
<view class="gangui" @click="btncungan">
<image src="https://api.ccttiot.com/smartmeter/img/static/uQPXhfkhmvvvPXbW65WF" mode=""></image>
<!-- <view class="cun">
</view>
<view class="cun">
</view> -->
</view>
</view> -->
</view>
<view class="shoplist" v-else @touchstart="onTouchStart" @touchend="onTouchEnd" @touchcancel="onTouchCancel">
@ -165,6 +150,8 @@
</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>
</view>
@ -173,6 +160,8 @@
</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>
</view>
@ -210,6 +199,23 @@
<image v-if="jinxinflag" @click="btnyc" class="jinxinx"
src="https://api.ccttiot.com/smartmeter/img/static/uH5fAInJQYhf3wlXkuYI" mode=""></image>
<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>
</template>
@ -222,7 +228,7 @@
backgroundColor: "",
},
list: [{
image: 'https://api.ccttiot.com/smartmeter/img/static/uqYdRLVlB5b61Qdnbirn'
image: 'https://api.ccttiot.com/smartmeter/img/static/uuoqWaq7HnXBteQayaz4'
}],
imgflag: true,
storeId: '',
@ -235,7 +241,7 @@
jinxinglist: [],
jinxinflag: false,
jinxintxt: '开包厢',
tabindex: 0,
tabindex: 1,
biaoqianlist: [],
biaostoreqianlist: [],
mdindex:-1,
@ -243,32 +249,129 @@
tit:'',
tabarr:[],
type:'',
distance:''
distance:'',
roomId:'',
sceneValue:'',
cesuolist:[],
cesuoflag:false,
csindex:-1,
}
},
onLoad(option) {
this.tit = option.tit
this.distance = option.distance
if (option.storeId) {
console.log(option);
if (option.q) {
//
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
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() {
this.tabindex = 0
this.getroombq()
this.jinxinflag = false //tab
this.getbiaoqian()
this.getstorebiaoqian()
this.getorder()
this.hourPointsArray = this.getCurrentHourPoints() //24
},
mounted() {
},
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(){
uni.navigateTo({
@ -278,7 +381,7 @@
//
btnmd(index,item){
this.viewType = item.viewType
this.viewType = item.reType
this.mdindex = index
},
//
@ -353,12 +456,13 @@
// tab
btngundong(type, index) {
this.tabindex = index
console.log(type)
this.shopobj.roomList = []
this.tabindex = type
this.type = type
this.getstoredetail()
},
// 24
initializeData() {
//
@ -387,12 +491,12 @@
// initializeData
updateRoomReservationStatus() {
this.roomList.forEach(room => {
if (room.reservationStatus == null) {
room.reservationStatus = {} //
this.hours.forEach(hour => {
room.reservationStatus[hour] = false //
})
} else {
// if (room.reservationStatus == null) {
// room.reservationStatus = {} //
// this.hours.forEach(hour => {
// room.reservationStatus[hour] = false //
// })
// } else {
room.reservationStatus = {} //
this.hours.forEach(hour => {
room.reservationStatus[hour] = false //
@ -434,12 +538,11 @@
}
}
})
}
// }
})
console.log(this.roomList, '00')
},
//24
getCurrentHourPoints() {
let now = new Date()
@ -553,11 +656,21 @@
}
})
}else{
uni.showToast({
title: '您当前没有订单',
icon: 'none',
duration: 2000
})
this.$u.get(`app/store/openGate/${this.storeId}`).then(res => {
if(res.code == 200){
uni.showToast({
title: '开启店门成功',
icon: 'success',
duration: 2000
})
}else{
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
})
}
})
}
}else if(num == 2){
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() {
uni.openLocation({
@ -649,7 +793,7 @@
//
btndetail(item) {
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>
@ -699,7 +842,53 @@
background-color: #226914 !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 {
max-height: 710rpx;
overflow: scroll;
@ -959,7 +1148,7 @@
.xuanfu {
position: fixed;
top: 62%;
top: 58%;
right: 30rpx;
animation: fadeInDowns .5s ease-out forwards;
@ -997,7 +1186,7 @@
.xuanfus {
position: fixed;
top: 62%;
top: 58%;
right: -80rpx;
animation: fadeInDown .5s ease-out forwards;

View File

@ -224,23 +224,23 @@
url:'/pages/nearbystores/index'
})
}else if(num == 2){
uni.navigateTo({
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.navigateTo({
// 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'
})
}
})
}else if(num == 7){
uni.showModal({
title: '温馨提示',

View File

@ -1,7 +1,7 @@
<template>
<view class="page">
<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>
<image src="https://api.ccttiot.com/smartmeter/img/static/u3lZnmhqSqkMd7gHKtMD" mode="" class="imgbj"></image>
<view class="boxda">
@ -11,7 +11,7 @@
</view>
<view class="bd">
<view class="lt">
<image :src="shopobj.picture" mode=""></image>
<image :src="shopobj.pictures[0]" mode=""></image>
</view>
<view class="rt">
<view class="name">
@ -41,19 +41,19 @@
</view>
</view>
</view>
<view class="tcxz" v-if="tclist[0].mode == 2">
<view class="tcxz" >
<view class="tcxzname">
套餐选择
</view>
<view class="taocan">
<view class="tclist" v-for="(item,index) in tclist" :id="indextwo == index ? 'active' : ''"
: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>
</view>
</view>
<view class="tcxz" v-else>
<!-- <view class="tcxz" v-else> v-if="tclist[0].mode == 2"
<view class="tcxzname">
收费方式
</view>
@ -63,7 +63,7 @@
flex-wrap: wrap;">
{{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 class="shichangxz">
<view class="tcxzname">
时长选择
@ -186,10 +186,10 @@
1预定的订单将全时段保留迟到不可顺延和退款
</view>
<view class="">
2为避免包厢被其他用户预约而给您带来不好的体 如需续单请提前续单!
2为避免包厢被其他用户预约而给您带来不好的体如需续单请提前续单!
</view>
<view class="">
3订单开始前1小时内取消订单需核收15%退单费 请合理规划您的时间;
3订单开始前{{mintime}}分钟内取消订单需核收{{weiyueprice}}%退单费 请合理规划您的时间;
</view>
</view>
<view class="anniu">
@ -257,15 +257,19 @@
zfss: '微信支付',
zfssid: 'wx',
timeshijian:'',
viewType:''
viewType:'',
weiyueprice:'',
mintime:'',
ruleId:''
}
},
onLoad(option) {
this.roomId = option.roomId
this.viewType = option.viewType
// this.viewType = option.viewType
this.getbiaoqian()
this.getstoredetail()
this.gettaocan()
this.getweiyue()
this.hourPointsArray = this.getCurrentHourPoints() //24
},
onShow() {
@ -312,6 +316,20 @@
// // // // // //
},
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) {
const matchingItem = this.biaoqianlist.find(items => items.dictValue === item)
@ -429,6 +447,7 @@
}
})
this.roomList = this.mergeReservationStatuses(this.roomList)
},
// this.roomlist
@ -542,10 +561,10 @@
// let formattedDateString = time.replace(/\//g, "-")
let data = {
roomId: this.roomId,
viewType:this.viewType,
type2:this.viewType,
payType: this.zfssid,
ruleId:this.tclist[0].mode == 2 ? this.tcobj.ruleId : this.tclist[0].ruleId,
type: 1,
ruleId:this.ruleId,
// type: 1,
reserveStartTime: this.timeshijian,
mode: this.tclist[0].mode,
hours: this.hourstime,
@ -789,7 +808,8 @@
this.$u.get(`/app/room/${this.roomId}`).then(res => {
if (res.code == 200) {
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 = []
for(let i = 0;i < 24;i++){
this.roomList.push(false)
@ -903,6 +923,7 @@
//
btntc(index, item) {
this.tcobj = item
this.ruleId = item.ruleId
this.price = item.price //
this.hourstime = item.hours //
this.indextwo = index
@ -1490,7 +1511,7 @@
}
.tcxz .taocan .tclist {
width: 186rpx;
width: 200rpx;
height: 110rpx;
border-radius: 10rpx;
border: 2rpx solid #7C7C7C;
@ -1507,7 +1528,7 @@
color: #3D3D3D;
// font-weight: 600;
box-sizing: border-box;
width: 182rpx;
width: 200rpx;
}
.riqi {

View File

@ -3,8 +3,8 @@
<u-navbar :is-back="false" :border-bottom="false" :background="bgc" title-color='#2E4975' title-size='36'
height='8'></u-navbar>
<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 class="serchshop">
<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="lt">
<image :src="item.pictures[0]" mode="aspectFill"></image>
<view class="hour">
<!-- <view class="hour">
{{item.minimumTime == undefined ? '--' : item.minimumTime}}小时起订
</view>
</view> -->
</view>
<view class="rt">
<view class="name">
@ -53,9 +53,9 @@
{{item.address.length > 13 ? item.address.slice(0,13) + '...' : item.address}}
</view>
<view class="storebq">
<image v-if="item.type == 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.type == 3" src="https://api.ccttiot.com/smartmeter/img/static/uPjeCCnwjiJlCNqURltX" 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.typeTags && item.typeTags.some(tag => tag == 2)" src="https://api.ccttiot.com/smartmeter/img/static/umA2EUZkovZEA0hCLmP3" 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 class="juli">
<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(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(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(5)" src="https://api.ccttiot.com/smartmeter/img/static/uONMVGcplNBtVnjlHaeh" mode=""></image>
</view>
<view class="xuanfus" v-else>
<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(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(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 class="karaokeroom" v-if="jinxinflag">
<view class="top">
@ -124,6 +128,24 @@
</view>
<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="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>
</template>
@ -151,7 +173,11 @@
jinxinflag:false,
sousuovalue:'',
tabindex:1,
type:1
type:1,
userType:'00',
cesuolist:[],
cesuoflag:false,
csindex:-1,
}
},
onLoad(option) {
@ -184,7 +210,7 @@
},
//
btnmd(index,item){
this.viewType = item.viewType
this.viewType = item.reType
this.mdindex = index
},
//
@ -352,16 +378,129 @@
onlyFromCamera: true,
scanType: ['qrCode'],
success: res => {
console.log(res)
uni.navigateTo({
url:'/pages/myorder/orderxd?roomId=' + 65
})
},
fail: err => {
console.error('扫描失败:', err)
function getQueryParam(url, paramName) {
let regex = new RegExp(`[?&]${paramName}=([^&]*)`)
let results = regex.exec(url);
return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null
}
console.log(res);
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({
title: '扫描失败',
icon: 'none'
title: '打开成功',
icon: 'success',
duration: 2000
})
this.cesuoflag = false
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
})
}
})
@ -401,6 +540,7 @@
getinfo(){
this.$u.get(`/getAppInfo`).then(res => {
if(res.code == 200){
this.userType = res.user.userType
uni.setStorageSync('user', res.data)
}else if(res.code == 401){
this.jingmo()
@ -420,6 +560,7 @@
that.$u.post(`/loginByopenid?jsCode=${res.code}`,data).then(res=>{
if (res.code == 200) {
console.log("老用户登录",res)
that.getinfo()
wx.setStorageSync('token', res.token)
}
})
@ -459,7 +600,7 @@
onTouchEnd(e) {
this.imgflag = true
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 (deltaX >= 0) {
// console.log("")
@ -522,6 +663,53 @@
font-size: 40rpx !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{
display: flex;
width: 100%;
@ -707,10 +895,10 @@
.shop_item{
margin: auto;
display: flex;
margin-top: 40rpx;
margin-top: 30rpx;
box-sizing: border-box;
width: 674rpx;
height: 350rpx;
height: 330rpx;
background: #FFFFFF;
padding: 20rpx 18rpx;
box-shadow: 0rpx 2rpx 12rpx 0rpx rgba(0,0,0,0.15);
@ -781,7 +969,7 @@
margin-right: 38rpx;
image{
width: 186rpx;
height: 236rpx;
height: 220rpx;
border-radius: 10rpx;
}
.hour{
@ -841,6 +1029,7 @@
font-size: 36rpx;
color: #226914;
line-height: 50rpx;
height: 50rpx;
padding-left: 34rpx;
box-sizing: border-box;
}

View File

@ -15,17 +15,17 @@
</view>
</view>
<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="rts" v-if="item.status == 0"><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 == 2"><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 == 4"><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 == 6"><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 == 8"><text>订单状态</text> <text class="ones">已退款</text></view>
<view class="zt" v-if="item.status == 9">用户结束订单</view>
<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 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 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 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 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 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 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 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 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 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="top">
<view class="lt">
<image src="https://api.ccttiot.com/smartmeter/img/static/uHTgf2Yc0BZOrRa2hmeO" mode=""></image>
@ -43,7 +43,7 @@
</view>
<view class="two">
<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="">
预定包厢
@ -218,9 +218,9 @@
this.getlist()
},
//
btnxq(orderNo){
btnxq(orderNo,roomType2){
uni.navigateTo({
url:'/page_user/dingdanxq?orderNo=' + orderNo
url:'/page_user/dingdanxq?orderNo=' + orderNo + '&viewType=' + roomType2
})
},
//
@ -247,7 +247,7 @@
}else{
uni.showToast({
title: res.msg,
icon: 'success',
icon: 'none',
duration:2000
})
}
@ -303,7 +303,7 @@
fail: function(err) {
console.error('拨打电话失败', err)
uni.showToast({
title: '取消拨打电话',
title: '暂无店长电话',
icon: 'none'
})
}
@ -459,6 +459,14 @@
display: flex;
justify-content: space-between;
font-weight: 600;
.ydd{
padding: 4rpx;
box-sizing: border-box;
border: 1px solid #48893B;
color: #48893B;
font-size: 24rpx;
margin-left: 10rpx;
}
.ones{
font-weight: 600;
font-size: 28rpx;