订单页面调整
This commit is contained in:
parent
c10dba9978
commit
170fae5ad1
|
@ -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
|
||||
})
|
||||
}
|
||||
});
|
||||
|
|
|
@ -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
|
||||
})
|
||||
}
|
||||
});
|
||||
|
|
|
@ -126,7 +126,7 @@
|
|||
<view class="justify-title-nav-bor"></view>
|
||||
</view>
|
||||
<view class="flex justify-between add-lin">
|
||||
<view class="add-con-title title-font"> {{order.packageType=='105'?'项目次卡':order.packageType=='106'?'服务疗程':'套餐名称'}}</view>
|
||||
<view class="add-con-title title-font"> {{order.packageType=='104'?'套餐':order.packageType=='105'?'次卡':order.packageType=='106'?'疗程':order.packageType=='111'?'团购':order.packageType=='112'?'秒杀':'其他'}}名称</view>
|
||||
<view class="add-con-cont value-font">
|
||||
{{order.ordersMassageList[0].userPackageDetail.mainTitle}}
|
||||
</view>
|
||||
|
|
|
@ -49,6 +49,9 @@
|
|||
<image :src="item.packageImg" mode=""></image>
|
||||
<span class="img-span"
|
||||
v-if="text=='my'">{{item.status=='1'?'未用完':item.status=='2'?'退款':item.status=='9'?'已用完':'其他'}}</span>
|
||||
<span v-else>
|
||||
<span class="img-span" v-if="item.isNewer=='1'">新人专享</span>
|
||||
</span>
|
||||
</view>
|
||||
<view class="item-view" v-if="text=='index'">
|
||||
<view class="view-cata">
|
||||
|
|
|
@ -92,13 +92,16 @@
|
|||
</view>
|
||||
<view class="detail-foot-mian">
|
||||
<image class="detail-foot-mian-img" v-for="(item,index) in contentImg" :key="index" :src="item" mode="widthFix"></image>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="detail-btn" :class="[newTime<=0?'hBtn':'aBtn']" @click="goumai(mainData,'',detailData)" v-if="mainData.isNewer!='1'&&newTime>0">
|
||||
<view v-if="isStart" class="detail-btn aBtn" @click="goumai(mainData,'',detailData)">
|
||||
<!-- <view v-if="isStart" class="detail-btn" :class="[newTime<=0?'hBtn':'aBtn']" @click="goumai(mainData,'',detailData)"> -->
|
||||
<span>¥{{mainData.price}}</span>
|
||||
<span> 一键开团</span>
|
||||
</view>
|
||||
<view v-else class="detail-btn hBtn">
|
||||
<span>{{startTime}} 开团</span>
|
||||
</view>
|
||||
<!-- 支付方式 -->
|
||||
|
||||
</view>
|
||||
|
@ -134,7 +137,11 @@
|
|||
hours:0,
|
||||
minutes:0,
|
||||
seconds:0,
|
||||
day:0
|
||||
day:0,
|
||||
startTime:'',
|
||||
isStart:false,
|
||||
isEnd:false,
|
||||
user:null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -144,35 +151,44 @@
|
|||
backgroundSize: 'cover', // 根据需要调整
|
||||
};
|
||||
},
|
||||
|
||||
},
|
||||
onLoad(e) {
|
||||
var that=this;
|
||||
that.dataList=e;
|
||||
that.isVIP=this.$queue.getData('isVIP');
|
||||
that.getData()
|
||||
that.getData();
|
||||
that.getUserData();
|
||||
},
|
||||
|
||||
methods:{
|
||||
//老订单 方法
|
||||
onCountdownChange(e) {
|
||||
this.newTime=e
|
||||
},
|
||||
goumai(item,groupNo,detailData){//立即购买
|
||||
this.mainData.groupNo=groupNo
|
||||
this.$queue.setData('mainData',this.mainData);
|
||||
this.$queue.setData('detailData',this.detailData);
|
||||
this.$queue.setData('youhui','');
|
||||
if(this.newTime<=0){
|
||||
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{
|
||||
uni.navigateTo({
|
||||
url:'/my/order/payModifyPt?ordersId='+item.id
|
||||
})
|
||||
|
||||
this.mainData.groupNo=groupNo
|
||||
this.$queue.setData('mainData',this.mainData);
|
||||
this.$queue.setData('detailData',this.detailData);
|
||||
this.$queue.setData('youhui','');
|
||||
if(this.isEnd){
|
||||
uni.showToast({
|
||||
icon:'error',
|
||||
title:'已过开团时间,无法开团!'
|
||||
})
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url:'/my/order/payModifyPt?ordersId='+item.id
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
goNav(e) {
|
||||
|
@ -180,7 +196,6 @@
|
|||
url: e
|
||||
})
|
||||
},
|
||||
|
||||
openpay(item) {//立即预约
|
||||
item.packagePrice=this.detailData[0].packagePrice;
|
||||
item.massageImg=this.detailData[0].massageImg;
|
||||
|
@ -218,7 +233,6 @@
|
|||
limit: that.limit,
|
||||
}
|
||||
that.$Request.get('/app/massage/package/getAppGroupDetail', data).then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 0) {
|
||||
if(res.groupData.level == 3){
|
||||
res.groupData.levelName = "新手"
|
||||
|
@ -238,6 +252,18 @@
|
|||
let currentTimeStamp = new Date().getTime() / 1000;
|
||||
let formatTimeStamp = Math.floor(afterTimeStamp - currentTimeStamp);
|
||||
this.endOfServiceTimer = formatTimeStamp;
|
||||
let beforeTimeStamp = new Date(res.groupData.startTime).getTime() / 1000;
|
||||
if(beforeTimeStamp > currentTimeStamp){
|
||||
that.startTime = res.groupData.startTime;
|
||||
that.isStart = false;
|
||||
}else{
|
||||
that.isStart = true;
|
||||
}
|
||||
if(currentTimeStamp > afterTimeStamp){
|
||||
that.isEnd = true;
|
||||
}else{
|
||||
that.isEnd = false;
|
||||
}
|
||||
// console.log("eeee",this.endOfServiceTimer);
|
||||
// var starTime=that.getTimeInMilliseconds(res.groupData.startTime);
|
||||
// var endTime=that.getTimeInMilliseconds(res.groupData.endTime);
|
||||
|
@ -275,6 +301,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
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -48,8 +48,12 @@
|
|||
<!-- <view class="item-line"></view> -->
|
||||
<view class="item-img">
|
||||
<image :src="item.packageImg" mode=""></image>
|
||||
<span class="img-span"
|
||||
v-if="text=='my'">{{item.status=='1'?'未用完':item.status=='2'?'退款':item.status=='9'?'已用完':'其他'}}</span>
|
||||
<span class="img-span" v-if="text=='my'">
|
||||
{{item.status=='1'?'未用完':item.status=='2'?'退款':item.status=='9'?'已用完':'其他'}}
|
||||
</span>
|
||||
<span v-else>
|
||||
<span class="img-span" v-if="item.isNewer=='1'">新人专享</span>
|
||||
</span>
|
||||
</view>
|
||||
<view class="item-view">
|
||||
<view class="view-cata">
|
||||
|
|
|
@ -34,6 +34,9 @@
|
|||
<span> 次</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tewmwork-prompt" v-if="mainData.isNewer=='1'">
|
||||
(人人可秒杀·仅新用户专享)
|
||||
</view>
|
||||
<view class="tewmork-key">
|
||||
<view class="header-bottom-money1"><span v-for="(item,index) in labels" :key="index">{{item}}</span></view>
|
||||
<view class="xiaoer item-view-biao">{{mainData.levelName}}</view>
|
||||
|
@ -72,8 +75,11 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="push-button">
|
||||
<view class="detail-btn" :class="[mainData.btnShow==true?'aBavk':'hBack']" @click="goumai(mainData)">
|
||||
{{dataList.name=='index'?'立即购买':'立即预约'}}
|
||||
<view v-if="isStart" class="detail-btn aBavk" @click="goumai(mainData)">
|
||||
{{dataList.name=='index'?'一键开秒':'立即预约'}}
|
||||
</view>
|
||||
<view v-else class="detail-btn hBack">
|
||||
{{startTime}} 开秒
|
||||
</view>
|
||||
</view>
|
||||
<!-- 支付方式 -->
|
||||
|
@ -126,7 +132,11 @@
|
|||
limit:10,
|
||||
mainId:'',
|
||||
serviceCount:'',
|
||||
labels:[]
|
||||
labels:[],
|
||||
startTime:'',
|
||||
isStart:false,
|
||||
isEnd:false,
|
||||
user:null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -141,8 +151,9 @@
|
|||
var that=this;
|
||||
that.dataList=e;
|
||||
that.isVIP=this.$queue.getData('isVIP');
|
||||
that.youhui()
|
||||
that.getData()
|
||||
that.youhui();
|
||||
that.getData();
|
||||
that.getUserData();
|
||||
},
|
||||
onShow() {
|
||||
|
||||
|
@ -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({
|
||||
|
@ -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 = "新手"
|
||||
|
@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -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({
|
||||
|
|
Loading…
Reference in New Issue