更换分享

This commit is contained in:
XGL-THINKPAD-X1\rucky 2024-01-18 18:10:08 +08:00
parent d9ec9fbbc6
commit cac9a17d36
4 changed files with 34 additions and 7 deletions

View File

@ -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,

View File

@ -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" >

View File

@ -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())

View File

@ -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);
}; };