订单页面调整
This commit is contained in:
parent
c10dba9978
commit
170fae5ad1
|
@ -287,6 +287,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
|
console.log(e);
|
||||||
if (this.$queue.getData('msTimeDate')) {
|
if (this.$queue.getData('msTimeDate')) {
|
||||||
this.msTimeDate = parseInt(this.$queue.getData('msTimeDate'));
|
this.msTimeDate = parseInt(this.$queue.getData('msTimeDate'));
|
||||||
} else {
|
} else {
|
||||||
|
@ -477,12 +478,13 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
liliaoshi(){
|
liliaoshi(){
|
||||||
|
let massageTypeId = this.orderXm.massageTypeId;
|
||||||
uni.setStorage({
|
uni.setStorage({
|
||||||
key: 'taocanDd',
|
key: 'taocanDd',
|
||||||
data: '支付',
|
data: '支付',
|
||||||
success: function () {
|
success: function () {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/therapist/therapistDingdan'
|
url: '/pages/therapist/therapistDingdan?massageTypeId='+massageTypeId
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -494,12 +494,13 @@
|
||||||
},
|
},
|
||||||
liliaoshi(){
|
liliaoshi(){
|
||||||
var that=this
|
var that=this
|
||||||
|
let massageTypeId = that.orderXm.massageTypeId;
|
||||||
uni.setStorage({
|
uni.setStorage({
|
||||||
key: 'taocanDd',
|
key: 'taocanDd',
|
||||||
data: '我的套餐',
|
data: '我的套餐',
|
||||||
success: function () {
|
success: function () {
|
||||||
uni.navigateTo({
|
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 class="justify-title-nav-bor"></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-between add-lin">
|
<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">
|
<view class="add-con-cont value-font">
|
||||||
{{order.ordersMassageList[0].userPackageDetail.mainTitle}}
|
{{order.ordersMassageList[0].userPackageDetail.mainTitle}}
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -49,6 +49,9 @@
|
||||||
<image :src="item.packageImg" mode=""></image>
|
<image :src="item.packageImg" mode=""></image>
|
||||||
<span class="img-span"
|
<span class="img-span"
|
||||||
v-if="text=='my'">{{item.status=='1'?'未用完':item.status=='2'?'退款':item.status=='9'?'已用完':'其他'}}</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>
|
||||||
<view class="item-view" v-if="text=='index'">
|
<view class="item-view" v-if="text=='index'">
|
||||||
<view class="view-cata">
|
<view class="view-cata">
|
||||||
|
|
|
@ -92,13 +92,16 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="detail-foot-mian">
|
<view class="detail-foot-mian">
|
||||||
<image class="detail-foot-mian-img" v-for="(item,index) in contentImg" :key="index" :src="item" mode="widthFix"></image>
|
<image class="detail-foot-mian-img" v-for="(item,index) in contentImg" :key="index" :src="item" mode="widthFix"></image>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</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>¥{{mainData.price}}</span>
|
||||||
<span> 一键开团</span>
|
<span> 一键开团</span>
|
||||||
</view>
|
</view>
|
||||||
|
<view v-else class="detail-btn hBtn">
|
||||||
|
<span>{{startTime}} 开团</span>
|
||||||
|
</view>
|
||||||
<!-- 支付方式 -->
|
<!-- 支付方式 -->
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
@ -134,7 +137,11 @@
|
||||||
hours:0,
|
hours:0,
|
||||||
minutes:0,
|
minutes:0,
|
||||||
seconds:0,
|
seconds:0,
|
||||||
day:0
|
day:0,
|
||||||
|
startTime:'',
|
||||||
|
isStart:false,
|
||||||
|
isEnd:false,
|
||||||
|
user:null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -144,26 +151,35 @@
|
||||||
backgroundSize: 'cover', // 根据需要调整
|
backgroundSize: 'cover', // 根据需要调整
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
var that=this;
|
var that=this;
|
||||||
that.dataList=e;
|
that.dataList=e;
|
||||||
that.isVIP=this.$queue.getData('isVIP');
|
that.isVIP=this.$queue.getData('isVIP');
|
||||||
that.getData()
|
that.getData();
|
||||||
|
that.getUserData();
|
||||||
},
|
},
|
||||||
|
|
||||||
methods:{
|
methods:{
|
||||||
//老订单 方法
|
//老订单 方法
|
||||||
onCountdownChange(e) {
|
onCountdownChange(e) {
|
||||||
this.newTime=e
|
this.newTime=e
|
||||||
},
|
},
|
||||||
goumai(item,groupNo,detailData){//立即购买
|
goumai(item,groupNo,detailData){//立即购买
|
||||||
|
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:'该团购只限新人!'
|
||||||
|
})
|
||||||
|
}else{
|
||||||
this.mainData.groupNo=groupNo
|
this.mainData.groupNo=groupNo
|
||||||
this.$queue.setData('mainData',this.mainData);
|
this.$queue.setData('mainData',this.mainData);
|
||||||
this.$queue.setData('detailData',this.detailData);
|
this.$queue.setData('detailData',this.detailData);
|
||||||
this.$queue.setData('youhui','');
|
this.$queue.setData('youhui','');
|
||||||
if(this.newTime<=0){
|
if(this.isEnd){
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon:'error',
|
icon:'error',
|
||||||
title:'已过开团时间,无法开团!'
|
title:'已过开团时间,无法开团!'
|
||||||
|
@ -172,7 +188,7 @@
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/my/order/payModifyPt?ordersId='+item.id
|
url:'/my/order/payModifyPt?ordersId='+item.id
|
||||||
})
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
goNav(e) {
|
goNav(e) {
|
||||||
|
@ -180,7 +196,6 @@
|
||||||
url: e
|
url: e
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
openpay(item) {//立即预约
|
openpay(item) {//立即预约
|
||||||
item.packagePrice=this.detailData[0].packagePrice;
|
item.packagePrice=this.detailData[0].packagePrice;
|
||||||
item.massageImg=this.detailData[0].massageImg;
|
item.massageImg=this.detailData[0].massageImg;
|
||||||
|
@ -218,7 +233,6 @@
|
||||||
limit: that.limit,
|
limit: that.limit,
|
||||||
}
|
}
|
||||||
that.$Request.get('/app/massage/package/getAppGroupDetail', data).then(res => {
|
that.$Request.get('/app/massage/package/getAppGroupDetail', data).then(res => {
|
||||||
console.log(res);
|
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
if(res.groupData.level == 3){
|
if(res.groupData.level == 3){
|
||||||
res.groupData.levelName = "新手"
|
res.groupData.levelName = "新手"
|
||||||
|
@ -238,6 +252,18 @@
|
||||||
let currentTimeStamp = new Date().getTime() / 1000;
|
let currentTimeStamp = new Date().getTime() / 1000;
|
||||||
let formatTimeStamp = Math.floor(afterTimeStamp - currentTimeStamp);
|
let formatTimeStamp = Math.floor(afterTimeStamp - currentTimeStamp);
|
||||||
this.endOfServiceTimer = formatTimeStamp;
|
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);
|
// console.log("eeee",this.endOfServiceTimer);
|
||||||
// var starTime=that.getTimeInMilliseconds(res.groupData.startTime);
|
// var starTime=that.getTimeInMilliseconds(res.groupData.startTime);
|
||||||
// var endTime=that.getTimeInMilliseconds(res.groupData.endTime);
|
// 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>
|
</script>
|
||||||
|
|
|
@ -48,8 +48,12 @@
|
||||||
<!-- <view class="item-line"></view> -->
|
<!-- <view class="item-line"></view> -->
|
||||||
<view class="item-img">
|
<view class="item-img">
|
||||||
<image :src="item.packageImg" mode=""></image>
|
<image :src="item.packageImg" mode=""></image>
|
||||||
<span class="img-span"
|
<span class="img-span" v-if="text=='my'">
|
||||||
v-if="text=='my'">{{item.status=='1'?'未用完':item.status=='2'?'退款':item.status=='9'?'已用完':'其他'}}</span>
|
{{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>
|
||||||
<view class="item-view">
|
<view class="item-view">
|
||||||
<view class="view-cata">
|
<view class="view-cata">
|
||||||
|
|
|
@ -34,6 +34,9 @@
|
||||||
<span> 次</span>
|
<span> 次</span>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="tewmwork-prompt" v-if="mainData.isNewer=='1'">
|
||||||
|
(人人可秒杀·仅新用户专享)
|
||||||
|
</view>
|
||||||
<view class="tewmork-key">
|
<view class="tewmork-key">
|
||||||
<view class="header-bottom-money1"><span v-for="(item,index) in labels" :key="index">{{item}}</span></view>
|
<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>
|
<view class="xiaoer item-view-biao">{{mainData.levelName}}</view>
|
||||||
|
@ -72,8 +75,11 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="push-button">
|
<view class="push-button">
|
||||||
<view class="detail-btn" :class="[mainData.btnShow==true?'aBavk':'hBack']" @click="goumai(mainData)">
|
<view v-if="isStart" class="detail-btn aBavk" @click="goumai(mainData)">
|
||||||
{{dataList.name=='index'?'立即购买':'立即预约'}}
|
{{dataList.name=='index'?'一键开秒':'立即预约'}}
|
||||||
|
</view>
|
||||||
|
<view v-else class="detail-btn hBack">
|
||||||
|
{{startTime}} 开秒
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 支付方式 -->
|
<!-- 支付方式 -->
|
||||||
|
@ -126,7 +132,11 @@
|
||||||
limit:10,
|
limit:10,
|
||||||
mainId:'',
|
mainId:'',
|
||||||
serviceCount:'',
|
serviceCount:'',
|
||||||
labels:[]
|
labels:[],
|
||||||
|
startTime:'',
|
||||||
|
isStart:false,
|
||||||
|
isEnd:false,
|
||||||
|
user:null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -141,8 +151,9 @@
|
||||||
var that=this;
|
var that=this;
|
||||||
that.dataList=e;
|
that.dataList=e;
|
||||||
that.isVIP=this.$queue.getData('isVIP');
|
that.isVIP=this.$queue.getData('isVIP');
|
||||||
that.youhui()
|
that.youhui();
|
||||||
that.getData()
|
that.getData();
|
||||||
|
that.getUserData();
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
|
||||||
|
@ -178,20 +189,22 @@
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
goumai(item){//立即购买
|
goumai(item){//立即购买
|
||||||
|
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:'该秒杀只限新人!'
|
||||||
|
})
|
||||||
|
}else{
|
||||||
this.$queue.setData('mainData',item)
|
this.$queue.setData('mainData',item)
|
||||||
this.$queue.setData('detailData',this.detailData)
|
this.$queue.setData('detailData',this.detailData)
|
||||||
this.$queue.setData('youhui','');
|
this.$queue.setData('youhui','');
|
||||||
console.log("item",item)
|
|
||||||
if(item.btnShow==false){
|
|
||||||
uni.showToast({
|
|
||||||
icon:'error',
|
|
||||||
title:'已过秒杀时间,无法下单!'
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/my/order/payModifyMs?ordersId='+item.id
|
url:'/my/order/payModifyMs?ordersId='+item.id
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
goNav(e) {
|
goNav(e) {
|
||||||
|
@ -613,13 +626,29 @@
|
||||||
that.$Request.get('/app/massage/package/getAppFlashDetail', data).then(res => {
|
that.$Request.get('/app/massage/package/getAppFlashDetail', data).then(res => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
var newTime = new Date().getTime();
|
// var newTime = new Date().getTime();
|
||||||
var starTime=this.getTimeInMilliseconds(res.data.startTime);
|
// var starTime=this.getTimeInMilliseconds(res.data.startTime);
|
||||||
var endTime=this.getTimeInMilliseconds(res.data.endTime);
|
// var endTime=this.getTimeInMilliseconds(res.data.endTime);
|
||||||
if(newTime>=starTime&&newTime<=endTime){
|
// if(newTime>=starTime&&newTime<=endTime){
|
||||||
this.$set(res.data, 'btnShow', true)
|
// 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{
|
}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){
|
if(res.data.level == 3){
|
||||||
res.data.levelName = "新手"
|
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>
|
</script>
|
||||||
|
|
|
@ -221,8 +221,10 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
|
console.log(e);
|
||||||
let that = this
|
let that = this
|
||||||
that.technicianType=e.technicianType
|
that.technicianType=e.technicianType
|
||||||
|
that.massageTypeId=e.massageTypeId
|
||||||
// that.getLocation();//低精度,快就完事了
|
// that.getLocation();//低精度,快就完事了
|
||||||
// that.getLocation(true);//高精度,慢慢查询
|
// that.getLocation(true);//高精度,慢慢查询
|
||||||
uni.getStorage({
|
uni.getStorage({
|
||||||
|
|
Loading…
Reference in New Issue