This commit is contained in:
Gdpao 2020-08-06 20:42:03 +08:00
parent 201f858833
commit 090b7cc753
22 changed files with 209 additions and 184 deletions

View File

@ -27,12 +27,28 @@ const install = (Vue, vm) => {
return res; return res;
} else if(res.errCode == 401) { } else if(res.errCode == 401) {
// 假设201为token失效这里跳转登录 // 假设201为token失效这里跳转登录
vm.$u.toast('验证失败,请重新登录'); // vm.$u.toast('您还没有登录哦,请先去登录!');
setTimeout(() => { if (res.data.action != "memberinfo") {
// 此为uView的方法详见路由相关文档 uni.showModal({
vm.$u.route('/pageA/login/login') title: "温馨提示",
}, 1500) content: "您还未登录,请立即登录",
cancelText: "以后再说",
confirmText: "立即登录",
confirmColor: "#FF780F",
success(res) {
// console.log(res);
if (res.confirm) {
setTimeout(() => {
// 此为uView的方法详见路由相关文档
vm.$u.route('/pageA/login/login')
}, 500)
}
}
})
}
return false; return false;
} else if (res.errCode == 1) {
console.log(res.message);
} else { } else {
// 如果返回false则会调用Promise的reject回调 // 如果返回false则会调用Promise的reject回调
// 并将进入this.$u.post(url).then().catch(res=>{})的catch回调中res为服务端的返回值 // 并将进入this.$u.post(url).then().catch(res=>{})的catch回调中res为服务端的返回值

View File

@ -17,7 +17,8 @@ const store = new Vuex.Store({
groupbuyInfo: {}, // 秒杀详情 groupbuyInfo: {}, // 秒杀详情
loadmore: {}, // 下拉加载返回的数据 loadmore: {}, // 下拉加载返回的数据
hasLogin: false, // 登录状态 hasLogin: false, // 登录状态
token: "" // 储存token token: "", // 储存token
showLoginModel: false, // 登录框
}, },
getters: { getters: {
getOrderAddress(state) { getOrderAddress(state) {

View File

@ -68,7 +68,7 @@ export default {
height: 80rpx; height: 80rpx;
border-radius: 50%; border-radius: 50%;
margin-top: 24rpx; margin-top: 24rpx;
background-color: #0f0; background-color: #0077AA;
} }
.name{ .name{
font-size: 26rpx; font-size: 26rpx;

View File

@ -1,10 +1,10 @@
<template> <template>
<view class="notice"> <view class="notice">
<view v-for="(item,index) in notice" :key="index"> <view v-for="(item,index) in notice" :key="index">
<view class="time_notice">2020-05-14 20:11</view> <view class="time_notice">{{ item.addtime }}</view>
<view class="notice_view"> <view class="notice_view">
<image :src="item.url" mode="aspectFill" ></image> <image :src="item.picture" mode="aspectFill" ></image>
<view class="text_view">{{item.content}}</view> <view class="text_view u-line-2">{{ item.content }}</view>
<view class="notice_list"> <view class="notice_list">
<text>查看详情</text> <text>查看详情</text>
<u-icon name="arrow-right" color="#666"></u-icon> <u-icon name="arrow-right" color="#666"></u-icon>
@ -74,21 +74,20 @@
<script> <script>
export default { export default {
name: "notice", name: "notice",
props: ['list'],
data() { data() {
return { return {
notice : [ notice : []
{
time : '2020-05-14 20:11',
content:'潮牌1折秒杀杨幂同款小白鞋今日43元送10000元大红包还有明星限量签名照',
url : '../../../pageE/static/mine/23.png'
},
{
time : '2020-05-14 20:11',
content:'潮牌1折秒杀杨幂同款小白鞋今日43元送10000元大红包还有明星限量签名照',
url : '../../../pageE/static/mine/23.png'
}
]
}; };
} },
watch: {
list(newVal,old) {
// console.log(newVal);
this.notice = newVal;
}
},
methods: {
}
} }
</script> </script>

View File

@ -10,7 +10,7 @@
<view class="label"> <view class="label">
<u-tabs-swiper ref="group" :list="classifyList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="current" font-size="24" :show-bar="false" @change="tabsChange" height="60"></u-tabs-swiper> <u-tabs-swiper ref="group" :list="classifyList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="current" font-size="24" :show-bar="false" @change="tabsChange" height="60"></u-tabs-swiper>
</view> </view>
<swiper :current="swiperCurrent" @animationfinish="animationfinish" style="height: 260rpx"> <swiper :current="swiperCurrent" @animationfinish="animationfinish" style="height: 340rpx;">
<swiper-item class="swiper-item list" v-for="(_, i) in classifyList" :key="i"> <swiper-item class="swiper-item list" v-for="(_, i) in classifyList" :key="i">
<!-- 最多显示3个 --> <!-- 最多显示3个 -->
<sitem :info="info" v-for="(info, index) in groupList.slice(0, 3)" :key="index"></sitem> <sitem :info="info" v-for="(info, index) in groupList.slice(0, 3)" :key="index"></sitem>
@ -92,7 +92,7 @@ export default {
color: #333; color: #333;
} }
.more { .more {
font-size: 18rpx; font-size: 20rpx;
display: flex; display: flex;
align-items: center; align-items: center;
color: #999; color: #999;

View File

@ -44,8 +44,9 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.item{ .item{
width: 210rpx; width: 220rpx;
overflow: hidden; height: 100%;
// overflow: hidden;
.head{ .head{
width: 100%; width: 100%;
height: 180rpx; height: 180rpx;

View File

@ -2,7 +2,7 @@
<view class="list"> <view class="list">
<view class="top">商品推荐</view> <view class="top">商品推荐</view>
<view> <view>
<u-tabs-swiper ref="uTabs" :list="classifyList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="current" font-size="24" :show-bar="false" @change="tabsChange" height="60"></u-tabs-swiper> <u-tabs-swiper ref="uTabs" :list="classifyList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="current" font-size="26" :show-bar="false" @change="tabsChange" height="60"></u-tabs-swiper>
</view> </view>
<swiper class="swiper-box" :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish" :style="{height: swiperHeight}"> <swiper class="swiper-box" :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish" :style="{height: swiperHeight}">
<swiper-item class="swiper-item" v-for="(_, index) in classifyList" :key="index"> <swiper-item class="swiper-item" v-for="(_, index) in classifyList" :key="index">
@ -136,6 +136,7 @@ export default {
} }
.swiper-box { .swiper-box {
height: 100%; height: 100%;
padding: 20rpx 0;
margin-bottom: 10rpx; margin-bottom: 10rpx;
.swiper-item { .swiper-item {
// height: 100%; // height: 100%;

View File

@ -3,7 +3,7 @@
<view class="top"> <view class="top">
<text>今日拼团推荐</text> <text>今日拼团推荐</text>
<view class="more" @click="toDetailsPage"> <view class="more" @click="toDetailsPage">
<text>点击查看更多</text> <text>点击查看详情</text>
<u-icon name="arrow-right" color="#999" size="22"></u-icon> <u-icon name="arrow-right" color="#999" size="22"></u-icon>
</view> </view>
</view> </view>
@ -86,6 +86,7 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
color: #999; color: #999;
font-size: 20rpx;
} }
} }
.connect{ .connect{

View File

@ -77,7 +77,7 @@ export default {
} }
} }
.next{ .next{
font-size: 18rpx; font-size: 20rpx;
display: flex; display: flex;
align-items: center; align-items: center;
color: #999; color: #999;

View File

@ -23,7 +23,6 @@
}, },
methods: { methods: {
type_logines(){ type_logines(){
console.log("2345")
this.show = this.type_login this.show = this.type_login
} }
}, },

View File

@ -3,7 +3,13 @@
<view class="user"> <view class="user">
<view class="info"> <view class="info">
<view class="avatar"> <view class="avatar">
<image :src="item.member_avatar"></image> <image :src="item.member_avatar" mode="aspectFill"></image>
<view class="posi-type">
<view>
<u-icon name="play-right-fill" color="#fff" size="20rpx"></u-icon>
</view>
<text>正在直播</text>
</view>
</view> </view>
<view class="box"> <view class="box">
<view class="name">{{ item.member_nickname }}</view> <view class="name">{{ item.member_nickname }}</view>
@ -34,11 +40,39 @@
display: flex; display: flex;
align-items: center; align-items: center;
.avatar { .avatar {
position: relative;
&>image{ &>image{
z-index: 99;
width: 140rpx; width: 140rpx;
height: 140rpx; height: 140rpx;
border-radius: 50%; border-radius: 50%;
} }
.posi-type {
z-index: 100;
position: absolute;
bottom: 0;
left: 0;
display: flex;
align-items: center;
border-radius: 30rpx;
background-color: rgba(0,0,0,0.3);
& > view {
width: 40rpx;
height: 40rpx;
flex-shrink: 0;
text-align: center;
line-height: 30rpx;
border-radius: 50%;
background-color: rgba(0,0,0,0.5);
}
& > text {
padding: 0 12rpx 0 6rpx;
color: #FF3131;
height: 40rpx;
line-height: 40rpx;
font-size: 20rpx;
}
}
} }
.box { .box {
display: flex; display: flex;
@ -68,7 +102,7 @@
border-radius: 30rpx; border-radius: 30rpx;
} }
.btn-follow { .btn-follow {
background-color: #007AFF; background-color: #999999;
} }
.btn-unfollow { .btn-unfollow {
background-color: #FF780F; background-color: #FF780F;

View File

@ -106,9 +106,9 @@ export default {
methods: { methods: {
// //
following(id) { following(id) {
this.is_follow = !this.is_follow;
this.$u.api.attentionMember({member_id: id}).then(res => { this.$u.api.attentionMember({member_id: id}).then(res => {
if (res.errCode == 0) { if (res.errCode == 0) {
this.is_follow = !this.is_follow;
this.$u.toast(res.message); this.$u.toast(res.message);
} }
}) })
@ -116,10 +116,10 @@ export default {
// //
likeType(id) { likeType(id) {
// console.log(id); // console.log(id);
this.is_like = !this.is_like;
this.$u.post("article/articleLike",{article_id: id}).then(res => { this.$u.post("article/articleLike",{article_id: id}).then(res => {
if (res.errCode == 0) { if (res.errCode == 0) {
// console.log(res); // console.log(res);
this.is_like = !this.is_like;
this.list.like_num = res.data.num; this.list.like_num = res.data.num;
} else { } else {
this.$u.toast(res.message); this.$u.toast(res.message);
@ -128,10 +128,10 @@ export default {
}, },
// //
collecting(id) { collecting(id) {
this.is_collect = !this.is_collect;
this.$u.post("article/articleCollect",{article_id: id}).then(res => { this.$u.post("article/articleCollect",{article_id: id}).then(res => {
if (res.errCode == 0) { if (res.errCode == 0) {
// console.log(res); // console.log(res);
this.is_collect = !this.is_collect;
this.list.collect_num = res.data.num; this.list.collect_num = res.data.num;
} else { } else {
this.$u.toast(res.message); this.$u.toast(res.message);

View File

@ -515,10 +515,16 @@ export default {
}, },
// //
getReplyList(id) { getReplyList(id) {
this.page_[id] = 0; this.page_[id] = 0;
console.log(this.page_); if (!this.page_[id] === 0) {
this.$u.post("article/articleReplyList", {id: id, page: 0}).then(res => { }
this.allList[id] = res.data; console.log(this.page_[id]);
this.$u.post("article/articleReplyList", {id: id, page: this.page_[id]}).then(res => {
console.log(this.page_);
if (res.errCode == 0) {
this.page_[id]++;
this.allList[id] = res.data;
}
}) })
}, },
// //
@ -536,7 +542,6 @@ export default {
scrollBottom(e) { scrollBottom(e) {
this.page++; this.page++;
this.getComment(); this.getComment();
console.log(e);
}, },
// //
gotoInfo(id) { gotoInfo(id) {

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="sdetails"> <view class="sdetails">
<u-swiper :list="list" height="500" border-radius="0" mode="dot"></u-swiper> <u-swiper :list="list" height="500" border-radius="0" mode="dot" @click="viewImage"></u-swiper>
<view class="spike-view" v-if="type == 3"> <view class="spike-view" v-if="type == 3">
<view class="left"> <view class="left">
<view class="price"> <view class="price">
@ -461,7 +461,18 @@ export default {
id: this.goodsInfo.goods_id id: this.goodsInfo.goods_id
} }
}) })
} },
//
viewImage(index) {
let arr = [];
this.list.forEach(item => {
arr.push(item.image);
})
uni.previewImage({
urls: arr,
current: arr[index]
})
}
}, },
} }
</script> </script>

View File

@ -1,18 +1,20 @@
<template> <template>
<view id="actives"> <view id="actives">
<!-- 活动消息推送 --> <!-- 活动消息推送 -->
<view class="activity" v-for="(item, index) in actives" :key="index"> <block v-for="(item, index) in actives" :key="index">
<view class="times">{{item.type}}</view> <view class="time">{{ item.addtime }}</view>
<view class="content"> <view class="activity">
<view class="title">{{item.title}}</view> <view class="content">
<view class="images_about"> <view class="title">{{item.title}}</view>
<image :src="item.goods_image"></image> <view class="images_about">
<view> <image :src="item.goods_image" mode="aspectFill"></image>
<text>{{item.summary}}</text> <view>
</view> <text class="u-line-2">{{item.summary}}</text>
</view> </view>
</view> </view>
</view> </view>
</view>
</block>
</view> </view>
</template> </template>
@ -30,13 +32,13 @@
}, },
methods: { methods: {
titletext(){ titletext(){
console.log("22345")
}, },
// //
messageactivityList(){ messageactivityList(){
this.$u.api.messageactivityList({}).then((res)=>{ this.$u.api.messageactivityList({}).then((res)=>{
console.log(res) if (res.errCode == 0) {
this.actives = res.data this.actives = res.data;
}
}) })
} }
}, },
@ -52,9 +54,14 @@
#actives{ #actives{
background: #ECECEC; background: #ECECEC;
height: 100%; height: 100%;
.time {
padding: 30rpx 0;
color: #666;
text-align: center;
font-size: 28rpx;
}
} }
.activity{ .activity{
.times{ .times{
width:100%; width:100%;
font-size:28rpx; font-size:28rpx;
@ -71,9 +78,9 @@
margin: 0 auto; margin: 0 auto;
overflow: hidden; overflow: hidden;
image{ image{
width: 137rpx; flex-shrink: 0;
width: 140rpx;
height: 140rpx; height: 140rpx;
float: left;
} }
.title{ .title{
font-size:30rpx; font-size:30rpx;
@ -81,25 +88,17 @@
padding: 0rpx 0 19rpx; padding: 0rpx 0 19rpx;
} }
.images_about{ .images_about{
overflow: hidden; display: flex;
text{ & > view{
display: table-cell; display: flex;
flex-direction: column;
justify-content: center;
width: 100%;
height: 140rpx; height: 140rpx;
vertical-align: middle; padding: 20rpx;
width: 400rpx; background: rgba(241,241,241,1);
padding-left: 15rpx; & > text {
line-height: 36rpx; }
display: block;
overflow:hidden; //
text-overflow:ellipsis; //
white-space:nowrap; //
}
view{
display: inline-block;
float: left;
width:430rpx;
height:140rpx;
background:rgba(241,241,241,1);
} }
} }
} }

View File

@ -2,10 +2,10 @@
<view class="attention"> <view class="attention">
<view class="attention_box" v-for="(item,index) in attention" :key="index"> <view class="attention_box" v-for="(item,index) in attention" :key="index">
<view> <view>
<image :src="item.url"></image> <image :src="item.friend_tomavatar" mode="aspectFill"></image>
</view> </view>
<view>{{item.name}}</view> <view>{{item.friend_tomname}}</view>
<view>状态{{item.type}}</view> <view>{{item.live_status ? '正在直播' : '未直播'}}</view>
<view class="cur_two" @click="tapClick(index)" v-if = "item.about == 1">已关注</view> <view class="cur_two" @click="tapClick(index)" v-if = "item.about == 1">已关注</view>
<view class="cur" @click="tapClick(index)" v-else = "item.about == 2">未关注</view> <view class="cur" @click="tapClick(index)" v-else = "item.about == 2">未关注</view>
</view> </view>
@ -19,37 +19,7 @@
return { return {
rSelect:[], rSelect:[],
type : '未关注', type : '未关注',
attention: [{ attention: []
url: '../../pageE/static/mine/1.png',
name: '达人昵称',
type: '正在直播',
about: 1
},
{
url: '../../pageE/static/mine/1.png',
name: '达人昵称',
type: '正在直播',
about: 2
},
{
url: '../../pageE/static/mine/1.png',
name: '达人昵称',
type: '正在直播',
about: 1
},
{
url: '../../pageE/static/mine/1.png',
name: '达人昵称',
type: '正在直播',
about: 1
},
{
url: '../../pageE/static/mine/1.png',
name: '达人昵称',
type: '正在直播',
about: 1
}
]
}; };
}, },
onLoad(){ onLoad(){
@ -64,13 +34,11 @@
this.rSelect.push(index); // this.rSelect.push(index); //
} else { } else {
this.rSelect.splice(this.rSelect.indexOf(index), 1); // this.rSelect.splice(this.rSelect.indexOf(index), 1); //
} }
}, },
snsfriendList(){ snsfriendList(){
this.$u.api.snsfriendList({}).then((res)=>{ this.$u.api.snsfriendList({}).then((res)=>{
console.log(res) this.attention = res.data;
// this.attention = res.data
}) })
} }
}, },
@ -102,7 +70,7 @@
view image { view image {
width: 80rpx; width: 80rpx;
height: 80rpx; height: 80rpx;
display: block; border-radius: 50%;
margin: 24rpx auto 0; margin: 24rpx auto 0;
} }

View File

@ -25,45 +25,21 @@
export default { export default {
data() { data() {
return { return {
actives: [ actives: [],
{ page: 1
url: '../../pageE/static/mine/1.png',
name: '您的订单已发货',
type: '2020-05-14 20:11',
about: '百搭休闲格纹裙!你值得有用!'
},
{
url: '../../pageE/static/mine/1.png',
name: '百元趋势新品',
type: '2020-05-14 20:11',
about: '百搭休闲格纹裙!你值得有用!'
},
{
url: '../../pageE/static/mine/1.png',
name: '百元趋势新品',
type: '2020-05-14 20:11',
about: '百搭休闲格纹裙!你值得有用!'
},
{
url: '../../pageE/static/mine/1.png',
name: '百元趋势新品',
type: '2020-05-14 20:11',
about: '百搭休闲格纹裙!你值得有用!'
},
{
url: '../../pageE/static/mine/1.png',
name: '百元趋势新品',
type: '2020-05-14 20:11',
about: '百搭休闲格纹裙!你值得有用!'
},
]
}; };
}, },
onLoad() {
this.getCartList();
},
methods: { methods: {
titletext(){ getCartList() {
console.log("22345") this.$u.post("message/orderDeliveryList",{page: this.page}).then(res => {
} if (res.errCode == 0) {
this.actives == res.data;
}
})
}
}, },
components:{ components:{
} }
@ -72,7 +48,6 @@
<style lang="scss" scoped> <style lang="scss" scoped>
#actives{ #actives{
background: #ECECEC;
height: 100%; height: 100%;
} }
.activity{ .activity{

View File

@ -1,7 +1,7 @@
<template> <template>
<view> <view>
<!-- 公告咨询 --> <!-- 公告咨询 -->
<notice></notice> <notice :list="list"></notice>
</view> </view>
</template> </template>
@ -10,18 +10,18 @@
export default { export default {
data() { data() {
return { return {
list: [],
}; };
}, },
onLoad(){ onLoad(){
this.informationList() this.informationList();
}, },
methods: { methods: {
titletext(){ titletext(){
console.log("22345")
}, },
informationList(){ informationList(){
this.$u.api.informationList({}).then((res)=>{ this.$u.api.informationList({}).then((res)=>{
console.log(res) this.list = res.data;
}) })
} }
}, },

View File

@ -3,7 +3,7 @@
<view class="container"> <view class="container">
<view class="item-box" v-for="(item, index) in articleList" :key="index" @click="toDetailsPage(item.article_id)"> <view class="item-box" v-for="(item, index) in articleList" :key="index" @click="toDetailsPage(item.article_id)">
<view class="video-item" v-if="item"> <view class="video-item" v-if="item">
<image class="head" :src="item.article_pic" v-if="item.type == 1"></image> <image class="head" :src="item.article_pic" mode="scaleToFill" v-if="item.type == 1"></image>
<view class="header_fist" v-else> <view class="header_fist" v-else>
<view class="backes"></view> <view class="backes"></view>
<image class="head" :src="item.article_pic"></image> <image class="head" :src="item.article_pic"></image>
@ -44,11 +44,11 @@ export default {
} }
}, },
onShow() { onShow() {
this.articleCollectList(); this.articleCollectList();
}, },
// //
onPullDownRefresh() { onPullDownRefresh() {
this.articleCollectList(); this.articleCollectList();
}, },
methods: { methods: {
showAction(item) { showAction(item) {
@ -93,16 +93,15 @@ export default {
margin-right: 20rpx; margin-right: 20rpx;
} }
.video-item{ .video-item{
height: 540rpx; width: 330rpx;
height: 510rpx;
margin-top: 20rpx; margin-top: 20rpx;
width: 335rpx;
box-shadow:0 3rpx 7rpx 0 rgba(153, 153, 153, 0.35);
padding-bottom: 20rpx;
border-radius: 20rpx; border-radius: 20rpx;
overflow: hidden; overflow: hidden;
box-shadow:0 3rpx 7rpx 0 rgba(153, 153, 153, 0.35);
.head{ .head{
width: 100%; width: 330rpx;
height: 334rpx; height: 330rpx !important;
} }
.title{ .title{
margin:0 auto; margin:0 auto;

View File

@ -3,7 +3,9 @@
<view class="status_bar"></view> <view class="status_bar"></view>
<view class="index"> <view class="index">
<view class="top"> <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"> <view class="tabs">
<u-tabs :is-scroll="false" bar-width="70" ref="tabs" :list="list" :current="num" :bar-style="{ <u-tabs :is-scroll="false" bar-width="70" ref="tabs" :list="list" :current="num" :bar-style="{
'background-color':'#FF780F', 'background-color':'#FF780F',
@ -93,18 +95,17 @@
height: 100vh; height: 100vh;
.top { .top {
padding: 0 30rpx;
display: flex; display: flex;
flex-shrink: 0;
align-items: center;
justify-content: space-between; justify-content: space-between;
width: 100%; width: 100%;
height: 88rpx; height: 88rpx;
align-items: center; padding: 0 30rpx;
flex-shrink: 0;
.sosuo { .sosuo {
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
} }
.tabs { .tabs {
@ -122,6 +123,7 @@
.box { .box {
width: 100%; width: 100%;
height: 100%;
padding: 0 30rpx; padding: 0 30rpx;
} }
@ -191,6 +193,7 @@
} }
</style> </style>
<script> <script>
import { mapState } from 'vuex'
import videoItem from "@/components/index/video-item/index" import videoItem from "@/components/index/video-item/index"
import zhiboItem from "@/components/index/zhibo-item/index" import zhiboItem from "@/components/index/zhibo-item/index"
import indexad from "@/components/index/ad/index" import indexad from "@/components/index/ad/index"
@ -198,6 +201,9 @@
export default { export default {
name: "index", name: "index",
computed: {
...mapState(["hasLogin"])
},
data() { data() {
return { return {
list: [{ list: [{
@ -225,18 +231,14 @@
}, },
onShow() { onShow() {
this.getArticlelist(); this.getArticlelist();
this.getRecommendList();
this.getSwiper(); this.getSwiper();
this.getZhiBoSwiper();
this.tabLiveList();
this.getFollowList();
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.getArticlelist(); this.getArticlelist();
// this.getManicureList({ load: 'reload' }); // this.getManicureList({ load: 'reload' });
}, },
methods: { methods: {
// //
tabLiveList() { tabLiveList() {
this.$u.api.tabLiveList().then((res) => { this.$u.api.tabLiveList().then((res) => {
console.log(res) console.log(res)
@ -272,12 +274,25 @@
}, },
// //
dianji(a) { dianji(a) {
console.log(a); // console.log(a);
if (typeof a == "object") { if (typeof a == "object") {
this.num = a.detail.current this.num = a.detail.current
} else { } else {
this.num = a 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() { getArticlelist() {
@ -295,7 +310,7 @@
// //
getRecommendList() { getRecommendList() {
this.$u.api.getRecommendList().then(res => { this.$u.api.getRecommendList().then(res => {
console.log(res) console.log(res);
if (res.errCode == 0) { if (res.errCode == 0) {
this.recommendList = res.data.list; this.recommendList = res.data.list;
} }
@ -313,7 +328,6 @@
}) })
}, },
toSearchPage() { toSearchPage() {
console.log("22");
uni.navigateTo({ uni.navigateTo({
url: '/pageB/follow/index' url: '/pageB/follow/index'
}); });
@ -354,6 +368,9 @@
params: params params: params
}) })
}, },
goSearch() {
this.$u.route("/pageB/search/index");
}
}, },
} }
</script> </script>

View File

@ -152,10 +152,6 @@ export default {
} }
this.getUserInfo(); this.getUserInfo();
}, },
//
onPullDownRefresh() {
this.getUserInfo();
},
onNavigationBarButtonTap() { onNavigationBarButtonTap() {
this.toOtherPage("/setting/Index"); this.toOtherPage("/setting/Index");
}, },

View File

@ -48,8 +48,11 @@
<view class="activity-view"> <view class="activity-view">
<image class="lingquan" :src="activityInfo.adv_code" @click="activityLink({ type: activityInfo.url_type, id: activityInfo.info_id })"></image> <image class="lingquan" :src="activityInfo.adv_code" @click="activityLink({ type: activityInfo.url_type, id: activityInfo.info_id })"></image>
</view> </view>
<!-- 优惠券 -->
<youhq></youhq> <youhq></youhq>
<!-- 商品列表 -->
<list ref="recommendGoods"></list> <list ref="recommendGoods"></list>
<!-- 购物车 -->
<view class="cart" @click="toCartPage"> <view class="cart" @click="toCartPage">
<image src="/static/image/common/3.png"></image> <image src="/static/image/common/3.png"></image>
</view> </view>