xuqiang 4 лет назад
Родитель
Сommit
1b946cdfa1

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

@@ -152,7 +152,7 @@ export default {
                         });
                 })
                 .catch(e => {
-                    this.$message.error(e.error);
+                    this.$toast.error(e.error);
                 });
         },
         next() {

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

@@ -78,7 +78,7 @@ export default {
                             })
                             .catch(e => {
                                 if (e) {
-                                    this.$toast(e.error);
+                                    this.$toast.success(e.error);
                                 }
                             });
                     })

+ 18 - 14
src/main/nine-space/src/views/asset/Detail.vue

@@ -381,7 +381,6 @@ export default {
             }
         },
         Whisper() {
-            // this.show2 = true;
             if (!this.init2.once) {
                 this.show2 = true;
                 this.$http
@@ -445,25 +444,32 @@ export default {
                 Dialog.confirm({
                     title: '公开展示',
                     message: '藏品将公开展示,无报价'
-                })
-                    .then(() => {
-                        return this.$http.post(`/asset/publicShow?id=${this.info.id}`);
-                    })
-                    .then(res => {
-                        this.getProduct();
-                        this.$toast.success('展示成功');
-                    });
+                }).then(() => {
+                    return this.$http
+                        .post(`/asset/publicShow?id=${this.info.id}`)
+                        .then(res => {
+                            this.$toast.success('展示成功');
+                            setTimeout(() => {
+                                this.getProduct();
+                            }, 1000);
+                        })
+                        .catch(e => {
+                            this.$toast.success(e.error);
+                        });
+                });
             } else {
                 Dialog.confirm({
                     title: '取消展示',
-                    message: '藏品将公开展示,无报价'
+                    message: '藏品将取消展示,无报价'
                 })
                     .then(() => {
                         return this.$http.post(`/asset/cancelPublic?id=${this.info.id}`);
                     })
                     .then(res => {
-                        this.getProduct();
-                        this.$toast.success('取消展示');
+                        this.$toast.success('取消成功');
+                        setTimeout(() => {
+                            this.getProduct();
+                        }, 1000);
                     });
             }
         },
@@ -488,8 +494,6 @@ export default {
                 this.init = res.privileges.filter(item => {
                     return item.name !== '悄悄话';
                 });
-                // console.log(this.init);
-                console.log(this.info);
                 this.$nextTick(() => {
                     if (this.isBuy) {
                         this.btn = this.$refs.btn;

+ 12 - 9
src/main/pc-space/src/views/AssetDetail.vue

@@ -497,14 +497,17 @@ export default {
                     cancelButtonText: '取消',
                     customClass: 'myClass',
                     center: true
-                })
-                    .then(() => {
-                        return this.$http.post(`/asset/publicShow?id=${this.info.id}`);
-                    })
-                    .then(res => {
-                        this.getDetail();
-                        this.$message.success('展示成功');
-                    });
+                }).then(() => {
+                    this.$http
+                        .post(`/asset/publicShow?id=${this.info.id}`)
+                        .then(res => {
+                            this.getDetail();
+                            this.$message.success('展示成功');
+                        })
+                        .catch(e => {
+                            this.$message.warning(e.error);
+                        });
+                });
             } else {
                 this.$confirm('藏品将取消展示', '取消展示', {
                     confirmButtonText: '确定',
@@ -517,7 +520,7 @@ export default {
                     })
                     .then(res => {
                         this.getDetail();
-                        this.$message.success('取消展示');
+                        this.$message.success('取消成功');
                     });
             }
         },