Browse Source

上传优化

dev01 1 year ago
parent
commit
d6a6fff532
4 changed files with 10 additions and 15 deletions
  1. 5 10
      src/pages/drafts/index.jsx
  2. 2 2
      src/utils/config.js
  3. 2 2
      src/utils/servers/baseUrl.js
  4. 1 1
      src/utils/tools/config.js

+ 5 - 10
src/pages/drafts/index.jsx

@@ -150,9 +150,6 @@ class Drafts extends Component {
       imgs: arr,
     });
   }
-  onInputChange(title, value) {
-
-  }
   // 取消添加
   onAccountClose() {
     this.setState({
@@ -273,7 +270,8 @@ class Drafts extends Component {
   // 报销单详情
   getDetail() {
     this.setState({
-      loading: true
+      loading: true,
+      isShow: false,
     })
     getPridDetail({
       id: this.$instance.router.params.id,
@@ -296,8 +294,9 @@ class Drafts extends Component {
           rangeEndMinuteVal1: v.data.releaseEndStr,
           totalDuration: v.data.duration,
           imgs: list,
+          isShow: true,
         })
-        this.getAccountList()
+        // this.getAccountList()
       } else {
         Taro.showToast({ title: v.error[0].message, icon: 'none' })
       }
@@ -314,7 +313,7 @@ class Drafts extends Component {
   // 报销详情金额列表
   getAccountList() {
     this.setState({
-      loading: true
+      loading: true,
     })
     const { data } = this.state
     getAccountList({
@@ -348,10 +347,6 @@ class Drafts extends Component {
         title: '系统错误,请稍后再试',
         icon: 'none'
       })
-    }).finally(() => {
-      this.setState({
-        isShow: true
-      })
     })
   }
   // 删除报销详情

+ 2 - 2
src/utils/config.js

@@ -1,7 +1,7 @@
 // 本地
 // export const resourceAddress = 'http://172.16.0.255:3000/upload';
 // 生产
-export const resourceAddress = 'https://s.jishutao.com/upload';
+// export const resourceAddress = 'https://s.jishutao.com/upload';
 // 测试
-// export const resourceAddress = 'https://static.jishutao.com/upload';
+export const resourceAddress = 'https://static.jishutao.com/upload';
 

+ 2 - 2
src/utils/servers/baseUrl.js

@@ -8,8 +8,8 @@ const getBaseUrl = (url) => {
   } else {
     // 生产环境
     // BASE_URL = 'http://172.16.0.255:8080'
-    // BASE_URL = 'https://uat.jishutao.com'
-    BASE_URL = 'https://bm.jishutao.com'
+    BASE_URL = 'https://uat.jishutao.com'
+    // BASE_URL = 'https://bm.jishutao.com'
   }
   return BASE_URL
 }

+ 1 - 1
src/utils/tools/config.js

@@ -107,7 +107,7 @@ export const typeList = [
   { label: '交通费', value: 1, },
   { label: '住宿费', value: 2, },
   { label: '市内车费', value: 3, },
-  { label: '餐', value: 4 },
+  { label: '餐', value: 4 },
   { label: '出差补贴', value: 5 },
   // { label: '预借支', value: 6 },
   { label: '油费', value: 7 },