xuqiang 4 éve
szülő
commit
7918754684

+ 4 - 0
src/main/pc-space/src/components/CollectionInfo.vue

@@ -42,6 +42,7 @@
 <script>
 import product from '../mixins/product';
 import LikeButton from './LikeButton.vue';
+import { mapState } from 'vuex';
 export default {
     components: { LikeButton },
     props: {
@@ -57,6 +58,9 @@ export default {
         }
     },
     mixins: [product],
+    computed: {
+        ...mapState(['userInfo'])
+    },
     methods: {
         likeProduct() {
             if (!this.info.liked) {

+ 35 - 5
src/main/pc-space/src/views/CastingDetail.vue

@@ -66,7 +66,7 @@
                     @change="onSearch"
                 >
                 </el-input>
-                <!-- <el-select class="select" v-model="sortStr" placeholder="请选择">
+                <!-- <el-select class="select" v-model="value" @change="getList" placeholder="请选择">
                     <el-option v-for="item in typeOptions" :key="item.value" :label="item.label" :value="item.value">
                     </el-option>
                 </el-select> -->
@@ -123,18 +123,19 @@ export default {
                     value: false
                 }
             ],
+            value: '',
             typeOptions: [
                 {
                     label: '全部',
-                    type: ''
+                    value: ''
                 },
                 {
                     label: '售卖',
-                    type: 'ON_SALE'
+                    value: 'ON_SALE'
                 },
                 {
                     label: '仅展示',
-                    type: 'NORMAL'
+                    value: 'NORMAL'
                 }
             ],
             sortList: [
@@ -159,7 +160,8 @@ export default {
             url: '/collection/all',
             list: [],
             isOwner: true,
-            isList: false
+            isList: false,
+            page: 0
         };
     },
     mounted() {
@@ -181,6 +183,34 @@ export default {
         },
         setList(list) {
             this.list = list;
+        },
+        getList() {
+            let form = {
+                page: this.page,
+                size: 20,
+                query: {
+                    userId: this.info.id
+                    // status: 'NORMAL,TRADING,GIFTING'
+                },
+                sort: 'createdAt,desc'
+            };
+            if (this.value === 'NORMAL') {
+                form.query = {
+                    ...form.query,
+                    salable: false
+                    // consignment: false
+                };
+            }
+            if (this.value === 'ON_SALE') {
+                form.query = {
+                    ...form.query,
+                    consignment: true
+                };
+            }
+            this.$http.post('/asset/all', form, { body: 'json' }).then(res => {
+                this.list = [...this.list, ...res.content];
+                console.log(this.list);
+            });
         }
     }
 };

+ 9 - 4
src/main/pc-space/src/views/CollectionDetail.vue

@@ -695,10 +695,15 @@ export default {
                     line-height: 24px;
                 }
                 &::before {
-                    display: inline-block;
-                    width: 10px;
-                    height: 10px;
-                    border: 5px solid transparent;
+                    width: 0;
+                    height: 0;
+                    border-right: 5px solid transparent;
+                    border-left: 5px solid transparent;
+                    border-top: 5px solid #515151;
+                    // display: inline-block;
+                    // width: 10px;
+                    // height: 10px;
+                    // border: 5px solid transparent;
                     border-bottom-color: red;
                 }
             }