|
|
@@ -2,14 +2,14 @@
|
|
|
<div class="container">
|
|
|
<el-steps :space="180" :active="2" align-center>
|
|
|
<el-step title="验证当前手机号"></el-step>
|
|
|
- <el-step title="绑定新手机号"></el-step>
|
|
|
+ <el-step title="修改交易密码"></el-step>
|
|
|
<el-step title="完成"></el-step>
|
|
|
</el-steps>
|
|
|
<el-form :label-position="labelPosition" ref="form2" label-width="290px" :model="ruleForm" :rules="rules">
|
|
|
- <el-form-item label="新交易密码" prop="password">
|
|
|
+ <el-form-item label="新交易密码" prop="password" οnkeyup="value=value.replace(/[^\d]/g,'')">
|
|
|
<el-input
|
|
|
style="width: 300px"
|
|
|
- type="password"
|
|
|
+ type="number"
|
|
|
v-model="ruleForm.password"
|
|
|
placeholder="请输入新密码"
|
|
|
autocomplete="off"
|
|
|
@@ -18,7 +18,7 @@
|
|
|
<el-form-item label="确认新密码" prop="checkPass">
|
|
|
<el-input
|
|
|
style="width: 300px"
|
|
|
- type="password"
|
|
|
+ type="number"
|
|
|
v-model="ruleForm.checkPass"
|
|
|
placeholder="请再次输出新密码"
|
|
|
autocomplete="off"
|
|
|
@@ -59,7 +59,7 @@ export default {
|
|
|
},
|
|
|
trigger: 'blur'
|
|
|
},
|
|
|
- { required: true, message: '请再次输入密码', trigger: 'blur' }
|
|
|
+ { min: 8, max: 8, message: '密码长度在 8 到 8 个数字', trigger: 'blur' }
|
|
|
]
|
|
|
}
|
|
|
};
|
|
|
@@ -69,23 +69,26 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
phoneSend() {
|
|
|
- console.log(this.code);
|
|
|
- this.$http
|
|
|
- .post('/user/setTradeCode', {
|
|
|
- token: this.code,
|
|
|
- tradeCode: this.ruleForm.password
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- this.$message.success('设置成功');
|
|
|
- setTimeout(() => {
|
|
|
- this.$router.push('/transactionsuccess');
|
|
|
- }, 1000);
|
|
|
- })
|
|
|
- .catch(e => {
|
|
|
- if (e) {
|
|
|
- this.$message(e.error);
|
|
|
- }
|
|
|
- });
|
|
|
+ this.$refs.form2.validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ this.$http
|
|
|
+ .post('/user/setTradeCode', {
|
|
|
+ token: this.code,
|
|
|
+ tradeCode: this.ruleForm.password
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.$message.success('设置成功');
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$router.push('/transactionsuccess');
|
|
|
+ }, 1000);
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ if (e) {
|
|
|
+ this.$message(e.error);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
Jump() {
|
|
|
this.$emit('Jump');
|
|
|
@@ -93,6 +96,21 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
+<style>
|
|
|
+input[type='number'] {
|
|
|
+ -moz-appearance: textfield;
|
|
|
+}
|
|
|
+input[type='number']::-webkit-inner-spin-button,
|
|
|
+input[type='number']::-webkit-outer-spin-button {
|
|
|
+ -webkit-appearance: none;
|
|
|
+ margin: 0;
|
|
|
+}
|
|
|
+input::-webkit-outer-spin-button,
|
|
|
+input::-webkit-inner-spin-button {
|
|
|
+ -webkit-appearance: none !important;
|
|
|
+ margin: 0;
|
|
|
+}
|
|
|
+</style>
|
|
|
<style lang="less" scoped>
|
|
|
/deep/ .el-steps {
|
|
|
margin-left: 329px;
|
|
|
@@ -125,6 +143,10 @@ export default {
|
|
|
/deep/ .el-step__title.is-wait {
|
|
|
color: #939599;
|
|
|
}
|
|
|
+/deep/ .el-form-item__error {
|
|
|
+ margin-left: 176px;
|
|
|
+}
|
|
|
+
|
|
|
.container {
|
|
|
.btn1 {
|
|
|
margin-left: 10px;
|