zhengkaixin 2 лет назад
Родитель
Сommit
9c695790bc

+ 3 - 2
.env.dev.js

@@ -8,8 +8,9 @@ const UNI_APP = {
 	SIMPLE_RUN:true,// 无视权限控制跳转页面   , 用于样式人员快速访问各种功能 ,快速测试等
 
 	//openId:"oK9Wr57rAcNzihDN2PEdptprT0As", 
-	openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",
-	//		openId:"oK9Wr5082qZw5rkfvYqSS0xVb5cc",
+	openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",//zkx
+	//openId:"oK9Wr59rru-i3bm7dtTtxnkR-i4s",//杨所
+	//openId:"oK9Wr58zNwDernF0TL6o3mdUxk2A",
 	//		openId:"oK9Wr5xRUoP9EygZqBec0xkJMVTs",
 	//小鹏管家appid
 	//VUE_APP_WXAPPID:"wx7e70eb62a8459869",

+ 1 - 1
manifest.json

@@ -70,7 +70,7 @@
     },
     "h5" : {
         "devServer" : {
-            "port" : 80,
+            "port" : 8080,
             "https" : false,
             "disableHostCheck" : true
         },

+ 7 - 4
pages/searchPile/chargeProcess/charge.vue

@@ -498,11 +498,14 @@
 			},
 			ckInput_f(text) {
 				if (text.indexOf('.') > 0) {
-					this.$nextTick(()=>{
-						text=parseFloat(text).toFixed(2);
-						this.otherNum_f= text
-					})
 					
+					var k =text.split(".")[1]
+					if(k.length>=3){
+						this.$nextTick(()=>{
+							text=parseFloat(text).toFixed(2);
+							this.otherNum_f= text
+						})
+					}
 				}
 				var t = Number(text);
 				if (t < 1) {

+ 25 - 15
pages/searchPile/stationAndPile/stationDetails.vue

@@ -524,7 +524,7 @@
 				this.userId = this.carhelp.getPersonInfo().id;
 
 			}
-			WxJsApi.getWxConfig(['getLocation', 'addEventListener', 'scanQRCode']).then((res) => {
+			WxJsApi.getWxConfig(['getLocation','openLocation', 'addEventListener', 'scanQRCode']).then((res) => {
 				// //(res)
 			}).catch(error => {
 				//(res)
@@ -801,17 +801,26 @@
 			},
 			 
 
-			navigate() {
-				/*wx.openLocation({
-				    latitude: _self.station.latitude,//目的地latitude
-				    longitude: _self.station.longitude,//目的地longitude
-				    name: _self.station.name,
-				    address: _self.station.address,
-				    scale: 15//地图缩放大小,可根据情况具体调整
-				});*/
-				//('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;
+			navigate() {
+				uni.showLoading({
+					
+				})
+				WxJsApi.openLocation({
+				    latitude:parseFloat( _self.stationDetail.station.latitude),//目的地latitude
+				    longitude:parseFloat( _self.stationDetail.station.longitude),//目的地longitude
+				    name: _self.stationDetail.station.name,
+				    address: _self.stationDetail.station.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;
 
 			},
 			charge() {
@@ -840,9 +849,10 @@
 						id
 				})
 			},
-			map() {
-				var item= _self.stationDetail.station
-				window.location.href="https://uri.amap.com/marker?position="+ item.longitude+","+item.latitude+"&name="+item.name;
+			map() {
+				this.navigate()
+				//var item= _self.stationDetail.station
+				//window.location.href="https://uri.amap.com/marker?position="+ item.longitude+","+item.latitude+"&name="+item.name;
 				
 				// //('map'+JSON.stringify(_self.station))
 				// _self.station.address = 'xxxxxxxxxxxxx'

+ 8 - 4
pages/user/finance/recharge.vue

@@ -217,10 +217,14 @@
 			},
 			ckInput(text){
 				if(text.indexOf('.')>0){
-					this.$nextTick(()=>{
-						text=parseFloat(text).toFixed(2);
-						this.otherNum= text
-					})
+					var k =text.split(".")[1]
+					if(k.length>=3){
+						this.$nextTick(()=>{
+							text=parseFloat(text).toFixed(2);
+							this.otherNum= text
+						})
+					}
+					
 				}
 				var t	=Number(text);
 				if(t<1){

BIN
static/img/guide_point.png


+ 11 - 0
utils/wxJsApi.js

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