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