|
@@ -2,112 +2,112 @@
|
|
|
<div
|
|
<div
|
|
|
class="h-80px w-screen bg-primary flex justify-center overflow-hidden items-center"
|
|
class="h-80px w-screen bg-primary flex justify-center overflow-hidden items-center"
|
|
|
>
|
|
>
|
|
|
- <div class="flex items-center h-full">
|
|
|
|
|
- <div class="w-80px"></div>
|
|
|
|
|
- <div
|
|
|
|
|
- @click="$router.push('/home')"
|
|
|
|
|
- class="transform hover:scale-110"
|
|
|
|
|
- :class="`menu-item ${currentPath === '/home' ? 'selected' : ''}`"
|
|
|
|
|
- >
|
|
|
|
|
- {{ $t("首页") }}
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="w-40px"></div>
|
|
|
|
|
- <div
|
|
|
|
|
- @click="$router.push('/recommend')"
|
|
|
|
|
- class="transform hover:scale-110"
|
|
|
|
|
-
|
|
|
|
|
- :class="`menu-item ${currentPath === '/recommend' ? 'selected' : ''}`"
|
|
|
|
|
- >
|
|
|
|
|
- {{ $t("推荐") }}
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="w-40px"></div>
|
|
|
|
|
- <div
|
|
|
|
|
- @mouseenter="typeVisible = true"
|
|
|
|
|
- @mouseleave="handleAutoCloseSuggest"
|
|
|
|
|
- class="transform hover:scale-110"
|
|
|
|
|
- :class="`menu-item ${currentPath === '/specific-article' ? 'selected' : ''}`"
|
|
|
|
|
- >
|
|
|
|
|
- {{ $t("分类浏览") }}
|
|
|
|
|
- <img src="/imgs/arrow-down.png" class="w-14px h-6px ml-6px" />
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="w-40px"></div>
|
|
|
|
|
- <div
|
|
|
|
|
- @click="$router.push('/realtime-news')"
|
|
|
|
|
- class="transform hover:scale-110"
|
|
|
|
|
- :class="`menu-item ${currentPath === '/realtime-news' ? 'selected' : ''}`"
|
|
|
|
|
- >
|
|
|
|
|
- {{ $t("实时新闻") }}
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="w-40px"></div>
|
|
|
|
|
- <div
|
|
|
|
|
- @click="$router.push('/vip')"
|
|
|
|
|
- class="transform hover:scale-110"
|
|
|
|
|
-
|
|
|
|
|
- :class="`menu-item ${currentPath === '/vip' ? 'selected' : ''}`"
|
|
|
|
|
- >
|
|
|
|
|
- {{ $t("vip专区") }}
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="w-40px"></div>
|
|
|
|
|
- <div
|
|
|
|
|
- @click="$router.push('/aboutus')"
|
|
|
|
|
- class="transform hover:scale-110"
|
|
|
|
|
-
|
|
|
|
|
- :class="`menu-item ${currentPath === '/aboutus' ? 'selected' : ''}`"
|
|
|
|
|
- >
|
|
|
|
|
- {{ $t("关于我们") }}
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="w-260px"></div>
|
|
|
|
|
- <div
|
|
|
|
|
- @click="$router.push('/publish')"
|
|
|
|
|
- class="transform hover:scale-110"
|
|
|
|
|
-
|
|
|
|
|
- :class="`menu-item ${currentPath === '/publish' ? 'selected' : ''}`"
|
|
|
|
|
- >
|
|
|
|
|
- <img class="w-30px object-contain" src="/imgs/tougao.png" />
|
|
|
|
|
- {{ $t("投稿") }}
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="w-36px"></div>
|
|
|
|
|
- <div
|
|
|
|
|
- @click="$router.push('/search')"
|
|
|
|
|
- class="transform hover:scale-110"
|
|
|
|
|
-
|
|
|
|
|
- :class="`menu-item ${currentPath === '/search' ? 'selected' : ''}`"
|
|
|
|
|
- >
|
|
|
|
|
- <img class="w-30px object-contain" src="/imgs/search.png" />
|
|
|
|
|
- {{ $t("搜索") }}
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="w-40px"></div>
|
|
|
|
|
- <div
|
|
|
|
|
- v-if="!$store.state.userinfo"
|
|
|
|
|
- @click="$router.push('/login')"
|
|
|
|
|
- class="transform hover:scale-110"
|
|
|
|
|
-
|
|
|
|
|
- :class="`menu-item ${currentPath === '/login' ? 'selected' : ''}`"
|
|
|
|
|
- >
|
|
|
|
|
- {{ $t("登录注册") }}
|
|
|
|
|
|
|
+ <div class="flex items-center h-full w-1200px" style="justify-content: space-between">
|
|
|
|
|
+
|
|
|
|
|
+ <div class="flex h-full items-center" >
|
|
|
|
|
+ <div
|
|
|
|
|
+ @click="$router.push('/home')"
|
|
|
|
|
+ class="transform hover:scale-110 ml-12px mr-12px"
|
|
|
|
|
+ :class="`menu-item ${currentPath === '/home' ? 'selected' : ''}`"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ $t("首页") }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div
|
|
|
|
|
+ @click="$router.push('/recommend')"
|
|
|
|
|
+ class="transform hover:scale-110 ml-12px mr-12px"
|
|
|
|
|
+
|
|
|
|
|
+ :class="`menu-item ${currentPath === '/recommend' ? 'selected' : ''}`"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ $t("推荐") }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div
|
|
|
|
|
+ @mouseenter="typeVisible = true"
|
|
|
|
|
+ @mouseleave="handleAutoCloseSuggest"
|
|
|
|
|
+ class="transform hover:scale-110 ml-12px mr-12px"
|
|
|
|
|
+ :class="`menu-item ${currentPath === '/specific-article' ? 'selected' : ''}`"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ $t("分类浏览") }}
|
|
|
|
|
+ <img src="/imgs/arrow-down.png" class="w-14px h-6px ml-6px" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div
|
|
|
|
|
+ @click="$router.push('/realtime-news')"
|
|
|
|
|
+ class="transform hover:scale-110 ml-12px mr-12px"
|
|
|
|
|
+ :class="`menu-item ${currentPath === '/realtime-news' ? 'selected' : ''}`"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ $t("实时新闻") }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div
|
|
|
|
|
+ @click="$router.push('/vip')"
|
|
|
|
|
+ class="transform hover:scale-110 ml-12px mr-12px"
|
|
|
|
|
+
|
|
|
|
|
+ :class="`menu-item ${currentPath === '/vip' ? 'selected' : ''}`"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ $t("VIP专区") }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div
|
|
|
|
|
+ @click="$router.push('/aboutus')"
|
|
|
|
|
+ class="transform hover:scale-110 ml-12px mr-12px"
|
|
|
|
|
+
|
|
|
|
|
+ :class="`menu-item ${currentPath === '/aboutus' ? 'selected' : ''}`"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ $t("关于我们") }}
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <div
|
|
|
|
|
- v-else
|
|
|
|
|
- @click="$router.push('/user/personal-center')"
|
|
|
|
|
- :class="`menu-item ${currentPath === '/login' ? 'selected' : ''}`"
|
|
|
|
|
- class="transform hover:scale-110"
|
|
|
|
|
|
|
+ <div class="flex h-full items-center">
|
|
|
|
|
+ <div
|
|
|
|
|
+ @click="$router.push('/publish')"
|
|
|
|
|
+ class="transform hover:scale-110"
|
|
|
|
|
+
|
|
|
|
|
+ :class="`menu-item ${currentPath === '/publish' ? 'selected' : ''}`"
|
|
|
|
|
+ >
|
|
|
|
|
+ <img class="w-30px object-contain" src="/imgs/tougao.png" />
|
|
|
|
|
+ {{ $t("投稿") }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="w-36px"></div>
|
|
|
|
|
+ <div
|
|
|
|
|
+ @click="$router.push('/search')"
|
|
|
|
|
+ class="transform hover:scale-110"
|
|
|
|
|
+
|
|
|
|
|
+ :class="`menu-item ${currentPath === '/search' ? 'selected' : ''}`"
|
|
|
|
|
+ >
|
|
|
|
|
+ <img class="w-30px object-contain" src="/imgs/search.png" />
|
|
|
|
|
+ {{ $t("搜索") }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="w-40px"></div>
|
|
|
|
|
+ <div
|
|
|
|
|
+ v-if="!$store.state.userinfo"
|
|
|
|
|
+ @click="$router.push('/login')"
|
|
|
|
|
+ class="transform hover:scale-110"
|
|
|
|
|
|
|
|
- class="-align-center"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ :class="`menu-item ${currentPath === '/login' ? 'selected' : ''}`"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ $t("登录注册") }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div
|
|
|
|
|
+ v-else
|
|
|
|
|
+ @click="$router.push('/user/personal-center')"
|
|
|
|
|
+ :class="`menu-item ${currentPath === '/login' ? 'selected' : ''}`"
|
|
|
|
|
+ class="transform hover:scale-110"
|
|
|
|
|
+
|
|
|
|
|
+ class="-align-center"
|
|
|
|
|
+ >
|
|
|
<img class="w-40px h-40px rounded-full mr-12px" v-if="$store.state.userinfo.avatar" :src="$store.state.userinfo.avatarUrl">
|
|
<img class="w-40px h-40px rounded-full mr-12px" v-if="$store.state.userinfo.avatar" :src="$store.state.userinfo.avatarUrl">
|
|
|
<span class="font-size-20px">{{$store.state.userinfo.nickname}}</span>
|
|
<span class="font-size-20px">{{$store.state.userinfo.nickname}}</span>
|
|
|
- </div>
|
|
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
- <div class="w-44px"></div>
|
|
|
|
|
- <div
|
|
|
|
|
- @click="changeLang"
|
|
|
|
|
- class="transform hover:scale-110"
|
|
|
|
|
|
|
+ <div class="w-44px"></div>
|
|
|
|
|
+ <div
|
|
|
|
|
+ @click="changeLang"
|
|
|
|
|
+ class="transform hover:scale-110"
|
|
|
|
|
|
|
|
- class="w-30px h-30px rounded-full border-white-2px text-white align-middle text-center cursor-pointer"
|
|
|
|
|
- >
|
|
|
|
|
- {{ $t("cn") }}
|
|
|
|
|
|
|
+ class="w-30px h-30px rounded-full border-white-2px text-white align-middle text-center cursor-pointer"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ langStr}}
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
<div
|
|
<div
|
|
|
v-if="typeVisible"
|
|
v-if="typeVisible"
|
|
@@ -128,7 +128,7 @@
|
|
|
:key="item"
|
|
:key="item"
|
|
|
>
|
|
>
|
|
|
<div class="name ">{{item.name}}</div>
|
|
<div class="name ">{{item.name}}</div>
|
|
|
- <div class="count">{{item.artcileNum}}篇文章</div>
|
|
|
|
|
|
|
+ <div class="count">{{item.artcileNum}} {{$t("篇文章")}}</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -140,6 +140,17 @@ export default {
|
|
|
|
|
|
|
|
mounted() {
|
|
mounted() {
|
|
|
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ computed:{
|
|
|
|
|
+ langStr(){
|
|
|
|
|
+
|
|
|
|
|
+ if(this.$i18n.locale.startsWith("zh")){
|
|
|
|
|
+ return '中';
|
|
|
|
|
+ }else{
|
|
|
|
|
+ return 'EN';
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
methods:{
|
|
methods:{
|
|
|
changeLang(){
|
|
changeLang(){
|
|
@@ -165,7 +176,7 @@ export default {
|
|
|
return {
|
|
return {
|
|
|
typeVisible: false,
|
|
typeVisible: false,
|
|
|
currentPath: this.$route.path,
|
|
currentPath: this.$route.path,
|
|
|
- lang: ['zh-CN','zh-TW'],
|
|
|
|
|
|
|
+ lang: ['zh-TW','en'],
|
|
|
canHideSuggest:true,
|
|
canHideSuggest:true,
|
|
|
cmsCategorys:[]
|
|
cmsCategorys:[]
|
|
|
};
|
|
};
|