Browse Source

🐞 fix(dingding): 钉钉移动端消息跳转

Zimo 1 week ago
parent
commit
2aa99d11bb
1 changed files with 10 additions and 7 deletions
  1. 10 7
      src/views/pms/dingding.vue

+ 10 - 7
src/views/pms/dingding.vue

@@ -1,5 +1,5 @@
 <template>
-  <div v-if="isMobileDevice && !isDingTalk()" class="loading">跳转处理中...</div>
+  <div v-if="isMobileDevice() && !isDingTalk()" class="loading">跳转处理中...</div>
   <!--  <a ref="myLink" :href="href" v-show="false">跳转app</a>-->
   <!--  <div v-if="isMobileDevice()&&isDingTalk()" class="wxtip" id="JweixinTip">-->
   <!--    <span class="wxtip-icon"></span>-->
@@ -18,6 +18,7 @@ const route = useRoute()
 // 设备检测
 const isMobileDevice = (): boolean => {
   const userAgentInfo = navigator.userAgent
+
   const mobileAgents = [
     'Android',
     'iPhone',
@@ -52,12 +53,12 @@ const businessRoutes: Record<string, string> = {
   rdReportApproval: 'rdReportApproval'
 }
 
-const href = ref('')
-const myLink = ref(null)
+// const href = ref('')
+// const myLink = ref(null)
 
-const clickA = () => {
-  myLink.value.click()
-}
+// const clickA = () => {
+//   myLink.value?.click()
+// }
 
 onMounted(async () => {
   let {
@@ -71,7 +72,6 @@ onMounted(async () => {
     userName = ''
   } = route.query
 
-  console.log('route.query :>> ', route.query)
   const isValidType = Object.keys(businessRoutes).includes(type as string)
 
   if (isMobileDevice()) {
@@ -94,6 +94,9 @@ onMounted(async () => {
         orderName +
         '&userName=' +
         userName
+    } else if (type === 'rdReportApproval') {
+      window.location.href =
+        import.meta.env.VITE_BASE_URL + '/deepoil/#/pages/ruiDu/approval?id=' + id
     } else {
       window.location.href =
         import.meta.env.VITE_BASE_URL +