diff --git a/page_shanghu/editsheshi.vue b/page_shanghu/editsheshi.vue
index 6db8a6a..1c55ebb 100644
--- a/page_shanghu/editsheshi.vue
+++ b/page_shanghu/editsheshi.vue
@@ -156,6 +156,7 @@
this.mintime = res.data.minHours
this.explain = res.data.explain
this.tuitimes = res.data.refundDuration
+ this.yajin = res.data.deposit
this.tuitime = res.data.refundDuration + '分钟'
}
})
diff --git a/page_shanghu/index.vue b/page_shanghu/index.vue
index a390524..37ad276 100644
--- a/page_shanghu/index.vue
+++ b/page_shanghu/index.vue
@@ -104,8 +104,12 @@
基础设置
+
+
+ 设备录入
+
-
+
@@ -134,6 +138,12 @@
})
},
methods: {
+ // 点击进行设备录入
+ btnluru(){
+ uni.navigateTo({
+ url:'/page_user/luru'
+ })
+ },
// 统一跳转
btnpage(num){
if(num == 3){ //跳转到订单详情
diff --git a/page_shanghu/shanghumy.vue b/page_shanghu/shanghumy.vue
index bc138c1..09c72a7 100644
--- a/page_shanghu/shanghumy.vue
+++ b/page_shanghu/shanghumy.vue
@@ -1,9 +1,100 @@
-
+
-
-
+
+
+
+
+
+
+
+ 姓名
+
+
+
+ 15566665555
+
+
+
+
+
+
+
+
+
+
+ 账户余额(元)
+
+
+ 1523
+
+
+
+ 累计提现:1232
+
+
+ 立即提现
+
+
+
+
+
+
+ 管理与服务
+
+
+
+
+
+ 合伙人管理
+
+
+
+
+
+
+
+ 安全中心
+
+
+
+
+
+
+
+ 帮助与客服
+
+
+
+
+
+
+
+ 意见反馈
+
+
+
+
+
+
+
+ 关于我们
+
+
+
+
+
+
+
+
@@ -11,23 +102,205 @@
export default {
data() {
return {
- bgc: {
- backgroundColor: "",
- },
+ bgc: {
+ backgroundColor: "",
+ },
}
},
onLoad() {
-
+
+ },
+ onShow() {
+
},
methods: {
-
+ // 点击跳转提现
+ btntx(){
+ uni.navigateTo({
+ url:'/page_fenbaotwo/tixian'
+ })
+ },
+ // 点击跳转合伙人
+ btnhhr(){
+ uni.navigateTo({
+ url:'/page_moban/hehuoren'
+ })
+ },
+ //点击跳转到意见反馈
+ btnyjfk(){
+ uni.navigateTo({
+ url:'/page_user/yijian'
+ })
+ },
+ // 点击跳转到帮助
+ btnbangzhu(){
+ uni.navigateTo({
+ url:'/page_fenbaotwo/bangzhu'
+ })
+ },
+ // 点击跳转到关于我们
+ btngywm(){
+ uni.navigateTo({
+ url:'/page_fenbaotwo/about'
+ })
+ },
+ // 点击跳转到安全中心
+ btnaqzx(){
+ uni.navigateTo({
+ url:'/page_fenbaotwo/anquanindex'
+ })
+ }
}
}
-
\ No newline at end of file
diff --git a/page_user/dingdanxq.vue b/page_user/dingdanxq.vue
index 93259df..685a828 100644
--- a/page_user/dingdanxq.vue
+++ b/page_user/dingdanxq.vue
@@ -3,7 +3,7 @@
-
+
@@ -94,6 +94,19 @@
+
@@ -151,12 +164,15 @@
orderNo:'',
orderobj:{},
flag:true,
- user:{}
+ user:{},
+ checked:false,
+ viewType:''
}
},
onLoad(option) {
if(option.orderNo){
this.orderNo = option.orderNo
+ this.viewType = option.viewType
this.getxq()
}else{
this.orderNo = option.orderNowx
@@ -212,7 +228,7 @@
},
// 点击开包厢门
btnkbxm(){
- this.$u.get(`app/room/openRoomGate/${this.roomId}`).then(res => {
+ this.$u.get(`app/room/openRoomGate/${this.orderobj.roomId}`).then(res => {
if (res.code == 200) {
uni.showToast({
title: '开启包厢门成功',
@@ -318,7 +334,7 @@
// 续单
btnxudan(){
uni.navigateTo({
- url:'/page_user/xudan?roomId=' + this.orderobj.roomId + '&orderNo=' + this.orderNo
+ url:'/page_user/xudan?roomId=' + this.orderobj.roomId + '&orderNo=' + this.orderNo + '&viewType=' + this.viewType
})
}
}
@@ -454,7 +470,7 @@
width: 288rpx;
height: 78rpx;
margin-top: 20rpx;
- margin-left: 40rpx;
+ margin-left: 34rpx;
position: relative;
border-radius: 50rpx;
image{
diff --git a/page_user/huogui.vue b/page_user/huogui.vue
index 211c9a4..14ff100 100644
--- a/page_user/huogui.vue
+++ b/page_user/huogui.vue
@@ -3,7 +3,7 @@
-
+
diff --git a/page_user/luru.vue b/page_user/luru.vue
index 1cc6f66..a9181f7 100644
--- a/page_user/luru.vue
+++ b/page_user/luru.vue
@@ -149,7 +149,7 @@
},
btnmy(){
uni.reLaunch({
- url:'/pages/my'
+ url:'/page_shanghu/index'
})
},
// 扫码sn
diff --git a/page_user/xiadanhuogui.vue b/page_user/xiadanhuogui.vue
index 7e30fb1..b92a4e4 100644
--- a/page_user/xiadanhuogui.vue
+++ b/page_user/xiadanhuogui.vue
@@ -3,7 +3,7 @@
-
+
【福鼎-西湖店】
diff --git a/page_user/xudan.vue b/page_user/xudan.vue
index 023a080..eb6d750 100644
--- a/page_user/xudan.vue
+++ b/page_user/xudan.vue
@@ -3,7 +3,7 @@
-
+
@@ -19,7 +19,7 @@
- {{item}}
+ {{getMatchingLabel(item)}}
@@ -320,15 +320,19 @@
zfss: '微信支付',
zfssid: 'wx',
timeshijian:'',
- orderNo:''
+ orderNo:'',
+ biaoqianlist:[],
+ viewType:''
}
},
onLoad(option) {
this.roomId = option.roomId
this.orderNo = option.orderNo
+ this.viewType = option.viewType
this.getstoredetail()
this.getstoredetails()
this.gettaocan()
+ this.getbiaoqian()
this.hourPointsArray = this.getCurrentHourPoints() //计算从当前时间往后推24小时
},
onShow() {
@@ -340,6 +344,20 @@
console.log(this.weekdayAndDateSequence);
},
methods: {
+ // 拿到房间标签进行对比
+ getMatchingLabel(val) {
+ const matchingItem = this.biaoqianlist.find(item => item.dictValue === val)
+ return matchingItem ? matchingItem.dictLabel : val
+ },
+ // 获取房间标签
+ getbiaoqian(){
+ this.$u.get(`/appVerify/getDictData?dictType=ss_room_tags`).then((res) => {
+ if (res.code == 200) {
+ this.biaoqianlist = res.data
+ }
+ })
+ },
+
convertDates(array) {
return array.map(item => {
// 将日期字符串转换为 Date 对象
@@ -545,8 +563,9 @@
let data = {
payType: this.zfssid,
ruleId: this.tcobj.ruleId,
+ viewType:this.viewType,
type: 2,
- mode: 2,
+ mode: 2,
hours: this.hourstime,
price: this.price,
originalOrderNo:this.orderNo
@@ -728,7 +747,7 @@
if (res.code == 200) {
this.shopobj = res.data
// this.kstime
- if(res.data.reservedTimePeriods == ''){
+ if(res.data.reservedTimePeriods == null){
this.roomList = []
for(let i = 0;i < 24;i++){
this.roomList.push(false)
@@ -970,7 +989,7 @@
.yudingtrue {
width: 600rpx;
- height: 806rpx;
+ max-height: 999rpx;
background: #FFFFFF;
border-radius: 32rpx 32rpx 32rpx 32rpx;
padding: 0 20rpx;
@@ -979,7 +998,7 @@
top: 388rpx;
left: 50%;
transform: translateX(-50%);
-
+ padding-bottom: 30rpx;
.shuom {
.xuzhi {
font-weight: 600;
diff --git a/page_user/yijian.vue b/page_user/yijian.vue
index a35ca0e..20d7e69 100644
--- a/page_user/yijian.vue
+++ b/page_user/yijian.vue
@@ -2,7 +2,7 @@
-
+
反馈类型 ✲
diff --git a/pages.json b/pages.json
index 2100be1..3a45094 100644
--- a/pages.json
+++ b/pages.json
@@ -104,6 +104,13 @@
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
+ },{
+ "path": "lijikaishi",
+ "style": {
+ "navigationBarTitleText": "上传",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom"
+ }
},{
"path": "xiadanhuogui",
"style": {
@@ -389,6 +396,13 @@
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
+ },{
+ "path": "qiugan",
+ "style": {
+ "navigationBarTitleText": "上传",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom"
+ }
},{
"path": "datingxq",
"style": {
@@ -510,6 +524,88 @@
}
}
]
+ }, {
+ "root": "page_fenbaotwo",
+ "pages": [
+ {
+ "path": "tixian",
+ "style": {
+ "navigationBarTitleText": "上传",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom"
+ }
+ },{
+ "path": "bangzhu",
+ "style": {
+ "navigationBarTitleText": "上传",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom"
+ }
+ },{
+ "path": "bangzhuxq",
+ "style": {
+ "navigationBarTitleText": "上传",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom"
+ }
+ },{
+ "path": "about",
+ "style": {
+ "navigationBarTitleText": "上传",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom"
+ }
+ },{
+ "path": "anquanindex",
+ "style": {
+ "navigationBarTitleText": "上传",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom"
+ }
+ },{
+ "path": "anquan",
+ "style": {
+ "navigationBarTitleText": "上传",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom"
+ }
+ },{
+ "path": "bangwx",
+ "style": {
+ "navigationBarTitleText": "上传",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom"
+ }
+ },{
+ "path": "edittel",
+ "style": {
+ "navigationBarTitleText": "上传",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom"
+ }
+ },{
+ "path": "dangqiantel",
+ "style": {
+ "navigationBarTitleText": "上传",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom"
+ }
+ },{
+ "path": "yzmhq",
+ "style": {
+ "navigationBarTitleText": "上传",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom"
+ }
+ },{
+ "path": "newpass",
+ "style": {
+ "navigationBarTitleText": "上传",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom"
+ }
+ }
+ ]
}, {
"root": "",
"pages": []
diff --git a/pages/index/index.vue b/pages/index/index.vue
index ca85907..c737a8f 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -8,7 +8,7 @@
- {{item}}
+ {{getMatchingLabels(item)}}
@@ -18,7 +18,8 @@
{{shopobj.name == undefined ? '--' : shopobj.name}}
-
+
@@ -27,27 +28,16 @@
距我{{shopobj.distance == undefined ? '--' : shopobj.distance}}km
{{shopobj.address == undefined ? '--' : shopobj.address}}
-
-
-
- 空闲 2
- 茶室
-
-
-
-
- 空闲 2
- 棋牌
-
-
-
-
- 空闲 2
- 台球
-
+
+
+
+ 空闲 {{item.idleNum}}
+ {{item.tag}}
+
-
+
-
+
@@ -84,9 +75,10 @@
-->
-
+
-
+
@@ -111,20 +103,22 @@
- {{item.roomName == undefined ? '--' : item.roomName}}
+ {{item.roomName == undefined ? '--' : item.roomName}}
+ 房间
+ 大厅
- {{val}}
+ {{getMatchingLabel(val)}}
-
¥{{item.hour == undefined ? '--' : item.hour}}/小时
{{item.bottomPriceFeeRule.hours == undefined ? '--' : item.bottomPriceFeeRule.hours}}小时套餐/
- ¥{{item.bottomPriceFeeRule.price == undefined ? '--' : item.bottomPriceFeeRule.price}} /场
+ ¥{{item.bottomPriceFeeRule.price == undefined ? '--' : item.bottomPriceFeeRule.price}}
+ /场
@@ -142,7 +136,8 @@
-
+
@@ -164,47 +159,56 @@
没有更多房间啦,敬请期待吧...
-
+
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
正在进行中的订单
-
-
-
-
-
-
- 预约门店: {{item.storeName == null ? '--' : item.storeName}}
-
+
+
+
+
+
+
+ 预约门店: {{item.storeName == null ? '--' : item.storeName}}
+
预约包厢: {{item.roomName == null ? '--' : item.roomName}}
- 开始时间: {{item.reserveStartTime == null ? '--' : item.reserveStartTime}}
+ 开始时间:
+ {{item.reserveStartTime == null ? '--' : item.reserveStartTime}}
结束时间: {{item.reserveEndTime == null ? '--' : item.reserveEndTime}}
-
+
-
+
{{jinxintxt}}
-
+
@@ -217,11 +221,9 @@
bgc: {
backgroundColor: "",
},
- list: [
- {
- image: 'https://api.ccttiot.com/smartmeter/img/static/uqYdRLVlB5b61Qdnbirn'
- }
- ],
+ list: [{
+ image: 'https://api.ccttiot.com/smartmeter/img/static/uqYdRLVlB5b61Qdnbirn'
+ }],
imgflag: true,
storeId: '',
shopobj: {},
@@ -229,24 +231,30 @@
roomList: [],
hours: [],
reservationStatus: {},
- arr:[],
- jinxinglist:[],
- jinxinflag:false,
- jinxintxt:'开包厢',
- tabindex:0
+ arr: [],
+ jinxinglist: [],
+ jinxinflag: false,
+ jinxintxt: '开包厢',
+ tabindex: 0,
+ biaoqianlist: [],
+ biaostoreqianlist: [],
+ mdindex:-1,
+ viewType:''
}
},
onLoad(option) {
- if(option.storeId){
+ this.getroombq()
+ if (option.storeId) {
this.storeId = option.storeId
- uni.setStorageSync('storeId',this.storeId)
- }else{
+ uni.setStorageSync('storeId', this.storeId)
+ } else {
this.storeId = uni.getStorageSync('storeId')
}
},
onShow() {
this.jinxinflag = false //如果进行了tab切换 则隐藏
- this.getstoredetail()
+ this.getbiaoqian()
+ this.getstorebiaoqian()
this.getorder()
this.hourPointsArray = this.getCurrentHourPoints() //计算从当前时间往后推24小时
},
@@ -254,140 +262,245 @@
},
methods: {
- // 点击台球桌预定
- btntq(){
- uni.navigateTo({
- url:'/pages/myorder/taiqiuyuding'
- })
+ // 点击包厢切换高亮
+ btnmd(index,item){
+ this.viewType = item.viewType
+ this.mdindex = index
},
+ // 拿到房间标签进行对比
+ getMatchingLabel(val) {
+ const matchingItem = this.biaoqianlist.find(item => item.dictValue === val)
+ return matchingItem ? matchingItem.dictLabel : val
+ },
+ // 拿到店铺标签进行对比
+ getMatchingLabels(val) {
+ const matchingItem = this.biaostoreqianlist.find(item => item.dictValue === val)
+ return matchingItem ? matchingItem.dictLabel : val
+ },
+ // 获取店铺标签
+ getstorebiaoqian() {
+ this.$u.get(`/appVerify/getDictData?dictType=ss_store_tags`).then((res) => {
+ if (res.code == 200) {
+ this.biaostoreqianlist = res.data
+ }
+ })
+ },
+ // 获取房间标签
+ getbiaoqian() {
+ this.$u.get(`/appVerify/getDictData?dictType=ss_room_tags`).then((res) => {
+ if (res.code == 200) {
+ this.biaoqianlist = res.data
+ this.getstoredetail()
+ }
+ })
+ },
+ // 根据店铺id查房间tab
+ getroombq() {
+ this.$u.get(`/app/room/getTagListByStoreId?storeId=${this.storeId}`).then(res => {
+ if (res.code == 200) {
+ this.tabarr = res.data
+ }
+ })
+ },
+ // 点击台球桌预定
+ btntq() {
+ uni.navigateTo({
+ url: '/pages/myorder/taiqiuyuding'
+ })
+ },
+
// 点击切换tab类型
btngundong(section, index) {
this.tabindex = index
},
-
-
+
+
// 拿到当前时间后24小时格式成两位数
initializeData() {
- // 获取当前时间
- let now = new Date()
- // 获取当前时间的小时部分(0-23)
- let currentHour = now.getHours()
- // 初始化小时数组
- this.hours = []
- this.arr = []
- // 遍历从当前小时开始的24个小时
- for (let i = 0; i < 24; i++) {
- // 计算小时数,注意要处理超过23点的情况
- let hour = (currentHour + i) % 24
- let arrsum = currentHour + i
- if(hour == '00'){ //如果是00:00 则改成24:00
- hour = 24
- }else{
- hour = hour
+ // 获取当前时间
+ let now = new Date()
+ // 获取当前时间的小时部分(0-23)
+ let currentHour = now.getHours()
+ // 初始化小时数组
+ this.hours = []
+ this.arr = []
+ // 遍历从当前小时开始的24个小时
+ for (let i = 0; i < 24; i++) {
+ // 计算小时数,注意要处理超过23点的情况
+ let hour = (currentHour + i) % 24
+ let arrsum = currentHour + i
+ if (hour == '00') { //如果是00:00 则改成24:00
+ hour = 24
+ } else {
+ hour = hour
+ }
+ // 推入数组
+ this.arr.push(arrsum)
+ this.hours.push(hour)
}
- // 推入数组
- this.arr.push(arrsum)
- this.hours.push(hour)
- }
- console.log(this.hours,'arr',this.arr)
+ console.log(this.hours, 'arr', this.arr)
},
// 更新房间的预订状态且与initializeData进行匹对
updateRoomReservationStatus() {
this.roomList.forEach(room => {
- room.reservationStatus = {} // 为每个房间创建一个新的预订状态对象
- this.hours.forEach(hour => {
- room.reservationStatus[hour] = false // 初始化为未预订状态
- })
- room.reservedTimePeriods.forEach(period => {
- let startHour = period.startTime.slice(period.startTime.length - 8, period.startTime.length - 6) //取预定开始时间小时
- let endHour = period.endTime.slice(period.endTime.length - 8, period.endTime.length - 6) //取预定结束时间小时
- let timefen = period.startTime.slice(period.endTime.length - 5, period.endTime.length - 3) //取预定结束时间分钟
- console.log(timefen,'02020202')
- // 获取当前日期
- let now = new Date()
- let year = now.getFullYear()
- let month = String(now.getMonth() + 1).padStart(2, '0') // 月份从0开始,所以要加1,并用padStart确保是两位数
- let day = String(now.getDate()).padStart(2, '0') // 用padStart确保是两位数
- let riqione = `${year}-${month}-${day}` //当前日期
- let riqitwo = period.endTime.slice(0,10) //预定结束日期
- let dateOne = new Date(riqione)
- let dateTwo = new Date(riqitwo)
- if (dateOne < dateTwo) { //将开始和结束日期进行对比 判断是否是第二天
- if(endHour < startHour){
- endHour = 24 + Number(endHour)
- }else{
- endHour = 24 + Number(endHour)
- startHour = 24 + Number(startHour)
- }
- } else {
- console.log("第一个日期不小于第二个日期")
- }
- console.log(startHour,endHour,period.startTime,period.endTime)
- for (let i = 0; i < 24; i++) {
- if(timefen == '00'){ //判断预定结束是否包含分钟 不包含正常走判断 包含则将时间往后延长1
- if(this.arr[i] > startHour && this.arr[i] <= endHour){
- room.reservationStatus[i] = true
+ if (room.reservationStatus == null) {
+ room.reservationStatus = {} // 为每个房间创建一个新的预订状态对象
+ this.hours.forEach(hour => {
+ room.reservationStatus[hour] = false // 初始化为未预订状态
+ })
+ } else {
+ room.reservationStatus = {} // 为每个房间创建一个新的预订状态对象
+ this.hours.forEach(hour => {
+ room.reservationStatus[hour] = false // 初始化为未预订状态
+ })
+ room.reservedTimePeriods.forEach(period => {
+ let startHour = period.startTime.slice(period.startTime.length - 8, period.startTime.length - 6) //取预定开始时间小时
+ let endHour = period.endTime.slice(period.endTime.length - 8, period.endTime.length - 6) //取预定结束时间小时
+ let timefen = period.startTime.slice(period.endTime.length - 5, period.endTime.length - 3) //取预定结束时间分钟
+ console.log(timefen, '02020202')
+ // 获取当前日期
+ let now = new Date()
+ let year = now.getFullYear()
+ let month = String(now.getMonth() + 1).padStart(2,'0') // 月份从0开始,所以要加1,并用padStart确保是两位数
+ let day = String(now.getDate()).padStart(2, '0') // 用padStart确保是两位数
+ let riqione = `${year}-${month}-${day}` //当前日期
+ let riqitwo = period.endTime.slice(0, 10) //预定结束日期
+ let dateOne = new Date(riqione)
+ let dateTwo = new Date(riqitwo)
+ if (dateOne < dateTwo) { //将开始和结束日期进行对比 判断是否是第二天
+ if (endHour < startHour) {
+ endHour = 24 + Number(endHour)
+ } else {
+ endHour = 24 + Number(endHour)
+ startHour = 24 + Number(startHour)
}
- }else{
- if(this.arr[i] > startHour && Number(this.arr[i] - 1) <= endHour){
- room.reservationStatus[i] = true
+ } else {
+ console.log("第一个日期不小于第二个日期")
+ }
+ console.log(startHour, endHour, period.startTime, period.endTime)
+ for (let i = 0; i < 24; i++) {
+ if (timefen == '00') { //判断预定结束是否包含分钟 不包含正常走判断 包含则将时间往后延长1
+ if (this.arr[i] > startHour && this.arr[i] <= endHour) {
+ room.reservationStatus[i] = true
+ }
+ } else {
+ if (this.arr[i] > startHour && Number(this.arr[i] - 1) <= endHour) {
+ room.reservationStatus[i] = true
+ }
}
}
- }
- })
+ })
+ }
})
- console.log(this.roomList,'00')
- },
-
-
- //计算从当前时间往后推24小时
- getCurrentHourPoints() {
- let now = new Date()
- let startHour = now.getHours()
- let startDate = new Date(now)
- startDate.setMinutes(0, 0, 0) // 确保分钟、秒和毫秒都是0
- let options = {
- year: 'numeric',
- month: '2-digit',
- day: '2-digit',
- hour: '2-digit',
- minute: '2-digit',
- second: '2-digit'
- }
- let hourPoints = []
- for (let i = 0; i < 24; i++) {
- let newDate = new Date(startDate)
- newDate.setHours((startHour + i) % 24, 0, 0, 0)
- if (newDate.getHours() === 0 && i !== 0) {
- newDate.setDate(newDate.getDate() + 1)
+ console.log(this.roomList, '00')
+ },
+
+
+ //计算从当前时间往后推24小时
+ getCurrentHourPoints() {
+ let now = new Date()
+ let startHour = now.getHours()
+ let startDate = new Date(now)
+ startDate.setMinutes(0, 0, 0) // 确保分钟、秒和毫秒都是0
+ let options = {
+ year: 'numeric',
+ month: '2-digit',
+ day: '2-digit',
+ hour: '2-digit',
+ minute: '2-digit',
+ second: '2-digit'
}
- let hours = String(newDate.getHours()).padStart(2, '0')
- let minutes = String(newDate.getMinutes()).padStart(2, '0')
- let seconds = String(newDate.getSeconds()).padStart(2, '0')
- let formattedDateString = `${hours}:${minutes}:${seconds}`
- hourPoints.push(formattedDateString)
- }
- return hourPoints;
- },
- // 请求正在进行中的订单
- getorder(){
- this.$u.get(`/app/order/getInProgressOrderList`).then(res =>{
- if(res.code == 200){
- this.jinxinglist = res.data
+ let hourPoints = []
+ for (let i = 0; i < 24; i++) {
+ let newDate = new Date(startDate)
+ newDate.setHours((startHour + i) % 24, 0, 0, 0)
+ if (newDate.getHours() === 0 && i !== 0) {
+ newDate.setDate(newDate.getDate() + 1)
+ }
+ let hours = String(newDate.getHours()).padStart(2, '0')
+ let minutes = String(newDate.getMinutes()).padStart(2, '0')
+ let seconds = String(newDate.getSeconds()).padStart(2, '0')
+ let formattedDateString = `${hours}:${minutes}:${seconds}`
+ hourPoints.push(formattedDateString)
}
- })
- },
- // 点击进行开店门开包厢等操作
- btnopen(num){
- if(num == 1){
- this.$u.get(`app/store/openGate/1`).then(res => {
+ return hourPoints;
+ },
+ // 请求正在进行中的订单
+ getorder() {
+ this.$u.get(`/app/order/getInProgressOrderList`).then(res => {
+ if (res.code == 200) {
+ this.jinxinglist = res.data
+ }
+ })
+ },
+ // 选择订单后进行操作
+ btnanniu(){
+ if(this.jinxintxt == '开店门'){
+ let storeId = this.jinxinglist[this.mdindex].storeId
+ console.log(this.jinxinglist[this.mdindex],this.mdindex);
+ this.$u.get(`app/store/openGate/${storeId}`).then(res => {
if(res.code == 200){
+ this.jinxinflag = false
+ this.mdindex = -1
uni.showToast({
- title: '开启店门成功',
- icon: 'success',
+ title: '开启店门成功',
+ icon: 'success',
+ duration: 2000
+ })
+ }else{
+ this.mdindex = -1
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
duration: 2000
})
+ }
+ })
+ }else if(this.jinxintxt == '开包厢'){
+ let roomId = this.jinxinglist[this.mdindex].roomId
+ this.$u.get(`app/room/openRoomGate/${roomId}`).then(res => {
+ if(res.code == 200){
+ this.jinxinflag = false
+ this.mdindex = -1
+ uni.showToast({
+ title: '开启包厢门成功',
+ icon: 'success',
+ duration: 2000
+ })
+ }else{
+ this.mdindex = -1
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ duration: 2000
+ })
+ }
+ })
+ }else if(this.jinxintxt == '去续单'){
+ this.jinxinflag = false
+ let roomId = this.jinxinglist[this.mdindex].roomId
+ let orderNo = this.jinxinglist[this.mdindex].orderNo
+ uni.navigateTo({
+ url:'/page_user/xudan?roomId=' + roomId + '&orderNo=' + orderNo + '&viewType=' + this.viewType
+ })
+ }
+ },
+ // 点击进行开店门开包厢等操作
+ btnopen(num){
+ if(num == 1){
+ if(this.jinxinglist.length > 1){
+ this.jinxinflag = true
+ this.jinxintxt = '开店门'
+ }else if(this.jinxinglist.length == 1){
+ let storeId = this.jinxinglist[0].storeId
+ this.$u.get(`app/store/openGate/${storeId}`).then(res => {
+ if(res.code == 200){
+ uni.showToast({
+ title: '开启店门成功',
+ icon: 'success',
+ duration: 2000
+ })
}else{
uni.showToast({
title: res.msg,
@@ -396,6 +509,13 @@
})
}
})
+ }else{
+ uni.showToast({
+ title: '您当前没有订单',
+ icon: 'none',
+ duration: 2000
+ })
+ }
}else if(num == 2){
if(this.jinxinglist.length > 1){
this.jinxinflag = true
@@ -441,18 +561,38 @@
duration: 2000
})
}
+ }else if(num == 4){
+ uni.scanCode({
+ onlyFromCamera: true,
+ scanType: ['qrCode'],
+ success: res => {
+ console.log(res);
+ },
+ fail: err => {
+ console.error('扫描失败:', err)
+ uni.showToast({
+ title: '扫描失败',
+ icon: 'none'
+ })
+ }
+ })
}
},
// 请求门店详细信息
getstoredetail() {
this.reservationStatus = {}
- this.$u.get(`app/store/${this.storeId}`).then(res => {
+ let data = {
+ type: this.biaoqianlist[0].type == null ? '' : this.biaoqianlist[0].type
+ }
+ this.$u.get(`/app/store/${this.storeId}`, data).then(res => {
if (res.code == 200) {
this.shopobj = res.data
- if(res.data.carouselList != '' || res.data.carouselList.length > 0){
- this.list = []
- this.list = res.data.carouselList.map(item => item.picture)
+ if (res.data.picture != null) {
+ let pictureArray = res.data.picture.split(',')
+ this.list = pictureArray.map(pictureUrl => ({
+ image: pictureUrl
+ }))
}
this.roomList = res.data.roomList //赋值所有房间
this.initializeData() //在this.roomlist赋值后调用
@@ -460,15 +600,15 @@
}
})
},
-
-
- // 点击进行导航
- btndaohang(){
+
+
+ // 点击进行导航
+ btndaohang() {
uni.openLocation({
- latitude:this.shopobj.lat,//纬度-目的地/坐标点
- longitude:this.shopobj.lng,//经度-目的地/坐标点
- name:this.shopobj.name,//地点名称
- address:this.shopobj.addres//详细地点名称
+ latitude: this.shopobj.lat, //纬度-目的地/坐标点
+ longitude: this.shopobj.lng, //经度-目的地/坐标点
+ name: this.shopobj.name, //地点名称
+ address: this.shopobj.addres //详细地点名称
})
},
// 按下滑动
@@ -484,9 +624,9 @@
this.imgflag = true
},
// 点击跳转包厢详情页
- btndetail(roomId) {
+ btndetail(item) {
uni.navigateTo({
- url: '/pages/myorder/index?roomId=' + roomId
+ url: '/pages/myorder/index?roomId=' + item.roomId + '&viewType=' + item.viewType
})
},
// 点击自定义导航栏返回首页
@@ -513,7 +653,7 @@
}
}
- }
+ }