更换分享

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

View File

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

View File

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

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