From 170fae5ad1b442c742a49b3f10eecaf734e3ea46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E7=A3=8A?= <45566618@qq.com> Date: Fri, 2 Aug 2024 17:13:04 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E9=A1=B5=E9=9D=A2=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- my/order/payModify.vue | 14 +-- my/order/payModifyTcMy.vue | 3 +- my/order/paydingTCX.vue | 2 +- pages/my/newTeaml.vue | 5 +- pages/my/newTeamlDetail.vue | 103 ++++++++++++------ pages/my/newseckill.vue | 10 +- pages/my/newseckilldetails.vue | 152 +++++++++++++++++---------- pages/therapist/therapistDingdan.vue | 26 ++--- 8 files changed, 204 insertions(+), 111 deletions(-) diff --git a/my/order/payModify.vue b/my/order/payModify.vue index cb70a9c..0cb8475 100644 --- a/my/order/payModify.vue +++ b/my/order/payModify.vue @@ -21,7 +21,7 @@ - + 服务项目 @@ -64,7 +64,7 @@ - + @@ -287,6 +287,7 @@ } }, onLoad(e) { + console.log(e); if (this.$queue.getData('msTimeDate')) { this.msTimeDate = parseInt(this.$queue.getData('msTimeDate')); } else { @@ -477,12 +478,13 @@ }); }, liliaoshi(){ + let massageTypeId = this.orderXm.massageTypeId; uni.setStorage({ key: 'taocanDd', data: '支付', success: function () { uni.navigateTo({ - url: '/pages/therapist/therapistDingdan' + url: '/pages/therapist/therapistDingdan?massageTypeId='+massageTypeId }) } }); @@ -1316,7 +1318,7 @@ height: 76rpx; display: flex; justify-content: space-between; - align-items: center; + align-items: center; } .jusitify-line-end{ height:1px; @@ -2029,7 +2031,7 @@ } .title-font-time{ font-size: 28rpx; - color: #019c88; + color: #019c88; } .detail-view-img{ width: 76px; @@ -2046,7 +2048,7 @@ font-size: 26rpx; color: #666; display: flex; - align-items: flex-end; + align-items: flex-end; padding:4rpx 0; } .Service-name span:nth-child(1){ diff --git a/my/order/payModifyTcMy.vue b/my/order/payModifyTcMy.vue index 910947f..0b26165 100644 --- a/my/order/payModifyTcMy.vue +++ b/my/order/payModifyTcMy.vue @@ -494,12 +494,13 @@ }, liliaoshi(){ var that=this + let massageTypeId = that.orderXm.massageTypeId; uni.setStorage({ key: 'taocanDd', data: '我的套餐', success: function () { uni.navigateTo({ - url: '/pages/therapist/therapistDingdan?technicianType='+that.orderXm.level + url: '/pages/therapist/therapistDingdan?technicianType='+that.orderXm.level+'&massageTypeId='+massageTypeId }) } }); diff --git a/my/order/paydingTCX.vue b/my/order/paydingTCX.vue index 1cda4d1..398c8ef 100644 --- a/my/order/paydingTCX.vue +++ b/my/order/paydingTCX.vue @@ -126,7 +126,7 @@ - {{order.packageType=='105'?'项目次卡':order.packageType=='106'?'服务疗程':'套餐名称'}} + {{order.packageType=='104'?'套餐':order.packageType=='105'?'次卡':order.packageType=='106'?'疗程':order.packageType=='111'?'团购':order.packageType=='112'?'秒杀':'其他'}}名称 {{order.ordersMassageList[0].userPackageDetail.mainTitle}} diff --git a/pages/my/newTeaml.vue b/pages/my/newTeaml.vue index 66169ab..3464b0c 100644 --- a/pages/my/newTeaml.vue +++ b/pages/my/newTeaml.vue @@ -49,6 +49,9 @@ {{item.status=='1'?'未用完':item.status=='2'?'退款':item.status=='9'?'已用完':'其他'}} + + 新人专享 + @@ -681,4 +684,4 @@ align-items: center; justify-content: space-between; } - \ No newline at end of file + diff --git a/pages/my/newTeamlDetail.vue b/pages/my/newTeamlDetail.vue index fd66653..5972525 100644 --- a/pages/my/newTeamlDetail.vue +++ b/pages/my/newTeamlDetail.vue @@ -23,7 +23,7 @@ - + @@ -91,16 +91,19 @@ - - + - + + ¥{{mainData.price}} 一键开团 + + {{startTime}} 开团 + - + @@ -402,7 +441,7 @@ /* #ifndef MP-WEIXIN */ /* height: 130px; */ /* #endif */ - + } .pay_btn { width: 90%; @@ -414,7 +453,7 @@ color: #ffffff; line-height: 80rpx; } - + .dingdan-btn{ text-align: center; width: 80px; @@ -528,7 +567,7 @@ font-size: 22rpx; color: #777777; } - + .detail-foot-mian{ width: 100%; display: flex; @@ -536,7 +575,7 @@ justify-content: center; align-items: center; } - + .header-bottom-title-liao{ padding: 3px 8px; height: 16px; @@ -591,7 +630,7 @@ font-size: 14px; font-weight: bold; } - + .detail-foot-mian-img{ width: 100%; height:auto; @@ -639,7 +678,7 @@ width: 34.03rpx; height: 32.64rpx; } - + .shouc{ display: flex; align-items: center; @@ -671,7 +710,7 @@ flex-direction: column; align-items: center; } - + .tese span:nth-child(1){ font-weight: bold; font-size: 22rpx; @@ -712,7 +751,7 @@ font-size: 22rpx; color: #777777; } - + .detail-foot-mian{ width: 95%; display: flex; @@ -825,7 +864,7 @@ flex-direction: row; align-items: baseline; } - + .header-bottom-money-view{ width: 100%; display: flex; @@ -939,7 +978,7 @@ .group_amount{ color: #fff; display: flex; - align-items: flex-end; + align-items: flex-end; } .group_amount span:nth-child(2){ font-size: 80rpx; @@ -1056,4 +1095,4 @@ width: 50px; text-align: center; } - \ No newline at end of file + diff --git a/pages/my/newseckill.vue b/pages/my/newseckill.vue index 30fa99d..412915a 100644 --- a/pages/my/newseckill.vue +++ b/pages/my/newseckill.vue @@ -48,8 +48,12 @@ - {{item.status=='1'?'未用完':item.status=='2'?'退款':item.status=='9'?'已用完':'其他'}} + + {{item.status=='1'?'未用完':item.status=='2'?'退款':item.status=='9'?'已用完':'其他'}} + + + 新人专享 + @@ -674,4 +678,4 @@ flex-direction: row; justify-content: space-between; } - \ No newline at end of file + diff --git a/pages/my/newseckilldetails.vue b/pages/my/newseckilldetails.vue index 0986616..df016f6 100644 --- a/pages/my/newseckilldetails.vue +++ b/pages/my/newseckilldetails.vue @@ -21,7 +21,7 @@ 正在疯抢 - + @@ -34,6 +34,9 @@ + + (人人可秒杀·仅新用户专享) + {{item}} {{mainData.levelName}} @@ -41,8 +44,8 @@ 秒杀时间{{mainData.startTime}} - {{mainData.endTime}} - - + + @@ -68,12 +71,15 @@ - + - - {{dataList.name=='index'?'立即购买':'立即预约'}} + + {{dataList.name=='index'?'一键开秒':'立即预约'}} + + + {{startTime}} 开秒 @@ -126,7 +132,11 @@ limit:10, mainId:'', serviceCount:'', - labels:[] + labels:[], + startTime:'', + isStart:false, + isEnd:false, + user:null } }, computed: { @@ -141,11 +151,12 @@ var that=this; that.dataList=e; that.isVIP=this.$queue.getData('isVIP'); - that.youhui() - that.getData() + that.youhui(); + that.getData(); + that.getUserData(); }, onShow() { - + // #ifndef MP-WEIXIN this.openLists = [{ image: '../../static/images/icon_weixin.png', @@ -162,7 +173,7 @@ }], this.openWay = 2; // #endif - + // #ifdef MP-WEIXIN this.openLists = [{ image: '../../static/images/icon_weixin.png', @@ -178,21 +189,23 @@ }, methods:{ goumai(item){//立即购买 - this.$queue.setData('mainData',item) - this.$queue.setData('detailData',this.detailData) - this.$queue.setData('youhui',''); - console.log("item",item) - if(item.btnShow==false){ + let currentTimeStamp = new Date().getTime() / 1000; + let createTimeStamp = new Date(this.user.createTime).getTime() / 1000; + let timeDiff = currentTimeStamp - createTimeStamp; + let day = Math.floor(timeDiff/(60*60*24)); + if(day>7){ uni.showToast({ icon:'error', - title:'已过秒杀时间,无法下单!' + title:'该秒杀只限新人!' }) }else{ + this.$queue.setData('mainData',item) + this.$queue.setData('detailData',this.detailData) + this.$queue.setData('youhui',''); uni.navigateTo({ url:'/my/order/payModifyMs?ordersId='+item.id }) - - } + } }, goNav(e) { uni.navigateTo({ @@ -255,7 +268,7 @@ }) that.getData() // this.$queue.showToast('支付成功'); - + // uni.switchTab({ // url: '/pages/my/index' // }) @@ -271,7 +284,7 @@ } }); // #endif - + // #ifdef H5 let ua = navigator.userAgent.toLowerCase(); if (ua.indexOf('micromessenger') != -1) { @@ -313,9 +326,9 @@ } }); } - + // #endif - + // #ifdef APP let data = { ordersId: that.order.ordersId, @@ -345,7 +358,7 @@ that.getData() }); // #endif - + // #ifdef APP-PLUS let data = { ordersId: that.tordersId, @@ -359,7 +372,7 @@ }); // #endif } - + }, // 支付订单 pay() { @@ -398,7 +411,7 @@ console.log('用户点击取消'); } } - + }) } else if (that.openWay == 2) { //微信支付 that.$queue.showLoading('支付中...') @@ -426,7 +439,7 @@ }) that.getData() // this.$queue.showToast('支付成功'); - + // uni.switchTab({ // url: '/pages/my/index' // }) @@ -442,7 +455,7 @@ } }); // #endif - + // #ifdef H5 let ua = navigator.userAgent.toLowerCase(); if (ua.indexOf('micromessenger') != -1) { @@ -490,9 +503,9 @@ } }); } - + // #endif - + // #ifdef APP let data = { ordersId: that.order.ordersId, @@ -523,7 +536,7 @@ that.getData() }); // #endif - + // #ifdef APP-PLUS let data = { ordersId: that.order.ordersId, @@ -576,7 +589,7 @@ } else { that.$queue.showToast(res.msg) } - + }); }, checkboxChange(e){ @@ -595,10 +608,10 @@ } else { that.$queue.showToast(res.msg) } - + }); }, - + getTimeInMilliseconds(timeString) { return new Date(timeString).getTime(); }, @@ -613,13 +626,29 @@ that.$Request.get('/app/massage/package/getAppFlashDetail', data).then(res => { console.log(res); if (res.code == 0) { - var newTime = new Date().getTime(); - var starTime=this.getTimeInMilliseconds(res.data.startTime); - var endTime=this.getTimeInMilliseconds(res.data.endTime); - if(newTime>=starTime&&newTime<=endTime){ - this.$set(res.data, 'btnShow', true) + // var newTime = new Date().getTime(); + // var starTime=this.getTimeInMilliseconds(res.data.startTime); + // var endTime=this.getTimeInMilliseconds(res.data.endTime); + // if(newTime>=starTime&&newTime<=endTime){ + // this.$set(res.data, 'btnShow', true) + // }else{ + // this.$set(res.data, 'btnShow', false) + // } + let afterTimeStamp = new Date(res.data.endTime).getTime() / 1000; + let currentTimeStamp = new Date().getTime() / 1000; + let formatTimeStamp = Math.floor(afterTimeStamp - currentTimeStamp); + this.endOfServiceTimer = formatTimeStamp; + let beforeTimeStamp = new Date(res.data.startTime).getTime() / 1000; + if(beforeTimeStamp > currentTimeStamp){ + that.startTime = res.data.startTime; + that.isStart = false; }else{ - this.$set(res.data, 'btnShow', false) + that.isStart = true; + } + if(currentTimeStamp > afterTimeStamp){ + that.isEnd = true; + }else{ + that.isEnd = false; } if(res.data.level == 3){ res.data.levelName = "新手" @@ -637,7 +666,7 @@ that.detailData=res.detailData.list; } }) - }else{ + }else{ that.$Request.get('/app/user/package/detail/getMyPackageDetail', data).then(res => { if (res.code == 0) { var newTime = new Date().getTime(); @@ -665,6 +694,19 @@ }) } }, + getUserData(){ + var that=this; + if(that.dataList.name=='index'){ + let data = { + userId: uni.getStorageSync('userId') + } + that.$Request.get('app/user/selectUserInfo', data).then(res => { + if (res.code == 0) { + that.user = res.data + } + }) + } + }, } } @@ -810,7 +852,7 @@ /* #ifndef MP-WEIXIN */ /* height: 130px; */ /* #endif */ - + } .pay_btn { width: 90%; @@ -822,7 +864,7 @@ color: #ffffff; line-height: 80rpx; } - + .dingdan-btn{ text-align: center; width: 80px; @@ -936,7 +978,7 @@ font-size: 22rpx; color: #777777; } - + .detail-foot-mian{ width: 100%; display: flex; @@ -944,7 +986,7 @@ justify-content: center; align-items: center; } - + .header-bottom-title-liao{ padding: 3px 8px; height: 16px; @@ -991,7 +1033,7 @@ font-size: 14px; font-weight: bold; } - + .detail-foot-mian-img{ width: 100%; height:auto; @@ -1039,7 +1081,7 @@ width: 34.03rpx; height: 32.64rpx; } - + .shouc{ display: flex; align-items: center; @@ -1071,7 +1113,7 @@ flex-direction: column; align-items: center; } - + .tese span:nth-child(1){ font-weight: bold; font-size: 22rpx; @@ -1112,7 +1154,7 @@ font-size: 22rpx; color: #777777; } - + .detail-foot-mian{ width: 95%; display: flex; @@ -1228,7 +1270,7 @@ flex-direction: row; align-items: baseline; } - + .header-bottom-money-view{ width: 100%; display: flex; @@ -1339,17 +1381,17 @@ background: linear-gradient(to right, rgb(255, 117, 98), rgb(233, 71, 52)); display: flex; justify-content: space-between; - align-items: flex-end; + align-items: flex-end; } .group_amount{ display: flex; - align-items: flex-end; + align-items: flex-end; color: #fff; } .group_amount span:nth-child(2){ font-size: 50rpx; font-weight: bold; - + } .group_amount span:nth-child(1){ font-size:28rpx; @@ -1357,7 +1399,7 @@ } .group-rule{ display: flex; - align-items: flex-end; + align-items: flex-end; } .group-rule span:nth-child(1){ color: #fff; @@ -1494,4 +1536,4 @@ width: 50px; text-align: center; } - \ No newline at end of file + diff --git a/pages/therapist/therapistDingdan.vue b/pages/therapist/therapistDingdan.vue index 63b61c6..eeb93fd 100644 --- a/pages/therapist/therapistDingdan.vue +++ b/pages/therapist/therapistDingdan.vue @@ -21,7 +21,7 @@ - + @@ -46,7 +46,7 @@ - + @@ -89,8 +89,8 @@ - - + + @@ -221,8 +221,10 @@ }, onLoad(e) { + console.log(e); let that = this that.technicianType=e.technicianType + that.massageTypeId=e.massageTypeId // that.getLocation();//低精度,快就完事了 // that.getLocation(true);//高精度,慢慢查询 uni.getStorage({ @@ -289,7 +291,7 @@ that.city = uni.getStorageSync('city') ? uni.getStorageSync('city') : '请选择城市' that.getTpCount(); that.getTpMy(); - + that.token = uni.getStorageSync('token') if (uni.getStorageSync('token')) { if (that.latitude && that.longitude) { @@ -359,7 +361,7 @@ uni.reLaunch({ url:'/my/order/payModifyDzhifu' }) - + }else if(this.dataIndex=='支付'){ this.$queue.setData('getJishi',e); uni.reLaunch({ @@ -577,7 +579,7 @@ } }); }, - + // 开启订阅消息 openMsg() { console.log('订阅消息') @@ -587,7 +589,7 @@ success(ret) { if (ret.subscriptionsSetting.itemSettings) { uni.setStorageSync('sendMsg', true) - uni.openSetting({ // 打开设置页 + uni.openSetting({ // 打开设置页 success(rea) { console.log(rea.authSetting) } @@ -809,7 +811,7 @@ url: '/pages/index/search/index?index=' + index }); }, - + //地图初始化, getLocation(isHighAccuracy = false) { console.log('获取地理位置,精度:', isHighAccuracy); @@ -1363,7 +1365,7 @@ justify-content: space-between; padding: 10rpx; } - + .touxiang-left{ width: 100%; /* padding: 10px; */ @@ -1378,7 +1380,7 @@ height: 100%; justify-content: space-between; } - + /deep/.justify-between{ // width: 100px; // height: 32px; @@ -1722,4 +1724,4 @@ border-radius: 10upx; line-height: 58rpx; } - \ No newline at end of file +