|
|
@@ -41,8 +41,8 @@
|
|
|
<img v-if="info.authStatus === 'SUCCESS'" src="@assets/renzheng_icon_pre.png" alt="" />
|
|
|
</div>
|
|
|
<div class="text2">
|
|
|
- <span>用户ID:{{ info.id }}</span>
|
|
|
- <img @click="copy" src="@assets/svgs/copy_icon.svg" alt="" />
|
|
|
+ <!-- <span>用户ID:{{ info.id }}</span>
|
|
|
+ <img @click="copy" src="@assets/svgs/copy_icon.svg" alt="" /> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -95,8 +95,18 @@
|
|
|
<div class="menu-item" @click="changeMenu('BLIND_BOX')" :class="{ active: type === 'BLIND_BOX' }">
|
|
|
盲盒类目
|
|
|
</div>
|
|
|
+ <div
|
|
|
+ class="menu-item"
|
|
|
+ v-if="showRoom"
|
|
|
+ @click="changeMenu('SHOWROOM')"
|
|
|
+ :class="{ active: type === 'SHOWROOM' }"
|
|
|
+ >
|
|
|
+ 展厅
|
|
|
+ </div>
|
|
|
<div class="flex1"></div>
|
|
|
- <van-checkbox @change="getData(true)" class="sala" v-model="salable">仅看在售</van-checkbox>
|
|
|
+ <van-checkbox v-if="type !== 'SHOWROOM'" @change="getData(true)" class="sala" v-model="salable"
|
|
|
+ >仅看在售</van-checkbox
|
|
|
+ >
|
|
|
<div
|
|
|
class="search"
|
|
|
@click="
|
|
|
@@ -120,11 +130,13 @@
|
|
|
<van-tab title="全部" name=""></van-tab>
|
|
|
<van-tab title="寄售" :name="true"></van-tab>
|
|
|
<van-tab title="仅展示" :name="false"></van-tab>
|
|
|
+ <van-tab title="展厅" v-if="showRoom" name="showRoom"></van-tab>
|
|
|
</van-tabs>
|
|
|
</van-sticky>
|
|
|
<van-list
|
|
|
style="padding-bottom: 100px"
|
|
|
class="list"
|
|
|
+ :class="{ hallList: isShowType }"
|
|
|
v-model:loading="loading"
|
|
|
:finished="finished"
|
|
|
:immediate-check="false"
|
|
|
@@ -132,7 +144,8 @@
|
|
|
@load="getData"
|
|
|
>
|
|
|
<template v-for="(item, index) in list" :key="item.id">
|
|
|
- <product-info v-model:info="list[index]"></product-info>
|
|
|
+ <show-info v-if="isShowType" v-model:info="list[index]" list></show-info>
|
|
|
+ <product-info v-else v-model:info="list[index]"></product-info>
|
|
|
</template>
|
|
|
<van-empty
|
|
|
v-if="empty"
|
|
|
@@ -145,10 +158,11 @@
|
|
|
|
|
|
<script>
|
|
|
import { mapState } from 'vuex';
|
|
|
+import ShowInfo from '../../components/asset/showInfo.vue';
|
|
|
import productInfo from '../../components/product/productInfo.vue';
|
|
|
import list from '../../mixins/list';
|
|
|
export default {
|
|
|
- components: { productInfo },
|
|
|
+ components: { productInfo, ShowInfo },
|
|
|
computed: {
|
|
|
...mapState(['userInfo']),
|
|
|
rankInfo() {
|
|
|
@@ -172,9 +186,22 @@ export default {
|
|
|
} else {
|
|
|
return 'TRANSFER';
|
|
|
}
|
|
|
+ },
|
|
|
+ isShowType() {
|
|
|
+ if (this.type == 'SHOWROOM' || this.salable === 'showRoom') {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ },
|
|
|
+ url() {
|
|
|
+ if (this.isShowType) {
|
|
|
+ return '/showroom/all';
|
|
|
+ }
|
|
|
+ return '/collection/all';
|
|
|
}
|
|
|
},
|
|
|
- inject: ['bar'],
|
|
|
+ name: 'creatorDetail',
|
|
|
+ inject: ['bar', 'setKeeps', 'scrollWrapper', 'changeScroll'],
|
|
|
mixins: [list],
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -185,9 +212,10 @@ export default {
|
|
|
list: [],
|
|
|
empty: false,
|
|
|
hots: [],
|
|
|
- url: '/collection/all',
|
|
|
isMinter: true,
|
|
|
- showMore: false
|
|
|
+ showMore: false,
|
|
|
+ scrollTop: 0,
|
|
|
+ showRoom: false
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
@@ -198,10 +226,37 @@ export default {
|
|
|
}
|
|
|
this.getInfo();
|
|
|
this.getHot();
|
|
|
+ this.$http
|
|
|
+ .post(
|
|
|
+ '/showroom/all',
|
|
|
+ {
|
|
|
+ query: {
|
|
|
+ del: false,
|
|
|
+ publish: true,
|
|
|
+ userId: this.$route.query.id
|
|
|
+ }
|
|
|
+ },
|
|
|
+ { body: 'json' }
|
|
|
+ )
|
|
|
+ .then(res => {
|
|
|
+ if (!res.empty) {
|
|
|
+ this.showRoom = true;
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
methods: {
|
|
|
beforeData() {
|
|
|
- if (this.isMinter) {
|
|
|
+ if (this.isShowType) {
|
|
|
+ return {
|
|
|
+ query: {
|
|
|
+ userId: this.info.id || this.$route.query.id,
|
|
|
+ del: false,
|
|
|
+ status: 'SUCCESS',
|
|
|
+ publish: true
|
|
|
+ },
|
|
|
+ sort: 'id,desc'
|
|
|
+ };
|
|
|
+ } else if (this.isMinter) {
|
|
|
return {
|
|
|
query: {
|
|
|
type: this.type,
|
|
|
@@ -289,6 +344,21 @@ export default {
|
|
|
this.isLoading = false;
|
|
|
});
|
|
|
}
|
|
|
+ },
|
|
|
+ activated() {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.changeScroll(this.scrollTop);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ beforeRouteLeave(to, from, next) {
|
|
|
+ if (to.name === 'productDetail' || to.name === 'hall') {
|
|
|
+ this.scrollTop = this.scrollWrapper.value.scrollTop;
|
|
|
+ this.setKeeps(['creatorDetail']);
|
|
|
+ } else {
|
|
|
+ this.scrollTop = 0;
|
|
|
+ this.setKeeps(['creatorDetail'], false);
|
|
|
+ }
|
|
|
+ next();
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
@@ -454,6 +524,7 @@ export default {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
margin-bottom: 12px;
|
|
|
+ min-height: 24px;
|
|
|
img {
|
|
|
display: block;
|
|
|
margin-left: 6px;
|
|
|
@@ -525,4 +596,21 @@ export default {
|
|
|
font-size: @font1;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+.hallList {
|
|
|
+ // background: #272b2e;
|
|
|
+ padding: 16px;
|
|
|
+}
|
|
|
+.showInfo {
|
|
|
+ background-color: #fff;
|
|
|
+ border-radius: 12px;
|
|
|
+ /deep/.text {
|
|
|
+ .text1 {
|
|
|
+ color: #000;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+.showInfo + .showInfo {
|
|
|
+ margin-top: 16px;
|
|
|
+}
|
|
|
</style>
|