this is lastest update
This commit is contained in:
parent
31efd8ef6c
commit
ff4a81dd1a
|
@ -11,13 +11,15 @@
|
|||
{
|
||||
"path": "pages/clothesRent/clothesRentOrderDetail/clothesRentOrderDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": true //开启下拉刷新
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/clothesRent/clotherRentOrderList/clotherRentOrderList",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": true //开启下拉刷新
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -64,7 +66,8 @@
|
|||
{
|
||||
"path": "pages/book/photoProductsOrderDetail/photoProductsOrderDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": true //开启下拉刷新
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -93,17 +93,13 @@ const cookie = wx.getStorageSync("cookie") //请求头
|
|||
signType: paymentData.signType,
|
||||
success(res) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '支付成功',
|
||||
showCancel: false
|
||||
})
|
||||
console.log('支付成功res--->',res);
|
||||
},
|
||||
fail(e) {
|
||||
uni.showModal({
|
||||
content: '支付失败,原因为:' + e.errMsg,
|
||||
showCancel: false
|
||||
})
|
||||
console.log('e.errMsg--->',e.errMsg);
|
||||
|
||||
},
|
||||
complete() {
|
||||
uni.redirectTo({
|
||||
|
@ -113,9 +109,9 @@ const cookie = wx.getStorageSync("cookie") //请求头
|
|||
})
|
||||
|
||||
}catch(error) {
|
||||
console.error('支付请求失败',error);
|
||||
uni.showModal({
|
||||
content: '支付请求失败,请重试',
|
||||
title: '提示',
|
||||
content: '支付失败,请刷新后重试',
|
||||
showCancel: false
|
||||
})
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
class="image"
|
||||
:src="xzUrl"
|
||||
/>
|
||||
<text class="font text mt-10" :style="xzColor">写真预约</text>
|
||||
<text class="font text mt-10" :style="xzColor">写真服务</text>
|
||||
</view>
|
||||
<view class="flex-col items-center group equal-division-item" @click="changeSelectedStatus(false)">
|
||||
<image
|
||||
|
@ -54,6 +54,7 @@
|
|||
import { baseUrl } from '../../../api/request';
|
||||
import { publicPath,bkgPubilcPath } from '../../../common/globalImagesUrl';
|
||||
import { getFonts } from '../../../common/globalFont';
|
||||
import { onPullDownRefresh } from "@dcloudio/uni-app";
|
||||
|
||||
const cookie = wx.getStorageSync("cookie") //请求头
|
||||
const xzgl = bookUrl + '/myPhotoProducts/xz-gl.png'
|
||||
|
@ -79,6 +80,14 @@
|
|||
getAllData()
|
||||
})
|
||||
|
||||
|
||||
onPullDownRefresh( async ()=>{ //下拉刷新
|
||||
await getAllData()
|
||||
setTimeout(()=>{
|
||||
uni.stopPullDownRefresh() //停止下拉刷新
|
||||
},1000)
|
||||
})
|
||||
|
||||
const getAllData = async () => {
|
||||
const res = await uni.request({
|
||||
url: baseUrl + '/global/getAllProducts',
|
||||
|
|
|
@ -221,20 +221,22 @@
|
|||
signType: paymentData.signType,
|
||||
success(res) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '支付成功',
|
||||
showCancel: false
|
||||
})
|
||||
getAdvanceOrderById(oid)
|
||||
console.log('支付成功res--->',res);
|
||||
},
|
||||
fail(e) {
|
||||
|
||||
}
|
||||
})
|
||||
}catch(error) {
|
||||
console.error('支付请求失败');
|
||||
hideLoading()
|
||||
isShow.value = false //关闭遮罩
|
||||
uni.showModal({
|
||||
content: '支付请求失败,请重试。',
|
||||
title: '提示',
|
||||
content: '支付失败,请刷新后重试',
|
||||
showCancel: false
|
||||
})
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
<view v-if="item.orderStatus === '待支付'" class="ml-10 flex-col justify-start items-center text-wrapper_2" @click.stop="openCancelBookingOrderPopup(item.id)">
|
||||
<text class="font_6">取消订单</text>
|
||||
</view>
|
||||
<view v-if="item.orderStatus === '待支付'" @click.stop="wxPay(item.id)" class="ml-10 flex-col justify-start items-center text-wrapper_3">
|
||||
<view v-if="item.orderStatus === '待支付'" @click.stop="wxPayFd(item.id)" class="ml-10 flex-col justify-start items-center text-wrapper_3">
|
||||
<text class="font_11 text_16">去付款</text>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -121,7 +121,7 @@
|
|||
import emitter from '../../../utils/emitter';
|
||||
import cancelOrderVue from '../component/cancelOrder.vue';
|
||||
import deleteOrderVue from '../component/deleteOrder.vue';
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import { onLoad, onPullDownRefresh } from "@dcloudio/uni-app";
|
||||
import { baseUrl } from '../../../api/request';
|
||||
import { getFonts } from '../../../common/globalFont';
|
||||
import { publicPath,bkgPubilcPath } from '../../../common/globalImagesUrl';
|
||||
|
@ -132,7 +132,9 @@
|
|||
const advanceOrderList = ref([])
|
||||
const tempAdvanceOrderList = ref([])
|
||||
const isShowMask = ref(false)
|
||||
onLoad((options) => {})
|
||||
let wxPayTimer = null;
|
||||
let loading = false;
|
||||
let isLoading = ref(false)
|
||||
const bkgUrl = ref(bookUrl + '/photoProductsOrderDetail/bkg.png')
|
||||
onLoad(() => {
|
||||
getFonts()
|
||||
|
@ -164,6 +166,14 @@
|
|||
})
|
||||
}
|
||||
|
||||
onPullDownRefresh( async ()=>{ //下拉刷新
|
||||
await getAdvanceOrder()
|
||||
setTimeout(()=>{
|
||||
uni.stopPullDownRefresh() //停止下拉刷新
|
||||
},1000)
|
||||
})
|
||||
|
||||
|
||||
|
||||
onMounted( async () => {
|
||||
getFonts()
|
||||
|
@ -230,9 +240,21 @@
|
|||
}
|
||||
|
||||
|
||||
|
||||
const wxPayFd = (oid) => { //微信支付按钮防抖
|
||||
clearTimeout(wxPayTimer)
|
||||
showLoading()
|
||||
isShowMask.value = true //打开遮罩
|
||||
wxPayTimer = setTimeout(async () => {
|
||||
await wxPay(oid)
|
||||
}, 1000)
|
||||
setTimeout(()=>{
|
||||
hideLoading()
|
||||
isShowMask.value = false //关闭遮罩
|
||||
},2000)
|
||||
}
|
||||
|
||||
const wxPay = async ( oid )=> { //传入订单id
|
||||
showLoading()
|
||||
isShowMask.value = true
|
||||
try {
|
||||
const res = await uni.request({
|
||||
url: baseUrl + '/wechat/payment/photo/create',
|
||||
|
@ -252,17 +274,13 @@
|
|||
signType: paymentData.signType,
|
||||
success(res) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '支付成功',
|
||||
showCancel: false
|
||||
})
|
||||
console.log('支付成功res--->',res);
|
||||
},
|
||||
fail(e) {
|
||||
uni.showModal({
|
||||
content: '支付失败,原因为:' + e.errMsg,
|
||||
showCancel: false
|
||||
})
|
||||
// console.log('e.errMsg--->',e.errMsg);
|
||||
|
||||
},
|
||||
complete() {
|
||||
uni.redirectTo({
|
||||
|
@ -272,15 +290,14 @@
|
|||
})
|
||||
|
||||
}catch(error) {
|
||||
console.error('支付请求失败',error);
|
||||
uni.showModal({
|
||||
content: '支付请求失败,请重试',
|
||||
title: '提示',
|
||||
content: '支付失败,请刷新后重试',
|
||||
showCancel: false
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
let loading = false;
|
||||
function showLoading() {
|
||||
if (!loading) {
|
||||
wx.showLoading({
|
||||
|
|
|
@ -97,7 +97,7 @@
|
|||
<text class="font_13">取消订单</text>
|
||||
</view>
|
||||
|
||||
<view v-if="item.operationList[4]" class="ml-10 flex-col justify-start items-center text-wrapper_2" @click.stop="wxPay(item.id)">
|
||||
<view v-if="item.operationList[4]" class="ml-10 flex-col justify-start items-center text-wrapper_2" @click.stop="wxPayFd(item.id)">
|
||||
<text class="font_14 text_11">去付款</text>
|
||||
</view>
|
||||
|
||||
|
@ -142,6 +142,14 @@
|
|||
getRentOrderList()
|
||||
}
|
||||
|
||||
onPullDownRefresh( async ()=>{ //下拉刷新
|
||||
color.value[0] = '#e79ea1'
|
||||
await getRentOrderList()
|
||||
setTimeout(()=>{
|
||||
uni.stopPullDownRefresh() //停止下拉刷新
|
||||
},1000)
|
||||
})
|
||||
|
||||
onLoad(()=>{
|
||||
getFonts()
|
||||
})
|
||||
|
@ -157,14 +165,6 @@
|
|||
emitter.off('flushClothesOrderList', flushClothesOrderListHandler)
|
||||
})
|
||||
|
||||
onPullDownRefresh( async ()=>{ //下拉刷新
|
||||
color.value[0] = '#e79ea1'
|
||||
getRentOrderList()
|
||||
emitter.on('flushOrderList', flushOrderListHandler)
|
||||
setTimeout(()=>{
|
||||
uni.stopPullDownRefresh() //停止下拉刷新
|
||||
},1000)
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
@ -426,8 +426,6 @@
|
|||
|
||||
|
||||
const wxPay = async( oid )=> { //传入订单id
|
||||
showLoading()
|
||||
isShow.value = true
|
||||
try {
|
||||
const res = await uni.request({
|
||||
url: baseUrl + '/wechat/payment/clothesRent/create',
|
||||
|
@ -447,6 +445,7 @@
|
|||
signType: paymentData.signType,
|
||||
success(res) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '支付成功',
|
||||
showCancel: false
|
||||
})
|
||||
|
@ -461,8 +460,8 @@
|
|||
}
|
||||
})
|
||||
}catch(error) {
|
||||
console.error('支付请求失败');
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '支付请求失败,请重试。',
|
||||
showCancel: false
|
||||
})
|
||||
|
|
|
@ -104,7 +104,8 @@
|
|||
import { clothesRentOrderMap } from '../../../common/global';
|
||||
import { baseUrl } from '../../../api/request';
|
||||
import { publicPath } from '../../../common/globalImagesUrl';
|
||||
import { getFonts } from '../../../common/globalFont';
|
||||
import { onPullDownRefresh } from '@dcloudio/uni-app';
|
||||
import { getFonts } from '../../../common/globalFont';
|
||||
|
||||
import emitter from '../../../utils/emitter';
|
||||
const cookie = wx.getStorageSync('cookie')
|
||||
|
@ -123,6 +124,13 @@ import { getFonts } from '../../../common/globalFont';
|
|||
getOrderDetail()
|
||||
})
|
||||
|
||||
onPullDownRefresh( async ()=>{ //下拉刷新
|
||||
await getOrderDetail()
|
||||
setTimeout(()=>{
|
||||
uni.stopPullDownRefresh() //停止下拉刷新
|
||||
},1000)
|
||||
})
|
||||
|
||||
onLoad((options)=>{
|
||||
getOrderDetail(options.id)
|
||||
getFonts()
|
||||
|
@ -222,8 +230,6 @@ import { getFonts } from '../../../common/globalFont';
|
|||
|
||||
|
||||
const wxPay = async( oid )=> { //传入订单id
|
||||
showLoading()
|
||||
isShow.value = true //打开遮罩
|
||||
try {
|
||||
const res = await uni.request({
|
||||
url: baseUrl + '/wechat/payment/clothesRent/create',
|
||||
|
@ -243,20 +249,20 @@ import { getFonts } from '../../../common/globalFont';
|
|||
signType: paymentData.signType,
|
||||
success(res) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '支付成功',
|
||||
showCancel: false
|
||||
})
|
||||
getOrderDetail(oid)
|
||||
// console.log('支付成功res--->',res);
|
||||
},
|
||||
fail(e) {
|
||||
|
||||
}
|
||||
})
|
||||
}catch(error) {
|
||||
console.error('支付请求失败');
|
||||
uni.showModal({
|
||||
content: '支付请求失败,请重试。',
|
||||
title: '提示',
|
||||
content: '支付失败,请刷新后重试',
|
||||
showCancel: false
|
||||
})
|
||||
}
|
||||
|
|
|
@ -283,17 +283,13 @@ import { getFonts } from '../../../common/globalFont';
|
|||
signType: paymentData.signType,
|
||||
success(res) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '支付成功',
|
||||
showCancel: false
|
||||
})
|
||||
console.log('支付成功res--->',res);
|
||||
},
|
||||
fail(e) {
|
||||
uni.showModal({
|
||||
content: '支付失败,原因为:' + e.errMsg,
|
||||
showCancel: false
|
||||
})
|
||||
console.log('e.errMsg--->',e.errMsg);
|
||||
|
||||
},
|
||||
complete() {
|
||||
uni.redirectTo({
|
||||
|
@ -303,9 +299,9 @@ import { getFonts } from '../../../common/globalFont';
|
|||
})
|
||||
|
||||
}catch(error) {
|
||||
console.error('支付请求失败',error);
|
||||
uni.showModal({
|
||||
content: '支付请求失败,请重试',
|
||||
title: '提示',
|
||||
content: '支付失败,请刷新后重试',
|
||||
showCancel: false
|
||||
})
|
||||
}
|
||||
|
|
|
@ -79,6 +79,8 @@
|
|||
const isShow = ref(true)
|
||||
const borderStyle = ref({})
|
||||
const myCouponList = ref([])
|
||||
const ableToUseCouponList = ref([])
|
||||
const unableToUseCouponList = ref([])
|
||||
const cookie = wx.getStorageSync("cookie") //请求头
|
||||
let totalAmount = 0
|
||||
let couponMap = null
|
||||
|
@ -90,14 +92,6 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// const flushCouponListHandler = () => {
|
||||
// getMyCouponList()
|
||||
// }
|
||||
|
||||
const getTotalPriceHandler = (val) => {
|
||||
totalAmount = val
|
||||
getMyCouponList()
|
||||
|
@ -107,13 +101,10 @@
|
|||
|
||||
onMounted(() => {
|
||||
emitter.on('getTotalPrice', getTotalPriceHandler)
|
||||
// emitter.on('flushCouponList', flushCouponListHandler)
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
// uni.removeStorageSync('couponMap')
|
||||
emitter.off('getTotalPrice', getTotalPriceHandler)
|
||||
// emitter.off('flushCouponList', flushCouponListHandler)
|
||||
})
|
||||
|
||||
|
||||
|
@ -121,7 +112,7 @@
|
|||
if (!val) {
|
||||
isShow.value = !isShow.value
|
||||
borderStyle.value.borderBottom = 'solid 0px'
|
||||
getMyCouponList()
|
||||
myCouponList.value = ableToUseCouponList.value
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -129,7 +120,7 @@
|
|||
if (val) {
|
||||
isShow.value = !isShow.value
|
||||
borderStyle.value.borderBottom = 'solid 1.88rpx #d9d9d9'
|
||||
getMyCouponList()
|
||||
myCouponList.value = unableToUseCouponList.value
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -163,37 +154,34 @@
|
|||
|
||||
|
||||
const getMyCouponList = async () => {
|
||||
// couponMap = uni.getStorageSync('couponMap')
|
||||
// console.log('读缓存======================>', couponMap)
|
||||
// if (couponMap) {
|
||||
// if (isShow.value) myCouponList.value = couponMap['可用']
|
||||
// else myCouponList.value = couponMap['不可用']
|
||||
// checkedArr.value = new Array(myCouponList.value.length).fill(false)
|
||||
// return
|
||||
// }
|
||||
const res = await uni.request({
|
||||
url: baseUrl + '/coupon/list/use',
|
||||
url: baseUrl + '/coupon/list/all/own',
|
||||
method: 'POST',
|
||||
header: {
|
||||
cookie
|
||||
},
|
||||
data: {
|
||||
currentAmount: totalAmount,
|
||||
isAvailable: isShow.value
|
||||
currentAmount: totalAmount
|
||||
}
|
||||
})
|
||||
// console.log('发请求=====================>', res.data.data)
|
||||
// couponMap = res.data.data
|
||||
// uni.setStorageSync('couponMap', couponMap)
|
||||
// if (isShow.value) myCouponList.value = couponMap['可用']
|
||||
// else myCouponList.value = couponMap['不可用']
|
||||
myCouponList.value = res.data.data
|
||||
checkedArr.value = new Array(myCouponList.value.length).fill(false)
|
||||
console.log(res.data.data)
|
||||
ableToUseCouponList.value = res.data.data['可用']
|
||||
unableToUseCouponList.value = res.data.data['不可用']
|
||||
if (isShow.value) myCouponList.value = ableToUseCouponList.value
|
||||
else myCouponList.value = unableToUseCouponList.value
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const jumpToMall = () => {
|
||||
// uni.removeStorageSync('couponMap')
|
||||
uni.navigateTo({
|
||||
url: '/pages/coupon/CouponMall/CouponMall'
|
||||
})
|
||||
|
|
|
@ -278,20 +278,22 @@
|
|||
signType: paymentData.signType,
|
||||
success(res) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '支付成功',
|
||||
showCancel: false
|
||||
})
|
||||
getOrderById(oid)
|
||||
console.log('支付成功res--->',res);
|
||||
},
|
||||
fail(e) {
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
}catch(error) {
|
||||
console.error('支付请求失败');
|
||||
hideLoading()
|
||||
isShow.value = false //关闭遮罩
|
||||
uni.showModal({
|
||||
content: '支付请求失败,请重试。',
|
||||
title: '提示',
|
||||
content: '支付失败,请刷新后重试',
|
||||
showCancel: false
|
||||
})
|
||||
}
|
||||
|
@ -624,7 +626,7 @@ button::after{
|
|||
.font_8 {
|
||||
font-size: 22.5rpx;
|
||||
font-family: FangZhengFonts;
|
||||
line-height: 20.83rpx;
|
||||
line-height: 30rpx;
|
||||
color: #323232;
|
||||
}
|
||||
.group_8 {
|
||||
|
|
|
@ -338,6 +338,7 @@
|
|||
signType: paymentData.signType,
|
||||
success(res) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '支付成功',
|
||||
showCancel: false
|
||||
})
|
||||
|
@ -364,9 +365,9 @@
|
|||
}
|
||||
})
|
||||
}catch(error) {
|
||||
console.error('支付请求失败');
|
||||
uni.showModal({
|
||||
content: '支付请求失败,请重试。',
|
||||
title: '提示',
|
||||
content: '支付失败,请刷新后重试',
|
||||
showCancel: false
|
||||
})
|
||||
}
|
||||
|
|
|
@ -249,20 +249,22 @@
|
|||
signType: paymentData.signType,
|
||||
success(res) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '支付成功',
|
||||
showCancel: false
|
||||
})
|
||||
getOrderById(oid)
|
||||
console.log('支付成功res--->',res);
|
||||
},
|
||||
fail(e) {
|
||||
|
||||
}
|
||||
})
|
||||
}catch(error) {
|
||||
console.error('支付请求失败');
|
||||
hideLoading()
|
||||
isShow.value = false //关闭遮罩
|
||||
uni.showModal({
|
||||
content: '支付请求失败,请重试。',
|
||||
title: '提示',
|
||||
content: '支付失败,请刷新后重试',
|
||||
showCancel: false
|
||||
})
|
||||
}
|
||||
|
@ -599,7 +601,7 @@ button::after{
|
|||
line-height: 19.29rpx;
|
||||
}
|
||||
.text-wrapper_2 {
|
||||
padding: 3.43rpx 0 3.86rpx;
|
||||
// padding: 3.43rpx 0 3.86rpx;
|
||||
background-color: #ffffff;
|
||||
width: 65.63rpx;
|
||||
height: 30rpx;
|
||||
|
@ -609,7 +611,7 @@ button::after{
|
|||
color: #323232;
|
||||
font-size: 22.5rpx;
|
||||
font-family: FangZhengFonts;
|
||||
line-height: 20.83rpx;
|
||||
line-height: 30rpx;
|
||||
}
|
||||
.group_9 {
|
||||
margin-top: 24.38rpx;
|
||||
|
|
|
@ -377,25 +377,24 @@ const wxPay = async( oid )=> { //传入订单id
|
|||
signType: paymentData.signType,
|
||||
success(res) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '支付成功',
|
||||
showCancel: false
|
||||
})
|
||||
uni.redirectTo({
|
||||
url: '/pages/my-order/myGeneralOrderDetail/myGeneralOrderDetail?id=' + oid
|
||||
})
|
||||
console.log('支付成功res--->',res);
|
||||
},
|
||||
fail(e) {
|
||||
uni.redirectTo({
|
||||
url: '/pages/my-order/myGeneralOrderDetail/myGeneralOrderDetail?id=' + oid
|
||||
})
|
||||
console.log('e.errMsg--->',e.errMsg);
|
||||
}
|
||||
})
|
||||
}catch(error) {
|
||||
console.error('支付请求失败',error);
|
||||
uni.showModal({
|
||||
content: '支付请求失败,请重试。',
|
||||
title: '提示',
|
||||
content: '支付失败,请刷新后重试',
|
||||
showCancel: false
|
||||
})
|
||||
}
|
||||
|
|
|
@ -419,25 +419,24 @@
|
|||
signType: paymentData.signType,
|
||||
success(res) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '支付成功',
|
||||
showCancel: false
|
||||
})
|
||||
uni.redirectTo({
|
||||
url: '/pages/my-order/myServiceOrderDetail/myServiceOrderDetail?id=' + oid
|
||||
})
|
||||
console.log('支付成功res--->',res);
|
||||
},
|
||||
fail(e) {
|
||||
uni.redirectTo({
|
||||
url: '/pages/my-order/myServiceOrderDetail/myServiceOrderDetail?id=' + oid
|
||||
})
|
||||
console.log('e.errMsg--->',e.errMsg);
|
||||
}
|
||||
})
|
||||
}catch(error) {
|
||||
console.error('支付请求失败',error);
|
||||
uni.showModal({
|
||||
content: '支付请求失败,请重试。',
|
||||
title: '提示',
|
||||
content: '支付失败,请刷新后重试',
|
||||
showCancel: false
|
||||
})
|
||||
}
|
||||
|
|
|
@ -489,25 +489,24 @@ const wxPay = async ( oid )=> { //传入订单id
|
|||
signType: paymentData.signType,
|
||||
success(res) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '支付成功',
|
||||
showCancel: false
|
||||
})
|
||||
uni.redirectTo({
|
||||
url: '/pages/my-order/myGeneralOrderDetail/myGeneralOrderDetail?id=' + oid
|
||||
})
|
||||
console.log('支付成功res--->',res);
|
||||
},
|
||||
fail(e) {
|
||||
uni.redirectTo({
|
||||
url: '/pages/my-order/myGeneralOrderDetail/myGeneralOrderDetail?id=' + oid
|
||||
})
|
||||
console.log('e.errMsg--->',e.errMsg);
|
||||
}
|
||||
})
|
||||
}catch(error) {
|
||||
console.error('支付请求失败',error);
|
||||
uni.showModal({
|
||||
content: '支付请求失败,请重试。',
|
||||
title: '提示',
|
||||
content: '支付失败,请刷新后重试',
|
||||
showCancel: false
|
||||
})
|
||||
}
|
||||
|
|
|
@ -413,25 +413,24 @@
|
|||
signType: paymentData.signType,
|
||||
success(res) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '支付成功',
|
||||
showCancel: false
|
||||
})
|
||||
uni.redirectTo({
|
||||
url: '/pages/my-order/myServiceOrderDetail/myServiceOrderDetail?id=' + oid
|
||||
})
|
||||
console.log('支付成功res--->',res);
|
||||
},
|
||||
fail(e) {
|
||||
uni.redirectTo({
|
||||
url: '/pages/my-order/myServiceOrderDetail/myServiceOrderDetail?id=' + oid
|
||||
})
|
||||
console.log('e.errMsg--->',e.errMsg);
|
||||
}
|
||||
})
|
||||
}catch(error) {
|
||||
console.error('支付请求失败',error);
|
||||
uni.showModal({
|
||||
content: '支付请求失败,请重试。',
|
||||
title: '提示',
|
||||
content: '支付失败,请刷新后重试',
|
||||
showCancel: false
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user