更换分享
This commit is contained in:
parent
d9ec9fbbc6
commit
cac9a17d36
@ -45,6 +45,7 @@ onMounted(() => {
|
||||
duration: 0.2,
|
||||
autoAlpha: 1,
|
||||
onComplete: () => {
|
||||
if(import.meta.env.VITE_MODE!='dev'){
|
||||
getMyPrize({}, userStore.token).then(
|
||||
res => {
|
||||
if (res.code == 0) {
|
||||
@ -52,6 +53,8 @@ onMounted(() => {
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
Preloader({
|
||||
name: "内页资源",
|
||||
imgs: pageImg,
|
||||
|
||||
@ -96,7 +96,6 @@ onMounted(() => {
|
||||
showLoad.value = true
|
||||
return
|
||||
} else {
|
||||
console.log('hhhh');
|
||||
authorize({ scopeType: 1 }).then(
|
||||
res => {
|
||||
|
||||
@ -127,7 +126,7 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
// 其余情况
|
||||
Toast.fail({
|
||||
Toast({
|
||||
message: res.msg,
|
||||
duration: 0,
|
||||
forbidClick: true
|
||||
@ -173,10 +172,35 @@ onMounted(() => {
|
||||
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>
|
||||
|
||||
<style lang="scss" >
|
||||
|
||||
@ -25,11 +25,11 @@ wxShare({
|
||||
})
|
||||
|
||||
// 测试环境开vconsole
|
||||
if (isMobile()) {
|
||||
if(import.meta.env.VITE_MODE!='dev'){
|
||||
const vConsole = new VConsole();
|
||||
|
||||
}
|
||||
|
||||
const vConsole = new VConsole();
|
||||
|
||||
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user