upgrade 8.4

This commit is contained in:
ghusermoon 2020-08-04 21:13:47 +08:00
parent fe9a54987e
commit 5343196342
5 changed files with 185 additions and 174 deletions

View File

@ -93,8 +93,8 @@ export default {
}, },
setSwiperHeight() { setSwiperHeight() {
// height: 230px, margin-bottom: 13 // height: 230px, margin-bottom: 13
const height = Math.ceil(this.goodsList.length / 2) * (230 + 13); const height = Math.ceil(this.goodsList.length / 2) * (510 + 26);
this.swiperHeight = height == 0 ? '230px' : height + 'px'; this.swiperHeight = height == 0 ? '230rpx' : height + 'rpx';
}, },
// tabsswiper // tabsswiper
tabsChange(index) { tabsChange(index) {

View File

@ -44,6 +44,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.item{ .item{
width: 330rpx; width: 330rpx;
height: 510rpx;
margin-bottom: 26rpx; margin-bottom: 26rpx;
background-color: #f8f8f8; background-color: #f8f8f8;
border-radius: 10rpx 10rpx 0rpx 0rpx; border-radius: 10rpx 10rpx 0rpx 0rpx;

View File

@ -1,20 +1,23 @@
<template> <template>
<view class="collection"> <view class="collection">
<view class="item-box" v-for="(item, index) in articleList" :key="index"> <view class="container">
<view class="item-box" v-for="(item, index) in articleList" :key="index" @click="toDetailsPage(item.article_id)">
<view class="video-item" v-if="item"> <view class="video-item" v-if="item">
<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"></view> <view class="backes"></view>
<image class="head" :src="item.article_pic" @click="toDetailsPage(item.article_id)"></image> <image class="head" :src="item.article_pic"></image>
</view> </view>
<view class="title">{{ item.article_title }}</view> <view class="title u-line-1">{{ item.article_title }}</view>
<view class="jianjie">{{ item.article_content }}</view> <view class="jianjie u-line-1">{{ item.article_content }}</view>
<view class="user"> <view class="user">
<view class="info"> <view class="info">
<image :src="item.member_avatar"></image> <image :src="item.member_avatar"></image>
<text>{{ item.member_nickname }}</text> <text>{{ item.member_nickname }}</text>
</view> </view>
<u-icon name="trash" color="#333" size="36" @click="delArticle(item.article_id)"></u-icon> <view @click.stop="delArticle(item.article_id)">
<u-icon name="trash" color="#333" size="36"></u-icon>
</view>
<!-- <image src="/static/image/common/4.png" @click.stop="showAction(item)"></image> --> <!-- <image src="/static/image/common/4.png" @click.stop="showAction(item)"></image> -->
<!-- <view class="action" v-if="show == item.article_id"> <!-- <view class="action" v-if="show == item.article_id">
<view class="bubble"> <view class="bubble">
@ -28,7 +31,8 @@
</view> </view>
</view> </view>
</view> </view>
<u-empty mode="list" v-if="!articleList.length" color="#000" img-width="200" font-size="30" style="margin: 20vh auto 0;"></u-empty> </view>
<u-empty mode="list" v-if="!articleList.length" color="#000" img-width="200" font-size="30" margin-top="120"></u-empty>
</view> </view>
</template> </template>
<script> <script>
@ -79,6 +83,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.collection { .collection {
.container {
border-top: 1rpx solid #ECECEC; border-top: 1rpx solid #ECECEC;
padding: 21rpx 30rpx 0; padding: 21rpx 30rpx 0;
display: flex; display: flex;
@ -107,14 +112,9 @@ export default {
font-weight: 500; font-weight: 500;
line-height: 30rpx; line-height: 30rpx;
width: 300rpx; width: 300rpx;
overflow:hidden;
text-overflow:ellipsis;
display:-webkit-box;
-webkit-box-orient:vertical;
-webkit-line-clamp:2;
} }
.jianjie{ .jianjie{
height: 60rpx; // height: 60rpx;
margin:0 auto; margin:0 auto;
margin-top: 20rpx; margin-top: 20rpx;
font-size: 22rpx; font-size: 22rpx;
@ -122,11 +122,6 @@ export default {
line-height: 30rpx; line-height: 30rpx;
width: 300rpx; width: 300rpx;
margin-left: 18rpx; margin-left: 18rpx;
overflow:hidden;
text-overflow:ellipsis;
display:-webkit-box;
-webkit-box-orient:vertical;
-webkit-line-clamp:2;
} }
.user{ .user{
display: flex; display: flex;
@ -235,4 +230,5 @@ export default {
} }
} }
} }
}
</style> </style>

View File

@ -2,16 +2,14 @@
<view class="concerns"> <view class="concerns">
<view class="concerns-container"> <view class="concerns-container">
<view v-for="(info, index) in list" :key="index"> <view v-for="(info, index) in list" :key="index">
<view class="daren-item" @click="toDetailsPage"> <view class="daren-item">
<image class="head" :src="info.friend_tomavatar"></image> <image class="head" :src="info.friend_tomavatar"></image>
<text class="name">{{ info.friend_tomname }}</text> <text class="name">{{ info.friend_tomname || '' }}</text>
<!-- <text class="zhuangtai">状态: {{ info.live_status == 1 ? '正在直播' : '未开播' }}</text> --> <view class="guanzhu" @click="changeType(info.friend_tomid)" v-if="info.friend_followstate == 1">取消关注</view>
<view class="guanzhu" @click="changeType(info.friend_frommid)" v-if="info.friend_followstate == 1">关注</view>
<view class="guanzhu action" @click="changeType(info.friend_frommid)" v-else>未关注</view>
</view> </view>
</view> </view>
<u-empty mode="list" v-if="!list.length" color="#000" img-width="200" font-size="30" style="margin: 20vh auto 0;"></u-empty>
</view> </view>
<u-empty mode="list" v-if="!list.length" color="#000" img-width="200" font-size="30" margin-top="120"></u-empty>
</view> </view>
</template> </template>
<script> <script>
@ -23,17 +21,31 @@ export default {
}, },
onShow() { onShow() {
this.attentionMemberList(); this.attentionMemberList();
},
//
onPullDownRefresh() {
this.attentionMemberList();
}, },
methods: { methods: {
attentionMemberList() { attentionMemberList() {
this.$u.api.attentionMemberList().then(res => { this.$u.api.attentionMemberList().then(res => {
uni.stopPullDownRefresh();
if(res.errCode == 0) { if(res.errCode == 0) {
this.list = res.data; this.list = res.data;
} else { } else {
this.list = []; this.list = [];
} }
}) })
} },
changeType(id) {
console.log(id);
this.$u.api.attentionMember({
member_id: id
}).then(res => {
this.$u.toast(res.message);
this.attentionMemberList();
})
},
}, },
}; };
</script> </script>
@ -76,7 +88,7 @@ export default {
.guanzhu{ .guanzhu{
width: 130rpx; width: 130rpx;
height: 50rpx; height: 50rpx;
background-color: #FF780F; background-color: #EDEDED;
font-size: 26rpx; font-size: 26rpx;
line-height: 50rpx; line-height: 50rpx;
color: #fff; color: #fff;

View File

@ -19,14 +19,14 @@
<view class="member-service" @click="toOtherPage('/mine/MemberServe')">会员服务</view> <view class="member-service" @click="toOtherPage('/mine/MemberServe')">会员服务</view>
</view> </view>
<view class="bottom"> <view class="bottom">
<view @click="toOtherPage('/mine/GoodsCollection')"> <!-- <view @click="toOtherPage('/mine/GoodsCollection')">
<view>{{ userInfo.member_fav_goods_num || 0 }}</view> <view>{{ userInfo.member_fav_goods_num || 0 }}</view>
<view>商品收藏</view> <view>商品收藏</view>
</view> </view>
<view @click="toOtherPage('/mine/StoreCollection')"> <view @click="toOtherPage('/mine/StoreCollection')">
<view>{{ userInfo.member_fav_store_num || 0 }}</view> <view>{{ userInfo.member_fav_store_num || 0 }}</view>
<view>店铺收藏</view> <view>店铺收藏</view>
</view> </view> -->
<view @click="toOtherPage('/mine/ImageTextCollection')"> <view @click="toOtherPage('/mine/ImageTextCollection')">
<view>{{ userInfo.member_fav_article_num || 0 }}</view> <view>{{ userInfo.member_fav_article_num || 0 }}</view>
<view>图文收藏</view> <view>图文收藏</view>
@ -248,8 +248,10 @@ export default {
box-sizing: border-box; box-sizing: border-box;
padding: 0 30rpx; padding: 0 30rpx;
display: flex; display: flex;
justify-content: space-between; // justify-content: space-between;
justify-content: flex-start;
> view { > view {
margin-right: 80rpx;
text-align: center; text-align: center;
font-size: 24rpx; font-size: 24rpx;
color:rgba(51,51,51,1); color:rgba(51,51,51,1);