update uni-app

This commit is contained in:
全栈小学生 2023-06-03 18:28:30 +08:00
parent 4281ac05f9
commit 086549723c
2 changed files with 91 additions and 88 deletions

View File

@ -2,7 +2,7 @@
import { onLaunch, onShow, onHide } from '@dcloudio/uni-app' import { onLaunch, onShow, onHide } from '@dcloudio/uni-app'
import manifest from '@/manifest.json' import manifest from '@/manifest.json'
import { redirectInterceptor, launchInterceptor } from '@/utils/interceptor' import { redirectInterceptor, launchInterceptor } from '@/utils/interceptor'
import { getToken, isWeixinBrowser,getSiteId } from '@/utils/common' import { getToken, isWeixinBrowser, getSiteId } from '@/utils/common'
import useMemberStore from '@/stores/member' import useMemberStore from '@/stores/member'
import useConfigStore from '@/stores/config' import useConfigStore from '@/stores/config'
import useSystemStore from '@/stores/system' import useSystemStore from '@/stores/system'
@ -21,10 +21,11 @@
// #ifdef H5 // #ifdef H5
uni.getSystemInfoSync().platform == 'ios' && (uni.setStorageSync('initUrl', location.href)) uni.getSystemInfoSync().platform == 'ios' && (uni.setStorageSync('initUrl', location.href))
// #endif
// id // id
if (getSiteId(uni.getStorageSync('wap_site_id') || import.meta.env.VITE_SITE_ID) === '') return; if (process.env.NODE_ENV == 'development' && (getSiteId(uni.getStorageSync('wap_site_id') || import.meta.env.VITE_SITE_ID) === '')) return;
// #endif
const configStore = useConfigStore() const configStore = useConfigStore()
configStore.getTabbarConfig() configStore.getTabbarConfig()
@ -56,7 +57,7 @@
// //
// #ifdef H5 // #ifdef H5
window.addEventListener("popstate", function(e) { window.addEventListener("popstate", function (e) {
const path = '/' + location.pathname.replace(manifest.h5.router.base, '') const path = '/' + location.pathname.replace(manifest.h5.router.base, '')
language.loadLocaleMessages(path, uni.getLocale()) language.loadLocaleMessages(path, uni.getLocale())
}, false); }, false);

View File

@ -3,7 +3,9 @@
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
// #ifdef H5
"navigationStyle": "custom", "navigationStyle": "custom",
// #endif
"navigationBarTitleText": "%pages.index.index%" "navigationBarTitleText": "%pages.index.index%"
} }
}, },
@ -73,15 +75,19 @@
{ {
"path": "pages/index/close", "path": "pages/index/close",
"style": { "style": {
// #ifdef H5
"navigationStyle": "custom", "navigationStyle": "custom",
// #endif
"navigationBarTitleText": "%pages.index.close%" "navigationBarTitleText": "%pages.index.close%"
} }
}, },
{ {
"path": "pages/index/nonexistence", "path": "pages/index/nosite",
"style": { "style": {
// #ifdef H5
"navigationStyle": "custom", "navigationStyle": "custom",
"navigationBarTitleText": "%pages.index.nonexistence%" // #endif
"navigationBarTitleText": "%pages.index.nosite%"
} }
}, },
{ {
@ -172,20 +178,12 @@
}, },
{ {
"path": "pages/member/index", "path": "pages/member/index",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "%pages.member.index%"
}
},
{
"path": "pages/member/info",
"style": { "style": {
// #ifdef H5 // #ifdef H5
"navigationStyle": "custom", "navigationStyle": "custom",
// #endif // #endif
"navigationBarTitleText": "%pages.member.info%" "navigationBarTitleText": "%pages.member.index%"
}, }
"needLogin": true
}, },
{ {
"path": "pages/member/personal", "path": "pages/member/personal",
@ -230,14 +228,18 @@
{ {
"path": "pages/pay/browser", "path": "pages/pay/browser",
"style": { "style": {
// #ifdef H5
"navigationStyle": "custom", "navigationStyle": "custom",
// #endif
"navigationBarTitleText": "%pages.pay.browser%" "navigationBarTitleText": "%pages.pay.browser%"
} }
}, },
{ {
"path": "pages/pay/result", "path": "pages/pay/result",
"style": { "style": {
// #ifdef H5
"navigationStyle": "custom", "navigationStyle": "custom",
// #endif
"navigationBarTitleText": "%pages.pay.result%" "navigationBarTitleText": "%pages.pay.result%"
} }
}, },
@ -268,7 +270,7 @@
// #endif // #endif
"navigationBarTitleText": "%pages.index.develop%" "navigationBarTitleText": "%pages.index.develop%"
} }
}// {{PAGE}} } // {{PAGE}}
], ],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",