Commit ecd29344 authored by 黎博's avatar 黎博

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

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