xuqiang 4 tahun lalu
induk
melakukan
170979b08e

+ 131 - 64
src/main/nine-space/src/views/asset/Detail.vue

@@ -99,7 +99,7 @@
                 <div class="top1" @click="Whisper" v-if="init2">
                     <div class="text1">悄悄话</div>
                     <div class="text2 text3" :class="{ prim: init2.opened }">
-                        <!-- <img v-if="!init2.opened" class="img" :src="init2.icon[0]" alt="" /> -->
+                        <img v-if="!init2.opened" class="img" :src="init2.icon[0]" alt="" />
                         <img v-if="init2.opened" class="img" :src="init2.icon[2]" alt="" />
                         <div class="text4" :class="{ prim: init2.opened }">
                             {{ init2.opened ? '已打开' : '未打开' }}
@@ -160,30 +160,21 @@
                 <van-button class="btn1" type="primary" block round @click="Exhibition">{{
                     info.publicShow ? '取消展示' : '公开展示'
                 }}</van-button>
-                <!-- $router.push('/Consignment?id=' + info.id) -->
                 <van-button type="primary" block round @click="Consignment">{{
                     info.consignment ? '取消寄售' : '寄售上架'
                 }}</van-button>
             </div>
         </div>
-
-        <!-- <driver /> -->
-
-        <!-- <van-collapse v-model="activeName" accordion>
-            <van-collapse-item title="交易记录" name="1">
-                <van-cell title="单元格" value="内容"> </van-cell>
-            </van-collapse-item>
-        </van-collapse> -->
         <div v-if="list.length != 0">
             <div style="padding-left: 16px" class="page-title">交易历史</div>
-            <div class="content">
-                <img class="img" :src="list.avatar" alt="" />
+            <div class="content" v-for="item in list" :key="item.id">
+                <!-- <img class="img" :src="list.avatar" alt="" /> -->
                 <div class="init">
                     <div>
-                        <div class="text1">{{ list.realName || '保密' }}</div>
+                        <div class="text1">{{ item.fromUser || '保密' }}</div>
                         <div class="text2">
-                            <div class="text3">111</div>
-                            <div class="text4">{{ list.createdAt }}</div>
+                            <div class="text3">{{ item.operation }}{{ item.price }}</div>
+                            <div class="text4">{{ item.createdAt }}</div>
                         </div>
                     </div>
                 </div>
@@ -199,17 +190,30 @@
                     <div class="title3">{{ list2.name }}</div>
                 </div>
                 <img
-                    @click="show2 = false"
+                    @click="allFn"
                     class="icon"
-                    src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-11-12-16-13-37tvHvqsIN.png"
+                    src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-11-13-13-52-01rJiHiwBy.png"
                     alt=""
                 />
             </div>
             <div class="border"></div>
-            <div class="name" v-if="list2.name == '版权权利'">该特权将证明持有者拥有该作品版权使用权力</div>
-            <div class="name1">
-                说明:<span>{{ list2.description }}</span>
+            <div class="name">{{ list2.description }}</div>
+            <div class="name1" v-if="list2.type != 'code'">
+                <img class="qrcodeImg" v-if="list2.type == 'qrcode'" :src="list2.detail" alt="" />
+                <div class="qrcode1" v-if="list2.type == 'qrcode'">扫描二维码进行票务核销</div>
+                说明:<span>{{ list2.remark || '暂无' }}</span>
+            </div>
+            <div v-if="list2.type == 'code'">
+                <div class="id">
+                    {{ list2.id }}
+                    <img @click="copy" src="../../assets/svgs/copy_icon.svg" alt="" />
+                </div>
+
+                <span class="span">说明:</span> <span>{{ list2.remark || '暂无' }}</span>
+                <div class="border"></div>
+                <div class="code">每次交易都会产生校验码</div>
             </div>
+            <div v-if="list2.openTime" class="timename"><span class="time">截止时间:</span>{{ list2.openTime }}</div>
         </van-popup>
         <!-- 悄悄话 -->
         <van-popup v-model:show="show3">
@@ -219,17 +223,18 @@
                     <div class="title3">{{ init2.name }}</div>
                 </div>
                 <img
-                    @click="show2 = false"
+                    @click="allFn2"
                     class="icon"
-                    src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-11-12-16-13-37tvHvqsIN.png"
+                    src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-11-13-13-52-01rJiHiwBy.png"
                     alt=""
                 />
             </div>
             <div class="border"></div>
-            <div class="name">藏有创作者填写的隐藏内容,持有者才能打开</div>
+            <div class="name">{{ init2.description }}</div>
             <div class="name1">
-                说明:<span>{{ init2.description }}</span>
+                说明:<span>{{ init2.remark || '暂无' }}</span>
             </div>
+            <div v-if="init2.openTime" class="timename"><span class="time">开启时间:</span>{{ init2.openTime }}</div>
         </van-popup>
         <!-- 悄悄话 -->
         <div class="whisper">
@@ -289,7 +294,6 @@ export default {
             liked: false,
             show2: false,
             show3: false,
-            show4: false,
             btn: null,
             list: [],
             show: false,
@@ -319,51 +323,70 @@ export default {
         }, 1000);
     },
     methods: {
+        allFn() {
+            this.show = false;
+            this.getProduct();
+        },
+        allFn2() {
+            this.show3 = false;
+            this.getProduct();
+        },
+        copy() {
+            this.$copyText(this.list2.id).then(
+                e => {
+                    this.$toast.success('复制成功');
+                    console.log(e);
+                },
+                e => {
+                    this.$toast('复制失败');
+                    console.log(e);
+                }
+            );
+        },
         privilegeFn(init) {
             this.list2 = init;
-            this.show = true;
+            // this.show = true;
             // && !init.opened
-            // if (!init.once) {
-            //     this.show = true;
-            //     this.$http
-            //         .post('/asset/usePrivilege', {
-            //             assetId: this.info.id,
-            //             privilegeId: init.id
-            //         })
-            //         .then(res => {
-            //             console.log(res);
-            //         });
-            // }
+            if (!init.once) {
+                this.show = true;
+                this.$http
+                    .post('/asset/usePrivilege', {
+                        assetId: this.info.id,
+                        privilegeId: init.id
+                    })
+                    .then(res => {
+                        console.log(res);
+                    });
+            }
         },
         openedFn() {
             this.show2 = false;
             this.show3 = true;
-            // if (!this.init2.once) {
-            //     this.show2 = false;
-            //     this.show4 = true;
-            //     this.$http
-            //         .post('/asset/usePrivilege', {
-            //             assetId: this.info.id,
-            //             privilegeId: this.init2.id
-            //         })
-            //         .then(res => {
-            //             console.log(res);
-            //         });
-            // }
+            if (!this.init2.once) {
+                // this.show2 = false;
+                this.$http
+                    .post('/asset/usePrivilege', {
+                        assetId: this.info.id,
+                        privilegeId: this.init2.id
+                    })
+                    .then(res => {
+                        console.log(res);
+                    });
+            }
         },
         Whisper() {
-            this.show2 = true;
-            // if (!this.init2.once) {
-            //     this.show2 = true;
-            //     this.$http
-            //         .post('/asset/usePrivilege', {
-            //             assetId: this.info.id,
-            //             privilegeId: this.init2.id
-            //         })
-            //         .then(res => {
-            //             console.log(res);
-            //         });
-            // }
+            // this.show2 = true;
+            if (!this.init2.once) {
+                this.show2 = true;
+                this.$http
+                    .post('/asset/usePrivilege', {
+                        assetId: this.info.id,
+                        privilegeId: this.init2.id
+                    })
+                    .then(res => {
+                        console.log(res);
+                    });
+            }
         },
         record() {
             this.$http
@@ -756,10 +779,53 @@ export default {
         border-radius: 4px;
         color: #939599;
         margin-bottom: 11px;
+        .qrcodeImg {
+            width: 93px;
+            height: 93px;
+            border-radius: 11px;
+            margin-left: 60px;
+        }
+        .qrcode1 {
+            font-size: 12px;
+            font-weight: 400;
+            color: #939599;
+            line-height: 18px;
+            margin: 12px 0px 12px 44px;
+        }
+    }
+    .timename {
+        color: #ff4f50;
+        font-size: 12px;
+        padding-bottom: 12px;
+    }
+    .time {
+        color: #939599;
+        font-size: 12px;
+    }
+    .id {
+        width: 220px;
+        height: 42px;
+        background: #f5f7fa;
+        border-radius: 24px;
+        text-align: center;
+        line-height: 42px;
+        font-size: 16px;
+        margin-bottom: 16px;
+        color: #303133;
     }
     span {
         color: #303133;
     }
+    .span {
+        color: #939599;
+    }
+    .code {
+        font-size: 12px;
+        font-weight: 400;
+        color: #939599;
+        line-height: 18px;
+        padding-bottom: 12px;
+    }
     .name {
         font-size: 12px;
         font-weight: 400;
@@ -830,9 +896,10 @@ export default {
         }
     }
     .prive {
-        // display: flex;
+        display: flex;
         align-items: center;
-        width: 200px !important;
+        width: 100%;
+        flex-wrap: wrap;
         .prive1 {
             display: flex;
             align-items: center;
@@ -887,7 +954,7 @@ export default {
     align-items: center;
     justify-content: center;
     flex-direction: column;
-
+    margin: 0 16px;
     .text1 {
         font-size: 14px;
         color: #939599;

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

@@ -15,14 +15,7 @@
                 @cancel="$router.go(-1)"
             />
         </van-sticky>
-        <van-list
-            class="list"
-            v-model:loading="loading"
-            :immediate-check="false"
-            :finished="finished"
-            finished-text=""
-            @load="getData"
-        >
+        <van-list class="list" :immediate-check="false" :finished="finished" finished-text="" @load="getData">
             <div
                 v-if="info.length != 0"
                 class="content"