Compare commits

...

2 Commits

Author SHA1 Message Date
Mrx
50050219fe Merge branch 'main' of http://1.117.67.95:3000/team/tydata-webview-v2 2026-01-21 14:03:55 +08:00
Mrx
571fee6088 遮罩 2026-01-21 14:02:56 +08:00

View File

@@ -10,23 +10,14 @@
</template>
<script setup>
import { ref, onMounted } from 'vue';
import { useEnv } from '@/composables/useEnv';
// 定义一个响应式变量,表示是否在微信环境
const isWeChat = ref(false);
// 检查是否为微信环境
const checkIfWeChat = () => {
const userAgent = navigator.userAgent.toLowerCase();
isWeChat.value = /micromessenger/.test(userAgent);
};
// 在组件挂载后检查环境
onMounted(() => {
checkIfWeChat();
});
// 使用全局的微信环境检测,与 App.vue 保持一致ss
const { isWeChat } = useEnv();
</script>
<style scoped>
/* 遮罩层样式 */
.wechat-overlay {