订单 优惠卷

This commit is contained in:
Mr.jiang 2024-07-02 20:57:04 +08:00
parent 5e0d1ea2ef
commit d35d73df91
12 changed files with 367 additions and 215 deletions

View File

@ -110,6 +110,10 @@
uni.reLaunch({ uni.reLaunch({
url:'/my/order/payModifyTcMy' url:'/my/order/payModifyTcMy'
}) })
}else if (this.isfa == 6) {
uni.reLaunch({
url:'/my/order/payModifyJsDetail'
})
} }
}, },

View File

@ -7,76 +7,84 @@
<view class="" :class="tabIndex == index?'line':''"></view> <view class="" :class="tabIndex == index?'line':''"></view>
</view> </view>
</view> </view>
<t-refresh ref="refresh" v-if="hongbao.length>0" @refresh="refresh" @loadMore="loadMore" :loadingType="loadingType" :tPadding="0">
<view v-if="tabIndex == 0"> <template slot="content">
<view class="youhui-weiyong youhui-list" v-for="(item,index) in hongbao" :key="index"> <checkbox-group @change="checkboxChange">
<view class="youhui-view-left"> <view v-if="tabIndex == 0">
<view class="youhui-view-left-yuan"> <view class="youhui-weiyong youhui-list" v-for="(item,index) in hongbao" :key="index">
<span class="youhui-view-left-num">{{item.money}}</span> <view class="youhui-view-left">
<span class="youhui-view-left-text"></span> <view class="youhui-view-left-yuan">
<span class="youhui-view-left-num">{{item.money}}</span>
<span class="youhui-view-left-text"></span>
</view>
<view class="youhui-view-left-bottom">
{{item.minMoney}}元可用
</view>
</view>
<view class="youhui-view-right">
<view class="youhui-view-right-top">
<view class="youhui-view-right-title">{{item.couponName}}</view>
<view class="youhui-view-right-time">{{item.endDate}}</view>
</view>
<view class="youhui-view-right-btn" @tap="shiYong()">立即使用</view>
</view>
</view>
</view> </view>
<view class="youhui-view-left-bottom"> <view v-if="tabIndex == 1">
{{item.minMoney}}元可用 <view class="youhui-yiyong youhui-list" v-for="(item,index) in hongbao" :key="index">
<view class="youhui-view-left">
<view class="youhui-view-left-yuan">
<span class="youhui-view-left-num">{{item.money}}</span>
<span class="youhui-view-left-text"></span>
</view>
<view class="youhui-view-left-bottom">
{{item.minMoney}}元可用
</view>
</view>
<view class="youhui-view-right" style="justify-content: space-around;">
<view class="youhui-view-right-top">
<view class="youhui-view-right-title">{{item.couponName}}</view>
<view class="youhui-view-right-time">{{item.endDate}}</view>
</view>
<image class="youhui-img" src="../../static/youhuijuan/chapter.png"></image>
</view>
</view>
</view> </view>
</view> <view v-if="tabIndex == 2">
<view class="youhui-view-right"> <view class="youhui-yiyong youhui-list" v-for="(item,index) in hongbao" :key="index">
<view class="youhui-view-right-top"> <view class="youhui-view-left">
<view class="youhui-view-right-title">{{item.couponName}}</view> <view class="youhui-view-left-yuan">
<view class="youhui-view-right-time">{{item.endDate}}</view> <span class="youhui-view-left-num">{{item.money}}</span>
<span class="youhui-view-left-text"></span>
</view>
<view class="youhui-view-left-bottom">
{{item.minMoney}}元可用
</view>
</view>
<view class="youhui-view-right" style="justify-content: space-around;">
<view class="youhui-view-right-top">
<view class="youhui-view-right-title">{{item.couponName}}</view>
<view class="youhui-view-right-time">{{item.endDate}}</view>
</view>
<image class="youhui-img" src="../../static/youhuijuan/chapter1.png"></image>
</view>
</view>
</view> </view>
<view class="youhui-view-right-btn" @tap="shiYong()">立即使用</view> </checkbox-group>
</view> </template>
</view> </t-refresh>
</view>
<view v-if="tabIndex == 1">
<view class="youhui-yiyong youhui-list" v-for="(item,index) in hongbao" :key="index">
<view class="youhui-view-left">
<view class="youhui-view-left-yuan">
<span class="youhui-view-left-num">{{item.money}}</span>
<span class="youhui-view-left-text"></span>
</view>
<view class="youhui-view-left-bottom">
{{item.minMoney}}元可用
</view>
</view>
<view class="youhui-view-right" style="justify-content: space-around;">
<view class="youhui-view-right-top">
<view class="youhui-view-right-title">{{item.couponName}}</view>
<view class="youhui-view-right-time">{{item.endDate}}</view>
</view>
<image class="youhui-img" src="../../static/youhuijuan/chapter.png"></image>
</view>
</view>
</view>
<view v-if="tabIndex == 2">
<view class="youhui-yiyong youhui-list" v-for="(item,index) in hongbao" :key="index">
<view class="youhui-view-left">
<view class="youhui-view-left-yuan">
<span class="youhui-view-left-num">{{item.money}}</span>
<span class="youhui-view-left-text"></span>
</view>
<view class="youhui-view-left-bottom">
{{item.minMoney}}元可用
</view>
</view>
<view class="youhui-view-right" style="justify-content: space-around;">
<view class="youhui-view-right-top">
<view class="youhui-view-right-title">{{item.couponName}}</view>
<view class="youhui-view-right-time">{{item.endDate}}</view>
</view>
<image class="youhui-img" src="../../static/youhuijuan/chapter1.png"></image>
</view>
</view>
</view>
<empty v-if="hongbao.length==0"></empty> <empty v-if="hongbao.length==0"></empty>
</view> </view>
</template> </template>
<script> <script>
import tRefresh from "@/components/t-refresh/t-refresh.vue"
import empty from '@/components/empty.vue' import empty from '@/components/empty.vue'
export default { export default {
components:{ components:{
empty empty,
tRefresh
}, },
data() { data() {
return { return {
@ -107,6 +115,19 @@
this.getMyList(); this.getMyList();
}, },
methods: { methods: {
//
loadMore: async function() {
//loadingType: 0. 1. 2.
if(this.loadingType==0){
this.loadingType=2
//
setTimeout(()=>{
this.page++;
this.loadingType=0;
this.getData()
},1000)
}
},
shiYong(){ shiYong(){
uni.switchTab({ uni.switchTab({
url:'/pages/index/index' url:'/pages/index/index'
@ -119,17 +140,19 @@
}); });
this.$Request.getT('/app/coupon/selectCouponUserList?page='+this.page+'&limit='+this.size+'&status=' + this.tabIndex).then(res => { this.$Request.getT('/app/coupon/selectCouponUserList?page='+this.page+'&limit='+this.size+'&status=' + this.tabIndex).then(res => {
if (res.code == 0) { if (res.code == 0) {
if (this.page == 1) { if (this.page == 1) this.hongbao = []; //
this.hongbao = []; this.hongbao = [...this.hongbao, ...res.data.list]; //
} // if (this.page == 1) {
res.data.list.forEach(d => { // this.hongbao = [];
this.hongbao.push(d); // }
}); // res.data.list.forEach(d => {
if (res.data.list.length === this.size) { // this.hongbao.push(d);
this.loadingType = 0; // });
} else { // if (res.data.list.length === this.size) {
this.loadingType = 3; // this.loadingType = 0;
} // } else {
// this.loadingType = 3;
// }
} else { } else {
this.loadingType = 2; this.loadingType = 2;
} }

View File

@ -1,38 +1,34 @@
<template> <template>
<view class="page-content"> <view class="page-content">
<!-- <view class="flex align-center justify-between you-nav"> <t-refresh ref="refresh" v-if="hongbao.length>0" @refresh="refresh" @loadMore="loadMore" :loadingType="loadingType" :tPadding="0">
<view v-for="(item,index) in tab" :key="index" class="text-center box" <template slot="content">
:class="tabIndex == index?'tanColor':''" @click="bindTab(item.state)"> <checkbox-group @change="checkboxChange">
<view style="z-index: 9;">{{item.name}}</view> <view class="youhui-weiyong youhui-list" v-if="priceDd>=item.minMoney" v-for="(item,index) in hongbao" :key="index">
<view class="" :class="tabIndex == index?'line':''"></view> <view class="youhui-view-left">
</view> <view class="youhui-view-left-yuan">
</view> <span class="youhui-view-left-num">{{item.money}}</span>
<view @tap="queding()" class="ticket-button">确定</view>--> <span class="youhui-view-left-text"></span>
<checkbox-group @change="checkboxChange"> </view>
<view class="youhui-weiyong youhui-list" v-if="priceDd>=item.minMoney" v-for="(item,index) in hongbao" :key="index"> <view class="youhui-view-left-bottom">
<view class="youhui-view-left"> {{item.minMoney}}元可用
<view class="youhui-view-left-yuan"> </view>
<span class="youhui-view-left-num">{{item.money}}</span> </view>
<span class="youhui-view-left-text"></span> <view class="youhui-view-right">
</view> <view class="youhui-view-right-top">
<view class="youhui-view-left-bottom"> <view class="youhui-view-right-title">{{item.couponName}}</view>
{{item.minMoney}}元可用 <view class="time-money" style="margin-top: 10px;">
</view> <view class="youhui-view-right-time">{{item.createTime.substring(0,10)}} ~ </view>
</view> <view class="youhui-view-right-time" style="margin-left: 3px;"> {{item.expirationTime.substring(0,10)}}</view>
<view class="youhui-view-right"> </view>
<view class="youhui-view-right-top"> </view>
<view class="youhui-view-right-title">{{item.couponName}}</view> <label class="tui-radio">
<view class="time-money" style="margin-top: 10px;"> <checkbox activeBackgroundColor="#029d88" color="#029d88" :value="item.id.toString()" :checked="checkbox"/>
<view class="youhui-view-right-time">{{item.createTime.substring(0,10)}} ~ </view> </label>
<view class="youhui-view-right-time" style="margin-left: 3px;"> {{item.expirationTime.substring(0,10)}}</view>
</view> </view>
</view> </view>
<label class="tui-radio"> </checkbox-group>
<checkbox activeBackgroundColor="#029d88" color="#029d88" :value="item.id.toString()" :checked="checkbox"/> </template>
</label> </t-refresh>
</view>
</view>
</checkbox-group>
<view @tap="queding()" class="queding"> <view @tap="queding()" class="queding">
<span class="que-btn">确定</span> <span class="que-btn">确定</span>
</view> </view>
@ -42,9 +38,11 @@
<script> <script>
import empty from '@/components/empty.vue' import empty from '@/components/empty.vue'
import tRefresh from "@/components/t-refresh/t-refresh.vue"
export default { export default {
components:{ components:{
empty empty,
tRefresh
}, },
data() { data() {
return { return {
@ -82,7 +80,31 @@
} }
this.getMyList(); this.getMyList();
}, },
onPageScroll: function(e) {
this.scrollTop = e.scrollTop > 200;
},
onReachBottom: function() {
this.page = this.page + 1;
this.getMyList('');
},
onPullDownRefresh: function() {
this.page = 1;
this.getMyList('Refresh');
},
methods: { methods: {
//
loadMore: async function() {
//loadingType: 0. 1. 2.
if(this.loadingType==0){
this.loadingType=2
//
setTimeout(()=>{
this.page++;
this.loadingType=0;
this.getData()
},1000)
}
},
queding(){ queding(){
this.$queue.setData('youhui',this.couponId); this.$queue.setData('youhui',this.couponId);
if(this.content=='套餐'){// if(this.content=='套餐'){//
@ -105,6 +127,10 @@
uni.navigateTo({// uni.navigateTo({//
url:'/my/order/payModifyCi' url:'/my/order/payModifyCi'
}) })
}else if(this.content=='技师支付'){
uni.navigateTo({//
url:'/my/order/payModifyJsDetail'
})
} }
}, },
@ -129,15 +155,18 @@
} }
this.$Request.getT('/app/coupon/selectUserCouponList',data).then(res => { this.$Request.getT('/app/coupon/selectUserCouponList',data).then(res => {
if (res.code == 0) { if (res.code == 0) {
if (this.page == 1) { if (this.page == 1) this.hongbao = []; //
this.hongbao = []; this.hongbao = [...this.hongbao, ...res.data.list]; //
} // uni.stopPullDownRefresh()
this.hongbao=res.data.list // if (this.page == 1) {
if (res.data.list.length === this.size) { // this.hongbao = [];
this.loadingType = 0; // }
} else { // this.hongbao=res.data.list
this.loadingType = 3; // if (res.data.list.length === this.size) {
} // this.loadingType = 0;
// } else {
// this.loadingType = 3;
// }
} else { } else {
this.loadingType = 2; this.loadingType = 2;
} }
@ -151,17 +180,7 @@
this.getMyList(); this.getMyList();
} }
}, },
onPageScroll: function(e) {
this.scrollTop = e.scrollTop > 200;
},
onReachBottom: function() {
this.page = this.page + 1;
this.getMyList('');
},
onPullDownRefresh: function() {
this.page = 1;
this.getMyList('Refresh');
}
} }
</script> </script>

View File

@ -10,13 +10,13 @@
<view class="pay-title" style="">服务项目</view> <view class="pay-title" style="">服务项目</view>
<view class="flex justify-around"> <view class="flex justify-around">
<view class="" style="width: 160upx;height: 160upx;"> <view class="" style="width: 160upx;height: 160upx;">
<image :src="order.ordersMassageList[0].massageType.massageImg" <image :src="order.ordersMassageList[0].massageType?order.ordersMassageList[0].massageType.massageImg:order.ordersMassageList[0].userPackageDetail.massageImg"
style="width: 100%;height: 100%;border-radius: 19upx;"></image> style="width: 100%;height: 100%;border-radius: 19upx;"></image>
</view> </view>
<view class="u-flex-1 margin-left-sm"> <view class="u-flex-1 margin-left-sm">
<view class="flex head-title-right"> <view class="flex head-title-right">
<view class="margin-right-xs u-skeleton-fillet head-title" style="font-size: 30rpx;"> <view class="margin-right-xs u-skeleton-fillet head-title" style="font-size: 30rpx;">
{{order.ordersMassageList[0].massageType.title}} {{order.ordersMassageList[0].massageType?order.ordersMassageList[0].massageType.title:order.ordersMassageList[0].userPackageDetail.title}}
</view> </view>
<view class="zhuangtai"> <view class="zhuangtai">
<view v-if="order.status ==1">待支付</view> <view v-if="order.status ==1">待支付</view>
@ -35,14 +35,14 @@
<view style="width: 100%;"> <view style="width: 100%;">
<view class="flex justify-between margin-tb-sm" style="color: #999999;"> <view class="flex justify-between margin-tb-sm" style="color: #999999;">
<view style="justify-content: space-between;"> <view style="justify-content: space-between;">
{{order.ordersMassageList[0].massageType.duration}}分钟 {{order.ordersMassageList[0].massageType?order.ordersMassageList[0].massageType.duration:order.ordersMassageList[0].userPackageDetail.duration}}分钟
</view> </view>
</view> </view>
<view class="money-pay" style="justify-content: space-between;"> <view class="money-pay" style="justify-content: space-between;">
<view class="money-pay-zhen"> <view class="money-pay-zhen">
<span></span> <span></span>
<span>{{order.massagePrice}}</span> <span>{{order.price}}</span>
</view> </view>
<view> <view>
<uni-number-box :disabled="true" :value="order.ordersMassageList[0].num" :width='27' :min="1" @change="changeValue" /> <uni-number-box :disabled="true" :value="order.ordersMassageList[0].num" :width='27' :min="1" @change="changeValue" />
@ -142,15 +142,15 @@
</view> </view>
<view class="flex justify-between" style="margin-top: 19rpx;"> <view class="flex justify-between" style="margin-top: 19rpx;">
<view class="add-con-title">项目名称</view> <view class="add-con-title">项目名称</view>
<view class="add-con-cont" >{{order.ordersMassageList[0].massageType.title}}</view> <view class="add-con-cont" >{{order.ordersMassageList[0].massageType?order.ordersMassageList[0].massageType.title:order.ordersMassageList[0].userPackageDetail.title}}</view>
</view> </view>
<view class="flex justify-between" style="margin-top: 19rpx;"> <view class="flex justify-between" style="margin-top: 19rpx;">
<view class="add-con-title">服务时长</view> <view class="add-con-title">服务时长</view>
<view class="add-con-cont" >{{order.ordersMassageList[0].massageType.duration}}分钟</view> <view class="add-con-cont" >{{order.ordersMassageList[0].massageType?order.ordersMassageList[0].massageType.duration:order.ordersMassageList[0].userPackageDetail.duration}}分钟</view>
</view> </view>
<view class="flex justify-between" style="margin-top: 19rpx;"> <view class="flex justify-between" style="margin-top: 19rpx;">
<view class="add-con-title">项目价格</view> <view class="add-con-title">项目价格</view>
<view class="add-con-cont" >{{order.massagePrice}}</view> <view class="add-con-cont" >{{order.price}}</view>
</view> </view>
<view class="flex justify-between" style="margin-top: 19rpx;"> <view class="flex justify-between" style="margin-top: 19rpx;">
<view class="add-con-title">会员折扣</view> <view class="add-con-title">会员折扣</view>
@ -162,7 +162,7 @@
</view> </view>
<view class="" style="color: #333;"> <view class="" style="color: #333;">
<text style="font-size: 35rpx;font-weight: bold;"> <text style="font-size: 35rpx;font-weight: bold;">
{{order.massageMoney}} {{order.price}}
</text> </text>
</view> </view>
</view> </view>
@ -204,7 +204,7 @@
<view class="flex align-center margin-top-lg justify-between"> <view class="flex align-center margin-top-lg justify-between">
<view style="color: #333;font-size: 26rpx;">订单费用</view> <view style="color: #333;font-size: 26rpx;">订单费用</view>
<view class="" style="color: #333;"><text <view class="" style="color: #333;"><text
style="font-size: 26rpx;font-weight: bold;">{{order.massageMoney}}</text></view> style="font-size: 26rpx;font-weight: bold;">{{order.price}}</text></view>
</view> </view>
<view class="flex align-center margin-top-lg justify-between"> <view class="flex align-center margin-top-lg justify-between">
<view style="color: #333;font-size: 26rpx;">出行费用</view> <view style="color: #333;font-size: 26rpx;">出行费用</view>

View File

@ -68,7 +68,7 @@
</view> </view>
</view> </view>
<view class="ske-padding margin-top-sm header-view"> <view class="ske-padding margin-top-sm header-view">
<view class="fuwu-time" @click="liliaoshi"> <view class="fuwu-time">
<view class="fuwu-title" > <view class="fuwu-title" >
<span>技师</span> <span>技师</span>
<span v-if="jishiName">{{jishiName.technicianTypeName}}</span> <span v-if="jishiName">{{jishiName.technicianTypeName}}</span>
@ -76,7 +76,6 @@
<view class="liliao-bottom" style="margin-right: 6px;"> <view class="liliao-bottom" style="margin-right: 6px;">
<span v-if="jishiName">{{jishiName.artificerName}}</span> <span v-if="jishiName">{{jishiName.artificerName}}</span>
<span v-else>选择不同技师价格可能不一样哦~</span> <span v-else>选择不同技师价格可能不一样哦~</span>
<span class="view-more"></span>
</view> </view>
</view> </view>
<view class="liliao" @click="youhuijuan"> <view class="liliao" @click="youhuijuan">
@ -313,7 +312,7 @@
let fullDate = `${month}-${days}` let fullDate = `${month}-${days}`
let Time = year + '-' + fullDate let Time = year + '-' + fullDate
this.yearsDate = Time; this.yearsDate = Time;
this.orderXm=this.$queue.getData('mainData');
this.jishiName=this.$queue.getData('getJishi'); this.jishiName=this.$queue.getData('getJishi');
if(this.jishiName){ if(this.jishiName){
this.getMsTime(Time); this.getMsTime(Time);
@ -369,6 +368,42 @@
// #endif // #endif
}, },
methods: { methods: {
goOrder() {//orderId
let that = this
let data = {
address:that.province+that.city+that.district+that.detailaddress,
artificerId:that.jishiName.artificerId,
userPackageDetailId:that.userPackageDetailId,
phone:that.mobile,
userName:that.name,
tripWay:that.jishiName.tripWay,
city:that.city,
couponId: that.couponId,
userId: uni.getStorageSync('userId'),
longitude:that.longitude,
latitude:that.latitude,
serveTime:that.startTime,
remark:that.textareaData,
ordersMassageList:[
{massageId: that.userPackageDetailId? that.userPackageDetailId:that.orderXm.massageTypeId,num: that.number},
]
}
that.$Request.postJson("/app/artificer/insertOrders", data).then(res => {
that.showorder = false
if (res.code == 0) {
that.ordersId = res.data.ordersId;
that.tpayMoney = res.data.payMoney;
// that.showpay = true;
that.paySel = 1;
uni.navigateTo({
url:'/my/order/payding?ordersId='+ res.data.ordersId
})
} else {
that.$queue.showToast(res.msg)
}
});
},
changeValue(value){ changeValue(value){
this.number=value this.number=value
}, },
@ -418,7 +453,7 @@
}, },
youhuijuan(){ youhuijuan(){
uni.navigateTo({ uni.navigateTo({
url:'/my/hongbao/youhuijuanList?price='+this.orderXm.price+'&text='+'支付' url:'/my/hongbao/youhuijuanList?price='+this.orderXm.price+'&text='+'技师支付'
}) })
}, },
openpay() {// openpay() {//
@ -559,7 +594,7 @@
}); });
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '../address/address?id=' + 2 url: '../address/address?id=' + 6
}) })
} }
@ -644,42 +679,7 @@
} }
}); });
}, },
goOrder() {//orderId
let that = this
let data = {
address:that.province+that.city+that.district+that.detailaddress,
artificerId:that.jishiName.artificerId,
userPackageDetailId:that.userPackageDetailId,
phone:that.mobile,
userName:that.name,
tripWay:that.jishiName.tripWay,
city:that.city,
couponId: that.couponId,
userId: uni.getStorageSync('userId'),
longitude:that.longitude,
latitude:that.latitude,
serveTime:that.startTime,
remark:that.textareaData,
ordersMassageList:[
{massageId: that.userPackageDetailId? that.userPackageDetailId:that.ordersId,num: that.number},
]
}
that.$Request.postJson("/app/artificer/insertOrders", data).then(res => {
that.showorder = false
if (res.code == 0) {
that.ordersId = res.data.ordersId;
that.tpayMoney = res.data.payMoney;
// that.showpay = true;
that.paySel = 1;
uni.navigateTo({
url:'/my/order/payding?ordersId='+ res.data.ordersId
})
} else {
that.$queue.showToast(res.msg)
}
});
},
payJZ() { payJZ() {
let that = this; let that = this;
if (that.openWay == 1) { // if (that.openWay == 1) { //

View File

@ -162,7 +162,7 @@
<view class="flex align-center margin-top-lg" style="justify-content: flex-end;border-bottom:1px solid #ccc;padding-bottom:5px ;margin: 5px 0px;"> <view class="flex align-center margin-top-lg" style="justify-content: flex-end;border-bottom:1px solid #ccc;padding-bottom:5px ;margin: 5px 0px;">
<view style="color: #333;font-size: 26rpx;">小计</view> <view style="color: #333;font-size: 26rpx;">小计</view>
<view class="" style="color: #333;"><text <view class="" style="color: #333;"><text
style="font-size: 35rpx;font-weight: bold;">{{order.massageMoney}}</text></view> style="font-size: 35rpx;font-weight: bold;">{{order.massagePrice}}</text></view>
</view> </view>
<view style="font-size: 14px;font-weight: bold;margin-bottom: 10px;">出行费用</view> <view style="font-size: 14px;font-weight: bold;margin-bottom: 10px;">出行费用</view>
@ -233,7 +233,7 @@
<view class="flex align-center margin-top-lg justify-between"> <view class="flex align-center margin-top-lg justify-between">
<view style="color: #333;font-size: 26rpx;">订单费用</view> <view style="color: #333;font-size: 26rpx;">订单费用</view>
<view class="" style="color: #333;"><text <view class="" style="color: #333;"><text
style="font-size: 26rpx;font-weight: bold;">{{order.massageMoney}}</text></view> style="font-size: 26rpx;font-weight: bold;">{{order.massagePrice}}</text></view>
</view> </view>
<view class="flex align-center margin-top-lg justify-between" v-if="order.taxiMoney"> <view class="flex align-center margin-top-lg justify-between" v-if="order.taxiMoney">
<view style="color: #333;font-size: 26rpx;">出行费用</view> <view style="color: #333;font-size: 26rpx;">出行费用</view>
@ -873,6 +873,9 @@
title: '支付成功', title: '支付成功',
icon: 'none' icon: 'none'
}) })
uni.switchTab({
url:'/pages/order/index'
})
that.getOrder() that.getOrder()
} else { } else {
@ -913,9 +916,9 @@
that.getOrder() that.getOrder()
// this.$queue.showToast(''); // this.$queue.showToast('');
// uni.switchTab({ uni.switchTab({
// url: '/pages/my/index' url: '/pages/my/index'
// }) })
}, },
fail: function(err) { fail: function(err) {
// this.$queue.showToast(''); // this.$queue.showToast('');
@ -940,6 +943,9 @@
that.$Request.post('/app/wxPay/payOrder', data).then(rea => { that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
that.showpay = false that.showpay = false
if (rea.code == 0) { if (rea.code == 0) {
uni.switchTab({
url:'/pages/order/index'
})
that.callPay(rea.data); that.callPay(rea.data);
} else { } else {
uni.showToast({ uni.showToast({
@ -960,7 +966,10 @@
const hostUrl = urlArr.split("/"); const hostUrl = urlArr.split("/");
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/"; const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
const url = '&redirect_url=' + callBack + 'my/order/pay'; const url = '&redirect_url=' + callBack + 'my/order/pay';
window.location = rea.data.mweb_url + url window.location = rea.data.mweb_url + url;
uni.switchTab({
url:'/pages/order/index'
})
} else { } else {
uni.showToast({ uni.showToast({
title: rea.msg, title: rea.msg,
@ -981,6 +990,9 @@
console.log(rea) console.log(rea)
that.showpay = false that.showpay = false
if (rea.code == 0) { if (rea.code == 0) {
uni.switchTab({
url:'/pages/order/index'
})
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data)); that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
} }
}); });
@ -998,6 +1010,9 @@
div.innerHTML = rea.data //form div.innerHTML = rea.data //form
document.body.appendChild(div) document.body.appendChild(div)
document.forms[0].submit() document.forms[0].submit()
uni.switchTab({
url:'/pages/order/index'
})
}); });
// #endif // #endif
@ -1009,6 +1024,9 @@
that.$Request.post('/app/aliPay/payOrder', data).then( that.$Request.post('/app/aliPay/payOrder', data).then(
rea => { rea => {
that.showpay = false that.showpay = false
uni.switchTab({
url:'/pages/order/index'
})
that.setPayment('alipay', rea.data); that.setPayment('alipay', rea.data);
}); });
// #endif // #endif
@ -1155,6 +1173,9 @@
uni.showToast({ uni.showToast({
title: '支付成功' title: '支付成功'
}) })
uni.switchTab({
url:'/pages/order/index'
})
that.getOrder() that.getOrder()
} else { } else {
uni.showToast({ uni.showToast({
@ -1197,9 +1218,9 @@
that.getOrder() that.getOrder()
// this.$queue.showToast(''); // this.$queue.showToast('');
// uni.switchTab({ uni.switchTab({
// url: '/pages/my/index' url:'/pages/order/index'
// }) })
}, },
fail: function(err) { fail: function(err) {
// this.$queue.showToast(''); // this.$queue.showToast('');
@ -1225,6 +1246,9 @@
that.showpay = false that.showpay = false
if (rea.code == 0) { if (rea.code == 0) {
that.callPay(rea.data); that.callPay(rea.data);
uni.switchTab({
url:'/pages/order/index'
})
} else { } else {
uni.showToast({ uni.showToast({
title: rea.msg, title: rea.msg,
@ -1251,6 +1275,9 @@
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/"; const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
const url = '&redirect_url=' + callBack + 'my/order/pay'; const url = '&redirect_url=' + callBack + 'my/order/pay';
window.location = rea.data.mweb_url + url window.location = rea.data.mweb_url + url
uni.switchTab({
url:'/pages/order/index'
})
} else { } else {
uni.showToast({ uni.showToast({
title: rea.msg, title: rea.msg,
@ -1271,7 +1298,11 @@
console.log(rea) console.log(rea)
that.showpay = false that.showpay = false
if (rea.code == 0) { if (rea.code == 0) {
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data)); that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
uni.switchTab({
url:'/pages/order/index'
})
} }
}); });
// #endif // #endif
@ -1288,6 +1319,9 @@
div.innerHTML = rea.data //form div.innerHTML = rea.data //form
document.body.appendChild(div) document.body.appendChild(div)
document.forms[0].submit() document.forms[0].submit()
uni.switchTab({
url:'/pages/order/index'
})
}); });
// #endif // #endif
@ -1299,6 +1333,9 @@
that.$Request.post('/app/aliPay/payOrder', data).then( that.$Request.post('/app/aliPay/payOrder', data).then(
rea => { rea => {
that.setPayment('alipay', rea.data); that.setPayment('alipay', rea.data);
uni.switchTab({
url:'/pages/order/index'
})
}); });
// #endif // #endif
} }
@ -1400,6 +1437,9 @@
uni.hideLoading(); uni.hideLoading();
if (res.code == 0) { if (res.code == 0) {
that.getOrder() that.getOrder()
uni.switchTab({
url:'/pages/order/index'
})
} else { } else {
that.$queue.showToast(res.msg); that.$queue.showToast(res.msg);
} }
@ -1425,7 +1465,9 @@
that.$Request.post('/app/artificer/accomplishOrders', data).then(res => { that.$Request.post('/app/artificer/accomplishOrders', data).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.code == 0) { if (res.code == 0) {
uni.navigateBack() uni.switchTab({
url:'/pages/order/index'
})
} else { } else {
that.$queue.showToast(res.msg); that.$queue.showToast(res.msg);
} }

View File

@ -794,7 +794,9 @@
icon: 'none' icon: 'none'
}) })
that.getOrder() that.getOrder()
uni.switchTab({
url:'/pages/order/index'
})
} else { } else {
uni.showToast({ uni.showToast({
title: ret.msg, title: ret.msg,
@ -834,9 +836,9 @@
that.getOrder() that.getOrder()
// this.$queue.showToast(''); // this.$queue.showToast('');
// uni.switchTab({ uni.switchTab({
// url: '/pages/my/index' url:'/pages/order/index'
// }) })
}, },
fail: function(err) { fail: function(err) {
// this.$queue.showToast(''); // this.$queue.showToast('');
@ -863,6 +865,9 @@
that.showpay = false that.showpay = false
if (rea.code == 0) { if (rea.code == 0) {
that.callPay(rea.data); that.callPay(rea.data);
uni.switchTab({
url:'/pages/order/index'
})
} else { } else {
uni.showToast({ uni.showToast({
title: rea.msg, title: rea.msg,
@ -884,6 +889,9 @@
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/"; const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
const url = '&redirect_url=' + callBack + 'my/order/pay'; const url = '&redirect_url=' + callBack + 'my/order/pay';
window.location = rea.data.mweb_url + url window.location = rea.data.mweb_url + url
uni.switchTab({
url:'/pages/order/index'
})
} else { } else {
uni.showToast({ uni.showToast({
title: rea.msg, title: rea.msg,
@ -906,6 +914,9 @@
that.showpay = false that.showpay = false
if (rea.code == 0) { if (rea.code == 0) {
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data)); that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
uni.switchTab({
url:'/pages/order/index'
})
} }
}); });
// #endif // #endif
@ -923,6 +934,9 @@
div.innerHTML = rea.data //form div.innerHTML = rea.data //form
document.body.appendChild(div) document.body.appendChild(div)
document.forms[0].submit() document.forms[0].submit()
uni.switchTab({
url:'/pages/order/index'
})
}); });
// #endif // #endif
@ -936,6 +950,9 @@
rea => { rea => {
that.showpay = false that.showpay = false
that.setPayment('alipay', rea.data); that.setPayment('alipay', rea.data);
uni.switchTab({
url:'/pages/order/index'
})
}); });
// #endif // #endif
} }
@ -967,6 +984,9 @@
title: '支付成功' title: '支付成功'
}) })
that.getOrder() that.getOrder()
uni.switchTab({
url:'/pages/order/index'
})
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
@ -1008,10 +1028,9 @@
}) })
that.getOrder() that.getOrder()
// this.$queue.showToast(''); // this.$queue.showToast('');
uni.switchTab({
// uni.switchTab({ url:'/pages/order/index'
// url: '/pages/my/index' })
// })
}, },
fail: function(err) { fail: function(err) {
// this.$queue.showToast(''); // this.$queue.showToast('');
@ -1038,6 +1057,9 @@
that.showpay = false that.showpay = false
if (rea.code == 0) { if (rea.code == 0) {
that.callPay(rea.data); that.callPay(rea.data);
uni.switchTab({
url:'/pages/order/index'
})
} else { } else {
uni.showToast({ uni.showToast({
title: rea.msg, title: rea.msg,
@ -1065,6 +1087,9 @@
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/"; const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
const url = '&redirect_url=' + callBack + 'my/order/pay'; const url = '&redirect_url=' + callBack + 'my/order/pay';
window.location = rea.data.mweb_url + url window.location = rea.data.mweb_url + url
uni.switchTab({
url:'/pages/order/index'
})
} else { } else {
uni.showToast({ uni.showToast({
title: rea.msg, title: rea.msg,
@ -1087,6 +1112,9 @@
that.showpay = false that.showpay = false
if (rea.code == 0) { if (rea.code == 0) {
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data)); that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
uni.switchTab({
url:'/pages/order/index'
})
} }
}); });
// #endif // #endif
@ -1104,6 +1132,9 @@
div.innerHTML = rea.data //form div.innerHTML = rea.data //form
document.body.appendChild(div) document.body.appendChild(div)
document.forms[0].submit() document.forms[0].submit()
uni.switchTab({
url:'/pages/order/index'
})
}); });
// #endif // #endif
@ -1116,6 +1147,9 @@
that.$Request.post('/app/aliPay/payOrder', data).then( that.$Request.post('/app/aliPay/payOrder', data).then(
rea => { rea => {
that.setPayment('alipay', rea.data); that.setPayment('alipay', rea.data);
uni.switchTab({
url:'/pages/order/index'
})
}); });
// #endif // #endif
} }
@ -1333,6 +1367,9 @@
uni.hideLoading(); uni.hideLoading();
if (res.code == 0) { if (res.code == 0) {
that.getOrder() that.getOrder()
uni.switchTab({
url:'/pages/order/index'
})
} else { } else {
that.$queue.showToast(res.msg); that.$queue.showToast(res.msg);
} }
@ -1358,7 +1395,9 @@
that.$Request.post('/app/artificer/accomplishOrders', data).then(res => { that.$Request.post('/app/artificer/accomplishOrders', data).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.code == 0) { if (res.code == 0) {
uni.navigateBack() uni.switchTab({
url:'/pages/order/index'
})
} else { } else {
that.$queue.showToast(res.msg); that.$queue.showToast(res.msg);
} }

View File

@ -162,14 +162,7 @@
this.getMemberList() this.getMemberList()
this.getMoney() this.getMoney()
this.getIsVip() this.getIsVip()
this.vipData=this.$queue.getData('isVIP')
console.log("isVIP------------------->",this.vipData)
if(this.vipData=='1'){
this.vipShow=true;
}else{
this.vipData=[]
this.vipShow=false
}
}, },
methods: { methods: {
select(e) { select(e) {
@ -185,7 +178,16 @@
getvipEndTime() { getvipEndTime() {
this.$Request.get("/app/UserVip/selectUserVip").then(res => { this.$Request.get("/app/UserVip/selectUserVip").then(res => {
if (res.code == 0) { if (res.code == 0) {
var data= res.data.endTime||{} var data= res.data.endTime||{};
this.$queue.setData('isVIP',res.data.isVip)
this.vipData=res.data.isVip
console.log("isVIP------------------->",this.vipData)
if(this.vipData=='1'){
this.vipShow=true;
}else{
this.vipData=[]
this.vipShow=false
}
this.timeVipEnd = data.slice(0,16); this.timeVipEnd = data.slice(0,16);
this.getVipList(res.data.vipNameType) this.getVipList(res.data.vipNameType)
} }

View File

@ -912,7 +912,7 @@
this.$Request.get("/app/massage/package/findPage", { this.$Request.get("/app/massage/package/findPage", {
type:'104', type:'104',
page:'1', page:'1',
limit:'2' limit:'4'
}).then(res => { }).then(res => {
if (res.code == 0) { if (res.code == 0) {
if (res.data) { if (res.data) {
@ -926,7 +926,7 @@
by: '3', by: '3',
status:'1', status:'1',
page:'1', page:'1',
limit:'2' limit:'4'
}).then(res => { }).then(res => {
if (res.code == 0) { if (res.code == 0) {
if (res.data) { if (res.data) {
@ -1255,6 +1255,7 @@
width: 336.81rpx; width: 336.81rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin-top: 7px;
} }
.tuijian-view{ .tuijian-view{
width: 100%; width: 100%;
@ -1269,6 +1270,7 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap;
align-items: center; align-items: center;
margin-top: 15px; margin-top: 15px;
} }

View File

@ -1,7 +1,7 @@
<template> <template>
<view class="content"> <view class="content">
<view class="header"> <view class="header">
<view class="header-top" :style="backgroundStyle"> <view class="header-top" :style="backgroundStyle" @click="goNav('/my/vip/index')">
<image src="../../static/servicePackage/member_ba.png" mode="widthFix" v-if="!isVIP"></image> <image src="../../static/servicePackage/member_ba.png" mode="widthFix" v-if="!isVIP"></image>
<image src="../../static/activate2.png" mode="widthFix" v-if="isVIP"></image> <image src="../../static/activate2.png" mode="widthFix" v-if="isVIP"></image>
</view> </view>
@ -84,10 +84,10 @@
</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 class="detail-foot-mian-txet"> <view class="lab-view">
<span>SCIENTIFIC WAIST</span> <view class="detail-foot-mian-txet" v-for="item in labels" :key="item">
<span>科学护腰不上脊椎</span> <span class="detail-foot-mian-txetList">{{item}}</span>
<span>让您的腰不在盲目呵护!避免二次伤害!</span> </view>
</view> </view>
</view> </view>
</view> </view>
@ -106,7 +106,8 @@
// URLAPI // URLAPI
backgroundImageUrl: '', backgroundImageUrl: '',
myId:'', myId:'',
contentImg:[] contentImg:[],
labels:[]
} }
}, },
computed: { computed: {
@ -125,6 +126,11 @@
that.getData() that.getData()
}, },
methods:{ methods:{
goNav(e) {
uni.navigateTo({
url: e
})
},
goumai(item){// goumai(item){//
this.$queue.setData('getJishi','') this.$queue.setData('getJishi','')
this.$queue.setData('userPackageDetailId',''); this.$queue.setData('userPackageDetailId','');
@ -150,6 +156,7 @@
that.getList=res.data; that.getList=res.data;
that.contentImg=res.data.contentImg.split(","); that.contentImg=res.data.contentImg.split(",");
that.backgroundImageUrl=that.getList.massageImg; that.backgroundImageUrl=that.getList.massageImg;
that.labels=that.getList.labels.split(',');
} }
}) })
}, },
@ -157,6 +164,18 @@
} }
</script> </script>
<style scoped> <style scoped>
.lab-view{
width:100%;
display: flex;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
}
.detail-foot-mian-txet{
width: 50%;
margin-top: 20px;
text-align: center;
}
.header-fubz{ .header-fubz{
font-size: 26rpx; font-size: 26rpx;
color: #029c88; color: #029c88;

View File

@ -39,7 +39,7 @@
<view class="item-view-bottom-qian"> <view class="item-view-bottom-qian">
<span></span> <span></span>
<span>{{item.price}}</span> <span>{{item.price}}</span>
<span>/</span> <span>/</span>
<span></span> <span></span>
<span style="text-decoration: line-through;">{{item.oldPrice}}</span> <span style="text-decoration: line-through;">{{item.oldPrice}}</span>
</view> </view>

View File

@ -36,16 +36,16 @@
<view class=" u-flex u-p-t-30"> <view class=" u-flex u-p-t-30">
<view class="u-m-r-10"> <view class="u-m-r-10">
<u-avatar <u-avatar
:src="(item.ordersMassageList && item.ordersMassageList.length > 0 && item.ordersMassageList[0].massageType && item.ordersMassageList[0].massageType.massageImg)?item.ordersMassageList[0].massageType.massageImg: '../../static/logo.png'" :src="item.ordersMassageList[0].massageType?item.ordersMassageList[0].massageType.massageImg: item.ordersMassageList[0].userPackageDetail.massageImg"
mode="square" size="100" style="height: 155rpx;width: 155rpx;flex: 0 0 155rpx;"> mode="square" size="100" style="height: 155rpx;width: 155rpx;flex: 0 0 155rpx;">
</u-avatar> </u-avatar>
</view> </view>
<view class="u-flex-1" style="margin-left: 20rpx;"> <view class="u-flex-1" style="margin-left: 20rpx;">
<view class="text-bold u-line-1" style="width: 560rpx;"> <view class="text-bold u-line-1" style="width: 560rpx;">
<view class=" text-lg " <view class=" text-lg "
v-if="item.ordersMassageList && item.ordersMassageList.length > 0 && item.ordersMassageList[0].massageType && item.ordersMassageList[0].massageType.title"
style="font-size: 32rpx;margin-top: 0rpx;display: inline-block;width: 470rpx; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;"> style="font-size: 32rpx;margin-top: 0rpx;display: inline-block;width: 470rpx; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
{{item.ordersMassageList[0].massageType.title}} {{item.ordersMassageList[0].massageType?item.ordersMassageList[0].massageType.title:item.ordersMassageList[0].userPackageDetail.title}}
</view> </view>
</view> </view>
<view class="u-font-12 u-tips-color flex justify-between" style="margin-top: 6rpx;"> <view class="u-font-12 u-tips-color flex justify-between" style="margin-top: 6rpx;">
@ -102,7 +102,7 @@
</u-button> </u-button>
<view class="showBtn-view" v-if="gengBtnShow==true" :style="gengNum==index?{display:'inline-block'}:{display:'none'}"> <view class="showBtn-view" v-if="gengBtnShow==true" :style="gengNum==index?{display:'inline-block'}:{display:'none'}">
<u-button v-if="item.status == 1" :custom-style="customStyle1" shape="circle" :plain="true" <u-button v-if="item.status == 1" :custom-style="customStyle1" shape="circle" :plain="true"
@click="goNav('/my/order/payModifyDd?ordersId='+item.ordersId,item)" class="btns"> @click="goNav('/my/order/payding?ordersId='+item.ordersId,item)" class="btns">
去支付 去支付
</u-button> </u-button>
<u-button v-if="item.oldOrdersId==null && item.status == 6&&item.addNum==null" :custom-style="customStyle1" class="btns" shape="circle" :plain="true" <u-button v-if="item.oldOrdersId==null && item.status == 6&&item.addNum==null" :custom-style="customStyle1" class="btns" shape="circle" :plain="true"
@ -328,8 +328,6 @@
// uni.navigateTo({ // uni.navigateTo({
// url:url // url:url
// }) // })
// }else{
// } // }
if(item.oldOrdersId){// if(item.oldOrdersId){//
uni.navigateTo({ uni.navigateTo({
@ -347,6 +345,10 @@
uni.navigateTo({ uni.navigateTo({
url:'/my/order/payModifyDzhifu?ordersId='+item.ordersId url:'/my/order/payModifyDzhifu?ordersId='+item.ordersId
}) })
}else if(item.packageType=='104'||item.packageType=='105'||item.packageType=='106'){
uni.navigateTo({
url:'/my/order/paydingTCX?ordersId='+item.ordersId
})
}else{ }else{
uni.navigateTo({ uni.navigateTo({
url:url url:url