panhui 4 gadi atpakaļ
vecāks
revīzija
1cd8930951
4 mainītis faili ar 46 papildinājumiem un 14 dzēšanām
  1. 2 1
      src/plugins/colors.js
  2. 2 2
      src/views/Store.vue
  3. 2 1
      src/views/Submit.vue
  4. 40 10
      src/views/asset/Search.vue

+ 2 - 1
src/plugins/colors.js

@@ -6,7 +6,8 @@ export default {
                 warn: '#3AB200',
                 font0: '#000000',
                 bg: '#ffffff',
-                bg3: '#f5f7fa'
+                bg3: '#f5f7fa',
+                bgBlack: '#0f0f0f'
             };
         } else {
             app.config.globalProperties.$colors = {

+ 2 - 2
src/views/Store.vue

@@ -32,13 +32,13 @@
                         兑换券
                     </div>
                 </div>
-                <!-- <div
+                <div
                     class="search"
                     v-if="isLogin && active !== 'coupon'"
                     @click="$router.push('/assetSearch?status=' + status)"
                 >
                     <img src="@assets/svgs/search.svg" alt="" />
-                </div> -->
+                </div>
             </div>
 
             <van-tabs

+ 2 - 1
src/views/Submit.vue

@@ -272,7 +272,8 @@ export default {
                 .post(
                     '/userCoupon/all',
                     {
-                        query: { userId: this.$store.state.userInfo.id, used: false }
+                        query: { userId: this.$store.state.userInfo.id, used: false },
+                        size: 999
                     },
                     { body: 'json' }
                 )

+ 40 - 10
src/views/asset/Search.vue

@@ -1,5 +1,9 @@
 <template>
-    <div class="discover" :style="{ backgroundColor: isSearch ? $colors.bg3 : $colors.bg }">
+    <div
+        class="discover"
+        :class="{ isSearch: isSearch }"
+        :style="{ backgroundColor: isSearch ? $colors.bgBlack : $colors.bg }"
+    >
         <van-sticky ref="top" :offset-top="bar.value && bar.value.show ? 46 : 0">
             <van-search
                 ref="top"
@@ -26,12 +30,20 @@
             finished-text=""
             @load="getData"
             v-if="isSearch"
+            :style="{
+                backgroundImage: empty ? '' : `url(${require('../../assets/png-zhantai.png')})`,
+                paddingBottom: '20px'
+            }"
         >
             <template v-for="(item, index) in list" :key="index">
                 <asset-info :info="item"></asset-info>
             </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>
         <div class="search-content" v-else>
             <div class="hot-content" v-if="historys.length > 0">
@@ -99,7 +111,8 @@ export default {
             return {
                 query: {
                     userId: this.$store.state.userInfo.id,
-                    status: this.status
+                    status: this.status,
+                    type: 'BLIND_BOX,DEFAULT'
                 },
                 search: this.search
             };
@@ -189,6 +202,20 @@ export default {
     box-sizing: border-box;
 }
 
+.isSearch {
+    .van-search {
+        background-color: #222426;
+    }
+    /deep/.van-search__content {
+        background-color: #0f0f0f;
+        color: #fff;
+    }
+
+    /deep/.van-field__control {
+        color: #fff;
+    }
+}
+
 /deep/ .mySwiper {
     width: calc(100vw - 32px);
     height: calc(41vw - 13px);
@@ -261,7 +288,10 @@ export default {
 .box-list {
     // display: flex;
     // flex-wrap: wrap;
-    padding: 8px 8px 100px;
+    padding: 0 0 0 4.2vw;
+    background-size: 100vw 42vw;
+    background-position: 0 -10vw;
+    box-sizing: border-box;
 }
 
 /deep/.van-tab {
@@ -308,10 +338,10 @@ export default {
     }
 }
 
-/deep/.product {
-    background-color: @bg;
-    .name {
-        color: @text0!important;
-    }
-}
+// /deep/.product {
+//     background-color: @bg;
+//     .name {
+//         color: @text0!important;
+//     }
+// }
 </style>