Jelajahi Sumber

feat: 修复数据导出404问题

zhangyuhan 1 tahun lalu
induk
melakukan
c9d6504cad

+ 14 - 1
apps/bigmember_pc/src/sentry.js

@@ -9,7 +9,20 @@ export function initSentry(Vue) {
       environment: 'produce',
       environment: 'produce',
       sampleRate: 1,
       sampleRate: 1,
       beforeSend: (event) => {
       beforeSend: (event) => {
-        event.user.email = localStorage.getItem('BIGMEMBER_PC')
+        let isTest = false
+        try {
+          isTest = window.navigator.userAgent.lastIndexOf('jy-test') !== -1
+        } catch (e) {
+          console.warn(e)
+        }
+        if (isTest) {
+          return null
+        }
+        try {
+          event.user.email = localStorage.getItem('BIGMEMBER_PC')
+        } catch (e) {
+          console.warn(e)
+        }
         return event
         return event
       }
       }
     })
     })

+ 23 - 1
apps/bigmember_pc/src/views/order/components/data-export/info.vue

@@ -861,10 +861,32 @@ export default {
         }
         }
 
 
         if (msgCount === 0 || !msgCount) {
         if (msgCount === 0 || !msgCount) {
-          this.$router.replace('/dataexport/nothing')
+          this.showDialog({
+            title: '提示',
+            message: '根据您的筛选条件,未匹配到数据',
+            confirmButtonText: '返回筛选'
+          }).then(() => {
+            this.backToFilter()
+          })
         }
         }
       }
       }
     },
     },
+    showDialog(conf = {}) {
+      const defaultConf = {
+        title: '',
+        message: '',
+        customClass: 'custom-message-box',
+        confirmButtonText: '我知道了',
+        confirmButtonClass: 'custom-confirm-btn',
+        cancelButtonClass: 'custom-cancel-btn',
+        showClose: false,
+        showCancelButton: false,
+        closeOnClickModal: false,
+        center: true
+      }
+      Object.assign(defaultConf, conf)
+      return this.$confirm(defaultConf.message, defaultConf.title, defaultConf)
+    },
     async getGoodsPrice() {
     async getGoodsPrice() {
       const data = await getDataExportPrice()
       const data = await getDataExportPrice()