li.shaoyi 2 anni fa
parent
commit
ca9df992ea

+ 14 - 6
src/packages/qxst/views/account/certification/components/certification-next/Index.vue

@@ -45,7 +45,7 @@
 
 <script lang="ts" setup>
 import { shallowRef, computed, PropType } from 'vue'
-import { CellGroup, Button, Cell, showFailToast, Image } from 'vant'
+import { CellGroup, Button, Cell, showFailToast, Image, showToast } from 'vant'
 import { fullloading, dialog } from '@/utils/vant';
 import { getAQCertificateTypeListName } from "@/constants/account";
 import { useRequest } from '@/hooks/request'
@@ -96,11 +96,19 @@ const idCardPhotoBackURL = computed(() => {
 })
 
 const openWebview = (url: string) => {
-    plus.openWebview({
-        url,
-        titleText: '实名认证',
-        onClose: () => run()
-    })
+    const ua = window.navigator.userAgent.toLowerCase()
+    if (ua.indexOf('micromessenger') !== -1) {
+        showToast({
+            type: 'fail',
+            message: '请使用浏览器打开此页面'
+        })
+    } else {
+        plus.openWebview({
+            url,
+            titleText: '实名认证',
+            onClose: () => run()
+        })
+    }
 }
 
 const props = defineProps({