panhui vor 3 Jahren
Ursprung
Commit
fc0cf3247e

+ 2 - 2
src/main/pc-space/src/components/PageHeader.vue

@@ -72,8 +72,8 @@ export default {
                     value: '/collection?type=BLIND_BOX'
                     value: '/collection?type=BLIND_BOX'
                 },
                 },
                 {
                 {
-                    label: '铸造商店',
-                    value: 'wait'
+                    label: '衍生品',
+                    value: '/collection?type=DERIVATIVE'
                 },
                 },
                 {
                 {
                     label: '我的藏品',
                     label: '我的藏品',

+ 4 - 0
src/main/pc-space/src/mixins/list.js

@@ -28,6 +28,10 @@ export default {
                     ...this.beforeData()
                     ...this.beforeData()
                 };
                 };
             }
             }
+            data.query = {
+                ...data.query,
+                projectId: this.$store.state.projectId
+            };
 
 
             this.$http.post(this.url, data, { body: 'json' }).then(res => {
             this.$http.post(this.url, data, { body: 'json' }).then(res => {
                 if (this.setList) {
                 if (this.setList) {

+ 5 - 0
src/main/pc-space/src/mixins/lists.js

@@ -27,6 +27,11 @@ export default {
                 };
                 };
             }
             }
 
 
+            data.query = {
+                ...data.query,
+                projectId: this.$store.state.projectId
+            };
+
             this.$http.post(this.url, data, { body: 'json' }).then(res => {
             this.$http.post(this.url, data, { body: 'json' }).then(res => {
                 this.lists = [...this.list, ...res.content];
                 this.lists = [...this.list, ...res.content];
                 this.empty = res.empty;
                 this.empty = res.empty;

+ 6 - 0
src/main/pc-space/src/mixins/pageableTable.js

@@ -53,6 +53,7 @@ export default {
             };
             };
             if (this.beforeGetData) {
             if (this.beforeGetData) {
                 let mergeData = this.beforeGetData(query);
                 let mergeData = this.beforeGetData(query);
+                console.log(mergeData);
                 if (mergeData) {
                 if (mergeData) {
                     data = {
                     data = {
                         ...data,
                         ...data,
@@ -60,6 +61,11 @@ export default {
                     };
                     };
                 }
                 }
             }
             }
+            data.query = {
+                ...data.query,
+                projectId: this.$store.state.projectId
+            };
+            console.log(data);
             // console.log(this.data);
             // console.log(this.data);
             this.fetchingData = true;
             this.fetchingData = true;
             this.$http
             this.$http

+ 2 - 1
src/main/pc-space/src/store/index.js

@@ -12,7 +12,8 @@ export default new Vuex.Store({
         institutionInfo: null,
         institutionInfo: null,
         personalInfo: null,
         personalInfo: null,
         showAdd: false,
         showAdd: false,
-        couponInfo: null
+        couponInfo: null,
+        projectId: 2
     },
     },
     mutations: {
     mutations: {
         setKeeps(state, keeps) {
         setKeeps(state, keeps) {

+ 11 - 6
src/main/pc-space/src/views/Collection.vue

@@ -1,8 +1,9 @@
 <template>
 <template>
     <div class="container">
     <div class="container">
-        <div class="title1" v-if="type === 'BLIND_BOX'" ref="anchor">欢迎来到藏品盲盒市场</div>
-        <div class="title" v-if="type !== 'BLIND_BOX'" ref="anchor">欢迎来到藏品市场</div>
-        <el-radio-group v-if="type !== 'BLIND_BOX'" class="menu" v-model="select" size="normal">
+        <div class="title1" v-if="type === 'BLIND_BOX'" ref="anchor">欢迎来到盲盒市场</div>
+        <div class="title1" v-else-if="type === 'DERIVATIVE'" ref="anchor">欢迎来到衍生品市场</div>
+        <div class="title" v-else ref="anchor">欢迎来到藏品市场</div>
+        <el-radio-group v-if="type === 'DEFAULT'" class="menu" v-model="select" size="normal">
             <el-radio-button v-for="(item, index) in typeList" :key="index" :label="item.value">
             <el-radio-button v-for="(item, index) in typeList" :key="index" :label="item.value">
                 <div class="radio-item">
                 <div class="radio-item">
                     <i class="font_family" :class="[item.icon]"></i>
                     <i class="font_family" :class="[item.icon]"></i>
@@ -11,7 +12,7 @@
             </el-radio-button>
             </el-radio-button>
         </el-radio-group>
         </el-radio-group>
 
 
-        <div class="border" v-if="type !== 'BLIND_BOX'" style="margin-top: 30px"></div>
+        <div class="border" v-if="type === 'DEFAULT'" style="margin-top: 30px;"></div>
         <div class="search-list">
         <div class="search-list">
             <el-input
             <el-input
                 class="search"
                 class="search"
@@ -22,7 +23,7 @@
                 @change="onSearch"
                 @change="onSearch"
             >
             >
             </el-input>
             </el-input>
-            <el-select class="select" style="margin-top: 30px" v-model="sortStr" placeholder="请选择">
+            <el-select class="select" style="margin-top: 30px;" v-model="sortStr" placeholder="请选择">
                 <el-option v-for="item in sortList" :key="item.value" :label="item.label" :value="item.value">
                 <el-option v-for="item in sortList" :key="item.value" :label="item.label" :value="item.value">
                 </el-option>
                 </el-option>
             </el-select>
             </el-select>
@@ -142,7 +143,11 @@ export default {
             this.getData();
             this.getData();
         },
         },
         '$route.query.type'() {
         '$route.query.type'() {
-            if (!this.$route.query.type || this.$route.query.type === 'BLIND_BOX') {
+            if (
+                !this.$route.query.type ||
+                this.$route.query.type === 'BLIND_BOX' ||
+                this.$route.query.type === 'DERIVATIVE'
+            ) {
                 this.init();
                 this.init();
             }
             }
         }
         }

+ 14 - 7
src/main/pc-space/src/views/My.vue

@@ -9,7 +9,7 @@ el-table__row<template>
                 </div>
                 </div>
             </el-radio-button>
             </el-radio-button>
         </el-radio-group>
         </el-radio-group>
-        <div class="border" style="margin-top: 30px"></div>
+        <div class="border" style="margin-top: 30px;"></div>
         <div class="search-list" v-if="select !== '2'">
         <div class="search-list" v-if="select !== '2'">
             <el-input
             <el-input
                 class="search"
                 class="search"
@@ -20,7 +20,7 @@ el-table__row<template>
                 @change="onSearch"
                 @change="onSearch"
             >
             >
             </el-input>
             </el-input>
-            <el-select class="select" style="margin-top: 30px" v-model="sortStr" placeholder="请选择">
+            <el-select class="select" style="margin-top: 30px;" v-model="sortStr" placeholder="请选择">
                 <el-option v-for="item in sortList" :key="item.value" :label="item.label" :value="item.value">
                 <el-option v-for="item in sortList" :key="item.value" :label="item.label" :value="item.value">
                 </el-option>
                 </el-option>
             </el-select>
             </el-select>
@@ -116,7 +116,12 @@ export default {
                     this.url = '/userCoupon/all';
                     this.url = '/userCoupon/all';
                     break;
                     break;
             }
             }
-            this.getData();
+            this.$nextTick(() => {
+                this.page = 1;
+                this.sortStr = 'createdAt,desc';
+                this.search = '';
+                this.getData();
+            });
         }
         }
     },
     },
     methods: {
     methods: {
@@ -134,26 +139,28 @@ export default {
                 });
                 });
         },
         },
         beforeGetData() {
         beforeGetData() {
+            console.log(this.select);
             if (this.select === '1') {
             if (this.select === '1') {
                 return {
                 return {
                     search: this.search,
                     search: this.search,
                     query: {
                     query: {
                         userId: this.$store.state.userInfo.id,
                         userId: this.$store.state.userInfo.id,
-                        // status: 'TRANSFERRED',
-                        consignment: true
+                        status: 'TRANSFERRED'
                     }
                     }
                 };
                 };
             } else if (this.select === '0') {
             } else if (this.select === '0') {
                 return {
                 return {
                     search: this.search,
                     search: this.search,
                     query: {
                     query: {
-                        userId: this.$store.state.userInfo.id
+                        userId: this.$store.state.userInfo.id,
+                        status: 'NORMAL,TRADING,GIFTING'
                     }
                     }
                 };
                 };
             } else if (this.select === '2') {
             } else if (this.select === '2') {
                 return {
                 return {
                     query: {
                     query: {
-                        userId: this.$store.state.userInfo.id
+                        userId: this.$store.state.userInfo.id,
+                        used: false
                         // status: 'creator'
                         // status: 'creator'
                     }
                     }
                 };
                 };