代码提交
This commit is contained in:
@ -14,6 +14,7 @@ import UvRadio from "@/uni_modules/uv-radio/components/uv-radio/uv-radio.vue";
|
||||
import { doPayment, PayType } from "@/utils/paymentUtils";
|
||||
import CouponSelect from "@/pages/submitOrder/components/coupon-select.vue";
|
||||
import Header from "@/components/Header/index.vue"
|
||||
import { useScroll } from "@/hooks/useScroll";
|
||||
|
||||
const {getParams, push, goBack} = useRouter()
|
||||
const {toast, loading, hideLoading} = useInterface();
|
||||
@ -117,16 +118,15 @@ async function handleConfirm() {
|
||||
subLoading.value = true
|
||||
try {
|
||||
const payInfo = await doCreateServiceOrder()
|
||||
debugger
|
||||
// 去拉取支付
|
||||
await doPayment({type: payType.value, payInfo})
|
||||
// #ifndef H5
|
||||
push({url: '/pages/payStatus/index?type=1'}, {type: 'redirectTo'})
|
||||
push({url: '/pages/payStatus/index'}, {type: 'redirectTo'})
|
||||
// #endif
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
toast({title: '支付失败'})
|
||||
push({url: '/pages/payStatus/index?type=2'}, {type: 'redirectTo'})
|
||||
push({url: '/pages/payStatus/index'}, {type: 'redirectTo'})
|
||||
} finally {
|
||||
subLoading.value = false
|
||||
mainStore.cartId = null
|
||||
@ -159,12 +159,7 @@ async function doCreateServiceOrder() {
|
||||
}
|
||||
}
|
||||
|
||||
const scrollTop = ref(0)
|
||||
|
||||
onPageScroll(e => {
|
||||
scrollTop.value = e.scrollTop
|
||||
})
|
||||
|
||||
useScroll()
|
||||
|
||||
/**
|
||||
* 检查路由参数
|
||||
@ -192,7 +187,7 @@ onLoad(async options => {
|
||||
<template>
|
||||
<view class="order-confirm">
|
||||
<!-- header -->
|
||||
<Header :scroll-top="scrollTop">
|
||||
<Header>
|
||||
提交订单
|
||||
</Header>
|
||||
<!-- 地址 -->
|
||||
|
Reference in New Issue
Block a user