Commit ecd29344 authored by 黎博's avatar 黎博

修改vcc造数据接口500的处理以及手机输入框长度限制

parent 7330e1bc
......@@ -10,6 +10,7 @@
<div class="filter">
手机号:<el-input
v-model="queryInfo.phoneNo"
maxlength="11"
placeholder="请输入手机号"
></el-input>
<!-- 身份证号码:<el-input
......
......@@ -9,18 +9,10 @@
<!-- 卡片区域 -->
<el-card>
<div>
手机号:<el-input
v-model="genDataParams.phoneNo"
placeholder="请输入手机号"
></el-input>
手机号:<el-input v-model="genDataParams.phoneNo" placeholder="请输入手机号" maxlength="11"></el-input>
用户状态:
<el-select v-model="genDataParams.status" placeholder="请选择用户状态">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
<el-button type="primary" @click="genData">生成数据</el-button>
......@@ -78,7 +70,6 @@ export default {
lock: true,
spinner: 'el-icon-loading',
background: 'rgba(0,0,0,0.7)'
}
}
},
......@@ -96,7 +87,11 @@ export default {
}
// 开户失败校验,尾号必须为9
if (this.genDataParams.status === 4) {
if (this.genDataParams.phoneNo.charAt(this.genDataParams.phoneNo.length - 1) !== '9') {
if (
this.genDataParams.phoneNo.charAt(
this.genDataParams.phoneNo.length - 1
) !== '9'
) {
return this.$message.error('开户失败对应手机尾号必须为9')
}
}
......@@ -107,12 +102,18 @@ export default {
formData.set('channel', this.genDataParams.channel)
formData.set('status', this.genDataParams.status)
const tLoading = this.$loading.service(this.loadingOptions)
genVccData(formData).then((resp) => {
if (resp !== null) {
genVccData(formData)
.then((resp) => {
if (resp !== null) {
tLoading.close()
}
this.tableData.push(resp.data.data)
})
.catch((error) => {
console.log(error)
tLoading.close()
}
this.tableData.push(resp.data.data)
})
this.$$message.error('vcc或用户中心相关服务异常,请检查!')
})
}
}
}
......
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