wbspool %!s(int64=4) %!d(string=hai) anos
pai
achega
ecd98f77b7

+ 1 - 1
src/common/locales/zh-TW.js

@@ -7,7 +7,7 @@ export default {
   关于我们: "關於我們",
   投稿: "投稿",
   搜索: "搜索",
-  登录注册: "登錄註冊",
+  登录注册: "登錄/註冊",
   匿名: "匿名",
   浏览: "瀏覽",
   发送验证码成功: "發送驗證碼成功",

+ 1 - 1
src/pc/App.vue

@@ -1,5 +1,5 @@
 <template>
-    <div id="app" >
+    <div id="app" class="" >
         <!-- <div style="width: 960px; backgroundcolor: black">12</div> -->
         <RouterView/>
         <login-box></login-box>

+ 2 - 0
src/pc/components.d.ts

@@ -29,6 +29,8 @@ declare module '@vue/runtime-core' {
     UiNavBar: typeof import('./components/ui-nav-bar/ui-nav-bar.vue')['default']
     UiOrderTable: typeof import('./components/ui-order-table/ui-order-table.vue')['default']
     UiPortal: typeof import('./components/ui-portal/ui-portal.vue')['default']
+    UiSearchHoverBox: typeof import('./components/ui-search-hover-box/ui-search-hover-box.vue')['default']
+    UiSearchUiBox: typeof import('./components/ui-search-hover-box/ui-search-ui-box.vue')['default']
     UiShadowBox: typeof import('./components/ui-shadow-box/ui-shadow-box.vue')['default']
     UiSmallArticle: typeof import('./components/ui-small-article/ui-small-article.vue')['default']
     UiSwiper: typeof import('./components/ui-swiper/ui-swiper.vue')['default']

+ 25 - 1
src/pc/components/layout-user/layout-user-header.vue

@@ -26,7 +26,8 @@
             {{ $t("当前会员有效期至") + $store.state.userinfo.vipStopStr}}
           </div>
           <div
-            class="text-size-14px text-white w-80px h-30px bg-primary flex items-center justify-center rounded-full"
+                  @click="handleGoTo"
+            class="text-size-14px text-white w-80px h-30px bg-primary flex items-center justify-center rounded-full cursor-pointer"
           >
             {{ $t("续费")}}
 
@@ -34,5 +35,28 @@
         </div>
       </div>
     </div>
+    <vip-srv-box ref="vsb"></vip-srv-box>
+
   </div>
 </template>
+
+<script>
+  export default {
+
+    data() {
+      return {
+        currentPath: this.$route.path,
+      };
+    },
+    beforeRouteEnter(to, from, next) {
+      next((vm) => {
+        vm.currentPath = to.path;
+      });
+    },
+    methods:{
+      handleGoTo() {
+        this.$refs.vsb.open();
+      }
+    }
+  };
+</script>

+ 3 - 0
src/pc/components/login-box/login-box.vue

@@ -273,6 +273,9 @@
                     this.$store.commit('UPDATE_LOGIN_INFO',resp.data.data.mzUser);
                     this.$message.success(this.$t('登录成功'));
                     this.$store.commit('HIDE_LOGIN_BOX');
+                    if(resp.data.data.mzUser.firstLogin === "1"){
+                        this.$router.push('/profile-complete')
+                    }
                     // if(this.$route.query.routeBack){
                     //     this.$router.back();
                     // }else{

+ 4 - 2
src/pc/components/ui-nav-bar/ui-nav-bar.vue

@@ -66,7 +66,7 @@
         </div>
         <div class="w-36px"></div>
         <div
-                @click="$router.push('/search')"
+                @click="showSearch=!showSearch"
                 class="transform hover:scale-110"
 
                 :class="`menu-item ${currentPath === '/search' ? 'selected' : ''}`"
@@ -132,6 +132,7 @@
         </div>
       </div>
     </div>
+    <ui-search-hover-box v-if="showSearch" @hide="showSearch=false"></ui-search-hover-box>
   </div>
 </template>
 
@@ -178,7 +179,8 @@ export default {
       currentPath: this.$route.path,
       lang: ['zh-TW','en'],
       canHideSuggest:true,
-      cmsCategorys:[]
+      cmsCategorys:[],
+      showSearch:false
     };
   },
   async created() {

+ 48 - 0
src/pc/components/ui-search-hover-box/ui-search-hover-box.vue

@@ -0,0 +1,48 @@
+<template>
+    <div class="min-h-272px w-screen bg-white absolute top-80px z-50 flex justify-center pb-30px shadow-md">
+        <div class="w-1200px">
+
+            <div class="text-size-30px mt-32px mb-30px">
+                搜索
+            </div>
+
+            <div class="mb-30px">
+                <input  v-on:keyup.enter="handleGoTo({name:keyword})" v-model="keyword" class="w-full h-40px border-1  rounded-full pl-20px pr-20px text-size-14px" placeholder="请输入搜索内容后按回车键搜索"></input>
+            </div>
+            <div class="flex flex-wrap">
+                <!--      <div class="tag selected">热门标签</div>-->
+                <div v-for="(item, index) in labels" @click="handleGoTo(item)" :key="index" class="tag hover:bg-[#1B3E28] hover:text-[white]">{{item.name}}</div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+    export default {
+        name: 'ui-search-hover-box',
+        data(){
+             return {
+                 labels:[],
+                 keyword:''
+             }
+        },
+        methods:{
+            handleGoTo(item){
+                this.$router.push('/search?keywords=' + item.name)
+                this.$emit('hide')
+            }
+        },
+        async created() {
+            let resp = await  this.$http.post(this.$api.cms.labels);
+            if(resp.data.status === 200){
+                this.labels = resp.data.data.cmsLabels;
+            }
+        }
+    }
+</script>
+
+<style scoped>
+.title{
+
+}
+</style>

+ 11 - 3
src/pc/components/vip-srv-box/vip-srv-box.vue

@@ -7,11 +7,11 @@
             custom-class="cc-dialog"
     >
 
-        <div class="tips" style="color: #103a22">
+        <div v-if="showTips" class="tips" style="color: #103a22">
             {{$t('当前用户')}}:{{$store.state.userinfo.nickname}}{{$t('没有VIP权限,无法查阅此文章!')}}
         </div>
-
-        <div class="flex mt-24px">
+        <div class="h-24px" v-if="showTips"></div>
+        <div class="flex">
             <ui-vip-preset class="mr-32px" @choose="handleChoose(vipSmeal)" v-for="vipSmeal in vipSmeals" :item="vipSmeal"></ui-vip-preset>
         </div>
 
@@ -21,6 +21,14 @@
 <script>
     export default {
         name: "vip-srv-box",
+        props:{
+            showTips:{
+                type:Boolean,
+                default(){
+                    return false;
+                }
+            }
+        },
         data(){
             return {
                 dialogVisible: false,

+ 1 - 1
src/pc/pages/article-detail/article-detail.vue

@@ -81,7 +81,7 @@
             <ui-devider></ui-devider>
             <div v-for="comment in comments" :key="item">
               <div class="flex items-start py-30px">
-                <img class="w-60px h-60px rounded-full" :src="comment.refUserAvatarUrl" />
+                <img class="w-60px h-60px rounded-full object-cover" :src="comment.refUserAvatarUrl" />
                 <div class="mt-8px ml-14px">
                   <div class="flex mb-14px items-center">
                     <div class="font-extralight text-size-16px mr-30px">{{comment.refUserName}}</div>

+ 1 - 1
src/pc/pages/search/search.vue

@@ -7,7 +7,7 @@
     </div>
     <div class="h-20px"></div>
     <div class="w-860px">
-      <ui-main-article @choose="handleChoose" v-for="item in latestArts" :item="item"></ui-main-article>
+      <ui-main-article class="mt-20px" @choose="handleChoose" v-for="item in latestArts" :item="item"></ui-main-article>
     </div>
   </div>
 </template>

+ 2 - 1
src/pc/pages/user/user-personal-center.vue

@@ -6,7 +6,7 @@
     <div class="flex flex-wrap items-center pl-40px">
       <div class="info-item">
         <div class="info-item-label">{{$t('头像')}}:</div>
-        <img v-if="userinfo.avatar" class="w-80px h-80px rounded-full" :src="userinfo.avatarUrl" />
+        <img v-if="userinfo.avatar" class="w-80px h-80px rounded-full object-cover" :src="userinfo.avatarUrl" />
       </div>
       <div class="info-item">
         <div class="info-item-label">{{$t('昵称')}}:</div>
@@ -106,6 +106,7 @@
               });
 
               let resp = await  this.$http.post(this.$api.mzUser.logout);
+              this.$store.commit('UPDATE_LOGIN_INFO','')
               if(resp.data.status === 200){
                 this.$router.push('/');
               }

+ 1 - 0
src/pc/pages/vip/vip.vue

@@ -21,6 +21,7 @@
       >
         <ui-vip-article :item="item" class="transform scale-110 "></ui-vip-article>
       </ui-shadow-box>
+      <div v-for="i in showVipMagazines.length % 3"  class="px-50px pt-30px mt-40px w-390px h-221px transform hover:scale-102 cursor-pointer"></div>
     </div>
   </div>
 </template>