|
|
@@ -132,17 +132,27 @@ export default {
|
|
|
forbidClick: true
|
|
|
});
|
|
|
this.$http
|
|
|
- .post('/user/setTradeCode?code=' + this.form.code + '&tradeCode=' + this.password)
|
|
|
- .then(() => {
|
|
|
- this.$toast.success('设置成功');
|
|
|
- setTimeout(() => {
|
|
|
- this.$router.back();
|
|
|
- }, 1500);
|
|
|
+ .get('/sms/verify', {
|
|
|
+ phone: this.userInfo.phone,
|
|
|
+ code: this.form.code
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ this.$http
|
|
|
+ .post('/user/setTradeCode?token=' + res + '&tradeCode=' + this.password)
|
|
|
+ .then(() => {
|
|
|
+ this.$toast.success('设置成功');
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$router.back();
|
|
|
+ }, 1500);
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ if (e) {
|
|
|
+ this.$toast(e.error);
|
|
|
+ }
|
|
|
+ });
|
|
|
})
|
|
|
.catch(e => {
|
|
|
- if (e) {
|
|
|
- this.$toast(e.error);
|
|
|
- }
|
|
|
+ this.$message.error(e.error);
|
|
|
});
|
|
|
},
|
|
|
next() {
|