修复bug
This commit is contained in:
+22
-15
@@ -2,22 +2,29 @@
|
||||
import {getUserInfo} from "@/common/common.js"
|
||||
import common from "@/common/common.js"
|
||||
export const setMascot = () => {
|
||||
const mascotState = common.getValue('mascotState') || false
|
||||
console.log('设置科技鹿', mascotState);
|
||||
// const mascotState = common.getValue('mascotState') || false
|
||||
const 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)
|
||||
}
|
||||
})
|
||||
|
||||
try{
|
||||
const userInfo = getUserInfo()
|
||||
const mascotInfo = userInfo?.mascotInfo
|
||||
console.log('设置科技鹿', mascotInfo);
|
||||
uni.setTabBarStyle({
|
||||
midButton: {
|
||||
iconPath: "/static/images/icon/fawn-" + (mascotInfo?.mascotNo || '1') + ".png",
|
||||
width: "86px",
|
||||
height: "86px",
|
||||
iconWidth: "90px"
|
||||
},
|
||||
success: () => {
|
||||
common.setValue('mascotState', true)
|
||||
}
|
||||
})
|
||||
} catch(e){
|
||||
|
||||
}
|
||||
}
|
||||
return mascotState
|
||||
}
|
||||
Reference in New Issue
Block a user