路径导航更新
This commit is contained in:
parent
45d47b62d2
commit
3ec2b3fbdb
@ -179,7 +179,8 @@
|
||||
"path": "pages/permission/real-name-auth",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationBarTitleText": "实名认证"
|
||||
"navigationBarTitleText": "实名认证",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -13,7 +13,7 @@
|
||||
<TopBar />
|
||||
<image
|
||||
class="absolute w-full h-full"
|
||||
:src="imgUrl('@/static/certification/certification_bg.png')"
|
||||
:src="'@/static/certification/certification_bg.png'"
|
||||
mode="aspectFill"
|
||||
></image>
|
||||
<view class="flex justify-center items-center h-screen bg-gray-100 pt-10">
|
||||
|
@ -11,7 +11,7 @@
|
||||
<image :src="imgUrl('@/static/home/pb.png')" class="quick-service-image" />
|
||||
<text class="quick-service-text">宠物陪伴</text>
|
||||
</view>
|
||||
<view class="quick-service-card" @click="toPath('/pages/mall/index')">
|
||||
<view class="quick-service-card" @click="toPath('/pages/mall/index/index')">
|
||||
<image :src="imgUrl('@/static/home/yl.png')" class="quick-service-image" />
|
||||
<text class="quick-service-text">定制商城</text>
|
||||
</view>
|
||||
|
@ -2,21 +2,21 @@
|
||||
{
|
||||
style: {
|
||||
navigationBarTitleText: '实名认证',
|
||||
navigationStyle: 'custom',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
|
||||
<template>
|
||||
<view>
|
||||
<view class="bg-[#F5F5F5] h-full" v-if="!user.userInfo.isRealName">
|
||||
<!-- 顶部图片和标题 -->
|
||||
<view class="w-full bg-blue-100 py-6 flex justify-center items-center">
|
||||
<!-- 返回按钮 -->
|
||||
<TopBar />
|
||||
<image
|
||||
src="https://via.placeholder.com/300x150"
|
||||
class="w-2/3 h-40 object-cover rounded-lg"
|
||||
class="absolute w-full h-full"
|
||||
:src="'@/static/certification/certification_bg.png'"
|
||||
mode="aspectFill"
|
||||
></image>
|
||||
</view>
|
||||
|
||||
<view>
|
||||
<view v-if="!user.userInfo.isRealName">
|
||||
<!-- 实名认证部分 -->
|
||||
<view class="p-4">
|
||||
<text class="text-lg text-gray-800 mb-2">请进行身份证实名认证</text>
|
||||
@ -57,6 +57,7 @@
|
||||
import { ref } from 'vue'
|
||||
import { httpUploadFile } from '@/utils/http'
|
||||
import { useUserStore } from '@/store'
|
||||
import TopBar from '@/components/TopBar.vue'
|
||||
|
||||
const frontImage = ref('https://via.placeholder.com/100')
|
||||
const backImage = ref('https://via.placeholder.com/100')
|
||||
@ -126,13 +127,4 @@ const submitAuth = async () => {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 使用 UnoCSS 定义样式 */
|
||||
.view {
|
||||
@apply bg-[#F5F5F5] h-full;
|
||||
}
|
||||
|
||||
.button {
|
||||
@apply w-full bg-pink-500 text-white text-center rounded-full py-4 mt-4;
|
||||
}
|
||||
</style>
|
||||
<style scoped></style>
|
||||
|
BIN
acdr-ui/src/static/certification/certification_bg.png
Normal file
BIN
acdr-ui/src/static/certification/certification_bg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 264 KiB |
BIN
acdr-ui/src/static/permission/idcard.png
Normal file
BIN
acdr-ui/src/static/permission/idcard.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.8 KiB |
BIN
acdr-ui/src/static/permission/idcard_back.png
Normal file
BIN
acdr-ui/src/static/permission/idcard_back.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.4 KiB |
@ -1,3 +1,6 @@
|
||||
import sheep from "@/sheep"
|
||||
import PLATFORM from "./platform"
|
||||
|
||||
// 获取服务baseUrl
|
||||
export const baseUrl = import.meta.env.VITE_SERVER_BASEURL
|
||||
export const uploadUrl = import.meta.env.VITE_SERVER_BASEURL
|
||||
@ -58,5 +61,27 @@ export const scanCodeAsync = () => {
|
||||
|
||||
// 路径导航
|
||||
export const toPath = (path) => {
|
||||
// 如果没有指定路由默认跳转到首页去
|
||||
if (!path) {
|
||||
uni.navigateTo({ url: '/pages/index/index' })
|
||||
return
|
||||
}
|
||||
|
||||
// 判断是不是属于网络路由
|
||||
const isWebUrl = path.startsWith('http://') || path.startsWith('https://')
|
||||
if (isWebUrl) {
|
||||
PLATFORM.isH5 && window.open(path)
|
||||
PLATFORM.isApp && uni.navigateTo({ url: '/pages/webview/webview?url=' + path })
|
||||
return
|
||||
}
|
||||
|
||||
// 判断是不是属于商城的路由界面
|
||||
const isMallPath = path.includes('/pages/mall') !== -1
|
||||
if (isMallPath) {
|
||||
sheep.$router.go(path)
|
||||
return
|
||||
}
|
||||
|
||||
// 其他情况使用 uni.navigateTo
|
||||
uni.navigateTo({ url: path })
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user