From 63f4d09c30808ec1d7947b162bb6df988f65920b Mon Sep 17 00:00:00 2001
From: "3321822538@qq.com" <3321822538@qq.com>
Date: Sat, 15 Feb 2025 15:16:27 +0800
Subject: [PATCH] =?UTF-8?q?=E5=85=B1=E4=BA=AB=E8=8C=B6=E5=AE=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
page_moban/datingxq.vue | 14 ++++--
page_shanghu/cesuoxq.vue | 4 +-
page_shanghu/erwm.vue | 4 +-
page_shanghu/roomxq.vue | 14 ++++--
page_shanghu/toufsb.vue | 18 +++++--
pages/index/index.vue | 105 +++++++++++++++++++++++----------------
6 files changed, 102 insertions(+), 57 deletions(-)
diff --git a/page_moban/datingxq.vue b/page_moban/datingxq.vue
index 5ec9333..ee502f4 100644
--- a/page_moban/datingxq.vue
+++ b/page_moban/datingxq.vue
@@ -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(){
diff --git a/page_shanghu/cesuoxq.vue b/page_shanghu/cesuoxq.vue
index aa8f2a3..68a0df4 100644
--- a/page_shanghu/cesuoxq.vue
+++ b/page_shanghu/cesuoxq.vue
@@ -44,14 +44,14 @@
{{kstj}}
-
+
diff --git a/page_shanghu/erwm.vue b/page_shanghu/erwm.vue
index 31a7acc..620c67d 100644
--- a/page_shanghu/erwm.vue
+++ b/page_shanghu/erwm.vue
@@ -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
diff --git a/page_shanghu/roomxq.vue b/page_shanghu/roomxq.vue
index fff8fad..51143b7 100644
--- a/page_shanghu/roomxq.vue
+++ b/page_shanghu/roomxq.vue
@@ -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(){
diff --git a/page_shanghu/toufsb.vue b/page_shanghu/toufsb.vue
index f8928e7..4af72d8 100644
--- a/page_shanghu/toufsb.vue
+++ b/page_shanghu/toufsb.vue
@@ -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
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 2176345..a8df1cc 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -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