|
@@ -8,22 +8,10 @@
|
8
|
8
|
</template>
|
9
|
9
|
|
10
|
10
|
<script lang="ts" setup>
|
11
|
|
-import { getQueryString } from '@/utils/common'
|
12
|
|
-import { onBeforeMount, onMounted, reactive, ref } from "vue";
|
13
|
|
-import { Toast, Icon, Button } from 'vant';
|
14
|
|
-import $axios from '@/utils/axios'
|
|
11
|
+import { onMounted } from "vue";
|
15
|
12
|
import { useRouter } from 'vue-router'
|
16
|
13
|
const $router = useRouter()
|
17
|
14
|
|
18
|
|
-const onClickClose = () => {
|
19
|
|
- closePage()
|
20
|
|
-}
|
21
|
|
-
|
22
|
|
-
|
23
|
|
-
|
24
|
|
-
|
25
|
|
-
|
26
|
|
-
|
27
|
15
|
// 动态修改微信网页标题
|
28
|
16
|
const setTitle = function (t) {
|
29
|
17
|
document.title = t;
|
|
@@ -45,14 +33,14 @@ const changeTitleClick = () => {
|
45
|
33
|
|
46
|
34
|
// 判断当前环境
|
47
|
35
|
const isWechat = () => {
|
48
|
|
- var ua = window.navigator.userAgent.toLowerCase();
|
|
36
|
+ const ua = window.navigator.userAgent.toLowerCase();
|
49
|
37
|
if (ua.match(/micromessenger/i) == 'micromessenger') { // 判断是否在微信浏览器内
|
50
|
38
|
return true;
|
51
|
39
|
} else {
|
52
|
40
|
return false;
|
53
|
41
|
}
|
54
|
42
|
}
|
55
|
|
-function closePage() {
|
|
43
|
+const onClickClose = () => {
|
56
|
44
|
// isWechat是我写的一个判断当前环境是否是微信内置浏览器 的方法
|
57
|
45
|
if (!isWechat()) return // 非微信环境下,不做处理
|
58
|
46
|
setTimeout(function() {
|