11
This commit is contained in:
1 parent
7ec67acded
commit
a50228ff08
1 file changed
+49
@@ -0,0 +1,49 @@
|
||||
<template>
|
||||
<crud-layout mainIsScroll bg="/static/page/blue-bg.png">
|
||||
<view class="w-full text-center mt-20">
|
||||
<image src="@/static/page/happy-mall.png" class="rounded-full w-1/3" mode="widthFix" />
|
||||
<view>美好商城</view>
|
||||
<view class="h-100rpx" />
|
||||
<tm-button @click="show = true">继续跳转</tm-button>
|
||||
</view>
|
||||
<tm-modal v-model:show="show" :overlayClick="false" title="注意" position="bottom" height="auto"
|
||||
:showCancel="true" cancelText="取消" confirmText="继续访问" @confirm="thirdAppJump()" @cancel="show = false">
|
||||
<tm-text font-size="30" color="#999999">
|
||||
您即将离开智慧后勤应用并跳转到第三方应用,请注意个人隐私和账号财产安全。您通过第三方服务页面主动提供给第三方商户的个人信息,相关信息保护责任由第三方商户承担。
|
||||
</tm-text>
|
||||
</tm-modal>
|
||||
</crud-layout>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue"
|
||||
import { onLoad } from "@dcloudio/uni-app"
|
||||
import { hooks, router } from "@@/index"
|
||||
import { merchantApi } from "@@/api"
|
||||
|
||||
const show = ref(false)
|
||||
|
||||
onLoad(async () => {
|
||||
const isLogin = await hooks.useCheckLogin()
|
||||
if (isLogin) {
|
||||
show.value = true
|
||||
}
|
||||
})
|
||||
|
||||
// 确认或拒绝协议
|
||||
const thirdAppJump = async () => {
|
||||
try {
|
||||
uni.showLoading({ title: "跳转中", mask: true })
|
||||
const res: any = await merchantApi.lbLogin()
|
||||
if (res.code == 0) {
|
||||
show.value = false
|
||||
if (!res.data) return uni.showToast({ title: "url错误", icon: "none" })
|
||||
router.jump("/pages/root/web-view", { url: encodeURIComponent(res.data) }, 2)
|
||||
}
|
||||
} catch (error: any) {
|
||||
uni.showToast({ title: error, icon: "none" })
|
||||
} finally {
|
||||
uni.hideLoading()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in new issue
Block a user