chore: 更新工具函数、路由配置、用户状态和 Logo 资源
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -35,6 +35,7 @@ export const LOGIN_PAGE_LIST = [
|
|||||||
export const EXCLUDE_LOGIN_PATH_LIST = [
|
export const EXCLUDE_LOGIN_PATH_LIST = [
|
||||||
'/pages/xxx/index', // 示例值
|
'/pages/xxx/index', // 示例值
|
||||||
'/pages-sub/xxx/index', // 示例值
|
'/pages-sub/xxx/index', // 示例值
|
||||||
|
'/pages-core/splash/index', // Splash 启动页
|
||||||
// 注释 by 芋艿:在 mp 环境下,getAllPages 函数还没初始化好,所以不能直接调用。统一优化到 judgeIsExcludePath 函数里面去获取
|
// 注释 by 芋艿:在 mp 环境下,getAllPages 函数还没初始化好,所以不能直接调用。统一优化到 judgeIsExcludePath 函数里面去获取
|
||||||
// ...excludeLoginPathList, // 都是以 / 开头的 path
|
// ...excludeLoginPathList, // 都是以 / 开头的 path
|
||||||
]
|
]
|
||||||
|
|||||||
19
src/static/logo-white.svg
Normal file
19
src/static/logo-white.svg
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg id="_图层_1" data-name="图层_1" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 474 474">
|
||||||
|
<!-- Generator: Adobe Illustrator 29.4.0, SVG Export Plug-In . SVG Version: 2.1.0 Build 152) -->
|
||||||
|
<defs>
|
||||||
|
<style>
|
||||||
|
.st0 {
|
||||||
|
fill: none;
|
||||||
|
stroke: #fff;
|
||||||
|
stroke-miterlimit: 10;
|
||||||
|
stroke-width: 3px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</defs>
|
||||||
|
<path class="st0" d="M293.23,256.72c-5.4,1.92-11.42,2.89-17.94,2.89-17.17,0-32.16-9.35-40.5-23-8.54-12.64-24.1-22-40.5-22-20.78,0-38.05,13.42-44.5,32l-.6-.25,44.36-106.62c9.4-22.59-1.3-48.53-23.89-57.93h-1c20.13,6.8,32.13,28.8,32.13,28.8l92.44,146.11Z"/>
|
||||||
|
<path class="st0" d="M299.67,391.88c-22.59-9.4-33.29-35.33-23.89-57.93l42.14-101.3-.12-.05c-11.74,34.82-66.36,35.06-83,4-11.34-17.58-37.05-27.37-57.32-18.91-.23.1,91.96,146.17,91.96,146.17,0,0,12,22,32.13,28.8"/>
|
||||||
|
<circle class="st0" cx="412.8" cy="120.61" r="42"/>
|
||||||
|
<rect class="st0" x="301.08" y="162.94" width="88.61" height="238.08" rx="44.31" ry="44.31" transform="translate(134.8 -111.03) rotate(22.59)"/>
|
||||||
|
<rect class="st0" x="60.86" y="68.93" width="88.61" height="335.84" rx="44.31" ry="44.31" transform="translate(99.04 -22.23) rotate(22.59)"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
19
src/static/logo-白线.svg
Normal file
19
src/static/logo-白线.svg
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg id="_图层_1" data-name="图层_1" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 474 474">
|
||||||
|
<!-- Generator: Adobe Illustrator 29.4.0, SVG Export Plug-In . SVG Version: 2.1.0 Build 152) -->
|
||||||
|
<defs>
|
||||||
|
<style>
|
||||||
|
.st0 {
|
||||||
|
fill: none;
|
||||||
|
stroke: #fff;
|
||||||
|
stroke-miterlimit: 10;
|
||||||
|
stroke-width: 3px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</defs>
|
||||||
|
<path class="st0" d="M293.23,256.72c-5.4,1.92-11.42,2.89-17.94,2.89-17.17,0-32.16-9.35-40.5-23-8.54-12.64-24.1-22-40.5-22-20.78,0-38.05,13.42-44.5,32l-.6-.25,44.36-106.62c9.4-22.59-1.3-48.53-23.89-57.93h-1c20.13,6.8,32.13,28.8,32.13,28.8l92.44,146.11Z"/>
|
||||||
|
<path class="st0" d="M299.67,391.88c-22.59-9.4-33.29-35.33-23.89-57.93l42.14-101.3-.12-.05c-11.74,34.82-66.36,35.06-83,4-11.34-17.58-37.05-27.37-57.32-18.91-.23.1,91.96,146.17,91.96,146.17,0,0,12,22,32.13,28.8"/>
|
||||||
|
<circle class="st0" cx="412.8" cy="120.61" r="42"/>
|
||||||
|
<rect class="st0" x="301.08" y="162.94" width="88.61" height="238.08" rx="44.31" ry="44.31" transform="translate(134.8 -111.03) rotate(22.59)"/>
|
||||||
|
<rect class="st0" x="60.86" y="68.93" width="88.61" height="335.84" rx="44.31" ry="44.31" transform="translate(99.04 -22.23) rotate(22.59)"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 180 KiB |
@@ -26,9 +26,8 @@ export const useUserStore = defineStore(
|
|||||||
|
|
||||||
/** 设置用户信息 */
|
/** 设置用户信息 */
|
||||||
const setUserInfo = (val: AuthPermissionInfo) => {
|
const setUserInfo = (val: AuthPermissionInfo) => {
|
||||||
// console.log('设置用户信息', val)
|
|
||||||
// 若头像为空 则使用默认头像
|
// 若头像为空 则使用默认头像
|
||||||
if (!val.user) {
|
if (val.user && !val.user.avatar) {
|
||||||
val.user.avatar = userInfoState.avatar
|
val.user.avatar = userInfoState.avatar
|
||||||
}
|
}
|
||||||
userInfo.value = val.user
|
userInfo.value = val.user
|
||||||
|
|||||||
@@ -123,9 +123,9 @@ export function getEnvBaseUrl() {
|
|||||||
|
|
||||||
// # 有些同学可能需要在微信小程序里面根据 develop、trial、release 分别设置上传地址,参考代码如下。
|
// # 有些同学可能需要在微信小程序里面根据 develop、trial、release 分别设置上传地址,参考代码如下。
|
||||||
// TODO @芋艿:这个后续也要调整。
|
// TODO @芋艿:这个后续也要调整。
|
||||||
const VITE_SERVER_BASEURL__WEIXIN_DEVELOP = 'http://localhost:48080/admin-api'
|
const VITE_SERVER_BASEURL__WEIXIN_DEVELOP = 'http://192.168.0.104:48080/admin-api'
|
||||||
const VITE_SERVER_BASEURL__WEIXIN_TRIAL = 'http://localhost:48080/admin-api'
|
const VITE_SERVER_BASEURL__WEIXIN_TRIAL = 'http://192.168.0.104:48080/admin-api'
|
||||||
const VITE_SERVER_BASEURL__WEIXIN_RELEASE = 'http://localhost:48080/admin-api'
|
const VITE_SERVER_BASEURL__WEIXIN_RELEASE = 'http://192.168.0.104:48080/admin-api'
|
||||||
|
|
||||||
// 微信小程序端环境区分
|
// 微信小程序端环境区分
|
||||||
if (isMpWeixin) {
|
if (isMpWeixin) {
|
||||||
|
|||||||
@@ -35,4 +35,39 @@ console.log('systemInfo', systemInfo)
|
|||||||
// windowHeight: 753
|
// windowHeight: 753
|
||||||
// windowTop: 0
|
// windowTop: 0
|
||||||
// windowWidth: 390
|
// windowWidth: 390
|
||||||
export { safeAreaInsets, systemInfo }
|
// 小程序自定义导航栏高度计算(胶囊按钮适配)
|
||||||
|
// 公式:导航栏高度 = (胶囊top - 状态栏高度) * 2 + 胶囊高度
|
||||||
|
// 总高度 = 状态栏高度 + 导航栏高度
|
||||||
|
let statusBarHeight = 0
|
||||||
|
let customNavBarHeight = 0
|
||||||
|
let customNavBarTotalHeight = 0 // 状态栏 + 导航栏
|
||||||
|
// 胶囊按钮完整信息(px):top/height/bottom/right/left/width
|
||||||
|
let menuButtonInfo = { top: 0, height: 0, bottom: 0, right: 0, left: 0, width: 0 }
|
||||||
|
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
try {
|
||||||
|
const menuButton = uni.getMenuButtonBoundingClientRect()
|
||||||
|
statusBarHeight = systemInfo.statusBarHeight || systemInfo.safeArea?.top || 0
|
||||||
|
const navBarHeight = (menuButton.top - statusBarHeight) * 2 + menuButton.height
|
||||||
|
customNavBarHeight = navBarHeight
|
||||||
|
customNavBarTotalHeight = statusBarHeight + navBarHeight
|
||||||
|
menuButtonInfo = {
|
||||||
|
top: menuButton.top,
|
||||||
|
height: menuButton.height,
|
||||||
|
bottom: menuButton.bottom,
|
||||||
|
right: menuButton.right,
|
||||||
|
left: menuButton.left,
|
||||||
|
width: menuButton.width,
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
statusBarHeight = 44
|
||||||
|
customNavBarHeight = 44
|
||||||
|
customNavBarTotalHeight = 88
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
// #ifndef MP-WEIXIN
|
||||||
|
statusBarHeight = systemInfo.statusBarHeight || 0
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
export { customNavBarHeight, customNavBarTotalHeight, menuButtonInfo, safeAreaInsets, statusBarHeight, systemInfo }
|
||||||
|
|||||||
Reference in New Issue
Block a user