立即支付

This commit is contained in:
Mr.jiang 2024-07-13 10:04:42 +08:00
parent 9f9efbbeb9
commit 5e35f9a20e
22 changed files with 765 additions and 90 deletions

View File

@ -114,9 +114,9 @@
uni.reLaunch({
url:'/my/order/payModifyJsDetail'
})
}else if (this.isfa == 7) {//
}else if (this.isfa == 5) {//
uni.reLaunch({
url:'/my/order/payModifyTcMyDaiB'
url:'/my/order/payModifyDd'
})
}

View File

@ -362,15 +362,15 @@
<u-button @click="cancelOrder(order)" shape="circle" :custom-style="customStyle" :hair-line="false">
取消订单
</u-button>
<u-button
<!-- <u-button
v-if="order.btnShow == 'true'"
:custom-style="customStyle2"
shape="circle" :plain="true"
@click="goNav('/my/order/payModifyDzhifu?ordersId='+ordersId,order,'修改')"
class="dingshi">
修改订单
</u-button>
<u-button @click="openpay(order)" shape="circle" :custom-style="customStyle2" :hair-line="false"
</u-button> -->
<u-button @click="zhifu(order)" shape="circle" :custom-style="customStyle2" :hair-line="false"
class="dingshi">立即支付
</u-button>
<u-button :custom-style="customStyle2" shape="circle" :plain="true" @click="goChat"
@ -454,7 +454,7 @@
</u-button>
<u-button
shape="circle" :plain="true"
@click="goNav('/my/wallet/index?artificerId='+order.artificerId)"
@click="goNav('/my/wallet/index?artificerId='+order.artificerId+'&ordersId='+order.ordersId,)"
class="btns">
充值
</u-button>
@ -521,7 +521,7 @@
<u-button :custom-style="customStyle2"
v-if="order.packageType=='104'||order.packageType=='105'||order.packageType=='106'"
shape="circle" :plain="true"
@click="taocanDaiBd('/my/order/payModifyTcMyDaiB?ordersId='+order.ordersId,order)"
@click="goNav('/my/order/payModifyDd?ordersId='+order.ordersId,order)"
class="dingshi">
立即预约
</u-button>
@ -630,6 +630,31 @@
<view class="pay_btn" @click="pay()">确认支付</view>
</view>
</u-popup>
<!-- 立即支付支付方式 -->
<u-popup v-model="showpayL" mode="bottom" :closeable="closeable">
<view class="popup_pay">
<view style="background-color: #fff;">
<view style="padding: 20upx;margin-top: 60rpx;margin-bottom: 20rpx;">
<view
style="display: flex;height: 100upx;align-items: center;padding: 20upx 0;justify-content: center;"
v-for="(item,index) in openLists" :key='index'>
<image :src="item.image" style="width: 55upx;height: 55upx;border-radius: 50upx;">
</image>
<view style="font-size: 30upx;margin-left: 20upx;width: 70%;">
{{item.text}}
</view>
<radio-group name="openWay" style="margin-left: 45upx;" @tap='selectWay(item)'>
<label class="tui-radio">
<radio color="#019c88" :checked="openWay === item.id ? true : false" />
</label>
</radio-group>
</view>
</view>
</view>
<view class="pay_btn" @click="payLj()" v-if="order.userPackageDetailId==null">确认支付</view>
<view class="pay_btn" @click="payTc()" v-else>确认支付</view>
</view>
</u-popup>
<!-- 提前结束 -->
<view>
<!-- 提前结束 -->
@ -690,6 +715,7 @@
export default {
data() {
return {
showpayL:false,
ordersId: '',
tpayMoney: '',
paySel: 0,
@ -803,7 +829,208 @@
this.openWay = 2;
// #endif
},
mounted() {
},
methods: {
zhifu(){//
this.showpayL=true
},
//
//
payTc() {
let that = this
that.showpayL = false
if (that.openWay == 1) { //
uni.showModal({
title: '付款提示',
content: '确认支付' + that.order.taxiMoney + '元吗?',
success: function(re) {
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
that.$Request.post("/app/artificer/payOrders", {
ordersId: that.order.ordersId,
userPackageDetailId : that.order.userPackageDetailId
}).then(res => {
uni.hideLoading();
if (res.code == 0) {
uni.showToast({
title: '支付成功'
})
that.getOrder()
that.showpayL = false
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
});
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
} else if (that.openWay == 2) { //
that.$queue.showLoading('支付中...')
// #ifdef MP-WEIXIN
let data = {
ordersId: that.order.ordersId,
type: 3,
userPackageDetailId : that.order.userPackageDetailId
}
that.$Request.post('/app/wxPay/payOrder', data).then(ret => {
console.log(ret)
if (ret.code == 0) {
uni.hideLoading();
uni.requestPayment({
provider: 'wxpay',
timeStamp: ret.data.timestamp,
nonceStr: ret.data.noncestr,
package: ret.data.package,
signType: ret.data.signType,
paySign: ret.data.sign,
success: function(ret) {
console.log(ret)
uni.showToast({
title: '支付成功',
icon: 'none'
})
that.getOrder()
// this.$queue.showToast('');
that.showpayL = false
},
fail: function(err) {
uni.hideLoading();
// this.$queue.showToast('');
uni.showToast({
title: '支付失败',
icon: 'nones'
});
that.getOrder()
}
});
}
});
// #endif
// #ifdef H5
let ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('micromessenger') != -1) {
let data = {
ordersId: that.order.ordersId,
type: 2,
userPackageDetailId : that.order.userPackageDetailId
}
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
if (rea.code == 0) {
uni.hideLoading();
that.callPay(rea.data);
that.getOrder()
that.showpayL = false
} else {
uni.hideLoading();
uni.showToast({
title: rea.msg,
icon: 'none'
})
}
});
} else {
let data = {
ordersId: that.order.ordersId,
type: 4,
userPackageDetailId : that.order.userPackageDetailId
}
// debugger;
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
// const urlArr = window.location.href;
// const hostUrl = urlArr.split("/");
// const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
// const url = '&redirect_url=' + callBack + 'my/order/pay';
// window.location = rea.mweb_url + url
that.showpay = false
if (rea.code == 0) {
uni.hideLoading();
const urlArr = window.location.href;
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
that.getOrder()
that.showpayL = false
} else {
uni.hideLoading();
uni.showToast({
title: rea.msg,
icon: 'none'
})
}
});
}
// #endif
// #ifdef APP
let data = {
ordersId: that.order.ordersId,
type: 1,
userPackageDetailId : that.order.userPackageDetailId
}
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
if (rea.code == 0) {
uni.hideLoading();
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
that.getOrder()
that.showpayL = false
}else{
uni.hideLoading();
}
});
// #endif
} else if (that.openWay == 3) { //
that.$queue.showLoading('支付中...')
// #ifdef H5
let data = {
ordersId: that.order.ordersId,
type: 2,
userPackageDetailId : that.order.userPackageDetailId
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
uni.hideLoading();
const div = document.createElement('div')
div.innerHTML = rea.data //form
document.body.appendChild(div)
document.forms[0].submit()
that.getOrder()
that.showpayL = false
});
// #endif
// #ifdef APP-PLUS
let data = {
ordersId: that.order.ordersId,
type: 1,
userPackageDetailId : that.order.userPackageDetailId
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
uni.hideLoading();
that.setPayment('alipay', rea.data);
that.getOrder()
that.showpayL = false
});
// #endif
}
},
taocanDaiBd(url,item){
this.$queue.setData('getJishi','');
this.$queue.setData('mainData',item);
@ -811,6 +1038,190 @@
url:url
})
},
//
payLj() {
let that = this
that.showpayL = false
if (that.openWay == 1) { //
uni.showModal({
title: '付款提示',
content: '确认支付' + that.order.payMoney + '元吗?',
success: function(re) {
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
that.$Request.post("/app/artificer/payOrders", {
ordersId: that.order.ordersId,
}).then(res => {
uni.hideLoading();
if (res.code == 0) {
uni.showToast({
title: '支付成功'
})
that.showpayL = false
that.getOrder()
// that.showorderS=false;
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
});
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
} else if (that.openWay == 2) { //
that.$queue.showLoading('支付中...')
// #ifdef MP-WEIXIN
let data = {
ordersId: that.order.ordersId,
type: 3
}
that.$Request.post('/app/wxPay/payOrder', data).then(ret => {
console.log(ret)
if (ret.code == 0) {
uni.hideLoading();
uni.requestPayment({
provider: 'wxpay',
timeStamp: ret.data.timestamp,
nonceStr: ret.data.noncestr,
package: ret.data.package,
signType: ret.data.signType,
paySign: ret.data.sign,
success: function(ret) {
console.log(ret)
uni.showToast({
title: '支付成功',
icon: 'none'
})
that.getOrder()
console.log(222)
that.showpayL = false
// this.$queue.showToast('');
// uni.switchTab({
// url: '/pages/my/index'
// })
},
fail: function(err) {
// this.$queue.showToast('');
uni.showToast({
title: '支付失败',
icon: 'nones'
});
that.getOrder()
}
});
}
});
// #endif
// #ifdef H5
let ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('micromessenger') != -1) {
let data = {
ordersId: that.order.ordersId,
type: 2
}
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
if (rea.code == 0) {
that.callPay(rea.data);
that.showpayL = false
that.getOrder()
} else {
uni.showToast({
title: rea.msg,
icon: 'none'
})
}
});
} else {
let data = {
ordersId: that.order.ordersId,
type: 4
}
// debugger;
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
// const urlArr = window.location.href;
// const hostUrl = urlArr.split("/");
// const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
// const url = '&redirect_url=' + callBack + 'my/order/pay';
// window.location = rea.mweb_url + url
that.showpay = false
if (rea.code == 0) {
const urlArr = window.location.href;
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
that.showpayL = false
that.getOrder()
} else {
uni.showToast({
title: rea.msg,
icon: 'none'
})
}
});
}
// #endif
// #ifdef APP
let data = {
ordersId: that.order.ordersId,
type: 1
}
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
console.log(rea)
if (rea.code == 0) {
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
that.showpayL = false
that.getOrder()
}
});
// #endif
} else if (that.openWay == 3) { //
that.$queue.showLoading('支付中...')
// #ifdef H5
let data = {
ordersId: that.order.ordersId,
type: 2
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
const div = document.createElement('div')
div.innerHTML = rea.data //form
document.body.appendChild(div)
document.forms[0].submit()
that.showpayL = false
that.getOrder()
});
// #endif
// #ifdef APP-PLUS
let data = {
ordersId: that.order.ordersId,
type: 1
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
that.setPayment('alipay', rea.data);
that.showpayL = false
that.getOrder()
});
// #endif
}
},
getOrder() {
let data = {
ordersId: this.ordersId
@ -1216,7 +1627,7 @@
earlyFinishReason: that.earlyFinishReason,
}
that.$Request.post('/app/artificer/accomplishOrders', data).then(res => {
if (res.code == 0) {
if (res.code == 0||res.code == 200) {
uni.showToast({
title:'操作完成!'
})
@ -1631,9 +2042,21 @@
});
},
openpay(item) {
uni.navigateTo({
url:'/my/order/payModifyDzhifu?ordersId='+item.ordersId
})
this.$queue.setData('xiangmu',item);
if(item.userPackageDetailId!=null){
uni.navigateTo({
url:'/my/order/payModifyTcMy?ordersId='+item.ordersId
})
}else if(item.userPackageDetailId!=null&&isSupplement=='1'){
uni.navigateTo({
url:'/my/order/payModifyDd?ordersId='+item.ordersId
})
}else{
uni.navigateTo({
url:'/my/order/payModify?ordersId='+item.ordersId
})
}
// this.showpay = true
},

View File

@ -416,8 +416,9 @@
this.isTrue = true
},
youhuijuan(){
var moeny=(this.orderXm.price*this.number).toFixed(2)
uni.navigateTo({
url:'/my/hongbao/youhuijuanList?price='+this.orderXm.price+'&text='+'支付'
url:'/my/hongbao/youhuijuanList?price='+moeny+'&text='+'支付'
})
},
openpay() {//

View File

@ -364,8 +364,9 @@
this.isTrue = true
},
youhuijuan(){
var moeny=(this.orderXm.price*this.number).toFixed(2)
uni.navigateTo({
url:'/my/hongbao/youhuijuanList?price='+this.orderXm.price+'&text='+'次卡'
url:'/my/hongbao/youhuijuanList?price='+moeny+'&text='+'次卡'
})
},
openpay() {//

View File

@ -21,7 +21,7 @@
<view style="width: 100%;">
<view class="flex justify-between margin-tb-sm" style="color: #999999;">
<view style="justify-content: space-between;">
{{orderXm.ordersMassageList[0].massageType.duration}}分钟
{{orderXm.duration}}分钟
</view>
</view>
@ -88,7 +88,7 @@
<span class="view-more" style="margin-right: 8px;"></span>
</view>
</view>
<view class="liliao">
<!-- <view class="liliao">
<view class="liliao-top" style="width: 30%;">
<span>平台优惠劵</span>
</view>
@ -96,10 +96,8 @@
<view class="" style="margin-right: 5px;">
<span>-{{orderXm.couponMoney}}</span>
</view>
<!-- <span v-else>选择优惠劵</span> -->
<!-- <image class="fuwu-img" src="../../static/images/my/jiantou.png" mode=""></image> -->
</view>
</view>
</view> -->
<view class="fuwu-time">
<view class="fuwu-title">
服务时间
@ -567,7 +565,7 @@
});
} else {
uni.navigateTo({
url: '../address/address?id=' + 2
url: '../address/address?id=' + 5
})
}
@ -658,7 +656,7 @@
address:that.province+that.city+that.district+that.detailaddress,
artificerId:that.jishiName.artificerId,
ordersMassageList:[
{massageId: that.orderXm.massageTypeId,num: that.orderXm.massageNum},
{massageId: that.orderXm.userPackageDetailId?that.orderXm.userPackageDetailId:that.orderXm.massageTypeId,num: that.orderXm.massageNum},
],
city:that.city,
tripWay:that.orderXm.tripWay,

View File

@ -364,8 +364,9 @@
this.isTrue = true
},
youhuijuan(){
var moeny=(this.orderXm.price*this.number).toFixed(2)
uni.navigateTo({
url:'/my/hongbao/youhuijuanList?price='+this.orderXm.price+'&text='+'疗程'
url:'/my/hongbao/youhuijuanList?price='+moeny+'&text='+'疗程'
})
},
openpay() {//

View File

@ -394,8 +394,9 @@
this.isTrue = true
},
youhuijuan(){
var moeny=(this.orderXm.price*this.number).toFixed(2)
uni.navigateTo({
url:'/my/hongbao/youhuijuanList?price='+this.orderXm.price+'&text='+'套餐'
url:'/my/hongbao/youhuijuanList?price='+moeny+'&text='+'套餐'
})
},
openpay() {//

View File

@ -4,13 +4,15 @@
<view style="color: red;font-size:26rpx">(订单已超时)</view>
</view>
<view class="padding-bottom u-skeleton">
<view class="bgImg u-skeleton-fillet" v-if="order.oldOrdersMassageList && order.oldOrdersMassageList.length > 0"
<view class="bgImg u-skeleton-fillet" v-if="order.ordersMassageList && order.ordersMassageList.length > 0"
style="padding: 0 29rpx;">
<view class="head-top">
<view class="pay-title">服务项目</view>
<view class="flex justify-around">
<view class="" style="width: 160upx;height: 160upx;">
<image :src="order.oldOrdersMassageList[0].massageType.massageImg"
<image v-if="order.userPackageDetailId==null" :src="order.ordersMassageList[0].massageType.massageImg"
style="width: 100%;height: 100%;border-radius: 19upx;"></image>
<image v-else :src="order.ordersMassageList[0].userPackageDetail.massageImg"
style="width: 100%;height: 100%;border-radius: 19upx;"></image>
</view>
<view class="u-flex-1 margin-left-sm">

View File

@ -21,6 +21,7 @@
{{order.entryName}}
</view>
<view class="zhuangtai">
<view v-if="order.status ==1">待支付</view>
<view v-if="order.status ==3">待评价</view>
<view v-if="order.status ==6">服务中</view>
</view>
@ -241,7 +242,7 @@
</view>
<view class="flex justify-between jusitify-line">
<view class="line-word">项目价格</view>
<view class="line-word-r">{{order.oldMassagePrice}}</view>
<view class="line-word-r">{{order.massagePrice}}</view>
</view>
<view class="flex justify-between jusitify-line" >
<view class="line-word">服务时长</view>
@ -249,7 +250,7 @@
</view>
<view class="flex justify-between jusitify-line">
<view class="line-word">升级差额</view>
<view class="line-word-r">{{(order.massagePrice-order.oldMassagePrice).toFixed(2)}}</view>
<view class="line-word-r">{{(order.massagePrice - order.oldMassagePrice).toFixed(2)}}</view>
</view>
<view class="flex justify-between jusitify-line">
<view class="line-word">会员折扣</view>
@ -470,7 +471,7 @@
</view>
<view class="flex justify-between jusitify-line">
<view class="line-word">项目价格</view>
<view class="line-word-r">{{order.oldMassagePrice}}</view>
<view class="line-word-r">{{order.massagePrice}}</view>
</view>
<view class="flex justify-between jusitify-line" >
<view class="line-word">服务时长</view>
@ -560,7 +561,7 @@
<u-button
shape="circle" :plain="true"
@click="goNav('/my/wallet/index?artificerId='+order.artificerId)"
@click="goNav('/my/wallet/index?artificerId='+order.artificerId+'&ordersId='+order.ordersId)"
class="btns">
充值
</u-button>
@ -599,6 +600,13 @@
class="dingshi">
去投诉
</u-button>
<u-button :custom-style="customStyle2"
v-if="order.status=='1'"
shape="circle" :plain="true"
@click="quzhifu(order)"
class="dingshi">
去支付
</u-button>
</view>
</view>
@ -675,8 +683,32 @@
</view>
</scroll-view>
</u-popup>
<!-- 支付方式 -->
<!-- 待支支付方式 -->
<u-popup v-model="showpay" mode="bottom" :closeable="closeable">
<view class="popup_pay">
<view style="background-color: #fff;">
<view style="padding: 0 20upx;margin-top: 60rpx;margin-bottom: 20rpx;">
<view
style="display: flex;height: 100upx;align-items: center;padding: 20upx 0;justify-content: center;"
v-for="(item,index) in openLists" :key='index'>
<image :src="item.image" style="width: 55upx;height: 55upx;border-radius: 50upx;">
</image>
<view style="font-size: 30upx;margin-left: 20upx;width: 70%;">
{{item.text}}
</view>
<radio-group name="openWay" style="margin-left: 45upx;" @tap='selectWay(item)'>
<label class="tui-radio">
<radio color="#096f4b" :checked="openWay === item.id ? true : false" />
</label>
</radio-group>
</view>
</view>
</view>
<view class="pay_btn" @click="payDzF()">确认支付</view>
</view>
</u-popup>
<!-- 正常支付方式 -->
<u-popup v-model="showpayZ" mode="bottom" :closeable="closeable">
<view class="popup_pay">
<view style="background-color: #fff;">
<view style="padding: 0 20upx;margin-top: 60rpx;margin-bottom: 20rpx;">
@ -871,6 +903,10 @@
// #endif
},
methods: {
quzhifu(){//
this.showpay = true;
},
saveJZS(artificerId) {//
let data = {
artificerId: artificerId,
@ -951,7 +987,7 @@
if (res.code == 0) {
that.tordersId = res.data.ordersId;
that.tpayMoney = res.data.payMoney;
that.showpay = true;
that.showpayZ = true;
that.paySel = 1;
} else {
that.$queue.showToast(res.msg)
@ -985,24 +1021,20 @@
});
},
//
pay() {
//
payDzF() {
let that = this
this.showpay = false
if (this.paySel != 0) {
this.payJZ();
return;
}
if (that.openWay == 1) { //
uni.showModal({
title: '付款提示',
content: '确认支付' + that.tpayMoney + '元吗?',
content: '确认支付' + that.order.payMoney + '元吗?',
success: function(re) {
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
that.$Request.post("/app/artificer/payOrders", {
ordersId: that.tordersId,
ordersId: that.order.ordersId,
}).then(res => {
uni.hideLoading();
if (res.code == 0) {
@ -1011,9 +1043,10 @@
})
that.getOrder()
that.showorderS=false;
uni.switchTab({
url:'/pages/order/index'
})
that.showpay = false
// uni.switchTab({
// url:'/pages/order/index'
// })
} else {
uni.showToast({
title: res.msg,
@ -1053,6 +1086,7 @@
icon: 'none'
})
that.getOrder()
that.showpay = false
// this.$queue.showToast('');
// uni.switchTab({
@ -1083,6 +1117,7 @@
that.showpay = false
if (rea.code == 0) {
that.callPay(rea.data);
that.showpay = false
} else {
uni.showToast({
title: rea.msg,
@ -1109,6 +1144,7 @@
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
const url = '&redirect_url=' + callBack + 'my/order/pay';
window.location = rea.data.mweb_url + url
that.showpay = false
} else {
uni.showToast({
title: rea.msg,
@ -1130,6 +1166,7 @@
that.showpay = false
if (rea.code == 0) {
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
that.showpay = false
}
});
// #endif
@ -1146,6 +1183,7 @@
div.innerHTML = rea.data //form
document.body.appendChild(div)
document.forms[0].submit()
that.showpay = false
});
// #endif
@ -1157,6 +1195,189 @@
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
that.setPayment('alipay', rea.data);
that.showpay = false
});
// #endif
}
},
//
pay() {
let that = this
this.showpay = false
if (this.paySel != 0) {
this.payJZ();
return;
}
if (that.openWay == 1) { //
uni.showModal({
title: '付款提示',
content: '确认支付' + that.tpayMoney + '元吗?',
success: function(re) {
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
that.$Request.post("/app/artificer/payOrders", {
ordersId: that.tordersId,
}).then(res => {
uni.hideLoading();
if (res.code == 0) {
uni.showToast({
title: '支付成功'
})
that.getOrder()
that.showpayZ = false;
uni.switchTab({
url:'/pages/order/index'
})
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
});
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
} else if (that.openWay == 2) { //
that.$queue.showLoading('支付中...')
// #ifdef MP-WEIXIN
let data = {
ordersId: that.tordersId,
type: 3
}
that.$Request.post('/app/wxPay/payOrder', data).then(ret => {
console.log(ret)
if (ret.code == 0) {
uni.hideLoading();
uni.requestPayment({
provider: 'wxpay',
timeStamp: ret.data.timestamp,
nonceStr: ret.data.noncestr,
package: ret.data.package,
signType: ret.data.signType,
paySign: ret.data.sign,
success: function(ret) {
console.log(ret)
uni.showToast({
title: '支付成功',
icon: 'none'
})
that.getOrder()
that.showpayZ = false;
// this.$queue.showToast('');
// uni.switchTab({
// url: '/pages/my/index'
// })
},
fail: function(err) {
// this.$queue.showToast('');
uni.showToast({
title: '支付失败',
icon: 'nones'
});
that.getOrder()
}
});
}
});
// #endif
// #ifdef H5
let ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('micromessenger') != -1) {
let data = {
ordersId: that.tordersId,
type: 2
}
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
that.showpay = false
if (rea.code == 0) {
that.callPay(rea.data);
that.showpayZ = false;
} else {
uni.showToast({
title: rea.msg,
icon: 'none'
})
}
});
} else {
let data = {
ordersId: that.tordersId,
type: 4
}
// debugger;
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
// const urlArr = window.location.href;
// const hostUrl = urlArr.split("/");
// const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
// const url = '&redirect_url=' + callBack + 'my/order/pay';
// window.location = rea.mweb_url + url
that.showpay = false
if (rea.code == 0) {
const urlArr = window.location.href;
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
that.showpayZ = false;
} else {
uni.showToast({
title: rea.msg,
icon: 'none'
})
}
});
}
// #endif
// #ifdef APP
let data = {
ordersId: that.tordersId,
type: 1
}
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
console.log(rea)
that.showpay = false
if (rea.code == 0) {
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
that.showpayZ = false;
}
});
// #endif
} else if (that.openWay == 3) { //
that.$queue.showLoading('支付中...')
// #ifdef H5
let data = {
ordersId: that.tordersId,
type: 2
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
const div = document.createElement('div')
div.innerHTML = rea.data //form
document.body.appendChild(div)
document.forms[0].submit()
that.showpayZ = false;
});
// #endif
// #ifdef APP-PLUS
let data = {
ordersId: that.tordersId,
type: 1
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
that.setPayment('alipay', rea.data);
that.showpayZ = false;
});
// #endif
}
@ -1417,7 +1638,8 @@
icon: 'none'
})
that.getOrder()
that.showpayZ = false;
} else {
uni.showToast({
title: ret.msg,
@ -1433,7 +1655,7 @@
} else if (that.openWay == 2) { //
// #ifdef MP-WEIXIN
let data = {
ordersId: that.ordersId,
ordersId: that.tordersId,
type: 3
}
that.$Request.post('/app/wxPay/payOrder', data).then(ret => {
@ -1455,10 +1677,11 @@
})
that.getOrder()
// this.$queue.showToast('');
// uni.switchTab({
// url: '/pages/my/index'
// })
that.showpayZ = false;
},
fail: function(err) {
// this.$queue.showToast('');
@ -1472,18 +1695,19 @@
}
});
// #endif
// #ifdef H5
let ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('micromessenger') != -1) {
let data = {
ordersId: that.ordersId,
ordersId: that.tordersId,
type: 2
}
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
that.showpay = false
if (rea.code == 0) {
that.callPay(rea.data);
that.showpayZ = false;
} else {
uni.showToast({
title: rea.msg,
@ -1493,7 +1717,7 @@
});
} else {
let data = {
ordersId: that.ordersId,
ordersId: that.tordersId,
type: 4
}
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
@ -1504,6 +1728,7 @@
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
const url = '&redirect_url=' + callBack + 'my/order/pay';
window.location = rea.data.mweb_url + url
that.showpayZ = false;
} else {
uni.showToast({
title: rea.msg,
@ -1512,9 +1737,9 @@
}
});
}
// #endif
// #ifdef APP
let data = {
ordersId: that.order.ordersId,
@ -1525,13 +1750,14 @@
that.showpay = false
if (rea.code == 0) {
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
that.showpayZ = false;
}
});
// #endif
} else if (that.openWay == 3) { //
// #ifdef H5
let data = {
ordersId: that.ordersId,
ordersId: that.tordersId,
type: 2
}
that.$Request.post('/app/aliPay/payOrder', data).then(
@ -1541,22 +1767,24 @@
div.innerHTML = rea.data //form
document.body.appendChild(div)
document.forms[0].submit()
that.showpayZ = false;
});
// #endif
// #ifdef APP-PLUS
let data = {
ordersId: that.ordersId,
ordersId: that.tordersId,
type: 1
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
that.showpay = false
that.setPayment('alipay', rea.data);
that.showpayZ = false;
});
// #endif
}
},
//

View File

@ -843,7 +843,7 @@
} else if (that.openWay == 2) { //
// #ifdef MP-WEIXIN
let data = {
ordersId: that.ordersId,
ordersId: that.order.ordersId,
type: 3,
userPackageDetailId : that.order.userPackageDetailId
}
@ -888,12 +888,13 @@
let ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('micromessenger') != -1) {
let data = {
ordersId: that.ordersId,
ordersId: that.order.ordersId,
type: 2,
userPackageDetailId : that.order.userPackageDetailId
}
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
that.showpay = false
that.showpay = false;
uni.hideLoading();
if (rea.code == 0) {
that.callPay(rea.data);
uni.switchTab({
@ -908,12 +909,13 @@
});
} else {
let data = {
ordersId: that.ordersId,
ordersId: that.order.ordersId,
type: 4,
userPackageDetailId : that.order.userPackageDetailId
}
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
that.showpay = false
that.showpay = false;
uni.hideLoading();
if (rea.code == 0) {
const urlArr = window.location.href;
const hostUrl = urlArr.split("/");
@ -942,7 +944,8 @@
}
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
console.log(rea)
that.showpay = false
that.showpay = false;
uni.hideLoading();
if (rea.code == 0) {
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
uni.switchTab({
@ -954,7 +957,7 @@
} else if (that.openWay == 3) { //
// #ifdef H5
let data = {
ordersId: that.ordersId,
ordersId: that.order.ordersId,
type: 2,
userPackageDetailId : that.order.userPackageDetailId
}
@ -964,7 +967,8 @@
const div = document.createElement('div')
div.innerHTML = rea.data //form
document.body.appendChild(div)
document.forms[0].submit()
document.forms[0].submit();
uni.hideLoading();
uni.switchTab({
url:'/pages/order/index'
})
@ -979,7 +983,9 @@
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
that.showpay = false
uni.hideLoading();
that.setPayment('alipay', rea.data);
uni.switchTab({
url:'/pages/order/index'
@ -1064,6 +1070,7 @@
})
},
fail: function(err) {
uni.hideLoading();
// this.$queue.showToast('');
uni.showToast({
title: '支付失败',
@ -1087,11 +1094,13 @@
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
that.showpay = false
if (rea.code == 0) {
uni.hideLoading();
that.callPay(rea.data);
uni.switchTab({
url:'/pages/order/index'
})
} else {
uni.hideLoading();
uni.showToast({
title: rea.msg,
icon: 'none'
@ -1113,6 +1122,7 @@
// window.location = rea.mweb_url + url
that.showpay = false
if (rea.code == 0) {
uni.hideLoading();
const urlArr = window.location.href;
const hostUrl = urlArr.split("/");
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
@ -1122,6 +1132,7 @@
url:'/pages/order/index'
})
} else {
uni.hideLoading();
uni.showToast({
title: rea.msg,
icon: 'none'
@ -1142,10 +1153,13 @@
console.log(rea)
that.showpay = false
if (rea.code == 0) {
uni.hideLoading();
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
uni.switchTab({
url:'/pages/order/index'
})
}else{
uni.hideLoading();
}
});
// #endif
@ -1159,6 +1173,7 @@
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
uni.hideLoading();
const div = document.createElement('div')
div.innerHTML = rea.data //form
document.body.appendChild(div)
@ -1177,6 +1192,7 @@
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
uni.hideLoading();
that.setPayment('alipay', rea.data);
uni.switchTab({
url:'/pages/order/index'
@ -1185,6 +1201,7 @@
// #endif
}
},
//
selectWay: function(item) {
this.openWay = item.id;

View File

@ -963,7 +963,7 @@
{
"path": "order/payModify",
"style": {
"navigationBarTitleText": "修改订单",
"navigationBarTitleText": "订单",
"navigationStyle": "custom",
"app-plus": {
"titleNView": false

View File

@ -64,7 +64,7 @@
</view>
<view class="item-view-bottom">
<view class="item-view-xiangmu">
<span>已售</span><span>{{item.sales}}w+ <!-- | 好评{{item.esteemRate}}% --></span>
<span>已售</span><span>{{item.sales}} <!-- | 好评{{item.esteemRate}}% --></span>
</view>
<view class="item-view-bottom-btn">
查看

View File

@ -28,15 +28,20 @@
</view>
<!-- <view class="item-view-xiangmu">
<span class="xiaoer item-view-biao">{{item.classifyName}}</span>
<span>已售{{item.sales}}w+ | 好评{{item.esteemRate}}%</span>
<span>已售{{item.sales}} | 好评{{item.esteemRate}}%</span>
</view> -->
<view class="item-view-bottom">
<view class="item-view-bottom-qian">
<span></span>
<span>{{item.price}}</span>
<span>/{{item.serviceCount?item.serviceCount:''}}{{item.type=='104'?'套':item.type=='105'||item.type=='106'?'次':'元'}}</span>
<span>{{item.oldPrice}}/{{item.serviceCount?item.serviceCount:''}}{{item.type=='104'?'套':item.type=='105'||item.type=='106'?'次':'元'}}</span>
<span v-if="item.type!='104'">/{{item.serviceCount?item.serviceCount:''}}
{{item.type=='105'||item.type=='106'?'次':'元'}}
</span>
<span v-if="item.type=='104'">/
</span>
<span v-if="item.type!='104'">{{item.oldPrice}}/{{item.serviceCount?item.serviceCount:''}}{{item.type=='105'||item.type=='106'?'':''}}</span>
<span v-if="item.type=='104'">{{item.oldPrice}}/</span>
</view>
</view>
@ -45,7 +50,7 @@
</view>
<view class="item-view-bottom">
<view class="item-view-xiangmu">
<span>已售</span><span>{{item.sales}}w+</span><!-- | 好评{{item.esteemRate}}% -->
<span>已售</span><span>{{item.sales}}</span><!-- | 好评{{item.esteemRate}}% -->
</view>
<view class="item-view-bottom-btn">
查看

View File

@ -64,7 +64,7 @@
</view>
<view class="item-view-bottom">
<view class="item-view-xiangmu">
<span>已售</span><span>{{item.sales}}w+ <!-- | 好评{{item.esteemRate}}% --></span>
<span>已售</span><span>{{item.sales}} <!-- | 好评{{item.esteemRate}}% --></span>
</view>
<view class="item-view-bottom-btn">
查看

View File

@ -44,7 +44,7 @@
<view class="item-view-bottom">
<view class="item-view-xiangmu" style="align-items: flex-end; ">
<span style="font-size: 26rpx; color: #999; margin-right: 8rpx;">已售</span><span style="font-size: 26rpx; color: #333;">{{item.sales}}w+ <!-- | 好评{{item.esteemRate}}% --></span>
<span style="font-size: 26rpx; color: #999; margin-right: 8rpx;">已售</span><span style="font-size: 26rpx; color: #333;">{{item.sales}} <!-- | 好评{{item.esteemRate}}% --></span>
</view>
<view class="item-view-bottom-btn">
查看

View File

@ -17,7 +17,7 @@
</view>
<!-- <view class="item-view-xiangmu">
<span class="xiaoer item-view-biao">{{item.classifyName}}</span>
<span>已售{{item.sales}}w+ | 好评{{item.esteemRate}}%</span>
<span>已售{{item.sales}} | 好评{{item.esteemRate}}%</span>
</view> -->
<view class="item-view-jianjie">
{{item.content}}

View File

@ -37,7 +37,7 @@
</view>
<view class="item-view-bottom">
<view class="item-view-xiangmu">
<span>已售</span><span>{{item.sales}}w+</span><!-- | 好评{{item.esteemRate}}% -->
<span>已售</span><span>{{item.sales}}</span><!-- | 好评{{item.esteemRate}}% -->
</view>
<view class="item-view-bottom-btn">
查看

View File

@ -41,7 +41,7 @@
</view>-->
<!--<view class="item-view-bottom">
<view class="item-view-xiangmu">
<span>已售</span><span>{{item.sales}}w+</span> | 好评{{item.esteemRate}}%
<span>已售</span><span>{{item.sales}}</span> | 好评{{item.esteemRate}}%
</view>
<view class="item-view-bottom-btn">
查看

View File

@ -64,7 +64,7 @@
</view>
<view class="item-view-bottom">
<view class="item-view-xiangmu">
<span>已售</span><span>{{item.sales}}w+ <!-- | 好评{{item.esteemRate}}% --></span>
<span>已售</span><span>{{item.sales}} <!-- | 好评{{item.esteemRate}}% --></span>
</view>
<view class="item-view-bottom-btn">
查看

View File

@ -66,19 +66,22 @@
@click="cancelOrder(item)">
取消订单
</u-button>
<u-button
<!-- <u-button
v-if="item.btnShow == 'true'" :custom-style="customStyle1" shape="circle" :plain="true"
@click="goNav('/my/order/payModifyDzhifu?ordersId='+item.ordersId,item,'修改')" class="btns xianshi">
修改订单
</u-button>
<u-button :custom-style="customStyle1" shape="circle" :plain="true"
@click="goNav('/my/order/payding?ordersId='+item.ordersId,item)" class="btns">
</u-button> -->
<!-- 升级去支付 -->
<u-button v-if="item.isSupplement=='2'" :custom-style="customStyle1" shape="circle" :plain="true"
@click="goNav('/my/order/payShengji?ordersId='+item.ordersId,item)" class="btns">
去支付
</u-button>
<u-button :custom-style="customStyle1" shape="circle" :plain="true"
@click="goNav('/my/order/pay?ordersId='+item.ordersId)" class="btnsH xianshi">
联系客服
<!-- 不是升级 去支付 -->
<u-button v-if="item.isSupplement!='2'" :custom-style="customStyle1" shape="circle" :plain="true"
@click="goNav('/my/order/pay?ordersId='+item.ordersId,item)" class="btns">
去支付
</u-button>
</view>
<view class="showBtn" v-if="item.status ==2">
<u-button
@ -234,7 +237,7 @@
取消订单
</u-button>
<u-button v-if="item.packageType=='104'||item.packageType=='105'||item.packageType=='106'" :custom-style="customStyle1" shape="circle" :plain="true"
@click="taocanDaiBd('/my/order/payModifyTcMyDaiB?ordersId='+item.ordersId,item)" class="btns xianshi">
@click="goNav('/my/order/payModifyDd?ordersId='+item.ordersId,item)" class="btns xianshi">
立即预约
</u-button>
<u-button v-else :custom-style="customStyle1" shape="circle" :plain="true"
@ -455,7 +458,7 @@
methods: {
taocanDaiBd(url,item){
this.$queue.setData('getJishi','');
this.$queue.setData('mainData',item);
this.$queue.setData('xiangmu',item);
uni.navigateTo({
url:url
})
@ -467,14 +470,14 @@
},
goNav(url,item,text) {
this.$queue.setData('xiangmu',item);
if(item.isSupplement=='2'&&item.status==6){//
if(item.isSupplement=='2'){//
if(item.addNum||item.isSupplement=='2'){
uni.navigateTo({
url:'/my/order/payShengji?ordersId='+item.ordersId
})
}
}else if(item.addNum&&item.status=='6'){
}else if(item.addNum&&item.isSupplement!='2'){
uni.navigateTo({
url:'/my/order/payJaZ?ordersId='+item.ordersId
})

View File

@ -36,7 +36,7 @@
</view>
<view class="item-view-bottom">
<view class="item-view-xiangmu">
<span>已售</span><span>{{item.sales}}w+</span>
<span>已售</span><span>{{item.sales}}</span>
</view>
<!--<view class="item-view-bottom-btn">
预约

View File

@ -517,11 +517,6 @@
uni.reLaunch({
url:'/my/order/payModifyTcMy?artificerId='+e.artificerId+'&text='+'my'
})
}else if(this.dataIndex=='待补单'){
this.$queue.setData('getJishi',e);
uni.reLaunch({
url:'/my/order/payModifyTcMyDaiB?artificerId='+e.artificerId+'&text='+'my'
})
}
},
switch1Change: function (e) {//