Browse Source

新增渠道修改

dev01 2 months ago
parent
commit
0c02272054

+ 28 - 31
src/pages/addEnterprise/index.jsx

@@ -266,36 +266,33 @@ class AddEnterprise extends Component {
       Taro.showToast({ title: "请选择渠道类别", icon: "none" });
       return
     }
-    if (info.channelType != 1) {
-
-      if (!info.province) {
-        Taro.showToast({ title: "请选择地区", icon: "none" });
-        return
-      };
-      if (/.*[\u4e00-\u9fa5]+.*$/.test(info.contacts)) {
-      } else {
-        Taro.showToast({ title: "请填写正确的联系人,且至少包含一个汉字", icon: "none" });
-        return
-      }
-      if (info.contacts.length > 32) {
-        Taro.showToast({ title: "联系人字数不超过32个", icon: "none" });
-        return
-      }
-      if (/.*[\u4e00-\u9fa5]+.*$/.test(info.position)) {
-      } else {
-        Taro.showToast({ title: "请填写正确的职位,且至少包含一个汉字", icon: "none" });
-        return
-      }
-      let regeX1 = /^1[3456789]\d{9}$/;
-      let regex2 = /^((0\d{2,3})-)?(\d{7,8})$/;
-      if (regeX1.test(info.contactMobile) == false && regex2.test(info.contactMobile) == false) {
-        Taro.showToast({ title: "请填写正确的联系电话", icon: "none" });
-        return
-      }
-      if (info.introduction.length === 0) {
-        Taro.showToast({ title: "请填写渠道简介", icon: "none" });
-        return
-      }
+    if (!info.province) {
+      Taro.showToast({ title: "请选择地区", icon: "none" });
+      return
+    };
+    if (/.*[\u4e00-\u9fa5]+.*$/.test(info.contacts)) {
+    } else {
+      Taro.showToast({ title: "请填写正确的联系人,且至少包含一个汉字", icon: "none" });
+      return
+    }
+    if (info.contacts.length > 32) {
+      Taro.showToast({ title: "联系人字数不超过32个", icon: "none" });
+      return
+    }
+    if (/.*[\u4e00-\u9fa5]+.*$/.test(info.position)) {
+    } else {
+      Taro.showToast({ title: "请填写正确的职位,且至少包含一个汉字", icon: "none" });
+      return
+    }
+    let regeX1 = /^1[3456789]\d{9}$/;
+    let regex2 = /^((0\d{2,3})-)?(\d{7,8})$/;
+    if (regeX1.test(info.contactMobile) == false && regex2.test(info.contactMobile) == false) {
+      Taro.showToast({ title: "请填写正确的联系电话", icon: "none" });
+      return
+    }
+    if (info.introduction.length === 0) {
+      Taro.showToast({ title: "请填写渠道简介", icon: "none" });
+      return
     }
     let addList = getProvince(info.province, info.city, info.area)
     Taro.showLoading({
@@ -526,7 +523,7 @@ class AddEnterprise extends Component {
               </Picker>
             </View>
             {
-              !!info.channelType && info.channelType != 1 &&
+              !!info.channelType &&
               <View>
                 <View className="aitem">
                   <View className="atit">

+ 8 - 1
src/pages/customerProfile/index.jsx

@@ -160,7 +160,14 @@ class CustomerProfile extends Component {
           return
         }
       }
-
+      if ((i == "financialData" || i == "earlyCommunication" || i == "interviewIdeas" || i == "interviewDistribution")
+        && info[i].length < 20) {
+        Taro.showToast({
+          title: "至少20字以上",
+          icon: "none",
+        });
+        return
+      }
     }
     updateUserDate(upType, info).then((v) => {
       if (v.error.length === 0) {

+ 2 - 2
src/utils/config.js

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

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

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