xuqiang 4 лет назад
Родитель
Сommit
9cf5290057

+ 19 - 9
src/main/nine-space/src/views/account/TradingPassword.vue

@@ -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() {

+ 5 - 1
src/main/nine-space/src/views/asset/Consignment.vue

@@ -71,7 +71,11 @@ export default {
                                 price: this.price
                             })
                             .then(res => {
-                                console.log(res);
+                                // console.log(res);
+                                this.$toast.success('寄售成功');
+                                setTimeout(() => {
+                                    this.$router.replace('/assetDetail?id=' + this.$route.query.id);
+                                }, 1000);
                             })
                             .catch(e => {
                                 if (e) {

+ 4 - 2
src/main/nine-space/src/views/asset/Detail.vue

@@ -421,8 +421,10 @@ export default {
                         return this.$http.post(`/asset/cancelConsignment?id=${this.info.id}`);
                     })
                     .then(res => {
-                        this.getProduct();
                         this.$message.success('取消寄售');
+                        setTimeout(() => {
+                            this.getProduct();
+                        }, 1000);
                     });
             }
         },
@@ -566,7 +568,7 @@ export default {
                 font-weight: 400;
                 color: #939599;
                 line-height: 24px;
-                margin-left: 137px;
+                margin-left: 156px;
             }
         }
     }