Commit 82101895 by lijiabin

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

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