You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
2.6 KiB

5 years ago
<template>
<view>
5 years ago
<view class="flex flex-direction" style="height: 100vh;">
<view class="flex justify-between bg-white">
<!-- <view class="flex flex-direction justify-center mine align-center" style="width: 90rpx;" v-if="showMybtn" @tap="toMyHomePage">
<text class="cuIcon-my" style="font-size: 48rpx;color: #888888;"></text>
</view> -->
<view class="flex-sub">
<u-tabs :list="list" :is-scroll="false" height="90" :current="currentIndex" duration="0.2" bar-width="100" :bold="false" active-color="red" @change="chooseTabs"></u-tabs>
</view>
5 years ago
</view>
5 years ago
<swiper class="flex-sub" :current="currentIndex" :duration="300" :indicator-dots="false" :autoplay="false" @change="changeCurrent">
<!-- 直播回放列表 -->
<!-- <swiper-item>
<live-videos></live-videos>
</swiper-item> -->
<!-- 小视频列表 -->
4 years ago
<!-- <swiper-item>
5 years ago
<small-videos></small-videos>
4 years ago
</swiper-item> -->
5 years ago
<!-- 图文动态列表 -->
<swiper-item>
<dynamics :showGoodsLink="true"></dynamics>
</swiper-item>
</swiper>
5 years ago
</view>
</view>
</template>
<script>
5 years ago
import liveVideos from 'components/liveVideos.vue'
import smallVideos from 'components/smallVideos.vue'
import dynamics from 'components/dynamics.vue'
5 years ago
export default {
data() {
return {
5 years ago
showMybtn:false,
4 years ago
currentIndex:0,
list: [
// {
// name: '视频'
// },
{
5 years ago
name: '图文'
}]
5 years ago
};
},
5 years ago
components:{
liveVideos,
smallVideos,
dynamics
},
5 years ago
onLoad() {
5 years ago
if(uni.getStorageSync("userInfo")){
this.showMybtn = true
}
5 years ago
},
methods: {
5 years ago
toMyHomePage(){
uni.navigateTo({
url:"../userHomePage/userHomePage"
5 years ago
})
5 years ago
},
chooseTabs(index){
this.currentIndex = index
},
changeCurrent(e) {
this.currentIndex = e.detail.current
5 years ago
}
},
onShareAppMessage(res) {
5 years ago
let pages = getCurrentPages() // 获取加载的页面
let currentPage = pages[pages.length - 1] // 获取当前页面的对象
let url = currentPage.route // 当前页面url
let shareObj = {
title: "",
path: url + "?invite=" + this.$store.state.invitationNo,
imageUrl: ''
}
5 years ago
console.log(res)
5 years ago
// let goodsMsg = res.target.dataset.goods
5 years ago
if (res.from === 'button') { // 来自页面内分享按钮
5 years ago
shareObj = {
title: "我在看" + res.target.dataset.goods.name + ",快来加入吧!",
path: '/pages/goodsDetail/goodsDetail?id=' + res.target.dataset.goods.id + "&type=share&invite=" + this.$store.state.invitationNo,
imageUrl: this.IMAGE_URL + res.target.dataset.goods.mainPhotoURL
}
5 years ago
}
5 years ago
console.log(shareObj)
return shareObj
5 years ago
}
}
</script>
<style lang="scss">
</style>