设置首页吉祥物
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user