共享茶室
This commit is contained in:
parent
798a7ba909
commit
63f4d09c30
|
@ -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(){
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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(){
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user