共享茶室

This commit is contained in:
3321822538@qq.com 2025-02-15 15:16:27 +08:00
parent 798a7ba909
commit 63f4d09c30
6 changed files with 102 additions and 57 deletions

View File

@ -204,9 +204,17 @@
methods: { methods: {
// //
btnewm(){ btnewm(){
uni.navigateTo({ if(this.obj.code == null){
url:'/page_shanghu/erwm?roomId=' + this.roomId uni.showToast({
}) title: '请添加大厅码',
icon: 'none',
duration: 2000
})
}else{
uni.navigateTo({
url:'/page_shanghu/erwm?roomId=' + this.obj.code
})
}
}, },
// //
btntouf(){ btntouf(){

View File

@ -44,14 +44,14 @@
{{kstj}} <image src="https://api.ccttiot.com/smartmeter/img/static/uS5JydUQDmvbMyg4nsdo" mode=""></image> {{kstj}} <image src="https://api.ccttiot.com/smartmeter/img/static/uS5JydUQDmvbMyg4nsdo" mode=""></image>
</view> </view>
</view> </view>
<view class="ulbox" @click="btnewm" v-if="obj.toiletId"> <!-- <view class="ulbox" @click="btnewm" v-if="obj.toiletId">
<view class="one"> <view class="one">
生成二维码 生成二维码
</view> </view>
<view class="two"> <view class="two">
<image src="https://api.ccttiot.com/smartmeter/img/static/uS5JydUQDmvbMyg4nsdo" mode=""></image> <image src="https://api.ccttiot.com/smartmeter/img/static/uS5JydUQDmvbMyg4nsdo" mode=""></image>
</view> </view>
</view> </view> -->
<u-select v-model="showone" :list="listone" @confirm="btnone"></u-select> <u-select v-model="showone" :list="listone" @confirm="btnone"></u-select>
<u-picker mode="time" v-model="showtwo" :params="params" @confirm="btntwo"></u-picker> <u-picker mode="time" v-model="showtwo" :params="params" @confirm="btntwo"></u-picker>
<u-select v-model="showthr" :list="listthr" @confirm="btnthr"></u-select> <u-select v-model="showthr" :list="listthr" @confirm="btnthr"></u-select>

View File

@ -39,10 +39,10 @@
onLoad(option) { onLoad(option) {
if(option.roomId){ //and if(option.roomId){ //and
this.roomId = option.roomId this.roomId = option.roomId
this.https = 'https://testcha.chuangtewl.com?roomId=' + this.roomId this.https = 'https://testcha.chuangtewl.com?roomCode=' + this.roomId
}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?storeCode=' + this.storeId
}else if(option.toiletId){ // }else if(option.toiletId){ //
this.toiletId = option.toiletId this.toiletId = option.toiletId
this.https = 'https://testcha.chuangtewl.com?toiletId=' + this.toiletId this.https = 'https://testcha.chuangtewl.com?toiletId=' + this.toiletId

View File

@ -452,9 +452,17 @@
}, },
// //
btnewm(){ btnewm(){
uni.navigateTo({ if(this.roomobj.code == null){
url:'/page_shanghu/erwm?roomId=' + this.roomId + '&viewType=' + this.roomobj.viewType uni.showToast({
}) title: '请添加房间码',
icon: 'none',
duration: 2000
})
}else{
uni.navigateTo({
url:'/page_shanghu/erwm?roomId=' + this.roomobj.code + '&viewType=' + this.roomobj.viewType
})
}
}, },
// //
btntoufcesuo(){ btntoufcesuo(){

View File

@ -158,7 +158,8 @@
kstj:'', kstj:'',
ksfsid:'', ksfsid:'',
kstjid:'', kstjid:'',
addmenflag:false addmenflag:false,
codeid:''
} }
}, },
onLoad(option) { onLoad(option) {
@ -170,9 +171,17 @@
methods: { methods: {
// //
btnewm(){ btnewm(){
uni.navigateTo({ if(this.codeid == null){
url:'/page_shanghu/erwm?storeId=' + this.storeId uni.showToast({
}) title: '请添加店铺码',
icon: 'none',
duration: 2000
})
}else{
uni.navigateTo({
url:'/page_shanghu/erwm?storeId=' + this.codeid
})
}
}, },
// //
btnjieb(){ btnjieb(){
@ -210,6 +219,7 @@
getmendian(){ getmendian(){
this.$u.get(`app/store/mch/${this.storeId}`).then(res =>{ this.$u.get(`app/store/mch/${this.storeId}`).then(res =>{
if(res.code == 200){ if(res.code == 200){
this.codeid = res.data.code
this.xxobj = res.data.gate this.xxobj = res.data.gate
this.kstime = res.data.unlockTime this.kstime = res.data.unlockTime
this.ksfsid = res.data.unlockMode this.ksfsid = res.data.unlockMode

View File

@ -269,50 +269,69 @@
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;
} }
// storeId roomId // storeCode roomCode
let storeId = getQueryParam(decodedValue, 'storeId'); let storeCode = getQueryParam(decodedValue, 'storeCode');
let roomId = getQueryParam(decodedValue, 'roomId'); let roomCode = getQueryParam(decodedValue, 'roomCode');
if (storeId) { if (storeCode) {
console.log('这是 storeId:', storeId); this.$u.get(`app/getId?storeCode=${storeCode}`).then(resp =>{
// storeId if(resp.code == 200){
this.storeId = storeId console.log('这是 storeCode:', resp.data);
uni.setStorageSync('storeId', this.storeId) // storeId
this.tabindex = 1 this.storeId = resp.data
this.getroombq() uni.setStorageSync('storeId', this.storeId)
this.jinxinflag = false //tab this.tabindex = 1
this.getbiaoqian() this.getroombq()
this.getstorebiaoqian() this.jinxinflag = false //tab
this.getorder() this.getbiaoqian()
this.hourPointsArray = this.getCurrentHourPoints() //24 this.getstorebiaoqian()
} else if (roomId) { this.getorder()
console.log('这是 roomId:', roomId); this.hourPointsArray = this.getCurrentHourPoints() //24
// roomId }else{
this.roomId = roomId uni.showToast({
this.$u.get(`/app/order/getInProgressOrderList`).then(res => { title: res.msg,
if (res.code == 200) { icon: 'none',
if(res.data == null || res.data.length == 0){ duration: 2000
uni.navigateTo({ })
url: '/pages/myorder/index?roomId=' + this.roomId }
}) })
}else{ } else if (roomCode) {
uni.navigateTo({ this.$u.get(`app/getId?roomCode=${roomCode}`).then(resp =>{
url:'/page_user/dingdanxq?orderNo=' + res.data[0].orderNo + '&viewType=' + res.data[0].roomType2 if(resp.code == 200){
}) console.log('这是 roomId:', resp.data);
} this.roomId = resp.data
}else if(res.code == 401){ this.$u.get(`/app/order/getInProgressOrderList`).then(res => {
uni.navigateTo({ if (res.code == 200) {
url:'/pages/login/index' if(res.data == null || res.data.length == 0){
}) uni.navigateTo({
}else{ url: '/pages/myorder/index?roomId=' + this.roomId
uni.showToast({ })
title: res.msg, }else{
icon: 'none', uni.navigateTo({
duration: 2000 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{
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
})
}
})
} else { } else {
console.log('URL 中未找到 storeId 或 roomId'); console.log('URL 中未找到 storeCode 或 roomCode');
} }
}else if(option.storeId) { }else if(option.storeId) {
this.storeId = option.storeId this.storeId = option.storeId