twt 8 months ago
parent
commit
b74e8f628d
4 changed files with 81 additions and 13 deletions
  1. 6 6
      common/request.js
  2. 70 2
      pages/index/car.vue
  3. 1 1
      pages/index/custom.vue
  4. 4 4
      pages/index/index.vue

+ 6 - 6
common/request.js

@@ -1,15 +1,15 @@
 //测试地址
-/* const baseUrl = 'http://dms.66km.com.cn/'
-//const baseUrl = 'http://192.168.0.14:20187/'
-const configUrl='http://qw.66km.com.cn/' */
+ const baseUrl = 'http://dms.66km.com.cn/'
+//const baseUrl = 'http://192.168.0.10:20187/'
+const configUrl='http://qw.66km.com.cn/' 
 //正式地址
 
 //66 dmsqw.66km.com 
- const baseUrl = 'http://apidms.66km.com/'
-const configUrl='http://dmsqw.66km.com/' 
+/* const baseUrl = 'http://apidms.66km.com/'
+const configUrl='http://dmsqw.66km.com/' */
 //欧洲维修
 /* const baseUrl = 'https://crm.eurorepar.cn/'
-const configUrl='http://dmshf.eurorepar.cn/' */ 
+const configUrl='http://dmshf.eurorepar.cn/'  */
 
 const http = (url = '', date = {}, type = 'POST', header = {
 }) => {

+ 70 - 2
pages/index/car.vue

@@ -24,10 +24,12 @@
 								
 							</view>
 						</view>
-						<view v-if="item.carDetailInfo.NextAuditTime||item.carDetailInfo.InsuranceExpireDate||item.remindSheetInfo.length>0">
+						<!-- <view v-if="item.carDetailInfo.NextAuditTime||item.carDetailInfo.InsuranceExpireDate||item.remindSheetInfo.length>0||item.carDetailInfo.NextCareTime"> -->
+						<view>
 							<image class="carUpimg" v-if="item.show" src="../../static/img/icon_arrow_up.png" mode=""></image>
 							<image class="carUpimg" v-if="!item.show" src="../../static/img/icon_arrow_down.png" mode=""></image>
 						</view>
+						
 					</view>
 					<view class="carData">
 						<view class="carDataLine" > 最新里程:
@@ -76,6 +78,43 @@
 							
 						</view>
 					</view>
+					<view class="" style="border-top: 1px solid #EEEEEE;">
+						<view class="lineTop" v-show="item.carDetailInfo.NextCareTime" @click.stop="carDfn5(item)">
+							<view class="lineTop1">
+								<view class="lineTopNs">
+									<view class="nsTxt">保养提醒</view>
+									<view  v-if="isDateGreater(item.carDetailInfo.NextCareTime)">
+									  <span  v-if="daysUntilDate(item.carDetailInfo.NextCareTime)>30"></span>
+									  <view class="nsStatus" v-else>即将过期</view>
+									</view>
+									<view class="nsStatus" v-else>
+										<span>已过期</span>
+									</view>
+								</view>
+								<view class="lineTimeBox">
+									<span v-if="item.carDetailInfo.NextCareMilage">{{item.carDetailInfo.NextCareMilage}}km/</span>
+									<span>{{item.carDetailInfo.NextCareTime}}</span>
+									<image class="carUpimg" v-show="item.show5" src="../../static/img/icon_arrow_up.png" mode=""></image>
+									<image class="carUpimg" v-show="!item.show5" src="../../static/img/icon_arrow_down.png" mode=""></image>
+								</view>
+							</view>
+							<view class="lineTop2" v-show="item.show5">
+								<view class="chaoqi"  v-if="isDateGreater(item.carDetailInfo.NextCareTime)">
+									<span >距离天数:</span>
+									{{daysUntilDate(item.carDetailInfo.NextCareTime)}}天
+								</view>
+								
+								<view class="chaoqi">
+									<span v-if="!isDateGreater(item.carDetailInfo.NextCareTime)">超期天数:{{daysUntilDate(item.carDetailInfo.NextAuditTime)}}天</span>
+									
+									</view>
+									<view>
+										<view class="lineBtn" @click.stop="sendChat(item,5)">发送提醒</view>
+									</view>
+								
+							</view>
+						</view>
+						</view>
 					<view class="lineCont" v-show="item.carDetailInfo.InsuranceExpireDate" @click.stop="carDfn2(item)">
 						<view class="lcLine">
 							<view class="lineTop1">
@@ -316,6 +355,20 @@
 			   			txt='您好,您的爱车'+item.PlateNumber+item.CategoryName+'维修保养服务已超过预计下次服务日'+day+'5天了,请及时到店保养~'
 			   		}		   
 			   }
+			   if(num==5){
+					var state= this.isDateGreater(item.carDetailInfo.NextCareTime)
+					var day= this.daysUntilDate(item.carDetailInfo.NextCareTime)
+					if(state){
+						if(day>30){
+							txt='您的爱车'+item.PlateNumber+'保养到期时间为'+item.carDetailInfo.NextCareTime+',还有'+day+'天到期,请及时保养~'
+						}else{
+							txt='您的爱车'+item.PlateNumber+'保养到期时间为'+item.carDetailInfo.NextCareTime+',还有'+day+'天即将到期,请及时保养~'
+						}
+						
+					}else{
+						txt='您的爱车'+item.PlateNumber+'保养已于'+item.carDetailInfo.NextCareTime+'过期,为了不影响车辆使用,请及时保养~'
+					}
+			   }
 			   console.log(txt)
 			 /* uni.showToast({
 			  	title: txt,
@@ -354,7 +407,17 @@
 			   })
 		   },
 		   carlineFn(item){
-			   item.show=!item.show
+			   if(item.carDetailInfo.NextAuditTime||item.carDetailInfo.InsuranceExpireDate||item.remindSheetInfo.length>0||item.carDetailInfo.NextCareTime){
+				    item.show=!item.show
+			   }else{
+				   uni.showToast({
+				   	title: '暂无提醒',
+				   	icon: 'none',
+				   	duration: 3000
+				    });
+				   
+			   }
+			  
 		   },
 		   carDfn2(item){
 			    item.show3=!item.show3
@@ -365,6 +428,10 @@
 		   carDfn4(item){
 		   		 item.show4=!item.show4	   
 		   },
+		   carDfn5(item){
+		   		 item.show5=!item.show5   
+		   },
+		   
            getdata(){
 			   this.extCarInfo()
 			  /* var that=this;
@@ -398,6 +465,7 @@
 							item.show2=false
 							item.show3=false
 							item.show4=false
+							item.show5=false
 						})
 					    this.carList=res.data
 					})

+ 1 - 1
pages/index/custom.vue

@@ -211,7 +211,7 @@
 						});
 						uni.setStorage({
 							key: 'unionID',
-							data: ,
+							data:unionID ,
 							 success: function () {	 }
 						});
 						this.keyongMoney= this.customerInfo.creditMoney - this.customerInfo.stayInMoney

+ 4 - 4
pages/index/index.vue

@@ -92,15 +92,15 @@
 			/* this.corpID='wpMGjbBgAA_zIu6wbKy48zFSbGiGeP8g'
 			this.agentId='1000051'
 			this.userId='wmMGjbBgAA0JAbGD5Vu8BzEuYgZhvhOA'
-			//this.token='D226815BF1F1A11DE73489E7B8B3F7CEB2FA7AB1E002EF21F835C7D505158C7DAF945459643F62A3A6FD87751E6880BB'
-			 
-			this.token='26AF53EA2DC528681ABD7B3AC46072E96F0A964431A2453CF0F1DA1C28732A1EAF945459643F62A3A6FD87751E6880BB'
+			this.token='D226815BF1F1A11DE73489E7B8B3F7CEB2FA7AB1E002EF21F835C7D505158C7DAF945459643F62A3A6FD87751E6880BB'
 			 */
+			//this.token='26AF53EA2DC528681ABD7B3AC46072E96F0A964431A2453CF0F1DA1C28732A1EAF945459643F62A3A6FD87751E6880BB'
+			 
 		     //this.userId='wmMGjbBgAALroygkoaVBN4-W2O1daIkg'
 			 //this.token='065BAA93971FEB1A37A08D682FCDB41CC69E76FC36BB038790FB99C5CD71C28EAF945459643F62A3A6FD87751E6880BB'
 		    //this.userId='wmMGjbBgAAeKTdCmEN0CLKPNwJ4ACTxw'
 			//this.token='0A809B6077F4044EDECFC49762B59668E9508B2CA4C6C4791C8894B2B1A7338AAF945459643F62A3A6FD87751E6880BB'
-			/*  uni.setStorage({
+			 /* uni.setStorage({
 				key: 'token',
 				data: that.token,
 				 success: function () {