Prechádzať zdrojové kódy

Merge branch 'dev/v1.0.40_wmh' of jianyu/web into feature/v1.0.40

wenmenghao 1 rok pred
rodič
commit
ba430405ba
1 zmenil súbory, kde vykonal 16 pridanie a 10 odobranie
  1. 16 10
      apps/mobile/src/views/invoice/viewInvoice.vue

+ 16 - 10
apps/mobile/src/views/invoice/viewInvoice.vue

@@ -219,6 +219,7 @@
 import EventBus from '@/utils/eventBus'
 import EventBus from '@/utils/eventBus'
 import { ajaxInvoiceQuery, ajaxInvoiceShowList } from '@/api/modules'
 import { ajaxInvoiceQuery, ajaxInvoiceShowList } from '@/api/modules'
 import { copyText, openAppOrWxPage, toWxGzhProfile } from '@/utils/'
 import { copyText, openAppOrWxPage, toWxGzhProfile } from '@/utils/'
+import { androidOrIOS } from '@/utils/prototype/modules/platform'
 import { LINKS } from '@/data'
 import { LINKS } from '@/data'
 import { Field, Icon, Button } from 'vant'
 import { Field, Icon, Button } from 'vant'
 import popupTip from '@/components/invoice/popupTip'
 import popupTip from '@/components/invoice/popupTip'
@@ -576,22 +577,27 @@ export default {
       if (this.btntext === '查看发票') {
       if (this.btntext === '查看发票') {
         if (this.$envs.inApp) {
         if (this.$envs.inApp) {
           JyObj.openExternalLink(this.url, '电子发票')
           JyObj.openExternalLink(this.url, '电子发票')
-        } else {
+        } else { 
+          // 非app内打开
           if (
           if (
             this.infoMap.type === '2' ||
             this.infoMap.type === '2' ||
             (this.infoMap.type === '1' &&
             (this.infoMap.type === '1' &&
               this.infoMap.price >= 10000 &&
               this.infoMap.price >= 10000 &&
               this.enterSource === 'qrcode')
               this.enterSource === 'qrcode')
-          ) {
+          ) {//扫码入口且金额大于10000
             location.href = this.url
             location.href = this.url
-          } else {
-            const eleLink = document.createElement('a') // 新建A标签
-            eleLink.href = this.url // 下载的路径
-            eleLink.download = '' // 设置下载的属性,可以为空
-            eleLink.style.display = 'none'
-            document.body.appendChild(eleLink)
-            eleLink.click() // 触发点击事件
-            document.body.removeChild(eleLink)
+          } else { // 我的订单入口
+            if (androidOrIOS() === 'ios') {
+              location.href = this.url
+            } else {
+              const eleLink = document.createElement('a') // 新建A标签
+              eleLink.href = this.url // 下载的路径
+              eleLink.download = '' // 设置下载的属性,可以为空
+              eleLink.style.display = 'none'
+              document.body.appendChild(eleLink)
+              eleLink.click() // 触发点击事件
+              document.body.removeChild(eleLink)
+            }
           }
           }
         }
         }
       } else if (this.btntext === '查看物流') {
       } else if (this.btntext === '查看物流') {