订单页面调整

This commit is contained in:
曹磊 2024-08-02 17:13:04 +08:00
parent c10dba9978
commit 170fae5ad1
8 changed files with 204 additions and 111 deletions

View File

@ -21,7 +21,7 @@
</view>
<view class="Service-more" @click="getAddressList()"></view>
</view>
<view class="bgImg u-skeleton-fillet">
<view class="head-top">
<view class="pay-title">服务项目</view>
@ -64,7 +64,7 @@
</view>
</view>
</view>
<view class="header-view header-padd header-margin">
<view class="jusitify-line" @click="liliaoshi">
<view class="line-word title-font" >
@ -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){

View File

@ -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
})
}
});

View File

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

View File

@ -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">
@ -681,4 +684,4 @@
align-items: center;
justify-content: space-between;
}
</style>
</style>

View File

@ -23,7 +23,7 @@
<!-- <view><span>08</span>:<span>08</span>:<span>08</span></view> -->
</view>
</view>
<view class="header-bottom">
<view class="header-bottom-top">
<view class="header-bottom-title">
@ -91,16 +91,19 @@
<span class="detail-foot-nav-bor"></span>
</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>
<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>
</template>
<script>
@ -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>
@ -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;
}
</style>
</style>

View File

@ -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">
@ -674,4 +678,4 @@
flex-direction: row;
justify-content: space-between;
}
</style>
</style>

View File

@ -21,7 +21,7 @@
<view style=" position:relative;"><image style="width: 30rpx; height:45rpx; position: absolute; right:-8rpx" src="../../static/arrow9.png"></image><span>正在疯抢</span></view>
</view>
</view>
<view class="header-bottom">
<view class="header-bottom-top">
<view class="header-bottom-title">
@ -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>
@ -41,8 +44,8 @@
<view class="tewmork-time">
<span>秒杀时间</span><span>{{mainData.startTime}}</span> - <span>{{mainData.endTime}}</span>
</view>
</view>
</view>
</view>
@ -68,12 +71,15 @@
<span class="detail-foot-nav-bor"></span>
</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>
<image class="detail-foot-mian-img" v-for="(item,index) in contentImg" :key="index" :src="item" mode="widthFix"></image>
</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,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
}
})
}
},
}
}
</script>
@ -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;
}
</style>
</style>

View File

@ -21,7 +21,7 @@
<image class="touxiang-left-content-img" :src="item.artificerImg ? item.artificerImg : '../../static/logo.png'"
@click.stop="saveImgs(item.artificerImg)" mode="aspectFill"></image>
<image class="touxiang-frame" :src="item.technicianType=='3'?'../../static/vip/grade1.gif':item.technicianType=='4'?'../../static/vip/grade2.gif':'../../static/vip/grade3.gif'"></image>
</view>
<view class="list-right">
<view class="flex align-center" style="justify-content: start;">
@ -46,7 +46,7 @@
</view>
</view>
</view>
<view class="flex align-center">
<image class="therapist-bottom-dingwei" src="../../static/dituzhaoren6.png"></image>
<view class="therapist-bottom-dingwei-text">
@ -89,8 +89,8 @@
</view>
</view>
</view>
</view>
</view>
</view>
@ -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;
}
</style>
</style>