2020-12-23 07:56:45 +00:00
< template >
< view :class ="{borderShow:isBorader}" >
< view class = "combination" v-if ="combinationList.length" >
2021-06-11 09:41:16 +00:00
< view class = "title acea-row row-between" >
< view class = "spike-bd" >
< view v-if ="assistUserList.length > 0" class="activity_pic" >
< view v -for = " ( item , index ) in assistUserList " :key ="index" class = "picture"
: style = 'index===2?"position: relative":"position: static"' >
< span class = "avatar" : style = '"background-image: url("+item+")"' > < / span >
< span v-if ="index===2 && Number(assistUserCount) > 3" class="mengceng" >
< i > · · · < / i >
< / span >
< / view >
< text class = "pic_count" > { { assistUserCount } } 人参与 < / text >
2020-12-23 07:56:45 +00:00
< / view >
2021-06-11 09:41:16 +00:00
< / view >
< navigator url = "/pages/activity/goods_combination/index" hover -class = " none "
class = "more acea-row row-center-wrapper" > GO < text class = "iconfont icon-xiangyou" > < / text > < / navigator >
2020-12-23 07:56:45 +00:00
< / view >
< view class = "conter acea-row" >
2021-06-11 09:41:16 +00:00
< scroll -view scroll -x = " true " style = "white-space: nowrap; vertical-align: middle;"
show - scrollbar = "false" >
2020-12-23 07:56:45 +00:00
< view class = "itemCon" v-for ="(item, index) in combinationList" :key="index" @click="goDetail(item)" >
< view class = "item" >
< view class = "pictrue" >
< image :src ="item.image" > < / image >
< / view >
< view class = "text lines1" >
2021-03-19 10:26:43 +00:00
< view class = "name line1" > { { item . title } } < / view >
< view class = "money" > ¥ < text class = "num" > { { item . price } } < / text > < / view >
< view class = "y_money" > ¥ { { item . otPrice } } < / view >
2020-12-23 07:56:45 +00:00
< / view >
< / view >
< / view >
<!-- < navigator :url ="`/pages/activity/goods_combination_details/index?id=${item.id}`" hover -class = " none " class = "item" v-for ="(item, index) in combinationList" :key ="index" >
< view class = "pictrue" >
< image :src ="item.image" > < / image >
< / view >
< view class = "text lines1" >
< text class = "money" > ¥ < text class = "num" > { { item . price } } < / text > < / text >
< text class = "y_money" > ¥ { { item . otPrice } } < / text >
< / view >
< / navigator > -- >
< / s c r o l l - v i e w >
< / view >
< / view >
< / view >
< / template >
< script >
let app = getApp ( ) ;
import {
2021-06-11 09:41:16 +00:00
getCombinationIndexApi
2020-12-23 07:56:45 +00:00
} from '@/api/activity.js' ;
export default {
name : 'b_combination' ,
data ( ) {
return {
combinationList : [ ] ,
2021-06-11 09:41:16 +00:00
isBorader : false ,
assistUserList : [ ] ,
assistUserCount : 0
2020-12-23 07:56:45 +00:00
} ;
} ,
created ( ) {
this . getCombinationList ( ) ;
} ,
mounted ( ) { } ,
methods : {
// 拼团列表
getCombinationList : function ( ) {
let that = this ;
2021-06-11 09:41:16 +00:00
getCombinationIndexApi ( ) . then ( function ( res ) {
that . combinationList = res . data . productList ;
that . assistUserList = res . data . avatarList ;
that . assistUserCount = res . data . totalPeople ;
2020-12-23 07:56:45 +00:00
} ) . catch ( ( res ) => {
return that . $util . Tips ( {
title : res
} ) ;
} )
} ,
2021-06-11 09:41:16 +00:00
goDetail ( item ) {
2020-12-23 07:56:45 +00:00
uni . navigateTo ( {
url : ` /pages/activity/goods_combination_details/index?id= ${ item . id } `
} )
}
}
}
< / script >
2021-03-19 10:26:43 +00:00
< style lang = "scss" scoped >
2021-06-11 09:41:16 +00:00
. mengceng {
width : 38 rpx ;
height : 38 rpx ;
line - height : 36 rpx ;
background : rgba ( 51 , 51 , 51 , 0.6 ) ;
text - align : center ;
border - radius : 50 % ;
opacity : 1 ;
position : absolute ;
left : 0 px ;
top : 2 rpx ;
color : # FFF ;
i {
font - style : normal ;
font - size : 20 rpx ;
}
}
. activity _pic {
margin - left : 28 rpx ;
padding - left : 20 rpx ;
. picture {
display : inline - block ;
}
. avatar {
width : 38 rpx ;
height : 38 rpx ;
display : inline - table ;
vertical - align : middle ;
- webkit - user - select : none ;
- moz - user - select : none ;
- ms - user - select : none ;
user - select : none ;
border - radius : 50 % ;
background - repeat : no - repeat ;
background - size : cover ;
background - position : 0 0 ;
margin - right : - 10 rpx ;
box - shadow : 0 0 0 1 px # fff ;
}
. pic _count {
margin - left : 30 rpx ;
color : $theme - color ;
font - size : 22 rpx ;
font - weight : 500 ;
}
}
. default {
2020-12-23 07:56:45 +00:00
width : 690 rpx ;
height : 300 rpx ;
border - radius : 14 rpx ;
margin : 26 rpx auto 0 auto ;
background - color : # ccc ;
text - align : center ;
line - height : 300 rpx ;
2021-06-11 09:41:16 +00:00
. iconfont {
2020-12-23 07:56:45 +00:00
font - size : 80 rpx ;
}
}
2021-06-11 09:41:16 +00:00
. combination {
width : auto ;
2020-12-23 07:56:45 +00:00
background - color : # fff ;
border - radius : 14 rpx ;
2021-06-11 09:41:16 +00:00
margin : 0 auto 30 rpx auto ;
padding : 16 rpx 24 rpx 24 rpx 24 rpx ;
2021-03-19 10:26:43 +00:00
background - image : url ( . . / . . / . . / static / images / pth . png ) ;
background - repeat : no - repeat ;
background - size : 100 % ;
2021-06-11 09:41:16 +00:00
2020-12-23 07:56:45 +00:00
. title {
2021-06-11 09:41:16 +00:00
width : 80 % ;
margin - left : 128 rpx ;
2020-12-23 07:56:45 +00:00
. sign {
width : 40 rpx ;
height : 40 rpx ;
2021-06-11 09:41:16 +00:00
2020-12-23 07:56:45 +00:00
image {
width : 100 % ;
height : 100 % ;
}
}
2021-06-11 09:41:16 +00:00
2020-12-23 07:56:45 +00:00
. name {
font - size : 32 rpx ;
color : # 282828 ;
margin - left : 12 rpx ;
font - weight : bold ;
2021-06-11 09:41:16 +00:00
2020-12-23 07:56:45 +00:00
text {
color : # 797979 ;
font - size : 24 rpx ;
font - weight : 400 ;
margin - left : 14 rpx ;
}
}
2021-06-11 09:41:16 +00:00
2020-12-23 07:56:45 +00:00
. more {
2021-06-11 09:41:16 +00:00
width : 86 rpx ;
height : 40 rpx ;
background : linear - gradient ( 142 deg , # FFE9CE 0 % , # FFD6A7 100 % ) ;
opacity : 1 ;
border - radius : 18 px ;
2020-12-23 07:56:45 +00:00
font - size : 22 rpx ;
2021-06-11 09:41:16 +00:00
color : # FE960F ;
padding - left : 8 rpx ;
font - weight : 800 ;
2020-12-23 07:56:45 +00:00
. iconfont {
2021-06-11 09:41:16 +00:00
font - size : 21 rpx ;
2020-12-23 07:56:45 +00:00
}
}
}
2021-06-11 09:41:16 +00:00
. conter {
margin - top : 24 rpx ;
2020-12-23 07:56:45 +00:00
. itemCon {
display : inline - block ;
2021-06-11 09:41:16 +00:00
width : 220 rpx ;
2020-12-23 07:56:45 +00:00
margin - right : 24 rpx ;
}
2021-06-11 09:41:16 +00:00
. item {
width : 100 % ;
. pictrue {
2020-12-23 07:56:45 +00:00
width : 100 % ;
2021-06-11 09:41:16 +00:00
height : 220 rpx ;
2020-12-23 07:56:45 +00:00
border - radius : 6 rpx ;
2021-06-11 09:41:16 +00:00
image {
2020-12-23 07:56:45 +00:00
width : 100 % ;
height : 100 % ;
border - radius : 6 rpx ;
}
}
2021-06-11 09:41:16 +00:00
. text {
2020-12-23 07:56:45 +00:00
margin - top : 4 rpx ;
2021-06-11 09:41:16 +00:00
2021-03-19 10:26:43 +00:00
. y _money {
2021-06-11 09:41:16 +00:00
font - size : 24 rpx ;
2021-03-19 10:26:43 +00:00
color : # 999999 ;
text - decoration : line - through ;
}
2021-06-11 09:41:16 +00:00
2021-03-19 10:26:43 +00:00
. name {
2020-12-23 07:56:45 +00:00
font - size : 24 rpx ;
2021-03-19 10:26:43 +00:00
color : # 000 ;
margin - top : 14 rpx ;
}
2021-06-11 09:41:16 +00:00
2021-03-19 10:26:43 +00:00
. money {
2020-12-23 07:56:45 +00:00
color : # FD502F ;
2021-03-19 10:26:43 +00:00
font - size : 28 rpx ;
height : 100 % ;
2020-12-23 07:56:45 +00:00
font - weight : bold ;
2021-06-11 09:41:16 +00:00
margin : 10 rpx 0 0 rpx 0 ;
2021-03-19 10:26:43 +00:00
. num {
2020-12-23 07:56:45 +00:00
font - size : 28 rpx ;
}
}
}
}
}
}
< / style >