xuqiang 4 years ago
parent
commit
99c4c21a07

+ 13 - 29
src/main/nine-space/src/components/order/OrderInfo.vue

@@ -39,7 +39,6 @@
 <script>
 import order from '../../mixins/order';
 import product from '../../mixins/product';
-import list from '../../mixins/list';
 export default {
     props: {
         info: {
@@ -49,30 +48,17 @@ export default {
             }
         }
     },
-    setup() {
-        const click = function () {
-            // console.log('wyt6w');
-        };
+    // setup() {
+    //     const click = function () {
+    //         // console.log('wyt6w');
+    //     };
 
-        return { click };
-    },
-    data() {
-        return {
-            url: '/order/all'
-        };
-    },
-    mixins: [order, product, list],
+    //     return { click };
+    // },
+    mixins: [order, product],
     methods: {
-        beforeData() {
-            return {
-                search: this.search,
-                query: {
-                    userId: this.userInfo.id,
-                    status: this.type,
-                    hide: false,
-                    del: false
-                }
-            };
+        delInit() {
+            this.$emit('delFn');
         },
         del() {
             this.$http
@@ -80,12 +66,10 @@ export default {
                     id: this.info.id
                 })
                 .then(() => {
-                    this.getData();
-                    //hide:false
-                    // this.$message.success('删除成功');
-                    // setTimeout(() => {
-                    //     this.getData();
-                    // }, 1000);
+                    this.$toast.success('删除成功');
+                    setTimeout(() => {
+                        this.delInit();
+                    }, 1000);
                 });
         },
         likeProduct() {

+ 1 - 0
src/main/nine-space/src/mixins/list.js

@@ -9,6 +9,7 @@ export default {
     },
     methods: {
         getData(isFirst = false) {
+            console.log('调动了');
             if (isFirst) {
                 this.page = 0;
                 this.list = [];

+ 8 - 1
src/main/nine-space/src/views/Givesubmit.vue

@@ -7,7 +7,9 @@
                 <div class="text1">
                     {{ info.name }}
                 </div>
+                <!-- <div class="text">编号:{{ info.id }}</div> -->
                 <div class="no"></div>
+
                 <div class="price">¥{{ info.price }}</div>
             </div>
         </div>
@@ -292,7 +294,12 @@ export default {
             color: #939599;
             line-height: 24px;
         }
-
+        .text {
+            font-size: 14px;
+            color: #939599;
+            line-height: 24px;
+            margin-top: 4px;
+        }
         .text1 {
             font-size: 16px;
             font-weight: bold;

+ 12 - 7
src/main/nine-space/src/views/asset/Detail.vue

@@ -94,7 +94,7 @@
             <div class="top">
                 <div class="top1">
                     <div class="text1">类型</div>
-                    <div class="text2">{{ info.category }}</div>
+                    <div class="text2">{{ info.category || '暂无' }}</div>
                 </div>
                 <div class="top1" @click="Whisper" v-if="init2">
                     <div class="text1">悄悄话</div>
@@ -488,12 +488,17 @@ export default {
             this.$http.get('/asset/get/' + this.$route.query.id).then(res => {
                 this.info = res;
                 this.tokenId = this.info.tokenId;
-                this.init2 = res.privileges.find(item => {
-                    return item.name === '悄悄话';
-                });
-                this.init = res.privileges.filter(item => {
-                    return item.name !== '悄悄话';
-                });
+                if (res.privileges) {
+                    this.init2 = res.privileges.find(item => {
+                        return item.name === '悄悄话';
+                    });
+                }
+                if (res.privileges) {
+                    this.init = res.privileges.filter(item => {
+                        return item.name !== '悄悄话';
+                    });
+                }
+
                 this.$nextTick(() => {
                     if (this.isBuy) {
                         this.btn = this.$refs.btn;

+ 9 - 2
src/main/nine-space/src/views/order/Orders.vue

@@ -21,7 +21,7 @@
         </van-sticky>
 
         <van-list class="list" v-model:loading="loading" :finished="finished" finished-text="" @load="getData">
-            <order-info v-for="item in list" :key="item.id" :info="item"></order-info>
+            <order-info @delFn="delFn" v-for="item in list" :key="item.id" :info="item"></order-info>
             <van-empty v-if="empty" description="还没有订单哦~" />
         </van-list>
     </div>
@@ -72,10 +72,17 @@ export default {
                 query: {
                     userId: this.$store.state.userInfo.id,
                     status: this.status,
-                    type: this.type
+                    type: this.type,
+                    hide: false,
+                    del: false
                 }
             };
         },
+        delFn() {
+            console.log('删除成功');
+            this.getData(true);
+            this.beforeData();
+        },
         changeStatus(name) {
             this.$router.replace({
                 path: '/orders',

+ 12 - 3
src/main/pc-space/src/components/ConsignmentInfo.vue

@@ -46,7 +46,7 @@
                 </div>
             </div>
             <div class="sub-btn">
-                <div @click="Login" class="btn1">确定</div>
+                <el-button :disabled="btn" @click="Login" class="btn1">确定</el-button>
                 <div class="btn2" @click="isShow = false">返回</div>
             </div>
         </div>
@@ -81,7 +81,15 @@ export default {
             ]
         };
     },
-    computed: {},
+    computed: {
+        btn() {
+            if (this.form.price && this.form.password) {
+                return true;
+            } else {
+                return false;
+            }
+        }
+    },
     methods: {
         handleClose() {
             this.isShow = false;
@@ -209,9 +217,10 @@ input::-webkit-inner-spin-button {
             background: linear-gradient(135deg, @prim 0%, @warn 100%);
             border-radius: 4px;
             font-size: 13px;
-            line-height: 36px;
+            // line-height: 36px;
             color: #1a1a1a;
             cursor: pointer;
+            border: 0;
             text-align: center;
             margin-right: 20px;
         }

+ 12 - 6
src/main/pc-space/src/router/index.js

@@ -32,7 +32,8 @@ const routes = [
                 name: 'casting',
                 component: () => import('../views/Casting.vue'),
                 meta: {
-                    title: '铸造'
+                    title: '铸造',
+                    checkLogin: true
                 }
             },
             {
@@ -40,7 +41,8 @@ const routes = [
                 name: 'castingDetail',
                 component: () => import('../views/CastingDetail.vue'),
                 meta: {
-                    title: '铸造'
+                    title: '铸造',
+                    checkLogin: true
                 }
             },
             {
@@ -48,7 +50,8 @@ const routes = [
                 name: 'collection',
                 component: () => import('../views/Collection.vue'),
                 meta: {
-                    title: '收藏探索'
+                    title: '收藏探索',
+                    checkLogin: true
                 }
             },
             {
@@ -56,7 +59,8 @@ const routes = [
                 name: 'blindbox',
                 component: () => import('../views/Blindsbox.vue'),
                 meta: {
-                    title: '数字盲盒'
+                    title: '数字盲盒',
+                    checkLogin: true
                 }
             },
             {
@@ -64,7 +68,8 @@ const routes = [
                 name: 'collectionDetail',
                 component: () => import('../views/CollectionDetail.vue'),
                 meta: {
-                    title: '数字盲盒详情'
+                    title: '数字盲盒详情',
+                    checkLogin: true
                 }
             },
             {
@@ -72,7 +77,8 @@ const routes = [
                 name: 'assetDetail',
                 component: () => import('../views/AssetDetail.vue'),
                 meta: {
-                    title: 'NFT详情'
+                    title: 'NFT详情',
+                    checkLogin: true
                 }
             },
             {

+ 30 - 20
src/main/pc-space/src/views/AssetDetail.vue

@@ -124,14 +124,18 @@
                     <div class="name name2">持有特权<span>(灰色表示已使用)</span></div>
                 </div>
                 <div class="init1">
-                    <div class="name">{{ info.category }}</div>
+                    <div class="name">{{ info.category || '暂无' }}</div>
                     <div class="bor"></div>
                     <div class="box" v-if="init2 != ''">
-                        <img @click="Whisper" v-if="init2.opened" class="img" :src="init2.icon[2]" alt="" />
-                        <img @click="Whisper" v-else class="img" :src="init2.icon[0]" alt="" />
+                        <div v-if="init2">
+                            <img @click="Whisper" v-if="init2.opened" class="img" :src="init2.icon[2]" alt="" />
+                            <img @click="Whisper" v-else class="img" :src="init2.icon[0]" alt="" />
+                        </div>
+                        <div class="del" v-else>铸造者未设置</div>
                     </div>
-                    <div class="del" v-else>铸造者未设置</div>
+
                     <div class="bor"></div>
+                    <!-- <div v-if="init"> -->
                     <div class="iconBox" v-if="init.length > 0">
                         <div v-for="(item, index) in init" :key="index">
                             <div @click.stop="privilegeFn(item)">
@@ -141,6 +145,7 @@
                         </div>
                     </div>
                     <div class="del" v-else>铸造者未设置</div>
+                    <!-- </div> -->
                 </div>
                 <div style="margin-top: 30px" v-if="properties.length != 0">
                     <div class="time">
@@ -213,10 +218,10 @@
             <div class="Whisper1">点击图标打开悄悄话,(隐藏内容,只能开启一次)</div>
         </el-dialog>
         <!-- 悄悄话 -->
-        <el-dialog append-to-body :visible.sync="show3" :before-close="handleClose2">
+        <el-dialog append-to-body v-if="init2" :visible.sync="show3" :before-close="handleClose2">
             <div class="title2">
-                <img class="img" :src="init2.icon[1]" alt="" />
-                <div class="title3">{{ init2.name }}</div>
+                <img class="img" v-if="init2.icon" :src="init2.icon[1]" alt="" />
+                <div class="title3">悄悄话</div>
             </div>
             <div class="border"></div>
             <div class="name">藏有创作者填写的隐藏内容,持有者才能打开</div>
@@ -227,7 +232,7 @@
         </el-dialog>
         <!-- 其余三个 -->
         <el-dialog append-to-body :visible.sync="show4" :before-close="handleClose">
-            <div class="title2" v-if="list2">
+            <div class="title2">
                 <div class="title3">{{ list2.name }}</div>
             </div>
             <div class="border"></div>
@@ -291,7 +296,8 @@ export default {
             list: [],
             init: [],
             init2: [],
-            list2: []
+            list2: [],
+            opened: ''
         };
     },
     computed: {
@@ -338,14 +344,17 @@ export default {
             );
         },
         handleClose2() {
+            console.log(111);
             this.show3 = false;
             this.getDetail();
         },
         handleClose() {
+            console.log(111);
             this.show4 = false;
             this.getDetail();
         },
         Whisper() {
+            console.log(111);
             if (!this.init2.once) {
                 this.show2 = true;
                 this.$http
@@ -359,7 +368,7 @@ export default {
             }
         },
         privilegeFn(init) {
-            console.log(this.init2.length);
+            console.log(111);
             this.list2 = init;
             if (!init.once) {
                 this.show4 = true;
@@ -374,6 +383,7 @@ export default {
             }
         },
         openedFn() {
+            console.log(111);
             this.show2 = false;
             this.show3 = true;
             if (!this.init2.once) {
@@ -401,16 +411,16 @@ export default {
         getDetail() {
             this.$http.get('/asset/get/' + this.$route.query.id).then(res => {
                 this.info = res;
-                this.init2 = res.privileges.find(item => {
-                    return item.name === '悄悄话';
-                });
-                console.log(this.init2);
-                console.log(this.init2.icon[0]);
-                this.init = res.privileges.filter(item => {
-                    return item.name !== '悄悄话';
-                });
-                console.log(this.init);
-                // console.log(this.init2.icon[0]);
+                if (res.privileges) {
+                    this.init2 = res.privileges.find(item => {
+                        return item.name === '悄悄话';
+                    });
+                }
+                if (res.privileges) {
+                    this.init = res.privileges.filter(item => {
+                        return item.name !== '悄悄话';
+                    });
+                }
                 this.loading = false;
                 this.getTime(res.startTime);
                 this.getRelated(res.ownerId);

+ 2 - 2
src/main/pc-space/src/views/Submit.vue

@@ -47,9 +47,9 @@
             </div>
         </div>
 
-        <span slot="footer" class="dialog-footer">
+        <!-- <span slot="footer" class="dialog-footer">
             <el-button type="primary" class="pay" @click="submit">确认</el-button>
-        </span>
+        </span> -->
     </el-dialog>
 </template>