更换分享
This commit is contained in:
parent
d9ec9fbbc6
commit
cac9a17d36
@ -45,6 +45,7 @@ onMounted(() => {
|
|||||||
duration: 0.2,
|
duration: 0.2,
|
||||||
autoAlpha: 1,
|
autoAlpha: 1,
|
||||||
onComplete: () => {
|
onComplete: () => {
|
||||||
|
if(import.meta.env.VITE_MODE!='dev'){
|
||||||
getMyPrize({}, userStore.token).then(
|
getMyPrize({}, userStore.token).then(
|
||||||
res => {
|
res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
@ -52,6 +53,8 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
|
||||||
Preloader({
|
Preloader({
|
||||||
name: "内页资源",
|
name: "内页资源",
|
||||||
imgs: pageImg,
|
imgs: pageImg,
|
||||||
|
|||||||
@ -96,7 +96,6 @@ onMounted(() => {
|
|||||||
showLoad.value = true
|
showLoad.value = true
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
console.log('hhhh');
|
|
||||||
authorize({ scopeType: 1 }).then(
|
authorize({ scopeType: 1 }).then(
|
||||||
res => {
|
res => {
|
||||||
|
|
||||||
@ -127,7 +126,7 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 其余情况
|
// 其余情况
|
||||||
Toast.fail({
|
Toast({
|
||||||
message: res.msg,
|
message: res.msg,
|
||||||
duration: 0,
|
duration: 0,
|
||||||
forbidClick: true
|
forbidClick: true
|
||||||
@ -173,10 +172,35 @@ onMounted(() => {
|
|||||||
showLoad.value = true
|
showLoad.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fontAdpat()
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// 字体适配
|
||||||
|
const fontAdpat = () => {
|
||||||
|
if (
|
||||||
|
typeof WeixinJSBridge == "object" &&
|
||||||
|
typeof WeixinJSBridge.invoke == "function"
|
||||||
|
) {
|
||||||
|
handleFontSize();
|
||||||
|
} else {
|
||||||
|
if (document.addEventListener) {
|
||||||
|
document.addEventListener("WeixinJSBridgeReady", handleFontSize, false);
|
||||||
|
} else if (document.attachEvent) {
|
||||||
|
document.attachEvent("onWeixinJSBridgeReady", handleFontSize);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function handleFontSize() {
|
||||||
|
// 设置网页字体为默认大小
|
||||||
|
WeixinJSBridge.invoke("setFontSizeCallback", { fontSize: 0 });
|
||||||
|
// 重写设置网页字体大小的事件
|
||||||
|
WeixinJSBridge.on("menu:setfont", function () {
|
||||||
|
WeixinJSBridge.invoke("setFontSizeCallback", { fontSize: 0 });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" >
|
<style lang="scss" >
|
||||||
|
|||||||
@ -25,11 +25,11 @@ wxShare({
|
|||||||
})
|
})
|
||||||
|
|
||||||
// 测试环境开vconsole
|
// 测试环境开vconsole
|
||||||
if (isMobile()) {
|
if(import.meta.env.VITE_MODE!='dev'){
|
||||||
|
const vConsole = new VConsole();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const vConsole = new VConsole();
|
|
||||||
|
|
||||||
|
|
||||||
app.use(createPinia())
|
app.use(createPinia())
|
||||||
|
|||||||
@ -22,7 +22,7 @@ const Preloader = ({ name, imgs, callback }) => {
|
|||||||
})));
|
})));
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(name, promiseArr.length, '张');
|
// console.log(name, promiseArr.length, '张');
|
||||||
return Promise.all(promiseArr);
|
return Promise.all(promiseArr);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user