fix: 打包
This commit is contained in:
parent
33f008b620
commit
aa24ed9f3e
|
@ -5,7 +5,7 @@ VITE_UNI_APPID = 'H57F2ACE4'
|
||||||
VITE_WX_APPID = 'wxa2abb91f64032a2b'
|
VITE_WX_APPID = 'wxa2abb91f64032a2b'
|
||||||
|
|
||||||
# h5部署网站的base,配置到 manifest.config.ts 里的 h5.router.base
|
# h5部署网站的base,配置到 manifest.config.ts 里的 h5.router.base
|
||||||
VITE_APP_PUBLIC_BASE = ./
|
VITE_APP_PUBLIC_BASE = 'test'
|
||||||
|
|
||||||
# VITE_SERVER_BASEURL = 'https://gateway.dev.cdlsxd.cn'
|
# VITE_SERVER_BASEURL = 'https://gateway.dev.cdlsxd.cn'
|
||||||
VITE_SERVER_BASEURL = 'https://gateway.dev.cdlsxd.cn'
|
VITE_SERVER_BASEURL = 'https://gateway.dev.cdlsxd.cn'
|
||||||
|
|
|
@ -24,6 +24,7 @@ export default defineManifestConfig({
|
||||||
locale: VITE_FALLBACK_LOCALE, // 'zh-Hans'
|
locale: VITE_FALLBACK_LOCALE, // 'zh-Hans'
|
||||||
h5: {
|
h5: {
|
||||||
router: {
|
router: {
|
||||||
|
mode: 'history',
|
||||||
base: VITE_APP_PUBLIC_BASE,
|
base: VITE_APP_PUBLIC_BASE,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -43,12 +43,18 @@ const srcList = reactive<SrcListType>({
|
||||||
|
|
||||||
const getUrlPathName = () => {
|
const getUrlPathName = () => {
|
||||||
const url = window.location.href
|
const url = window.location.href
|
||||||
const str = url.split('#/')[1]
|
if (url.indexOf('#/') !== -1) {
|
||||||
|
const str =
|
||||||
|
url.indexOf('#/') !== -1 ? url.split('#/')[1] : url.split('/')[url.split('/').length - 1]
|
||||||
if (str.indexOf('/') === -1) {
|
if (str.indexOf('/') === -1) {
|
||||||
return str || ''
|
return str || ''
|
||||||
} else {
|
} else {
|
||||||
return str.split('/')[0]
|
return str.split('/')[0]
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
const strP = url.split('/')
|
||||||
|
return strP[strP.length - 1]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
window.parent.addEventListener('message', function (event) {
|
window.parent.addEventListener('message', function (event) {
|
||||||
|
|
Loading…
Reference in New Issue