|
@@ -1,44 +1,47 @@
|
|
<template>
|
|
<template>
|
|
<view class="container">
|
|
<view class="container">
|
|
- <!--search-->
|
|
|
|
- <view class="search-box main-center cross-center">
|
|
|
|
- <u-input
|
|
|
|
- v-model="keywords"
|
|
|
|
- placeholder="请输入剧名"
|
|
|
|
- color="#fff"
|
|
|
|
- border="none"
|
|
|
|
- prefix-icon="search"
|
|
|
|
- :prefix-icon-style="{
|
|
|
|
- color: $colors.primaryColor,
|
|
|
|
- fontSize: '50rpx',
|
|
|
|
- fontWeight: 500,
|
|
|
|
- lineHeight: '50rpx'
|
|
|
|
- }"
|
|
|
|
- :custom-style="{
|
|
|
|
- backgroundColor: '#1B203C',
|
|
|
|
- padding: '14rpx 30rpx',
|
|
|
|
- width: '700rpx',
|
|
|
|
- borderRadius: '36rpx',
|
|
|
|
- color: '#fff'
|
|
|
|
- }"
|
|
|
|
- @confirm="handleSearch"
|
|
|
|
|
|
+ <check-login />
|
|
|
|
+ <template v-if="isLogin">
|
|
|
|
+ <!--search-->
|
|
|
|
+ <view class="search-box main-center cross-center">
|
|
|
|
+ <u-input
|
|
|
|
+ v-model="keywords"
|
|
|
|
+ placeholder="请输入剧名"
|
|
|
|
+ color="#fff"
|
|
|
|
+ border="none"
|
|
|
|
+ prefix-icon="search"
|
|
|
|
+ :prefix-icon-style="{
|
|
|
|
+ color: $colors.primaryColor,
|
|
|
|
+ fontSize: '50rpx',
|
|
|
|
+ fontWeight: 500,
|
|
|
|
+ lineHeight: '50rpx'
|
|
|
|
+ }"
|
|
|
|
+ :custom-style="{
|
|
|
|
+ backgroundColor: '#1B203C',
|
|
|
|
+ padding: '14rpx 30rpx',
|
|
|
|
+ width: '700rpx',
|
|
|
|
+ borderRadius: '36rpx',
|
|
|
|
+ color: '#fff'
|
|
|
|
+ }"
|
|
|
|
+ @confirm="handleSearch"
|
|
|
|
+ />
|
|
|
|
+ </view>
|
|
|
|
+ <!--swpier-->
|
|
|
|
+ <swiper-box />
|
|
|
|
+ <!--栏目分类-->
|
|
|
|
+ <nav-bar />
|
|
|
|
+ <!--分类-->
|
|
|
|
+ <episode-box
|
|
|
|
+ v-for="(item,index) in homeColumn"
|
|
|
|
+ :key="index"
|
|
|
|
+ :title="item.name"
|
|
|
|
+ :type="item.type"
|
|
/>
|
|
/>
|
|
- </view>
|
|
|
|
- <!--swpier-->
|
|
|
|
- <swiper-box />
|
|
|
|
- <!--栏目分类-->
|
|
|
|
- <nav-bar />
|
|
|
|
- <!--分类-->
|
|
|
|
- <episode-box
|
|
|
|
- v-for="(item,index) in homeColumn"
|
|
|
|
- :key="index"
|
|
|
|
- :title="item.name"
|
|
|
|
- :type="item.type"
|
|
|
|
- />
|
|
|
|
- <!--tab bar-->
|
|
|
|
- <tab-bar />
|
|
|
|
- <!--最近播放-->
|
|
|
|
- <recent />
|
|
|
|
|
|
+ <!--tab bar-->
|
|
|
|
+ <tab-bar />
|
|
|
|
+ <!--最近播放-->
|
|
|
|
+ <recent />
|
|
|
|
+ </template>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -48,8 +51,9 @@ import EpisodeBox from './components/EpisodeBox'
|
|
import TabBar from '../../components/TabBar/index'
|
|
import TabBar from '../../components/TabBar/index'
|
|
import NavBar from '../../components/NavBar/index'
|
|
import NavBar from '../../components/NavBar/index'
|
|
import Recent from './components/Recent'
|
|
import Recent from './components/Recent'
|
|
|
|
+import CheckLogin from '../../components/CheckLogin/index'
|
|
export default {
|
|
export default {
|
|
- components: { Recent, NavBar, TabBar, EpisodeBox, SwiperBox },
|
|
|
|
|
|
+ components: { CheckLogin, Recent, NavBar, TabBar, EpisodeBox, SwiperBox },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
keywords: '',
|
|
keywords: '',
|
|
@@ -63,9 +67,12 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
|
|
+ isLogin() {
|
|
|
|
+ return this.$api.user.isLogin()
|
|
|
|
+ }
|
|
},
|
|
},
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
- this.$api.user.isLogin() && this.getHomeColumn()
|
|
|
|
|
|
+ this.isLogin && this.getHomeColumn()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
handleSearch() {
|
|
handleSearch() {
|