设置首页吉祥物

This commit is contained in:
田岩
2025-07-21 16:51:50 +08:00
parent 2fe3ae7ee4
commit 569dcd896e
18 changed files with 97 additions and 112 deletions
+23
View File
@@ -0,0 +1,23 @@
// 设置科技鹿
import {getUserInfo} from "@/common/common.js"
import common from "@/common/common.js"
export const setMascot = () => {
const mascotState = common.getValue('mascotState') || false
console.log('设置科技鹿', mascotState);
if (!mascotState) {
const userInfo = getUserInfo()
const mascotInfo = userInfo['mascotInfo']
uni.setTabBarStyle({
midButton: {
iconPath: "/static/images/icon/fawn-" + (mascotInfo?.mascotNo || '1') + ".png",
width: "86px",
height: "86px",
iconWidth: "90px"
},
success: () => {
common.setValue('mascotState', true)
}
})
}
return mascotState
}