|
|
@@ -19,7 +19,7 @@ |
|
|
|
</template> --> |
|
|
|
</el-upload> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item class="as-bold" label="身份证反面照" prop="sideUrl" required |
|
|
|
<el-form-item class="as-bold" label="身份证反面照" prop="sideUrl" required |
|
|
|
label-width="180px"> |
|
|
|
<el-upload ref="upload2" class="avatar-uploader" |
|
|
|
style="width: 550px;height: 210px;" |
|
|
@@ -103,6 +103,14 @@ |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
<div style="width: 80%;"> |
|
|
|
<el-form-item prop="code" label="验证码" required label-width="180px" style="width: 100%;" > |
|
|
|
<el-input maxlength="6" minlength="6" clearable v-model="form.code" placeholder="请输入验证码" style="width: 60%"></el-input> |
|
|
|
<el-button type="primary" class="code-btn" @click="codeHandle()" :disabled="disabled" style="width: calc(40% - 20px);margin-left: 20px;"> |
|
|
|
{{ disabled ? `获取验证码${count}` : '获取验证码' }} |
|
|
|
</el-button> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
</el-form> |
|
|
|
<template #footer> |
|
|
|
<span class="dialog-footer"> |
|
|
@@ -134,7 +142,7 @@ |
|
|
|
}, |
|
|
|
}) |
|
|
|
const ruleFormRef = ref() |
|
|
|
|
|
|
|
const count=ref(0),disabled=ref(false),total= 60 |
|
|
|
const form = ref() |
|
|
|
const emit = defineEmits(['update:modelValue', 'success']) |
|
|
|
|
|
|
@@ -154,6 +162,7 @@ |
|
|
|
(newData) => { |
|
|
|
newRowData.value = newData |
|
|
|
form.value.oldMobile = newData.mobile |
|
|
|
form.value.oldMobileShow = newData.mobile.substring(0, 3) + '****' + newData.mobile.substring(7, 11) |
|
|
|
}) |
|
|
|
|
|
|
|
const buttonLoading = ref(false) |
|
|
@@ -190,6 +199,47 @@ |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
// 获取验证码 |
|
|
|
const codeHandle = () => { |
|
|
|
if (form.value.newMobile) { |
|
|
|
//调用接口 |
|
|
|
ruleFormRef.value.validateField(['newMobile'], (valid) => { |
|
|
|
if (!valid) { |
|
|
|
return false |
|
|
|
} |
|
|
|
const data = { |
|
|
|
businessType: 3, |
|
|
|
loginSource: '713b5ffba6b04fbd8480d46f625cef51', |
|
|
|
mobile: form.value.newMobile |
|
|
|
} |
|
|
|
BaseService.post('/iaw/portal/sendCode', data).then( |
|
|
|
(res: any) => { |
|
|
|
if (res && res.statusCode === 0) { |
|
|
|
ElMessage.success('验证码已成功发送') |
|
|
|
} |
|
|
|
timerHandler() |
|
|
|
} |
|
|
|
) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
ElMessage.error('请输入手机号!') |
|
|
|
} |
|
|
|
} |
|
|
|
// 倒计时 |
|
|
|
const timerHandler = () => { |
|
|
|
let totalTmp = total |
|
|
|
count.value = totalTmp |
|
|
|
disabled.value = true |
|
|
|
let timer = setInterval(() => { |
|
|
|
if (count.value > 1 && count.value <= totalTmp) { |
|
|
|
count.value = count.value - 1 |
|
|
|
} else { |
|
|
|
disabled.value = false |
|
|
|
clearInterval(timer) |
|
|
|
} |
|
|
|
}, 1000) |
|
|
|
} |
|
|
|
|
|
|
|
// 确定 |
|
|
|
function submit(formEl) { |
|
|
|
if (!formEl) { |
|
|
@@ -199,15 +249,16 @@ |
|
|
|
|
|
|
|
const params: any = { |
|
|
|
oldMobile: newRowData.value.mobile, |
|
|
|
id: newRowData.value.id |
|
|
|
} |
|
|
|
let searchFormList = { ...form.value } |
|
|
|
for (let key in searchFormList) { |
|
|
|
if (searchFormList[key]) { |
|
|
|
params[key] = searchFormList[key] |
|
|
|
} |
|
|
|
idNum: form.value.idNum, |
|
|
|
newMobile: form.value.newMobile, |
|
|
|
code: form.value.code |
|
|
|
} |
|
|
|
console.log(params, 'form.value') |
|
|
|
// let searchFormList = { ...form.value } |
|
|
|
// for (let key in searchFormList) { |
|
|
|
// if (searchFormList[key]) { |
|
|
|
// params[key] = searchFormList[key] |
|
|
|
// } |
|
|
|
// } |
|
|
|
formEl.validate((valid: any) => { |
|
|
|
if (valid) { |
|
|
|
BaseService.postN('/userw/account/updateMobile', params).then((res: any) => { |
|
|
@@ -215,8 +266,6 @@ |
|
|
|
isShow.value = false |
|
|
|
ElMessage.success('修改手机号成功') |
|
|
|
emit('success') |
|
|
|
} else { |
|
|
|
ElMessage.error(res.message); |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
@@ -340,7 +389,7 @@ |
|
|
|
maxlength: 30 |
|
|
|
}, |
|
|
|
{ |
|
|
|
prop: "oldMobile", |
|
|
|
prop: "oldMobileShow", |
|
|
|
label: "旧手机号", |
|
|
|
type: 'input', |
|
|
|
formLabelWidth, |
|
|
@@ -357,16 +406,7 @@ |
|
|
|
width: '80%', |
|
|
|
required: true, |
|
|
|
maxlength: 11 |
|
|
|
}, |
|
|
|
{ |
|
|
|
prop: "code", |
|
|
|
label: "验证码", |
|
|
|
type: 'input', |
|
|
|
formLabelWidth, |
|
|
|
width: '80%', |
|
|
|
required: true, |
|
|
|
maxlength: 6 |
|
|
|
}, |
|
|
|
} |
|
|
|
]); |
|
|
|
let obj = {} |
|
|
|
field.value.forEach((item) => { |