debug模式隐藏

This commit is contained in:
Andy Leong
2024-01-23 22:57:48 +08:00
parent d010edfeba
commit bacf91a994
3 changed files with 33 additions and 29 deletions

View File

@@ -19,7 +19,13 @@ import MyPrize from "@/components/MyPrize";
import Draw from "@/components/Draw";
import Result from "@/components/Result";
import Rule from "@/components/Rule";
import { createBGM, getQueryString, screenOrientation, isAndriod,fontAdpat } from "@/plugins";
import {
createBGM,
getQueryString,
screenOrientation,
isAndriod,
fontAdpat,
} from "@/plugins";
import { authorize, getUserInfo } from "@/api";
import { Toast } from "vant";
import { useMainStore } from "@/store";
@@ -114,7 +120,7 @@ onMounted(() => {
// 开始加载组件
showLoad.value = true;
// ios自动播放音乐
// ios自动播放音乐
document.addEventListener("DOMContentLoaded", function () {
function audioAutoPlay() {
var audio = document.getElementById("musicBtn");
@@ -166,8 +172,6 @@ onMounted(() => {
forbidClick: true,
});
}
});
}
});
@@ -184,8 +188,7 @@ onMounted(() => {
duration: 0,
forbidClick: true,
});
return
return;
}
// 活动未开启6002
@@ -196,38 +199,27 @@ onMounted(() => {
icon: "flag-o",
forbidClick: true,
});
return
return;
}
Toast.fail({
message: "活动已结束",
duration: 0,
forbidClick: true,
});
message: "活动已结束",
duration: 0,
forbidClick: true,
});
}
});
}
} else {
showLoad.value = true;
createBGM();
}
});
const playMusic = () => {
if(isAndriod){
var audioEle = document.getElementById("audio");
audioEle.play();
}
}
var audioEle = document.getElementById("audio");
audioEle.play();
};
</script>
<style lang="scss" >
@@ -236,6 +228,10 @@ const playMusic = () => {
background: linear-gradient(135deg, #f6d365, #fda085);
}
#__vconsole {
visibility: hidden;
}
#musicBtn {
@include pos(60px, 60px, 80px, 40px);
z-index: 99;

View File

@@ -24,13 +24,13 @@ wxShare({
})
// 测试环境开vconsole
if(import.meta.env.VITE_MODE!='dev'){
if (import.meta.env.VITE_MODE != 'dev') {
const vConsole = new VConsole();
}
app.use(createPinia())
app.mount('#app')
console.log('Mode:', import.meta.env.VITE_MODE);