Commit 63aaa886 authored by spc's avatar spc

pages third

parents 89c95d9f 8bf7e978
{
"pages": [
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "首页",
"navigationStyle": "custom"
}
},
{
"path": "pages/postnatalCheckUp/postnatalCheckUp",
"style": {
"navigationBarTitleText": "产检提醒"
}
},
{
"path": "pages/person/person",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/webview/webview",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/search/search",
"style": {
"navigationStyle": "custom",
"usingComponents": {
"van-tab": "../../wxcomponents/vant/tab/index",
"van-tabs": "../../wxcomponents/vant/tabs/index"
}
}
},
{
"path": "pages/product/product",
"style": {
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/library/ContentLibrary",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/goodsDetail/goodsDetail",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/rightsDetail/rightsDetail",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/naming/naming",
"style": {
"navigationBarTitleText": "星妈起名",
"enablePullDownRefresh": false
}
},
{
"path": "pages/naming/namingResult",
"style": {
"navigationBarTitleText": "星妈起名",
"enablePullDownRefresh": false
}
},
{
"path": "pages/expertTeamPage/expertTeamPage",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/syWebview/syWebview",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/feedingRecord/feedingRecord",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/addPostnatal/addPostnatal",
"style": {
"navigationBarTitleText": "新增产检",
"navigationBarBackgroundColor": "#ffffff",
"enablePullDownRefresh": false
}
},
{
"path": "pages/myReportCard/myReportCard",
"style": {
"navigationBarTitleText": "我的报告单",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/productionCalendar/productionCalendar",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/productionDetails/productionDetails",
"style": {
"navigationBarTitleText": "产检详情",
"navigationBarBackgroundColor": "#ffffff",
"enablePullDownRefresh": false
}
},
{
"path": "pages/editPostnatal/editPostnatal",
"style": {
"navigationBarTitleText": "产检项目",
"navigationBarBackgroundColor": "#ffffff",
"enablePullDownRefresh": false
}
},
{
"path": "pages/shengzhangTools/shengzhangTools",
"style": {
"navigationBarTitleText": "生长测评"
}
},
{
"path": "pages/feedingAnalysis/feedingAnalysis",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/feedingIndex/feedingIndex",
"style": {
"navigationBarTitleText": "添加喂养记录"
}
},
{
"path": "pages/shengzhangTestResult/shengzhangTestResult",
"style": {
"navigationBarTitleText": "生长测评"
}
}
],
"subPackages": [
{
"root": "reservation",
"pages": [
{
"path": "home/index",
"style": {
"navigationBarTitleText": "飞鹤奶粉"
}
},
{
"path": "subscribe/index",
"style": {
"navigationBarTitleText": "预约信息"
}
},
{
"path": "record/index",
"style": {
"navigationBarTitleText": "工业游预约记录"
}
},
{
"path": "record/detail",
"style": {
"navigationBarTitleText": "预约详情"
}
},
{
"path": "status/index",
"style": {
"navigationBarTitleText": "预约状态"
}
},
{
"path": "sign/index",
"style": {
"navigationBarTitleText": "签到"
}
}
]
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8",
"navigationStyle": "default"
},
"uniIdRouter": {}
}
\ No newline at end of file
{
"pages": [
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "首页",
"navigationStyle": "custom"
}
},
{
"path": "pages/postnatalCheckUp/postnatalCheckUp",
"style": {
"navigationBarTitleText": "产检提醒"
}
},
{
"path": "pages/person/person",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/webview/webview",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/search/search",
"style": {
"navigationStyle": "custom",
"usingComponents": {
"van-tab": "../../wxcomponents/vant/tab/index",
"van-tabs": "../../wxcomponents/vant/tabs/index"
}
}
},
{
"path": "pages/product/product",
"style": {
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/library/ContentLibrary",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/goodsDetail/goodsDetail",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/rightsDetail/rightsDetail",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/naming/naming",
"style": {
"navigationBarTitleText": "星妈起名",
"enablePullDownRefresh": false
}
},
{
"path": "pages/naming/namingResult",
"style": {
"navigationBarTitleText": "星妈起名",
"enablePullDownRefresh": false
}
},
{
"path": "pages/expertTeamPage/expertTeamPage",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/syWebview/syWebview",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/feedingRecord/feedingRecord",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/addPostnatal/addPostnatal",
"style": {
"navigationBarTitleText": "新增产检",
"navigationBarBackgroundColor": "#ffffff",
"enablePullDownRefresh": false
}
},
{
"path": "pages/myReportCard/myReportCard",
"style": {
"navigationBarTitleText": "我的报告单",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/productionCalendar/productionCalendar",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/productionDetails/productionDetails",
"style": {
"navigationBarTitleText": "产检详情",
"navigationBarBackgroundColor": "#ffffff",
"enablePullDownRefresh": false
}
},
{
"path": "pages/editPostnatal/editPostnatal",
"style": {
"navigationBarTitleText": "产检项目",
"navigationBarBackgroundColor": "#ffffff",
"enablePullDownRefresh": false
}
},
{
"path": "pages/shengzhangTools/shengzhangTools",
"style": {
"navigationBarTitleText": "生长测评"
}
},
{
"path": "pages/feedingAnalysis/feedingAnalysis",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/feedingIndex/feedingIndex",
"style": {
"navigationBarTitleText": "添加喂养记录"
}
},
{
"path": "pages/shengzhangTestResult/shengzhangTestResult",
"style": {
"navigationBarTitleText": "生长测评"
}
},
{
"path": "pages/thirdJumpMiddlePage/thirdJumpMiddlePage",
"style": {
"navigationBarTitleText": ""
}
}
],
"subPackages": [
{
"root": "reservation",
"pages": [
{
"path": "home/index",
"style": {
"navigationBarTitleText": "飞鹤奶粉"
}
},
{
"path": "subscribe/index",
"style": {
"navigationBarTitleText": "预约信息"
}
},
{
"path": "record/index",
"style": {
"navigationBarTitleText": "工业游预约记录"
}
},
{
"path": "record/detail",
"style": {
"navigationBarTitleText": "预约详情"
}
},
{
"path": "status/index",
"style": {
"navigationBarTitleText": "预约状态"
}
},
{
"path": "sign/index",
"style": {
"navigationBarTitleText": "签到"
}
}
]
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8",
"navigationStyle": "default"
},
"uniIdRouter": {}
}
\ No newline at end of file
<template>
<view class="third-jump-page">
<image class="bg-img" :src="`${$baseUrl}thirdJumpMiddlePage/v1/syJumpPageBg.jpg`" mode="widthFix"
@click="retryJump"></image>
</view>
</template>
<script setup>
import { ref, onMounted, getCurrentInstance } from 'vue'
// 获取全局属性
const { proxy } = getCurrentInstance()
const $baseUrl = proxy.$baseUrl
// 响应式数据
const jumpFailed = ref(false)
const errorMessage = ref('')
const jumpParams = ref({})
// 页面加载时获取参数
onMounted(() => {
// 获取页面参数
const pages = getCurrentPages()
const currentPage = pages[pages.length - 1]
const options = currentPage.options || {}
console.log('页面参数 options:', options)
// 解析跳转参数
jumpParams.value = {
appId: options.appId || '',
path: options.path || '',
extraData: options.extraData ? JSON.parse(decodeURIComponent(options.extraData)) : {},
envVersion: options.envVersion || 'release',
}
// 执行跳转
executeJump()
})
// 执行跳转
const executeJump = () => {
if (!jumpParams.value.appId) {
showError('缺少必要参数:appId')
return
}
console.log('开始跳转,参数:', jumpParams.value)
// 调用跳转方法
uni.navigateToMiniProgram({
appId: jumpParams.value.appId,
path: jumpParams.value.path,
extraData: jumpParams.value.extraData,
envVersion: jumpParams.value.envVersion,
success: (res) => {
console.log('跳转成功:', res)
// 跳转成功后可以做一些清理工作
},
fail: (err) => {
console.error('跳转失败:', err)
showError(`跳转失败:${err.errMsg || '未知错误'}`)
}
})
}
// 显示错误信息
const showError = (message) => {
errorMessage.value = message
jumpFailed.value = true
}
// 重试跳转
const retryJump = () => {
jumpFailed.value = false
errorMessage.value = ''
executeJump()
}
// 返回上一页
const goBack = () => {
uni.navigateBack({
delta: 1
})
}
</script>
<style lang="less" scoped>
.third-jump-page {
background: white;
display: flex;
align-items: center;
justify-content: center;
padding: 40rpx;
}
.bg-img {
width: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 1;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment