diff --git a/src/pages.json b/src/pages.json index 33eddc7..f349226 100644 --- a/src/pages.json +++ b/src/pages.json @@ -57,8 +57,7 @@ "path": "pages/about/about", "type": "page", "style": { - "navigationBarTitleText": "关于", - "navigationStyle": "custom" + "navigationBarTitleText": "关于" } }, { @@ -72,7 +71,7 @@ "path": "pages/login/index", "type": "page", "style": { - "navigationBarTitleText": "登录", + "navigationBarTitleText": "登录", "navigationStyle": "custom" } }, diff --git a/src/pages/about/about.vue b/src/pages/about/about.vue index 7ec3b5f..2ba2e3c 100644 --- a/src/pages/about/about.vue +++ b/src/pages/about/about.vue @@ -1,7 +1,36 @@ -import RequestComp from './components/request.vue' import UploadComp from './components/upload.vue' -import i18n, { t } from '@/locale/index' onShow(() => { console.log('About Show', t('app.name')) -console.log(uni.getLocale()) console.log(i18n.global.locale) // #ifdef MP-WEIXIN // fix -微信小程序需要手动调用 api 设置一次国际化标题。 uni.setNavigationBarTitle({ title: t('app.name') }) -// #endif }) // 获取屏幕边界到安全区域距离 const { safeAreaInsets } = uni.getSystemInfoSync() const -gotoPage = (path) => { uni.navigateTo({ url: `/pages/about/${path}`, }) } const toSubPage = () => { -uni.navigateTo({ url: '/pages-sub/demo/index', }) } + +{ + style: { + navigationBarTitleText: '关于', + }, +} + + + + + + + diff --git a/src/pages/about/components/request.vue b/src/pages/about/components/request.vue index b2e599b..d8a1e96 100644 --- a/src/pages/about/components/request.vue +++ b/src/pages/about/components/request.vue @@ -1,8 +1,67 @@ -import useRequest from '@/hooks/useRequest' import { getFooAPI, postFooAPI, IFooItem } from -'@/service/index/foo' import { ref } from 'vue' // import { findPetsByStatusQueryOptions } from -'@/service/app' // import { useQuery } from '@tanstack/vue-query' const recommendUrl = -ref('http://laf.run/signup?code=ohaOgIX') // const initialData = { // name: 'initialData', // id: -'1234', // } const initialData = undefined // -适合少部分全局性的接口————多个页面都需要的请求接口,额外编写一个 Service 层 const { loading, error, -data, run } = useRequest - + +{ + layout: 'demo', + style: { + navigationBarTitleText: '请求', + }, +} + + + + + diff --git a/src/utils/index.ts b/src/utils/index.ts index 196493e..b722e93 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -12,8 +12,6 @@ export const getLastPage = () => { return pages[pages.length - 1] } -export const tabBarList = tabBar?.list || [] - /** 判断当前页面是否是 tabbar 页 */ export const getIsTabbar = () => { try {