diff --git a/pages.json b/pages.json
index 0ce38f6..4d147b5 100644
--- a/pages.json
+++ b/pages.json
@@ -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 //开启下拉刷新
}
},
{
diff --git a/pages/book/component/confirmBookingInfo.vue b/pages/book/component/confirmBookingInfo.vue
index 8c01cb1..b4e00a5 100644
--- a/pages/book/component/confirmBookingInfo.vue
+++ b/pages/book/component/confirmBookingInfo.vue
@@ -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
})
}
diff --git a/pages/book/myPhotoProducts/myPhotoProducts.vue b/pages/book/myPhotoProducts/myPhotoProducts.vue
index daaaa2d..6230b68 100644
--- a/pages/book/myPhotoProducts/myPhotoProducts.vue
+++ b/pages/book/myPhotoProducts/myPhotoProducts.vue
@@ -6,7 +6,7 @@
class="image"
:src="xzUrl"
/>
- 写真预约
+ 写真服务
{ //下拉刷新
+ await getAllData()
+ setTimeout(()=>{
+ uni.stopPullDownRefresh() //停止下拉刷新
+ },1000)
+ })
+
const getAllData = async () => {
const res = await uni.request({
url: baseUrl + '/global/getAllProducts',
diff --git a/pages/book/myPhotoProductsOrderDetail/myPhotoProductsOrderDetail.vue b/pages/book/myPhotoProductsOrderDetail/myPhotoProductsOrderDetail.vue
index 86c5841..78cd7eb 100644
--- a/pages/book/myPhotoProductsOrderDetail/myPhotoProductsOrderDetail.vue
+++ b/pages/book/myPhotoProductsOrderDetail/myPhotoProductsOrderDetail.vue
@@ -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
})
}
diff --git a/pages/book/photoProductsOrderDetail/photoProductsOrderDetail.vue b/pages/book/photoProductsOrderDetail/photoProductsOrderDetail.vue
index 680e194..860d81f 100644
--- a/pages/book/photoProductsOrderDetail/photoProductsOrderDetail.vue
+++ b/pages/book/photoProductsOrderDetail/photoProductsOrderDetail.vue
@@ -89,7 +89,7 @@
取消订单
-
+
去付款
@@ -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({
diff --git a/pages/clothesRent/clotherRentOrderList/clotherRentOrderList.vue b/pages/clothesRent/clotherRentOrderList/clotherRentOrderList.vue
index 2b68415..27ec7d2 100644
--- a/pages/clothesRent/clotherRentOrderList/clotherRentOrderList.vue
+++ b/pages/clothesRent/clotherRentOrderList/clotherRentOrderList.vue
@@ -97,7 +97,7 @@
取消订单
-
+
去付款
@@ -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
})
diff --git a/pages/clothesRent/clothesRentOrderDetail/clothesRentOrderDetail.vue b/pages/clothesRent/clothesRentOrderDetail/clothesRentOrderDetail.vue
index ca605f8..1a91733 100644
--- a/pages/clothesRent/clothesRentOrderDetail/clothesRentOrderDetail.vue
+++ b/pages/clothesRent/clothesRentOrderDetail/clothesRentOrderDetail.vue
@@ -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
})
}
diff --git a/pages/clothesRent/clothesRentSubmitOrder/clothesRentSubmitOrder.vue b/pages/clothesRent/clothesRentSubmitOrder/clothesRentSubmitOrder.vue
index 6fffd75..03778bf 100644
--- a/pages/clothesRent/clothesRentSubmitOrder/clothesRentSubmitOrder.vue
+++ b/pages/clothesRent/clothesRentSubmitOrder/clothesRentSubmitOrder.vue
@@ -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
})
}
diff --git a/pages/coupon/component/couponPopup.vue b/pages/coupon/component/couponPopup.vue
index 48868a0..f5f5e83 100644
--- a/pages/coupon/component/couponPopup.vue
+++ b/pages/coupon/component/couponPopup.vue
@@ -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'
})
diff --git a/pages/my-order/myGeneralOrderDetail/myGeneralOrderDetail.vue b/pages/my-order/myGeneralOrderDetail/myGeneralOrderDetail.vue
index 1e51d54..0cfc2ac 100644
--- a/pages/my-order/myGeneralOrderDetail/myGeneralOrderDetail.vue
+++ b/pages/my-order/myGeneralOrderDetail/myGeneralOrderDetail.vue
@@ -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 {
diff --git a/pages/my-order/myOrderList/myOrderList.vue b/pages/my-order/myOrderList/myOrderList.vue
index e79d309..2df92c2 100644
--- a/pages/my-order/myOrderList/myOrderList.vue
+++ b/pages/my-order/myOrderList/myOrderList.vue
@@ -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
})
}
diff --git a/pages/my-order/myServiceOrderDetail/myServiceOrderDetail.vue b/pages/my-order/myServiceOrderDetail/myServiceOrderDetail.vue
index e07fa4d..e0dc563 100644
--- a/pages/my-order/myServiceOrderDetail/myServiceOrderDetail.vue
+++ b/pages/my-order/myServiceOrderDetail/myServiceOrderDetail.vue
@@ -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;
diff --git a/pages/order/product-waitpay/product-waitpay.vue b/pages/order/product-waitpay/product-waitpay.vue
index cf0fdda..69d99c3 100644
--- a/pages/order/product-waitpay/product-waitpay.vue
+++ b/pages/order/product-waitpay/product-waitpay.vue
@@ -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
})
}
diff --git a/pages/order/serviceWaitPay/serviceWaitPay.vue b/pages/order/serviceWaitPay/serviceWaitPay.vue
index d296fbf..d55c720 100644
--- a/pages/order/serviceWaitPay/serviceWaitPay.vue
+++ b/pages/order/serviceWaitPay/serviceWaitPay.vue
@@ -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
})
}
diff --git a/pages/order/singleGoodOrder/singleGoodOrder.vue b/pages/order/singleGoodOrder/singleGoodOrder.vue
index fcf7520..badfc10 100644
--- a/pages/order/singleGoodOrder/singleGoodOrder.vue
+++ b/pages/order/singleGoodOrder/singleGoodOrder.vue
@@ -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
})
}
diff --git a/pages/order/singleServiceWait/singleServiceWait.vue b/pages/order/singleServiceWait/singleServiceWait.vue
index a467b51..6f122bd 100644
--- a/pages/order/singleServiceWait/singleServiceWait.vue
+++ b/pages/order/singleServiceWait/singleServiceWait.vue
@@ -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
})
}