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

This commit is contained in:
2020-07-20 17:30:36 +08:00
17 changed files with 520 additions and 64 deletions

View File

@@ -4,7 +4,7 @@
<text class="name">{{ info.member_nickname }}</text>
<text class="zhuangtai">状态: {{ info.live_status == 1 ? '正在直播' : '未开播' }}</text>
<view class="guanzhu" @tap="changeType(info.member_id)" v-if="info.is_attention == 1">关注</view>
<view class="guanzhu" @tap="changeType(info.member_id)" v-else>未关注</view>
<view class="guanzhu action" @tap="changeType(info.member_id)" v-else >未关注</view>
</view>
</template>
<script>
@@ -32,6 +32,7 @@ export default {
// })
},
changeType:function(type){
console.log("111")
this.$emit("pChangeType",type)
},
@@ -77,5 +78,8 @@ export default {
margin-top: 19rpx;
border-radius: 25rpx;
}
.action{
background: #f3f3f3;
}
}
</style>

View File

@@ -2,7 +2,7 @@
<view class="video-item" v-if="item" @click="toDetailsPage(item.article_id)">
<image class="head" :src="item.article_pic" v-if="item.type == 1" ></image>
<view class="header_fist" v-else>
<view class="backes">111</view>
<view class="backes"></view>
<image class="head" :src="item.article_pic" ></image>
</view>
<view class="title" v-if="!isguanzhu">{{ item.article_title }}</view>
@@ -172,7 +172,7 @@
.backes{
position: absolute;
top: 0;
background: #000000;
background: rgba(0,0,0,0.6);
width: 100%;
height: 100%;
color: #fff;

View File

@@ -26,7 +26,6 @@
/**
* coupon 领取的优惠券 自己的优惠券
* @description 优惠券组件
* @property {Number} type 优惠券操作方式(可兑换的优惠券: 0 / 自己的优惠券: 1)
* @property {Object} coupon-info 优惠券信息
* @event {Function} use 使用优惠券
*/
@@ -36,20 +35,18 @@ export default {
},
props: {
status: Number,
type: Number,
couponInfo: Object,
goodsClass: Array,
},
created() {
// console.log(this.couponInfo);
// this.getGoodsClass();
},
filters: {
showClass(value, classList) {
const ids = classList.filter(element => {
return element.gc_id == value;
});
console.log(ids);
// console.log(ids);
return ids.length ? ids[0].gc_name : '';
}
},

View File

@@ -5,16 +5,15 @@
<text>查看更多></text>
</view>
<view class="label">
<text>sda</text>
<text>asda</text>
<text>dsad</text>
<text>asdas</text>
</view>
<view class="list">
<sitem></sitem>
<sitem></sitem>
<sitem></sitem>
<u-tabs-swiper ref="group" :list="classifyList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="current" font-size="24" :show-bar="false" @change="tabsChange" height="88" ></u-tabs-swiper>
</view>
<swiper :current="swiperCurrent" @animationfinish="animationfinish" style="height: 130px">
<swiper-item class="swiper-item" v-for="(_, i) in classifyList" :key="i">
<!-- 最多显示3个 -->
<sitem :info="info" v-for="(info, index) in groupList.slice(0, 3)" :key="index"></sitem>
<u-empty text="暂无拼团商品" mode="list" color="#000" v-if="!groupList.length"></u-empty>
</swiper-item>
</swiper>
</view>
</template>
<script>
@@ -23,12 +22,27 @@ export default {
name:"group",
components:{
sitem
},
},
props: {
groupList: Array,
classifyList: Array,
},
data(){
return {
current: 0,
swiperCurrent: 0,
}
}
},
methods: {
tabsChange(index) {
this.swiperCurrent = index;
},
animationfinish(e) {
let current = e.detail.current;
this.swiperCurrent = current;
this.current = current;
},
}
}
</script>
<style lang="scss" scoped>

View File

@@ -1,17 +1,19 @@
<template>
<view class="item">
<image class="head"></image>
<text class="title">商品名</text>
<image class="head" :src="info.pintuan_image"></image>
<text class="title u-line-1">{{ info.pintuan_goods_name }}</text>
<view class="price">
<text>99</text>
<text>立即购买</text>
<text>{{ info.pintuan_goods_price }}</text>
<text>立即购买</text>
</view>
</view>
</template>
<script>
export default {
name:"item"
name:"item",
props: {
info: Object
}
}
</script>
<style lang="scss" scoped>
@@ -24,6 +26,8 @@ export default {
}
.title{
display: inline-block;
width: 100%;
font-size: 26rpx;
color: #333;
margin-top: 16rpx;

View File

@@ -0,0 +1,155 @@
<template>
<view class="recommend">
<view class="top">
<text>今日拼团推荐</text>
<text @click="toDetailsPage">点击查看更多></text>
</view>
<view class="connect">
<view class="user">
<view class="avatar">
<image :src="info.member_avatar[0]"></image>
<image :src="info.member_avatar[1]"></image>
</view>
<view class="num">{{ info.pintuan_limit_number }}人团</view>
</view>
<view class="info">
<text class="u-line-1">{{ info.groupbuy_name }}</text>
<text class="u-line-2">{{ info.goods_name }}</text>
<view>
<text>{{ info.groupbuy_price }}</text>
<text>{{ info.goods_price }}</text>
</view>
</view>
<image class="img" :src="info.groupbuy_image1"></image>
</view>
</view>
</template>
<script>
export default {
name:"recommend",
data() {
return {
info: {}
}
},
props: ['recommendData', 'type'],
created() {
this.info = this.recommendData;
console.log(this.recommendData);
},
methods: {
toDetailsPage() {
this.$u.api.getPinTuanDetails({
pintuan_id: this.recommendData.pintuan_id
}).then(res => {
if(res.errCode == 0) {
const goods = {
goods: res.data.data,
type: 2,
}
this.$store.commit('setGoodsDetails', goods);
this.$u.route({
url: 'pageB/sdetails/index',
params: {
id: this.recommendData.pintuan_id
}
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.recommend{
.top{
height: 90rpx;
display: flex;
align-items: center;
justify-content: space-between;
>text:first-child{
font-size: 30rpx;
color: #333;
}
>text:last-child{
font-size: 18rpx;
color: #999;
}
}
.connect{
display: flex;
align-items: center;
.user {
margin-right: 16px;
.avatar {
width: 96rpx;
height: 64rpx;
margin-bottom: 16rpx;
position: relative;
> image {
position: absolute;
width: 64rpx;
height: 64rpx;
border-radius: 50%;
&:first-child {
left: 0;
top: 0;
z-index: 8;
background-color: aqua;
}
&:last-child {
left: 32rpx;
top: 0;
z-index: 9;
background-color: antiquewhite;
}
}
}
.num {
text-align: center;
font-size: 28rpx;
font-weight: 500;
color: rgba(253,211,96,1);
}
}
.info{
width: 340rpx;
display: flex;
flex-direction: column;
>text:nth-child(1){
font-size: 28rpx;
color: #333;
}
>text:nth-child(2){
margin-top: 17rpx;
line-height: 36rpx;
font-size: 24rpx;
color: #666;
}
>view{
margin-top: 24rpx;
display: flex;
align-items: flex-end;
>text:first-child{
font-size: 27rpx;
color: #FF3131;
}
>text:last-child{
font-size: 24rpx;
color: #999;
margin-left: 33rpx;
text-decoration: line-through;
}
}
}
.img{
width: 213rpx;
height: 160rpx;
flex-shrink: 0;
margin-left: 13rpx;
background-color: antiquewhite;
}
}
}
</style>

View File

@@ -74,7 +74,10 @@ export default {
},
setViewHeight() {
// 一个优惠券的高度 97px, 下距离 10px
const num = this.couponList.length;
let num = 0;
num = this.couponList.length
? this.couponList.length > 4 ? 4 : this.couponList.length
: 1
this.swiperHeight = (97 + 10) * num - 10 + 'px';
},
toCouponPage() {