فهرست منبع

Merge branch 'master' of http://47.92.161.104:10080/zkx/jp-charge

zkx 8 ماه پیش
والد
کامیت
d0fffdbf67
14فایلهای تغییر یافته به همراه353 افزوده شده و 96 حذف شده
  1. 1 0
      README.md
  2. 1 1
      config/.env.dev.js
  3. 4 4
      config/.env.dev.ud.js
  4. 1 1
      config/.env.js
  5. 1 1
      config/.env.prod.js
  6. 1 1
      config/.env.prod.ud.js
  7. 1 1
      config/.env.test.js
  8. 5 3
      config/.env.test.ud.js
  9. 1 28
      package.json
  10. 93 19
      pages/charge/index.vue
  11. 223 29
      pages/charge/switchCharge.vue
  12. 10 7
      pages/index/index.vue
  13. 1 1
      utils/index.js
  14. 10 0
      utils/wxJsApi.js

+ 1 - 0
README.md

@@ -3,6 +3,7 @@
 
 运行方式  uniapp正常运行方式
 
+[](https://modao.cc/app/QnMEBylTr46qjfunYwepmt#screen=skx8b581u08ldkv)
 
 ## 运行与安装
 建议使用uniapp的官方推荐开发工具HBuilder最新版本

+ 1 - 1
config/.env.dev.js

@@ -2,7 +2,7 @@ const UNI_APP = {
 	ProjectName :"51充电联盟",
 	BASE_URL: 'http://charging.xiaoxinda.com/charging-station-test/',
 	//BASE_URL: ' http://charging.xiaoxinda.com/charging-station-test/',
-	//BASE_URL: 'https://51team.xiaoxinda.com/charging-station-server/',
+	//BASE_URL: 'https://youdian.hbjp.com.cn/charging-station-server/',
 	// BASE_URL: 'http://192.168.77.162:8080/charging-station/' ,
 	branchParameter:"51team",//team51,youdian
 	wechatUrl:"/wechat",

+ 4 - 4
config/.env.dev.ud.js

@@ -1,16 +1,16 @@
 const UNI_APP = {  
 	ProjectName :"优电联盟",
-	 BASE_URL: 'https://charging.xiaoxinda.com/charging-station-test/',
-	//BASE_URL: 'https://51team.xiaoxinda.com/charging-station-server/',
+	 BASE_URL: 'https://youdian-test.hbjp.com.cn/charging-station-test/',
+	//BASE_URL: 'https://youdian.hbjp.com.cn/charging-station-server/',
 	// BASE_URL: 'http://192.168.77.162:8080/charging-station/' ,
 	branchParameter:"youdian",//team51,youdian
 	envjs:".ud",
 	wechatUrl:"/youdian",
 	NODE_ENV :"dev",
 	SIMPLE_RUN:true,// 无视权限控制跳转页面   , 用于样式人员快速访问各种功能 ,快速测试等
-	//openId:"oHjCawsxTJkxixR74OVp7aCKahj8",//测试用openId  
+	openId:"oHjCawsxTJkxixR74OVp7aCKahj8",//测试用openId  
 	//openId:"oHjCawgwCGen5k1-hAsimdEX5lZo",
-	openId:"1000",
+	//openId:"1000",
 	//openId:"oK9Wr59rru-i3bm7dtTtxnkR-i4s",
 	//openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",//zkx
 	openId:"oSruR6YkhP7QDroLnZGxWis43Kn0",//zkx

+ 1 - 1
config/.env.js

@@ -9,7 +9,7 @@
 	console.log(NODE_NAME,branchParameter,envjs)
     if (process.env.NODE_ENV === "development") {  
 		 
-         ENV_VAR = require('@/config/.env.dev.js');
+         ENV_VAR = require('@/config/.env.dev.ud.js');
 		 
 		
     } else if (process.env.NODE_ENV === "production") {  

+ 1 - 1
config/.env.prod.js

@@ -2,7 +2,7 @@ const UNI_APP = {
 	ProjectName :"51充电联盟",
   branchParameter:"51team",//team51,youdian
   wechatUrl:"/wechat",
-    BASE_URL: 'https://51team.xiaoxinda.com/charging-station-server/',
+    BASE_URL: 'https://youdian.hbjp.com.cn/charging-station-server/',
 	NODE_ENV :"prod",
 	SIMPLE_RUN:false,
 	openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",//测试用openId

+ 1 - 1
config/.env.prod.ud.js

@@ -1,6 +1,6 @@
 const UNI_APP = {
   	
-    BASE_URL: 'https://51team.xiaoxinda.com/charging-station-server/',
+    BASE_URL: 'https://youdian.hbjp.com.cn/charging-station-server/',
 	NODE_ENV :"prod",
 	SIMPLE_RUN:false,
 	openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",//测试用openId

+ 1 - 1
config/.env.test.js

@@ -1,5 +1,5 @@
 const UNI_APP = {  
-   // BASE_URL: 'https://51team.xiaoxinda.com/charging-station-server/',
+   // BASE_URL: 'https://youdian.hbjp.com.cn/charging-station-server/',
 	ProjectName :"51充电联盟",
 
    //  BASE_URL: 'http://192.168.77.162:8080/charging-station/' ,

+ 5 - 3
config/.env.test.ud.js

@@ -1,8 +1,10 @@
 const UNI_APP = {  
-   // BASE_URL: 'https://51team.xiaoxinda.com/charging-station-server/',
-ProjectName :"优电联盟",
+   // BASE_URL: 'https://youdian.hbjp.com.cn/charging-station-server/',
+	ProjectName :"优电联盟",
    //  BASE_URL: 'http://192.168.77.162:8080/charging-station/' ,
-	BASE_URL: 'http://charging.xiaoxinda.com/charging-station-test/',
+	//BASE_URL: 'https://charging.xiaoxinda.com/charging-station-test/',
+	BASE_URL: 'https://youdian-test.hbjp.com.cn/charging-station-test/',
+	
    // BASE_URL: 'https://charging.xiaoxinda.com/charging-station-server/',
    
 	branchParameter:"youdian",//team51,youdian

+ 1 - 28
package.json

@@ -32,34 +32,7 @@
  },
 "uni-app": {
 		"scripts": {
-			"test-platform": {
-				"title": "test",
-				"BROWSER": "Chrome",
-				"env": {
-					"UNI_PLATFORM": "h5",
-					"NODE_NAME": "test",
-					"branchParameter":"51team",
-					"envjs":""
-				},
-				"define": {
-					"CUSTOM-CONST": true,
-					"NODE_NAME_T": "test-TEAM51"
-				}
-			},
-			"production-platform": {
-				"title": "production",
-				"BROWSER": "Chrome",
-				"env": {
-					"UNI_PLATFORM": "h5",
-					"NODE_NAME": "production",
-					"branchParameter":"51team",
-					"envjs":""
-				},
-				"define": {
-					"CUSTOM-CONST": true,
-					"NODE_NAME_T": "production-TEAM51"
-				}
-			},
+			
 			"test-platform-youdian": {
 				"title": "test-youdian",
 				"BROWSER": "Chrome",

+ 93 - 19
pages/charge/index.vue

@@ -31,7 +31,7 @@
 						<p>桩名:</p>
 						<h4>{{detail.name}}</h4>
 					</view>
-					<view class="u-flex" @click="showTips()">
+					<view class="u-flex" @click="showTips()"  v-if="!(detail.electricityPrice&&detail.servicePrice)">
 						<span>费用说明</span>
 						<u-icon name="error-circle" color="#1677ff" size="32"></u-icon>
 					</view>
@@ -57,11 +57,13 @@
 			</view>
 		</view>
 		<view class="charge">
-			<view class="chargeInfo" style="margin-bottom: 10px;">
-				<p><span style="color:red">*</span>充电{{listTypeIndex==0?'时长':'金额'}} <span style="color:#1677FF;margin-left:10px ">{{getListName()}}</span></p>
-			</view>
 			
-			 
+			
+			 <view class="chargeInfo" v-if="!(detail.electricityPrice&&detail.servicePrice)"
+			  style="margin-bottom: 10px;">
+			 	<p>充电{{listTypeIndex==0?'时长':'金额'}} <span style="color:#1677FF;margin-left:10px ">{{getListName()}}</span></p>
+			 
+			 </view>
 			
 			<u-subsection :list="listType" mode="subsection" active-color="#3786f4" :current="0"
 				@change="changeListType"></u-subsection>
@@ -102,6 +104,23 @@
 				<p v-show="listTypeIndex==0"><span style="color:red">*</span>按时间付费:需要先充值,从余额中扣费,适用会员用户。</p>
 				<p v-show="listTypeIndex==1"><span style="color:red">*</span>按金额付费:无需充值,先付费后使用,未使用完的费用原路退回。</p>
 				
+			</view>
+			<view class="chargeInfo" v-if="(detail.electricityPrice&&detail.servicePrice)"
+			 style="margin-bottom: 10px;padding-top:10px;border-top:1px solid #CDCDCD">
+				<view style="    display: flex;
+    justify-content: space-between;">
+					 <p>充电{{listTypeIndex==0?'时长':'金额'}} <span style="color:#1677FF;margin-left:10px ">{{getListName()}}</span>
+					 
+					 </p>
+					 <view class="u-flex" style="     color: #1677ff;
+    margin-right: 5px;" @click="showTips()">
+						<span>费用说明</span>
+						<u-icon name="error-circle" color="#1677ff" size="32"></u-icon>
+					 </view>
+				 </view>
+				
+				<p>电费单价:{{detail.electricityPrice}}元/千瓦时</p>
+				<p>服务费单价:{{detail.servicePrice}}元/千瓦时</p>
 			</view>
 		</view>
 
@@ -149,13 +168,40 @@
 		</view>
 
 		<u-modal v-model="showPriceList" title="费用说明">
+			<view class="priceListMain">
+				
+				<u-table  v-if="detail.priceList.length" 
+				align="right"
+				border-color="#fff" style=" padding: 20rpx;"  >
+					<u-tr class="u-tr u-tr1">
+						<u-td class="u-td u-td1">充电功率</u-td>
+						<template v-if="detail.priceList[0].electricityPrice&&detail.priceList[0].servicePrice">
+							<u-td class="u-td">电费</u-td>
+							<u-td class="u-td">服务费</u-td>
+						</template>
+						<u-td class="u-td" v-else>费用</u-td>
+					</u-tr>
+					
+					<u-tr class="u-tr"  v-for="(item,i) in detail.priceList" >
+						<u-td class="u-td u-td1">{{item.minPower}}W-{{item.maxPower}}W</u-td>
+						<template v-if="item.electricityPrice&&item.servicePrice">
+							<u-td class="u-td">{{item.electricityPrice}}元/小时</u-td>
+							<u-td class="u-td">{{item.servicePrice}}元/小时</u-td>
+						</template>
+						
+						<u-td class="u-td" v-else>{{item.price}}元/小时</u-td>
+					</u-tr>
+					
+					
+				</u-table>
+			
+				<!-- <p v-for="(item,i) in detail.priceList" class="showPriceList" :key="i">{{item.minPower}}W-{{item.maxPower}}W
+					<span>{{item.price}}元每小时</span></p> -->
 
-			<p v-for="(item,i) in detail.priceList" class="showPriceList" :key="i">{{item.minPower}}W-{{item.maxPower}}W
-				<span>{{item.price}}元每小时</span></p>
-
-			<p style="    padding: 15px;" v-if="detail.roundingMinute!=null&&detail.roundingMinute!=-1">
-				超过{{detail.roundingMinute}}分钟,按1小时记,不足{{detail.roundingMinute}}分钟,不计费</p>
-			<p style="    padding: 15px;" v-if="detail.priceList.length==0">无费用说明或为免费充电模式</p>
+				<p style="    padding: 20rpx;" v-if="detail.roundingMinute!=null&&detail.roundingMinute!=-1">
+					超过{{detail.roundingMinute}}分钟,按1小时记,不足{{detail.roundingMinute}}分钟,不计费</p>
+				<p style="    padding: 20rpx;" v-if="detail.priceList.length==0">无费用说明或为免费充电模式</p>
+			</view>
 		</u-modal>
 
 		<u-modal v-model="showmodel" @confirm="confirm" :showCancelButton="true" title="订单信息">
@@ -606,16 +652,44 @@
 			display: inline-block;
 			width: 100px;
 		}
+	}
+	.u-tr{
+		.u-td{
+			font-size: 24rpx !important;
+		}
+		
+		
+	}
+	.u-tr1{
+		.u-td{
+			font-size: 28rpx !important;
+		}
+	}
+	.u-td1{
+		text-align: left !important;
+	}
+	.u-tr:nth-child(even){
+		background-color: rgba(245, 245, 245, 1);
+		.u-td{
+			border:rgba(245, 245, 245, 1);
+			background-color: rgba(245, 245, 245, 1);
+		}
+		
 	}
-
-	.showPriceList {
-		margin-left: 20px;
-		margin-right: 20px;
-
-		span {
-			float: right;
-		}
+	.priceListMain{
+		p{
+			font-size: 24rpx;
+		}
+		.showPriceList {
+			margin-left: 20px;
+			margin-right: 20px;
+		
+			span {
+				float: right;
+			}
+		}
 	}
+	
 
 	.slot-wrap {
 		display: flex;

+ 223 - 29
pages/charge/switchCharge.vue

@@ -6,7 +6,40 @@
 				<view class="navbar-left"></view>
 				<view class="navbar-right" @click="selectBtn"><span>确定选择</span></view>
 			</view> -->
-		</ujp-navbar>
+		</ujp-navbar>
+		
+		<u-select ref="refselect" title="" v-model="tabsFrom.show1" :defaultValue="current"
+		
+		 :list="selectList" value-name="id" label-name="name"
+		  
+			@confirm="selector1confirm"  >
+		</u-select>
+		<view class="head-head" style="background: #fff;">
+			<view style="
+				text-align: center;
+				display: flex;
+				align-items: center;
+				" >
+				<view style="width: 30%;" @click="tabsFrom.show1=true">
+						{{tabsFrom.show1Text}} <u-icon name="arrow-down" color="#999999"></u-icon>
+				</view>
+				<view style="width: 70%;">
+					<u-search placeholder="搜索站点名称或地址" :show-action="false"	
+						 
+						 @change="searchStationData(1)"  @search="searchStationData(1)" @click="searchStationData(1)"
+						 @custom='searchStationData(1)'
+						 v-model="keyword"></u-search>
+					
+				</view>
+				
+			</view>
+			
+		</view>
+			
+		<view class="head-head-placeholder ">
+			
+		</view>
+		
 		
 		<view class="chargeListStation" v-show="stationShow">
 			<view style="text-align: center;margin-top: 100px" v-if="!stationList.length">
@@ -16,11 +49,11 @@
 				<p  v-else >暂无充电站</p>
 				<p><span style="color: #1677ff;" @click="getPoint()">重新定位?</span></p>
 			</view>
-			<view class="chargeHead" v-if="stationList.length" >已为您查询附近2公里内的充电站</view>
+			<view class="chargeHead" v-if="stationList.length" >已为您查询附近的充电站</view>
 			
 			<template v-for="(item,i) in stationList">
 				
-				<view class="chargeList-item " @click="stationIdSelect=item.id,stationShow=false,getList()" :class="{
+				<view class="chargeList-item " @click="selectStationBtn(item)" :class="{
 				
 			}" :key="i">
 		
@@ -30,12 +63,7 @@
 						<p>名称</p>
 						<span> {{item.name}}</span>
 					</view>
-					<view class="chargeList-item-row" v-if="false">
-						<u-icon name="shoujichongdian" custom-prefix="custom-icon" color="#1677ff" size="40"></u-icon>
-						<p>空闲</p>
-						<span>{{item.availableNumOfChannel}}</span>
-						
-					</view>
+					
 				<!-- 	<view class="chargeList-item-row">
 						<u-icon name="juli" custom-prefix="custom-icon" color="#1677ff" size="40"></u-icon>
 						<p>位置</p>
@@ -48,7 +76,10 @@
 					<span>{{item.address}}</span>
 				</view>
 				</view>
-			</template>
+			</template>
+			
+			<u-divider bg-color="#F2F4F4" v-if="recordsTotal&&stationList.length==recordsTotal"  border-color="#CFD2D5">已经到底了</u-divider>
+			
 		
 		</view>
 		
@@ -60,7 +91,9 @@
 				<p><span style="color: #1677ff;" @click="getPoint()">查询附近站点</span></p>
 			</view>
 			
-			<view class="chargeHead" v-if="list.length" >{{stationName}}<span @click="getPoint()">查询附近站点</span></view>
+			<view class="chargeHead2" v-if="list.length" >
+			<view>{{stationName}}</view>
+			<view class="chargeHead2span" @click="getPoint()">查询附近站点</view></view>
 			
 			<template v-for="(item,i) in list">
 				<view class="chargeList-item " @click="select=item.id,selectBtn()" :class="{
@@ -92,7 +125,14 @@
 					<span>荆鹏软件园1号充电桩</span>
 				</view> -->
 				</view>
-			</template>
+			</template>
+			<view style="
+    display: flex;
+" >
+				<u-button type="success" size="medium" @click="navigate" v-if="selectStation.id&&selectStation.latitude&&selectStation.longitude" >点击查看地图导航</u-button>
+			</view>
+			
+			
 
 		</view>
 	</view>
@@ -112,13 +152,35 @@
 				stationIdSelect: '',
 				stationShow: false,
 				select: '',
-				selectBtnId: '',
+				selectBtnId: '',
+				selectStation:{},
 				index: false,
 				stationName:'',
 				isReady:false,
 				isPoint:true,
 				longitude: 0,
-				latitude: 0,
+				latitude: 0,
+				pageIndex: 1,
+				recordsTotal: 0,
+				keyword:"",
+				selectList:[
+					{id:0,name:"全部"},
+					{id:2,name:"附近2公里"},
+					{id:5,name:"附近5公里"},
+					{id:10,name:"附近10公里"},
+					{id:20,name:"附近20公里"},
+					{id:50,name:"附近50公里"},
+				],
+				current:[1],
+				tabsFrom: {
+					show1: false,
+					show1Index: 2,
+					show2Index: '',
+					show2: false,
+					show1Text: "附近2公里",
+					show2Text: "全部时间",
+					
+				},
 			}
 		},
 		onLoad(op) {
@@ -133,15 +195,68 @@
 			if (op.index) {
 				this.index = true;
 			}
-			WxJsApi.getWxConfig(['getLocation', 'addEventListener', 'scanQRCode']).then((res) => {
+			WxJsApi.getWxConfig(['getLocation', 'addEventListener', 'scanQRCode', 'openLocation']).then((res) => {
 				// //(res)
 				this.isReady=true;
 				
 			}).catch(error => {
 				//(res)
 			})
+		},
+		onReachBottom() {
+			if (this.stationList.length < this.recordsTotal) {
+				this.myLoadmore();
+			}
 		},
-		methods: {
+		methods: {
+			selector1confirm(e){
+				console.log(e)
+				var value = e[0].value
+				var index=this.selectList.findIndex(item=>{
+					return item.id==value
+				})
+				this.current=[index]
+				
+				this.tabsFrom.show1Index=e[0].value
+				
+				this.tabsFrom.show1Text=e[0].label
+				this.searchStationData(1)
+			
+			},
+			navigate() {
+				// x
+				// : 
+				// "112.276527"
+				// y
+				// : 
+				// "30.306427"
+				//console.log(item)
+				uni.showLoading({
+			
+				})
+				WxJsApi.openLocation({
+					latitude: this.selectStation.latitude, //目的地latitude
+					longitude: this.selectStation.longitude, //目的地longitude
+					name: this.selectStation.name,
+					address: this.selectStation.address,
+					scale: 15, //地图缩放大小,可根据情况具体调整
+					success(res) {
+						uni.hideLoading()
+					},
+					complete() {
+						//	uni.hideLoading()
+					}
+				});
+				// //('station'+JSON.stringify(_self.stationDetail.station))
+				// window.location.href = "https://uri.amap.com/marker?position=" + _self.stationDetail.station.longitude +
+				// 	"," + _self.stationDetail.station.latitude + "&name=" + _self.stationDetail.station.name;
+			
+			},
+			myLoadmore() {
+					
+				this.pageIndex += 1;
+				this.searchStationData()
+			},
 			getPoint() {
 				uni.showToast({
 					title: "定位中...请打开定位设置",
@@ -168,7 +283,11 @@
 					})
 				})
 			},
-			searchStationData(){
+			searchStationData(bl){
+				if (bl) {
+					this.stationList = [];
+					this.pageIndex = 1;
+				}
 				uni.showLoading({
 					title: "加载中",
 					mask: true,
@@ -176,13 +295,26 @@
 				
 				var data={
 					longitude: this.longitude,
-					latitude: this.latitude,
-					pageSize:50,
-					raidus:2,
+					latitude: this.latitude,
+					pageIndex:this.pageIndex,
+					pageSize:20,
+					stationName:this.keyword
+					
+				}
+				if(this.tabsFrom.show1Index){
+					data.radius=this.tabsFrom.show1Index
 				}
 				API.chargingStationData(data).then((res) => {
-					this.stationList = res.data.data;
-					this.stationShow = true;
+					//this.stationList = res.data.data;
+					
+					this.stationList = [
+						...this.stationList,
+						...res.data.data
+					];
+					
+					this.stationShow = true;
+					this.recordsTotal = res.data.recordsTotal
+					
 					uni.hideLoading()
 				
 				}).catch(error => {
@@ -194,16 +326,30 @@
 			},
 			customBack() {
 				
-				if(this.stationShow&&this.stationId){
-					this.stationShow=false
-					this.stationIdSelect=stationId
-					this.getList()
+				if(this.stationShow){
+					try{
+						this.stationShow=false
+						//this.stationIdSelect=this.stationId
+						this.getList()
+					}catch(e){
+						//TODO handle the exception
+						uni.redirectTo({
+							url: '/pages/charge/index'
+						})
+					}
+					
 				}else{
 					uni.redirectTo({
 						url: '/pages/charge/index'
 					})
 				}
 				
+			},
+			selectStationBtn(item){
+				this.stationIdSelect=item.id
+				this.stationShow=false
+				this.selectStation=item
+				this.getList()
 			},
 			selectBtn() {
 				this.selectBtnId = this.select;
@@ -221,7 +367,8 @@
 				})
 
 				var data = {
-					//deviceId: this.select,
+					//deviceId: this.select,
+					pageIndex:this.pageIndex,
 					stationId: this.stationIdSelect,
 					pageSize: 50,
 				};
@@ -231,7 +378,6 @@
 					if(this.list.length){
 						this.stationName=this.list[0].stationName
 					}
-					this.recordsTotal = res.data.recordsTotal
 					uni.hideLoading()
 
 				}).catch(error => {
@@ -280,6 +426,18 @@
 			float: right;
 			color: #1677ff;
 		}
+	}
+	.chargeHead2{
+		padding:0 15px ;
+		margin-top: 10px;
+		    justify-content: space-between;
+		    display: flex;
+		.chargeHead2span{
+			float: right;
+			white-space: pre;
+			color: #1677ff;
+			    margin-left: 20px;
+		}
 	}
 
 	.chargeList-item {
@@ -298,7 +456,8 @@
 			}
 
 			p {
-				color: #999;
+				color: #999;
+				white-space: pre;
 				margin: 0 10px;
 			}
 		}
@@ -306,5 +465,40 @@
 
 	.chargeList-item.active {
 		border: 1px solid #1677ff;
+	}
+	
+	.head-head-placeholder{
+		height: 100rpx;
+		
+	}
+	.head-head{
+		box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.15);
+		padding:24rpx;
+		position: fixed;
+		    left: 0;
+		    right: 0;
+		    top: 80rpx;
+		    z-index: 991;
+			.head-body{
+				margin-top: 32rpx;
+				    display: flex;
+				    justify-content: space-around;
+					.head-btn{
+						text-align: center;
+						width: 31%;
+						padding: 12rpx;
+						border: 1px solid #f2f2f2;
+						background-color:#f2f2f2 ;
+						border-radius: 6px;
+						span{
+							margin-left: 4rpx;
+						}
+					}
+					.head-select{
+						border: 1px solid #1677FF;
+						background-color:#1677FF ;
+						color: #fff;
+					}
+			}
 	}
 </style>

+ 10 - 7
pages/index/index.vue

@@ -324,15 +324,18 @@
 										this.setTimeoutId = "";
 										this.f5()
 									}, 5 * 1000)
-								} else if (item.status == 1 && item.startTime) {
+								} else if (item.status == 1 && item.startTime) {
+									
 									var second = secondsDistance(item.startTime);
-									var ms = item.estimateMinute * 60 - second
+									var ms = item.estimateMinute * 60 - second
+									console.log(ms)
 									if (ms < 60 * 10) {
-										this.setTimeoutId = setTimeout(() => {
-											this.setTimeoutId = "";
-											this.f5()
-										}, 5 * 1000)
-									}
+										
+									}
+									this.setTimeoutId = setTimeout(() => {
+										this.setTimeoutId = "";
+										this.f5()
+									}, 5 * 1000)
 								}
 							}
 						}

+ 1 - 1
utils/index.js

@@ -6,7 +6,7 @@ export const newDate = (date) => {
 	var time=null;
 	if (typeof date == 'string') {
 		if (date) {
-			console.log(date)
+			//console.log(date)
 			var reg=new RegExp('-','gi')
 			time=new Date(date.replace(reg,'/'));	
 		}

+ 10 - 0
utils/wxJsApi.js

@@ -219,3 +219,13 @@ export function requestSubscribeMessage(sz) {
 	return promise;
 }
 
+
+
+//扫描二维码
+export function openLocation(obj) {
+ 
+	let promise = new Promise((resolve, reject) => {
+		wx.openLocation(obj)
+	});
+	return promise;
+}