gdpaoup
This commit is contained in:
@@ -3,7 +3,9 @@
|
||||
<view class="status_bar"></view>
|
||||
<view class="index">
|
||||
<view class="top">
|
||||
<view class="sosuo"></view>
|
||||
<view class="sosuo" @click="goSearch">
|
||||
<u-icon name="search" color="#555" size="34rpx"></u-icon>
|
||||
</view>
|
||||
<view class="tabs">
|
||||
<u-tabs :is-scroll="false" bar-width="70" ref="tabs" :list="list" :current="num" :bar-style="{
|
||||
'background-color':'#FF780F',
|
||||
@@ -93,18 +95,17 @@
|
||||
height: 100vh;
|
||||
|
||||
.top {
|
||||
padding: 0 30rpx;
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
height: 88rpx;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
padding: 0 30rpx;
|
||||
|
||||
.sosuo {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
|
||||
}
|
||||
|
||||
.tabs {
|
||||
@@ -122,6 +123,7 @@
|
||||
|
||||
.box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
@@ -191,6 +193,7 @@
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
import videoItem from "@/components/index/video-item/index"
|
||||
import zhiboItem from "@/components/index/zhibo-item/index"
|
||||
import indexad from "@/components/index/ad/index"
|
||||
@@ -198,6 +201,9 @@
|
||||
|
||||
export default {
|
||||
name: "index",
|
||||
computed: {
|
||||
...mapState(["hasLogin"])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: [{
|
||||
@@ -225,18 +231,14 @@
|
||||
},
|
||||
onShow() {
|
||||
this.getArticlelist();
|
||||
this.getRecommendList();
|
||||
this.getSwiper();
|
||||
this.getZhiBoSwiper();
|
||||
this.tabLiveList();
|
||||
this.getFollowList();
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.getArticlelist();
|
||||
// this.getManicureList({ load: 'reload' });
|
||||
},
|
||||
methods: {
|
||||
// 列表
|
||||
// 直播列表
|
||||
tabLiveList() {
|
||||
this.$u.api.tabLiveList().then((res) => {
|
||||
console.log(res)
|
||||
@@ -272,12 +274,25 @@
|
||||
},
|
||||
// 切换导航
|
||||
dianji(a) {
|
||||
console.log(a);
|
||||
// console.log(a);
|
||||
if (typeof a == "object") {
|
||||
this.num = a.detail.current
|
||||
} else {
|
||||
this.num = a
|
||||
}
|
||||
// 状态请求
|
||||
if (this.num == 0) {
|
||||
this.getArticlelist();
|
||||
this.getSwiper();
|
||||
} else if (this.num == 1) {
|
||||
this.getZhiBoSwiper(); // 直播轮播
|
||||
this.tabLiveList();
|
||||
} else if (this.num == 2) {
|
||||
if (this.hasLogin) {
|
||||
this.getFollowList(); // 关注列表
|
||||
}
|
||||
this.getRecommendList(); // 推荐达人
|
||||
}
|
||||
},
|
||||
// 发现别表
|
||||
getArticlelist() {
|
||||
@@ -295,7 +310,7 @@
|
||||
// 达人列表
|
||||
getRecommendList() {
|
||||
this.$u.api.getRecommendList().then(res => {
|
||||
console.log(res)
|
||||
console.log(res);
|
||||
if (res.errCode == 0) {
|
||||
this.recommendList = res.data.list;
|
||||
}
|
||||
@@ -313,7 +328,6 @@
|
||||
})
|
||||
},
|
||||
toSearchPage() {
|
||||
console.log("22");
|
||||
uni.navigateTo({
|
||||
url: '/pageB/follow/index'
|
||||
});
|
||||
@@ -354,6 +368,9 @@
|
||||
params: params
|
||||
})
|
||||
},
|
||||
goSearch() {
|
||||
this.$u.route("/pageB/search/index");
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -152,10 +152,6 @@ export default {
|
||||
}
|
||||
this.getUserInfo();
|
||||
},
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.getUserInfo();
|
||||
},
|
||||
onNavigationBarButtonTap() {
|
||||
this.toOtherPage("/setting/Index");
|
||||
},
|
||||
|
||||
@@ -48,8 +48,11 @@
|
||||
<view class="activity-view">
|
||||
<image class="lingquan" :src="activityInfo.adv_code" @click="activityLink({ type: activityInfo.url_type, id: activityInfo.info_id })"></image>
|
||||
</view>
|
||||
<!-- 优惠券 -->
|
||||
<youhq></youhq>
|
||||
<!-- 商品列表 -->
|
||||
<list ref="recommendGoods"></list>
|
||||
<!-- 购物车 -->
|
||||
<view class="cart" @click="toCartPage">
|
||||
<image src="/static/image/common/3.png"></image>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user