|
@@ -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">
|