Commit 82101895 by lijiabin

【feature 22261】 chore: 改用更简单的代码

parent 245931f0
......@@ -20,8 +20,9 @@ import Progress from '@/components/common/Progress/index.vue'
const locale = ref(zhCn)
onMounted(() => {
console.log(import.meta.env.MODE)
// console.table(__CORE_LIB_VERSION__)
if (import.meta.env.MODE === 'production') {
if (import.meta.env.PROD) {
initWxConfig().catch((error) => {
console.warn('企业微信 SDK 初始化失败', error)
})
......
......@@ -194,7 +194,7 @@ const formattedDuration = computed(() => formatTime(videoDuration.value))
let progressTimer: ReturnType<typeof setInterval> | null = null
const SKIP_TIME = import.meta.env.MODE === 'production' ? 60 : 0
const SKIP_TIME = import.meta.env.PROD ? 60 : 0
const startTimers = () => {
progressTimer = setInterval(() => {
if (videoRef.value) {
......
......@@ -41,7 +41,7 @@
</h3>
<p class="mt-2 text-center text-13px text-gray-500 leading-5">
{{ messgae }}
{{ message }}
</p>
</div>
</div>
......@@ -51,17 +51,18 @@
</template>
<script setup lang="ts">
const { title = '登录异常' } = defineProps<{
title?: string
}>()
const { title = "登录异常" } = defineProps<{
title?: string;
}>();
const messgae =
'检测到未登录或者登录错误,' + import.meta.env.MODE === 'production'
? '请关闭标签页,从企微工作台或分享/消息链接重新打开应用'
: '请关闭网页或重新打开网页携带code'
const message =
"检测到未登录或者登录错误," +
(import.meta.env.PROD
? "请关闭标签页,从企微工作台或分享/消息链接重新打开应用"
: "请关闭网页或重新打开网页携带code");
const visible = defineModel<boolean>({ default: false })
const visible = defineModel<boolean>({ default: false });
onMounted(() => {
visible.value = true
})
visible.value = true;
});
</script>
......@@ -18,7 +18,7 @@ import 'notivue/animations.css'
import { vParseComment } from '@/directives'
if (import.meta.env.MODE === 'production') {
if (import.meta.env.PROD) {
import('@/utils/version').then(({ loopGetVersion }) => loopGetVersion())
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment