panhui пре 4 година
родитељ
комит
f558309ede
4 измењених фајлова са 141 додато и 6 уклоњено
  1. BIN
      src/assets/png-zhantai1.png
  2. 72 0
      src/components/asset/showInfo.vue
  3. 53 5
      src/views/Store.vue
  4. 16 1
      src/views/hall/Detail.vue

BIN
src/assets/png-zhantai1.png


+ 72 - 0
src/components/asset/showInfo.vue

@@ -0,0 +1,72 @@
+<template>
+    <router-link
+        :to="{
+            path: '/hall',
+            query: {
+                id: info.id
+            }
+        }"
+        class="showInfo"
+    >
+        <van-image radius="6" :src="info.showroomBg" width="100%" height="140" fit="cover" />
+
+        <img src="../../assets/png-zhantai1.png" class="bg-img" alt="" />
+        <div class="text">
+            <div class="text1">{{ info.name }}</div>
+            <div class="text2">{{ info.owner }}</div>
+        </div>
+    </router-link>
+</template>
+
+<script>
+import asset from '../../mixins/asset';
+import product from '../../mixins/product';
+
+export default {
+    mixins: [asset, product],
+    props: {
+        info: {
+            type: Object,
+            default: () => {
+                return {};
+            }
+        }
+    }
+};
+</script>
+
+<style lang="less" scoped>
+.showInfo {
+    padding: 10px 16px;
+    position: relative;
+    display: block;
+
+    & > div {
+        z-index: 1;
+    }
+}
+
+.bg-img {
+    height: 40px;
+    position: absolute;
+    top: 130px;
+    left: 0;
+    right: 0;
+    z-index: 0;
+}
+
+.text {
+    margin-top: 20px;
+    .text1 {
+        font-size: 12px;
+        color: #ffffff;
+        line-height: 17px;
+    }
+
+    .text2 {
+        font-size: 12px;
+        color: #939599;
+        line-height: 12px;
+    }
+}
+</style>

+ 53 - 5
src/views/Store.vue

@@ -6,6 +6,9 @@
                     <div class="btn" :class="{ active: active === 'explore' }" @click="changeActive('explore')">
                         我拥有的
                     </div>
+                    <div class="btn" :class="{ active: active === 'showRoom' }" @click="changeActive('showRoom')">
+                        我的展馆
+                    </div>
                     <div class="btn" :class="{ active: active === 'creator' }" @click="changeActive('creator')">
                         我卖出的
                     </div>
@@ -57,10 +60,12 @@
             class="box-list"
             :style="{
                 backgroundImage:
-                    active !== 'coupon' && showList.length > 0 ? `url(${require('../assets/png-zhantai.png')})` : '',
+                    active !== 'coupon' && active !== 'showRoom' && showList.length > 0
+                        ? `url(${require('../assets/png-zhantai.png')})`
+                        : '',
                 paddingBottom: showList.length % 3 === 0 ? '35.73vw' : '20px'
             }"
-            :class="{ couponList: active === 'coupon' }"
+            :class="{ couponList: active === 'coupon', roomList: active === 'showRoom' }"
             v-model:loading="loading"
             :finished="finished"
             finished-text=""
@@ -68,6 +73,7 @@
         >
             <template v-for="(item, index) in showList" :key="index">
                 <coupon-info :info="item" v-if="active == 'coupon'"></coupon-info>
+                <show-info :info="item" v-if="active == 'showRoom'"></show-info>
                 <asset-info :info="item" v-else></asset-info>
             </template>
 
@@ -95,6 +101,7 @@
 
 <script>
 import AssetInfo from '../components/asset/assetInfo.vue';
+import ShowInfo from '../components/asset/showInfo.vue';
 import CouponInfo from '../components/CouponInfo.vue';
 import asset from '../mixins/asset';
 import coupon from '../mixins/coupon';
@@ -104,11 +111,12 @@ export default {
     inject: ['bar', 'setKeeps', 'scrollWrapper', 'changeScroll', 'bodyScroll'],
     components: {
         AssetInfo,
-        CouponInfo
+        CouponInfo,
+        ShowInfo
     },
     data() {
         return {
-            active: 'explore',
+            active: 'showRoom',
             stiky: null,
             type: '',
             empty: false,
@@ -146,6 +154,24 @@ export default {
                         type: ''
                     }
                 ];
+            } else if (this.active === 'showRoom') {
+                return [
+                    {
+                        label: '全部',
+                        value: '',
+                        type: ''
+                    },
+                    {
+                        label: '展览中',
+                        value: 'ON_SALE',
+                        type: ''
+                    },
+                    {
+                        label: '未展览',
+                        value: 'NORMAL',
+                        type: ''
+                    }
+                ];
             } else if (this.active === 'creator') {
                 return [
                     {
@@ -294,6 +320,25 @@ export default {
             if (this.active == 'explore') {
                 form = {
                     status: this.status
+                    // type: 'BLIND_BOX,DEFAULT,'
+                };
+                if (this.type === 'NORMAL') {
+                    form = {
+                        ...form,
+                        publicShow: true,
+                        consignment: false
+                    };
+                }
+                if (this.type === 'ON_SALE') {
+                    form = {
+                        ...form,
+                        consignment: true
+                    };
+                }
+            } else if (this.active == 'showRoom') {
+                form = {
+                    status: this.status,
+                    type: 'SHOWROOM'
                 };
                 if (this.type === 'NORMAL') {
                     form = {
@@ -370,7 +415,7 @@ export default {
         }
 
         .btn + .btn {
-            margin-left: 30px;
+            margin-left: 20px;
         }
     }
 
@@ -441,6 +486,9 @@ export default {
     &.couponList {
         padding: 8px 8px 100px;
     }
+    &.roomList {
+        padding: 10px 0 100px;
+    }
 }
 
 .tab {

+ 16 - 1
src/views/hall/Detail.vue

@@ -136,8 +136,23 @@ export default {
     },
     data() {
         return {
-            isVertical: true
+            isVertical: true,
+            assetId: 0,
+            info: {}
         };
+    },
+    mounted() {
+        if (this.$route.query.id) {
+            this.assetId = this.$route.query.id;
+            this.getDetail();
+        }
+    },
+    methods: {
+        getDetail() {
+            this.$http.get('/asset/get/' + this.assetId).then(res => {
+                this.info = res;
+            });
+        }
     }
 };
 </script>