Commit 3e794727 authored by 张冬's avatar 张冬

增加注册输入限制,替换请求路径

parent 8141d33d
......@@ -54,7 +54,7 @@
<el-input v-model.trim="ruleForm.contactsWay" placeholder="请输入" maxlength="30"></el-input>
</el-form-item>
</div>
</el-form>
</el-form>
</div>
</div>
<div>
......@@ -234,6 +234,18 @@ export default {
dataTableList
},
data() {
let checkPhone = async (rule, value, callback) => {
if (!value) {
return callback(new Error('手机号不能为空'));
} else {
const reg = /^1[3|4|5|7|8][0-9]\d{8}$/
if (reg.test(value)) {
callback();
} else {
return callback(new Error('请输入正确的手机号'));
}
}
};
let isMin = (rule, value, callback) => {
if (!value) {
callback(new Error('请输入'))
......@@ -341,8 +353,8 @@ export default {
trigger: 'blur'
}],
phone: [{
required: true,
message: '请输入',
required: true,
validator: checkPhone,
trigger: 'blur'
}],
money: [{
......@@ -402,7 +414,7 @@ export default {
}],
contactsWay: [{
required: true,
message: '请选择',
validator: checkPhone,
trigger: 'blur'
}]
},
......@@ -480,26 +492,33 @@ export default {
// 删除操作
delAllSelection() {
let val = this.multipleSelection
val.forEach((va, index) => {
this.ruleForm.companyVOList.forEach((v, i) => {
if (va.id === v.id) {
this.ruleForm.companyVOList.splice(i, 1)
}
})
})
this.$message.error("删除成功");
this.multipleSelection = [];
if(val.length>0){
val.forEach((va, index) => {
this.ruleForm.companyVOList.forEach((v, i) => {
if (va.id === v.id) {
this.ruleForm.companyVOList.splice(i, 1)
}
})
})
this.$message.success("删除成功");
this.multipleSelection = [];
}else{
this.$message.error("没有选择删除的项");
}
},
// 到下一步
async next() {
const valid = await this.$refs['ruleForm'].validate()
const valid1 = await this.$refs['bidBookInfoPO'].validate()
let valid2=""
if (this.ruleForm.isNeedEarnest) {
const valid2 = await this.$refs['earnestInfoPO'].validate()
valid2 = await this.$refs['earnestInfoPO'].validate()
console.log(valid2)
}
const valid3 = await this.$refs['contentForm'].validate()
let isNext = ''
if (this.ruleForm.isNeedEarnest) {
console.log(valid2)
isNext = valid && valid1 && valid2 && valid3
} else {
isNext = valid && valid1 && valid3
......
......@@ -56,7 +56,7 @@ export default {
},
data() {
return {
activeIdx: 1,
activeIdx: 0,
allForm: {}
}
},
......
......@@ -5,8 +5,8 @@ import { Message, MessageBox } from 'element-ui'
// 创建axios实例
const service = axios.create({
// baseURL: 'http://192.168.200.201:8082/apis',
baseURL: 'http://192.168.3.35:8085/apis',
baseURL: 'http://192.168.200.201:8082/apis',
// baseURL: 'http://192.168.3.35:8085/apis',
timeout: 35000 // 请求超时时间
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment