xuqiang 4 tahun lalu
induk
melakukan
4b5732aff6
1 mengubah file dengan 27 tambahan dan 18 penghapusan
  1. 27 18
      src/main/nine-space/src/views/asset/Detail.vue

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

@@ -432,27 +432,36 @@ export default {
                 });
         },
         Consignment() {
-            if (!this.info.consignment) {
+            if (this.userInfo.authStatus === 'SUCCESS') {
+                if (!this.info.consignment) {
+                    Dialog.confirm({
+                        title: '寄售上架',
+                        message: '确定寄售上架吗?'
+                    }).then(() => {
+                        this.$router.push('/Consignment?id=' + this.info.id);
+                    });
+                } else {
+                    Dialog.confirm({
+                        title: '取消寄售',
+                        message: '确定取消寄售吗?'
+                    })
+                        .then(() => {
+                            return this.$http.post(`/asset/cancelConsignment?id=${this.info.id}`);
+                        })
+                        .then(res => {
+                            this.$toast.success('取消寄售');
+                            setTimeout(() => {
+                                this.getProduct();
+                            }, 1000);
+                        });
+                }
+            } else {
                 Dialog.confirm({
-                    title: '寄售上架',
-                    message: '确定寄售上架吗?'
+                    title: '认证信息',
+                    message: '用户未认证,是否立即认证'
                 }).then(() => {
-                    this.$router.push('/Consignment?id=' + this.info.id);
+                    this.$router.push('/Authentication');
                 });
-            } else {
-                Dialog.confirm({
-                    title: '取消寄售',
-                    message: '确定取消寄售吗?'
-                })
-                    .then(() => {
-                        return this.$http.post(`/asset/cancelConsignment?id=${this.info.id}`);
-                    })
-                    .then(res => {
-                        this.$toast.success('取消寄售');
-                        setTimeout(() => {
-                            this.getProduct();
-                        }, 1000);
-                    });
             }
         },
         Add() {