panhui 3 лет назад
Родитель
Сommit
b020ce48b6
4 измененных файлов с 26 добавлено и 11 удалено
  1. 1 1
      .env.development
  2. 11 2
      src/views/hall/Detail.vue
  3. 9 8
      src/views/hall/Post.vue
  4. 5 0
      src/views/hall/ProductAdd.vue

+ 1 - 1
.env.development

@@ -1,4 +1,4 @@
-VUE_APP_BASE_URL=http://localhost:8080
+VUE_APP_BASE_URL=https://test.raex.vip/
 NODE_ENV=development
 VUE_APP_PUBLIC_PATH=/
 ASSETS_PATH=raex

+ 11 - 2
src/views/hall/Detail.vue

@@ -63,7 +63,7 @@
             </div>
         </div>
         <post ref="post" :info="info"></post>
-        <div class="parallax-bg" data-swiper-parallax="-50%">
+        <div class="parallax-bg" :data-swiper-parallax="bgParallax">
             <div
                 class="parallax-bg-img"
                 :style="{
@@ -113,6 +113,7 @@
                 :data-swiper-parallax="distances[imgIndex]"
                 v-for="(img, imgIndex) in item"
                 :key="imgIndex"
+                @click="goCollection(img)"
             >
                 <van-image
                     :src="img.pic"
@@ -190,6 +191,9 @@ export default {
         },
         isMine() {
             return this.isLogin && this.$store.state.userInfo.id === this.info.userId;
+        },
+        bgParallax() {
+            return '-' + Math.ceil(100 / ((this.showList.length || 1) + 1)) + '%';
         }
     },
     mounted() {
@@ -298,7 +302,12 @@ export default {
         },
         goEdit() {
             if (this.isMine) {
-                this.$router.push('/hallEdit?message=' + this.info.introduction);
+                this.$router.push('/hallEdit?message=' + (this.info.introduction || ''));
+            }
+        },
+        goCollection(info) {
+            if (!this.isMine) {
+                this.$router.push('/productDetail/' + info.collectionId);
             }
         }
     },

+ 9 - 8
src/views/hall/Post.vue

@@ -9,10 +9,10 @@
                     <div class="content" ref="post">
                         <!-- @load="loadImg" -->
                         <!-- <img crossOrigin="anonymous" :src="banners" class="detailImg" /> -->
-                        <van-image :src="info.showroomBg" class="detailImg" fit="cover" />
+                        <van-image :src="detailImg || info.showroomBg" class="detailImg" />
                         <div class="collecions">
                             <div class="users">
-                                <van-image :src="info.pic" width="120" height="120" radius="8" fit="cover" />
+                                <van-image :src="userImg || info.pic" width="120" height="120" radius="8" fit="cover" />
                                 <div class="users-text">
                                     <div class="name">
                                         <div>{{ info.nickname }}</div>
@@ -30,7 +30,7 @@
                                     {{ info.introduction }}
                                 </div>
                                 <div class="minter-content">
-                                    <van-image width="18" height="18" round :src="info.pic" fit="cover" />
+                                    <van-image width="18" height="18" round :src="userImg || info.pic" fit="cover" />
                                     <div class="text1">{{ info.nickname }}</div>
                                 </div>
                             </div>
@@ -127,10 +127,10 @@ export default {
                 });
                 this.$nextTick(() => {
                     this.getImgBase64(this.info.showroomBg, 'detailImg');
-                    this.getImgBase64(this.info.pic, 'userImg');
+                    this.getImgBase64(this.info.pic + '?x-oss-process=image/resize,m_fill,h_200,w200', 'userImg');
                     setTimeout(() => {
                         this.loadImg();
-                    }, 1000);
+                    }, 1500);
                 });
             }
         },
@@ -215,7 +215,7 @@ export default {
 
 .img {
     img {
-        width: 80vw;
+        width: 260px;
         display: block;
     }
 }
@@ -238,7 +238,6 @@ export default {
             .flex();
             font-size: 12px;
             color: #939599;
-            line-height: 17px;
             .text1 {
                 margin-left: 5px;
             }
@@ -251,6 +250,8 @@ export default {
             padding: 5px;
             background-color: #f5f7fa;
             border-radius: 6px;
+            width: 70px;
+            box-sizing: border-box;
             .code {
                 display: block;
             }
@@ -383,7 +384,7 @@ export default {
 
 .collecions {
     position: absolute;
-    top: 80px;
+    top: 50px;
     left: 0;
     right: 0;
     z-index: 3;

+ 5 - 0
src/views/hall/ProductAdd.vue

@@ -13,6 +13,11 @@
         </div>
 
         <van-list v-model:loading="loading" :finished="finished" finished-text="" @load="getData">
+            <van-empty
+                v-if="empty"
+                description=" 你还没有藏品哦~"
+                :image="require(`../../assets/kong_png_yongyoude hei.png`)"
+            />
             <div class="list">
                 <div
                     class="box"