|
|
|
@ -15,7 +15,7 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="p-md "> |
|
|
|
<v-button block type="white" class="w-max rounded-md" ref="btn" @click="setPassword">{{$t('safe.b7')}}</v-button> |
|
|
|
<v-button block :type="buttonType" class="w-max rounded-md" ref="btn" @click="setPassword">{{$t('safe.b7')}}</v-button> |
|
|
|
</view> |
|
|
|
</main> |
|
|
|
|
|
|
|
@ -39,6 +39,17 @@ export default { |
|
|
|
...mapState({ |
|
|
|
user: "user", |
|
|
|
}), |
|
|
|
buttonType() { |
|
|
|
return this.arePasswordsValid ? 'blue' : 'white1'; |
|
|
|
}, |
|
|
|
isButtonDisabled() { |
|
|
|
return !this.arePasswordsValid; |
|
|
|
}, |
|
|
|
arePasswordsValid() { |
|
|
|
return this.form.password !== '' && |
|
|
|
this.form.password_confirmation !== '' && |
|
|
|
this.form.password === this.form.password_confirmation; |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
setPassword() { |
|
|
|
@ -46,8 +57,10 @@ export default { |
|
|
|
Setting.withdrawalPassword(data, { btn: this.$refs.btn }) |
|
|
|
.then((res) => { |
|
|
|
if(res.code==200){ |
|
|
|
this.$back(); |
|
|
|
this.$toast.success(this.$t('safe.d3')); |
|
|
|
setTimeout(()=>{ |
|
|
|
this.$back(); |
|
|
|
},2000) |
|
|
|
} |
|
|
|
}).catch(() => {}); |
|
|
|
}, |
|
|
|
|