api
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<view class="video-item" v-if="item">
|
||||
<image class="head" :src="item.article_pic"></image>
|
||||
<view class="title" v-if="!isguanzhu">{{ item.article_title }}</view>
|
||||
<view class="jianjie">这是简介这是简介这是简介</view>
|
||||
<view class="jianjie">{{ item.article_content }}</view>
|
||||
<view class="user">
|
||||
<view class="info">
|
||||
<image :src="item.member_avatar"></image>
|
||||
@@ -11,17 +11,17 @@
|
||||
<image src="/static/image/common/4.png" @click="showAction"></image>
|
||||
<view class="action" v-if="show == item.article_id">
|
||||
<view class="bubble">
|
||||
<view>
|
||||
<view @click="articleLike">
|
||||
<image src="/static/image/common/5.png" v-if="item.is_like == 0"></image>
|
||||
<image src="/static/image/common/8.png" v-else></image>
|
||||
<text>点赞</text>
|
||||
</view>
|
||||
<view>
|
||||
<view @click="articleCollect">
|
||||
<image src="/static/image/common/6.png" v-if="item.is_collect == 0"></image>
|
||||
<image src="/static/image/common/9.png" v-else></image>
|
||||
<text>收藏</text>
|
||||
</view>
|
||||
<view>
|
||||
<view @click="articleAddShield">
|
||||
<image src="/static/image/common/7.png"></image>
|
||||
<text>屏蔽用户</text>
|
||||
</view>
|
||||
@@ -70,7 +70,6 @@
|
||||
display:-webkit-box;
|
||||
-webkit-box-orient:vertical;
|
||||
-webkit-line-clamp:2;
|
||||
|
||||
}
|
||||
.user{
|
||||
display: flex;
|
||||
@@ -182,7 +181,35 @@ export default {
|
||||
methods: {
|
||||
showAction() {
|
||||
this.show = this.show > 0 ? -1 : this.item.article_id;
|
||||
}
|
||||
},
|
||||
articleLike() {
|
||||
this.$u.api.articleLike({
|
||||
article_id: this.item.article_id,
|
||||
}).then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.$emit("getArticlelist");
|
||||
}
|
||||
})
|
||||
},
|
||||
articleCollect() {
|
||||
this.$u.api.articleCollect({
|
||||
article_id: this.item.article_id,
|
||||
}).then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.$emit("getArticlelist");
|
||||
}
|
||||
})
|
||||
},
|
||||
articleAddShield() {
|
||||
this.$u.api.articleAddShield({
|
||||
article_id: this.item.article_id,
|
||||
member_id: this.item.member_id,
|
||||
}).then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.$emit("getArticlelist");
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user