共享茶室

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: {
//
btnewm(){
uni.navigateTo({
url:'/page_shanghu/erwm?roomId=' + this.roomId
})
if(this.obj.code == null){
uni.showToast({
title: '请添加大厅码',
icon: 'none',
duration: 2000
})
}else{
uni.navigateTo({
url:'/page_shanghu/erwm?roomId=' + this.obj.code
})
}
},
//
btntouf(){

View File

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

View File

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

View File

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

View File

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

View File

@ -269,50 +269,69 @@
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
})
}
})
// storeCode roomCode
let storeCode = getQueryParam(decodedValue, 'storeCode');
let roomCode = getQueryParam(decodedValue, 'roomCode');
if (storeCode) {
this.$u.get(`app/getId?storeCode=${storeCode}`).then(resp =>{
if(resp.code == 200){
console.log('这是 storeCode:', resp.data);
// storeId
this.storeId = resp.data
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{
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
})
}
})
} else if (roomCode) {
this.$u.get(`app/getId?roomCode=${roomCode}`).then(resp =>{
if(resp.code == 200){
console.log('这是 roomId:', resp.data);
this.roomId = resp.data
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{
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
})
}
})
} else {
console.log('URL 中未找到 storeId 或 roomId');
console.log('URL 中未找到 storeCode 或 roomCode');
}
}else if(option.storeId) {
this.storeId = option.storeId