28 lines
625 B
JavaScript
28 lines
625 B
JavaScript
// 设置科技鹿
|
|
import {
|
|
getUserInfo
|
|
} from "@/common/common.js"
|
|
import common from "@/common/common.js"
|
|
export const setMascot = () => {
|
|
const mascotState = false
|
|
if (!mascotState) {
|
|
try {
|
|
const userInfo = getUserInfo()
|
|
const mascotInfo = userInfo?.mascotInfo
|
|
if (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
|
|
} |