Merge branch 'master' of http://git.luyuan.tk/luyuan/deming into xbx

This commit is contained in:
2020-08-07 11:41:03 +08:00
36 changed files with 391 additions and 259 deletions

View File

@@ -3,7 +3,13 @@
<view class="user">
<view class="info">
<view class="avatar">
<image :src="item.member_avatar"></image>
<image :src="item.member_avatar" mode="aspectFill"></image>
<view class="posi-type">
<view>
<u-icon name="play-right-fill" color="#fff" size="20rpx"></u-icon>
</view>
<text>正在直播</text>
</view>
</view>
<view class="box">
<view class="name">{{ item.member_nickname }}</view>
@@ -34,11 +40,39 @@
display: flex;
align-items: center;
.avatar {
position: relative;
&>image{
z-index: 99;
width: 140rpx;
height: 140rpx;
border-radius: 50%;
}
.posi-type {
z-index: 100;
position: absolute;
bottom: 0;
left: 0;
display: flex;
align-items: center;
border-radius: 30rpx;
background-color: rgba(0,0,0,0.3);
& > view {
width: 40rpx;
height: 40rpx;
flex-shrink: 0;
text-align: center;
line-height: 30rpx;
border-radius: 50%;
background-color: rgba(0,0,0,0.5);
}
& > text {
padding: 0 12rpx 0 6rpx;
color: #FF3131;
height: 40rpx;
line-height: 40rpx;
font-size: 20rpx;
}
}
}
.box {
display: flex;
@@ -68,7 +102,7 @@
border-radius: 30rpx;
}
.btn-follow {
background-color: #007AFF;
background-color: #999999;
}
.btn-unfollow {
background-color: #FF780F;

View File

@@ -36,6 +36,7 @@
box-sizing: border-box;
border-radius: 6rpx;
margin-right: 26rpx;
margin-bottom: 20rpx;
}
.xuanzhong{
border: #ff780f 1rpx solid;

View File

@@ -106,9 +106,9 @@ export default {
methods: {
// 关注
following(id) {
this.is_follow = !this.is_follow;
this.$u.api.attentionMember({member_id: id}).then(res => {
if (res.errCode == 0) {
this.is_follow = !this.is_follow;
this.$u.toast(res.message);
}
})
@@ -116,10 +116,10 @@ export default {
// 点赞
likeType(id) {
// console.log(id);
this.is_like = !this.is_like;
this.$u.post("article/articleLike",{article_id: id}).then(res => {
if (res.errCode == 0) {
// console.log(res);
this.is_like = !this.is_like;
this.list.like_num = res.data.num;
} else {
this.$u.toast(res.message);
@@ -128,10 +128,10 @@ export default {
},
// 收藏
collecting(id) {
this.is_collect = !this.is_collect;
this.$u.post("article/articleCollect",{article_id: id}).then(res => {
if (res.errCode == 0) {
// console.log(res);
this.is_collect = !this.is_collect;
this.list.collect_num = res.data.num;
} else {
this.$u.toast(res.message);

View File

@@ -515,10 +515,16 @@ export default {
},
// 发现回复列表
getReplyList(id) {
this.page_[id] = 0;
console.log(this.page_);
this.$u.post("article/articleReplyList", {id: id, page: 0}).then(res => {
this.allList[id] = res.data;
this.page_[id] = 0;
if (!this.page_[id] === 0) {
}
console.log(this.page_[id]);
this.$u.post("article/articleReplyList", {id: id, page: this.page_[id]}).then(res => {
console.log(this.page_);
if (res.errCode == 0) {
this.page_[id]++;
this.allList[id] = res.data;
}
})
},
// 预览图片
@@ -536,7 +542,6 @@ export default {
scrollBottom(e) {
this.page++;
this.getComment();
console.log(e);
},
// 跳转到商品
gotoInfo(id) {

View File

@@ -1,6 +1,6 @@
<template>
<view class="sdetails">
<u-swiper :list="list" height="500" border-radius="0" mode="dot"></u-swiper>
<u-swiper :list="list" height="500" border-radius="0" mode="dot" @click="viewImage"></u-swiper>
<view class="spike-view" v-if="type == 3">
<view class="left">
<view class="price">
@@ -22,10 +22,17 @@
<text class="store-name">{{ goodsInfo.store_name }}</text>
<text class="goods-name">{{ goodsInfo.goods_name }}</text>
</view>
<view class="pic">
<text>{{ goodsInfo.goods_price }}</text>
<s>{{ goodsInfo.goods_marketprice }}</s>
</view>
<view class="price-collect">
<view class="pic" v-if="type != 3">
<text>{{ goodsInfo.goods_price }}</text>
<s>{{ goodsInfo.goods_marketprice }}</s>
</view>
<view class="collect">
<u-icon name="star" color="#474747" size="28" v-if="1"></u-icon>
<u-icon name="star-fill" color="#FF7807" size="28" v-else></u-icon>
<text>收藏</text>
</view>
</view>
</view>
<view class="hr"></view>
<!-- <navs :value="领券"></navs> -->
@@ -135,11 +142,11 @@
</u-popup>
<!-- 普通商品 tool -->
<view class="tloos" v-if="type == 1">
<view class="navs" @click="toOthersPage('pageC/merchant/index?id=' + storeInfo.store_id)">
<view class="navs" @click="toOthersPage('pageC/merchant/index?id=' + storeInfo.store_id)" v-if="!showSpec">
<image src="/static/image/common/18.png"></image>
店铺
</view>
<view @click="customers()" class="navs" style="margin-right:30rpx">
<view class="navs" style="margin-right:30rpx" v-if="!showSpec" @click="customers()">
<image src="/static/image/common/19.png"></image>
客服
</view>
@@ -154,7 +161,7 @@
</view>
<!-- 秒杀 tool -->
<view class="spike-tool" v-if="type==3">
<view class="left">
<view class="left" v-if="!showSpec">
<view @click="toOthersPage('pageC/merchant/index?id=' + storeInfo.store_id)">
<image src="/static/image/common/18.png"></image>
<text>店铺</text>
@@ -223,7 +230,6 @@ export default {
// console.log(option);
this.type = Number(option.type);
this.id = option.id;
this.getGoodsDetails(this.id);
this.setTitle();
},
onShow() {
@@ -231,6 +237,7 @@ export default {
this.showSpec = false;
this.showGroupUser = false;
this.showInvolvementUser = false;
this.getGoodsDetails(this.id);
},
onNavigationBarButtonTap(e) {
if(e.index == 0) this.$u.route('/pageC/cart/index');
@@ -362,6 +369,7 @@ export default {
this.glist = res.data.data.spec_list;
this.user_suc = res.data.data.user_suc;
this.groupUser =res.data.data.user;
console.log(this.groupUser);
}
})
},
@@ -403,13 +411,14 @@ export default {
}
if(this.type == 2) {
if(type == 'involvement') {
// const userId = uni.getStorageSync('user_info').member.member_id;
this.$store.commit('setGroupHeadId', this.involvemenGroupInfo[0].user_id);
console.log(this.$store.state.pintuangroup_headid);
Object.assign(params, {
pintuan_id: this.id,
pintuangroup_id: this.involvemenGroupInfo[0].pintuangroup_id,
})
} else {
const userId = uni.getStorageSync('user_info').member.member_id;
this.$store.commit('setGroupHeadId', userId);
Object.assign(params, {
pintuan_id: this.id,
})
@@ -492,7 +501,18 @@ export default {
id: this.goodsInfo.goods_id
}
})
}
},
// 查看轮播图
viewImage(index) {
let arr = [];
this.list.forEach(item => {
arr.push(item.image);
})
uni.previewImage({
urls: arr,
current: arr[index]
})
}
},
}
</script>
@@ -583,18 +603,31 @@ export default {
line-height: 1.5;
}
}
.pic{
>text{
font-size: 32rpx;
color: #FF3131;
}
>s{
font-size: 26rpx;
color: #999;
display: inline-block;
margin-left: 30rpx;
}
}
.price-collect {
display: flex;
align-items: center;
justify-content: space-between;
.pic{
>text{
font-size: 32rpx;
color: #FF3131;
}
>s{
font-size: 26rpx;
color: #999;
display: inline-block;
margin-left: 30rpx;
}
}
.collect {
margin-left: auto;
display: flex;
align-items: center;
> text {
margin-left: 12rpx;
}
}
}
}
.comment {
margin-top: 20rpx;