Переглянути джерело

新增601状态码,海运出口修改时如版本不同则提示并刷新数据

liyuan 3 місяців тому
батько
коміт
923cc288c3

+ 3 - 0
src/router/axios.js

@@ -79,6 +79,9 @@ axios.interceptors.response.use(res => {
   if (statusWhiteList.includes(status)) return Promise.reject(res);
   //如果是401则跳转到登录页面
   if (status === 401) store.dispatch('FedLogOut').then(() => router.push({ path: '/login' }));
+  if (status === 601) {
+      return res
+  }
   // 如果请求为非200否者默认统一处理
   if (status !== 200) {
     Message({

+ 9 - 0
src/views/iosBasicData/SeafreightExportF/bills/billsDetails.vue

@@ -2213,6 +2213,15 @@ export default {
             this.pageLoading = true
             billsSubmit(this.form).then(res => {
                 this.pageLoading = false
+                if (res.data.code === 601) {
+                    console.info('11111111111----', res)
+                    this.billsDetailfun(this.form.id)
+                    this.$message({
+                        type: "error",
+                        message: res.data.msg
+                    });
+                    return true
+                }
                 this.$message({
                     type: "success",
                     message: "操作成功!"