twt 2 years ago
parent
commit
ab2ad2849b
3 changed files with 627 additions and 76 deletions
  1. 1 1
      pages/activity/activity.vue
  2. 599 52
      pages/activity/jkDetail.vue
  3. 27 23
      pages/index/index.vue

+ 1 - 1
pages/activity/activity.vue

@@ -64,7 +64,7 @@
 		methods: {
 			goDetail(id) {
 				uni.navigateTo({
-					url: 'reportDetail?id=' + id
+					url: 'jkDetail?id=' + id
 				})
 			},
 			myOrderCoupon() {

+ 599 - 52
pages/activity/jkDetail.vue

@@ -1,18 +1,18 @@
 <template>
 	<view class="content">
 		<view class="top">
-			<img :src="info.img" alt="" class="topimg">
+			<img :src="mainImg" alt="" class="topimg">
 		</view>
 		<view class="cont">
 			<view class="name">{{info.activityName}}</view>
-			<view class="name2">{{info.startTime}}~{{info.endTime}}</view>
+			<view class="name2">{{info.startTime.slice(0,10)}}~{{info.endTime.slice(0,10)}}</view>
 			<view class="name3">{{info.activityContent}}</view>
 		</view>
 		<view class="shopBox">
 			<view class="shopBoxTop">
 				<view class="shopMs">活动门店</view>
 				<view class="shopTy">
-					<view class="shopTyTxt">{{shopNum}}家门店通用</view>
+					<view class="shopTyTxt">{{info.shopCount}}家门店通用</view>
 					<img src="../../static/timg/jt2.png" alt="" class="shopjt">
 				</view>
 			</view>
@@ -36,43 +36,44 @@
 			
 		</view>
 		<!-- 多少人报名 -->
-		<view class="signupBox">
+		<view class="signupBox" v-if="info.signUserList.length">
 			<view class="signupTop">
-				<span class="signupTops1">122</span>
+				<span class="signupTops1">{{info.signUserList.length}}</span>
 				<span class="signupTops1">人已报名</span>
 			</view>
 			<view class="signupCont">
-				<view class="signupLine" v-for="(item,index) in 5">
+				<view class="signupLine" v-for="(item,index) in info.signUserList">
 					<view class="signupLineL">
-						<img src="http://dmsphoto.66km.com.cn/marketing//accompany/3885B510-6405-4A5E-BD64-B6C09CEE070E.jpg" alt="" class="signupLineLImg">
-						<view class="signupLineLName">微信昵称</view>
+						<img :src="item.headImg" alt="" class="signupLineLImg">
+						<view class="signupLineLName">{{item.nickName}}</view>
 					</view>
-					<view class="signupLineM">鲁A0**21</view>
-					<view class="signupLineR">11-12 12:32</view>
+					<view class="signupLineM">{{item.plateNumber?item.plateNumber:''}}</view>
+					<view class="signupLineR">{{item.createTime}}</view>
 				</view>
 			</view>
 		</view>
 		<!-- 多少人报名 -->
 		<!-- 多少人看过 -->
-		<view class="signupBox">
+		<view class="signupBox" v-if="info.lookCount">
 			<view class="signupTop">
-				<span class="signupTops1">122</span>
+				<span class="signupTops1">{{info.lookCount}}</span>
 				<span class="signupTops1">人看过</span>
 			</view>
-			<view class="seeBox">
+			<!-- <view class="seeBox">
 				<view class="seeLine" v-for="(item,index) in 15">
 					<img src="http://dmsphoto.66km.com.cn/marketing//accompany/3885B510-6405-4A5E-BD64-B6C09CEE070E.jpg" alt="" class="signupLineLImg">
 				</view>
-			</view>
+			</view> -->
 		</view>
-		<view class="detailBOx" v-if="info.imgList">
+		<view class="detailBOx" v-if="dimgList">
 			<view class="detailTitle">活动详情</view>
-			<view class="detailImgBox" v-for="(item,index) in info.imgList.split(',')">
-				<img :src="item" alt="" class="detailImg" mode="widthFix">
+			<view class="detailImgBox" v-for="(item,index) in dimgList">
+				<img :src="item.img" alt="" class="detailImg" mode="widthFix">
 			</view>
 		</view>
 		
-		<view style="height: 200rpx;"></view>
+		<view style="height: 200rpx;padding-bottom: constant(safe-area-inset-bottom);
+		padding-bottom: env(safe-area-inset-bottom);"></view>
 		<view class="bottom">
 			<view class="timeTbox" v-if="!activityEnd">
 			  <view class="timeviewTxt" v-if="activityNoOpen"> 距开始</view>
@@ -84,7 +85,81 @@
 			  <view class="timeK">{{shengyuM}}</view>
 			  <view class="timeviewTxt" > 分</view>
 			</view>
-			view
+			<view class="bottomBtnBox">
+				<view class="bottomBtnBoxLeft">
+					<img src="../../static/timg/share.png" alt="" class="shareIcon">
+					<view class="shareTxt">分享</view>
+				</view><!-- 状态1未开始 2进行中3已结束 -->
+				<view class="bottomBtn" v-if="info.state==2" @click="signUp">立即报名</view>
+				<view class="bottomBtn2" v-if="info.state==1">报名未开始</view>
+				<view class="bottomBtn2" v-if="info.state==3">报名已结束</view>
+			</view>
+		</view>
+		<!-- 报名弹框 -->
+		<view class="baomingBox" v-if="bmShow" @click="nobmshow">
+			<view class="baomingCont" @click.stop="">
+				<view class="bmTop">
+					<view class="bmTitle">登记信息 领好礼</view>
+					<img src="../../static/timg/chahao.png" alt="" class="bmChimg" @click="nobmshow">
+				</view>
+				<view style="padding: 0 24rpx;">
+					<view class="bmshopLine" @click="showCkshop">
+						<view class="bmshopname">{{shopName?shopName:'请选择门店'}}</view>
+						<img src="../../static/timg/icon_arrow_right.png" alt="" class="bmshopjt">
+					</view>
+					<!-- clWhere报名凭证1,2,3,4 1手机号2车牌号3姓名4单位 -->
+					<view class="bmLine" v-if="info.clWhere.indexOf(1)!=-1">
+						<input type="text" v-model="mobilePhone" class="bmlineInput" placeholder="输入手机号">
+					</view>
+					<view class="bmLine" v-if="info.clWhere.indexOf(2)!=-1">
+						<input type="text" v-model="plateNumber" name="" id="" class="bmlineInput" placeholder="输入车牌号">
+					</view>
+					<view class="bmLine" v-if="info.clWhere.indexOf(3)!=-1">
+						<input type="text"  v-model="customerName" class="bmlineInput" placeholder="输入姓名">
+					</view>
+					<view class="bmLine" v-if="info.clWhere.indexOf(4)!=-1">
+						<input type="text"  v-model="unit" class="bmlineInput" placeholder="输入单位">
+					</view>
+				</view>
+				<view class="bmTtnBox">
+					<view class="bmBtn" @click="submitOrder">提交</view>
+				</view>
+				
+			</view>
+		</view>
+		<!-- 门店弹框 -->
+		<view class="baomingBox ckshopBox" v-if="ckshopShow">
+			<view class="baomingCont">
+				<view class="bmTop">
+					<view class="bmTitle">选择门店</view>
+					<img src="../../static/timg/chahao.png" alt="" class="bmChimg" @click="noShowShop">
+				</view>
+				<view style="padding: 0 24rpx; height: 45vh;overflow-y: scroll;">
+					<view class="ckshopLine" v-for="(item,index) in info.shopList" @click="ckshop(item)">
+						<view class="shoplineLeft">
+							<image :src="item.photoPath" mode="" class="shopImg" v-if="item.photoPath"></image>
+							<image src="../../static/img/noimg.png" mode="" class="shopImg" v-else></image>
+						</view>
+						<view class="shopright" style="padding-left: 20rpx;">
+							<view class="shopTop">
+								<view class="shopName">{{item.shopName}}</view>
+							</view>
+							<view class="brandsBg" v-if="item.brands">
+								<view class="brands" v-for="(v,index2) in item.brands.split(',')">{{v}}</view>
+							</view>
+							<view class="shopTime"><span v-if="item.startTime">{{item.startTime}}</span> - <span
+									v-if="item.endTime">{{item.endTime}}</span> </view>
+							<view class="shopBottomLeft">
+								<span class="shopaddress"
+									v-if="item.address">{{item.provinceName}}{{item.cityName}}{{item.areaName}}{{item.address}}</span>
+								<span v-if="item.distance&&item.distance!= '0.00'">{{item.distance}}km</span>
+							</view>
+						</view>
+					</view>
+				</view>
+				
+				
+			</view>
 		</view>
 	</view>
 </template>
@@ -97,26 +172,225 @@
 				type:'',
 				shopNum:'',
 				shopInfo:'',
-				activityEnd:false,
+				activityEnd:true,
 				activityNoOpen:true,
 				shengyuD:1,
 				shengyuH:12,
-				shengyuM:21
+				shengyuM:21,
+				queryShopList:'',
+				collectingID:'',
+				bmShow:false,
+				ckshopShow:false,
+				mainImg:'',
+				dimgList:[],
+				shopName:'',
+				ckshopdata:'',
+				customerName:'',
+				mobilePhone:'',
+				unit:'',
+				plateNumber:'',
+				comment:'',
 			}
 		},
 		onLoad(opt) {
-			this.info={
-				activityName:'洗车大礼包洗车大礼包洗车大礼包洗车大礼包',
-				startTime:'2022.01.21',
-				endTime:'2022-10-01',
-				activityContent:'这里展示活动说明,如果后台没填则不展示',
-				img: "http://dmsphoto.66km.com.cn/marketing//accompany/3885B510-6405-4A5E-BD64-B6C09CEE070E.jpg",
-				imgList: "http://dmsphoto.66km.com.cn/marketing//accompany/855DE839-8691-4432-8989-720AA0EA1206.jpg,http://dmsphoto.66km.com.cn/marketing//accompany/855DE839-8691-4432-8989-720AA0EA1206.jpg",
+			// this.info={
+			// 	activityName:'洗车大礼包洗车大礼包洗车大礼包洗车大礼包',
+			// 	startTime:'2022.01.21',
+			// 	endTime:'2022-10-01',
+			// 	activityContent:'这里展示活动说明,如果后台没填则不展示',
+			// 	img: "http://dmsphoto.66km.com.cn/marketing//accompany/3885B510-6405-4A5E-BD64-B6C09CEE070E.jpg",
+			// 	imgList: "http://dmsphoto.66km.com.cn/marketing//accompany/855DE839-8691-4432-8989-720AA0EA1206.jpg,http://dmsphoto.66km.com.cn/marketing//accompany/855DE839-8691-4432-8989-720AA0EA1206.jpg",
 				
-			}
-           this.getInfo()
+			// }
+			this.collectingID=opt.id;
+           this.getInfo();
+		   this.queryActivityInfo()
 		},
 		methods: {
+			submitOrder(){
+				var jsonArray={
+					itemId:this.collectingID,
+					itemName:this.info.activityName,
+					itemQty:1,
+					salePrice:this.info.money,
+					totalPrice:this.info.money,
+				}
+				if(this.ckshopdata==''){
+					uni.showToast({
+						title: '请选择服务门店',
+						icon: 'none',
+						duration: 3000
+					});
+					return false;
+				}
+				var arr=[]
+				arr.push(jsonArray)
+				var params={
+					sheetType:'6',
+					sheetContent:this.info.activityName,
+					customerName:this.customerName,
+					mobilePhone:this.mobilePhone,
+					unit:this.unit,
+					plateNumber:this.plateNumber,
+					//carModel:this.carInfo.carModel,
+					totalMoney:this.info.money,
+					shopId:this.ckshopdata.id,
+					comment:this.comment,
+					sheetDetail:JSON.stringify(arr),
+					payType:this.info.payType
+				}
+				uni.showLoading({
+					title: '加载中'
+				})
+				this.$http('openMallOrder/submitOrder', params,'POST').then(res => {
+					uni.hideLoading();
+					if(res.code==0){
+						this.orderData=res.data
+						if(this.info.payType==1){
+							this.unifiedPay(res.data)
+						}else{
+							uni.showToast({
+								title: '报名成功',
+								icon: 'none',
+								duration: 3000
+							});
+							uni.redirectTo({
+								url: "../user/myOrder/activityOrderDetail?id=" + this.orderData.id +"&SheetType=" + this.orderData.sheetType
+							})
+						}
+						
+					}else{
+						uni.showToast({
+							title: res.msg,
+							icon: 'none',
+							duration: 3000
+						});
+					}
+				 })
+			},
+			unifiedPay(res){
+				this.$http('openMallOrder/unifiedPay', {
+					sheetId:res.id
+				},'POST').then(res => {
+					
+					if(res.code==0){
+						
+						this.requestPayment(res.data)
+					}else{
+						uni.showToast({
+							title: res.msg,
+							icon: 'none',
+							duration: 3000
+						});
+					}
+				 })
+			},
+			requestPayment(res){
+				var payInfo=res;
+				//console.log(payInfo)
+				//console.log(String(Date.now()))
+				var that=this;
+				uni.requestPayment({
+					provider: 'wxpay',
+					//timeStamp: String(Date.now()),
+					timeStamp: payInfo.timeStamp,
+					nonceStr: payInfo.nonceStr,
+					package:payInfo.package,
+					signType: payInfo.signType,
+					paySign: payInfo.paySign,
+					appid:payInfo.appId,	
+					
+				    success: function (res) {
+				        console.log('success:' + JSON.stringify(res));
+						 uni.showToast({
+							 title: '支付成功',
+							 icon:'none',
+							 duration: 2000
+						 });
+						 
+						  	uni.redirectTo({
+						  		url: "../user/myOrder/activityOrderDetail?id=" + that.orderData.id +"&SheetType=" + that.orderData.sheetType
+						  	})
+						  
+						
+				    },
+				    fail: function (err) {
+					  console.log(err)
+				      uni.showToast({
+						 title: '支付失败',
+						 icon:'none',
+						 duration: 2000
+				      });
+					  console.log(that.orderData)
+					  uni.redirectTo({
+					  	url: "../user/myOrder/activityOrderDetail?id=" + that.orderData.id +"&SheetType=" + that.orderData.sheetType
+					  })
+				    }
+				}); 
+			},
+			signUp(){
+				this.bmShow=true;
+			},
+			nobmshow(){
+				this.bmShow=false;
+			},
+			ckshop(item){
+				this.ckshopdata=item;
+				this.shopName=item.shopName;
+				this.ckshopShow=false;
+			},
+			showCkshop(){
+				console.log("选择门店")
+				this.ckshopShow=true;
+			},
+			noShowShop(){
+				this.ckshopShow=false;
+			},
+			queryActivityInfo(){
+				uni.showLoading({
+					title: '加载中'
+				})
+				this.$http('openHome/queryActivityInfo', {
+					collectingID:this.collectingID
+				}, 'GET').then(res => {
+					uni.hideLoading();
+					this.info = res.data;
+					if(this.info.imgList){
+						this.info.imgList.forEach(item=>{
+							if(item.imgType==1){
+								this.mainImg=item.img
+							}else{
+								this.dimgList.push(item)
+							}
+						})
+					}
+					if (this.info.endTime < this.info.startTime) {
+					  // this.$vux.toast.text('时间设置错误')
+					  return
+					}
+					// this.activityNoOpen
+					if (Number(new Date().getTime()) > (Number(new Date(this.info.startTime.replace(/-/g, '/')).getTime()) || 0)) {
+					  console.log("现在时间大于开始时间")
+					  this.activityNoOpen = false
+					} else {
+					  this.activityNoOpen = true
+					}
+					if (Number(new Date().getTime()) > Number(new Date(this.info.endTime.replace(/-/g, '/')).getTime())) {
+					  console.log("现在时间大于结束时间")
+					  this.activityEnd = true
+					} else {
+					  this.activityEnd = false
+					}
+					
+					if (!this.activityNoOpen && !this.activityEnd) {
+					  this.clock()
+					}
+					if (this.activityNoOpen && !this.activityEnd) {
+					  this.clock2()
+					}
+					
+				})
+			},
 			getInfo(){
 				this.$http('openreservation/getInfo', {
 					lat: '',
@@ -159,12 +433,213 @@
 				}
 			
 			},
-		
+			clock () {
+			  let _this = this
+			  let today = new Date() // 当前时间
+			  let h = today.getHours()
+			  let m = today.getMinutes()
+			  let s = today.getSeconds()
+			  let stopTime = new Date(_this.info.endTime.replace(/-/g, '/')) // 结束时间
+			  if (Number(new Date(_this.info.endTime).getTime()) < Number(new Date().getTime())) {
+			    this.activityEnd = true
+			    return
+			  }
+			
+			  let stopH = stopTime.getHours()
+			  let stopM = stopTime.getMinutes()
+			  let stopS = stopTime.getSeconds()
+			  let shenyu = stopTime.getTime() - today.getTime() // 倒计时毫秒数
+			  let shengyuD = parseInt(shenyu / (60 * 60 * 24 * 1000)) // 转换为天
+			  let D = parseInt(shenyu) - parseInt(shengyuD * 60 * 60 * 24 * 1000)// 除去天的毫秒数
+			  let shengyuH = parseInt(D / (60 * 60 * 1000)) // 除去天的毫秒数转换成小时
+			  let H = D - shengyuH * 60 * 60 * 1000 // 除去天、小时的毫秒数
+			  let shengyuM = parseInt(H / (60 * 1000)) // 除去天的毫秒数转换成分钟
+			  let M = H - shengyuM * 60 * 1000// 除去天、小时、分的毫秒数
+			  let S = parseInt((shenyu - shengyuD * 60 * 60 * 24 * 1000 - shengyuH * 60 * 60 * 1000 - shengyuM * 60 * 1000) / 1000)// 除去天、小时、分的毫秒数转化为秒
+			
+			  this.daojishi = '报名倒计时:' + shengyuD + '天' + shengyuH + '小时' + shengyuM + '分' + S + '秒'
+			  // setTimeout("clock()",500);
+			  this.shengyuM=shengyuM;
+			  this.shengyuD=shengyuD;
+			  this.shengyuH=shengyuH;
+			  setTimeout(_this.clock, 500)
+			},
+			clock2(){
+			  let _this = this
+			  let today = new Date() // 当前时间
+			  let h = today.getHours()
+			  let m = today.getMinutes()
+			  let s = today.getSeconds()
+			  let startTime = new Date(_this.info.startTime.replace(/-/g, '/')) // 结束时间
+			  if (Number(new Date(_this.info.startTime).getTime()) < Number(new Date().getTime())) {
+			    this.activityNoOpen = true
+			    return
+			  }
+			
+			  let stopH = startTime.getHours()
+			  let stopM = startTime.getMinutes()
+			  let stopS = startTime.getSeconds()
+			  let shenyu = startTime.getTime() - today.getTime() // 倒计时毫秒数
+			  let shengyuD = parseInt(shenyu / (60 * 60 * 24 * 1000)) // 转换为天
+			  let D = parseInt(shenyu) - parseInt(shengyuD * 60 * 60 * 24 * 1000)// 除去天的毫秒数
+			  let shengyuH = parseInt(D / (60 * 60 * 1000)) // 除去天的毫秒数转换成小时
+			  let H = D - shengyuH * 60 * 60 * 1000 // 除去天、小时的毫秒数
+			  let shengyuM = parseInt(H / (60 * 1000)) // 除去天的毫秒数转换成分钟
+			  let M = H - shengyuM * 60 * 1000// 除去天、小时、分的毫秒数
+			  let S = parseInt((shenyu - shengyuD * 60 * 60 * 24 * 1000 - shengyuH * 60 * 60 * 1000 - shengyuM * 60 * 1000) / 1000)// 除去天、小时、分的毫秒数转化为秒
+			
+			  this.daojishi = '报名倒计时:' + shengyuD + '天' + shengyuH + '小时' + shengyuM + '分' + S + '秒'
+			  // setTimeout("clock()",500);
+			  this.shengyuM=shengyuM;
+			  this.shengyuD=shengyuD;
+			  this.shengyuH=shengyuH;
+			  setTimeout(_this.clock2, 500)
+			}
+		   
 		}
 	}
 </script>
 
 <style scoped>
+	.ckshopBox{
+		z-index: 111 !important;
+	}
+	.shopline {
+		padding: 20rpx 0;
+		background-color: #FFFFFF;
+		border-radius: 10rpx;
+		display: flex;
+	}
+	
+	.baomingBox{
+		width: 750rpx;
+		height: 100vh;
+		background: rgba(0, 0, 0, 0.4);
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 11;
+	}
+	.bmTtnBox{
+		width: 750rpx;
+		height: 120rpx;
+		background: #FFFFFF;
+		box-shadow: 0px -2px 10rpx 0px rgba(153,153,153,0.2000);
+		position: absolute;
+		left: 0;
+		bottom: 0;
+		padding-bottom: constant(safe-area-inset-bottom);
+		padding-bottom: env(safe-area-inset-bottom);
+	}
+	.bmBtn{
+		width: 690rpx;
+		height: 74rpx;
+		background: #D53533;
+		border-radius: 37rpx;
+		text-align: center;
+		line-height: 74rpx;
+		color: #ffffff;
+		font-size: 30rpx;
+		margin-top: 23rpx;
+		margin-left: 30rpx;
+	}
+	.bmshopjt{
+		width: 12rpx;
+		height: 20rpx;
+		margin-top: 10rpx;
+	}
+	.bmlineInput{
+		color: #333333;
+		font-size: 28rpx;
+		height: 98rpx;
+		line-height: 98rpx;
+	}
+	.bmshopname{
+		font-weight: 400;
+		color: #333333;
+		font-size: 28rpx;
+		line-height: 40rpx;
+		width: 500rpx;
+		white-space:nowrap;
+		overflow:hidden;
+		text-overflow:ellipsis;
+	}
+	.bmshopLine{
+		display: flex;
+		justify-content: space-between;
+		padding: 26rpx 0;
+		border-bottom: 1px solid #EEEEEE;
+	}
+	.bmLine{
+		border-bottom: 1px solid #EEEEEE;
+	}
+	.bmTop{
+		display: flex;
+		justify-content: space-between;
+		padding: 40rpx 24rpx 10rpx 24rpx;
+	}
+	.bmTitle{
+		font-weight: 500;
+		color: #3C3C3C;
+		font-size: 30rpx;
+		line-height: 36rpx;
+	}
+	.bmChimg{
+		width: 36rpx;
+		height: 36rpx;
+	}
+	.baomingCont{
+		position: absolute;
+		width: 750rpx;
+		height:770rpx;
+		padding-bottom: constant(safe-area-inset-bottom);
+		padding-bottom: env(safe-area-inset-bottom);
+		left: 0;
+		bottom: 0;
+		background: #ffffff;
+		border-radius: 24rpx 24rpx 0px 0px;
+	}
+	.shareIcon{
+		width: 48rpx;
+		height: 48rpx;
+		display: block;
+	}
+	.bottomBtnBox{
+		display: flex;
+		
+	}
+	.bottomBtnBoxLeft{
+		padding-left: 40rpx;
+		padding-top: 21rpx;
+	}
+	.shareTxt{
+		color: #666666;font-size: 20rpx;
+		text-align: center;
+	}
+	.bottomBtn{
+		width: 598rpx;
+		height: 74rpx;
+		background: #D53533;
+		border-radius: 37rpx;
+		line-height: 74rpx;
+		text-align: center;
+		color: #ffffff;
+		font-size: 30rpx;
+		margin-top: 24rpx;
+		margin-left: 34rpx;
+	}
+	.bottomBtn2{
+		width: 598rpx;
+		height: 74rpx;
+		background: #DDDDDD;
+		border-radius: 37rpx;
+		line-height: 74rpx;
+		text-align: center;
+		color: #ffffff;
+		font-size: 30rpx;
+		margin-top: 24rpx;
+		margin-left: 34rpx;
+	}
 	.timeTbox{
 		width: 750rpx;
 		height: 60rpx;
@@ -207,6 +682,8 @@
 	position: fixed;
 	left: 0;
 	bottom: 0;
+	padding-bottom: constant(safe-area-inset-bottom);
+	padding-bottom: env(safe-area-inset-bottom);
 }
 .signupBox{
 	background: #ffffff;
@@ -393,29 +870,99 @@
 		font-size: 26rpx;
 		padding-top: 16rpx;
 	}
-	.bottom{
-		width: 750rpx;
-		height: 98rpx;
-		background: #FFFFFF;
-		position: fixed;
-		bottom: 0;
-		left: 0;
+	.shopImg {
+		width: 146rpx;
+		height: 146rpx;
+		border-radius: 6rpx;
+	}
+	
+	.shopBox2 {
+		padding-top: 30rpx;
 		display: flex;
 	}
-	.bottomLeft{
-		width: 375rpx;
-		line-height: 98rpx;
-		text-align: center;
-		color: #3C3C3C;
-		font-size: 30rpx;
+	
+	.flex {
+		display: flex;
+		justify-content: space-between;
 	}
-	.bottomRight{
-		width: 375rpx;
-		height: 98rpx;
-		background: #3F90F7;
-		line-height: 98rpx;
-		text-align: center;
-		color: #FFFFFF;
-		font-size: 30rpx;
+	
+	.shopCont2 {
+		padding-left: 22rpx;
+		width: 520rpx;
+	}
+	
+	.shopName {
+		color: #333333;
+		font-size: 26rpx;
+		font-weight: 600;
+	}
+	
+	.span1 {
+		color: #FF4F00;
+		font-size: 36rpx;
+	}
+	
+	.span2 {
+		color: #FF4F00;
+		font-size: 22rpx;
+	}
+	
+	.span3 {
+		color: #333333;
+		font-size: 22rpx;
+		padding-left: 22rpx;
+	}
+	
+	.shopBq {
+		color: #FF4F00;
+		font-size: 22rpx;
+		border-radius: 4rpx;
+		border: 1px solid #FF4F00;
+		line-height: 30rpx;
+		height: 30rpx;
+		padding: 0rpx 5rpx;
+		margin-top: 10rpx;
+	}
+	
+	.brandsBg {
+		display: flex;
+	    height: 38rpx;
+		flex-wrap: wrap;
+		align-items: center;
+		overflow: hidden;
+		padding: 5rpx 0rpx;
+	
+	}
+	
+	.brands {
+		border-radius: 4rpx;
+		padding: 0 5rpx;
+		color: #F19D01;
+		height: 28rpx;
+		border: 1px solid #F19D01;
+	
+		font-size: 20rpx;
+		line-height: 28rpx;
+		margin: 5rpx 10rpx 5rpx 0rpx;
+	}
+	
+	.timeBg {
+		display: flex;
+	
+	}
+	
+	.shopTime {
+		color: #666666;
+		font-size: 22rpx;
+	}
+	
+	.addressBox {
+		color: #666666;
+		font-size: 22rpx;
+	}
+	.ckshopLine{
+		display: flex;
+		padding: 20rpx 0;
+		border-bottom: 1px solid #EEEEEE;
 	}
 </style>

+ 27 - 23
pages/index/index.vue

@@ -78,7 +78,7 @@
 		</view>
 		
 		<view class="advertisement" v-if="homeCardList.ad1.length>0">
-			<swiper class="swiper2" circular  :autoplay="false" :interval="interval"
+			<swiper class="swiper2" circular  :autoplay="true" :interval="interval"
 							:duration="duration" :indicator-dots="true" indicator-color="#CCCCCC" indicator-active-color="#D53533">
 				<swiper-item v-for="(item,index) in homeCardList.ad1">
 					<view class="swiper-item2" @click="goRoter(item)">
@@ -88,7 +88,7 @@
 			</swiper>
 		</view>
 		<view class="advertisement" v-if="homeCardList.ad2.length>0">
-			<swiper class="swiper2" circular  :autoplay="false" :interval="interval"
+			<swiper class="swiper2" circular  :autoplay="true" :interval="interval"
 							:duration="duration" :indicator-dots="true" indicator-color="#CCCCCC" indicator-active-color="#D53533">
 				<swiper-item v-for="(item,index) in homeCardList.ad2">
 					<view class="swiper-item2" @click="goRoter(item)">
@@ -98,7 +98,7 @@
 			</swiper>
 		</view>
 		<view class="advertisement" v-if="homeCardList.ad3.length>0">
-			<swiper class="swiper2" circular  :autoplay="false" :interval="interval"
+			<swiper class="swiper2" circular  :autoplay="true" :interval="interval"
 							:duration="duration" :indicator-dots="true" indicator-color="#CCCCCC" indicator-active-color="#D53533">
 				<swiper-item v-for="(item,index) in homeCardList.ad3">
 					<view class="swiper-item2" @click="goRoter(item)">
@@ -114,31 +114,23 @@
 					<view class="hotSx"></view>
 					<view class="hottitle">热门活动</view>
 				</view>
-				<view class="hotRight">
+				<view class="hotRight" @click="moreJk">
 					<view class="hotMore">更多</view>
 					<img src="../../static/timg/icon_arrow_right.png" alt="" class="hotMoreJt">
 				</view>
 			</view>
-			<view class="hotLine" @click="goJk('../activity/jkDetail')">
+			<view class="hotLine" @click="goJk(item)" v-for="(item,index) in homeCardList.openMActivity.openCollectingList"> 
 				<view class="hotLineTop">
-					<image class="hotLineTopImg" src="http://phone.66km.cn:8088/thFiles/C678448A-C874-4B42-9EAE-4F8F21D71D27.jpg" mode=""></image>
+					<image class="hotLineTopImg" :src="item.img" mode=""></image>
 				    <view class="hotlineTimebox">
-				    	<view class="hotlinestate1">进行中</view>
-						<view class="hotTime">2022.01.21-2022.02.14</view>
+				    	<view class="hotlinestate1" v-if="item.state==2">进行中</view>
+						<view class="hotlinestate2" v-if="item.state==1">未开始</view>
+						<view class="hotTime">{{item.startTime.slice(0,10)}}-{{item.endTime.slice(0,10)}}</view>
 				    </view>
 				</view>
-				<view class="hotName">博世  7月促【CX-200715003】</view>
-			</view>
-			<view class="hotLine">
-				<view class="hotLineTop">
-					<image class="hotLineTopImg" src="http://phone.66km.cn:8088/thFiles/C678448A-C874-4B42-9EAE-4F8F21D71D27.jpg" mode=""></image>
-				    <view class="hotlineTimebox">
-				    	<view class="hotlinestate2">未开始</view>
-						<view class="hotTime">2022.01.21-2022.02.14</view>
-				    </view>
-				</view>
-				<view class="hotName">博世  7月促【CX-200715003】</view>
+				<view class="hotName">{{item.activityName}}</view>
 			</view>
+			
 		</view>
 		<!-- 热门商品 -->
 		<view class="" v-if="homeCardList">
@@ -215,6 +207,8 @@
 				managerInfo:'',
 				unionId:'',
 				ext:'',
+				duration:500,
+				interval:3000,
 			}
 		},
 		onLoad() {
@@ -276,6 +270,11 @@
 					url:'../shop/shop'
 				})
 			},
+			moreJk(){
+				uni.switchTab({
+					url:'../activity/activity'
+				})
+			},
 			information(){
 				console.log('车辆信息--',this.carInfo);
 				uni.navigateTo({
@@ -306,10 +305,15 @@
 					})
 				}
 			},
-			goJk(){
-				uni.navigateTo({
-					url:'../activity/jkDetail'
-				})
+			goJk(item){
+				if(!this.userInfo){
+					this.authorizShow=true;
+				}else{
+					uni.navigateTo({
+						url:'../activity/jkDetail?id='+item.id
+					})
+				}
+				
 			},
 			goRoter(item){
 				console.log(item)