Merge branch 'master' of http://git.luyuan.tk/luyuan/deming into xbx

This commit is contained in:
2020-08-20 11:09:49 +08:00
38 changed files with 549 additions and 320 deletions

View File

@@ -39,7 +39,7 @@
</scroll-view>
</swiper-item>
<swiper-item>
<scroll-view style="width:100%;height:100%" scroll-y="true" @scrolltolower="swiperBottom" :refresher-enabled="true" @refresherrefresh="dianji(1)" :refresher-triggered="refresher" @refresherpulling="onPulling"
<scroll-view style="width:100%;height:100%" scroll-y="true" @scrolltolower="swiperBottomLive(e)" :refresher-enabled="true" @refresherrefresh="dianji(1)" :refresher-triggered="refresher" @refresherpulling="onPulling"
@refresherrestore="onRestore" @refresherabort="onAbort">
<view class="box">
<u-swiper mode="dot" :list="zhiboImageSwiper" name="adv_code" @click="clickSImage($event, 2)"></u-swiper>
@@ -222,6 +222,7 @@
</style>
<script>
import common from '@/static/js/common.js';
import { mapState } from 'vuex'
import videoItem from "@/components/index/video-item/index"
import zhiboItem from "@/components/index/zhibo-item/index"
@@ -271,9 +272,6 @@
darenItem
},
onShow() {
this.page = 1;
if (this.page != 1) {
}
console.log(this.imService.status)
if(!this.imService.status && this.$store.state.hasLogin){
const user = uni.getStorageSync('user_info');
@@ -305,17 +303,15 @@
// that.imService.connectIM()
// },2000)
// }
// if (this.hasLogin) {
// this.isNewmembervoucher();
// }
// 新人优惠券
if (this.$store.state.showCoupons) {
this.isNewmembervoucher();
}
},
async onLoad(){
this.articleList = [];
this.getArticlelist();
this.getSwiper();
this.isNewmembervoucher();
// 优惠券
// if(this.$store.state.hasLogin){
// const user = uni.getStorageSync('user_info');
@@ -420,7 +416,7 @@
console.log(a);
if (a.type == "change") {
this.num = a.detail.current
this.num = a.detail.current;
} else {
this.num = a;
}
@@ -430,16 +426,18 @@
if (this.num == 0) {
this.page = 1;
this.articleList = [];
this.status = "loadmore";
this.status = "nomore";
this.getArticlelist();
this.getSwiper();
} else if (this.num == 1) {
this.live_page = 1;
this.status_live = "nomore";
this.getZhiBoSwiper(); // 直播轮播
this.tabLiveList();
} else if (this.num == 2) {
this.follow_page = 0;
this.fansList = [];
this.status_1 = "nomore";
if (this.hasLogin) {
this.getFollowList(); // 关注列表
}
@@ -466,9 +464,9 @@
} else {
this.articleList = this.articleList.concat(res.data.list);
}
this.page++;
}
})
console.log(this.page);
},
// 屏蔽更新列表
updateList() {
@@ -479,12 +477,11 @@
},
// 发现下拉加载
swiperBottom(e) {
if(this.num == 0){
this.getArticlelist();
}else if(this.num == 1){
this.tabLiveList();
}
// console.log(e);
this.page++;
this.getArticlelist();
},
swiperBottomLive() {
this.tabLiveList();
},
swiperTop() {
// uni.startPullDownRefresh();
@@ -536,40 +533,20 @@
},
clickFImage(index) {
const item = this.indexImageSwiper[index];
console.log(item);
this.activityLink({
// console.log(item);
this.jumpPage({
type: item.url_type,
id: item.info_id
id: item.info_id,
});
},
clickSImage(index) {
const item = this.zhiboImageSwiper[index];
console.log(item);
this.activityLink({
// console.log(item);
this.jumpPage({
type: item.url_type,
id: item.info_id
id: item.info_id,
});
},
activityLink({
type,
id
}) {
console.log(type,id);
if (type == 0) return false;
// type 1 商品详情页, 2 店铺详情页
const url = type == 1 ? 'pageB/sdetails/index' : 'pageC/merchant/index';
let params = {
id: id
};
// type: 1 // 商品详情 1普通 2拼团 3秒杀 4优惠券
if (type == 1) Object.assign(params, {
type: 1
});
this.$u.route({
url: url,
params: params
})
},
goSearch() {
this.$u.route("/pageB/search/index", {
type: 2,
@@ -578,6 +555,7 @@
},
// 是否显示新人优惠券
isNewmembervoucher() {
this.$store.commit('updateShowCoupons', false);
this.$u.api.isNewmembervoucher().then(res => {
if(res.errCode == 0) {
this.$u.route('/pageB/coupon/index');
@@ -593,7 +571,11 @@
},
onAbort() {
console.log("onAbort");
}
},
jumpPage(uri) {
// console.log(uri);
common.jumpPage({ type: uri.type, id: uri.id });
}
},
}
</script>