229 lines
76 KiB
Vue
229 lines
76 KiB
Vue
|
<template>
|
||
|
<div>
|
||
|
<view class='group-list'>
|
||
|
<view class='iconfont icon-xiangzuo' @tap='goBack' :style="'top:'+ (navH/2) +'rpx'"></view>
|
||
|
<view class='header'></view>
|
||
|
<view class='list'>
|
||
|
<block v-for="(item,index) in combinationList" :key='index'>
|
||
|
<view class='item acea-row row-between-wrapper' @tap="openSubcribe(item)"
|
||
|
data-url=''>
|
||
|
<view class='pictrue'>
|
||
|
<image :src='item.image'></image>
|
||
|
</view>
|
||
|
<view class='text'>
|
||
|
<view class='line1'>{{item.title}}</view>
|
||
|
<view class='acea-row'>
|
||
|
<view class='team acea-row row-middle cart-color'>
|
||
|
<view class='iconfont icon-pintuan'></view>
|
||
|
<view class='num'>{{item.people}}人团</view>
|
||
|
</view>
|
||
|
</view>
|
||
|
<view class='bottom acea-row row-between-wrapper'>
|
||
|
<view class='money'>¥<text class='num'>{{item.price}}</text><text class='y-money'>¥{{item.product_price}}</text></view>
|
||
|
<view class='groupBnt bg-color'>去拼团<text class="iconfont icon-jiantou"></text></view>
|
||
|
</view>
|
||
|
</view>
|
||
|
</view>
|
||
|
</block>
|
||
|
</view>
|
||
|
</view>
|
||
|
<home></home>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
import {
|
||
|
getCombinationList
|
||
|
} from '@/api/activity.js';
|
||
|
import {
|
||
|
openPinkSubscribe
|
||
|
} from '../../../utils/SubscribeMessage.js';
|
||
|
import home from '@/components/home/index.vue'
|
||
|
let app = getApp();
|
||
|
export default {
|
||
|
components: {
|
||
|
home
|
||
|
},
|
||
|
data() {
|
||
|
return {
|
||
|
navH: '',
|
||
|
combinationList: [],
|
||
|
limit: 10,
|
||
|
page: 1,
|
||
|
loading: false,
|
||
|
loadend: false,
|
||
|
}
|
||
|
},
|
||
|
onLoad() {
|
||
|
uni.setNavigationBarTitle({
|
||
|
title:"拼团列表"
|
||
|
})
|
||
|
this.navH = app.globalData.navHeight;
|
||
|
this.getCombinationList();
|
||
|
},
|
||
|
methods: {
|
||
|
goBack: function() {
|
||
|
uni.navigateBack();
|
||
|
},
|
||
|
openSubcribe: function(item) {
|
||
|
let page = item;
|
||
|
// #ifndef MP
|
||
|
uni.navigateTo({
|
||
|
url: `/pages/activity/goods_combination_details/index?id=${item.id}`
|
||
|
});
|
||
|
// #endif
|
||
|
// #ifdef MP
|
||
|
uni.showLoading({
|
||
|
title: '正在加载',
|
||
|
})
|
||
|
openPinkSubscribe().then(res => {
|
||
|
uni.hideLoading();
|
||
|
uni.navigateTo({
|
||
|
url: `/pages/activity/goods_combination_details/index?id=${item.id}`
|
||
|
});
|
||
|
}).catch(() => {
|
||
|
uni.hideLoading();
|
||
|
});
|
||
|
// #endif
|
||
|
},
|
||
|
getCombinationList: function() {
|
||
|
var that = this;
|
||
|
if (that.loadend) return;
|
||
|
if (that.loading) return;
|
||
|
var data = {
|
||
|
page: that.page,
|
||
|
limit: that.limit
|
||
|
};
|
||
|
this.loading = true
|
||
|
getCombinationList(data).then(function(res) {
|
||
|
var combinationList = that.combinationList;
|
||
|
var limit = that.limit;
|
||
|
that.page++;
|
||
|
that.loadend = limit > res.data.length;
|
||
|
that.combinationList = combinationList.concat(res.data);
|
||
|
that.page = that.data.page;
|
||
|
that.loading = false;
|
||
|
}).catch(() => {
|
||
|
that.loading = false
|
||
|
})
|
||
|
},
|
||
|
},
|
||
|
onReachBottom: function() {
|
||
|
this.getCombinationList();
|
||
|
},
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style>
|
||
|
page {
|
||
|
background-color: #fa533d !important;
|
||
|
}
|
||
|
|
||
|
.icon-xiangzuo {
|
||
|
font-size: 40rpx;
|
||
|
color: #fff;
|
||
|
position: fixed;
|
||
|
left: 30rpx;
|
||
|
z-index: 99;
|
||
|
transform: translateY(-20%);
|
||
|
}
|
||
|
|
||
|
.group-list .header {
|
||
|
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAu4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j60tt5HhOQGTeIRrCyMovyStfOyogAgeqXdgIForhhZco/uDfDAt5oQd5PC8wstCDsv+BCeFAlFZ8nSnuDCUPHQRdTN4caguSUXQ1NBmculMzFxu16bYhbQ1Q/DOgjbXaUW0kIA1E0S2D/q53Po+orBo2iQUrSrzHGLsqmkqhIzYF4BpT82ERiMxCPtlpVdp6qDGa/UmVwqSpTR39XZb+XBXzP9yN53RXSCOcQJaADcuHdjzIHv8QkapPpJZadVTKCQEmRCwZD3BQbNZdnNLAehe06pdP6cOpIUA7C14dgZhFYcF/DxCrQi+ytylzi0mUswhW5VWX20pOko/9cVRl7JUGGOJCLLDhvWaCy37LAIf6zLPiq/R9pgFT/41cx2FX1Y6xXk4RcmADWWlyRKSqMVrCWrpvGqVTUnmfli9xAUob7BV/r88vyQoC+koKVtVVlZ7T+VyDcVRkCzsX3UmXCgjROizidRIVVFpy3LEBgRjg8/XBlgYzusmCU/Pk5liA0ejkTGwJMFO4YbclpKXTgwNMnXdvunOByK0mz10xEwp80/bQ3ZLVaAOQExNSYQTRLJDwLtbaoMhQBxPJi0fMJN474BQJNOTP1dnKQQWRBCQ/gQbayAGpPWXDusmCP8mh0yvdHcySDbG1AW3rC2N/IZ5k5cINiU/BB0qI1tBxB2wNCjDl2lQsIO2Dls8RjvxSwV2/wOXO2VWWcfzFBCs/yqCqrkuV3VBmrZZY6twMc4XKXBZM7PC+ywOFfZEFPz1pZjSxYXz8ojJhtBNPKkYEChtGH
|
||
|
background-repeat: no-repeat;
|
||
|
background-size: 100% 100%;
|
||
|
width: 100%;
|
||
|
height: 450rpx;
|
||
|
}
|
||
|
|
||
|
.group-list .list {
|
||
|
margin-top: -108rpx;
|
||
|
}
|
||
|
|
||
|
.group-list .list .item {
|
||
|
width: 690rpx;
|
||
|
height: 208rpx;
|
||
|
background-color: #fff;
|
||
|
border-radius: 6rpx;
|
||
|
padding: 0 24rpx;
|
||
|
box-sizing: border-box;
|
||
|
margin: 0 auto 20rpx auto;
|
||
|
}
|
||
|
|
||
|
.group-list .list .item .pictrue {
|
||
|
width: 160rpx;
|
||
|
height: 160rpx;
|
||
|
}
|
||
|
|
||
|
.group-list .list .item .pictrue image {
|
||
|
width: 100%;
|
||
|
height: 100%;
|
||
|
border-radius: 6rpx;
|
||
|
}
|
||
|
|
||
|
.group-list .list .item .text {
|
||
|
width: 458rpx;
|
||
|
font-size: 30rpx;
|
||
|
color: #282828;
|
||
|
}
|
||
|
|
||
|
.group-list .list .item .text .team {
|
||
|
height: 38rpx;
|
||
|
border-radius: 4rpx;
|
||
|
font-size: 22rpx;
|
||
|
margin-top: 20rpx;
|
||
|
}
|
||
|
|
||
|
.group-list .list .item .text .team .iconfont {
|
||
|
width: 54rpx;
|
||
|
background-color: #ffdcd9;
|
||
|
text-align: center;
|
||
|
color: #dd3823;
|
||
|
height: 100%;
|
||
|
}
|
||
|
|
||
|
.group-list .list .item .text .team .num {
|
||
|
text-align: center;
|
||
|
padding: 0 6rpx;
|
||
|
height: 100%;
|
||
|
}
|
||
|
|
||
|
.group-list .list .item .text .bottom {
|
||
|
margin-top: 7rpx;
|
||
|
}
|
||
|
|
||
|
.group-list .list .item .text .bottom .money {
|
||
|
font-size: 24rpx;
|
||
|
font-weight: bold;
|
||
|
color: #282828;
|
||
|
}
|
||
|
|
||
|
.group-list .list .item .text .bottom .money .num {
|
||
|
font-size: 32rpx;
|
||
|
}
|
||
|
|
||
|
.group-list .list .item .text .bottom .money .y-money {
|
||
|
font-size: 24rpx;
|
||
|
color: #999;
|
||
|
font-weight: normal;
|
||
|
text-decoration: line-through;
|
||
|
margin-left: 10rpx;
|
||
|
}
|
||
|
|
||
|
.group-list .list .item .text .bottom .groupBnt {
|
||
|
font-size: 26rpx;
|
||
|
color: #fff;
|
||
|
width: 146rpx;
|
||
|
height: 54rpx;
|
||
|
text-align: center;
|
||
|
line-height: 54rpx;
|
||
|
border-radius: 4rpx;
|
||
|
}
|
||
|
|
||
|
.group-list .list .item .text .bottom .groupBnt .iconfont {
|
||
|
font-size: 25rpx;
|
||
|
vertical-align: 2rpx;
|
||
|
margin-left: 10rpx;
|
||
|
}
|
||
|
</style>
|