Przeglądaj źródła

Merge branch 'dev' of xiongzhu/raex_front into master

panhui 3 lat temu
rodzic
commit
a3648edd6e
3 zmienionych plików z 184 dodań i 94 usunięć
  1. 15 22
      src/components/auction/asset.vue
  2. 40 58
      src/views/product/HopeMarket.vue
  3. 129 14
      src/views/user/Rank.vue

+ 15 - 22
src/components/auction/asset.vue

@@ -207,25 +207,6 @@
                 </div>
                 <div v-else class="textName">铸造者未设置</div>
             </van-collapse-item>
-            <hash-code :info="info"></hash-code>
-            <van-collapse-item name="8" class="goods-info">
-                <template #title>
-                    <div class="page-title"><img src="@assets/info_icon_jiaoyijilu1.png" alt="" />交易记录</div>
-                </template>
-                <div v-if="list.length > 0">
-                    <div class="content" v-for="item in list" :key="item.id">
-                        <!-- <img class="img" :src="list.avatar" alt="" /> -->
-                        <div class="user-detail">
-                            <div class="text1 van-ellipsis">{{ item.fromUser || '保密' }}</div>
-                            <div class="text2" v-if="item.price">{{ item.operation }}¥{{ item.price }}</div>
-                            <div class="text2" v-else>{{ item.operation }}</div>
-                            <div class="text3 van-ellipsis">{{ item.toUser || '保密' }}</div>
-                            <div class="text4">{{ item.createdAt.substr(0, 16) }}</div>
-                        </div>
-                    </div>
-                </div>
-                <div v-else class="textName">暂无购买记录</div>
-            </van-collapse-item>
         </van-collapse>
     </div>
 </template>
@@ -267,7 +248,6 @@ export default {
         }
     },
     components: {
-        HashCode,
         Swiper,
         SwiperSlide
     },
@@ -278,8 +258,6 @@ export default {
             liked: false,
             btn: null,
             blindBoxItems: [],
-            init: [],
-            init2: null,
             list: [],
             activeNames: ['star', 'info', '1', '2', '3', '4', '5', '6', 'hashCode', 'hchashCode', '8'],
             inWeixin,
@@ -310,6 +288,21 @@ export default {
         },
         estPrice() {
             return this.accMul(this.auctionInfo.currentPrice || this.auctionInfo.price || 0, 1.06);
+        },
+        privileges() {
+            return this.info.privileges || [];
+        },
+        init2() {
+            return [...this.privileges].find(item => {
+                return item.name === '悄悄话';
+            });
+        },
+        init() {
+            return (
+                [...this.privileges].filter(item => {
+                    return item.name !== '悄悄话';
+                }) || []
+            );
         }
     },
     methods: {

+ 40 - 58
src/views/product/HopeMarket.vue

@@ -70,10 +70,10 @@
                         </template>
                     </van-tab>
                 </van-tabs>
+                <div class="flex1"></div>
+                <van-checkbox @change="getData(true)" class="sala" v-model="salable">仅看在售</van-checkbox>
                 <div class="allCategories" :class="{ prim: search }" @click="categorySelections">
-                    <div class="allCategories_con" :class="categorySelection ? 'allCategories_con_one' : ''">
-                        全部类目
-                    </div>
+                    <div class="allCategories_con" :class="categorySelection ? 'allCategories_con_one' : ''">筛选</div>
                     <img class="allCategories_img" src="@assets/shaixuan_pre.png" v-if="search" alt="" />
                     <img class="allCategories_img" src="@assets/shaixuan.png" v-else alt="" />
                     <!-- <van-icon name="icon-shaixuan1" class-prefix="font_family" /> -->
@@ -132,9 +132,7 @@
                 </div>
                 <!-- <div class="banner-wrapper" v-if="showSetting" @touchstart="touchEvent"></div> -->
             </div>
-            <!-- <van-checkbox v-if="source == 'TRANSFER' && !title" @change="getData(true)" class="sala" v-model="salable"
-                >仅看在售</van-checkbox
-            > -->
+
             <!-- <van-button
                 @click="changeSort"
                 v-if="source == 'TRANSFER' && !title"
@@ -158,6 +156,26 @@
 
         <product-select ref="select" @select="selectEvent"></product-select>
         <van-overlay :show="show" @click="(show = false), (categorySelection = false)"></van-overlay>
+        <div class="classify-content" v-if="search">
+            <div class="classify-list">
+                <!-- <div class="classify-info">
+                        <div class="text1">发行量</div>
+                        <div class="text2">{{ displayInformation.totalNum }}</div>
+                    </div> -->
+                <div class="classify-info">
+                    <div class="text1">流通量</div>
+                    <div class="text2">{{ displayInformation.tranferingNum }}</div>
+                </div>
+                <div class="classify-info">
+                    <div class="text1">寄售中</div>
+                    <div class="text2">{{ displayInformation.consignmentNum }}</div>
+                </div>
+                <div class="classify-info">
+                    <div class="text1">仅展示</div>
+                    <div class="text2">{{ displayInformation.onlyShowNum }}</div>
+                </div>
+            </div>
+        </div>
         <van-pull-refresh
             success-text="加载成功"
             success-duration="500"
@@ -172,24 +190,6 @@
                 :immediate-check="false"
                 @load="getData"
             >
-                <div class="classify-list" v-if="search">
-                    <!-- <div class="classify-info">
-                        <div class="text1">发行量</div>
-                        <div class="text2">{{ displayInformation.totalNum }}</div>
-                    </div> -->
-                    <div class="classify-info">
-                        <div class="text1">流通量</div>
-                        <div class="text2">{{ displayInformation.tranferingNum }}</div>
-                    </div>
-                    <div class="classify-info">
-                        <div class="text1">寄售中</div>
-                        <div class="text2">{{ displayInformation.consignmentNum }}</div>
-                    </div>
-                    <div class="classify-info">
-                        <div class="text1">仅展示</div>
-                        <div class="text2">{{ displayInformation.onlyShowNum }}</div>
-                    </div>
-                </div>
                 <template v-for="(item, index) in showList" :key="index">
                     <product-info dark v-model:info="list[index]" @update:info="init"></product-info>
                 </template>
@@ -723,7 +723,7 @@ export default {
         box-sizing: border-box;
         background: #222426;
         display: flex;
-        justify-content: space-between;
+        // justify-content: space-between;
         flex-wrap: wrap;
         // transition: height ease-in-out 0.4s;
         .series_selection_con {
@@ -750,37 +750,17 @@ export default {
     }
 }
 /deep/.sala {
-    position: absolute;
-    right: 16px;
-    bottom: 11px;
-    color: @text3!important;
-    min-width: 92px;
-    font-size: 14px;
-    background: #272b2e !important;
-    // .van-checkbox__icon {
-    //     color: #fff;
-    //     transform: scale(0.6);
-
-    //     .van-icon {
-    //         border-color: @text3;
-    //     }
-
-    //     &.van-checkbox__icon--checked {
-    //         .van-icon {
-    //             border-width: 0;
-    //             .linear();
-    //             &::before {
-    //                 color: #fff;
-    //             }
-    //         }
-    //     }
-    // }
-    // .van-checkbox__label {
-    //     color: @text3;
-    //     margin-left: 0px;
-    //     font-size: @font1;
-    // }
+    color: #939599 !important;
+    white-space: nowrap;
+    font-size: 12px;
+    color: #939599;
+    line-height: 24px;
+    --van-checkbox-label-color: #939599;
+    --van-checkbox-size: 14px;
+    --van-checkbox-label-margin: 4px;
+    margin-right: 20px;
 }
+
 .swiperContent {
     background: #222426;
     border-bottom: 1px solid #272b2e;
@@ -927,13 +907,15 @@ export default {
         }
     }
 }
-
+.classify-content {
+    background-color: #222426;
+    padding:0 16px 16px;
+}
 .classify-list {
     .flex();
     justify-content: space-between;
-    background: #373b3e;
+    background: #272b2e;
     border-radius: 8px;
-    margin: 8px;
 
     .classify-info {
         width: 33%;

+ 129 - 14
src/views/user/Rank.vue

@@ -10,11 +10,32 @@
             <div class="text2">{{ time }}</div>
         </div>
         <div class="rank-content">
-            <div class="tabs">
+            <div class="tr-tab">
+                <div class="tab-item" :class="{ prim: active === 0 }" @click="changeRare(0)">
+                    <img v-if="active === 0" src="@assets/png-left-bg.png" class="bg" alt="" />
+                    <div class="text">
+                        <span>持仓总值排名</span>
+                    </div>
+                </div>
+                <div class="tab-item" :class="{ prim: active === 1 }" @click="changeRare(1)">
+                    <img v-if="active === 1" src="@assets/png-middle-bg.png" class="bg" alt="" />
+                    <div class="text">
+                        <span>一周购买力排行</span>
+                    </div>
+                </div>
+                <div class="tab-item" :class="{ prim: active === 2 }" @click="wait">
+                    <img v-if="active === 2" src="@assets/png-right-bg.png" class="bg" alt="" />
+                    <div class="text">
+                        <span>绿洲灵气值排名</span>
+                    </div>
+                </div>
+            </div>
+            <!-- <div class="tabs">
                 <div class="tab" @click="active = 0" :class="{ active: active === 0 }">持仓总值排名</div>
+                <div class="tab" @click="active = 0" :class="{ active: active === 2 }">持仓总值排名</div>
                 <div class="tab" @click="wait" :class="{ active: active === 1 }">绿洲灵气值排名</div>
                 <img class="tab-img" :class="{ 'tab-img-right': active === 1 }" src="@assets/rank-left.png" alt="" />
-            </div>
+            </div> -->
             <div class="tr">
                 <div class="th">排行</div>
                 <div class="th">用户头像</div>
@@ -52,18 +73,7 @@ export default {
         };
     },
     mounted() {
-        this.$toast.loading({
-            message: '加载中...',
-            forbidClick: true
-        });
-        this.$http.get('/userHold/app/top').then(res => {
-            this.$toast.clear();
-            this.list = res
-                .filter(item => {
-                    return item.userId !== '1435297' && item.userId !== '4273750';
-                })
-                .slice(0, 20);
-        });
+        this.getOwners();
         // this.$http
         //     .get('sysConfig/get/fixed_top')
         //     .then(res => {
@@ -78,6 +88,48 @@ export default {
         //     });
     },
     methods: {
+        getOwners() {
+            this.$toast.loading({
+                message: '加载中...',
+                forbidClick: true
+            });
+            this.$http.get('/userHold/app/top').then(res => {
+                this.$toast.clear();
+                this.list = res
+                    .filter(item => {
+                        return item.userId !== '1435297' && item.userId !== '4273750';
+                    })
+                    .slice(0, 20);
+            });
+        },
+        getTop() {
+            this.$toast.loading({
+                message: '加载中...',
+                forbidClick: true
+            });
+            return this.$http.get('/user/topTen').then(res => {
+                this.$toast.clear();
+                this.list = res.slice(0, 20);
+            });
+        },
+        changeRare(active) {
+            this.active = active;
+            if (active == 0) {
+                this.getOwners();
+            } else if (active === 1) {
+                this.getTop();
+            }
+        },
+        getActive1() {
+            this.$http.get('/userHold/app/top').then(res => {
+                this.$toast.clear();
+                this.list = res
+                    .filter(item => {
+                        return item.userId !== '1435297' && item.userId !== '4273750';
+                    })
+                    .slice(0, 20);
+            });
+        },
         getFixed() {
             this.$toast.loading({
                 message: '加载中...',
@@ -299,4 +351,67 @@ export default {
         }
     }
 }
+.tr-tab {
+    .flex();
+    background: #f2f2f2;
+    border-radius: 16px 16px 0px 0px;
+    .tab-item {
+        width: 33.33%;
+        position: relative;
+        height: 49px;
+        .bg {
+            position: absolute;
+            top: 0;
+            width: 140px;
+            height: 50px;
+            z-index: 0;
+        }
+        .text {
+            position: absolute;
+            left: 50%;
+            top: 50%;
+            transform: translate(-50%, -50%);
+            z-index: 1;
+            .flex();
+            align-items: flex-end;
+            justify-content: center;
+            color: #939599;
+            white-space: nowrap;
+            font-size: 12px;
+        }
+        &:nth-child(1) {
+            .bg {
+                left: 0;
+            }
+
+            .text {
+                left: 14px;
+                transform: translate(0, -50%);
+            }
+        }
+        &:nth-child(2) {
+            .bg {
+                left: 50%;
+                transform: translateX(-50%);
+            }
+        }
+
+        &:nth-child(3) {
+            .bg {
+                right: 0;
+            }
+
+            .text {
+                right: 14px;
+                transform: translate(-14px, -50%);
+            }
+        }
+        &.prim {
+            .text {
+                color: #3ab200;
+                font-weight: bold;
+            }
+        }
+    }
+}
 </style>