Merge pull request 'zmr' (#66) from zmr into master

Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/66
This commit was merged in pull request #66.
This commit is contained in:
2020-07-17 08:42:58 +08:00
4 changed files with 270 additions and 233 deletions

View File

@@ -1,6 +1,10 @@
<template>
<view class="video-item" v-if="item" @click="toDetailsPage">
<image class="head" :src="item.article_pic"></image>
<image class="head" :src="item.article_pic" v-if="item.type == 1" ></image>
<view class="header_fist" v-else>
<view class="backes">111</view>
<image class="head" :src="item.article_pic" ></image>
</view>
<view class="title" v-if="!isguanzhu">{{ item.article_title }}</view>
<view class="jianjie">{{ item.article_content }}</view>
<view class="user">
@@ -163,6 +167,16 @@
background-color: transparent;
}
}
.header_fist{
position: relative;
.backes{
position: absolute;
top: 0;
background: #000000;
width: 100%;
height: 100%;
}
}
}
</style>
<script>
@@ -186,6 +200,7 @@ export default {
this.$u.api.articleLike({
article_id: this.item.article_id,
}).then(res => {
console.log(res)
if(res.errCode == 0) {
this.$emit("getArticlelist");
}
@@ -195,6 +210,7 @@ export default {
this.$u.api.articleCollect({
article_id: this.item.article_id,
}).then(res => {
console.log(res)
if(res.errCode == 0) {
this.$emit("getArticlelist");
}
@@ -205,12 +221,16 @@ export default {
article_id: this.item.article_id,
member_id: this.item.member_id,
}).then(res => {
console.log(res)
if(res.errCode == 0) {
this.$emit("getArticlelist");
}
})
},
toDetailsPage() {
uni.navigateTo({
url: '/pageB/photo/index',
});
},
},