xuqiang 4 năm trước cách đây
mục cha
commit
3148ce6a81
1 tập tin đã thay đổi với 147 bổ sung123 xóa
  1. 147 123
      src/main/nine-space/src/views/asset/Detail.vue

+ 147 - 123
src/main/nine-space/src/views/asset/Detail.vue

@@ -91,15 +91,6 @@
         <driver />
 
         <div class="goods">
-            <template v-if="properties.length > 0">
-                <div class="page-title">商品特性</div>
-                <div class="specific-list">
-                    <div class="specific-item" v-for="(item, index) in properties" :key="index">
-                        <div class="text1">{{ item.name }}</div>
-                        <div class="text2">{{ item.value }}</div>
-                    </div>
-                </div>
-            </template>
             <div class="top">
                 <div class="top1">
                     <div class="text1">类型</div>
@@ -130,6 +121,15 @@
                     </div>
                 </div>
             </div>
+            <template v-if="properties.length > 0">
+                <div class="page-title">商品特性</div>
+                <div class="specific-list">
+                    <div class="specific-item" v-for="(item, index) in properties" :key="index">
+                        <div class="text1">{{ item.name }}</div>
+                        <div class="text2">{{ item.value }}</div>
+                    </div>
+                </div>
+            </template>
             <div class="page-title">链上信息</div>
             <div class="page-text">
                 Hash地址:{{ info.txHash }}<br />
@@ -191,58 +191,68 @@
         </div>
 
         <driver />
-        <van-dialog v-model:show="show" confirm-button-text="返回">
+        <!-- 其他三个 -->
+        <van-popup v-model:show="show">
             <div class="title2">
-                <img class="img" :src="list2.icon[1]" alt="" />
-                <div class="title3">{{ list2.name }}</div>
+                <div class="top">
+                    <img class="img" :src="list2.icon[1]" alt="" />
+                    <div class="title3">{{ list2.name }}</div>
+                </div>
+                <img
+                    @click="show2 = false"
+                    class="icon"
+                    src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-11-12-16-13-37tvHvqsIN.png"
+                    alt=""
+                />
             </div>
             <div class="border"></div>
             <div class="name" v-if="list2.name == '版权权利'">该特权将证明持有者拥有该作品版权使用权力</div>
             <div class="name1">
                 说明:<span>{{ list2.description }}</span>
             </div>
-            <!-- <div class="name" v-if="init.name == '铸造'">注:使用后后该特权将不能二次使用</div> -->
-        </van-dialog>
-        <van-dialog v-model:show="show3" confirm-button-text="返回">
-            <div class="title2">
-                <img class="img" :src="init2.icon[1]" alt="" />
-                <div class="title3">{{ init2.name }}</div>
-            </div>
-            <div class="border"></div>
-            <div class="name">藏有创作者填写的隐藏内容,持有者才能打开</div>
-            <div class="name1">
-                说明:<span>{{ init2.description }}</span>
-            </div>
-        </van-dialog>
-        <van-dialog v-model:show="show4" confirm-button-text="返回">
+        </van-popup>
+        <!-- 悄悄话 -->
+        <van-popup v-model:show="show3">
             <div class="title2">
-                <img class="img" :src="init2.icon[1]" alt="" />
-                <div class="title3">{{ init2.name }}</div>
+                <div class="top">
+                    <img class="img" :src="init2.icon[1]" alt="" />
+                    <div class="title3">{{ init2.name }}</div>
+                </div>
+                <img
+                    @click="show2 = false"
+                    class="icon"
+                    src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-11-12-16-13-37tvHvqsIN.png"
+                    alt=""
+                />
             </div>
             <div class="border"></div>
             <div class="name">藏有创作者填写的隐藏内容,持有者才能打开</div>
             <div class="name1">
                 说明:<span>{{ init2.description }}</span>
             </div>
-        </van-dialog>
-        <van-popup v-model:show="show2">
-            <div class="con">
-                <div class="Whisper">提示</div>
+        </van-popup>
+        <!-- 悄悄话 -->
+        <div class="whisper">
+            <van-popup v-model:show="show2">
+                <div class="con">
+                    <div class="Whisper">提示</div>
+                    <img
+                        @click="show2 = false"
+                        class="icon"
+                        src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-11-12-16-13-37tvHvqsIN.png"
+                        alt=""
+                    />
+                </div>
                 <img
-                    @click="show2 = false"
-                    class="icon"
-                    src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-11-12-16-13-37tvHvqsIN.png"
+                    @click="openedFn"
+                    class="imgBox"
+                    src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-11-12-16-13-07DtWLMcPy.png"
                     alt=""
                 />
-            </div>
-            <img
-                @click="openedFn"
-                class="imgBox"
-                src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-11-12-16-13-07DtWLMcPy.png"
-                alt=""
-            />
-            <div class="Whisper1">点击图标打开悄悄话,(隐藏内容,只能开启一次)</div>
-        </van-popup>
+                <div class="Whisper1">点击图标打开悄悄话,(隐藏内容,只能开启一次)</div>
+            </van-popup>
+        </div>
+
         <post :info="info" pageUrl="assetDetail" />
     </div>
 </template>
@@ -311,47 +321,49 @@ export default {
     methods: {
         privilegeFn(init) {
             this.list2 = init;
+            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 = true;
-            this.show3 = false;
-            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);
-                    });
-            }
+            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);
+            //         });
+            // }
         },
         Whisper() {
-            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
@@ -634,41 +646,44 @@ export default {
         font-size: 13px;
     }
 }
-/deep/ .van-popup {
-    width: 260px;
-    background: rgb(209, 206, 18);
-    border-radius: 10px;
-    .con {
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        padding: 12px 16px 0;
-        .Whisper {
-            font-size: 16px;
-            font-weight: 400;
-            color: #000000;
-            line-height: 24px;
+.whisper {
+    /deep/ .van-popup {
+        width: 260px;
+        background: rgb(209, 206, 18);
+        border-radius: 10px;
+        .con {
+            display: flex;
+            align-items: center;
+            justify-content: space-between;
+            padding: 12px 16px 0;
+            .Whisper {
+                font-size: 16px;
+                font-weight: 400;
+                color: #000000;
+                line-height: 24px;
+            }
+            .icon {
+                width: 24px;
+                height: 24px;
+            }
         }
-        .icon {
-            width: 24px;
-            height: 24px;
+        .imgBox {
+            width: 80px;
+            height: 80px;
+            text-align: center;
+            margin: 30px 90px 22px;
+        }
+        .Whisper1 {
+            font-size: 12px;
+            font-weight: 400;
+            color: #303133;
+            line-height: 18px;
+            padding-bottom: 36px;
+            margin: 0 64px;
         }
-    }
-    .imgBox {
-        width: 80px;
-        height: 80px;
-        text-align: center;
-        margin: 30px 90px 22px;
-    }
-    .Whisper1 {
-        font-size: 12px;
-        font-weight: 400;
-        color: #303133;
-        line-height: 18px;
-        padding-bottom: 36px;
-        margin: 0 64px;
     }
 }
+
 /deep/ .mySwiper {
     width: 100vw;
     height: 100vw;
@@ -697,7 +712,7 @@ export default {
         border-radius: 4px;
     }
 }
-/deep/ .van-dialog {
+/deep/ .van-popup {
     width: 228px;
     background: #ffffff;
     padding: 0 16px;
@@ -705,19 +720,27 @@ export default {
     .title2 {
         display: flex;
         align-items: center;
+        justify-content: space-between;
         padding-top: 12px;
-        .img {
+        .top {
+            display: flex;
+            align-items: center;
+            .img {
+                width: 18px;
+                height: 18px;
+                color: #ff4f50;
+                margin-right: 3px;
+            }
+            .title3 {
+                font-size: 16px;
+                font-weight: 400;
+                color: #ff4f50;
+                line-height: 24px;
+            }
+        }
+        .icon {
             width: 18px;
             height: 18px;
-            color: #ff4f50;
-            margin-right: 3px;
-            margin-bottom: 5px;
-        }
-        .title3 {
-            font-size: 16px;
-            font-weight: 400;
-            color: #ff4f50;
-            line-height: 24px;
         }
     }
     .border {
@@ -807,8 +830,9 @@ export default {
         }
     }
     .prive {
-        display: flex;
+        // display: flex;
         align-items: center;
+        width: 200px !important;
         .prive1 {
             display: flex;
             align-items: center;