mirror of
https://gitee.com/bootx/dax-pay-h5
synced 2026-08-06 13:26:24 +08:00
style 提示优化
This commit is contained in:
@@ -14,6 +14,7 @@ import { ref } from 'vue'
|
||||
import { showDialog } from 'vant'
|
||||
import type { AuthCodeParam } from '@/views/daxpay/h5/auth/ChannelAuth.api'
|
||||
import { authAndSet } from '@/views/daxpay/h5/auth/ChannelAuth.api'
|
||||
import router from '@/router'
|
||||
|
||||
const script = document.createElement('script')
|
||||
script.setAttribute(
|
||||
@@ -47,7 +48,11 @@ async function init() {
|
||||
authCode: authCode as string,
|
||||
channel: channel as string,
|
||||
})
|
||||
authAndSet(param.value).then(() => {
|
||||
authAndSet(param.value).then(({ code, msg }) => {
|
||||
if (code !== 0) {
|
||||
router.replace({ name: 'payFail', query: { msg, title: '获取信息失败' } })
|
||||
return
|
||||
}
|
||||
show.value = false
|
||||
showDialog({
|
||||
message: '已成功获取用户信息!',
|
||||
|
||||
@@ -14,6 +14,7 @@ import { onMounted, ref } from 'vue'
|
||||
import { showDialog } from 'vant'
|
||||
import type { AuthCodeParam } from '@/views/daxpay/h5/auth/ChannelAuth.api'
|
||||
import { authAndSet } from '@/views/daxpay/h5/auth/ChannelAuth.api'
|
||||
import router from '@/router'
|
||||
|
||||
const route = useRoute()
|
||||
const { appId, channel, queryCode } = route.params
|
||||
@@ -35,7 +36,11 @@ onMounted(() => {
|
||||
* 页面初始化
|
||||
*/
|
||||
async function init() {
|
||||
authAndSet(param.value).then(() => {
|
||||
authAndSet(param.value).then(({ code, msg }) => {
|
||||
if (code !== 0) {
|
||||
router.replace({ name: 'payFail', query: { msg, title: '获取信息失败' } })
|
||||
return
|
||||
}
|
||||
show.value = false
|
||||
showDialog({
|
||||
message: '已成功获取用户信息!',
|
||||
@@ -48,7 +53,6 @@ async function init() {
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
|
||||
.block {
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div class="paySuccess">
|
||||
<div class="payLogo">
|
||||
<img v-if="isWeiPay === 'wei'" src="../../../../assets/images/weiSuccess.png" alt="">
|
||||
<img v-else src="../../../../assets/images/success1.png" alt="">
|
||||
<img v-if="isWeiPay === 'wei'" src="@/assets/images/weiSuccess.png" alt="">
|
||||
<img v-else src="@/assets/images/success1.png" alt="">
|
||||
<p :class="{ textColor: isWeiPay === 'wei' }">
|
||||
支付成功
|
||||
</p>
|
||||
@@ -57,7 +57,6 @@ function closeClick() {
|
||||
WeixinJSBridge.call('closeWindow')
|
||||
}
|
||||
catch {
|
||||
|
||||
}
|
||||
try {
|
||||
AlipayJSBridge.call('closeWebview')
|
||||
|
||||
Reference in New Issue
Block a user