订单 优惠卷

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({
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>
</view>
<view v-if="tabIndex == 0">
<view class="youhui-weiyong 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>
<t-refresh ref="refresh" v-if="hongbao.length>0" @refresh="refresh" @loadMore="loadMore" :loadingType="loadingType" :tPadding="0">
<template slot="content">
<checkbox-group @change="checkboxChange">
<view v-if="tabIndex == 0">
<view class="youhui-weiyong 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">
<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 class="youhui-view-left-bottom">
{{item.minMoney}}元可用
<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>
<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 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>
<view class="youhui-view-right-btn" @tap="shiYong()">立即使用</view>
</view>
</view>
</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>
</checkbox-group>
</template>
</t-refresh>
<empty v-if="hongbao.length==0"></empty>
</view>
</template>
<script>
import tRefresh from "@/components/t-refresh/t-refresh.vue"
import empty from '@/components/empty.vue'
export default {
components:{
empty
empty,
tRefresh
},
data() {
return {
@ -107,6 +115,19 @@
this.getMyList();
},
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(){
uni.switchTab({
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 => {
if (res.code == 0) {
if (this.page == 1) {
this.hongbao = [];
}
res.data.list.forEach(d => {
this.hongbao.push(d);
});
if (res.data.list.length === this.size) {
this.loadingType = 0;
} else {
this.loadingType = 3;
}
if (this.page == 1) this.hongbao = []; //
this.hongbao = [...this.hongbao, ...res.data.list]; //
// if (this.page == 1) {
// this.hongbao = [];
// }
// res.data.list.forEach(d => {
// this.hongbao.push(d);
// });
// if (res.data.list.length === this.size) {
// this.loadingType = 0;
// } else {
// this.loadingType = 3;
// }
} else {
this.loadingType = 2;
}

View File

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

View File

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

View File

@ -68,7 +68,7 @@
</view>
</view>
<view class="ske-padding margin-top-sm header-view">
<view class="fuwu-time" @click="liliaoshi">
<view class="fuwu-time">
<view class="fuwu-title" >
<span>技师</span>
<span v-if="jishiName">{{jishiName.technicianTypeName}}</span>
@ -76,7 +76,6 @@
<view class="liliao-bottom" style="margin-right: 6px;">
<span v-if="jishiName">{{jishiName.artificerName}}</span>
<span v-else>选择不同技师价格可能不一样哦~</span>
<span class="view-more"></span>
</view>
</view>
<view class="liliao" @click="youhuijuan">
@ -313,7 +312,7 @@
let fullDate = `${month}-${days}`
let Time = year + '-' + fullDate
this.yearsDate = Time;
this.orderXm=this.$queue.getData('mainData');
this.jishiName=this.$queue.getData('getJishi');
if(this.jishiName){
this.getMsTime(Time);
@ -369,6 +368,42 @@
// #endif
},
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){
this.number=value
},
@ -418,7 +453,7 @@
},
youhuijuan(){
uni.navigateTo({
url:'/my/hongbao/youhuijuanList?price='+this.orderXm.price+'&text='+'支付'
url:'/my/hongbao/youhuijuanList?price='+this.orderXm.price+'&text='+'技师支付'
})
},
openpay() {//
@ -559,7 +594,7 @@
});
} else {
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() {
let that = this;
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 style="color: #333;font-size: 26rpx;">小计</view>
<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 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 style="color: #333;font-size: 26rpx;">订单费用</view>
<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 class="flex align-center margin-top-lg justify-between" v-if="order.taxiMoney">
<view style="color: #333;font-size: 26rpx;">出行费用</view>
@ -873,6 +873,9 @@
title: '支付成功',
icon: 'none'
})
uni.switchTab({
url:'/pages/order/index'
})
that.getOrder()
} else {
@ -913,9 +916,9 @@
that.getOrder()
// this.$queue.showToast('');
// uni.switchTab({
// url: '/pages/my/index'
// })
uni.switchTab({
url: '/pages/my/index'
})
},
fail: function(err) {
// this.$queue.showToast('');
@ -940,6 +943,9 @@
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
that.showpay = false
if (rea.code == 0) {
uni.switchTab({
url:'/pages/order/index'
})
that.callPay(rea.data);
} else {
uni.showToast({
@ -960,7 +966,10 @@
const hostUrl = urlArr.split("/");
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
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 {
uni.showToast({
title: rea.msg,
@ -981,6 +990,9 @@
console.log(rea)
that.showpay = false
if (rea.code == 0) {
uni.switchTab({
url:'/pages/order/index'
})
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
}
});
@ -998,6 +1010,9 @@
div.innerHTML = rea.data //form
document.body.appendChild(div)
document.forms[0].submit()
uni.switchTab({
url:'/pages/order/index'
})
});
// #endif
@ -1009,6 +1024,9 @@
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
that.showpay = false
uni.switchTab({
url:'/pages/order/index'
})
that.setPayment('alipay', rea.data);
});
// #endif
@ -1155,6 +1173,9 @@
uni.showToast({
title: '支付成功'
})
uni.switchTab({
url:'/pages/order/index'
})
that.getOrder()
} else {
uni.showToast({
@ -1197,9 +1218,9 @@
that.getOrder()
// this.$queue.showToast('');
// uni.switchTab({
// url: '/pages/my/index'
// })
uni.switchTab({
url:'/pages/order/index'
})
},
fail: function(err) {
// this.$queue.showToast('');
@ -1225,6 +1246,9 @@
that.showpay = false
if (rea.code == 0) {
that.callPay(rea.data);
uni.switchTab({
url:'/pages/order/index'
})
} else {
uni.showToast({
title: rea.msg,
@ -1251,6 +1275,9 @@
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
const url = '&redirect_url=' + callBack + 'my/order/pay';
window.location = rea.data.mweb_url + url
uni.switchTab({
url:'/pages/order/index'
})
} else {
uni.showToast({
title: rea.msg,
@ -1271,7 +1298,11 @@
console.log(rea)
that.showpay = false
if (rea.code == 0) {
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
uni.switchTab({
url:'/pages/order/index'
})
}
});
// #endif
@ -1288,6 +1319,9 @@
div.innerHTML = rea.data //form
document.body.appendChild(div)
document.forms[0].submit()
uni.switchTab({
url:'/pages/order/index'
})
});
// #endif
@ -1299,6 +1333,9 @@
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
that.setPayment('alipay', rea.data);
uni.switchTab({
url:'/pages/order/index'
})
});
// #endif
}
@ -1400,6 +1437,9 @@
uni.hideLoading();
if (res.code == 0) {
that.getOrder()
uni.switchTab({
url:'/pages/order/index'
})
} else {
that.$queue.showToast(res.msg);
}
@ -1425,7 +1465,9 @@
that.$Request.post('/app/artificer/accomplishOrders', data).then(res => {
uni.hideLoading();
if (res.code == 0) {
uni.navigateBack()
uni.switchTab({
url:'/pages/order/index'
})
} else {
that.$queue.showToast(res.msg);
}

View File

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

View File

@ -162,14 +162,7 @@
this.getMemberList()
this.getMoney()
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: {
select(e) {
@ -185,7 +178,16 @@
getvipEndTime() {
this.$Request.get("/app/UserVip/selectUserVip").then(res => {
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.getVipList(res.data.vipNameType)
}

View File

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

View File

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

View File

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

View File

@ -36,16 +36,16 @@
<view class=" u-flex u-p-t-30">
<view class="u-m-r-10">
<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;">
</u-avatar>
</view>
<view class="u-flex-1" style="margin-left: 20rpx;">
<view class="text-bold u-line-1" style="width: 560rpx;">
<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;">
{{item.ordersMassageList[0].massageType.title}}
{{item.ordersMassageList[0].massageType?item.ordersMassageList[0].massageType.title:item.ordersMassageList[0].userPackageDetail.title}}
</view>
</view>
<view class="u-font-12 u-tips-color flex justify-between" style="margin-top: 6rpx;">
@ -102,7 +102,7 @@
</u-button>
<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"
@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 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({
// url:url
// })
// }else{
// }
if(item.oldOrdersId){//
uni.navigateTo({
@ -347,6 +345,10 @@
uni.navigateTo({
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{
uni.navigateTo({
url:url