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

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

parent 8141d33d
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<el-input v-model.trim="ruleForm.contactsWay" placeholder="请输入" maxlength="30"></el-input> <el-input v-model.trim="ruleForm.contactsWay" placeholder="请输入" maxlength="30"></el-input>
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
</div> </div>
</div> </div>
<div> <div>
...@@ -234,6 +234,18 @@ export default { ...@@ -234,6 +234,18 @@ export default {
dataTableList dataTableList
}, },
data() { 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) => { let isMin = (rule, value, callback) => {
if (!value) { if (!value) {
callback(new Error('请输入')) callback(new Error('请输入'))
...@@ -341,8 +353,8 @@ export default { ...@@ -341,8 +353,8 @@ export default {
trigger: 'blur' trigger: 'blur'
}], }],
phone: [{ phone: [{
required: true, required: true,
message: '请输入', validator: checkPhone,
trigger: 'blur' trigger: 'blur'
}], }],
money: [{ money: [{
...@@ -402,7 +414,7 @@ export default { ...@@ -402,7 +414,7 @@ export default {
}], }],
contactsWay: [{ contactsWay: [{
required: true, required: true,
message: '请选择', validator: checkPhone,
trigger: 'blur' trigger: 'blur'
}] }]
}, },
...@@ -480,26 +492,33 @@ export default { ...@@ -480,26 +492,33 @@ export default {
// 删除操作 // 删除操作
delAllSelection() { delAllSelection() {
let val = this.multipleSelection let val = this.multipleSelection
val.forEach((va, index) => { if(val.length>0){
this.ruleForm.companyVOList.forEach((v, i) => { val.forEach((va, index) => {
if (va.id === v.id) { this.ruleForm.companyVOList.forEach((v, i) => {
this.ruleForm.companyVOList.splice(i, 1) if (va.id === v.id) {
} this.ruleForm.companyVOList.splice(i, 1)
}) }
}) })
this.$message.error("删除成功"); })
this.multipleSelection = []; this.$message.success("删除成功");
this.multipleSelection = [];
}else{
this.$message.error("没有选择删除的项");
}
}, },
// 到下一步 // 到下一步
async next() { async next() {
const valid = await this.$refs['ruleForm'].validate() const valid = await this.$refs['ruleForm'].validate()
const valid1 = await this.$refs['bidBookInfoPO'].validate() const valid1 = await this.$refs['bidBookInfoPO'].validate()
let valid2=""
if (this.ruleForm.isNeedEarnest) { 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() const valid3 = await this.$refs['contentForm'].validate()
let isNext = '' let isNext = ''
if (this.ruleForm.isNeedEarnest) { if (this.ruleForm.isNeedEarnest) {
console.log(valid2)
isNext = valid && valid1 && valid2 && valid3 isNext = valid && valid1 && valid2 && valid3
} else { } else {
isNext = valid && valid1 && valid3 isNext = valid && valid1 && valid3
......
...@@ -56,7 +56,7 @@ export default { ...@@ -56,7 +56,7 @@ export default {
}, },
data() { data() {
return { return {
activeIdx: 1, activeIdx: 0,
allForm: {} allForm: {}
} }
}, },
......
...@@ -5,8 +5,8 @@ import { Message, MessageBox } from 'element-ui' ...@@ -5,8 +5,8 @@ import { Message, MessageBox } from 'element-ui'
// 创建axios实例 // 创建axios实例
const service = axios.create({ const service = axios.create({
// baseURL: 'http://192.168.200.201:8082/apis', baseURL: 'http://192.168.200.201:8082/apis',
baseURL: 'http://192.168.3.35:8085/apis', // baseURL: 'http://192.168.3.35:8085/apis',
timeout: 35000 // 请求超时时间 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