Răsfoiți Sursa

Merge branch 'dev' of xiongzhu/raex_front into master

panhui 2 ani în urmă
părinte
comite
340f87c455

+ 4 - 2
src/App.vue

@@ -331,11 +331,13 @@ export default {
     // }
     &.domainname,
     &.domainSubmit,
-    &.activityList,
     &.newsList {
         background-color: #030001;
     }
-
+    &.activityList,
+    &.activityList1 {
+        background: #0f1014;
+    }
     &.activityDetail {
         background-color: #181818;
     }

BIN
src/assets/icon-backs@3x.png


BIN
src/assets/icon-bukejianshaoone@3x.png


BIN
src/assets/icon-bukejiaone@3x.png


BIN
src/assets/icon-jiantouhei@3x.png


BIN
src/assets/icon-jiantouliang@3x.png


BIN
src/assets/icon-jiaone@3x.png


BIN
src/assets/icon-jiatwo@3x.png


BIN
src/assets/icon_bukexuan.png


BIN
src/assets/icon_fanhuione@3x.png


BIN
src/assets/png-jiantou@3x.png


BIN
src/assets/png-zhiding@3x.png


BIN
src/assets/weijiaru@3x.png


BIN
src/assets/yijiaru@3x.png


BIN
src/assets/yijiaruliebiao@3x.png


+ 125 - 7
src/components/product/SaleInfo.vue

@@ -30,7 +30,7 @@
             </div>
         </template>
         <van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="getData">
-            <div @click="goDetail(item)" class="product-info" v-for="(item, index) in list" :key="index">
+            <div class="product-info" v-for="(item, index) in list" :key="index">
                 <div class="top">
                     <div class="user">
                         <van-image width="24" height="24" radius="24" :src="item.ownerAvatar" fit="cover" />
@@ -45,12 +45,25 @@
                     <div class="name">{{ item.name }}</div>
                     <div class="num" v-if="getNum(item)">#{{ getNum(item) }}</div>
                     <div class="num" v-else></div>
-                    <div class="buy" v-if="!item.soldOut">
+                    <div class="buy" v-if="!item.soldOut" @click="goDetail(item)">
                         <span>{{ !item.salable ? '去看看' : '去购买' }}</span>
 
                         <img src="../../assets/icon-jiantou2.png" alt="" />
                     </div>
                 </div>
+                <img
+                    :src="require('@assets/weijiaru@3x.png')"
+                    alt=""
+                    class="product-info_img"
+                    @click="onAddCart(item)"
+                    v-if="!item.inCart && item.salable"
+                />
+                <img
+                    :src="require('@assets/yijiaru@3x.png')"
+                    alt=""
+                    class="product-info_img"
+                    v-else-if="item.inCart && item.salable"
+                />
             </div>
         </van-list>
     </van-action-sheet>
@@ -59,6 +72,7 @@
 <script>
 import { throwStatement } from '@babel/types';
 import list from '../../mixins/list';
+import { mapState } from 'vuex';
 export default {
     props: {
         info: {
@@ -84,11 +98,13 @@ export default {
                 price: 0
             },
             total: 0,
-            salable: true
+            salable: true,
+            timeId: 0
         };
     },
     mixins: [list],
     computed: {
+        ...mapState(['userInfo']),
         search() {
             if (this.info.prefixName) {
                 return this.info.prefixName;
@@ -104,6 +120,41 @@ export default {
         }
     },
     methods: {
+        onAddCart(info) {
+            if (this.timeId) {
+                clearTimeout(this.timeId);
+                this.timeId = 0;
+            }
+            this.timeId = setTimeout(() => {
+                this.addCarts(info);
+            }, 500);
+        },
+        addCarts(info) {
+            this.checkLogin().then(() => {
+                if (info.source == 'OFFICIAL') {
+                    this.$toast('官方藏品不能加入购物车');
+                    return;
+                }
+                if (this.userInfo.id == info.ownerId) {
+                    this.$toast('不能把自己的藏品加入购物车');
+                    return;
+                }
+                let id = info.id;
+                let data = {
+                    collectionId: id
+                };
+                this.$http
+                    .post('/cart/create', data)
+                    .then(res => {
+                        this.$toast.success('恭喜加入购物车');
+                        this.$emit('fatherMethod');
+                        this.getDataOne(false, 0, true);
+                    })
+                    .catch(e => {
+                        this.$toast(e.error);
+                    });
+            });
+        },
         changeSalable() {
             if (this.salable) {
                 this.salable = '';
@@ -175,7 +226,65 @@ export default {
                 return '';
             }
         },
-        getData(isFirst = false, scrollTop = 0) {
+        getDataOne(isFirst = false, scrollTop = 0, refresh = false) {
+            if (isFirst) {
+                this.page = 0;
+                this.list = [];
+                this.$root.$el.scrollTop = scrollTop;
+            }
+
+            this.loading = true;
+            this.finished = false;
+            this.empty = false;
+            let data = { page: this.page, size: 20, sort: 'createdAt,desc' };
+            if (this.beforeData) {
+                data = {
+                    ...data,
+                    ...this.beforeData()
+                };
+            }
+
+            if (this.httpType === 'get') {
+                return this.$http.get(this.url, data, { body: 'json' }).then(res => {
+                    if (res.first) {
+                        this.list = [];
+                    }
+                    if (refresh) {
+                        this.list = [...this.list];
+                    } else {
+                        this.list = [...this.list, ...res.content];
+                    }
+                    this.empty = res.empty;
+                    this.loading = false;
+                    this.finished = res.last;
+                    if (!this.finished) {
+                        this.page = this.page + 1;
+                    }
+                    this.totalElements = Number(res.totalElements);
+                    return Promise.resolve(Number(res.totalElements));
+                });
+            } else {
+                return this.$http.post(this.url, data, { body: 'json' }).then(res => {
+                    if (res.first) {
+                        this.list = [];
+                    }
+                    if (refresh && this.page > 0) {
+                        this.list = [...this.list];
+                    } else {
+                        this.list = [...this.list, ...res.content];
+                    }
+                    this.empty = res.empty;
+                    this.loading = false;
+                    this.finished = res.last;
+                    if (!this.finished) {
+                        this.page = this.page + 1;
+                    }
+                    this.totalElements = Number(res.totalElements);
+                    return Promise.resolve(Number(res.totalElements));
+                });
+            }
+        },
+        getData(isFirst = false, scrollTop = 0, refresh = false) {
             if (isFirst) {
                 this.page = 0;
                 this.list = [];
@@ -274,7 +383,6 @@ export default {
         }
     }
 }
-
 /deep/.van-overlay {
     width: 100vw;
     height: 100vh;
@@ -291,9 +399,16 @@ export default {
     background: #f5f7fa;
     border-radius: 12px;
     margin: 12px 12px;
-    padding: 12px;
+    padding: 16px 12px;
     display: block;
-
+    position: relative;
+    .product-info_img {
+        width: 26px;
+        height: 16px;
+        position: absolute;
+        top: 0;
+        right: 0;
+    }
     .top {
         .flex();
         justify-content: space-between;
@@ -328,6 +443,9 @@ export default {
         }
 
         .price {
+            position: absolute;
+            top: 18px;
+            right: 12px;
             font-size: 16px;
             font-weight: bold;
             color: #000000;

+ 32 - 8
src/components/product/productInfo.vue

@@ -67,6 +67,7 @@
             </div>
             <div class="sold" v-else-if="isSold" style="color: #ff4f50">即将售罄</div>
         </div>
+        <!-- <img :src="require('@assets/yijiaruliebiao@3x.png')" alt="" class="product_img" v-if="info.inCart == true" /> -->
     </div>
 </template>
 
@@ -146,14 +147,30 @@ export default {
             if (!this.usedBuy && this.info.source === 'TRANSFER') {
                 this.$toast('该通道暂且关闭');
             } else {
-                let query = {};
-                if (this.type) {
-                    query.type = this.type;
-                }
-                this.$router.push({
-                    path: '/productDetail/' + this.info.id,
-                    query
-                });
+                this.$http
+                    .get('/collection/get/' + this.info.id)
+                    .then(res => {
+                        let query = {};
+                        if (this.type) {
+                            query.type = this.type;
+                        }
+                        this.$router.push({
+                            path: '/productDetail/' + this.info.id,
+                            query
+                        });
+                    })
+                    .catch(e => {
+                        if (e && e.error) {
+                            this.$dialog
+                                .alert({
+                                    title: '提示',
+                                    message: '该藏品已被别人购买'
+                                })
+                                .then(res => {
+                                    this.$emit('fatherProduct');
+                                });
+                        }
+                    });
             }
         }
     }
@@ -252,6 +269,13 @@ export default {
         }
     }
 }
+.product_img {
+    width: 26px;
+    height: 16px;
+    position: absolute;
+    top: 0;
+    right: 0;
+}
 .price-content {
     display: flex;
     align-items: center;

+ 6 - 6
src/router/index.js

@@ -41,8 +41,8 @@ function jsapiSign() {
                     });
                     wx.ready(function () {
                         wx.updateAppMessageShareData({
-                            title: 'RAEX绿洲元宇宙:全球首个基于区块链的元宇宙物资集换平台',
-                            desc: '共同开启元宇宙探索之旅!',
+                            title: 'RAE共同开启元宇宙探索之旅!X绿洲元宇宙:全球首个基于区块链的元宇宙物资集换平台',
+                            desc: '',
                             link: location.origin + '/9th',
                             imgUrl: 'https://cdn.raex.vip/nft/2023-02-03-15-26-31pSjRXlXn.png',
                             success: function () {
@@ -707,7 +707,7 @@ const routes = [
     {
         path: '/activityList',
         name: 'activityList',
-        component: () => import('../views/activity/List1.vue'),
+        component: () => import('../views/activity/List.vue'),
         meta: {
             pageType: Page.Every,
             menuPage: true
@@ -718,7 +718,7 @@ const routes = [
     {
         path: '/activityList1',
         name: 'activityList1',
-        component: () => import('../views/activity/List.vue'),
+        component: () => import('../views/activity/List1.vue'),
         meta: {
             pageType: Page.Every,
             menuPage: true
@@ -729,7 +729,7 @@ const routes = [
     {
         path: '/activityDetail',
         name: 'activityDetail',
-        component: () => import('../views/activity/Detail1.vue'),
+        component: () => import('../views/activity/Detail.vue'),
         meta: {
             pageType: Page.Every,
 
@@ -739,7 +739,7 @@ const routes = [
     {
         path: '/activityDetail1',
         name: 'activityDetail1',
-        component: () => import('../views/activity/Detail.vue'),
+        component: () => import('../views/activity/Detail1.vue'),
         meta: {
             pageType: Page.Every,
 

+ 52 - 11
src/styles/app.less

@@ -46,15 +46,20 @@
 }
 
 * {
-    -webkit-touch-callout: none; /*系统默认菜单被禁用*/
+    -webkit-touch-callout: none;
+    /*系统默认菜单被禁用*/
 
-    -webkit-user-select: none; /*webkit浏览器*/
+    -webkit-user-select: none;
+    /*webkit浏览器*/
 
-    -khtml-user-select: none; /*早期浏览器*/
+    -khtml-user-select: none;
+    /*早期浏览器*/
 
-    -moz-user-select: none; /*火狐*/
+    -moz-user-select: none;
+    /*火狐*/
 
-    -ms-user-select: none; /*IE10*/
+    -ms-user-select: none;
+    /*IE10*/
 
     user-select: none;
 }
@@ -74,6 +79,7 @@ textarea {
 .van-divider::before {
     height: 5px;
 }
+
 html,
 body {
     padding: 0;
@@ -86,10 +92,12 @@ body {
     background-color: #272b2e;
     -webkit-font-smoothing: antialiased;
 }
+
 body {
     height: var(--app-height);
     overflow: hidden;
 }
+
 #app,
 .scroll-wrapper {
     padding: 0;
@@ -100,14 +108,17 @@ body {
     -webkit-overflow-scrolling: touch;
     -webkit-font-smoothing: antialiased;
 }
+
 .scroll-wrapper {
     overflow: auto;
     -webkit-overflow-scrolling: touch;
 }
+
 ::-webkit-scrollbar {
     display: none;
     opacity: 0;
 }
+
 input:-webkit-autofill {
     box-shadow: 0 0 0px 1000px @bg inset;
     -webkit-text-fill-color: @text0;
@@ -120,16 +131,20 @@ input:-webkit-autofill {
 .flex1 {
     flex-grow: 1;
 }
+
 .van-dialog {
     border-radius: 8px;
+
     .van-dialog__header {
         font-size: 16px;
         font-weight: bold;
         padding-top: 20px;
     }
+
     .van-hairline--left::after {
         border-color: #f2f4f5;
     }
+
     .van-hairline--top::after {
         border-color: #f2f4f5;
     }
@@ -138,6 +153,7 @@ input:-webkit-autofill {
         padding: 20px 40px 30px;
     }
 }
+
 // .van-dialog__footer {
 //     .van-button--default {
 //         // color: #626366;
@@ -160,18 +176,21 @@ input:-webkit-autofill {
 }
 
 .van-tab {
-    color: @text3 !important;
+    color: @text3  !important;
     font-size: @font2;
+
     &.van-tab--active {
-        color: @prim !important;
+        color: @prim  !important;
         font-weight: bold;
     }
+
     padding: 0 0 !important;
     flex-shrink: 0 !important;
     flex-grow: 0 !important;
     margin-right: 50px;
     word-break: keep-all;
 }
+
 .van-tabs__nav--line.van-tabs__nav--complete {
     padding-left: 16px !important;
     padding-right: 16px !important;
@@ -182,20 +201,24 @@ input:-webkit-autofill {
 .van-tabs__line {
     bottom: 20px;
 }
+
 .van-sticky--fixed {
     background-color: @bg;
 }
+
 .van-tab--active {
     .tab {
         .van-icon-arrow-up {
             color: #646566;
         }
     }
+
     &.asc {
         .tab {
             .van-icon-arrow-up {
                 color: @prim;
             }
+
             .van-icon-arrow-down {
                 color: #646566;
             }
@@ -216,6 +239,7 @@ input:-webkit-autofill {
 .van-tabs.dark {
     background-color: #181818;
 }
+
 .van-nav-bar.dark {
     background-color: #181818;
 }
@@ -237,10 +261,12 @@ input:-webkit-autofill {
     // background-size: content;
     // background-attachment: fixed;
 }
+
 .van-key--blue {
-    background-color: @prim!important;
+    background-color: @prim  !important;
     font-size: 16px;
 }
+
 .splash-screen {
     position: fixed;
     width: 100vw;
@@ -259,6 +285,7 @@ input:-webkit-autofill {
 .activeAvatar {
     // overflow: initial !important;
     padding: 0.5%;
+
     // background-color: #fff;
     img {
         border-radius: 100px;
@@ -275,7 +302,9 @@ input:-webkit-autofill {
         box-sizing: border-box;
         // box-shadow: 0px 0px 6px 0px rgba(38, 245, 13, 0.6);
     }
+
     position: relative;
+
     &::after {
         content: '';
         background-image: url(https://cdn.raex.vip/png-touxiangkuang.png);
@@ -291,9 +320,11 @@ input:-webkit-autofill {
 
 .darkTabs {
     background-color: #222426;
+
     .van-tab.van-tab--active {
         color: #43ce00 !important;
     }
+
     .van-tabs__line {
         background-color: #43ce00 !important;
         width: 16px;
@@ -305,9 +336,11 @@ input:-webkit-autofill {
     .van-tab.van-tab--active {
         color: #00fe1e !important;
     }
+
     .van-tabs__line {
         background-color: #00fe1e !important;
     }
+
     .van-tabs__nav--line.van-tabs__nav--complete {
         border-top-width: 0;
     }
@@ -320,28 +353,34 @@ input:-webkit-autofill {
         padding: 0 16px;
     }
 }
+
 .saleSheet {
-    min-height: 80vh;
-    max-height: 80vh;
+    min-height: calc(92vh - 1.5px);
+    max-height: calc(92vh - 1.5px);
+
     .van-action-sheet__header {
         border-bottom-width: 0px;
         font-size: 16px;
         font-weight: bold;
     }
+
     .van-action-sheet__description {
         text-align: left;
         padding: 0px 16px 0;
+
         &::after {
             content: none;
         }
     }
 }
+
 .padding-safe-top {
     padding-top: var(--safe-top);
 }
 
 .van-dialog {
     width: 260px;
+
     .van-dialog__message--has-title {
         color: #939599;
         padding: 16px 23px 20px;
@@ -355,8 +394,10 @@ input:-webkit-autofill {
 .risk {
     background-color: transparent;
     width: auto;
+
     .van-action-bar {
         padding: 10px 16px;
+
         .van-action-bar-button {
             border-radius: 4px;
         }
@@ -366,4 +407,4 @@ input:-webkit-autofill {
 .preSticky {
     position: relative;
     z-index: 99;
-}
+}

+ 4 - 0
src/views/Discover.vue

@@ -265,6 +265,7 @@
                         v-if="sort === 'collection_MY' || sort === 'domain' || sort === 'collection'"
                         v-model:info="list[index]"
                         dark
+                        @fatherProduct="fatherProduct"
                     >
                     </product-info>
                     <!-- <prefixName-info v-if="sort === 'collection'" v-model:info="list[index]" dark></prefixName-info> -->
@@ -434,6 +435,9 @@ export default {
         });
     },
     methods: {
+        fatherProduct() {
+            this.getList(true);
+        },
         artSelection(name) {
             if (name == '铸造活动') {
                 this.$router.push('/activityList');

+ 1 - 0
src/views/Mine.vue

@@ -950,6 +950,7 @@ export default {
 
         .order-infos {
             position: relative;
+            height: 28px;
 
             .shopping_cart_number {
                 width: 19px;

+ 595 - 71
src/views/activity/Detail.vue

@@ -13,54 +13,61 @@
                 {{ info.name }}
             </div>
 
-            <div class="time">活动时间:04-01 16:00 - 04-01 18:00</div>
+            <div class="time" v-if="info.endTime && info.startTime">
+                活动时间:{{ formatTime(info.startTime) }} ~ {{ formatTime(info.endTime) }}
+            </div>
+            <div class="time" v-else-if="info.endTime">活动结束时间: {{ info.endTime }}</div>
+            <div class="time" v-else-if="info.startTime">活动开始时间:{{ info.startTime }}</div>
         </div>
         <div class="card">
             <div class="card-title">活动说明</div>
             <div class="card-detail" v-html="info.detail"></div>
         </div>
-        <div class="activity_need">
-            <div class="activity_need_top">
-                <div class="activity_need_top_left">合成所需藏品</div>
-                <div class="activity_need_top_right" @click="showBottom = true">选择持有藏品</div>
+        <template v-if="showList.length > 0">
+            <div class="activity_need">
+                <div class="activity_need_top">
+                    <div class="activity_need_top_left">合成所需藏品</div>
+                    <div class="activity_need_top_right" @click="chooseEvent">选择持有藏品</div>
+                </div>
+                <div class="activity_need_list">
+                    <div class="activity_need_list_con" v-for="(item, index) in showList" :key="index">
+                        <van-image
+                            width="96"
+                            height="96"
+                            :src="getImg(changeImgs(item.collection?.pic))"
+                            radius="8"
+                            fit="cover"
+                        />
+                        <div class="num">{{ item.chooseIds.length }}/{{ item.num }}</div>
+                    </div>
+                </div>
             </div>
-            <div class="activity_need_list">
-                <div class="activity_need_list_con" v-for="(item, index) in needList" :key="index">
+            <div class="activity_synthesis" v-if="airDropCollection.length > 0">
+                <div class="activity_synthesis_title">合成品</div>
+                <div class="activity_synthesis_details" v-for="(item, index) in airDropCollection" :key="index">
                     <van-image
-                        width="calc(26vw - 1.5px)"
-                        height="calc(26vw - 1.5px)"
-                        :src="getImg(info.cover)"
+                        width="96"
+                        height="96"
+                        :src="getImg(changeImgs(item.collection.pic))"
                         radius="8"
                         fit="cover"
                     />
-                    <div></div>
-                </div>
-            </div>
-        </div>
-        <div class="activity_synthesis">
-            <div class="activity_synthesis_title">合成品</div>
-            <div class="activity_synthesis_details">
-                <van-image
-                    width="calc(26vw - 1.5px)"
-                    height="calc(26vw - 1.5px)"
-                    :src="getImg(info.cover)"
-                    radius="8"
-                    fit="cover"
-                />
-                <div class="activity_synthesis_details_con">
-                    <div class="activity_synthesis_details_con_one">野稻凭证 D1-0 凭证 *1</div>
-                    <div class="activity_synthesis_details_con_two">收藏品</div>
+                    <div class="activity_synthesis_details_con">
+                        <div class="activity_synthesis_details_con_one">{{ item.collection.name }}</div>
+                        <div class="activity_synthesis_details_con_two">收藏品</div>
+                    </div>
+                    <div class="activity_synthesis_details_num">x{{ item.num }}</div>
                 </div>
             </div>
-        </div>
+        </template>
         <!-- <div class="detail" v-html="info.detail"></div> -->
         <template v-if="info.onShelf">
-            <van-notice-bar
+            <!-- <van-notice-bar
                 color="#FF4F50"
                 background="#271515"
                 text="商品为定制化产品,定制周期较长,且不允许退货"
                 z-index="99"
-            />
+            /> -->
             <div class="action-btn">
                 <!-- <div class="info">
                     <div class="text1">限量</div>
@@ -72,10 +79,50 @@
 
                 <div class="flex1"></div>
                 <van-button :disabled="startTime" type="primary" round v-if="startTime">{{ startTime }}</van-button>
+
+                <van-button
+                    v-else-if="isSolded"
+                    :disabled="isSolded"
+                    :class="{ not: !holdingFlag || isSolded }"
+                    type="primary"
+                    round
+                >
+                    已售罄
+                </van-button>
+                <van-button
+                    v-else-if="!holdingFlag"
+                    :disabled="!holdingFlag"
+                    :class="{ not: !holdingFlag || isSolded }"
+                    type="primary"
+                    round
+                >
+                    持有指定藏品才能铸造
+                </van-button>
+                <template v-else-if="showList.length > 0">
+                    <van-button type="primary" class="not" round v-if="denied">
+                        <div class="btn-text">材料不足</div>
+                        <div class="btn-sub" v-if="showStok && !isSolded">
+                            <div>剩余 {{ info.stock }}</div>
+                        </div>
+                    </van-button>
+                    <van-button type="primary" round v-else-if="!canNext" @click="chooseEvent">
+                        <div class="btn-text">选择持有藏品</div>
+                        <div class="btn-sub" v-if="showStok && !isSolded">
+                            <div>剩余 {{ info.stock }}</div>
+                        </div>
+                    </van-button>
+                    <van-button type="primary" round v-else @click="goSubmit">
+                        <div class="btn-text">立即合成</div>
+                        <div class="btn-sub" v-if="showStok && !isSolded">
+                            <div>剩余 {{ info.stock }}</div>
+                        </div>
+                    </van-button>
+                </template>
+
                 <van-button
                     v-else
                     :disabled="isSolded"
-                    :class="{ not: !holdingFlag }"
+                    :class="{ not: !holdingFlag || isSolded }"
                     type="primary"
                     round
                     @click="goBuild"
@@ -104,49 +151,128 @@
                 @click="showBottom = false"
             />
         </div>
-        <div class="activity_collection_selection_list" v-for="(item, index) in needList" :key="index">
+        <div class="activity_collection_selection_list" v-for="(item, index) in showList" :key="index">
             <div class="activity_collection_selection_list_con">
-                <div class="activity_collection_selection_list_con_left">
-                    <van-image
-                        width="calc(21vw + 1.25px)"
-                        height="calc(21vw + 1.25px)"
-                        :src="getImg(info.cover)"
-                        radius="8"
-                        fit="cover"
-                    />
-                    <div class="activity_collection_selection_list_con_left_content">
-                        <div class="activity_collection_selection_list_con_left_content_one">种子</div>
-                        <div class="activity_collection_selection_list_con_left_content_two">编号:122,123</div>
-                        <div
-                            class="activity_collection_selection_list_con_left_content_threes"
-                            v-if="selectDisplay"
-                            @click="selectDisplay = false"
-                        >
-                            <div>选择其他编号</div>
-                            <img
-                                :src="require('../../assets/icon_intershouqi@3x.png')"
-                                alt=""
-                                class="activity_collection_selection_list_con_left_content_threes_img"
+                <div class="activity_collection_selection_list_con_top">
+                    <div class="activity_collection_selection_list_con_left">
+                        <div class="activity-collection">
+                            <van-image
+                                width="80"
+                                height="80"
+                                :src="getImg(changeImgs(item.collection?.pic))"
+                                radius="8"
+                                fit="cover"
                             />
+                            <div class="num">{{ item.chooseIds.length }}/{{ item.num }}</div>
                         </div>
+
+                        <div class="activity_collection_selection_list_con_left_content">
+                            <div class="activity_collection_selection_list_con_left_content_one">
+                                {{ item.tag.name }}
+                            </div>
+                            <div
+                                v-html="getName(item.ownCollections, item.chooseIds)"
+                                class="activity_collection_selection_list_con_left_content_two"
+                            ></div>
+                            <div
+                                class="activity_collection_selection_list_con_left_content_threes"
+                                @click="changeShowMore(index)"
+                                v-if="item.ownCollections.length > 0"
+                            >
+                                <div>选择其他藏品</div>
+                                <img
+                                    :src="
+                                        selectDisplay
+                                            ? require('../../assets/icon_intershouqi@3x.png')
+                                            : require('../../assets/icon_interzhankai@3x.png')
+                                    "
+                                    alt=""
+                                    class="activity_collection_selection_list_con_left_content_threes_img"
+                                />
+                            </div>
+                        </div>
+                    </div>
+                    <div class="activity_collection_selection_list_con_right" v-if="item.chooseIds.length === item.num">
+                        已集齐
+                    </div>
+                    <div
+                        class="activity_collection_selection_list_con_rightbuy"
+                        v-if="item.ownCollections.length < item.num"
+                        @click="goBuy(item.tag.name)"
+                    >
+                        去购买
+                    </div>
+                </div>
+                <div class="activity_collection_selection_subclass" v-if="item.showMoreCollection">
+                    <img
+                        :src="require('../../assets/png-jiantou@3x.png')"
+                        alt=""
+                        class="activity_collection_selection_subclass_img"
+                    />
+                    <div class="activity_collection_selection_subclass_list">
                         <div
-                            class="activity_collection_selection_list_con_left_content_three"
-                            v-else
-                            @click="selectDisplay = true"
+                            class="activity_collection_selection_subclass_list_con"
+                            v-for="(pro, proIndex) in item.ownCollections"
+                            :key="proIndex"
+                            @click="chooseCollection(index, pro.id)"
                         >
-                            <div>选择其他编号</div>
+                            <div class="activity_collection_selection_subclass_list_con_left">
+                                <van-image
+                                    width="60"
+                                    height="60"
+                                    radius="8"
+                                    :src="getImg(changeImgs(pro.pic, 600))"
+                                    fit="contain"
+                                />
+                                <div class="activity_collection_selection_subclass_list_con_left_content">
+                                    <div class="activity_collection_selection_subclass_list_con_left_content_title">
+                                        {{ pro.name }}
+                                    </div>
+                                    <div
+                                        v-if="pro.number"
+                                        class="activity_collection_selection_subclass_list_con_left_content_number"
+                                    >
+                                        编号{{ pro.number }}
+                                    </div>
+                                </div>
+                            </div>
                             <img
-                                :src="require('../../assets/icon_interzhankai@3x.png')"
+                                class="activity_collection_selection_subclass_list_con_right_img"
+                                :src="icons[isChoose(pro.id, item.chooseIds) ? 0 : isElseChoose(pro.id, index) ? 2 : 1]"
                                 alt=""
-                                class="activity_collection_selection_list_con_left_content_three_img"
                             />
                         </div>
                     </div>
                 </div>
-                <!-- <div class="activity_collection_selection_list_con_right">已集齐</div> -->
-                <div class="activity_collection_selection_list_con_rightbuy" @click="goHome">去购买</div>
             </div>
-            div
+        </div>
+        <!-- <div class="synthetic_quantity">
+            <div class="synthetic_quantity_title">合成数量</div>
+            <div class="synthetic_quantity_con">
+                <img
+                    :src="require('../../assets/icon-bukejianshaoone@3x.png')"
+                    alt=""
+                    class="synthetic_quantity_con_img"
+                    v-if="castingQuantity == 1"
+                />
+                <img
+                    :src="require('../../assets/icon-jiaone@3x.png')"
+                    alt=""
+                    class="synthetic_quantity_con_img"
+                    v-else
+                    @click="odd"
+                />
+                <div class="synthetic_quantity_con_number">{{ castingQuantity }}</div>
+                <img
+                    :src="require('../../assets/icon-jiatwo@3x.png')"
+                    alt=""
+                    class="synthetic_quantity_con_img"
+                    @click="add"
+                />
+            </div>
+        </div> -->
+        <div class="confirm_synthesis" @click="confirmSynthesis">
+            <div class="confirm_synthesis_con">确认</div>
         </div>
     </van-popup>
     <!-- <div class="activity_bg" v-if="showBottom"></div> -->
@@ -154,7 +280,9 @@
 
 <script>
 import { abs } from 'mathjs';
+import product from '../../mixins/product';
 export default {
+    mixins: [product],
     data() {
         return {
             info: {},
@@ -165,15 +293,97 @@ export default {
             selectDisplay: false,
             showCollections: [],
             needList: [],
-            activityId: 0
+            activityId: 0,
+            list: [],
+            castingQuantity: 1,
+            allTags: [],
+            showList: [],
+            icons: [
+                require('@assets/icon_gouxuan_pre.png'),
+                require('@assets/icon_gouxuan_huise.png'),
+                require('@assets/icon_bukexuan.png')
+            ]
         };
     },
+    watch: {
+        showTagsMap() {
+            let list = [];
+            let _map = this.showTagsMap;
+            _map.values().forEach(item => {
+                list.push({
+                    ...item,
+                    collection: item.collections ? item.collections[0] : {},
+                    chooseNum: 0,
+                    chooseIds: [],
+                    showMoreCollection: false,
+                    ownCollections: [...item.ownCollections]
+                });
+            });
+            this.showList = list;
+        }
+    },
     computed: {
         isSolded() {
             return !this.info.stock || this.info.stock < 0;
         },
         showStok() {
             return [...this.showCollections].includes(this.activityId);
+        },
+        showTagsMap() {
+            let allTags = [...this.allTags];
+            let _map = new Map();
+            allTags.forEach(item => {
+                let _info = {
+                    num: 0
+                };
+                if (_map.has(item.detail.tag.name)) {
+                    _info = _map.get(item.detail.tag.name);
+                }
+                _map.set(item.detail.tag.name, {
+                    ..._info,
+                    ...item.detail,
+                    num: _info.num + item.detail.num,
+                    ownCollections: []
+                });
+            });
+
+            let _list = [...this.list];
+            _list.forEach(item => {
+                _map.keys().forEach(key => {
+                    let tagId = _map.get(key).tag.id;
+                    let tags = item.tags.map(item => {
+                        return item.id;
+                    });
+                    if (tags.includes(tagId)) {
+                        let ownCollections = _map.get(key).ownCollections;
+                        _map.get(key, {
+                            ..._map.get(key),
+                            ownCollections: ownCollections.push(item)
+                        });
+                    }
+                });
+            });
+
+            return _map;
+        },
+        airDropCollection() {
+            return this.info ? this.info.airDropCollection || [] : [];
+        },
+        canNext() {
+            let showList = [...this.showList];
+            let info = showList.find(item => {
+                return item.chooseIds.length !== item.num;
+            });
+
+            return !info;
+        },
+        denied() {
+            let showList = [...this.showList];
+            let info = showList.find(item => {
+                return item.ownCollections.length < item.num;
+            });
+
+            return !!info;
         }
     },
     mounted() {
@@ -184,8 +394,154 @@ export default {
                 this.showCollections = res.value.split(',');
             }
         });
+        this.getList();
     },
     methods: {
+        formatTime(str) {
+            return this.dayjs(str).format('MM-DD HH:mm');
+        },
+        chooseEvent() {
+            this.checkLogin().then(res => {
+                this.showBottom = true;
+            });
+        },
+        goSubmit() {
+            this.checkTips().then(() => {
+                let chooseIds = [];
+                let nums = [];
+                [...this.showList].forEach(item => {
+                    chooseIds.push(item.chooseIds);
+                    nums.push(item.chooseIds[0] + '_' + item.chooseIds.length);
+                });
+                let query = {
+                    assets: chooseIds.flat().join(','),
+                    activityId: this.activityId,
+                    numList: nums.join(',')
+                };
+                if (this.$route.query.test) {
+                    query.test = true;
+                }
+                this.$router.push({
+                    path: '/activitySubmit',
+                    query
+                });
+            });
+        },
+        checkTips() {
+            if (this.info.consume) {
+                return this.$dialog.confirm({
+                    title: '提示',
+                    message: `兑换后选择的藏品将被销毁,确认将选择的藏品进行兑换吗?`,
+                    allowHtml: true
+                });
+            } else {
+                return Promise.resolve();
+            }
+        },
+        goBuy(search) {
+            let matching = /(?:\d\d)\/(\d\d)/;
+            if (matching.test(search)) {
+                let newSearch = search.split(':')[1].trim();
+                this.$router.push('/productSearch?search=' + newSearch);
+            } else {
+                this.$router.push('/productSearch?search=' + search);
+            }
+        },
+        changeShowMore(index) {
+            let showList = [...this.showList];
+            showList.forEach((item, colIndex) => {
+                if (colIndex === index) {
+                    item.showMoreCollection = !item.showMoreCollection;
+                } else {
+                    item.showMoreCollection = false;
+                }
+            });
+
+            this.showList = showList;
+        },
+        getName(list, chooseIds) {
+            let str = '';
+            chooseIds.forEach((item, index) => {
+                let _info = list.find(_collection => {
+                    return item == _collection.id;
+                });
+                if (index == 0) {
+                    str += _info.number ? '编号:' : '藏品:';
+                } else {
+                    str += ',';
+                }
+                if (_info.number) {
+                    str += _info.number;
+                } else {
+                    str += _info.name;
+                }
+            });
+            return str;
+        },
+        chooseCollection(index, id) {
+            let showList = [...this.showList];
+            let _info = showList[index];
+            if (this.isChoose(id, _info.chooseIds)) {
+                let _infoIndex = _info.chooseIds.findIndex(item => {
+                    return id === item;
+                });
+                console.log(_infoIndex);
+                showList[index].chooseIds.splice(_infoIndex, 1);
+            } else {
+                if (showList[index].chooseIds.length === showList[index].num) {
+                    this.$toast(`只能选择${showList[index].num}个藏品`);
+                    return;
+                }
+                if (this.isElseChoose(id, index)) {
+                    this.$toast(`其他标签下已经选择该藏品`);
+                    return;
+                }
+                showList[index].chooseIds.push(id);
+            }
+
+            this.showList = showList;
+        },
+        isChoose(id, list) {
+            return list.includes(id);
+        },
+        isElseChoose(id, index) {
+            const showList = [...this.showList];
+            let chooseIds = [];
+            showList.forEach(item => {
+                chooseIds.push(item.chooseIds);
+            });
+            chooseIds = chooseIds.flat();
+            console.log(chooseIds.includes(id));
+            console.log(!this.isChoose(id, showList[index].chooseIds));
+            return chooseIds.includes(id) && !this.isChoose(id, showList[index].chooseIds);
+        },
+        getList(refresh, done) {
+            this.$http
+                .get('/asset/assetsForMint', {
+                    page: 0,
+                    size: 9999,
+                    mintActivityId: this.activityId,
+                    refresh
+                })
+                .then(res => {
+                    this.list = res.content;
+                    this.empty = res.empty;
+                    done && done();
+                })
+                .then(() => {
+                    this.$toast.clear();
+                    done && done();
+                });
+        },
+        odd() {
+            this.castingQuantity = this.castingQuantity - 1;
+        },
+        add() {
+            this.castingQuantity = this.castingQuantity + 1;
+        },
+        confirmSynthesis() {
+            this.showBottom = false;
+        },
         goHome() {
             this.$router.push('/home');
         },
@@ -205,13 +561,17 @@ export default {
                 if (res.scheduleSale && init && res.startTime) {
                     this.getTime();
                 }
-                if (res.holdingTags && res.holdingTags.length) {
+                if (
+                    (res.holdingTags && res.holdingTags.length) ||
+                    (res.holdingTagsList && res.holdingTagsList.length)
+                ) {
                     this.$http.get('/mintOrder/checkHolding', { id: this.activityId }).then(res => {
                         this.holdingFlag = res;
                     });
                 } else {
                     this.holdingFlag = true;
                 }
+                this.allTags = res.rule.and;
             });
         },
         pad(n, width, z) {
@@ -394,8 +754,15 @@ export default {
     line-height: 24px;
 }
 
-.card-detail {
+/deep/.card-detail {
     margin-top: 8px;
+    p {
+        color: #fff;
+    }
+    img {
+        width: 100%;
+        display: block;
+    }
 }
 .activity_need {
     margin: 16px 16px 0px;
@@ -432,6 +799,20 @@ export default {
         display: flex;
         .activity_need_list_con {
             margin-right: 12px;
+            position: relative;
+
+            .num {
+                font-size: 10px;
+                font-weight: bold;
+                color: #ffffff;
+                line-height: 16px;
+                background: #3ab200;
+                border-radius: 4px;
+                padding: 0 5px;
+                position: absolute;
+                top: 8px;
+                right: 8px;
+            }
         }
     }
 }
@@ -450,8 +831,11 @@ export default {
     }
     .activity_synthesis_details {
         display: flex;
+        .van-image {
+            flex-shrink: 0;
+        }
         .activity_synthesis_details_con {
-            margin-left: 16px;
+            padding: 0 12px 0 16px;
             .activity_synthesis_details_con_one {
                 font-size: 14px;
                 font-weight: bold;
@@ -466,6 +850,16 @@ export default {
                 line-height: 18px;
             }
         }
+
+        .activity_synthesis_details_num {
+            font-size: 14px;
+            font-weight: bold;
+            color: #ffffff;
+            line-height: 24px;
+        }
+    }
+    .activity_synthesis_details + .activity_synthesis_details {
+        margin-top: 12px;
     }
 }
 .activity_collection_selection_top {
@@ -484,19 +878,24 @@ export default {
         height: 22px;
     }
 }
-.activity_collection_selection_list_con {
+.activity_collection_selection_list {
     margin: 0px 16px 16px;
+}
+.activity_collection_selection_list_con {
     padding: 12px;
     box-sizing: border-box;
     background: #2b3038;
     border-radius: 8px;
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
+    .activity_collection_selection_list_con_top {
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+    }
     .activity_collection_selection_list_con_left {
         display: flex;
         .activity_collection_selection_list_con_left_content {
-            margin-left: 12px;
+            padding: 0 12px;
+            .flex-col();
             .activity_collection_selection_list_con_left_content_one {
                 font-size: 14px;
                 font-weight: bold;
@@ -533,6 +932,7 @@ export default {
                 display: flex;
                 font-size: 11px;
                 color: #ffffff;
+                align-self: flex-start;
                 .activity_collection_selection_list_con_left_content_threes_img {
                     width: 18px;
                     height: 18px;
@@ -551,6 +951,7 @@ export default {
         line-height: 28px;
         text-align: center;
         box-sizing: border-box;
+        flex-shrink: 0;
     }
     .activity_collection_selection_list_con_rightbuy {
         width: 59px;
@@ -562,6 +963,129 @@ export default {
         color: #ffffff;
         line-height: 28px;
         text-align: center;
+        flex-shrink: 0;
+    }
+}
+.activity_collection_selection_subclass {
+    position: relative;
+    padding-top: 13px;
+    .activity_collection_selection_subclass_img {
+        width: 70px;
+        height: 16px;
+        position: absolute;
+        top: -3px;
+        left: 98px;
+    }
+    .activity_collection_selection_subclass_list {
+        max-height: 236px;
+        background: #363d47;
+        border-radius: 12px;
+        padding: 12px;
+        box-sizing: border-box;
+        overflow: hidden;
+        overflow-y: auto;
+        transition: 0.5s;
+        .activity_collection_selection_subclass_list_con {
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+            margin-bottom: 16px;
+            .activity_collection_selection_subclass_list_con_left {
+                display: flex;
+            }
+            .activity_collection_selection_subclass_list_con_left_content {
+                margin-left: 12px;
+
+                .van-image {
+                    flex-shrink: 0;
+                }
+                .activity_collection_selection_subclass_list_con_left_content_title {
+                    width: calc(54vw);
+                    font-size: 14px;
+                    color: #ffffff;
+                    line-height: 24px;
+                    margin-bottom: 2px;
+                    overflow: hidden;
+                    white-space: nowrap;
+                    text-overflow: ellipsis;
+                }
+                .activity_collection_selection_subclass_list_con_left_content_number {
+                    font-size: 12px;
+                    color: #939599;
+                    line-height: 18px;
+                }
+            }
+            .activity_collection_selection_subclass_list_con_right_img {
+                width: 24px;
+                height: 24px;
+            }
+        }
+        .activity_collection_selection_subclass_list_con:last-of-type {
+            margin-bottom: 0px;
+        }
+    }
+}
+.synthetic_quantity {
+    margin: 8px 16px 60px;
+    .synthetic_quantity_title {
+        font-size: 16px;
+        font-weight: bold;
+        color: #ffffff;
+        line-height: 24px;
+        margin-bottom: 16px;
+    }
+    .synthetic_quantity_con {
+        display: flex;
+        align-items: center;
+        .synthetic_quantity_con_img {
+            width: 24px;
+            height: 24px;
+        }
+        .synthetic_quantity_con_number {
+            width: 60px;
+            height: 28px;
+            background: #2b3038;
+            border-radius: 2px;
+            font-size: 16px;
+            font-weight: bold;
+            color: #ffffff;
+            line-height: 28px;
+            text-align: center;
+            margin-left: 10px;
+            margin-right: 10px;
+        }
+    }
+}
+.confirm_synthesis {
+    height: 56px;
+    padding: 9px 48px;
+    box-sizing: border-box;
+    .confirm_synthesis_con {
+        width: 100%;
+        background: #3ab200;
+        border-radius: 19px;
+        text-align: center;
+        font-size: 16px;
+        font-weight: bold;
+        color: #ffffff;
+        line-height: 38px;
+    }
+}
+
+.activity-collection {
+    position: relative;
+    flex-shrink: 0;
+    .num {
+        font-size: 10px;
+        font-weight: bold;
+        color: #ffffff;
+        line-height: 16px;
+        background: #3ab200;
+        border-radius: 4px;
+        padding: 0 5px;
+        position: absolute;
+        top: 8px;
+        right: 8px;
     }
 }
 </style>

+ 133 - 41
src/views/activity/List.vue

@@ -1,19 +1,21 @@
 <template>
     <div class="page" :style="{ backgroundImage: `url(${require('@assets/png-zhuzao-bg.png')})` }">
         <div class="page_top">
-            <div class="page_top_return" @click="$router.go(-1)">
-                <img src="@assets/easy_shoot_top_return@3x.png" alt="" class="page_top_return_img" />
-            </div>
+            <!-- <div class="page_top_return"> -->
+            <img src="@assets/icon_fanhuione@3x.png" alt="" class="page_top_return_img" @click="$router.go(-1)" />
+            <!-- </div> -->
             <div class="page-title">
                 <div class="text1">铸造中心</div>
                 <div class="text2">虚实结合,探索未知,让你的数字藏品更有价值</div>
             </div>
         </div>
         <van-sticky>
-            <van-tabs v-model="active">
-                <van-tab title="活动中"></van-tab>
-                <van-tab title="待开始"></van-tab>
-                <van-tab title="已结束"></van-tab>
+            <div class="casting_title" v-if="bodyScroll > 139">
+                <img src="@assets/icon-backs@3x.png" alt="" class="casting_title_img" @click="$router.go(-1)" />
+                铸造中心
+            </div>
+            <van-tabs v-model:active="active" @click-tab="changeTab">
+                <van-tab v-for="(item, index) in tabs" :key="index" :title="item.name" :name="item.status"></van-tab>
             </van-tabs>
         </van-sticky>
 
@@ -47,18 +49,32 @@
                             </div>
                             <div class="flex1"></div>
                             <div class="text2">
-                                <span> 开始时间:04-05 16:00</span>
+                                <span v-if="item.startTime">
+                                    开始时间:{{ dayjs(item.startTime).format('MM-DD HH:mm') }}</span
+                                >
                                 <div class="flex1"></div>
-                                <div class="btn">
-                                    <span>立即兑换</span>
-                                    <van-icon name="icon-icon-jiantou" class-prefix="font_family" />
+                                <div class="btn" v-if="active == 'ACTIVE'">
+                                    <div class="btn_titleOne">活动中</div>
+                                    <img src="@assets/icon-jiantouliang@3x.png" alt="" class="btn_img" />
+                                </div>
+                                <div class="btn" v-else-if="active == 'TOBEGIN'">
+                                    <div class="btn_titleTwo">即将开始</div>
+                                    <img src="@assets/icon-jiantouhei@3x.png" alt="" class="btn_img" />
+                                </div>
+                                <div class="btn" v-else-if="active == 'ENDED'">
+                                    <div class="btn_titleTwo">已结束</div>
+                                    <img src="@assets/icon-jiantouhei@3x.png" alt="" class="btn_img" />
                                 </div>
                             </div>
                         </div>
                     </router-link>
                 </template>
 
-                <van-empty v-if="empty" description="暂无活动哦~" :image="require('@assets/kong_png_wusousuo.png')" />
+                <van-empty
+                    v-if="empty"
+                    description="暂无活动哦~"
+                    :image="require('@assets/empty_img_asset_dark.png')"
+                />
             </van-list>
         </van-pull-refresh>
     </div>
@@ -79,7 +95,7 @@ import banner from '../../mixins/banner';
 export default {
     name: 'activityList',
     mixins: [list, banner],
-    inject: ['setKeeps', 'scrollWrapper', 'changeScroll'],
+    inject: ['setKeeps', 'scrollWrapper', 'changeScroll', 'bodyScroll'],
     data() {
         return {
             list: [],
@@ -87,7 +103,21 @@ export default {
             url: '/mintActivity/all',
             banners: [],
             scrollTop: 0,
-            active: 0
+            active: 'ACTIVE',
+            tabs: [
+                {
+                    status: 'TOBEGIN',
+                    name: '待开始'
+                },
+                {
+                    status: 'ACTIVE',
+                    name: '活动中'
+                },
+                {
+                    status: 'ENDED',
+                    name: '已结束'
+                }
+            ]
         };
     },
     computed: {
@@ -99,14 +129,37 @@ export default {
             }
         }
     },
+    mounted() {},
     methods: {
+        changeTab() {
+            this.getData(true);
+        },
         beforeData() {
-            return {
-                query: {
-                    del: false,
-                    companyId: 1
-                }
-            };
+            if (this.active == 'ACTIVE') {
+                return {
+                    query: {
+                        del: false,
+                        companyId: 1,
+                        status: 'sale'
+                    }
+                };
+            } else if (this.active == 'TOBEGIN') {
+                return {
+                    query: {
+                        del: false,
+                        companyId: 1,
+                        status: 'wait'
+                    }
+                };
+            } else {
+                return {
+                    query: {
+                        del: false,
+                        companyId: 1,
+                        status: 'end'
+                    }
+                };
+            }
         },
         onRefresh() {
             this.getData(true).then(() => {
@@ -143,28 +196,52 @@ export default {
     background-position: top center;
     background-size: contain;
 }
-.page_top {
+.casting_title {
     position: relative;
-    min-height: calc(var(--safe-top) + 139px);
-    .page_top_return {
-        position: fixed;
-        z-index: 1;
-        top: calc(var(--safe-top) + 16px);
+    height: 50px;
+    background: #0f1014;
+    font-size: 16px;
+    font-weight: bold;
+    color: #ffffff;
+    text-align: center;
+    line-height: 50px;
+    .casting_title_img {
+        position: absolute;
         left: 16px;
-        width: 34px;
-        height: 34px;
-        border-radius: 50%;
-        background: rgba(0, 0, 0, 0.2);
-        backdrop-filter: blur(1px);
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        z-index: 20;
-        .page_top_return_img {
-            width: 18px;
-            height: 18px;
-        }
+        top: 13px;
+        width: 24px;
+        height: 24px;
+    }
+}
+.page_top {
+    position: relative;
+    min-height: 139px;
+    .page_top_return_img {
+        width: 24px;
+        height: 24px;
+        position: absolute;
+        left: 20px;
+        top: 24px;
     }
+    // .page_top_return {
+    //     position: fixed;
+    //     z-index: 1;
+    //     top: calc(var(--safe-top) + 16px);
+    //     left: 16px;
+    //     width: 34px;
+    //     height: 34px;
+    //     border-radius: 50%;
+    //     background: rgba(0, 0, 0, 0.2);
+    //     backdrop-filter: blur(1px);
+    //     display: flex;
+    //     align-items: center;
+    //     justify-content: center;
+    //     z-index: 20;
+    //     .page_top_return_img {
+    //         width: 18px;
+    //         height: 18px;
+    //     }
+    // }
 }
 .search {
     padding-bottom: 50px;
@@ -217,7 +294,22 @@ export default {
 
     .btn {
         .flex();
-        color: #939599;
+        .btn_titleOne {
+            font-size: 12px;
+            color: #00fe1e;
+            line-height: 17px;
+            font-weight: bold;
+        }
+        .btn_titleTwo {
+            font-size: 12px;
+            color: #939599;
+            line-height: 17px;
+            font-weight: bold;
+        }
+        .btn_img {
+            width: 18px;
+            height: 18px;
+        }
     }
 
     .minter {
@@ -258,7 +350,7 @@ export default {
 
 .page-title {
     position: absolute;
-    top: calc(var(--safe-top) + 60px);
+    top: 60px;
     left: 20px;
     .text1 {
         font-size: 24px;

+ 2 - 5
src/views/asset/Detail.vue

@@ -1245,11 +1245,8 @@ export default {
                             message: '加载中...',
                             forbidClick: true
                         });
-                        return this.$http.post('/domainOrder/addHyperLink', {
-                            assetId: this.assetId,
-                            openHyperLink: false,
-                            hyperLinkType: this.info.hyperLinkType,
-                            address: ''
+                        return this.$http.post('/domainOrder/closeHyperLink', {
+                            assetId: this.assetId
                         });
                     })
                     .then(res => {

+ 3 - 2
src/views/domain/ProductChoose.vue

@@ -95,11 +95,12 @@ export default {
                 });
         },
         addHyperLink(address) {
-            return this.$http.post('/domainOrder/addHyperLink', {
+            return this.$http.post('/domainOrder/addId', {
                 assetId: this.assetId,
                 openHyperLink: true,
                 hyperLinkType: 'COLLECTION',
-                address: address
+                address: address,
+                publicCollectionId: this.chooseId
             });
         }
     }

+ 61 - 8
src/views/product/Detail.vue

@@ -105,6 +105,7 @@
                             ref="sale"
                             :info="info"
                             :blindBoxItems="blindBoxItems"
+                            @fatherMethod="fatherMethod"
                         ></sale-info>
 
                         <tasks
@@ -569,7 +570,9 @@
                                     </div>
                                     <div v-if="info.couponPayment" @click="buy" class="status-texts">立即兑换</div>
                                     <div v-else class="add_to_cart_btn_right">
-                                        <div class="add_to_cart_btn_right_cart" @click="addCart">加入购物车</div>
+                                        <div class="add_to_cart_btn_right_cart" @click="addCart">
+                                            {{ info.inCart ? '已加入购物车' : '加入购物车' }}
+                                        </div>
                                         <div class="add_to_cart_btn_right_buy" @click="buy">立即购买</div>
                                     </div>
                                 </div>
@@ -707,6 +710,10 @@
         <div class="back-content" @click="goBack">
             <img src="@assets/icon_fanhui2.png" alt="" />
         </div>
+        <div class="shopping_cart" v-if="cartNum != 0" @click="$router.push('/shoppingCart')">
+            <img :src="require('@assets/png-zhiding@3x.png')" alt="" class="shopping_cart_img" />
+            <div class="shopping_cart_num">{{ cartNum }}</div>
+        </div>
         <!-- <driver /> -->
 
         <!-- <driver /> -->
@@ -800,6 +807,7 @@ export default {
             sr: '',
             u: '',
             windowVertical: true,
+            timeId: 0,
             riskStatement:
                 '风险提示:法律许可范围内,最终解释权归RAEX绿洲宇宙平台所有,RAEX绿洲宇宙平台有权对宣传内容进行修改、调整,敬请留意最新宣传资料或公告通知。华储艺术品中心(深圳)有限公司进行拍卖的数字艺术品及RAEX绿洲宇宙平台发售的数字艺术品仅具备收藏欣赏、版权价值。RAEX绿洲宇宙发售的数字艺术品首发价格为官方指导价,版权市场拍卖价格均为数字艺术品持有者自行决定,平台不干涉拍卖价格,对发行的艺术品二手市场价格不构成任何指导建议。平台严禁未满22周岁以及超过55周岁的用户注册平台账号及使用相关功能,请各位探索者理性消费,仔细阅读相关权益,切勿盲从、轻信他人谣言,杜绝恶意炒作,远离一切非法行为,切实维护自身财产安全,共同营造健康数字艺术品生态。'
         };
@@ -868,6 +876,16 @@ export default {
         // }
     },
     methods: {
+        fatherMethod() {
+            this.getCartNum();
+            if (this.timeId) {
+                clearTimeout(this.timeId);
+                this.timeId = 0;
+            }
+            this.timeId = setTimeout(() => {
+                this.getProduct(true);
+            }, 500);
+        },
         goSearch() {
             this.setKeeps(['productSearch'], false);
             this.$router.push(`/productSearch?search=${this.info.prefixName}`);
@@ -927,11 +945,13 @@ export default {
                     }
                 });
         },
-        getProduct() {
-            this.$toast.loading({
-                message: '加载中...',
-                forbidClick: true
-            });
+        getProduct(load = false) {
+            if (!load) {
+                this.$toast.loading({
+                    message: '加载中...',
+                    forbidClick: true
+                });
+            }
             return this.$http
                 .get('/collection/get/' + this.collectionId)
                 .then(res => {
@@ -1094,6 +1114,9 @@ export default {
         },
         addCart() {
             this.checkLogin().then(() => {
+                if (this.info.inCart == true) {
+                    return;
+                }
                 if (this.info.source == 'OFFICIAL') {
                     this.$toast('官方藏品不能加入购物车');
                     return;
@@ -1111,6 +1134,10 @@ export default {
                     .then(res => {
                         this.$toast.success('恭喜加入购物车');
                         this.getCartNum();
+                        this.$refs.sale.getData(true);
+                        setTimeout(() => {
+                            this.getProduct(true);
+                        }, 1000);
                     })
                     .catch(e => {
                         this.$toast(e.error);
@@ -1544,7 +1571,7 @@ export default {
 }
 
 .info-box {
-    background-color: #1c1c1c;
+    // background-color: #1c1c1c;
 }
 
 .info {
@@ -2563,7 +2590,33 @@ export default {
         z-index: 1;
     }
 }
-
+.shopping_cart {
+    width: 48px;
+    height: 48px;
+    position: fixed;
+    right: 8px;
+    bottom: 66px;
+    z-index: 9999;
+    .shopping_cart_img {
+        width: 48px;
+        height: 48px;
+    }
+    .shopping_cart_num {
+        width: 19px;
+        height: 14px;
+        background: #ffffff;
+        border-radius: 8px;
+        border: 1px solid #ff6d2a;
+        font-size: 10px;
+        font-weight: bold;
+        color: #ff602a;
+        line-height: 14px;
+        text-align: center;
+        position: absolute;
+        top: 0px;
+        right: 0px;
+    }
+}
 /deep/.van-collapse-item__content {
     padding: 12px 16px !important;
     background-color: #131313 !important;

+ 9 - 1
src/views/product/HopeMarket.vue

@@ -191,7 +191,12 @@
                 @load="getData"
             >
                 <template v-for="(item, index) in showList" :key="index">
-                    <product-info dark v-model:info="list[index]" @update:info="init"></product-info>
+                    <product-info
+                        dark
+                        v-model:info="list[index]"
+                        @update:info="init"
+                        @fatherProduct="fatherProduct"
+                    ></product-info>
                 </template>
 
                 <van-empty
@@ -388,6 +393,9 @@ export default {
         });
     },
     methods: {
+        fatherProduct() {
+            this.getData(true);
+        },
         selectEvent(info) {
             this.setting = info.setting;
             this.search = info.search;

+ 4 - 1
src/views/product/MetaDomain.vue

@@ -83,7 +83,7 @@
                 @load="getList"
             >
                 <template v-for="(item, index) in list" :key="item.id">
-                    <product-info v-model:info="list[index]" domain></product-info>
+                    <product-info v-model:info="list[index]" domain @fatherProduct="fatherProduct"></product-info>
                 </template>
                 <van-empty
                     :image="require('@assets/empty_img_asset_dark.png')"
@@ -360,6 +360,9 @@ export default {
         ProductInfo
     },
     methods: {
+        fatherProduct() {
+            this.getList(true);
+        },
         onInput(e) {
             if (e.key === 'Enter') {
                 this.$nextTick(() => {

+ 1 - 1
src/views/search/SearchAll.vue

@@ -84,13 +84,13 @@ export default {
                 this.$toast('搜索内容不能为空');
                 return;
             }
+            this.addHistory(this.search);
             this.$router.push('/searchResult?search=' + item);
         },
         clickRight() {
             this.getSearch(this.search);
         },
         onKey(e) {
-            console.log(e.keyCode);
             if (e.keyCode === 13) {
                 this.ddHistory(this.search);
                 this.$router.push('/searchResult?search=' + this.search);

+ 7 - 0
src/views/user/Rice.vue

@@ -39,7 +39,14 @@ export default {
                     this.showTask();
                 }
                 if (event.data.message.type === 'init') {
+                    // console.log(window.localStorage.getItem('nineToken'));
                     this.isLoading = false;
+                    document
+                        .getElementById('game')
+                        .contentWindow.postMessage(
+                            { message: { type: 'token', data: window.localStorage.getItem('nineToken') } },
+                            '*'
+                        );
                 }
             });
         });