fix: 微信小程序余额充值不跳转问题
This commit is contained in:
@ -35,6 +35,7 @@ onLoad(() => {
|
||||
})
|
||||
|
||||
onShow(() => {
|
||||
mainStore.getUserInfo()
|
||||
refreshPage()
|
||||
})
|
||||
</script>
|
||||
|
@ -15,11 +15,12 @@ import { onLoad } from "@dcloudio/uni-app";
|
||||
import { useRouter } from "@/hooks/useRouter";
|
||||
import { createRechargeOrder, getRechargeConfig } from "@/api/account/balance";
|
||||
import { doPayment, PayType } from "@/utils/paymentUtils";
|
||||
import { h5InWeChat } from "@/utils";
|
||||
|
||||
// ========================= hooks ==========================
|
||||
const {toast, loading, hideLoading} = useInterface();
|
||||
const {scrollTop} = useScroll();
|
||||
const {getParams} = useRouter();
|
||||
const {getParams, push} = useRouter();
|
||||
|
||||
|
||||
// =========================== 充值方式 =========================
|
||||
@ -115,6 +116,15 @@ async function confirm() {
|
||||
type: PayType["0"],
|
||||
payInfo: {orderId}
|
||||
})
|
||||
// #ifndef H5
|
||||
push({url: '/views/account/balance/index'})
|
||||
// #endif
|
||||
// 处理微信内h5
|
||||
// #ifdef H5
|
||||
if (h5InWeChat()) {
|
||||
push({url: '/views/account/balance/index'})
|
||||
}
|
||||
// #endif
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
throw new Error(e)
|
||||
|
Reference in New Issue
Block a user