This commit is contained in:
2020-06-30 18:06:50 +08:00
parent c7136c2c11
commit dc69746320
21 changed files with 471 additions and 1315 deletions

View File

@@ -1,14 +1,17 @@
<template>
<view class="daren-item">
<image class="head"></image>
<text class="name">这是名字</text>
<text class="zhuangtai">直播状态</text>
<image class="head" :src="info.member_avatar"></image>
<text class="name">{{ info.member_nickname }}</text>
<text class="zhuangtai">状态: {{ info.live_status == 1 ? '正在直播' : '未开播' }}</text>
<view class="guanzhu">关注</view>
</view>
</template>
<script>
export default {
name:"daren-item"
name:"daren-item",
props: {
info: Object,
}
}
</script>
<style lang="scss" scoped>

View File

@@ -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>

View File

@@ -121,7 +121,12 @@ export default {
this.$refs.uToast.show({
title: res.message,
type: 'success',
url: '/pageE/more/Address'
// url: '/pageE/more/Address',
callback() {
uni.redirectTo({
url: '/pageE/more/Address'
});
}
})
} else {
this.showToast(res.message, 'warning');
@@ -146,7 +151,12 @@ export default {
this.$refs.uToast.show({
title: res.message,
type: 'success',
url: '/pageE/more/Address'
// url: '/pageE/more/Address',
callback() {
uni.redirectTo({
url: '/pageE/more/Address'
});
}
})
} else {
this.showToast(res.message, 'warning');

View File

@@ -54,6 +54,7 @@ export default {
methods: {
editAddress() {
this.$u.route({
type: 'redirect',
url: '/pageE/more/EditAddress',
params: {
item: JSON.stringify(this.item)
@@ -69,7 +70,7 @@ export default {
this.showToast(res.message, 'success');
this.$emit('getAddressList');
} else {
this.showToast(res.message, 'warning');
this.showToast(res.message, 'error');
}
})
},

View File

@@ -1,12 +1,15 @@
<template>
<view class="shop-item">
<image></image>
<text>1</text>
<image :src="info.goodscn_pic"></image>
<text class="u-line-1">{{ info.gc_name }}</text>
</view>
</template>
<script>
export default {
name:"shopItem",
props: {
info: Object,
}
}
</script>
<style lang="scss" scoped>
@@ -18,9 +21,9 @@ export default {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
}
>text{
width: 80rpx;
font-size: 24rpx;
color: #333;
margin-top: 14rpx;