<template>
	<view>
		<!--components/activityGroup/activityGroup.wxml-->
		<!-- 社区团购 -->
		<template name="group">
			<!-- 社区团购 -->
			<view class="pdlr20">
				<view class="mt20 bgfff r10" v-if="activityGroup.products.length > 0">
					<navigator hover-class="none" :url="'/product/groupList/groupList' + url" class="head">
						<view class="titleNav pdlr20 dflex" v-if="groupTemplate.titleType==1">
							{{groupTemplate.titleCon}}
							<image src="/static/pages/images/more.png" class="more"></image>
						</view>
						<image lazy-load="true" v-if="groupTemplate.titleType==2" :src="groupTemplate.titleCon + '?x-oss-process=style/w750-auto'"
						 mode="widthFix" class="imgtit"></image>
					</navigator>
					<goodsList :pageList="activityGroup" :about="about" :merchant="web" :type="'1'" :typeName="'团购'"></goodsList>
<!-- 					<view class="shequ">
						<view v-for="(item, index) in activityGroup" :key="index" class="li">
							<view class="dflex">
								<image lazy-load="true" :src="item.pic + '?x-oss-process=style/w210'" mode="aspectFill" class="proimg"
								 :data-index="index" @tap="toGroupRemind" :data-url="web"></image>
								<view class="flex">
									<view class="proname" :data-index="index" @tap="toGroupRemind" :data-url="web">{{item.productName}}</view>
									<view class="endtime" :data-index="index" @tap="toGroupRemind" :data-url="web">{{item.start ? '距结束' : '距开始'}}
										{{item.times}}</view>
									<view class="operate dflex">
										<view class="price proprice" :data-index="index" @tap="toGroupRemind" :data-url="web">
											￥<text>{{item.money}}</text><text class="del" v-if="item.marketPrice!=0&&item.marketPrice>item.money">￥{{item.marketPrice}}</text></view>
										
										<view class="add-cart">
											<image src="/static/pages/images/jia.png" :data-index="index" @tap="toGroupRemind" v-if="item.start"
											 :data-url="web"></image>
											<block v-else>
												<view class="remind mbggreen" @tap="cancelActivityRemind" :data-index="index" :data-id="item.id" v-if="item.isRemind"
												 data-type="1">取消提醒</view>
												<view class="remind mbggreen" @tap="addActivityRemind" :data-index="index" :data-id="item.id" data-type="1"
												 v-else>开团提醒</view>
											</block>
										</view>
									</view>
								</view>
							</view>
							<view class="datas dflex" v-if="item.start" :data-index="index" @tap="toGroupRemind" :data-url="web">
								<view class="yigou dflex">
									<image v-for="(item, index2) in item.dtoList" :key="index2" lazy-load="true" :src="item.avatar" mode="aspectFill">
									</image>
									<image src="/static/pages/images/more1.png" mode="aspectFill" class="more1" v-if="item.dtoList && item.dtoList.length > 0"></image>
									<text>已售{{item.payQuantity}}/剩余{{item.quantity - item.payQuantity}}</text>
								</view>
								<view class="xiaoliang">累计销量 {{item.sellStock}}</view>
							</view>
						</view>
					</view> -->
				</view>
			</view>
		</template>
	</view>
</template>

<script>
	// components/activityGroup/activityGroup.js
	const route = require("../../utils/route.js");
	const utils = require("../../utils/util.js");
	const mes = require("../../utils/requestmessage.js");
	const req = require("../../utils/request.js");
	const app = getApp();
	import goodsList from "../../components/goodsList/goodsList";
	
	export default {
		data() {
			return {
				// activityGroup:{products:[]}
			};
		},

		components: {goodsList},
		props: {
			groupTemplate: Object,  // 社区团购模板配置
			url: String,  //跳转地址
			web:String,   //跳转地址
			merchant:Object,  //门店
			activityGroup:Object,  //{backgroundColor:背景颜色,displayStyle: 样式模板,lineNumber:每行几个,products:产品列表}
			about:Object		//参数配置
		},
		watch: {},
		mounted() {
		},

		methods: {
			
			},
			}
</script>
<style>
	@import "./activityGroup.css";
</style>
