panhui 3 лет назад
Родитель
Сommit
0e70e44b7d

BIN
src/assets/._copy_icon.png


BIN
src/assets/._kong_png_gaunzhu.png


BIN
src/assets/._weirenzheng-icon.png


BIN
src/assets/._yirenzheng-icon.png


BIN
src/assets/copy_icon.png


BIN
src/assets/kong_png_gaunzhu.png


BIN
src/assets/weirenzheng-icon.png


BIN
src/assets/yirenzheng-icon.png


+ 1 - 1
src/main.js

@@ -59,7 +59,7 @@ const app = createApp(App)
     .component('page-title', PageTitle)
     .component('like-button', LikeButton)
     .component('driver', Driver)
-    .component('van-image', ImgContent)
+    // .component('van-image', ImgContent)
     .component('page-bar', PageBar)
     .use(store)
     .use(router);

+ 34 - 44
src/mixins/common.js

@@ -25,10 +25,16 @@ export default {
         updateUser(info, sucess = true) {
             if (info) {
                 return this.$http
-                    .post('/user/update', {
-                        ...this.$store.state.userInfo,
-                        ...info
-                    })
+                    .post(
+                        '/user/save',
+                        {
+                            ...this.$store.state.userInfo,
+                            ...info
+                        },
+                        {
+                            body: 'json'
+                        }
+                    )
                     .then(() => {
                         return this.$store.dispatch('getUserInfo');
                     })
@@ -49,11 +55,10 @@ export default {
         updateFile(e, type, size = 1000) {
             const formData = new FormData();
             formData.append('file', e.file, e.file.name);
-            formData.append('type', type);
+            formData.append('compress', true);
             formData.append('width', size);
             formData.append('height', size);
-            formData.append('size', size);
-            return http.axios.post('/upload/user', formData).then(res => {
+            return http.axios.post('/upload/file', formData).then(res => {
                 return Promise.resolve(res.data);
             });
         },
@@ -104,42 +109,27 @@ export default {
             return (Number(s1.replace('.', '')) * Number(s2.replace('.', ''))) / Math.pow(10, m);
         },
         checkBank() {
-            // return this.$http
-            //     .get('/user/myBankCard')
-            //     .then(res => {
-            //         if (res.length > 0) {
-            //             return Promise.resolve();
-            //         } else {
-            //             return Promise.reject();
-            //         }
-            //     })
-            //     .catch(() => {
-            //         return this.$dialog
-            //             .confirm({
-            //                 title: '银行卡未绑定',
-            //                 message: '您的账户还未绑定银行卡',
-            //                 confirmButtonText: '前往绑定'
-            //             })
-            //             .then(() => {
-            //                 this.$router.push('/mineBanks');
-            //                 return Promise.reject();
-            //             });
-            //     });
-            return (this.$store.state.userInfo || {}).settleAccountId != undefined
-                ? Promise.resolve()
-                : this.$dialog
-                      .confirm({
-                          title: '银行卡未绑定',
-                          message: '您的账户还未绑定银行卡',
-                          confirmButtonText: '前往绑定'
-                      })
-                      .then(() => {
-                          this.$router.push('/mineBanks');
-                          return Promise.reject();
-                      })
-                      .catch(() => {
-                          return Promise.reject();
-                      });
+            return this.$http
+                .get('/user/myBankCard')
+                .then(res => {
+                    if (res.length > 0) {
+                        return Promise.resolve();
+                    } else {
+                        return Promise.reject();
+                    }
+                })
+                .catch(() => {
+                    return this.$dialog
+                        .confirm({
+                            title: '银行卡未绑定',
+                            message: '您的账户还未绑定银行卡',
+                            confirmButtonText: '前往绑定'
+                        })
+                        .then(() => {
+                            this.$router.push('/mineBanks');
+                            return Promise.reject();
+                        });
+                });
         },
         checkAuth() {
             if (this.authStatus === '已认证') {
@@ -227,4 +217,4 @@ export default {
             window.location.href = next;
         }
     }
-};
+};

+ 28 - 10
src/styles/app.less

@@ -2,7 +2,7 @@
     --van-primary-color: @prim;
     --van-tabbar-item-active-background-color: transparent;
     --van-tabbar-background-color: @bg;
-    --van-nav-bar-background-color: #191D27;
+    --van-nav-bar-background-color: #191d27;
     --van-cell-background-color: @bg;
     --van-text-color: @text0;
     --van-gray-6: @text3;
@@ -134,21 +134,39 @@ input:-webkit-autofill {
 }
 
 .van-empty__image {
-    width: 235px;
-    height: 170px;
+    width: 171px;
+    height: 171px;
+}
+
+.van-empty {
+    .van-empty__description {
+        font-size: 16px;
+        color: #ffffff;
+        line-height: 22px;
+        margin: 24px 0 0;
+    }
+
+    .van-empty__bottom {
+        margin-top: 8px;
+        .empty-tips {
+            font-size: 14px;
+            color: rgba(255, 255, 255, 0.3);
+            line-height: 20px;
+        }
+    }
 }
 
 .van-tab {
-    color: @text3 !important;
-    font-size: @font2;
+    color: @text3;
+    font-size: 17px;
     &.van-tab--active {
-        color: @prim !important;
+        color: #fff;
         font-weight: bold;
     }
-    padding: 0 0 !important;
-    flex-shrink: 0 !important;
-    flex-grow: 0 !important;
-    margin-right: 50px;
+    // padding: 0 0 !important;
+    // flex-shrink: 0 !important;
+    // flex-grow: 0 !important;
+    // margin-right: 50px;
     word-break: keep-all;
 }
 .van-tabs__nav--line.van-tabs__nav--complete {

+ 87 - 50
src/views/Mine.vue

@@ -8,55 +8,50 @@
         </div> -->
         <div class="content_con">
             <!-- 已登录 -->
-            <div class="self_introduction" v-if="isLogin">
+            <div class="self_introduction" v-if="isLogin" @click="$router.push('/setting')">
                 <div class="self_introduction_top">
                     <van-image
-                        width="60px"
-                        height="60px"
+                        width="64px"
+                        height="64px"
                         radius="40"
                         :src="userInfo.avatar || require('@assets/img_default_photo.png')"
                         fit="cover"
                         style="margin-right: 10px;"
-                        @click="$router.push('/setting')"
                     />
-                    <img
+                    <!-- <img
                         :src="require('@assets/icon_inter.png')"
                         alt=""
                         class="self_introduction_top_arrow"
                         @click="$router.push('/setting')"
-                    />
+                    /> -->
                     <div class="self_introduction_top_con">
                         <div class="self_introduction_top_con_one">
                             <div class="self_introduction_name">{{ userInfo.nickname }}</div>
-                            <div
+                            <img
                                 class="self_introduction_authentication"
                                 v-if="authStatus !== '已认证'"
-                                @click="goAuth"
-                            >
-                                <img
-                                    :src="require('@assets/weirenzheng-icon.png')"
-                                    alt=""
-                                    class="self_introduction_authentication_img"
-                                />
-                                <div class="self_introduction_authentication_text">去认证</div>
-                            </div>
+                                @click.stop="goAuth"
+                                :src="require('@assets/weirenzheng-icon.png')"
+                                alt=""
+                            />
+
                             <img
                                 :src="require('@assets/yirenzheng-icon.png')"
                                 alt=""
                                 v-else
                                 class="authentication_img"
-                                @click="goAuth"
+                                @click.stop="goAuth"
                             />
                         </div>
                         <div class="self_introduction_top_con_two">
                             <div class="self_introduction_top_con_id">用户ID:{{ userInfo.id }}</div>
-                            <img :src="require('@assets/copy_icon.png')" alt="" class="copy_id" @click="copy" />
+                            <img :src="require('@assets/copy_icon.png')" alt="" class="copy_id" @click.stop="copy" />
                         </div>
                     </div>
                 </div>
-                <div class="self_introduction_bottom" :style="userInfo.intro === '' ? '' : 'margin-top: 6px'">
+                <!-- <div class="self_introduction_bottom" :style="userInfo.intro === '' ? '' : 'margin-top: 6px'">
                     {{ userInfo.intro }}
-                </div>
+                </div> -->
             </div>
             <!-- 未登录 -->
             <div class="not_logged" v-else @click="$router.push('/login')">
@@ -76,12 +71,31 @@
                     </div>
                 </div>
             </div>
+            <div class="user-list" v-if="isLogin">
+                <div class="user-text" @click="$router.push('/store')">藏品数 {{ assetNum }}</div>
+                <div class="user-text" @click="$router.push('/mineFollows')">关注数 {{ userInfo.follows }}</div>
+                <div class="user-text" @click="$router.push('/mineFollowers')">粉丝数 {{ userInfo.followers }}</div>
+            </div>
+            <div class="order-card">
+                <div class="order-info" @click="$router.push('/orders')">
+                    <img src="@assets/menu1.png" alt="" />
+                    <div class="text1">我的订单</div>
+                </div>
+                <div class="order-info" @click="$router.push('/mineExchange')">
+                    <img src="@assets/menu2.png" alt="" />
+                    <div class="text1">藏品记录</div>
+                </div>
+                <div class="order-info" @click="$router.push('/mineBanks')">
+                    <img src="@assets/menu3.png" alt="" />
+                    <div class="text1">我的银行卡</div>
+                </div>
+            </div>
             <!-- 展示列表 -->
             <div class="display_list">
                 <div class="display_list_con" @click="$router.push('/security')">
                     <div class="display_list_con_one">
                         <img :src="require('@assets/icon1.png')" alt="" class="display_list_con_displayIcon" />
-                        <div class="display_list_con_title">账户与安全区</div>
+                        <div class="display_list_con_title">账户与安全</div>
                     </div>
                 </div>
                 <div class="display_list_con" @click="wait">
@@ -90,13 +104,13 @@
                         <div class="display_list_con_title">联系我们</div>
                     </div>
                 </div>
-                <div class="display_list_con" @click="wait">
+                <div class="display_list_con" @click="$router.push('/about')">
                     <div class="display_list_con_one">
                         <img :src="require('@assets/icon4.png')" alt="" class="display_list_con_displayIcon" />
                         <div class="display_list_con_title">关于我们</div>
                     </div>
                 </div>
-                <div class="display_list_con" @click="share" >
+                <div class="display_list_con" @click="share">
                     <div class="display_list_con_one">
                         <img :src="require('@assets/icon4.png')" alt="" class="display_list_con_displayIcon" />
                         <div class="display_list_con_title">分享拉索</div>
@@ -368,6 +382,7 @@ export default {
             // position: relative;
             .not_logged_con {
                 display: flex;
+                align-items: center;
                 .not_logged_touxiang {
                     width: 64px;
                     height: 64px;
@@ -379,7 +394,7 @@ export default {
                     width: 100%;
                     display: flex;
                     justify-content: space-between;
-                    padding-top: 10px;
+                    // padding-top: 10px;
                     box-sizing: border-box;
                     .not_logged_text {
                         font-size: 20px;
@@ -408,15 +423,19 @@ export default {
         // background: #29293f;
         // margin-bottom: 10px;
         border-radius: 8px;
-        padding: 36px 0 30px;
+        padding: 36px 0 20px;
         box-sizing: border-box;
         .self_introduction_top {
             position: relative;
             // margin-bottom: 6px;
             display: flex;
+            align-items: center;
+            .van-image {
+                display: block;
+            }
             .self_introduction_top_img {
-                width: 60px;
-                height: 60px;
+                width: 64px;
+                height: 64px;
                 border-radius: 40px;
                 margin-right: 10px;
             }
@@ -428,7 +447,7 @@ export default {
                 right: 5px;
             }
             .self_introduction_top_con {
-                padding: 10px 0;
+                // padding: 10px 0;
                 box-sizing: border-box;
                 .self_introduction_top_con_one {
                     display: flex;
@@ -443,28 +462,8 @@ export default {
                         margin-right: 6px;
                     }
                     .self_introduction_authentication {
-                        width: 74px;
-                        height: 18px;
-                        background-color: rgba(255, 255, 255, 0.1);
-                        border-radius: 16px;
-                        padding: 0px 8px;
-                        box-sizing: border-box;
-                        display: flex;
-                        margin-top: 3px;
-                        .self_introduction_authentication_img {
-                            width: 18px;
-                            height: 18px;
-                        }
-                        .self_introduction_authentication_text {
-                            margin-left: 2px;
-                            padding: 4px 0px;
-                            box-sizing: border-box;
-                            font-size: 10px;
-                            font-family: PingFangSC-Regular, PingFang SC;
-                            font-weight: 400;
-                            color: #c8c9cc;
-                            line-height: 10px;
-                        }
+                        width: 85px;
+                        height: 20px;
                     }
                 }
             }
@@ -562,4 +561,42 @@ export default {
     border-radius: 16px;
     padding: 0 10px;
 }
+
+.order-card {
+    .flex();
+    background-color: @bg2;
+    margin-bottom: 15px;
+    border-radius: 12px;
+    .order-info {
+        width: 33.33%;
+        padding: 16px 0;
+        .flex-col();
+        align-items: center;
+        img {
+            width: 33px;
+            display: block;
+        }
+
+        .text1 {
+            font-size: 13px;
+            color: #ffffff;
+            line-height: 18px;
+            margin-top: 6px;
+        }
+    }
+}
+
+.user-list {
+    .flex();
+    height: 48px;
+    font-size: 13px;
+    color: #ffffff;
+    opacity: 0.3;
+    line-height: 18px;
+    padding: 0 16px;
+    .user-text {
+        width: 33%;
+        text-align: center;
+    }
+}
 </style>

+ 11 - 11
src/views/user/Follows.vue

@@ -1,19 +1,18 @@
 <template>
     <div class="follow">
-        <van-sticky :offset-top="bar.value && bar.value.show ? 46 : 0">
-            <div class="top">
-                <div class="name">我关注的</div>
-            </div>
+        <van-sticky :offset-top="46">
+            <van-tabs v-model="pageType" line-width="34" line-height="2" color="#ffffff">
+                <van-tab title="关注"></van-tab>
+                <van-tab title="粉丝"></van-tab>
+            </van-tabs>
         </van-sticky>
         <div class="list">
             <template v-for="(item, index) in list" :key="index">
                 <creator-info v-model:info="list[index]" @update:info="init"></creator-info>
             </template>
-            <van-empty
-                v-if="empty"
-                description="你还没有关注别人哦~"
-                :image="require('@assets/kong_png_gaunzhu.png')"
-            />
+            <van-empty v-if="empty" description="你还没有关注别人哦~" :image="require('@assets/kong_png_gaunzhu.png')">
+                <div class="empty-tips">这里将展示你在拉索的粉丝用户</div>
+            </van-empty>
         </div>
     </div>
 </template>
@@ -26,7 +25,8 @@ export default {
     data() {
         return {
             list: [],
-            empty: false
+            empty: false,
+            pageType: 'follow'
         };
     },
     computed: {
@@ -58,7 +58,7 @@ export default {
 
 <style lang="less" scoped>
 .follow {
-    background-color: @bg3;
+    background-color: @bg;
 }
 .top {
     background-color: @bg;