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