xbx #75

Merged
theluyuan merged 8 commits from xbx into master 2020-07-21 13:04:02 +00:00
4 changed files with 35 additions and 13 deletions
Showing only changes of commit 4c70db7575 - Show all commits

View File

@ -239,7 +239,11 @@ export default {
}, },
// 获取直播列表 // 获取直播列表
tabLiveList(){ tabLiveList(){
return vm.$u.post('api/Specialci/tabLiveList') return vm.$u.post('Specialci/tabLiveList')
},
// 获取图文视频详情
articleInfo({article_id}){
return vm.$u.post('article/articleInfo',{article_id})
} }
} }
} }

View File

@ -1,5 +1,5 @@
<template> <template>
<view class="video-item" v-if="item" @click="toDetailsPage"> <view class="video-item" v-if="item" @click="toDetailsPage(item.article_id)">
<image class="head" :src="item.article_pic" v-if="item.type == 1" ></image> <image class="head" :src="item.article_pic" v-if="item.type == 1" ></image>
<view class="header_fist" v-else> <view class="header_fist" v-else>
<view class="backes">111</view> <view class="backes">111</view>
@ -227,9 +227,9 @@ export default {
} }
}) })
}, },
toDetailsPage() { toDetailsPage(id) {
uni.navigateTo({ uni.navigateTo({
url: '/pageB/photo/index', url: '/pageB/photo/index?id=' + id
}); });
}, },

View File

@ -1,20 +1,20 @@
<template> <template>
<view class="userinfo"> <view class="userinfo">
<view class="userhead"> <view class="userhead">
<image></image> <image :src="list.member_avatar"></image>
<text>+</text> <text>+</text>
</view> </view>
<view class="zan"> <view class="zan">
<image></image> <image></image>
<text>123</text> <text>{{list.like_num}}</text>
</view> </view>
<view class="shoucang"> <view class="shoucang">
<image></image> <image></image>
<text>123</text> <text>{{list.collect_num}}</text>
</view> </view>
<view class="pinglun"> <view class="pinglun">
<image></image> <image></image>
<text>123</text> <text>{{list.comment_num}}</text>
</view> </view>
<view class="gouwu"> <view class="gouwu">
<image></image> <image></image>
@ -78,6 +78,7 @@ export default {
return { return {
} }
} },
props:['list']
} }
</script> </script>

View File

@ -5,11 +5,11 @@
</view> </view>
<swiper class="swiper"> <swiper class="swiper">
<swiper-item> <swiper-item>
<image></image> <image :src="list.article_pic"></image>
</swiper-item> </swiper-item>
<swiper-item> <!-- <swiper-item>
<image></image> <image></image>
</swiper-item> </swiper-item> -->
</swiper> </swiper>
<view class="bottom"> <view class="bottom">
@ -21,7 +21,7 @@
<view class="title">hasjdhajskhj</view> <view class="title">hasjdhajskhj</view>
<view class="info u-line-2">asdjhasjdkasljdklasjkl</view> <view class="info u-line-2">asdjhasjdkasljdklasjkl</view>
</view> </view>
<userinfo class="userinfo"></userinfo> <userinfo class="userinfo" :list="list"></userinfo>
<shpoone class="shpoone"></shpoone> <shpoone class="shpoone"></shpoone>
<shoplist></shoplist> <shoplist></shoplist>
</view> </view>
@ -117,6 +117,23 @@ export default {
userinfo, userinfo,
shpoone, shpoone,
shoplist shoplist
},
data(){
return {
list:{}
}
},
methods:{
articleInfo(article_id){
this.$u.api.articleInfo({article_id}).then((res)=>{
console.log(res)
this.list = res.data.info
})
}
},
onLoad(o){
this.id = o.id
this.articleInfo(this.id)
} }
} }
</script> </script>