Browse Source

二手市场

yuany 3 years ago
parent
commit
1a7e43f1fd

+ 1 - 1
.env.app

@@ -1,4 +1,4 @@
-VUE_APP_BASE_URL=https://www.raex.vip
+VUE_APP_BASE_URL=https://www.adcs.vip
 NODE_ENV=production
 VUE_APP_PUBLIC_PATH=./
 ASSETS_PATH=raex

+ 1 - 1
.env.app_test

@@ -1,4 +1,4 @@
-VUE_APP_BASE_URL=https://www.raex.vip
+VUE_APP_BASE_URL=https://www.adcs.vip
 NODE_ENV=production
 VUE_APP_PUBLIC_PATH=./
 ASSETS_PATH=raex

+ 3 - 3
src/components/product/HashCode.vue

@@ -18,7 +18,7 @@
             >
         </div>
     </div>
-    <div v-else class="textName">铸造者未设置</div>
+    <div v-else class="textName">创作者未设置</div>
     <!-- <van-collapse-item name="hashCode" class="goods-info">
         <template #title>
             <div class="page-title"><img src="@assets/icon-lianshangxinxi(3).png" alt="" />链上信息</div>
@@ -104,7 +104,7 @@ export default {
         line-height: 24px;
     }
     .information_on_the_chain_content {
-        width: 158px;
+        // width: 158px;
         font-size: 14px;
         font-family: PingFangSC-Regular, PingFang SC;
         font-weight: 400;
@@ -117,6 +117,6 @@ export default {
 }
 .textName{
     color: #939599;
-    text-align: center;
+    // text-align: center;
 }
 </style>

+ 1 - 2
src/mixins/list.js

@@ -15,7 +15,7 @@ export default {
                 this.list = [];
                 this.$root.$el.scrollTop = scrollTop;
             }
-            this.loading = true;
+            this.loading = true; 
             this.finished = false;
             this.empty = false;
             let data = { page: this.page, size: 20, sort: 'createdAt,desc' };
@@ -25,7 +25,6 @@ export default {
                     ...this.beforeData()
                 };
             }
-
             if (this.httpType === 'get') {
                 return this.$http.get(this.url, data, { body: 'json' }).then(res => {
                     if (res.first) {

+ 10 - 0
src/router/index.js

@@ -339,6 +339,16 @@ const routes = [
             title: '第九空间'
         }
     },
+    {
+        path: '/hopeMarket',
+        name: 'hopeMarket',
+        component: () => import('../views/product/HopeMarket.vue'),
+        meta: {
+            pageType: Page.Every,
+            // tabColor: '#222426',
+            title: '二手市场'
+        }
+    },
     {
         path: '/productSearch',
         name: 'productSearch',

+ 7 - 6
src/views/Discover.vue

@@ -129,11 +129,11 @@ export default {
                     titleone: '精选推荐',
                     titletwo: '介绍介绍介绍介绍'
                 },
-                // {
-                //     img: require('@assets/icon-zhanlan.png'),
-                //     titleone: '藏品展览',
-                //     titletwo: '介绍介绍介绍介绍'
-                // }
+                {
+                    img: require('@assets/icon-zhanlan.png'),
+                    titleone: '藏品展览',
+                    titletwo: '介绍介绍介绍介绍'
+                }
             ],
             // 商品展示列表
             commodityDisplayList: [],
@@ -173,7 +173,8 @@ export default {
                 // this.$router.push( "/productList")
                 this.$router.push({ path: '/productList', query: { title: '精选推荐' } });
             } else {
-                this.wait();
+                this.$router.push({ path: '/hopeMarket', query: { title: '藏品展览' } });
+                // this.wait();
             }
         },
         // 获取图片展示数据

+ 4 - 4
src/views/Mine.vue

@@ -287,7 +287,7 @@
                         <img :src="require('@assets/icon_inter.png')" alt="" class="display_list_con_listArrow" />
                     </div>
                 </div>
-                <!-- <div class="display_list_con">
+                <div class="display_list_con" @click="this.wait">
                     <div class="display_list_con_one">
                         <img :src="require('@assets/learn-more.png')" alt="" class="display_list_con_displayIcon" />
                         <div class="display_list_con_title">了解更多</div>
@@ -295,8 +295,8 @@
                     <div class="display_list_con_two">
                         <img :src="require('@assets/icon_inter.png')" alt="" class="display_list_con_listArrow" />
                     </div>
-                </div> -->
-                <!-- <div class="display_list_con">
+                </div>
+                <div class="display_list_con" @click="this.wait">
                     <div class="display_list_con_one">
                         <img :src="require('@assets/about-us.png')" alt="" class="display_list_con_displayIcon" />
                         <div class="display_list_con_title">关于我们</div>
@@ -304,7 +304,7 @@
                     <div class="display_list_con_two">
                         <img :src="require('@assets/icon_inter.png')" alt="" class="display_list_con_listArrow" />
                     </div>
-                </div> -->
+                </div>
                 <div class="display_list_con" @click="$router.push('/security')">
                     <div class="display_list_con_one">
                         <img :src="require('@assets/account-security.png')" alt="" class="display_list_con_displayIcon" />

+ 5 - 3
src/views/asset/Consignment.vue

@@ -9,7 +9,7 @@
         </van-cell-group>
         <div class="transaction_password">
             <div class="transaction_password_title">2.请输入交易密码</div>
-            <div class="transaction_password_forget">
+            <div class="transaction_password_forget" @click="$router.push('/tradingPassword')">
                 忘记密码
                 <van-divider />
             </div>
@@ -32,7 +32,6 @@
         maxlength="6"
         theme="custom"
         close-button-text="完成"
-        random-key-order
         />
         </div>
         <!-- <div v-else class="text3" @click="$router.push('/tradingPassword')">您当前没有交易密码,点击去设置</div> -->
@@ -196,7 +195,7 @@ export default {
 
 <style lang="less" scoped> 
     .content{
-        margin-top: 44px;
+        // margin-top: 44px;
         width: 100%;
         height: 100%;
         position: absolute;
@@ -295,4 +294,7 @@ export default {
             line-height: 40px;
         }
     }
+/deep/ .van-password-input__security i{
+        background-color: #fff !important;
+    }
 </style>

+ 8 - 2
src/views/asset/Detail.vue

@@ -61,7 +61,7 @@
         </div>
         <div class="self_information">
             <div class="display_price">
-                <div v-if="info.consignment">
+                <div v-if="info.consignment" class="display_price_con">
                     <div class="display_price_left">售价</div>
                     <div class="display_price_right">
                         <div class="display_price_right_symbol">¥</div>
@@ -1051,6 +1051,9 @@ export default {
             box-sizing: border-box;
             display: flex;
             margin-bottom: 10px;
+            .display_price_con{
+                display: flex;
+            }
             .display_price_title {
                 font-size: 20px;
                 font-family: PingFangSC-Regular, PingFang SC;
@@ -1157,7 +1160,7 @@ export default {
             .textName {
                 color: #939599;
                 margin-top: 10px;
-                text-align: center;
+                // text-align: center;
             }
             .hold_privileges_list {
                 .hold_privileges_list_con {
@@ -1214,6 +1217,9 @@ export default {
                 color: #939599;
             }
         }
+        .hold_privileges:last-child {
+            margin-bottom: 30px;
+        }
         // .information_on_the_chain {
         //     display: flex;
         //     justify-content: space-between;

+ 54 - 27
src/views/product/Detail.vue

@@ -327,16 +327,32 @@
         </div> -->
         <div class="self_information">
             <div class="self_information_one">
-                <van-image
-                    width="32px"
-                    height="32px"
-                    radius="23"
-                    :src="info.minterAvatar || require('@assets/svgs/img_default_photo.svg')"
-                    fit="cover"
-                />
-                <div class="self_information_one_text">
-                    <div class="self_information_one_text_one">{{ info.minter }}</div>
-                    <div class="self_information_one_text_two">创作者</div>
+                <div class="self_information_one_con">
+                    <van-image
+                        width="32px"
+                        height="32px"
+                        radius="23"
+                        :src="info.minterAvatar || require('@assets/svgs/img_default_photo.svg')"
+                        fit="cover"
+                    />
+                    <div class="self_information_one_text">
+                        <div class="self_information_one_text_one">{{ info.minter }}</div>
+                        <div class="self_information_one_text_two">创作者</div>
+                    </div>
+                </div>
+                <div class="split_line" v-if="info.ownerId !== info.minterId"></div>
+                <div class="self_information_one_con" v-if="info.ownerId !== info.minterId">
+                    <van-image
+                        width="32px"
+                        height="32px"
+                        radius="23"
+                        :src="info.ownerAvatar || require('@assets/svgs/img_default_photo.svg')"
+                        fit="cover"
+                    />
+                    <div class="self_information_one_text">
+                        <div class="self_information_one_text_one">{{ info.owner }}</div>
+                        <div class="self_information_one_text_two">持有者</div>
+                    </div>
                 </div>
             </div>
             <div class="description_of_works">
@@ -1034,23 +1050,34 @@ export default {
             border-radius: 8px;
             margin-bottom: 10px;
             display: flex;
-            .self_information_one_img {
-                width: 32px;
-                height: 32px;
-                border-radius: 23px;
-                margin-right: 6px;
-            }
-            .self_information_one_text {
-                margin-left: 6px;
-                font-size: 12px;
-                font-family: PingFangSC-Regular, PingFang SC;
-                font-weight: 400;
-            }
-            .self_information_one_text_one {
-                color: #ffffff;
+            justify-content: space-between;
+            position: relative;
+            .self_information_one_con {
+                // width: 50%;
+                display: flex;
+                .self_information_one_text {
+                    font-size: 12px;
+                    font-family: PingFangSC-Regular, PingFang SC;
+                    font-weight: 400;
+                    margin-left: 6px;
+                }
+                .self_information_one_text_one {
+                    color: #ffffff;
+                }
+                .self_information_one_text_two {
+                    color: #939599;
+                }
             }
-            .self_information_one_text_two {
-                color: #939599;
+            .split_line {
+                position: absolute;
+                left: 48%;
+                top: 12px;
+                width: 1px;
+                height: 34px;
+                background: rgba(95, 100, 111, 0.2);
+                // opacity: 0.2;
+                // border: 1px solid #5F646F;
+                // box-sizing: border-box;
             }
         }
         .description_of_works {
@@ -1146,7 +1173,7 @@ export default {
             .textName {
                 color: #939599;
                 margin-top: 10px;
-                text-align: center;
+                // text-align: center;
             }
         }
         .transaction_record_one {

+ 757 - 0
src/views/product/HopeMarket.vue

@@ -0,0 +1,757 @@
+
+<template>
+    <!-- <div class="follow">
+        <div ref="top" class="list-top" :style="{ top: barShow ? '46px' : 0 }">
+            <div class="top" v-if="!minterId">
+                <div class="name">版权市场</div>
+                <img src="@assets/icon-sosuo.png" alt="" @click="goSearch" class="search" />
+            </div>
+
+            <div class="swiperContent" ref="swiperContent">
+                <swiper
+                    pagination
+                    :slides-per-view="5"
+                    :space-between="16"
+                    class="mySwiper"
+                    :autoplay="{ delay: 3500 }"
+                    v-if="settings.length > 0"
+                >
+                    <swiper-slide class="setting" v-for="item in settings" :key="item.id">
+                        <van-image
+                            width="calc(20vw - 19.2px)"
+                            height="calc(20vw - 19.2px)"
+                            radius="8"
+                            :src="getImg(item.pic)"
+                            fit="cover"
+                            @click="showBanner(item.id)"
+                        />
+                        <div class="name">{{ item.name }}</div>
+                    </swiper-slide>
+                </swiper>
+                <div class="banner-box" :style="{ height: bannerHeight + 'px' }">
+                    <img :style="{ left: moreLeft + 'px' }" class="more" alt="" />
+                    <div class="banner-list" :style="{ maxHeight: maxBannerHeight + 'px' }">
+                        <div class="banner-item" v-for="item in banners" :key="item.id">
+                            <div class="setting" @click="goNext(item, '&source=TRANSFER')">
+                                <van-image
+                                    width="calc(20vw - 19.2px)"
+                                    height="calc(20vw - 19.2px)"
+                                    radius="8"
+                                    :src="getImg(item.pic)"
+                                    fit="cover"
+                                />
+                                <div class="name">{{ item.name }}</div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <div class="banner-wrapper" v-if="showSetting" @touchstart="touchEvent"></div>
+            </div>
+            <van-tabs
+                v-model:active="sort"
+                :ellipsis="false"
+                line-width="16"
+                line-height="2"
+                @click-tab="changeTab"
+                :class="{ trans: source == 'TRANSFER' }"
+            >
+                <van-tab
+                    :title="item.label"
+                    :name="item.value"
+                    :title-class="item.type === 'select' && sortDes ? sortDes : ''"
+                    :key="index"
+                    v-for="(item, index) in selectOptions"
+                >
+                    <template v-if="item.type === 'select'" #title>
+                        <div class="tab">
+                            <span>{{ item.label }}</span>
+                            <van-icon size="8" name="arrow-up" />
+                            <van-icon size="8" name="arrow-down" />
+                        </div>
+                    </template>
+                </van-tab>
+            </van-tabs>
+
+            <van-button
+                @click="changeSort"
+                v-if="source == 'TRANSFER' && !title"
+                class="sala"
+                color="#F5F7FA"
+                type="primary"
+                size="mini"
+                icon="arrow-down"
+                icon-position="right"
+                round
+                >{{ salable ? '在售中' : salable === false ? '仅展示' : '综合排序' }}</van-button
+            >
+        </div>
+
+        <van-action-sheet
+            v-model:show="showAction"
+            @select="selectAction"
+            :actions="actions"
+            cancel-text="取消"
+            close-on-click-action
+        />
+
+        <van-pull-refresh
+            success-text="加载成功"
+            success-duration="500"
+            v-model="isLoading"
+            :head-height="80"
+            @refresh="onRefresh"
+        >
+            <van-list v-model:loading="loading" :finished="finished" finished-text="" @load="getData">
+                <template v-for="(item, index) in showList" :key="index">
+                    <product-info dark v-model:info="list[index]" @update:info="init"></product-info>
+                </template>
+
+                <van-empty
+                    :image="require('@assets/kong_png_yongyoude  (1).png')"
+                    v-if="empty"
+                    description="没有任何藏品哦~"
+                />
+            </van-list>
+        </van-pull-refresh>
+    </div> -->
+    <div class="content">
+        <van-sticky ref="top" class="list-top" :offset-top="bar.value && bar.value.show ? 46 : 0">
+            <div class="content_top">
+                <div class="selected_recommendations">
+                    <div class="selected_recommendations_title">{{ title || pageName }}</div>
+                    <img
+                        :src="require('@assets/icon-sosuo.png')"
+                        alt=""
+                        class="selected_recommendations_img"
+                        @click="goSearch"
+                    />
+                </div>
+                <div class="recommended_switching">
+                    <!-- 标签页展示切换 -->
+                    <van-tabs
+                        v-model:active="sort"
+                        :ellipsis="false"
+                        line-height="2"
+                        title-active-color="#28B6FF"
+                        @click-tab="changeTab"
+                        :class="{ trans: source == 'TRANSFER' }"
+                    >
+                        <van-tab
+                            :title="item.label"
+                            :name="item.value"
+                            :title-class="item.type === 'select' && sortDes ? sortDes : ''"
+                            :key="index"
+                            v-for="(item, index) in selectOptions"
+                        >
+                            <template v-if="item.type === 'select'" #title>
+                                <div class="tab">
+                                    <span>{{ item.label }}</span>
+                                    <van-icon size="8" name="arrow-up" />
+                                    <van-icon size="8" name="arrow-down" />
+                                </div>
+                            </template>
+                        </van-tab>
+                    </van-tabs>
+                    <!-- <div class="label_tabs">
+                        <div :class="tabLabel == 'whole'?'label_selected':'label_not_selected'" @click="tabLabel='whole'" class="label_tab">全部</div>
+                        <div :class="tabLabel == 'onSale'?'label_selected':'label_not_selected'" @click="tabLabel='onSale'" class="label_tab">最新</div>
+                        <div :class="tabLabel == 'showOnly'?'label_selected':'label_not_selected'" @click="tabLabel='showOnly'" class="label_tab">最热</div>
+                        <div :class="tabLabel == 'notShown'?'label_selected':'label_not_selected'" @click="tabLabel='notShown'" class="label_tab">价格
+                            <div class="price_symbol" v-if="tabLabel != 'notShown'">
+                                <img :src="require('@assets/icon-arrow-down.png')" alt="" class="price_symbol_one price_symbol_img">
+                                <img :src="require('@assets/icon-arrow-down.png')" alt="" class="price_symbol_img">
+                            </div>
+                            <div class="price_symbol" v-else>
+                                <img :src="require('@assets/iocn_zhankai.png')" alt="" class="price_symbol_img">
+                                <img :src="require('@assets/iocn_zhankai.png')" alt="" class="price_symbol_img price_symbol_one">
+                            </div>
+                        </div>
+                    </div> -->
+                    <div class="sorting_selection" @click="changeSort" v-if="source == 'TRANSFER' && !title">
+                        <div class="sorting_selection_con">
+                            {{ salable ? '在售中' : salable === false ? '仅展示' : '综合排序' }}
+                        </div>
+                        <img :src="require('@assets/icon-arrow-down.png')" alt="" class="sorting_selection_img" />
+                    </div>
+                </div>
+            </div>
+        </van-sticky>
+        <van-action-sheet
+            v-model:show="showAction"
+            :actions="actions"
+            cancel-text="取消"
+            close-on-click-action
+            @select="selectAction"
+        />
+        <van-list
+            style="padding-bottom: 1px"
+            v-model:loading="loading"
+            :finished="finished"
+            finished-text=""
+            @load="getData"
+        >
+            <div class="selected_recommendations_list">
+                <template v-for="(item, index) in showList" :key="item.id">
+                    <CollectionList v-model:info="list[index]"></CollectionList
+                ></template>
+            </div>
+            <van-empty
+                :image="require(`@assets/storage_room_icon_01.png`)"
+                v-if="empty"
+                description="没有任何藏品哦~"
+            >
+            </van-empty>
+            <div class="go_stroll" v-if="empty">
+                    <van-button class="h44" size="small" color="#28B6FF" :round="true" to="/">去逛逛</van-button>
+            </div>
+        </van-list>
+    </div>
+</template>
+
+<script>
+// import { Swiper, SwiperSlide } from 'swiper/vue';
+
+// import 'swiper/swiper.min.css';
+// import 'swiper/swiper-bundle.min.css';
+
+// import SwiperCore, { Pagination, Autoplay } from 'swiper';
+
+// install Swiper modules
+// SwiperCore.use([Pagination, Autoplay]);
+// import ProductInfo from '../../components/product/productInfo.vue';
+import product from '../../mixins/product';
+import CollectionList from '../../components/CollectionList.vue';
+import list from '../../mixins/list';
+import banner from '../../mixins/banner';
+import { useWindowSize } from '@vant/use';
+export default {
+    name: 'productList',
+    // components: { ProductInfo, Swiper, SwiperSlide },
+    components: {
+        CollectionList
+    },
+    inject: ['setKeeps', 'scrollWrapper', 'changeScroll','bar'],
+    mixins: [product, list, banner],
+    setup() {
+        const { width, height } = useWindowSize();
+
+        return { windowWidth: width };
+    },
+    data() {
+        return {
+            list: [],
+            empty: false,
+            beforeSort: '',
+            sort: 'id,desc',
+            sortDes: '',
+            type: '',
+            source: '',
+            minterId: '',
+            selectOptions: [
+                {
+                    label: '全部',
+                    value: 'id,desc'
+                },
+                {
+                    label: '最新',
+                    value: 'id,desc;'
+                },
+                {
+                    label: '最热',
+                    value: 'likes,desc'
+                },
+                {
+                    label: '价格',
+                    value: 'price',
+                    type: 'select'
+                }
+            ],
+            url: '/collection/all',
+            title: '',
+            salable: '',
+            scrollTop: 0,
+            showAction: false,
+            banners: [],
+            settings: [],
+            normalHeight: 0,
+            settingId: 0,
+            showSetting: false,
+            barShow: false
+        };
+    },
+    computed: {
+        pageName() {
+            return this.getLabelName(this.source, this.sourceOptions) || this.getLabelName(this.type, this.typeOptions);
+        },
+        showList() {
+            let list = [];
+            let allList = [...this.list];
+            allList.forEach(item => {
+                let info = list.find(_item => {
+                    return _item.id === item.id;
+                });
+                if (!info) {
+                    list.push(item);
+                }
+            });
+            return list;
+        },
+        actions() {
+            let list = [{ name: '综合排序' }, { name: '在售中' }, { name: '仅展示' }];
+            if (this.salable === '') {
+                list[0].color = this.$colors.prim;
+            }
+            if (this.salable === true) {
+                list[1].color = this.$colors.prim;
+            }
+            if (this.salable === false) {
+                list[2].color = this.$colors.prim;
+            }
+            return list;
+        },
+        bannerHeight() {
+            let height = Math.ceil(this.banners.length / 3);
+            let _h = this.accMul(this.accAdd(this.accMul(this.windowWidth, 0.2), 20), height);
+            if (_h > this.maxBannerHeight - 8) {
+                _h = this.maxBannerHeight - 8;
+            }
+            return this.showSetting && _h ? _h + 24 : 0;
+        },
+        maxBannerHeight() {
+            let _h = this.accMul(this.accAdd(this.accMul(this.windowWidth, 0.2), 20), 3);
+            return _h + 8;
+        },
+        moreLeft() {
+            let index =
+                [...this.settings].findIndex(item => {
+                    return item.id === this.settingId;
+                }) || 0;
+
+            let _l = this.accAdd(-21.6, this.accMul(this.windowWidth, 0.1));
+            let _pW = this.accAdd(-3.2, this.accMul(this.windowWidth, 0.2));
+            let _w = this.accMul(_pW, index);
+            return this.accAdd(_l, _w);
+        }
+    },
+    // watch: {
+    //     showSetting() {
+    //         if (this.showSetting) {
+    //             document.getElementById('scroll-wrapper').style.overflow = 'hidden';
+    //         } else {
+    //             document.getElementById('scroll-wrapper').style.overflow = 'auto';
+    //         }
+    //     }
+    // },
+    mounted() {
+        this.init();
+        if (document.getElementById('navBar')) {
+            this.barShow = true;
+        } else {
+            this.barShow = false;
+        }
+        if (this.$route.query.title) {
+            this.title = this.$route.query.title;
+        }
+    },
+    methods: {
+        onRefresh() {
+            this.getData(true).then(() => {
+                this.isLoading = false;
+            });
+        },
+        init() {
+            this.$store.dispatch('getUsedBuy');
+            this.source = 'TRANSFER';
+            this.salable = true;
+            // this.getBanner();
+            this.getSetting();
+            if (this.isLogin) {
+                this.$store.dispatch('getUserInfo').then(res => {
+                    if (!res.riskWarning) {
+                        this.$dialog.alert({
+                            title: '风险提示声明',
+                            message:
+                                '古藏站平台发售的数字藏品具备收藏欣赏或版权价值,古藏站发售的藏品首发价格为官方指导价,古藏站对藏品二手市场价格不构成任何指导建议。请各位藏家理性消费,仔细阅读相关权益,杜绝恶意炒作,避免损失。',
+                            confirmButtonText: '已阅读并同意'
+                        });
+                        this.updateUser({ riskWarning: true }, false);
+                    }
+                });
+            }
+        },
+        touchEvent() {
+            this.hideSetting();
+        },
+        getSetting() {
+            this.$http
+                .post('/setting/byFlag', { flag: 1 })
+                .then(res => {
+                    this.settings = res;
+                    setTimeout(() => {
+                        this.$nextTick(() => {
+                            this.normalHeight = this.$refs.top.$el.offsetHeight;
+                        });
+                    }, 500);
+                })
+                .catch(e => {
+                    console.log(e);
+                    this.$message.error(e.error);
+                });
+        },
+        showBanner(settingId) {
+            if (this.settingId === settingId && this.showSetting) {
+                this.hideSetting();
+            } else {
+                this.settingId = settingId;
+                this.showSetting = true;
+                this.$http
+                    .post(
+                        '/banner/all',
+                        {
+                            query: {
+                                type: 'MARKET',
+                                del: false,
+                                settingId: settingId
+                            },
+                            sort: 'sort,asc;createdAt,desc'
+                        },
+                        { body: 'json' }
+                    )
+                    .then(res => {
+                        this.banners = res.content;
+                    });
+            }
+        },
+        hideSetting() {
+            this.showSetting = false;
+            setTimeout(() => {
+                this.banners = [];
+            }, 300);
+        },
+        changeSort() {
+            this.showAction = true;
+        },
+        selectAction(action) {
+            if (action.name == '综合排序') {
+                this.salable = '';
+            }
+            if (action.name == '在售中') {
+                this.salable = true;
+            }
+            if (action.name == '仅展示') {
+                this.salable = false;
+            }
+            this.hideSetting();
+            this.getData(true);
+        },
+        changeTab(info) {
+            this.$nextTick(() => {
+                if (info.name === 'price') {
+                    this.sortDes = this.sortDes == 'desc' ? 'asc' : 'desc';
+                }
+                this.hideSetting();
+                this.getData(true, this.normalHeight).then(() => {
+                    this.changeScroll(this.normalHeight);
+                });
+            });
+        },
+        beforeData() {
+            let sort = this.sort;
+            if (sort == 'price') {
+                sort = 'price,' + this.sortDes;
+            }
+            return {
+                query: {
+                    type: this.type,
+                    source: this.source,
+                    onShelf: true,
+                    del: false,
+                    minterId: this.minterId,
+                    salable: this.salable
+                },
+                sort: this.sort === 'id,desc' ? this.sortOptions[this.title] || sort : sort
+            };
+        },
+        goSearch() {
+            let url = '/productSearch';
+            if (this.type) {
+                url += '?type=' + this.type;
+            }
+            if (this.source) {
+                url += '?source=' + this.source;
+            }
+            this.$router.push(url);
+        }
+    },
+    activated() {
+        this.$nextTick(() => {
+            this.changeScroll(this.scrollTop);
+            setTimeout(() => {
+                this.sort = this.beforeSort;
+            }, 1000);
+        });
+    },
+    beforeRouteLeave(to, from, next) {
+        // document.getElementById('scroll-wrapper').style.overflow = 'auto';
+        if (to.name === 'productDetail') {
+            this.beforeSort = this.sort;
+            this.scrollTop = this.scrollWrapper.value.scrollTop;
+            this.setKeeps(['productList']);
+        } else {
+            this.beforeSort = '';
+            this.scrollTop = 0;
+            this.setKeeps(['productList'], false);
+        }
+        next();
+    }
+};
+</script>
+
+<style lang="less" scoped>
+/deep/ .van-tabs__nav--complete {
+    padding: 0;
+    border: none;
+}
+/deep/ .van-tab {
+    margin-right: 30px;
+}
+/deep/ .van-tabs__nav--line.van-tabs__nav--complete {
+    padding: 0;
+}
+.navBar {
+    width: 100%;
+    height: 44px;
+}
+.shop_list_one {
+    height: 100%;
+    position: absolute;
+}
+/deep/ .van-tabs__line {
+    display: none;
+}
+/deep/ .van-button{
+    width: 100%;
+    height: 38px;
+    font-weight: 500;
+    font-size: 16px;
+}
+.go_stroll{
+    width: 100%;
+    padding: 0px 48px;
+    box-sizing: border-box;
+}
+.content {
+    width: 100%;
+    // height: 100%;
+    background-color: #0a0a1b;
+    .content_top {
+        width: 100%;
+        height: 90px;
+        background: #15152d;
+        padding: 16px 0px 10px 0px;
+        // padding: 16px 16px 10px;
+        box-sizing: border-box;
+        .selected_recommendations {
+            display: flex;
+            justify-content: space-between;
+            margin-bottom: 10px;
+            padding: 0px 16px;
+            .selected_recommendations_title {
+                font-size: 16px;
+                font-family: PingFangSC-Medium, PingFang SC;
+                font-weight: 500;
+                color: #ffffff;
+            }
+            .selected_recommendations_img {
+                width: 24px;
+                height: 24px;
+            }
+        }
+        .recommended_switching {
+            display: flex;
+            justify-content: space-between;
+            padding-right: 16px;
+            box-sizing: border-box;
+            /deep/ .van-tabs__nav--line {
+                padding: 0;
+            }
+            .tab {
+                position: relative;
+                padding-right: 14px;
+                .van-icon {
+                    position: absolute;
+                    right: 0;
+                    &.van-icon-arrow-down {
+                        top: 8px;
+                    }
+                    &.van-icon-arrow-up {
+                        bottom: 8px;
+                    }
+                }
+            }
+            .label_tabs {
+                display: flex;
+                .label_tab {
+                    position: relative;
+                    width: 28px;
+                    font-size: 14px;
+                    font-family: PingFangSC-Regular, PingFang SC;
+                    font-weight: 400;
+                    margin-right: 30px;
+                    line-height: 24px;
+                    .price_symbol {
+                        position: absolute;
+                        top: 3px;
+                        right: -15px;
+                        display: flex;
+                        flex-direction: column;
+                        .price_symbol_img {
+                            width: 10px;
+                            height: 10px;
+                        }
+                        .price_symbol_one {
+                            transform: rotate(180deg);
+                        }
+                    }
+                }
+                .label_selected {
+                    font-weight: 500;
+                    color: #28b6ff;
+                }
+                .label_not_selected {
+                    font-weight: 400;
+                    color: #939599;
+                }
+            }
+            .sorting_selection {
+                margin-top: 8px;
+                width: 86px;
+                height: 24px;
+                background: #29293f;
+                border-radius: 16px;
+                font-size: 12px;
+                font-family: PingFangSC-Regular, PingFang SC;
+                font-weight: 400;
+                color: #939599;
+                display: flex;
+                justify-content: space-between;
+                padding: 4px 10px;
+                box-sizing: border-box;
+                .sorting_selection_con {
+                    width: 50px;
+                    height: 16px;
+                    line-height: 16px;
+                    text-align: center;
+                }
+                .sorting_selection_img {
+                    width: 16px;
+                    height: 16px;
+                }
+            }
+        }
+    }
+    .selected_recommendations_list {
+        width: 100%;
+        background: #0a0a1b;
+        padding: 16px;
+        box-sizing: border-box;
+        display: flex;
+        justify-content: space-between;
+        flex-wrap: wrap;
+        // margin-bottom: 20px;
+        .current_recommendation_con {
+            width: 48%;
+            height: 254px;
+            background: #29293f;
+            border-radius: 8px;
+            margin-bottom: 16px;
+            .current_recommendation_img {
+                width: 100%;
+                height: 164px;
+                margin-bottom: 6px;
+            }
+            .current_recommendation_title {
+                padding: 0 10px;
+                width: 170px;
+                white-space: nowrap;
+                overflow: hidden;
+                text-overflow: ellipsis;
+                box-sizing: border-box;
+                font-size: 14px;
+                font-family: PingFangSC-Medium, PingFang SC;
+                font-weight: 500;
+                color: #ffffff;
+            }
+            .current_recommendation_price {
+                width: 100%;
+                margin-top: 5px;
+                padding-left: 22px;
+                box-sizing: border-box;
+                display: flex;
+                position: relative;
+                margin-bottom: 8px;
+                .current_recommendation_price_one {
+                    font-size: 10px;
+                    font-family: PingFangSC-Medium, PingFang SC;
+                    font-weight: 500;
+                    color: #28b6ff;
+                    position: absolute;
+                    bottom: 1px;
+                    left: 12px;
+                }
+                .current_recommendation_price_two {
+                    font-size: 16px;
+                    font-family: PingFangSC-Medium, PingFang SC;
+                    font-weight: 500;
+                    color: #28b6ff;
+                }
+            }
+            .current_recommendation_bottom {
+                width: 100%;
+                display: flex;
+                justify-content: space-between;
+                padding: 0px 10px;
+                box-sizing: border-box;
+                .current_recommendation_bottom_left {
+                    display: flex;
+                }
+                .current_recommendation_bottom_right {
+                    display: flex;
+                    height: 18px;
+                }
+                .current_recommendation_name_img {
+                    width: 18px;
+                    height: 18px;
+                    border-radius: 50%;
+                    margin-right: 4px;
+                }
+                .current_recommendation_name {
+                    height: 18px;
+                    line-height: 18px;
+                    font-size: 12px;
+                    font-family: PingFangSC-Regular, PingFang SC;
+                    font-weight: 400;
+                    color: #939599;
+                }
+                .give_img {
+                    width: 18px;
+                    height: 18px;
+                    margin-right: 2px;
+                }
+                .give_number {
+                    height: 18px;
+                    line-height: 18px;
+                    font-size: 12px;
+                    font-family: PingFangSC-Regular, PingFang SC;
+                    font-weight: 400;
+                    color: #939599;
+                }
+            }
+        }
+    }
+}
+.van-tab.van-tab--active {
+    color: #28b6ff;
+    font-weight: 500;
+}
+</style>

+ 16 - 2
src/views/product/List.vue

@@ -133,7 +133,7 @@
                             </div>
                         </div>
                     </div> -->
-                    <div class="sorting_selection" @click="changeSort">
+                    <div class="sorting_selection" @click="changeSort" v-if="source == 'TRANSFER' && !title">
                         <div class="sorting_selection_con">
                             {{ salable ? '在售中' : salable === false ? '仅展示' : '综合排序' }}
                         </div>
@@ -162,10 +162,13 @@
                 ></template>
             </div>
             <van-empty
-                :image="require('@assets/kong_png_yongyoude  (1).png')"
+                :image="require(`@assets/storage_room_icon_01.png`)"
                 v-if="empty"
                 description="没有任何藏品哦~"
             />
+            <div class="go_stroll" v-if="empty">
+                <van-button class="h44" size="small" color="#28B6FF" :round="true" to="/">去逛逛</van-button>
+            </div>
         </van-list>
     </div>
 </template>
@@ -591,6 +594,17 @@ export default {
     width: 100%;
     height: 44px;
 }
+/deep/ .van-button{
+    width: 100%;
+    height: 38px;
+    font-weight: 500;
+    font-size: 16px;
+}
+.go_stroll{
+    width: 100%;
+    padding: 0px 48px;
+    box-sizing: border-box;
+}
 .shop_list_one {
     height: 100%;
     position: absolute;

+ 1 - 0
src/views/product/Search.vue

@@ -42,6 +42,7 @@
                 </van-tabs>
                 <van-button
                     @click="changeSort"
+                    v-if="isSearch && source == 'TRANSFER' && !title"
                     color="#29293F"
                     class="sala"
                     size="small"

+ 92 - 98
src/views/user/accountSecurity.vue

@@ -1,116 +1,110 @@
 <template>
-    <!-- 顶部导航栏 -->
-    <van-nav-bar class="navBar" :fixed="true">
-            <template #left>
-                <div @click="$router.go(-1)">
-                    <van-icon name="cross" size="18" color="#333333"/>
-                </div>
-            </template>
-            <template #right>
-                <van-icon name="ellipsis" size="18" color="#333333"/>
-            </template>
-    </van-nav-bar>
-    <div class="content">
-        <div class="account_security">账户安全</div>
-        <div class="modify_list" v-for="(item,index) in modifyList" :key="index">
-            <div class="modify_list_title">{{item.title}}</div>
-            <img :src="item.img" alt="" class="modify_list_img">
+    <van-image width="100%" src="https://nanjingnft.oss-cn-hangzhou.aliyuncs.com/image/2022-05-10-10-00-35xmYxvIiq.jpg" fit="cover" class="hold_privileged_information_con_img" />
+    <div class="news-btn btns-only">
+            <!-- <div class="share-content" @click="like">
+                <img v-if="info.liked" src="../../assets/like.png" alt="" />
+                <img v-else src="../../assets/icon-dianzan1.png" alt="" />
+                <span>{{ info.likes }}</span>
+            </div> -->
+            <div class="share-content" @click="share">
+                <img src="../../assets/icon-fenxiang.png" alt="" />
+                <span>分享</span>
+            </div>
         </div>
-        <div class="log_out">
-            <div class="log_out_con">退出登录</div>
-        </div>
-        <div class="cancellation_of_account">注销账户</div>
-    </div>
 </template>
 
 <script>
+import resolveUrl from 'resolve-url';
 export default {
-    data(){
-        return{
-            modifyList: [
-                {
-                    title: "修改登录密码",
-                    img: require('@assets/icon_inter.png')
-                },
-                {
-                    title: "修改支付密码",
-                    img: require('@assets/icon_inter.png')
+    data() {},
+    computed: {
+        shareText() {
+            return `${resolveUrl(this.$baseUrl, '9th//mineAccountSecurity')}`;
+        }
+    },
+    methods: {
+        like() {
+            this.checkLogin().then(() => {
+                if (this.info.liked) {
+                    this.$http.get(`newsLike/${this.info.id}/unlike`).then(res => {
+                        this.$toast.success('取消成功');
+                        this.info.liked = false;
+                        this.info.likes--;
+                    });
+                } else {
+                    this.$http.get(`newsLike/${this.info.id}/like`).then(res => {
+                        this.$toast.success('点赞成功');
+                        this.info.liked = true;
+                        this.info.likes++;
+                    });
+                }
+            });
+        },
+        share() {
+            this.$copyText(this.shareText).then(
+                e => {
+                    this.$dialog.alert({
+                        title: '链接已复制',
+                        message: this.shareText,
+                        confirmButtonText: '去微信粘贴给好友'
+                    });
+                    console.log(e);
                 },
-                {
-                    title: "修改手机号",
-                    img: require('@assets/icon_inter.png')
+                e => {
+                    this.$toast('复制失败');
+                    console.log(e);
                 }
-            ]
+            );
         }
     }
 };
 </script>
 
 <style lang="less" scoped>
-    .navBar{
-        width: 100%;
-        height: 44px;
-    }
-    .content{
-        margin-top: 44px;
-        padding: 16px 10px;
-        box-sizing: border-box;
-        width: 100%;
-        height: 100%;
-        position: absolute;
-        background: #0F0F27;
-        .account_security{
-            margin-left: 6px;
-            font-size: 20px;
-            font-family: PingFangSC-Medium, PingFang SC;
-            font-weight: 500;
-            color: #FFFFFF;
-            margin-bottom: 20px;
-        }
-        .modify_list{
-            height: 52px;
-            background: #29293F;
-            border-radius: 8px;
-            padding: 14px 12px;
-            box-sizing: border-box;
-            display: flex;
-            justify-content: space-between;
-            margin-bottom: 10px;
-            .modify_list_title{
-                font-size: 12px;
-                font-family: PingFangSC-Regular, PingFang SC;
-                font-weight: 400;
-                color: #FFFFFF;
-                margin-top: 4px;
-            }
-            .modify_list_img{
-                width: 24px;
-                height: 24px;
-            }
-        }
-        .log_out{
-            margin-top: 90px;
-            padding: 0 58px;
-            box-sizing: border-box;
-            margin-bottom: 264px;
-            .log_out_con{
-                height: 40px;
-                border-radius: 8px;
-                border: 1px solid #939599;
-                font-size: 16px;
-                font-family: PingFangSC-Medium, PingFang SC;
-                font-weight: 500;
-                color: #939599;
-                line-height: 40px;
-                text-align: center;
-            }
-        }
-        .cancellation_of_account{
-            font-size: 14px;
-            font-family: PingFangSC-Medium, PingFang SC;
-            font-weight: 500;
+.news-btn {
+    position: fixed;
+    z-index: 20;
+    background: @bg3;
+    padding: 9px 16px 9px 16px;
+    .flex();
+    left: 0;
+    right: 0;
+    bottom: 0;
+    .bottom(9px);
+
+    /deep/.van-button {
+        &.van-button--disabled {
+            background: #303133;
             color: #939599;
-            text-align: center;
+            opacity: 1;
         }
     }
+
+    .van-button + .share-content {
+        margin-left: 20px;
+    }
+}
+.share-content {
+    .flex();
+    justify-content: center;
+    white-space: nowrap;
+    min-width: 60px;
+    img {
+        width: 24px;
+        height: 24px;
+        display: block;
+    }
+    span {
+        font-size: 14px;
+        color: #939599;
+        margin-left: 3px;
+        line-height: 32px;
+    }
+}
+
+.btns-only {
+    .share-content {
+        width: 50%;
+    }
+}
 </style>