Browse Source

修改需求

twt 2 years ago
parent
commit
6a7a80006c

+ 2 - 1
pages.json

@@ -301,7 +301,8 @@
 		{
 			"path": "pages/activity/jkDetail",
 			"style": {
-				"navigationBarTitleText": "活动详情"
+				"navigationBarTitleText": "活动详情",
+				"app-plus": { "softinputMode": "adjustPan"}
 			}
 		},
 		{

+ 85 - 22
pages/activity/jkDetail.vue

@@ -86,11 +86,19 @@
 			  <view class="timeviewTxt" > 分</view>
 			</view>
 			<view class="bottomBtnBox">
-				<view class="bottomBtnBoxLeft">
+				<!-- <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> -->
+				<button open-type="share" class="bottomBtnBoxLeft shareBtn" >
+					<image src="../../static/timg/share.png" mode="" class="shareIcon"></image>
+					<view class="shareTxt">分享</view>
+				</button>
+				<!-- 状态1未开始 2进行中3已结束 -->
+				<view class="bottomBtn" v-if="info.state==2" @click="signUp">
+				  <span v-if="info.money">¥{{info.money}} &nbsp; 立即购买</span>
+				  <span v-else>立即报名</span>
+				</view>
 				<view class="bottomBtn2" v-if="info.state==1">报名未开始</view>
 				<view class="bottomBtn2" v-if="info.state==3">报名已结束</view>
 			</view>
@@ -99,7 +107,7 @@
 		<view class="baomingBox" v-if="bmShow" @click="nobmshow">
 			<view class="baomingCont" @click.stop="">
 				<view class="bmTop">
-					<view class="bmTitle">登记信息 领好礼</view>
+					<view class="bmTitle">登记信息</view>
 					<img src="../../static/timg/chahao.png" alt="" class="bmChimg" @click="nobmshow">
 				</view>
 				<view style="padding: 0 24rpx;">
@@ -108,17 +116,17 @@
 						<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 class="bmLine" v-if="info.clWhere.indexOf(1)!=-1" >
+						<input type="text" v-model="mobilePhone" cursor-spacing="10" 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="输入车牌号">
+						<input type="text" v-model="plateNumber"  cursor-spacing="10" class="bmlineInput" placeholder="输入车牌号">
 					</view>
 					<view class="bmLine" v-if="info.clWhere.indexOf(3)!=-1">
-						<input type="text"  v-model="customerName" class="bmlineInput" placeholder="输入姓名">
+						<input type="text"  v-model="customerName"  cursor-spacing="10" class="bmlineInput" placeholder="输入姓名">
 					</view>
 					<view class="bmLine" v-if="info.clWhere.indexOf(4)!=-1">
-						<input type="text"  v-model="unit" class="bmlineInput" placeholder="输入单位">
+						<input type="text"  v-model="unit"  cursor-spacing="10" class="bmlineInput" placeholder="输入单位">
 					</view>
 				</view>
 				<view class="bmTtnBox">
@@ -190,21 +198,25 @@
 				unit:'',
 				plateNumber:'',
 				comment:'',
+				userInfo:'',
 			}
 		},
 		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.collectingID=opt.id;
-           this.getInfo();
-		   this.queryActivityInfo()
+		   this.userInfo=this.$store.state.userInfo;
+		   if(this.userInfo){
+		   	this.collectingID=opt.id;
+		   	this.getInfo();
+		   	this.queryActivityInfo()
+		   }else{
+		   	this.$common.automaticlogin().then(val => {
+		   		this.userInfo=this.$store.state.userInfo;
+		   		
+		   		this.collectingID=opt.id;
+		   		this.getInfo();
+		   		this.queryActivityInfo()
+		   	})
+		   }
+		  
 		},
 		methods: {
 			submitOrder(){
@@ -496,7 +508,30 @@
 			  setTimeout(_this.clock2, 500)
 			}
 		   
-		}
+		},
+		onShareAppMessage(res) {
+			var img='';
+			if(this.info.ImgList.length>0){
+				img=this.info.ImgList[0].url
+			}
+			return {
+				title: this.info.activityName,
+				imageUrl:this.mainImg,
+				path: 'pages/activity/jkDetail?id=' + this.id,
+				success(res){
+					uni.showToast({
+						title:'分享成功'
+					})
+				},
+				fail(res){
+					uni.showToast({
+						title:'分享失败',
+						icon:'none',
+						duration: 3000
+					})
+				}
+			}
+		},
 	}
 </script>
 
@@ -965,4 +1000,32 @@
 		padding: 20rpx 0;
 		border-bottom: 1px solid #EEEEEE;
 	}
+	button::after{
+	 	border: none;
+	}
+	button{
+		position: relative;
+		display: block;
+		margin-left: 0;
+		margin-right: 0;
+		padding-left: 0px;
+		padding-right: 0px;
+		box-sizing: border-box;
+		// font-size: 18px;
+		text-align: center;
+		text-decoration: none;
+		// line-height: 1;
+		line-height: 1.35;
+		// border-radius: 5px;
+		-webkit-tap-highlight-color: transparent;
+		overflow: hidden;
+		color: #000000;
+		background-color: #fff;
+		
+		height: 100%;
+		}
+		.shareBtn{
+			/* width: 100rpx; */
+			background: #FFFFFF;
+		}
 </style>

+ 44 - 29
pages/index/index.vue

@@ -62,23 +62,26 @@
 					  <view class="bxlineMs2" v-else>--</view>
 				  </view>
 				  <view class="bxline bxline2">
-					  <img src="../../static/timg/car2.png" alt="" class="bxlineIcon" style="width: 22rpx;height: 32rpx;">
+					  <img src="../../static/timg/car2.png" alt="" class="bxlineIcon" >
 					  <view class="bxlineTitle">下次保养</view>
-					  <view class="bxlineMs1" v-if="carInfo.nextCareDate||carInfo.nextCareMilage">{{NextCareDate}}天后
-					     <span v-if="carInfo.nextCareMilage">或{{carInfo.nextCareMilage}}km</span>
+					  <view class="bxlineMs1" v-if="carInfo.nextCareDate||carInfo.nextCareMilage">
+					     <span v-if="NextCareDate||NextCareDate===0">{{NextCareDate}}天后</span>
+						 <span v-if="NextCareDate===0&&carInfo.nextCareMilage">或</span>
+						 <span v-if="carInfo.nextCareMilage&&NextCareDate">或</span>
+					     <span v-if="carInfo.nextCareMilage">{{carInfo.nextCareMilage}}km</span>
 					  </view>
 					   <view class="bxlineMs2" v-else>--</view>
 				  </view>
 				  <view class="bxline bxline1">
-					  <img src="../../static/timg/car3.png" alt="" class="bxlineIcon" style="width: 23rpx;height: 30rpx;margin-top: 2rpx;">
+					  <img src="../../static/timg/car3.png" alt="" class="bxlineIcon" >
 					  <view class="bxlineTitle">年审</view>
 					  <view class="bxlineMs1" v-if="carInfo.nextAuditDate">{{NextAuditDate}}天到期</view>
 					   <view class="bxlineMs2" v-else>--</view>
 				  </view>
 				  <view class="bxline bxline2">
-					  <img src="../../static/timg/car4.png" alt="" class="bxlineIcon" style="width: 33rpx;height: 24rpx;margin-top: 6rpx;">
+					  <img src="../../static/timg/car4.png" alt="" class="bxlineIcon" >
 					  <view class="bxlineTitle">保养手册</view>
-					  <view class="bxlineMs2" @click="information">查看</view>
+					  <view class="bxlineMs2" @click="information">点击查看</view>
 				  </view>
 			  </view>
 		  </view>
@@ -283,7 +286,8 @@
 				uni.removeStorageSync('indexaddcar');
 				this.getCarList();
 			}else{
-				this.carInfo=this.$store.state.carInfo
+				this.carInfo=this.$store.state.carInfo;
+				this.jsTime()
 			}
 			
 			
@@ -569,31 +573,45 @@
 					 }else{
 						 this.carInfo=res.data[0]
 						 this.$store.commit('mutationscarInfo', this.carInfo)
-						 this.carInfo.insuranceExpireDate='2022-11-11';
-						 this.carInfo.nextCareDate='2022-08-11';
-						 this.carInfo.nextAuditDate='2022-08-13';
+						/* this.carInfo.insuranceExpireDate='2022-11-11';
+						 this.carInfo.nextAuditDate='2022-08-13'; */
+						  //this.carInfo.nextCareDate='2022-08-11';
+						  //this.carInfo.nextCareMilage=11
 						 this.jsTime()
 					 }
 				 	 				
 				  })
 			 },
 			 jsTime(){
-				 if (Number(new Date().getTime()) > (Number(new Date(this.carInfo.insuranceExpireDate.replace(/-/g, '/')).getTime()) || 0)) {
-				   console.log("现在时间大于开始时间")
-				   this.InsuranceExpireDate = 0
-				 } else {
-				   this.clock()
+				 if(this.carInfo.insuranceExpireDate){
+					if (Number(new Date().getTime()) > (Number(new Date(this.carInfo.insuranceExpireDate.replace(/-/g, '/')).getTime()) || 0)) {
+					  console.log("现在时间大于开始时间")
+					  this.InsuranceExpireDate = 0
+					} else {
+					  this.clock()
+					} 
+				 }else{
+					  this.InsuranceExpireDate=''
 				 }
-				 if (Number(new Date().getTime()) > (Number(new Date(this.carInfo.nextCareDate.replace(/-/g, '/')).getTime()) || 0)) {
-				   this.NextCareDate = 0
-				 } else {
-				   this.clock2()
+				 if(this.carInfo.nextCareDate){
+					if (Number(new Date().getTime()) > (Number(new Date(this.carInfo.nextCareDate.replace(/-/g, '/')).getTime()) || 0)) {
+					  this.NextCareDate = 0
+					} else {
+					  this.clock2()
+					} 
+				 }else{
+					 this.NextCareDate = '' 
 				 }
-				 if (Number(new Date().getTime()) > (Number(new Date(this.carInfo.nextAuditDate.replace(/-/g, '/')).getTime()) || 0)) {
-				   this.NextAuditDate = 0
-				 } else {
-				   this.clock3()
+				 if(this.carInfo.nextAuditDate){
+					if (Number(new Date().getTime()) > (Number(new Date(this.carInfo.nextAuditDate.replace(/-/g, '/')).getTime()) || 0)) {
+					  this.NextAuditDate = 0
+					} else {
+					  this.clock3()
+					} 
+				 }else{
+					 this.NextAuditDate=''
 				 }
+				
 			 },
 			 clock () {
 			   let _this = this
@@ -614,10 +632,7 @@
 			 clock2 () {
 			   let _this = this
 			   let today = new Date() // 当前时间
-			   let h = today.getHours()
-			   let m = today.getMinutes()
-			   let s = today.getSeconds()
-			   let stopTime = new Date(_this.carInfo.insuranceExpireDate.replace(/-/g, '/')) // 结束时间
+			   let stopTime = new Date(_this.carInfo.nextCareDate.replace(/-/g, '/')) // 结束时间
 			   let stopH = stopTime.getHours()
 			   let stopM = stopTime.getMinutes()
 			   let stopS = stopTime.getSeconds()
@@ -718,7 +733,7 @@
 	.bxlineMs1{
 		line-height: 37rpx;
 		color: #D53533;
-		font-size: 24rpx;
+		font-size: 26rpx;
 		padding-left: 12rpx;
 	}
 	.bxlineMs2{
@@ -728,7 +743,7 @@
 		padding-left: 12rpx;
 	}
 	.bxlineIcon{
-		width: 27rpx;
+		width: 34rpx;
 		height: 34rpx;
 		margin-left: 24rpx;
 	}

+ 4 - 3
pages/index/paintSure.vue

@@ -218,6 +218,7 @@
 				 this.$refs.timeSelect.open();
 			},
 			submit() {
+				console.log(this.shopID)
 				if (this.shopID == '') {
 					uni.showToast({
 						title: '请选择服务门店',
@@ -265,8 +266,8 @@
 								duration: 2000
 							});
 							if (this.orderData.sheetType==5){
-								uni.navigateTo({
-									url: "../user/myOrder/paintOrderDetail?id=" +that.orderData.id
+								uni.redirectTo({
+									url: "../user/myOrder/paintOrderDetail?id=" +this.orderData.id
 								})
 							}
 						}
@@ -278,7 +279,7 @@
 							duration: 3000
 						});
 						if (this.orderData.sheetType==5){
-							uni.navigateTo({
+							uni.redirectTo({
 								url: "../user/myOrder/paintOrderDetail?id=" +that.orderData.id
 							})
 						}

BIN
static/timg/car1.png


BIN
static/timg/car2.png


BIN
static/timg/car3.png


BIN
static/timg/car4.png