shuishen
2025-10-11 3fc27febccd04e2fcffbd2cdd16d2daafd0b3ca3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<!-- 事件工单 -->
<template>
  <view class="min-h-screen flex flex-col items-center">
    <image
      class="mb-50rpx mt-200rpx h-200rpx w-200rpx"
      src="@/static/images/logo.png"
      width="200rpx"
      height="200rpx"
    />
    <view class="flex justify-center">
      <text class="font-size-36rpx">
        {{ $t("home.intro") }}
      </text>
    </view>
    <view class="mt-100rpx flex gap-30rpx">
      <lang-select />
      <view class="cursor-pointer" @click="toGithub">
        <view class="i-mdi-github text-40rpx" />
      </view>
    </view>
 
    <!-- #ifdef MP-WEIXIN -->
    <!-- 隐私协议组件 -->
    <agree-privacy
      v-model="showAgreePrivacy"
      :disable-check-privacy="false"
      @agree="handleAgree"
    />
    <!-- #endif -->
  </view>
</template>
 
<script setup>
// #ifdef MP-WEIXIN
import { useShare } from "@/hooks";
// #endif
 
// #ifdef MP-WEIXIN
// 分享使用示例
const { onShareAppMessage, onShareTimeline } = useShare({
  title: "首页",
  path: "pages/tab/map/index",
  imageUrl: "",
});
onShareAppMessage();
onShareTimeline();
// #endif
 
const title = ref();
title.value = import.meta.env.VITE_APP_TITLE;
 
const showAgreePrivacy = ref(false);
 
// 同意隐私协议
function handleAgree() {
  console.log("同意隐私政策");
}
 
// 打开github
function toGithub() {
  if (window?.open) {
    window.open("https://github.com/oyjt/uniapp-vue3-template");
  } else {
    uni.$u.toast("请使用浏览器打开");
  }
}
</script>