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 @@
-
+
-
- {{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
+