Bladeren bron

附件判断

dev01 1 jaar geleden
bovenliggende
commit
eda3c80a87

+ 5 - 2
src/app.jsx

@@ -87,9 +87,12 @@ class App extends Component {
       header: {
         'token': token,
       },
+      // 测试
       // url: 'wss://bm.jishutao.com/webSocketServer',
-      url: 'wss://172.16.0.255:8080/webSocketServer'
-      // url: 'wss://uat.jishutao.com/webSocketServer'
+      // 本地
+      // url: 'wss://172.16.0.255:8080/webSocketServer'
+      // 生产
+      url: 'wss://uat.jishutao.com/webSocketServer'
     })
 
     //连接成功

+ 8 - 2
src/pages/applyDepart/publicContent.jsx

@@ -142,7 +142,7 @@ class PublicContent extends Component {
       });
       return;
     }
-    if (this.state.totalDuration > 4 && this.state.imgs.length == 0) {
+    if (this.props.enterpriseInfor.type == 0 && this.state.totalDuration > 4 && this.state.imgs.length == 0) {
       Taro.showToast({ title: "请上传附件", icon: "none" });
       return
     }
@@ -651,7 +651,7 @@ class PublicContent extends Component {
           )}
         </View>
         {/*  */}
-        <View className="formItem" style={{ display: "block" }}>
+        <View className="formItem" style={{ display: "block", paddingBottom: 0 }}>
           <View className="formName">附件:</View>
           <View
             className="formValue"
@@ -665,6 +665,12 @@ class PublicContent extends Component {
             />
           </View>
         </View>
+        {
+          this.props.enterpriseInfor.type == 0 && this.state.totalDuration > 4 && this.state.imgs.length == 0 &&
+          <View className="tips" style={{ paddingBottom: "40px" }}>
+            您公出时长超过4小时,请上传凭证截图!
+          </View>
+        }
         <View className="operation">
           <AtButton
             disabled={this.state.loading}

+ 8 - 0
src/pages/egressDetails/publicContent.jsx

@@ -209,6 +209,10 @@ class PublicContent extends Component {
       });
       return;
     }
+    if (this.props.dtails.type == 0 && this.state.totalDuration > 4 && this.state.imgs.length == 0) {
+      Taro.showToast({ title: "请上传附件", icon: "none" });
+      return
+    }
     this.setState({
       loading: true,
     });
@@ -351,6 +355,10 @@ class PublicContent extends Component {
       });
       return;
     }
+    if (this.props.dtails.type == 0 && this.state.totalDuration > 4 && this.state.imgs.length == 0) {
+      Taro.showToast({ title: "请上传附件", icon: "none" });
+      return
+    }
     this.setState({
       loading: true,
     });

+ 2 - 2
src/utils/config.js

@@ -1,7 +1,7 @@
 // 本地
-export const resourceAddress = 'http://172.16.0.255:3000/upload;'
+// export const resourceAddress = 'http://172.16.0.255:3000/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

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