Răsfoiți Sursa

整合一期代码

zaijin 3 ani în urmă
părinte
comite
0c54e46a34

+ 1 - 1
README.md

@@ -1,4 +1,4 @@
-## 城市智慧停车
+## 城市智慧停车(二期)
 ### 打包注意
 - 发行 => 自定义发行 => build:dev(测试环境) / build:pro (正式环境)
 - 如果api地址有变动   修改package.json 中的环境变量配置

Fișier diff suprimat deoarece este prea mare
+ 0 - 0
js_sdk/jweixin-1.4.0.js


+ 0 - 96
js_sdk/ms-openMap/openMap.js

@@ -1,96 +0,0 @@
-import TransformCoordinate from './transformCoordinate.js'
-function openMapByDefault(latitude, longitude, name) {
-	uni.openLocation({
-		latitude: latitude,
-		longitude: longitude,
-		name: name,
-		fail: () => {
-			uni.showModal({
-				content: '打开地图失败,请重'
-			})
-		},
-	})
-}
-function openMapByAndroid(latitude, longitude, name) {
-	let url = ''; // 回调地址
-	let identity = ''; // 程序名称
-	if(plus.runtime.isApplicationExist({pname: 'com.baidu.BaiduMap'})) { // baidumap
-		url = `baidumap://map/marker?location=${latitude},${longitude}&title=${name}&coord_type=gcj02&src=andr.baidu.openAPIdemo`
-		identity = 'com.baidu.BaiduMap'
-		openURL(url, identity)
-	}
-	else if(plus.runtime.isApplicationExist({pname: 'com.autonavi.minimap'})) { // 高德
-		url = `androidamap://viewMap?sourceApplication=appname&poiname=${name}&lat=${latitude}&lon=${longitude}&dev=0`
-		identity = 'com.autonavi.minimap'
-		openURL(url, identity)
-	}
-	else {
-		openMapByDefault(latitude, longitude, name)
-	}
-}
-function openMapByIos(latitude, longitude, name) {
-	let url = ''; // 回调地址
-	let errorCB = ''; // url失败的回调地址
-	let identity = ''; // 程序名称
-
-	if(plus.runtime.isApplicationExist({action: 'baidumap://'})) { // baidumap
-		url = `baidumap://map/marker?location=${latitude},${longitude}&title=${name}&content=${name}&src=ios.baidu.openAPIdemo&coord_type=gcj02`;
-		openURL(url, identity)
-	}
-	else if(plus.runtime.isApplicationExist({action: 'iosamap://'})) { // 高德
-		url = `iosamap://viewMap?sourceApplication=applicationName&poiname=${name}&lat=${latitude}&lon=${longitude}&dev=0`
-		openURL(url, identity)
-	} 
-	else {
-		openMapByDefault(latitude, longitude, name)
-	}
-}
-function openURL(url, identity ) {
-	let newurl = encodeURI(url);
-	plus.runtime.openURL( newurl, function(res){
-		uni.showModal({
-			content: res.message
-		})
-	}, identity);
-}
-function getCoordByType(longitude, latitude, coord_type) {
-	switch (coord_type){
-		case 'gcj02':
-			return [longitude, latitude]
-			break;
-		case 'bd09':
-			return TransformCoordinate.bd09togcj02(longitude, latitude)
-			break;
-		case 'wgs84':
-			return TransformCoordinate.wgs84togcj02(longitude, latitude)
-			break;
-		default:
-			return [longitude, latitude]
-			break;
-	}
-}
-export default {
-	/* 打开地图 */
-	openMap(latitude, longitude, name, coord_type='gcj02') {
-		let arr = getCoordByType(longitude, latitude, coord_type)
-		// #ifdef APP-PLUS
-		switch(uni.getSystemInfoSync().platform){
-			case 'android':
-				console.log('运行Android上')
-				openMapByAndroid(arr[1], arr[0], name)
-				break;
-			case 'ios':
-				console.log('运行iOS上')
-				openMapByIos(arr[1], arr[0], name)
-				break;
-			default:
-				openMapByDefault(arr[1], arr[0], name)
-				console.log('运行在开发者工具上')	
-				break;
-		}	
-		// #endif
-		// #ifndef APP-PLUS
-		openMapByDefault(arr[1], arr[0], name)
-		// #endif
-	}
-}

+ 0 - 126
js_sdk/ms-openMap/transformCoordinate.js

@@ -1,126 +0,0 @@
-/**
- * Created by Wandergis on 2015/7/8.
- * 提供了百度坐标(BD09)、国测局坐标(火星坐标,GCJ02)、和WGS84坐标系之间的转换
- */
- 
-//定义一些常量
-var x_PI = 3.14159265358979324 * 3000.0 / 180.0;
-var PI = 3.1415926535897932384626;
-var a = 6378245.0;
-var ee = 0.00669342162296594323;
- 
-/**
- * 百度坐标系 (BD-09) 与 火星坐标系 (GCJ-02)的转换
- * 即 百度 转 谷歌、高德
- * @param bd_lon
- * @param bd_lat
- * @returns {*[]}
- */
-function bd09togcj02(bd_lon, bd_lat) {
-    var x_pi = 3.14159265358979324 * 3000.0 / 180.0;
-    var x = bd_lon - 0.0065;
-    var y = bd_lat - 0.006;
-    var z = Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * x_pi);
-    var theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * x_pi);
-    var gg_lng = z * Math.cos(theta);
-    var gg_lat = z * Math.sin(theta);
-    return [gg_lng, gg_lat]
-}
- 
-/**
- * 火星坐标系 (GCJ-02) 与百度坐标系 (BD-09) 的转换
- * 即谷歌、高德 转 百度
- * @param lng
- * @param lat
- * @returns {*[]}
- */
-function gcj02tobd09(lng, lat) {
-    var z = Math.sqrt(lng * lng + lat * lat) + 0.00002 * Math.sin(lat * x_PI);
-    var theta = Math.atan2(lat, lng) + 0.000003 * Math.cos(lng * x_PI);
-    var bd_lng = z * Math.cos(theta) + 0.0065;
-    var bd_lat = z * Math.sin(theta) + 0.006;
-    return [bd_lng, bd_lat]
-}
- 
-/**
- * WGS84转GCj02
- * @param lng
- * @param lat
- * @returns {*[]}
- */
-function wgs84togcj02(lng, lat) {
-    if (out_of_china(lng, lat)) {
-        return [lng, lat]
-    }
-    else {
-        var dlat = transformlat(lng - 105.0, lat - 35.0);
-        var dlng = transformlng(lng - 105.0, lat - 35.0);
-        var radlat = lat / 180.0 * PI;
-        var magic = Math.sin(radlat);
-        magic = 1 - ee * magic * magic;
-        var sqrtmagic = Math.sqrt(magic);
-        dlat = (dlat * 180.0) / ((a * (1 - ee)) / (magic * sqrtmagic) * PI);
-        dlng = (dlng * 180.0) / (a / sqrtmagic * Math.cos(radlat) * PI);
-        var mglat = lat + dlat;
-        var mglng = lng + dlng;
-        return [mglng, mglat]
-    }
-}
- 
-/**
- * GCJ02 转换为 WGS84
- * @param lng
- * @param lat
- * @returns {*[]}
- */
-function gcj02towgs84(lng, lat) {
-    if (out_of_china(lng, lat)) {
-        return [lng, lat]
-    }
-    else {
-        var dlat = transformlat(lng - 105.0, lat - 35.0);
-        var dlng = transformlng(lng - 105.0, lat - 35.0);
-        var radlat = lat / 180.0 * PI;
-        var magic = Math.sin(radlat);
-        magic = 1 - ee * magic * magic;
-        var sqrtmagic = Math.sqrt(magic);
-        dlat = (dlat * 180.0) / ((a * (1 - ee)) / (magic * sqrtmagic) * PI);
-        dlng = (dlng * 180.0) / (a / sqrtmagic * Math.cos(radlat) * PI);
-        mglat = lat + dlat;
-        mglng = lng + dlng;
-        return [lng * 2 - mglng, lat * 2 - mglat]
-    }
-}
- 
-function transformlat(lng, lat) {
-    var ret = -100.0 + 2.0 * lng + 3.0 * lat + 0.2 * lat * lat + 0.1 * lng * lat + 0.2 * Math.sqrt(Math.abs(lng));
-    ret += (20.0 * Math.sin(6.0 * lng * PI) + 20.0 * Math.sin(2.0 * lng * PI)) * 2.0 / 3.0;
-    ret += (20.0 * Math.sin(lat * PI) + 40.0 * Math.sin(lat / 3.0 * PI)) * 2.0 / 3.0;
-    ret += (160.0 * Math.sin(lat / 12.0 * PI) + 320 * Math.sin(lat * PI / 30.0)) * 2.0 / 3.0;
-    return ret
-}
- 
-function transformlng(lng, lat) {
-    var ret = 300.0 + lng + 2.0 * lat + 0.1 * lng * lng + 0.1 * lng * lat + 0.1 * Math.sqrt(Math.abs(lng));
-    ret += (20.0 * Math.sin(6.0 * lng * PI) + 20.0 * Math.sin(2.0 * lng * PI)) * 2.0 / 3.0;
-    ret += (20.0 * Math.sin(lng * PI) + 40.0 * Math.sin(lng / 3.0 * PI)) * 2.0 / 3.0;
-    ret += (150.0 * Math.sin(lng / 12.0 * PI) + 300.0 * Math.sin(lng / 30.0 * PI)) * 2.0 / 3.0;
-    return ret
-}
- 
-/**
- * 判断是否在国内,不在国内则不做偏移
- * @param lng
- * @param lat
- * @returns {boolean}
- */
-function out_of_china(lng, lat) {
-    return (lng < 72.004 || lng > 137.8347) || ((lat < 0.8293 || lat > 55.8271) || false);
-}
-
-export default {
-	bd09togcj02: bd09togcj02,  // 百度坐标系 (BD-09) 与 火星坐标系 (GCJ-02)的转换
-	gcj02tobd09: gcj02tobd09, // 火星坐标系 (GCJ-02) 与百度坐标系 (BD-09) 的转换
-	wgs84togcj02: wgs84togcj02,  // 
-	gcj02towgs84: gcj02towgs84,
-}

+ 0 - 7
main.js

@@ -20,13 +20,6 @@ import store from '@/store';
 let vuexStore = require('@/store/$u.mixin.js');
 Vue.mixin(vuexStore);
 
-import $wxApi from "./wxapi.js";
-Vue.prototype.$wxApi = $wxApi;
-
-//微信支付封装
-import $pay from "./pay.js";
-Vue.prototype.$pay = $pay
-
 const app = new Vue({
 	store,
     ...App

+ 0 - 7
pages.json

@@ -72,13 +72,6 @@
 				"navigationBarTitleText": "我的车辆"
 			}
 		},
-		{
-			"path": "pages/payPage/payPage",
-			"style": {
-				// "navigationStyle":"custom",// 隐藏系统导航栏
-				"navigationBarTitleText": "停车记录"
-			}
-		},
 		{
 			"path": "pages/message/message",
 			"style": {

+ 15 - 17
pages/applyRefund/applyRefund.vue

@@ -14,18 +14,11 @@
 					退款原因:
 				</view>
 				<view class="apply-refund-form-content full-width">
-					<textarea
-						v-model="refundForm.refundReason"
-						maxlength="200"
-						placeholder="请填写申请退款原因"
-						:data-maxnum="refundForm.refundReason.length+'/200'"/>
-					<u-upload
-						:header="{
+					<textarea v-model="refundForm.refundReason" maxlength="200" placeholder="请填写申请退款原因"
+						:data-maxnum="refundForm.refundReason.length+'/200'" />
+					<u-upload :header="{
 							Authorization: 'Bearer ' + vuex_token
-						}"
-						max-count="3"
-						ref="uUpload"
-						:action="action"></u-upload>
+						}" max-count="3" ref="uUpload" :action="action"></u-upload>
 				</view>
 			</view>
 		</view>
@@ -50,8 +43,13 @@
 </template>
 
 <script>
-	import {mapState, mapMutations} from 'vuex';
-	import { config } from '@/common/config.js'
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
+		config
+	} from '@/common/config.js'
 	export default {
 		data() {
 			return {
@@ -67,8 +65,8 @@
 				refundTipsContent: ''
 			}
 		},
-		computed: {  
-			...mapState(['vuex_token'])  
+		computed: {
+			...mapState(['vuex_token'])
 		},
 		onLoad(page) {
 			this.refundForm.orderId = page.orderId
@@ -120,7 +118,7 @@
 						title: '请填写申请退款原因',
 						type: 'warning'
 					})
-				} else  if (isHas) {
+				} else if (isHas) {
 					this.$refs.uToast.show({
 						title: '还有图片未完成上传,请稍等!',
 						type: 'warning'
@@ -156,5 +154,5 @@
 </script>
 
 <style lang="scss" scoped>
-@import './applyRefund.scss';
+	@import './applyRefund.scss';
 </style>

+ 3 - 3
pages/applyRefundDetails/applyRefundAchieveDetails.vue

@@ -40,8 +40,8 @@
 		methods: {
 			getOrderRefundDetails(orderId) {
 				this.$u.api.getOrderRefundDetails({
-					orderId: orderId
-				})
+						orderId: orderId
+					})
 					.then(res => {
 						if (res.code === 200) {
 							this.details = res.data
@@ -64,5 +64,5 @@
 </script>
 
 <style lang="scss" scoped>
-@import './applyRefundDetails.scss';
+	@import './applyRefundDetails.scss';
 </style>

+ 3 - 3
pages/applyRefundDetails/applyRefundDetails.vue

@@ -1,9 +1,9 @@
 <template>
 	<view class="refund-details">
-		<u-navbar v-if="details.refundStatus === 0" :is-back="false" back-text="" title="申请退款" :background="{backgroundColor: '#008CFF'}" title-color="#fff"
-			back-icon-color="#fff"></u-navbar>
+		<u-navbar v-if="details.refundStatus === 0" :is-back="false" back-text="" title="申请退款"
+			:background="{backgroundColor: '#008CFF'}" title-color="#fff" back-icon-color="#fff"></u-navbar>
 		<u-navbar v-else back-text="" title="申请退款" :background="{backgroundColor: '#008CFF'}" title-color="#fff"
-				back-icon-color="#fff"></u-navbar>
+			back-icon-color="#fff"></u-navbar>
 		<view class="refund-details-list">
 			<view class="refund-details-list-item">
 				<view class="rdli-label">申请时间:</view>

+ 214 - 224
pages/center/index.vue

@@ -1,264 +1,254 @@
 <template>
-  <view>
+	<view>
 		<!-- ===================================== tabbar ===================================== -->
-    <u-navbar
-      title-color="#fff"
-      :custom-back="customBack"
-      :border-bottom="false"
-      back-icon-color="#CCE8FF"
-      :background="{ background: '#008CFF' }"
-      title="我的"
-    ></u-navbar>
-		
+		<u-navbar title-color="#fff" :custom-back="customBack" :border-bottom="false" back-icon-color="#CCE8FF"
+			:background="{ background: '#008CFF' }" title="我的"></u-navbar>
+
 		<!-- ===================================== 头像 ===================================== -->
-    <view class="u-flex user-box u-p-l-30 u-p-r-20 u-p-b-30 u-p-t-30">
-      <view class="u-m-r-24" @click="clickHead">
-        <u-avatar :src="userInfo.headImgUrl || pic" size="140"></u-avatar>
-      </view>
-      <view class="u-flex-1">
-        <view class="u-font-18 u-p-b-20">{{ userInfo.nickname || userInfo.mobile }}</view>
-        <view class="u-font-14">手机号:{{ userInfo.mobile || '暂无' }}</view>
-      </view>
-    </view>
+		<view class="u-flex user-box u-p-l-30 u-p-r-20 u-p-b-30 u-p-t-30">
+			<view class="u-m-r-24" @click="clickHead">
+				<u-avatar :src="userInfo.headImgUrl || pic" size="140"></u-avatar>
+			</view>
+			<view class="u-flex-1">
+				<view class="u-font-18 u-p-b-20">{{ userInfo.nickname || userInfo.mobile }}</view>
+				<view class="u-font-14">手机号:{{ userInfo.mobile || '暂无' }}</view>
+			</view>
+		</view>
 
-    <view class="u-m-t-20">
-      <u-cell-group>
-        <!-- <u-cell-item title="贵州银行支付" @click="guizhouPay()">
+		<view class="u-m-t-20">
+			<u-cell-group>
+				<!-- <u-cell-item title="贵州银行支付" @click="guizhouPay()">
 					<u-icon slot="icon" custom-prefix="custom-icon" size="35" name="wodecheliang"></u-icon>
         </u-cell-item>-->
-        <u-cell-item title="我的车辆" @click="openPage('pages/myCars/myCars', true)">
-          <u-icon slot="icon" custom-prefix="custom-icon" size="35" name="wodecheliang"></u-icon>
-        </u-cell-item>
-        <u-cell-item title="停车记录" @click="openPage('pages/center/order/order')">
-          <u-icon slot="icon" custom-prefix="custom-icon" size="35" name="tingchejilu"></u-icon>
-        </u-cell-item>
-      </u-cell-group>
-    </view>
-		
-    <view class="u-m-t-20">
-      <u-cell-group>
-        <!-- <u-cell-item title="充值" @click="openPage('pages/myCars/myCars')">
+				<u-cell-item title="我的车辆" @click="openPage('pages/myCars/myCars', true)">
+					<u-icon slot="icon" custom-prefix="custom-icon" size="35" name="wodecheliang"></u-icon>
+				</u-cell-item>
+				<u-cell-item title="停车记录" @click="openPage('pages/center/order/order')">
+					<u-icon slot="icon" custom-prefix="custom-icon" size="35" name="tingchejilu"></u-icon>
+				</u-cell-item>
+			</u-cell-group>
+		</view>
+
+		<view class="u-m-t-20">
+			<u-cell-group>
+				<!-- <u-cell-item title="充值" @click="openPage('pages/myCars/myCars')">
 					<u-icon slot="icon" custom-prefix="custom-icon" size="35" name="chongzhi"></u-icon>
         </u-cell-item>-->
-        <u-cell-item title="包月" @click="openPage('pages/center/monthly/monthly')">
-          <u-icon slot="icon" custom-prefix="custom-icon" size="35" name="baoyue"></u-icon>
-        </u-cell-item>
-        <!-- <u-cell-item title="提现" @click="openPage('pages/center/order/order')">
+				<u-cell-item title="包月" @click="openPage('pages/center/monthly/monthly')">
+					<u-icon slot="icon" custom-prefix="custom-icon" size="35" name="baoyue"></u-icon>
+				</u-cell-item>
+				<!-- <u-cell-item title="提现" @click="openPage('pages/center/order/order')">
 					<u-icon slot="icon" custom-prefix="custom-icon" size="35" name="tixian"></u-icon>
         </u-cell-item>-->
-        <!-- <u-cell-item title="退款" @click="openPage('pages/center/order/order')">
+				<!-- <u-cell-item title="退款" @click="openPage('pages/center/order/order')">
 					<u-icon slot="icon" custom-prefix="custom-icon" size="35" name="tuikuan"></u-icon>
         </u-cell-item>-->
-        <!-- <u-cell-item title="账单记录" @click="openPage('pages/center/order/order')">
+				<!-- <u-cell-item title="账单记录" @click="openPage('pages/center/order/order')">
 					<u-icon slot="icon" custom-prefix="custom-icon" size="35" name="zhangdanjilu"></u-icon>
         </u-cell-item>-->
-      </u-cell-group>
-    </view>
-		
-    <!-- <view class="u-m-t-20">
+			</u-cell-group>
+		</view>
+
+		<!-- <view class="u-m-t-20">
 			<u-cell-group>
 				<u-cell-item title="我的优惠" @click="openPage('pages/myCars/myCars')">
 					<u-icon slot="icon" custom-prefix="custom-icon" size="35" name="wodeyouhui"></u-icon>
 				</u-cell-item>
 			</u-cell-group>
     </view>-->
-    <!-- <view class="u-m-t-20">
+		<!-- <view class="u-m-t-20">
 			<u-cell-group>
 				<u-cell-item title="发票管理" @click="openPage('pages/center/invoice/invoice')">
 					<u-icon slot="icon" custom-prefix="custom-icon" size="35" name="fapiaoguanli"></u-icon>
 				</u-cell-item>
 			</u-cell-group>
     </view>-->
-		
-    <view class="u-m-t-20">
-      <u-cell-group>
-        <u-cell-item title="消息中心" @click="openPage('pages/message/message', true)">
-          <u-icon slot="icon" custom-prefix="custom-icon" size="35" name="xiaoxi"></u-icon>
-          <u-badge type="success" :count="messageNum" :offset="[38, 80]"></u-badge>
-        </u-cell-item>
-      </u-cell-group>
-    </view>
-    <view class="u-m-t-20 u-m-b-40">
-      <u-cell-group>
-        <u-cell-item title="拨打客服电话" @click="phoneCall(phoneNo)">
-          <u-icon slot="icon" custom-prefix="custom-icon" size="35" name="dianhua"></u-icon>
-        </u-cell-item>
-      </u-cell-group>
-    </view>
 
-    <!-- <view class="u-m-t-20">
+		<view class="u-m-t-20">
+			<u-cell-group>
+				<u-cell-item title="消息中心" @click="openPage('pages/message/message', true)">
+					<u-icon slot="icon" custom-prefix="custom-icon" size="35" name="xiaoxi"></u-icon>
+					<u-badge type="success" :count="messageNum" :offset="[38, 80]"></u-badge>
+				</u-cell-item>
+			</u-cell-group>
+		</view>
+		<view class="u-m-t-20 u-m-b-40">
+			<u-cell-group>
+				<u-cell-item title="拨打客服电话" @click="phoneCall(phoneNo)">
+					<u-icon slot="icon" custom-prefix="custom-icon" size="35" name="dianhua"></u-icon>
+				</u-cell-item>
+			</u-cell-group>
+		</view>
+
+		<!-- <view class="u-m-t-20">
 			<u-cell-group>
 				<u-cell-item icon="phone" title="手机号登录" @click="openPage('/pages/center/phoneLogin/phoneLogin')"></u-cell-item>
 			</u-cell-group>
     </view>-->
-		
-    <!-- ===================================== 登出提示 ===================================== -->
-    <u-modal
-      v-model="logoutPop"
-      :title-style="{ color: '#404040' }"
-      title="登出提示"
-      :show-confirm-button="true"
-      confirm-text="确认"
-      :confirm-style="{ backgroundColor: '#3397FA', color: '#fff' }"
-      :show-cancel-button="true"
-      cancel-text="取消"
-      @cancel="logoutPop = false"
-      :cancel-style="{ backgroundColor: '#EBF1FF', color: '#3397FA' }"
-      @confirm="loginOut"
-    >
-      <view class="slot-content">
-        <view class="pay-tips">你确认退出登录吗?</view>
-      </view>
-    </u-modal>
-    <u-toast ref="uToast" />
-  </view>
+
+		<!-- ===================================== 登出提示 ===================================== -->
+		<u-modal v-model="logoutPop" :title-style="{ color: '#404040' }" title="登出提示" :show-confirm-button="true"
+			confirm-text="确认" :confirm-style="{ backgroundColor: '#3397FA', color: '#fff' }" :show-cancel-button="true"
+			cancel-text="取消" @cancel="logoutPop = false"
+			:cancel-style="{ backgroundColor: '#EBF1FF', color: '#3397FA' }" @confirm="loginOut">
+			<view class="slot-content">
+				<view class="pay-tips">你确认退出登录吗?</view>
+			</view>
+		</u-modal>
+		<u-toast ref="uToast" />
+	</view>
 </template>
 
 <script>
-import getUrlParams from '../../utils/getUrlParams.js'
-export default {
-  data() {
-    return {
-      // 默认头像
-      pic: '/static/img/default-avatar.png',
-      // 用户信息
-      userInfo: [],
-      phoneNo: '0851-38222696',
-      logoutPop: false,
-      messageNum: 0
-    }
-  },
-  onLoad() {},
-  onShow() {
-		this.getMsgNum()
-    if (this.$store.state.vuex_hasLogin) {
-      this.userInfo = this.$store.state.vuex_user;
-      if (this.$store.state.vuex_wxinfo) {
-        this.userInfo = Object.assign(this.userInfo, this.$store.state.vuex_wxinfo);
-      }
-    } else {
-      this.userInfo = [];
-    }
-  },
-  methods: {
-		/**
-		 * 打开新页面
-		 * @param {String} path 跳转路径
-		 * @param {flag} flag 返回存储标识
-		 * */
-    openPage(path, flag) {
-      this.$u.route({
-        url: path
-      })
-      if (flag) {
-        uni.setStorage({
-          key: 'messageBack',
-          data: 'pages/center/index'
-        })
-      }
-    },
-    // 获取消息未读条数
-    getMsgNum() {
-      this.$u.api.getIndexData()
-        .then(res => {
-          if (res.code === 200) {
-            let num = 0
-            if (res.data.news) {
-              res.data.news.forEach(item => {
-                if (item.readFlag == 0) {
-                  num += 1
-                }
-              })
-            }
-            this.messageNum = num
-          } else {
-            this.$refs.uToast.show({
-              title: res.msg,
-              type: 'error'
-            })
-          }
-        })
-    },
-		// tabbar 返回
-    customBack() {
-      this.$u.route({
-        type: 'switchTab',
-        url: 'pages/index/index'
-      });
-    },
-		// 拨打电话
-    phoneCall(phone) {
-      uni.makePhoneCall({
-        phoneNumber: phone
-      });
-    },
-		// 登出
-    loginOut() {
-			this.$u.api.codeV2Api.logoutApi().then(res => {
-				if (res.code === 200) {
-					this.$u.vuex('vuex_hasLogin', false);
-					this.$u.vuex('vuex_token', '');
-					this.$u.vuex('vuex_user', null);
-					uni.removeStorage({
-					    key: 'jumpUrl'
-					});
-					uni.removeStorage({
-					    key: 'backUrl'
-					});
-					setTimeout(() => {
-					  this.logoutPop = false
-					  uni.navigateTo({
-					    url: '/pages/center/phoneLogin/phoneLogin'
-					  })
-					}, 500)
-				} else {
-					this.$refs.uToast.show({
-					  title: res.msg || '登出失败',
-					  type: 'error'
+	import getUrlParams from '../../utils/getUrlParams.js'
+	export default {
+		data() {
+			return {
+				// 默认头像
+				pic: '/static/img/default-avatar.png',
+				// 用户信息
+				userInfo: [],
+				phoneNo: '0851-38222696',
+				logoutPop: false,
+				messageNum: 0
+			}
+		},
+		onLoad() {},
+		onShow() {
+			this.getMsgNum()
+			if (this.$store.state.vuex_hasLogin) {
+				this.userInfo = this.$store.state.vuex_user;
+				if (this.$store.state.vuex_wxinfo) {
+					this.userInfo = Object.assign(this.userInfo, this.$store.state.vuex_wxinfo);
+				}
+			} else {
+				this.userInfo = [];
+			}
+		},
+		methods: {
+			/**
+			 * 打开新页面
+			 * @param {String} path 跳转路径
+			 * @param {flag} flag 返回存储标识
+			 * */
+			openPage(path, flag) {
+				this.$u.route({
+					url: path
+				})
+				if (flag) {
+					uni.setStorage({
+						key: 'messageBack',
+						data: 'pages/center/index'
 					})
 				}
-			})
-    },
-		// 点击头像
-    clickHead() {
-      if (this.$store.state.vuex_hasLogin) {
-        this.logoutPop = true
-      }
-    }
-  }
-}
+			},
+			// 获取消息未读条数
+			getMsgNum() {
+				this.$u.api.getIndexData()
+					.then(res => {
+						if (res.code === 200) {
+							let num = 0
+							if (res.data.news) {
+								res.data.news.forEach(item => {
+									if (item.readFlag == 0) {
+										num += 1
+									}
+								})
+							}
+							this.messageNum = num
+						} else {
+							this.$refs.uToast.show({
+								title: res.msg,
+								type: 'error'
+							})
+						}
+					})
+			},
+			// tabbar 返回
+			customBack() {
+				this.$u.route({
+					type: 'switchTab',
+					url: 'pages/index/index'
+				});
+			},
+			// 拨打电话
+			phoneCall(phone) {
+				uni.makePhoneCall({
+					phoneNumber: phone
+				});
+			},
+			// 登出
+			loginOut() {
+				this.$u.api.codeV2Api.logoutApi().then(res => {
+					if (res.code === 200) {
+						this.$u.vuex('vuex_hasLogin', false);
+						this.$u.vuex('vuex_token', '');
+						this.$u.vuex('vuex_user', null);
+						uni.removeStorage({
+							key: 'jumpUrl'
+						});
+						uni.removeStorage({
+							key: 'backUrl'
+						});
+						setTimeout(() => {
+							this.logoutPop = false
+							uni.navigateTo({
+								url: '/pages/center/phoneLogin/phoneLogin'
+							})
+						}, 500)
+					} else {
+						this.$refs.uToast.show({
+							title: res.msg || '登出失败',
+							type: 'error'
+						})
+					}
+				})
+			},
+			// 点击头像
+			clickHead() {
+				if (this.$store.state.vuex_hasLogin) {
+					this.logoutPop = true
+				}
+			}
+		}
+	}
 </script>
 
 <style lang="scss" scoped>
-page {
-  background-color: $my-page-bg-color;
-}
-.user-box {
-  position: relative;
-  background-color: $my-main-color;
-  color: #fff;
-  &:after {
-    position: absolute;
-    right: 0;
-    bottom: 0;
-    content: "";
-    background: url(../../static/img/center-top-bg.png) no-repeat;
-    background-position: -90rpx 0;
-    width: 305rpx;
-    height: 145rpx;
-    z-index: 999;
-  }
-}
-.u-avatar {
-  border: 10rpx solid #4caeff;
-}
-.u-cell-box /deep/ .u-cell__left-icon-wrap,
-.u-cell-box /deep/ .custom-icon {
-  color: $my-main-color;
-  margin-right: 10rpx;
-}
-.pay-tips {
-  text-align: center;
-  margin: 30rpx 0;
-}
+	page {
+		background-color: $my-page-bg-color;
+	}
+
+	.user-box {
+		position: relative;
+		background-color: $my-main-color;
+		color: #fff;
+
+		&:after {
+			position: absolute;
+			right: 0;
+			bottom: 0;
+			content: "";
+			background: url(../../static/img/center-top-bg.png) no-repeat;
+			background-position: -90rpx 0;
+			width: 305rpx;
+			height: 145rpx;
+			z-index: 999;
+		}
+	}
+
+	.u-avatar {
+		border: 10rpx solid #4caeff;
+	}
+
+	.u-cell-box /deep/ .u-cell__left-icon-wrap,
+	.u-cell-box /deep/ .custom-icon {
+		color: $my-main-color;
+		margin-right: 10rpx;
+	}
+
+	.pay-tips {
+		text-align: center;
+		margin: 30rpx 0;
+	}
 </style>

+ 0 - 6
pages/center/monthly/monthly.vue

@@ -84,12 +84,6 @@
 							});
 						}
 					})
-					.catch(err => {
-						this.$refs.uToast.show({
-							title: '操作失败',
-							type: 'error',
-						});
-					})
 			},
 			// 取消订单
 			cancelMonth(monthId) {

+ 1 - 1
pages/center/order/order.vue

@@ -11,7 +11,7 @@
 					<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom">
 						<view class="page-box">
 							<view class="order" @click="goDetails(orderItem)"
-								v-for="(orderItem, index) in  orderList[index]" :key="'o-' + index">
+								v-for="(orderItem, index) in  orderList[current]" :key="'o-' + index">
 								<view class="order-top u-flex">
 									<view class="order-top-left u-flex-1">
 										<view class="car">{{ orderItem.vehicleNo }}</view>

+ 469 - 295
pages/center/order/orderDetails/orderDetails.vue

@@ -1,316 +1,490 @@
 <template>
-	<view class="wrap">
-		<view class="order-info">
-			<u-image class="order-info-img" width="90rpx" height="90rpx" src="../../../../static/img/position.png">
-			</u-image>
-			<view class="addr">{{ orderInfo.roadName }}</view>
-			<view class="pay-amount" v-if="orderInfo.payAmount">-{{ orderInfo.payAmount }}</view>
-			<view class="pay-amount" v-else>{{ orderInfo.payAmount }}</view>
-			<u-cell-group :border="false">
-				<u-cell-item title="车牌号" :arrow="false" :border-bottom="false" :border-top="false"
-					:value="orderInfo.vehicleNo"></u-cell-item>
-				<u-cell-item title="优惠总金额" :arrow="false" :border-bottom="false" :border-top="false"
-					:value="(orderInfo.preferentialAmount ? orderInfo.preferentialAmount.toFixed(2) : 0) + ' 元'">
-				</u-cell-item>
-			</u-cell-group>
-			<!-- 路段显示 -->
-			<u-cell-group v-if="orderType == 'road'">
-				<u-cell-item title="订单编号 " :arrow="false" :border-bottom="false" :border-top="false"
-					:value="orderInfo.orderId"></u-cell-item>
-				<template v-if="orderInfo.deviceType == 1">
-					<u-cell-item title="入场时间 " :arrow="false" :border-bottom="false" :border-top="false"
-						:value="orderInfo.inTime"></u-cell-item>
-					<u-cell-item title="出场时间 " :arrow="false" :border-bottom="false" :border-top="false"
-						:value="orderInfo.outTime"></u-cell-item>
-				</template>
-				<template v-else>
-					<u-cell-item title="开始计费 " :arrow="false" :border-bottom="false" :border-top="false"
-						:value="orderInfo.inTime"></u-cell-item>
-					<u-cell-item title="结束计费 " :arrow="false" :border-bottom="false" :border-top="false"
-						:value="orderInfo.outTime"></u-cell-item>
-				</template>
-				<!-- <u-cell-item
+  <view class="wrap">
+    <view class="order-info">
+      <u-image
+        class="order-info-img"
+        width="90rpx"
+        height="90rpx"
+        src="../../../../static/img/position.png"
+      />
+      <view class="addr">{{ orderInfo.roadName }}</view>
+      <view class="pay-amount" v-if="orderInfo.payAmount">-{{ orderInfo.payAmount }}</view>
+      <view class="pay-amount" v-else>{{ orderInfo.payAmount }}</view>
+      <u-cell-group :border="false">
+        <u-cell-item
+          title="车牌号"
+          :arrow="false"
+          :border-bottom="false"
+          :border-top="false"
+          :value="orderInfo.vehicleNo"
+        />
+        <u-cell-item
+          title="优惠总金额"
+          :arrow="false"
+          :border-bottom="false"
+          :border-top="false"
+          :value="(orderInfo.preferentialAmount ? orderInfo.preferentialAmount.toFixed(2) : 0) + ' 元'"
+        />
+      </u-cell-group>
+      <!-- 路段显示 -->
+      <u-cell-group v-if="orderType == 'road'">
+        <u-cell-item
+          title="订单编号 "
+          :arrow="false"
+          :border-bottom="false"
+          :border-top="false"
+          :value="orderInfo.orderId"
+        />
+        <template v-if="orderInfo.deviceType == 1">
+          <u-cell-item
+            title="入场时间 "
+            :arrow="false"
+            :border-bottom="false"
+            :border-top="false"
+            :value="orderInfo.inTime"
+          />
+          <u-cell-item
+            title="出场时间 "
+            :arrow="false"
+            :border-bottom="false"
+            :border-top="false"
+            :value="orderInfo.outTime"
+          />
+        </template>
+        <template v-else>
+          <u-cell-item
+            title="开始计费 "
+            :arrow="false"
+            :border-bottom="false"
+            :border-top="false"
+            :value="orderInfo.inTime"
+          />
+          <u-cell-item
+            title="结束计费 "
+            :arrow="false"
+            :border-bottom="false"
+            :border-top="false"
+            :value="orderInfo.outTime"
+          />
+        </template>
+        <!-- <u-cell-item
           title="停车时长 "
           :arrow="false"
           :border-bottom="false"
           :border-top="false"
           :value="orderInfo.duration"
-        ></u-cell-item> -->
-				<!-- <u-cell-item
+        />-->
+        <!-- <u-cell-item
 				  title="免费时长 "
 				  :arrow="false"
 				  :border-bottom="false"
 				  :border-top="false"
 				  :value="orderInfo.freeDuration"
-				></u-cell-item> -->
-				<template v-if="orderInfo.deviceType == 1">
-					<u-cell-item title="免费时长 " :arrow="false" :border-bottom="false" :border-top="false"
-						:value="orderInfo.freeDuration"></u-cell-item>
-				</template>
-				<template v-else>
-					<u-cell-item title="免费时长 " :arrow="false" :border-bottom="false" :border-top="false"
-						value="0天0时15分0秒"></u-cell-item>
-				</template>
-				<u-cell-item title="计费时长 " :arrow="false" :border-bottom="false" :border-top="false"
-					:value="orderInfo.calcDuration"></u-cell-item>
-				<u-cell-item title="累计停车时长 " :arrow="false" :border-bottom="false" :border-top="false"
-					:value="orderInfo.duration"></u-cell-item>
-				<u-cell-item v-if="orderInfo.createTime" title="订单创建时间 " :arrow="false" :border-bottom="false"
-					:border-top="false" :value="orderInfo.createTime"></u-cell-item>
-				<u-cell-item v-if="orderInfo.payTime" title="支付时间 " :arrow="false" :border-bottom="false"
-					:border-top="false" :value="orderInfo.payTime"></u-cell-item>
-				<u-cell-item v-if="orderInfo.payStatus == 1" title="缴费方式 " :arrow="false" :border-bottom="false"
-					:border-top="false" :value="orderInfo.paySource | verifyPaySource"></u-cell-item>
-			</u-cell-group>
-			<!-- 停车场时长 -->
-			<u-cell-group v-if="orderType == 'park'">
-				<u-cell-item title="订单编号 " :arrow="false" :border-bottom="false" :border-top="false"
-					:value="orderInfo.orderId"></u-cell-item>
-				<template v-if="orderInfo.deviceType == 1">
-					<u-cell-item title="入场通道 " :arrow="false" :border-bottom="false" :border-top="false"
-						:value="orderInfo.roadwayName"></u-cell-item>
-					<u-cell-item title="入场时间 " :arrow="false" :border-bottom="false" :border-top="false"
-						:value="orderInfo.inTime"></u-cell-item>
-					<u-cell-item title="出场通道 " :arrow="false" :border-bottom="false" :border-top="false"
-						:value="orderInfo.outRoadwayName"></u-cell-item>
-					<u-cell-item title="出场时间 " :arrow="false" :border-bottom="false" :border-top="false"
-						:value="orderInfo.outTime"></u-cell-item>
-				</template>
-				<template v-else>
-					<u-cell-item title="开始计费 " :arrow="false" :border-bottom="false" :border-top="false"
-						:value="orderInfo.inTime"></u-cell-item>
-					<u-cell-item title="结束计费 " :arrow="false" :border-bottom="false" :border-top="false"
-						:value="orderInfo.outTime"></u-cell-item>
-				</template>
-				<template v-if="orderInfo.deviceType == 1">
-					<u-cell-item title="免费时长 " :arrow="false" :border-bottom="false" :border-top="false"
-						:value="orderInfo.freeDuration"></u-cell-item>
-				</template>
-				<template v-else>
-					<u-cell-item title="免费时长 " :arrow="false" :border-bottom="false" :border-top="false"
-						value="0天0时15分0秒"></u-cell-item>
-				</template>
-				<u-cell-item title="计费时长 " :arrow="false" :border-bottom="false" :border-top="false"
-					:value="orderInfo.calcDuration"></u-cell-item>
-				<u-cell-item title="累计停车时长 " :arrow="false" :border-bottom="false" :border-top="false"
-					:value="orderInfo.duration"></u-cell-item>
-				<u-cell-item v-if="orderInfo.createTime" title="订单创建时间 " :arrow="false" :border-bottom="false"
-					:border-top="false" :value="orderInfo.createTime"></u-cell-item>
-				<u-cell-item v-if="orderInfo.payTime" title="支付时间 " :arrow="false" :border-bottom="false"
-					:border-top="false" :value="orderInfo.payTime"></u-cell-item>
-				<u-cell-item v-if="orderInfo.payStatus == 1" title="缴费方式 " :arrow="false" :border-bottom="false"
-					:border-top="false" :value="orderInfo.paySource | verifyPaySource"></u-cell-item>
-			</u-cell-group>
-			<view class="" v-if="orderInfo.deviceType == 1 && orderInfo.payAmount == 0">
-				提示:可寻找附近的收费员打印小票并扫码出场
-			</view>
-		</view>
-		<!-- 显示支付按钮 -->
-		<view class="bottom-btn-wrap" v-if="(orderInfo.payStatus == 0 || orderInfo.payStatus == 2 || orderInfo.payStatus == 3)
-			&& openFlag !== 'open'
-			&& (orderInfo.deviceType != 1 && orderInfo.payAmount != 0)">
-			<view class="bottom-btn" @click="goPay(orderId)">去支付</view>
-		</view>
+        />-->
+        <template v-if="orderInfo.deviceType == 1">
+          <u-cell-item
+            title="免费时长 "
+            :arrow="false"
+            :border-bottom="false"
+            :border-top="false"
+            :value="orderInfo.freeDuration"
+          />
+        </template>
+        <template v-else>
+          <u-cell-item
+            title="免费时长 "
+            :arrow="false"
+            :border-bottom="false"
+            :border-top="false"
+            value="0天0时15分0秒"
+          />
+        </template>
+        <u-cell-item
+          title="计费时长 "
+          :arrow="false"
+          :border-bottom="false"
+          :border-top="false"
+          :value="orderInfo.calcDuration"
+        />
+        <u-cell-item
+          title="累计停车时长 "
+          :arrow="false"
+          :border-bottom="false"
+          :border-top="false"
+          :value="orderInfo.duration"
+        />
+        <u-cell-item
+          v-if="orderInfo.createTime"
+          title="订单创建时间 "
+          :arrow="false"
+          :border-bottom="false"
+          :border-top="false"
+          :value="orderInfo.createTime"
+        />
+        <u-cell-item
+          v-if="orderInfo.payTime"
+          title="支付时间 "
+          :arrow="false"
+          :border-bottom="false"
+          :border-top="false"
+          :value="orderInfo.payTime"
+        />
+        <u-cell-item
+          v-if="orderInfo.payStatus == 1"
+          title="缴费方式 "
+          :arrow="false"
+          :border-bottom="false"
+          :border-top="false"
+          :value="orderInfo.paySource | verifyPaySource"
+        />
+      </u-cell-group>
+      <!-- 停车场时长 -->
+      <u-cell-group v-if="orderType == 'park'">
+        <u-cell-item
+          title="订单编号 "
+          :arrow="false"
+          :border-bottom="false"
+          :border-top="false"
+          :value="orderInfo.orderId"
+        />
+        <template v-if="orderInfo.deviceType == 1">
+          <u-cell-item
+            title="入场通道 "
+            :arrow="false"
+            :border-bottom="false"
+            :border-top="false"
+            :value="orderInfo.roadwayName"
+          />
+          <u-cell-item
+            title="入场时间 "
+            :arrow="false"
+            :border-bottom="false"
+            :border-top="false"
+            :value="orderInfo.inTime"
+          />
+          <u-cell-item
+            title="出场通道 "
+            :arrow="false"
+            :border-bottom="false"
+            :border-top="false"
+            :value="orderInfo.outRoadwayName"
+          />
+          <u-cell-item
+            title="出场时间 "
+            :arrow="false"
+            :border-bottom="false"
+            :border-top="false"
+            :value="orderInfo.outTime"
+          />
+        </template>
+        <template v-else>
+          <u-cell-item
+            title="开始计费 "
+            :arrow="false"
+            :border-bottom="false"
+            :border-top="false"
+            :value="orderInfo.inTime"
+          />
+          <u-cell-item
+            title="结束计费 "
+            :arrow="false"
+            :border-bottom="false"
+            :border-top="false"
+            :value="orderInfo.outTime"
+          />
+        </template>
+        <template v-if="orderInfo.deviceType == 1">
+          <u-cell-item
+            title="免费时长 "
+            :arrow="false"
+            :border-bottom="false"
+            :border-top="false"
+            :value="orderInfo.freeDuration"
+          />
+        </template>
+        <template v-else>
+          <u-cell-item
+            title="免费时长 "
+            :arrow="false"
+            :border-bottom="false"
+            :border-top="false"
+            value="0天0时15分0秒"
+          />
+        </template>
+        <u-cell-item
+          title="计费时长 "
+          :arrow="false"
+          :border-bottom="false"
+          :border-top="false"
+          :value="orderInfo.calcDuration"
+        />
+        <u-cell-item
+          title="累计停车时长 "
+          :arrow="false"
+          :border-bottom="false"
+          :border-top="false"
+          :value="orderInfo.duration"
+        />
+        <u-cell-item
+          v-if="orderInfo.createTime"
+          title="订单创建时间 "
+          :arrow="false"
+          :border-bottom="false"
+          :border-top="false"
+          :value="orderInfo.createTime"
+        />
+        <u-cell-item
+          v-if="orderInfo.payTime"
+          title="支付时间 "
+          :arrow="false"
+          :border-bottom="false"
+          :border-top="false"
+          :value="orderInfo.payTime"
+        />
+        <u-cell-item
+          v-if="orderInfo.payStatus == 1"
+          title="缴费方式 "
+          :arrow="false"
+          :border-bottom="false"
+          :border-top="false"
+          :value="orderInfo.paySource | verifyPaySource"
+        />
+      </u-cell-group>
+			<!-- 地磁订单金额为0并且未支付 -->
+      <view class 
+				v-if="orderInfo.deviceType == 1
+				&& orderInfo.payAmount == 0
+				&& orderInfo.payStatus !== 1"
+			>提示:可寻找附近的收费员打印小票并扫码出场</view>
+    </view>
+    <!-- 地磁显示支付按钮条件  支付状态(0-未支付,2-支付中,3-支付失败)并且订单金额不能为0 -->
+    <template
+      v-if="orderInfo.deviceType === 1
+			&& orderInfo.payStatus !== 1
+			&& openFlag !== 'open'"
+    >
+      <view class="bottom-btn-wrap" v-if="Number(orderInfo.payAmount) !== 0">
+        <view class="bottom-btn" @click="goPay(orderId)">去支付</view>
+      </view>
+      <view class="bottom-btn-wrap" v-else-if="Number(orderInfo.payAmount) === 0">
+        <view class="tips">提示:可寻找附近的收费员打印小票并扫码出场</view>
+      </view>
+    </template>
+    <!-- 其他显示支付按钮条件  支付状态(0-未支付,2-支付中,3-支付失败) -->
+    <template
+      v-else-if="orderInfo.deviceType !== 1
+			&&  orderInfo.payStatus !== 1
+			&& openFlag !== 'open'"
+    >
+      <view class="bottom-btn-wrap">
+        <view class="bottom-btn" @click="goPay(orderId)">去支付</view>
+      </view>
+    </template>
 
-		<view class="bottom-btn-wrap" v-if="openFlag === 'open' && orderInfo.payStatus == 1">
-			<view class="bottom-btn" @click="jumpOrderList()">返回订单页</view>
-		</view>
+    <view class="bottom-btn-wrap" v-if="openFlag === 'open' && orderInfo.payStatus == 1">
+      <view class="bottom-btn" @click="jumpOrderList()">返回订单页</view>
+    </view>
 
-		<!-- 支付方式 -->
-		<PaymentMethod :payWayPop="payWayPop" :exportFlag="exportFlag" :curOrderList="orderList" :jumpUrl="jumpUrl"
-			@closePaymentMethod="closePaymentMethod"></PaymentMethod>
+    <!-- 支付方式 -->
+    <PaymentMethod
+      :payWayPop="payWayPop"
+      :exportFlag="exportFlag"
+      :curOrderList="orderList"
+      :jumpUrl="jumpUrl"
+      @closePaymentMethod="closePaymentMethod"
+    />
 
-		<!-- 加载中遮罩 -->
-		<u-mask :show="loadingMask">
-			<view class="loading-warp">
-				<view class="loading-icon">
-					<u-loading mode="flower" size="50"></u-loading>
-				</view>
-				<view class="loading-text">
-					<text>订单支付状态查询中...</text>
-				</view>
-			</view>
-		</u-mask>
-		<u-toast ref="uToast" />
-	</view>
+    <!-- 加载中遮罩 -->
+    <u-mask :show="loadingMask">
+      <view class="loading-warp">
+        <view class="loading-icon">
+          <u-loading mode="flower" size="50"></u-loading>
+        </view>
+        <view class="loading-text">
+          <text>订单支付状态查询中...</text>
+        </view>
+      </view>
+    </u-mask>
+    <u-toast ref="uToast" />
+  </view>
 </template>
 
 <script>
-	import PaymentMethod from '@/pages/paymentMethod/paymentMethod.vue'
-	export default {
-		components: {
-			PaymentMethod
-		},
-		data() {
-			return {
-				orderId: null,
-				// 用来区分是支付完成返回的标识
-				openFlag: null,
-				polyOrderId: null,
-				// 订单信息
-				orderInfo: {},
-				// 立即支付弹框
-				payWayPop: false,
-				// 订单列表,一般长度为1的数组
-				orderList: [],
-				// 重定向页面
-				jumpUrl: location.href + '&type=open',
-				loadingMask: false,
-				exportFlag: false,
-				// 订单类型  road 路段  park  停车场
-				orderType: 'road'
-			}
-		},
-		onLoad(page) {
-
-			this.orderId = page?.orderId
-			// 该标识判断是否是从支付完成页面回调回来
-			this.openFlag = page?.type
-			this.orderType = page?.orderType
-			this.polyOrderId = page?.polyOrderId
-			if (this.orderId) {
-				// 如果type标识和支付订单id同时存在,证明需要执行轮询判断支付状态,否则直接查询
-				if (this.openFlag && this.polyOrderId) {
-					this.loadingMask = true
-					this.handlePayStatus(this.polyOrderId)
-					let time = 0
-					this.timer = setInterval(() => {
-						time++
-						this.handlePayStatus(this.polyOrderId)
-						// 超过60s直接清除轮询
-						if (time === 60) {
-							clearInterval(this.timer)
-						}
-					}, 1000)
-				} else {
-					this.handleGetOrderinfo(this.orderId, this.orderType)
-				}
-			}
-		},
-		methods: {
-			jumpOrderList() {
-				this.$u.route({
-					url: 'pages/center/order/order'
-				})
-			},
-			/**
-			 * 通过订单id去获取订单信息
-			 * */
-			handleGetOrderinfo(orderId, orderType) {
-				if (orderType == 'road') {
-					this.$u.api.getOrderDetail({
-							id: orderId
-						})
-						.then(res => {
-							if (res.code === 200) {
-								this.orderInfo = res.data
-							} else {
-								this.$refs.uToast.show({
-									title: res.msg,
-									type: 'error'
-								})
-							}
-						})
-				} else {
-					this.$u.api.getRoomOrderDetail({
-							id: orderId
-						})
-						.then(res => {
-							if (res.code === 200) {
-								this.orderInfo = res.data
-							} else {
-								this.$refs.uToast.show({
-									title: res.msg,
-									type: 'error'
-								})
-							}
-						})
-				}
-
-			},
-			/**
-			 * 查询支付状态
-			 * @param { String } orderId
-			 */
-			handlePayStatus(orderId) {
-				this.$u.api.getOrderInfo({
-					orderId
-				}).then(res => {
-					if (res.code === 200) {
-						if (res.data.payStatus === 1 || res.data.payStatus === 3) {
-							this.loadingMask = false
-							clearInterval(this.timer);
-							this.handleGetOrderinfo(this.orderId, this.orderType)
-						}
-					} else {
-						this.$refs.uToast.show({
-							title: res.msg,
-							type: 'error'
-						})
-						this.loadingMask = false
-						clearInterval(this.timer);
-					}
-				}).catch(() => {
-					this.loadingMask = false
-					clearInterval(this.timer);
-				})
-			},
-			goPay(orderId) {
-
-				this.orderList = []
-				this.orderList.push(orderId)
-				if (this.orderType == 'park') {
-					this.exportFlag = true
-				} else {
-					this.exportFlag = false
-				}
-				if (this.orderList.length > 0) {
-					this.payWayPop = true
-
-				} else {
-					this.$refs.uToast.show({
-						title: '当前订单编号不存在,请重新进入当前页面!',
-						type: 'warning'
-					})
-				}
-			},
-			/**
-			 * 关闭支付方式弹框
-			 * */
-			closePaymentMethod() {
-				this.payWayPop = false
-			}
-
-		},
-		filters: {
-			verifyPaySource(value) {
-				if (value === 0) {
-					return '现金支付'
-				} else if (value === 1) {
-					return '微信支付'
-				} else if (value === 2) {
-					return '支付宝支付'
-				} else if (value === 3) {
-					return '贵州银行快捷支付'
-				} else if (value === 4) {
-					return '贵州银行扫码支付'
-				} else if (value === 5) {
-					return '贵州银行被扫支付'
-				} else if (value === 6) {
-					return '贵州银行无感支付'
-				} else {
-					return '其他'
-				}
-			}
-		},
-		destroyed() {
-			if (this.timer) {
-				clearInterval(this.timer)
-			}
-		}
-	}
+import PaymentMethod from '@/pages/paymentMethod/paymentMethod.vue';
+export default {
+  components: {
+    PaymentMethod
+  },
+  data() {
+    return {
+      orderId: null,
+      // 用来区分是支付完成返回的标识
+      openFlag: null,
+      polyOrderId: null,
+      // 订单信息
+      orderInfo: {},
+      // 立即支付弹框
+      payWayPop: false,
+      // 订单列表,一般长度为1的数组
+      orderList: [],
+      // 重定向页面
+      jumpUrl: location.href + '&type=open',
+      loadingMask: false,
+      exportFlag: false,
+      // 订单类型  road 路段  park  停车场
+      orderType: 'road'
+    };
+  },
+  onLoad(page) {
+    this.orderId = page?.orderId;
+    // 该标识判断是否是从支付完成页面回调回来
+    this.openFlag = page?.type;
+    this.orderType = page?.orderType;
+    this.polyOrderId = page?.polyOrderId;
+    if (this.orderId) {
+      // 如果type标识和支付订单id同时存在,证明需要执行轮询判断支付状态,否则直接查询
+      if (this.openFlag && this.polyOrderId) {
+        this.loadingMask = true;
+        this.handlePayStatus(this.polyOrderId);
+        let time = 0;
+        this.timer = setInterval(() => {
+          time++;
+          this.handlePayStatus(this.polyOrderId);
+          // 超过60s直接清除轮询
+          if (time === 60) {
+            clearInterval(this.timer);
+          }
+        }, 1000);
+      } else {
+        this.handleGetOrderinfo(this.orderId, this.orderType);
+      }
+    }
+  },
+  methods: {
+    jumpOrderList() {
+      this.$u.route({
+        url: 'pages/center/order/order'
+      });
+    },
+    /**
+     * 通过订单id去获取订单信息
+     * */
+    handleGetOrderinfo(orderId, orderType) {
+      if (orderType == 'road') {
+        this.$u.api
+          .getOrderDetail({
+            id: orderId
+          })
+          .then((res) => {
+            if (res.code === 200) {
+              this.orderInfo = res.data;
+            } else {
+              this.$refs.uToast.show({
+                title: res.msg,
+                type: 'error'
+              });
+            }
+          });
+      } else {
+        this.$u.api
+          .getRoomOrderDetail({
+            id: orderId
+          })
+          .then((res) => {
+            if (res.code === 200) {
+              this.orderInfo = res.data;
+            } else {
+              this.$refs.uToast.show({
+                title: res.msg,
+                type: 'error'
+              });
+            }
+          });
+      }
+    },
+    /**
+     * 查询支付状态
+     * @param { String } orderId
+     */
+    handlePayStatus(orderId) {
+      this.$u.api
+        .getOrderInfo({
+          orderId
+        })
+        .then((res) => {
+          if (res.code === 200) {
+            if (res.data.payStatus === 1 || res.data.payStatus === 3) {
+              this.loadingMask = false;
+              clearInterval(this.timer);
+              this.handleGetOrderinfo(this.orderId, this.orderType);
+            }
+          } else {
+            this.$refs.uToast.show({
+              title: res.msg,
+              type: 'error'
+            });
+            this.loadingMask = false;
+            clearInterval(this.timer);
+          }
+        })
+        .catch(() => {
+          this.loadingMask = false;
+          clearInterval(this.timer);
+        });
+    },
+    goPay(orderId) {
+      this.orderList = [];
+      this.orderList.push(orderId);
+      if (this.orderType == 'park') {
+        this.exportFlag = true;
+      } else {
+        this.exportFlag = false;
+      }
+      if (this.orderList.length > 0) {
+        this.payWayPop = true;
+      } else {
+        this.$refs.uToast.show({
+          title: '当前订单编号不存在,请重新进入当前页面!',
+          type: 'warning'
+        });
+      }
+    },
+    /**
+     * 关闭支付方式弹框
+     * */
+    closePaymentMethod() {
+      this.payWayPop = false;
+    }
+  },
+  filters: {
+    verifyPaySource(value) {
+      if (value === 0) {
+        return '现金支付';
+      } else if (value === 1) {
+        return '微信支付';
+      } else if (value === 2) {
+        return '支付宝支付';
+      } else if (value === 3) {
+        return '贵州银行快捷支付';
+      } else if (value === 4) {
+        return '贵州银行扫码支付';
+      } else if (value === 5) {
+        return '贵州银行被扫支付';
+      } else if (value === 6) {
+        return '贵州银行无感支付';
+      } else {
+        return '其他';
+      }
+    }
+  },
+  destroyed() {
+    if (this.timer) {
+      clearInterval(this.timer);
+    }
+  }
+};
 </script>
 
 <style lang="scss" scoped>
-	@import "./orderDetails.scss";
+@import './orderDetails.scss';
 </style>

+ 8 - 15
pages/center/phoneLogin/phoneLogin.vue

@@ -8,9 +8,7 @@
 			<u-message-input v-if="show" :focus="true" :value="messageCode" @change="change" @finish="finish"
 				mode="bottomLine" :maxlength="codelength"></u-message-input>
 		</view>
-		<!-- <view class="u-text-center u-type-error" v-if="phoneError">手机号输入错误</view> -->
 		<view class="captcha">
-			<!-- <text v-if="show&&this.messageDisable==false" @tap="noCaptcha">收不到验证码点这里</text> -->
 			<text v-if="messageShow">{{ second }}秒后可重新获取验证码</text>
 		</view>
 		<view class="buttom">
@@ -98,19 +96,13 @@
 							if (that.second <= 0) {
 								that.messageDisable = false
 								that.messageShow = false;
-								if (that.messageCode.lenth != 4) {
-									// this.messageError = true;
-								}
 								clearInterval(interval);
 								that.second = 60;
 							}
 						}, 1000);
 						this.accessToken = res.data.accessToken;
 						this.userId = res.data.userId;
-					}).catch(err => {
-						this.toastMsg = err.code + ":" + err.msg;
-						this.showToast();
-					});
+					})
 				}
 			},
 			// change事件侦听
@@ -130,11 +122,12 @@
 						this.$u.vuex('vuex_token', this.accessToken);
 						this.$u.vuex('vuex_user', res.data);
 						this.$u.vuex('vuex_hasLogin', true);
-						this.wechatLogin()
-
+						this.jumpIndex()
 					} else {
-						this.toastMsg = res.msg;
-						this.showToast();
+						this.$refs.uToast.show({
+							title: res.msg,
+							type: 'error'
+						})
 					}
 				}).catch(err => {
 					this.toastMsg = err.msg;
@@ -153,7 +146,7 @@
 					const pagesIndex = ret.indexOf('pages')
 					if (pagesIndex > (-1)) {
 						const pageUrl = ret.slice(pagesIndex)
-						const tabbarUrl = ['pages/center/index', 'pages/parkingLists/parkingLists']
+						const tabbarUrl = ['pages/center/index', 'pages/parkingLists/parkingLists', 'page/index/index']
 						if (tabbarUrl.indexOf(pageUrl) > (-1)) {
 							setTimeout(() => {
 								uni.switchTab({
@@ -174,7 +167,7 @@
 					}
 				} else {
 					uni.switchTab({
-						url: '../../index/index'
+						url: '/pages/index/index'
 					})
 				}
 			},

+ 23 - 1
pages/geomagnetismLock/geomagnetismLock.vue

@@ -1,6 +1,11 @@
 <template>
 	<!-- 地磁 -->
 	<view class="parking-lock">
+		<view class="Jump">
+			<view class="Jump-btn" @click="jumpArrears">
+				欠费补缴
+			</view>
+		</view>
 		<!-- 地磁支付 -->
 		<template v-if="parkingLockStatus === 1">
 			<view class="parking-lock-pay">
@@ -144,6 +149,11 @@
 			}
 		},
 		methods: {
+			jumpArrears() {
+				uni.navigateTo({
+					url: '../center/order/order?orderStatus=2'
+				})
+			},
 			/**
 			 * 反复查询支付状态
 			 * @param { String } orderId
@@ -208,7 +218,7 @@
 						this.parkingLockStatus = 1
 						this.orderInfo = res.data
 						this.show = false
-						if (res.data.payStatus == 0 || res.data.payStatus == 2) {
+						if (res.data.payStatus == 0 || res.data.payStatus == 2 || res.data.payStatus == 3) {
 							this.is_pay = true
 						} else if (res.data.payStatus == 1) {
 							this.is_pay = false
@@ -248,4 +258,16 @@
 
 <style lang="scss" scoped>
 	@import './geomagnetismLock.scss';
+
+	.Jump {
+		position: fixed;
+		top: 50px;
+		right: 0;
+		background-color: #F6F6FF;
+
+		&-btn {
+			color: rgb(0, 140, 255);
+			padding: 20rpx 30rpx;
+		}
+	}
 </style>

+ 390 - 427
pages/parkingLists/parkingLists.vue

@@ -1,439 +1,402 @@
 <template>
-<view class="parking">
-  <view class="loading" v-show="loading">
-    <u-loadmore status="loading" icon-type="flower" :load-text="{loading: '正在定位中...',}" />
-  </view>
-  <view class="parking-header">
-    <u-search
-			placeholder="搜索停车场"
-			v-model="searchContent"
-			:show-action="false"
-			@change="searchInputChange"
-		></u-search>
-    <u-icon
-			v-if="!searchContent&&isShowSearchParking==false"
-			class="icon"
-			name="list"
-			size="44"
-			color="#ffffff"
-			placeholder-color="#B5B5B5"
-			search-icon-color="#B3B3B3"
-			@click="listIconClick"
-		></u-icon>
-    <u-icon
-			v-if="searchContent||isShowSearchParking==true"
-			class="icon"
-			name="close"
-			size="36"
-			color="#ffffff"
-			placeholder-color="#B5B5B5"
-			search-icon-color="#B3B3B3"
-			@click="clearSearchInput"
-		></u-icon>
-  </view>
-  <view class="parking-map">
-    <map
-      id="pagemap"
-      style="width: 100%; height: calc(100vh - 240rpx);"
-      :show-location="true"
-      :latitude="latitude"
-      :longitude="longitude"
-      @markertap="markertap"
-      :enable-traffic="true"
-      :enable-zoom="true"
-      :scale="scale"
-      :markers="covers"
-		></map>
-  </view>
-  <view class="parking-current-address" v-if="nearParkingFlag">
-    <swiper class="swiper"
-			:current="swiperCurrent"
-			:indicator-dots="false"
-			:autoplay="false"
-			previous-margin="30rpx"
-			next-margin="30rpx"
-			@change="swiperChange"
-		>
-      <swiper-item v-for="(item, index) in nearParkingList" :key="index + 'n'">
-        <view class="swiper-item">
-          <view @click="clickSearchParking(item)">{{item.roadName}}</view>
-          <view>{{item.areaName}}</view>
-          <view class="swiper-item-font">
-            <view>
-              <text>空闲车位</text>
-              <text class="yellow-font">{{item.spaceIdle}}</text>
-            </view>
-            <view v-if="item.monthAmount">
-              <text>包月费用</text>
-              <text class="yellow-font">{{item.monthAmount}}元</text>
-            </view>
-            <view>
-              <text>距离</text>
-              <text>{{item.distance | kmUnit}}</text>
-            </view>
-          </view>
-          <view class="swiper-item-button">
-            <button type="default" @click="navigation(item.latitude, item.longitude)">导航</button>
-            <button
-            type="default"
-            :disabled="!item.monthAmount"
-            :class="{'disabled': !item.monthAmount }"
-            @click="createMonth(item)">办理包月</button>
-          </view>
-          <view @click="lookParkingRule(item)">
-            <text>点击查看停车规则</text>
-            <u-icon name="arrow-right"></u-icon>
-          </view>
-        </view>
-      </swiper-item>
-    </swiper>
-  </view>
-  <view class="parking-address-list" v-if="isShowSearchParking">
-    <view
-			class="parking-address-list-item"
-			v-for="(item, index) in searchParkingList"
-			:key="index + 's'"
-			@click="clickSearchParking(item)"
-		>
-      <view class="pali-left">
-        <view>{{item.roadName}}</view>
-        <view>{{item.areaName}}</view>
-      </view>
-      <view class="pali-right">
-        <image
-        src="../../static/img/distance-icon.png"
-        mode=""
-        @click.stop="navigation(item.latitude, item.longitude)"></image>
-        <view>路线</view>
-      </view>
-    </view>
-  </view>
-  <u-select v-model="mapSelect" :list="mapSelectList" @confirm="mapSelectConfirm"></u-select>
-  <map id="map" hidden="true"></map>
-  <u-toast ref="uToast" />
-</view>
+	<view class="parking">
+		<view class="loading" v-show="loading">
+			<u-loadmore status="loading" icon-type="flower" :load-text="{loading: '正在定位中...',}" />
+		</view>
+		<view class="parking-header">
+			<u-search placeholder="搜索停车场" v-model="searchContent" :show-action="false" @change="searchInputChange">
+			</u-search>
+			<u-icon v-if="!searchContent&&isShowSearchParking==false" class="icon" name="list" size="44" color="#ffffff"
+				placeholder-color="#B5B5B5" search-icon-color="#B3B3B3" @click="listIconClick"></u-icon>
+			<u-icon v-if="searchContent||isShowSearchParking==true" class="icon" name="close" size="36" color="#ffffff"
+				placeholder-color="#B5B5B5" search-icon-color="#B3B3B3" @click="clearSearchInput"></u-icon>
+		</view>
+		<view class="parking-map">
+			<map id="pagemap" style="width: 100%; height: calc(100vh - 240rpx);" :show-location="true"
+				:latitude="latitude" :longitude="longitude" @markertap="markertap" :enable-traffic="true"
+				:enable-zoom="true" :scale="scale" :markers="covers"></map>
+		</view>
+		<view class="parking-current-address" v-if="nearParkingFlag">
+			<swiper class="swiper" :current="swiperCurrent" :indicator-dots="false" :autoplay="false"
+				previous-margin="30rpx" next-margin="30rpx" @change="swiperChange">
+				<swiper-item v-for="(item, index) in nearParkingList" :key="index + 'n'">
+					<view class="swiper-item">
+						<view @click="clickSearchParking(item)">{{item.roadName}}</view>
+						<view>{{item.areaName}}</view>
+						<view class="swiper-item-font">
+							<view>
+								<text>空闲车位</text>
+								<text class="yellow-font">{{item.spaceIdle}}</text>
+							</view>
+							<view v-if="item.monthAmount">
+								<text>包月费用</text>
+								<text class="yellow-font">{{item.monthAmount}}元</text>
+							</view>
+							<view>
+								<text>距离</text>
+								<text>{{item.distance | kmUnit}}</text>
+							</view>
+						</view>
+						<view class="swiper-item-button">
+							<button type="default" @click="navigation(item.latitude, item.longitude)">导航</button>
+							<button type="default" :disabled="!item.monthAmount"
+								:class="{'disabled': !item.monthAmount }" @click="createMonth(item)">办理包月</button>
+						</view>
+						<view @click="lookParkingRule(item)">
+							<text>点击查看停车规则</text>
+							<u-icon name="arrow-right"></u-icon>
+						</view>
+					</view>
+				</swiper-item>
+			</swiper>
+		</view>
+		<view class="parking-address-list" v-if="isShowSearchParking">
+			<view class="parking-address-list-item" v-for="(item, index) in searchParkingList" :key="index + 's'"
+				@click="clickSearchParking(item)">
+				<view class="pali-left">
+					<view>{{item.roadName}}</view>
+					<view>{{item.areaName}}</view>
+				</view>
+				<view class="pali-right">
+					<image src="../../static/img/distance-icon.png" mode=""
+						@click.stop="navigation(item.latitude, item.longitude)"></image>
+					<view>路线</view>
+				</view>
+			</view>
+		</view>
+		<u-select v-model="mapSelect" :list="mapSelectList" @confirm="mapSelectConfirm"></u-select>
+		<map id="map" hidden="true"></map>
+		<u-toast ref="uToast" />
+	</view>
 </template>
 
 <script>
-import Map from '@/js_sdk/ms-openMap/openMap.js'
-import { qqMapTransBMap } from '../../utils/mapTrans.js'
-export default {
-  data () {
-    return {
-      searchContent: '',
-      page_map: '',
-      loading: false,
-      latitude: 26.64969,
-      longitude: 106.636453,
-      scale: 16,
-      currentPosition: {
-        latitude: 26.64969,
-        longitude: 106.636453
-      },
-      covers: [],
-      // 附近列表是否显示
-      nearParkingFlag: false,
-      // 轮播选中
-      swiperCurrent: 0,
-      // 附近停车列表
-      nearParkingList: [],
-      // 是否显示停车场列表
-      isShowSearchParking: false,
-      // 搜索停车场列表
-      searchParkingList: [],
-      // 显示单个停车场数据
-      isShowParkingDetail: false,
-      // 单个停车场数据
-      parkingDetailData: {},
-      mapSelect: false,
-      mapSelectList: [
-        {
-          value: '1',
-          label: '腾讯地图'
-        },
-        // {
-        //  value: '2',
-        //  label: '百度地图'
-        // },
-        {
-          value: '3',
-          label: '高德地图'
-        }
-      ],
-      // 选中位置经纬度
-      currentPositionHover: {}
-    }
-  },
-  onLoad (page) {
-    this.getLocation()
-		// this.getNearRoadsl()
-    if (page.keyword) {
-      this.searchContent = page.keyword
-      this.searchInputChange(page.keyword)
-    }
-  },
-  methods: {
-    /**
-     * 查询输入框发生变化
-     * @date 2021-08-10
-     * @param {String} value
-     */
-    searchInputChange (value) {
-      // 为空时关闭搜索列表
-      if (value === '') {
-        this.isShowSearchParking = false
-      }
-      this.isShowParkingDetail = false
-      this.getNearRoadsl()
-    },
-    /**
-     * 获取定位
-     * @date 2021-08-10
-     * @returns {any}
-     */
-    getLocation () {
-      const that = this
-      console.log('请求定位')
-      that.loading = true
+	import {
+		qqMapTransBMap
+	} from '../../utils/mapTrans.js'
+	export default {
+		data() {
+			return {
+				searchContent: '',
+				page_map: '',
+				loading: false,
+				latitude: 26.64969,
+				longitude: 106.636453,
+				scale: 16,
+				currentPosition: {
+					latitude: 26.64969,
+					longitude: 106.636453
+				},
+				covers: [],
+				// 附近列表是否显示
+				nearParkingFlag: false,
+				// 轮播选中
+				swiperCurrent: 0,
+				// 附近停车列表
+				nearParkingList: [],
+				// 是否显示停车场列表
+				isShowSearchParking: false,
+				// 搜索停车场列表
+				searchParkingList: [],
+				// 显示单个停车场数据
+				isShowParkingDetail: false,
+				// 单个停车场数据
+				parkingDetailData: {},
+				mapSelect: false,
+				mapSelectList: [{
+						value: '1',
+						label: '腾讯地图'
+					},
+					// {
+					//  value: '2',
+					//  label: '百度地图'
+					// },
+					{
+						value: '3',
+						label: '高德地图'
+					}
+				],
+				// 选中位置经纬度
+				currentPositionHover: {}
+			}
+		},
+		onLoad(page) {
+			this.getLocation()
+			// this.getNearRoadsl()
+			if (page.keyword) {
+				this.searchContent = page.keyword
+				this.searchInputChange(page.keyword)
+			}
+		},
+		methods: {
+			/**
+			 * 查询输入框发生变化
+			 * @date 2021-08-10
+			 * @param {String} value
+			 */
+			searchInputChange(value) {
+				// 为空时关闭搜索列表
+				if (value === '') {
+					this.isShowSearchParking = false
+				}
+				this.isShowParkingDetail = false
+				this.getNearRoadsl()
+			},
+			/**
+			 * 获取定位
+			 * @date 2021-08-10
+			 * @returns {any}
+			 */
+			getLocation() {
+				const that = this
+				console.log('请求定位')
+				that.loading = true
 
-      if (navigator.geolocation) {
-        // 判断是否有这个对象
-        navigator.geolocation.getCurrentPosition(function (pos) {
-          console.log('经度:' + pos.coords.longitude + '纬度:' + pos.coords.latitude)
-          that.latitude = pos.coords.latitude
-          that.longitude = pos.coords.longitude
-          that.currentPosition.latitude = pos.coords.latitude
-          that.currentPosition.longitude = pos.coords.longitude
-          that.loading = false
-          that.getNearRoadsl()
-        })
-      } else {
-        this.$refs.uToast.show({
-          title: '当前系统不支持GPS API',
-          type: 'error'
-        })
-      };
-    },
-    /**
-     * 导航
-     * @date 2021-08-10
-     * @param {Number} latitude
-     * @param {Number} longitude
-     * @returns {any}
-     */
-    navigation (latitude, longitude) {
-      this.currentPositionHover = {
-        latitude: latitude,
-        longitude: longitude
-      }
-      this.mapSelect = true
-      // 腾讯地图用webview
-      // uni.navigateTo({
-      //   url: '/pages/parkingLists/map_web_view/map_web_view?url=https://3gimg.qq.com/lightmap/v1/marker/?marker=coord:'+latitude+','+longitude+'&referer=myApp&key=BOGBZ-2BZ33-O4L32-Y3QJR-PGN66-RFFEL'
-      // })
-      /* 组件多地图调用 */
-      // this.nearParkingFlag = false
-      // var options = {
-      //     destination:{  // 导航终点点坐标和名称
-      //         latitude: latitude,
-      //         longitude: longitude,
-      //         name: "终点"
-      //     },
-      //     mapId: "map" // map 组件的 id (微信小程序端必传)
-      // }
-      // Map.navigation(options)
-    },
-    // 多地图选择
-    mapSelectConfirm (item) {
-      const name = item[0].label
-      switch (name) {
-        case '腾讯地图':
-          uni.navigateTo({
-            url: '/pages/parkingLists/map_web_view/map_web_view?url=https://3gimg.qq.com/lightmap/v1/marker/?marker=coord:' + this.currentPositionHover.latitude + ',' + this.currentPositionHover.longitude + '&referer=myApp&key=BOGBZ-2BZ33-O4L32-Y3QJR-PGN66-RFFEL'
-          })
-          // uni.navigateTo({
-          //   url: '/pages/parkingLists/map_web_view/map_web_view?url=https://3gimg.qq.com/lightmap/v1/marker/?marker=coord:'+this.currentPositionHover.latitude+','+this.currentPositionHover.longitude+'&referer=myApp&key=BOGBZ-2BZ33-O4L32-Y3QJR-PGN66-RFFEL'
-          // })
-          break
-        case '百度地图':
-          const bdOriginPoint = qqMapTransBMap(this.currentPosition.longitude, this.currentPosition.latitude) // 起点坐标
-          const bdCurrPoint = qqMapTransBMap(this.currentPositionHover.longitude, this.currentPositionHover.latitude) // 终点坐标
-          const baiduMap = 'https://map.baidu.com/mobile/webapp/index/index/foo=bar/vt=map'
-          const bdurl = `https://api.map.baidu.com/direction?origin=latlng:${bdOriginPoint.lat},${bdOriginPoint.lng}|name:起点&destination=latlng:${bdCurrPoint.lat},${bdCurrPoint.lng}|name:终点&mode=driving&output=html&src=webapp.baidu.openAPIdemo`
-          console.log('百度地图theurl', bdurl)
-          window.location.href = baiduMap
-          break
-        case '高德地图':
-          const gdurl = `https://uri.amap.com/navigation?from=${this.currentPosition.longitude},${this.currentPosition.latitude},起点&to=${this.currentPositionHover.longitude},${this.currentPositionHover.latitude},终点&mode=car&policy=1&src=mypage&coordinate=gaode&callnative=0`
-          console.log('高德地图theurl', gdurl)
-          window.location.href = gdurl
-          // window.open(url, "_blank", "scrollbars=yes,resizable=1,modal=false,alwaysRaised=yes");
-          // uni.navigateTo({
-          //   url: `/pages/parkingLists/map_web_view/map_web_view?url=${encodeURIComponent(`//uri.amap.com/navigation?from=${this.currentPosition.longitude},${this.currentPosition.latitude},起点&to=${this.currentPositionHover.longitude},${this.currentPositionHover.latitude},终点&mode=car&policy=1&src=mypage&coordinate=gaode&callnative=0`)}`
-          // })
-          break
-      }
-    },
-    /**
-     * 清空搜索框内容
-     * @date 2021-08-10
-     * @returns {any}
-     */
-    clearSearchInput () {
-      this.searchContent = ''
-      this.isShowSearchParking = false
-      this.getNearRoadsl()
-    },
-    /**
-     * 默认首个点放大 如果有传入经纬度则对应的点放大
-     * @date 2021-08-10
-     * @param {Number} lon
-     * @param {Number} lat
-     * @returns {any}
-     */
-    getNearRoadsl (lon, lat) {
-      this.$u.api.nearRoadsl({
-        latitude: this.currentPosition.latitude,
-        longitude: this.currentPosition.longitude,
-        roadName: this.searchContent
-      })
-        .then(res => {
-          const nearParkingList = [] // 附近停车场列表
-          this.covers = []
-          res.data.forEach((item, index, arr) => {
-            if (item.latitude && item.longitude) {
-              nearParkingList.push(item)
-              const marker = {
-                latitude: item.latitude,
-                longitude: item.longitude,
-                id: String(index),
-                iconPath: require('./../../static/img/parking-icon.png'),
-                width: 20,
-                height: 25
-              }
-              // 选中经纬度图标变大
-              if (lon && lat) {
-                if (lon === item.longitude && lat === item.latitude) {
-                  marker.width = 40
-                  marker.height = 50
-                }
-              } else {
-                if (this.covers.length > 0) {
-                  this.covers[0].width = 40
-                  this.covers[0].height = 50
-                }
-              }
-              this.covers.push(marker)
-            }
-          })
-          this.nearParkingList = nearParkingList
-          if (nearParkingList.length > 0) {
-            this.latitude = nearParkingList[0]?.latitude || this.currentPosition.latitude
-            this.longitude = nearParkingList[0]?.longitude || this.currentPosition.longitude
-          } else {
-            this.$refs.uToast.show({
-              title: '没有相关停车场信息',
-              type: 'warning'
-            })
-          }
-          this.nearParkingFlag = true
-          if (this.searchContent) {
-            this.searchParkingList = nearParkingList
-            this.isShowSearchParking = true
-            this.nearParkingFlag = false
-          }
-        }).catch(err => {
-          this.$refs.uToast.show({
-            title: err.msg,
-            type: 'error'
-          })
-        })
-    },
-    /**
-      * 点击地图上的标记点触发
-      **/
-    markertap (e) {
-      let lon, lat
-      this.covers.forEach((item, index) => {
-        if (e.detail.markerId === item.id) {
-          lon = item.longitude
-          lat = item.latitude
-          this.swiperCurrent = index
-        }
-      })
-      this.getNearRoadsl(lon, lat)
-    },
-    /**
-     * 地址发生变化
-     * @date 2021-08-10
-     * @param {Object} item
-     * @returns {any}
-     */
-    swiperChange (item) {
-      const map = uni.createMapContext('pagemap')
-      map.moveToLocation({
-        longitude: this.nearParkingList[item.detail.current].longitude,
-        latitude: this.nearParkingList[item.detail.current].latitude
-      })
-      this.getNearRoadsl(this.nearParkingList[item.detail.current].longitude, this.nearParkingList[item.detail.current].latitude)
-    },
-    /**
-     * 点击单个停车场看详情
-     * @date 2021-08-10
-     * @param {Object} item 为选中项参数
-     * @returns {any}
-     */
-    clickSearchParking (item) {
-			if (item.monthAmount) {
+				if (navigator.geolocation) {
+					// 判断是否有这个对象
+					navigator.geolocation.getCurrentPosition(function(pos) {
+						console.log('经度:' + pos.coords.longitude + '纬度:' + pos.coords.latitude)
+						that.latitude = pos.coords.latitude
+						that.longitude = pos.coords.longitude
+						that.currentPosition.latitude = pos.coords.latitude
+						that.currentPosition.longitude = pos.coords.longitude
+						that.loading = false
+						that.getNearRoadsl()
+					})
+				} else {
+					this.$refs.uToast.show({
+						title: '当前系统不支持GPS API',
+						type: 'error'
+					})
+				};
+			},
+			/**
+			 * 导航
+			 * @date 2021-08-10
+			 * @param {Number} latitude
+			 * @param {Number} longitude
+			 * @returns {any}
+			 */
+			navigation(latitude, longitude) {
+				this.currentPositionHover = {
+					latitude: latitude,
+					longitude: longitude
+				}
+				this.mapSelect = true
+				// 腾讯地图用webview
+				// uni.navigateTo({
+				//   url: '/pages/parkingLists/map_web_view/map_web_view?url=https://3gimg.qq.com/lightmap/v1/marker/?marker=coord:'+latitude+','+longitude+'&referer=myApp&key=BOGBZ-2BZ33-O4L32-Y3QJR-PGN66-RFFEL'
+				// })
+				/* 组件多地图调用 */
+				// this.nearParkingFlag = false
+				// var options = {
+				//     destination:{  // 导航终点点坐标和名称
+				//         latitude: latitude,
+				//         longitude: longitude,
+				//         name: "终点"
+				//     },
+				//     mapId: "map" // map 组件的 id (微信小程序端必传)
+				// }
+				// Map.navigation(options)
+			},
+			// 多地图选择
+			mapSelectConfirm(item) {
+				const name = item[0].label
+				switch (name) {
+					case '腾讯地图':
+						uni.navigateTo({
+							url: '/pages/parkingLists/map_web_view/map_web_view?url=https://3gimg.qq.com/lightmap/v1/marker/?marker=coord:' +
+								this.currentPositionHover.latitude + ',' + this.currentPositionHover.longitude +
+								'&referer=myApp&key=BOGBZ-2BZ33-O4L32-Y3QJR-PGN66-RFFEL'
+						})
+						break
+					case '百度地图':
+						const bdOriginPoint = qqMapTransBMap(this.currentPosition.longitude, this.currentPosition
+							.latitude) // 起点坐标
+						const bdCurrPoint = qqMapTransBMap(this.currentPositionHover.longitude, this.currentPositionHover
+							.latitude) // 终点坐标
+						const baiduMap = 'https://map.baidu.com/mobile/webapp/index/index/foo=bar/vt=map'
+						const bdurl =
+							`https://api.map.baidu.com/direction?origin=latlng:${bdOriginPoint.lat},${bdOriginPoint.lng}|name:起点&destination=latlng:${bdCurrPoint.lat},${bdCurrPoint.lng}|name:终点&mode=driving&output=html&src=webapp.baidu.openAPIdemo`
+						console.log('百度地图theurl', bdurl)
+						window.location.href = baiduMap
+						break
+					case '高德地图':
+						const gdurl =
+							`https://uri.amap.com/navigation?from=${this.currentPosition.longitude},${this.currentPosition.latitude},起点&to=${this.currentPositionHover.longitude},${this.currentPositionHover.latitude},终点&mode=car&policy=1&src=mypage&coordinate=gaode&callnative=0`
+						console.log('高德地图theurl', gdurl)
+						window.location.href = gdurl
+						// window.open(url, "_blank", "scrollbars=yes,resizable=1,modal=false,alwaysRaised=yes");
+						// uni.navigateTo({
+						//   url: `/pages/parkingLists/map_web_view/map_web_view?url=${encodeURIComponent(`//uri.amap.com/navigation?from=${this.currentPosition.longitude},${this.currentPosition.latitude},起点&to=${this.currentPositionHover.longitude},${this.currentPositionHover.latitude},终点&mode=car&policy=1&src=mypage&coordinate=gaode&callnative=0`)}`
+						// })
+						break
+				}
+			},
+			/**
+			 * 清空搜索框内容
+			 * @date 2021-08-10
+			 * @returns {any}
+			 */
+			clearSearchInput() {
+				this.searchContent = ''
+				this.isShowSearchParking = false
+				this.getNearRoadsl()
+			},
+			/**
+			 * 默认首个点放大 如果有传入经纬度则对应的点放大
+			 * @date 2021-08-10
+			 * @param {Number} lon
+			 * @param {Number} lat
+			 * @returns {any}
+			 */
+			getNearRoadsl(lon, lat) {
+				this.$u.api.nearRoadsl({
+						latitude: this.currentPosition.latitude,
+						longitude: this.currentPosition.longitude,
+						roadName: this.searchContent
+					})
+					.then(res => {
+						const nearParkingList = [] // 附近停车场列表
+						this.covers = []
+						res.data.forEach((item, index, arr) => {
+							if (item.latitude && item.longitude) {
+								nearParkingList.push(item)
+								const marker = {
+									latitude: item.latitude,
+									longitude: item.longitude,
+									id: String(index),
+									iconPath: require('./../../static/img/parking-icon.png'),
+									width: 20,
+									height: 25
+								}
+								// 选中经纬度图标变大
+								if (lon && lat) {
+									if (lon === item.longitude && lat === item.latitude) {
+										marker.width = 40
+										marker.height = 50
+									}
+								} else {
+									if (this.covers.length > 0) {
+										this.covers[0].width = 40
+										this.covers[0].height = 50
+									}
+								}
+								this.covers.push(marker)
+							}
+						})
+						this.nearParkingList = nearParkingList
+						if (nearParkingList.length > 0) {
+							this.latitude = nearParkingList[0]?.latitude || this.currentPosition.latitude
+							this.longitude = nearParkingList[0]?.longitude || this.currentPosition.longitude
+						} else {
+							this.$refs.uToast.show({
+								title: '没有相关停车场信息',
+								type: 'warning'
+							})
+						}
+						this.nearParkingFlag = true
+						if (this.searchContent) {
+							this.searchParkingList = nearParkingList
+							this.isShowSearchParking = true
+							this.nearParkingFlag = false
+						}
+					}).catch(err => {
+						this.$refs.uToast.show({
+							title: err.msg,
+							type: 'error'
+						})
+					})
+			},
+			/**
+			 * 点击地图上的标记点触发
+			 **/
+			markertap(e) {
+				let lon, lat
+				this.covers.forEach((item, index) => {
+					if (e.detail.markerId === item.id) {
+						lon = item.longitude
+						lat = item.latitude
+						this.swiperCurrent = index
+					}
+				})
+				this.getNearRoadsl(lon, lat)
+			},
+			/**
+			 * 地址发生变化
+			 * @date 2021-08-10
+			 * @param {Object} item
+			 * @returns {any}
+			 */
+			swiperChange(item) {
+				const map = uni.createMapContext('pagemap')
+				map.moveToLocation({
+					longitude: this.nearParkingList[item.detail.current].longitude,
+					latitude: this.nearParkingList[item.detail.current].latitude
+				})
+				this.getNearRoadsl(this.nearParkingList[item.detail.current].longitude, this.nearParkingList[item.detail
+					.current].latitude)
+			},
+			/**
+			 * 点击单个停车场看详情
+			 * @date 2021-08-10
+			 * @param {Object} item 为选中项参数
+			 * @returns {any}
+			 */
+			clickSearchParking(item) {
+				if (item.monthAmount) {
+					this.$u.route({
+						url: 'pages/parkingInformation/parkingInformation',
+						params: {
+							roadInfo: JSON.stringify(item)
+						}
+					})
+				}
+			},
+			/**
+			 * 跳转停车标准页面
+			 * @date 2021-08-10
+			 * @param {Object} item
+			 * @returns {any}
+			 */
+			lookParkingRule(item) {
 				this.$u.route({
-				  url: 'pages/parkingInformation/parkingInformation',
-				  params: {
-				    roadInfo: JSON.stringify(item)
-				  }
+					url: 'pages/chargeStandard/chargeStandard',
+					params: {
+						roadNo: item.roadNo
+					}
+				})
+			},
+			/**
+			 * 搜索右侧按钮点击
+			 **/
+			listIconClick() {
+				this.isShowSearchParking = true
+				this.nearParkingFlag = false
+				this.searchParkingList = this.nearParkingList
+			},
+			/**
+			 * 跳转包月
+			 * @date 2021-08-10
+			 * @param {Object} item
+			 * @returns {any}
+			 */
+			createMonth(item) {
+				this.$u.route({
+					url: 'pages/handleMonthly/handleMonthly',
+					params: {
+						roadNo: item.roadNo
+					}
 				})
 			}
-    },
-    /**
-     * 跳转停车标准页面
-     * @date 2021-08-10
-     * @param {Object} item
-     * @returns {any}
-     */
-    lookParkingRule (item) {
-      this.$u.route({
-        url: 'pages/chargeStandard/chargeStandard',
-        params: {
-          roadNo: item.roadNo
-        }
-      })
-    },
-    /**
-     * 搜索右侧按钮点击
-     **/
-    listIconClick () {
-      this.isShowSearchParking = true
-      this.nearParkingFlag = false
-      this.searchParkingList = this.nearParkingList
-    },
-    /**
-     * 跳转包月
-     * @date 2021-08-10
-     * @param {Object} item
-     * @returns {any}
-     */
-    createMonth (item) {
-      this.$u.route({
-        url: 'pages/handleMonthly/handleMonthly',
-        params: {
-          roadNo: item.roadNo
-        }
-      })
-    }
-  }
-}
+		}
+	}
 </script>
 
 <style lang="scss" scoped>
-.wrap{margin-top: 20vh;}
-@import url("./parkingLists.scss");
+	.wrap {
+		margin-top: 20vh;
+	}
+
+	@import url("./parkingLists.scss");
 </style>

+ 4 - 2
pages/parkingLock/parkingLock.scss

@@ -1,7 +1,9 @@
 .parking-lock {
-	height: calc(100vh - 88rpx);
+	min-height: calc(100vh - 88rpx);
 	background-color: #F6F6FF;
-	padding-top: 133rpx;
+	&-box {
+		padding: 40rpx 0 0;
+	}
 	.parking-lock-title {
 		font-size: 46rpx;
 		color: #292929;

+ 2 - 3
pages/parkingLock/parkingLock.vue

@@ -1,12 +1,12 @@
 <template>
-	<view>
+	<view class="parking-lock">
 		<view class="Jump">
 			<view class="Jump-btn" @click="jumpArrears">
 				欠费补缴
 			</view>
 		</view>
 		<!-- 车位锁 -->
-		<view class="parking-lock">
+		<view class="parking-lock-box">
 			<!-- 车位锁支付 -->
 			<template v-if="parkingLockStatus === 1">
 				<view class="parking-lock-pay">
@@ -534,7 +534,6 @@
 	@import './parkingLock.scss';
 
 	.Jump {
-
 		display: flex;
 		justify-content: flex-end;
 		background-color: #F6F6FF;

+ 1 - 14
pages/payLists/payLists.vue

@@ -1,7 +1,5 @@
 <template>
 	<view>
-		<!-- <u-navbar title-color="#fff" :custom-back="customBack" :bpay-bottom="false" back-icon-color="#CCE8FF"
-			:background="{background: '#008CFF' }" title="停车缴费"></u-navbar> -->
 		<view class="swiper-wrap">
 			<view class="u-tabs-box">
 				<u-tabs-swiper activeColor="#008CFF" ref="tabs" :list="list" :current="current" @change="change"
@@ -10,7 +8,6 @@
 			<swiper class="swiper-box" :current="swiperCurrent" @transition="transition"
 				@animationfinish="animationfinish" disable-touch>
 				<swiper-item class="swiper-item" v-for="(item, index) in list" :key="index">
-					<!-- <mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"> -->
 					<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom">
 						<view class="page-box">
 							<view class="pay" v-for="(payItem, index) in  payList[index]"
@@ -100,7 +97,6 @@
 								<u-loadmore :status="loadStatus[index]" bg-color="#F6F6FF"></u-loadmore>
 						</view>
 					</scroll-view>
-					<!-- </mescroll-body> -->
 				</swiper-item>
 			</swiper>
 		</view>
@@ -135,11 +131,9 @@
 </template>
 
 <script>
-	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
 	import getUrlParams from "../../utils/getUrlParams.js";
 	import PaymentMethod from '@/pages/paymentMethod/paymentMethod.vue'
 	export default {
-		mixins: [MescrollMixin], // 使用mixin
 		components: {
 			PaymentMethod
 		},
@@ -208,15 +202,9 @@
 		},
 		onLoad() {
 			const href = location.href.split('#')
-			this.jumpUrl = href[0] + '#/pages/center/order/order'
-
-
+			this.jumpUrl = href[0] + '#/pages/center/order/order?'
 		},
 		onShow() {
-			// onShow 刷新数据
-			if (this.mescroll) {
-				this.mescroll.triggerDownScroll();
-			}
 			this.list[this.current].pageNum = 1
 			this.orderList = [
 				[],
@@ -352,7 +340,6 @@
 			},
 			all() {
 				this.payList.forEach((item, index, arr) => {
-					console.log(item)
 					if (item.orderId) {
 						this.orderList.push(item.orderId)
 					}

+ 0 - 98
pages/payPage/payPage.scss

@@ -1,98 +0,0 @@
-.order-info{
-	margin-top: 50rpx;
-	margin-bottom: 75rpx;
-	.order-info-top{
-		position: relative;
-		border-top-left-radius: 20rpx;
-		border-top-right-radius: 20rpx;
-		color: #fff;
-		padding: 35rpx 40rpx;
-		background: linear-gradient(135deg, #00BFFF 0%, #008DFF 100%);
-		.addr{
-			margin-bottom: 16rpx;
-			.addr-text{
-				margin-left: 17rpx;
-				font-size: 24rpx;
-				font-weight: 400;
-			}
-		}
-		.car{
-			.car-no{
-				font-size: 40rpx;
-				font-weight: 500;
-				color: #FFFFFF;
-				letter-spacing: 1px;
-				line-height: 56rpx;
-				margin-right: 13rpx;
-			}
-			.car-type{
-				font-size: 24rpx;
-			}
-		}
-		.time{
-			font-size: 22rpx;
-			font-weight: 400;
-			color: #CDECFF;
-			line-height: 30rpx;
-			margin-bottom: 3rpx;
-		}
-		.duration{
-			margin-top: 17rpx;
-			font-size: 30rpx;
-			font-weight: 400;
-			color: #FFFFFF;
-			line-height: 42rpx;
-			letter-spacing: 1px;
-		}
-		.total-amount{
-			position: absolute;
-			right: 40rpx;
-			bottom: 25rpx;
-			font-size: 60rpx;
-			font-weight: 500;
-			color: #FFFFFF;
-			letter-spacing: 2rpx;
-		}
-	}
-	.order-info-bottom{
-		padding-top: 44rpx;
-		padding-bottom: 56rpx;
-		background: #FFFFFF;
-		border-bottom-left-radius: 20rpx;
-		border-bottom-right-radius: 20rpx;
-		box-shadow: 0px 6rpx 14rpx 0px rgba(200, 200, 200, 0.5);
-		.u-cell{padding-left: 40rpx;padding-right: 40rpx;}
-		/deep/ .u-iconfont{color: #D8D8D8;}
-		.pay-amount{
-			border-top: 1px solid #CACACA;
-			padding-top: 33rpx;
-			padding: 33rpx 40rpx 9rpx;
-			color: #FF751D;
-			.title{
-				font-size: 30rpx;
-				font-weight: 600;
-				color: #FF751D;
-				line-height: 42rpx;
-				letter-spacing: 1px;
-			}
-			.amount{
-				font-size: 36rpx;
-				font-weight: 600;
-				color: #FF8233;
-				line-height: 33rpx;
-				letter-spacing: 1px;
-				.rmb{
-					font-size: 24rpx;
-					margin-right: 5rpx;
-				}
-			}
-		}
-		.tip{
-			font-size: 22rpx;
-			font-weight: 400;
-			color: #999999;
-			line-height: 30rpx;
-			padding: 0 40rpx;
-		}
-	}
-}

+ 0 - 150
pages/payPage/payPage.vue

@@ -1,150 +0,0 @@
-<template>
-	<view class="wrap">
-		<view class="order-info">
-			<view class="order-info-top">
-				<view class="addr u-flex">
-					<u-icon name="map-fill" color="#fff" size="28"></u-icon>
-					<view class="addr-text">{{orderInfo.roadName}}</view>
-				</view>
-				<view class="car u-flex">
-					<view class="car-no">{{orderInfo.vehicleNo}}</view>
-					<view class="car-type">临时车</view>
-				</view>
-				<view class="time in-time">进场时间:{{orderInfo.inTime}}</view>
-				<view class="time out-time">进场时间:{{orderInfo.outTime}}</view>
-				<view class="duration">已停放 {{orderInfo.duration}}</view>
-				<view class="total-amount">¥{{orderInfo.totalAmount}}</view>
-			</view>
-			<view class="order-info-bottom">
-				<u-cell-item 
-				center 
-				:border-bottom="false" 
-				:value="orderInfo.preferentialAmount" 
-				:title-style="{color:'#8A8A8A'}"
-				:icon-style="{color:'#D8D8D8'}"
-				title="已优惠"></u-cell-item>
-				<view class="pay-amount u-flex u-row-between">
-					<view class="title">应付金额</view>
-					<view class="amount"><span class="rmb">¥</span>{{orderInfo.payAmount}}</view>
-				</view>
-				<view class="tip">停车费不超过30元,可先离场后在付费</view>
-			</view>
-		</view>
-		<view class="bottom-btn static" @click="handlewxpay">去支付</view>
-		
-		<u-toast ref="uToast" />
-	</view>
-</template>
-
-<script>
-	import getUrlParams from "../../utils/getUrlParams.js";
-	export default{
-		data(){
-			return{
-				orderId:null,
-				orderInfo:[],
-				
-			}
-		},
-		onLoad(){
-			let locationLocaturl = window.location.hash;
-			this.orderId = getUrlParams(locationLocaturl,"orderId"); // 截取orderId
-			console.log('this.orderId',this.orderId);
-			this.handleGetOrderinfo(this.orderId);
-			
-		},
-		methods:{
-			handleGetOrderinfo(orderId){
-				this.$u.api.getOrderinfo({id:orderId})
-				.then(res=>{
-					// this.$refs.uToast.show({
-					// 	title: res.msg,
-					// 	type: 'success',
-					// });
-					this.orderInfo = res.data;
-					console.log('handleGetOrderinfo',JSON.parse(JSON.stringify(res)));
-				}).catch(err=>{
-					this.$refs.uToast.show({
-						title: err.msg,
-						type: 'error',
-					});
-					console.log('handleGetOrderinfo ',err)
-				});
-				
-			},
-			getCode () {
-				var local = window.location.href // 获取页面url
-				let locationLocaturl = window.location.search;
-				this.code = getUrlParams(locationLocaturl,"code"); // 截取code
-				if (this.code == null || this.code === '') { // 如果没有code,则去请求
-					window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${this.config.wxAppid}&redirect_uri=${encodeURIComponent(local)}&response_type=code&scope=snsapi_userinfo&#wechat_redirect`
-				} else {
-					this.handleGetWXInfo(this.code) //把code传给后台获取用户信息
-				}
-			},
-			handleGetWXInfo (code) { // 通过code获取 openId等用户信息,/api/user/wechat/login 为后台接口
-				let _this = this
-				this.$u.api.getWXInfo(code).then((res) => {
-					if (res.code === 200 ) {
-						this.$u.vuex('vuex_wxinfo',res.data);
-						// 继续支付
-					}
-				}).catch((err) => {
-					this.$refs.uToast.show({
-						title: err.msg,
-						type: 'error',
-					});
-				})
-			},			
-			handlewxpay(){;
-				if(!this.$store.state.vuex_wxinfo.openId){ // 如果微信openId,则需用code去后台获取
-					this.$refs.uToast.show({
-						title: '请登录后重试!',
-						type: 'info',
-						// url: '/pages/user/index'
-					});
-					this.getCode();
-				} else {
-					// 别的业务逻辑
-					this.getWXPay();
-				}
-			},
-			async getWXPay(id){
-				let params = {
-					orderId:this.orderId,
-					openid:this.$store.state.vuex_wxinfo.openId,
-					tradeType:"test"
-				};
-				await this.$wxApi.config();
-				this.$pay.wxPay(params).then(res =>{
-					console.log('wxPay',res.code);
-					if(res.code == 0){
-						// 成功
-						this.$u.route({
-							url:'pages/index/index',
-							// params: {
-							// 	keyword: this.keyword
-							// }
-						});
-					}else if(res.code == 1){
-						// 取消
-						// uni.redirectTo({
-						// 	url: '/pages/userCenter/myOrder/myOrder'
-						// })
-					}else if(res.code == 2){
-						this.$refs.uToast.show({
-							title: '支付失败,请检查!',
-							type: 'error',
-							// url: '/pages/user/index'
-						});
-					}
-				});
-			},
-			
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	@import "./payPage.scss";
-</style>

+ 14 - 106
pages/paymentMethod/paymentMethod.vue

@@ -3,28 +3,14 @@
 		支付方式选择  微信or贵阳银行
 	 -->
 	<view>
-		<u-modal
-		v-model="payWayPop"
-		:title-style="{color: '#404040'}"
-		title="缴费方式"
-		:show-confirm-button="false"
-		:show-cancel-button="false">
+		<u-modal v-model="payWayPop" :title-style="{color: '#404040'}" title="缴费方式" :show-confirm-button="false"
+			:show-cancel-button="false">
 			<view class="slot-content">
-				<!-- <view class="pay-way">
-					<view class="pay-way-item" @click="gyBankPay">
-						<image src="../../static/img/gy-bank-pay-icon.png" mode=""></image>
-						<view>贵州银行</view>
-					</view>
-					<view class="pay-way-item" @click="wechatPay">
-						<image src="../../static/img/wechat-pay-icon.png" mode=""></image>
-						<view>微信支付</view>
-					</view>
-				</view> -->
 				<view class="pay-way-new">
 					<view class="pay-way-item pay-way-item-hy" @click="gyBankPay">
 						<image src="../../static/img/guiyang-bank-icon.png" mode=""></image>
 						<view class="title">贵州银行</view>
-						<view class="subtitle">前三个月每天首次一分钱<br/>长期八折优惠</view>
+						<view class="subtitle">前三个月每天首次一分钱<br />长期八折优惠</view>
 					</view>
 					<view class="pay-way-item pay-way-item-jh" @click="wechatPay">
 						<image src="../../static/img/juhe-icon.png" mode=""></image>
@@ -39,10 +25,6 @@
 </template>
 
 <script>
-	import getUrlParams from "@/utils/getUrlParams.js";
-	// import {
-	// 	getEnvIsWx
-	// } from '@/utils/judgEnvironment.js'
 	export default {
 		props: {
 			// 弹框显示
@@ -71,9 +53,9 @@
 				default: undefined
 			},
 			//扫码支付需要字段
-			sanPay:{
-				type:Boolean,
-				default:false
+			sanPay: {
+				type: Boolean,
+				default: false
 			},
 			// 追缴类型
 			pursueType: {
@@ -102,7 +84,7 @@
 			 * */
 			gyBankPay() {
 				uni.showLoading({
-				    title: '加载中'
+					title: '加载中'
 				});
 				const params = {
 					orderList: this.curOrderList,
@@ -115,7 +97,7 @@
 				};
 				console.log(params)
 				if (this.exportFlag == true) {
-					this.$u.api.quickPayExportApi(params).then(res=>{
+					this.$u.api.quickPayExportApi(params).then(res => {
 						if (res.data.needPay) {
 							let payUrl = res.data.url;
 							location.href = payUrl;
@@ -129,14 +111,14 @@
 								location.reload()
 							}, 1000)
 						}
-					}).catch(err=>{
+					}).catch(err => {
 						this.$refs.uToast.show({
 							title: err.msg,
 							type: 'error',
 						});
 					});
 				} else {
-					this.$u.api.payGzbank(params).then(res=>{
+					this.$u.api.payGzbank(params).then(res => {
 						if (res.data.needPay) {
 							let payUrl = res.data.url;
 							location.href = payUrl;
@@ -150,7 +132,7 @@
 								location.reload()
 							}, 1000)
 						}
-					}).catch(err=>{
+					}).catch(err => {
 						this.$refs.uToast.show({
 							title: err.msg,
 							type: 'error',
@@ -168,46 +150,10 @@
 			 * */
 			wechatPay() {
 				uni.showLoading({
-				    title: '加载中'
+					title: '加载中'
 				});
 				this.getWXPayByJava(this.curOrderList, this.deviceNo)
 			},
-			/**
-			 * 调起微信支付接口
-			 * @param {Array} list 需要支付的订单组合数组
-			 * @param {Number} deviceNo 设备编号(在停车锁部分需要)
-			 * */
-			async getWXPay(orderList, deviceNo){
-				let params = {
-					orderList: orderList,
-					openid: this.$store.state.vuex_wxinfo.openId,
-					deviceNo: deviceNo ? deviceNo : null
-				};
-				
-				await this.$wxApi.config();
-				this.$pay.wechatPay(params).then(res =>{
-					switch (Number(res.code)) {
-						case 0: // 成功
-							//#ifdef H5
-								
-								window.location.reload();
-							//#endif
-							break;
-						case 1: // 取消
-							this.$refs.uToast.show({
-								title: '已取消支付',
-								type: 'info',
-							});
-							break;
-						case 2: // 支付失败
-							this.$refs.uToast.show({
-								title: '支付失败,请检查!',
-								type: 'error',
-							});
-							break;
-					}
-				});
-			},
 			/**
 			 * 直接通过后台获取贵阳银行微信支付地址
 			 * @param {Array} list 需要支付的订单组合数组
@@ -222,7 +168,7 @@
 					payeeId: this.payeeId,
 					payeeName: this.payeeName,
 					pursueType: this.pursueType,
-					sanPay:this.sanPay
+					sanPay: this.sanPay
 				};
 				if (this.exportFlag) {
 					this.$u.api.polyPayExportApi(params)
@@ -258,44 +204,6 @@
 						})
 				}
 			},
-			/**
-			 * 获取code
-			 * 1 微信登录获取code
-			 * 2 url中截取
-			 * */
-			getCode () {
-				// 获取页面完整url
-				const local = window.location.href
-				// 获取url后面的参数
-				const locationLocaturl = window.location.search;
-				// 截取url中的code
-				this.code = getUrlParams(locationLocaturl, "code");
-				// 如果没有code,则去请求
-				if (this.code == null || this.code === '') {
-					window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${this.config.wxAppid}&redirect_uri=${encodeURIComponent(local)}&response_type=code&scope=snsapi_userinfo&#wechat_redirect`
-				} else {
-					// 把code传给后台获取用户信息
-					this.handleGetWXInfo(this.code)
-				}
-			},
-			/**
-			 * 通过code获取openId等用户信息
-			 * 拿到用户信息后再调起微信支付
-			 * */
-			handleGetWXInfo (code) {
-				let _this = this
-				this.$u.api.getWXInfo(code).then((res) => {
-					if (res.code === 200 ) {
-						this.$u.vuex('vuex_wxinfo', res.data);
-						this.getWXPay(this.currentItem)
-					}
-				}).catch((err) => {
-					this.$refs.uToast.show({
-						title: err.msg,
-						type: 'error',
-					});
-				})
-			},
 			/**
 			 * 关闭弹框
 			 * */
@@ -307,5 +215,5 @@
 </script>
 
 <style lang="scss" scoped>
-@import './paymentMethod.scss'
+	@import './paymentMethod.scss'
 </style>

+ 0 - 90
pay.js

@@ -1,90 +0,0 @@
-/**
- * 订单支付
- */
-import Vue from "vue";
-//#ifdef H5
-import $wxApi from "./wxapi.js";
-//#endif
-
-// import $http from "./utils/axios.js"
-import $http from "./uview-ui/libs/request"
-
-export default {
-	//微信支付
-	wxPay(obj = {}) {
-		uni.showLoading({
-			title: '支付中'
-		});
-		return new Promise(r => {
-			$http.post("/client/wechat/pay",obj)
-				.then(res=>{
-					//#ifdef H5
-					$wxApi.JSAPI(res.data).then(r);
-					//#endif
-					this.payError(res);
-				}).catch(err =>{
-					// alert(err.msg);
-					console.log('pay err',err);
-				})
-		});
-	},
-	/**
-	 * 微信支付
-	 * obj 传入对象
-	 * url 提交地址
-	 * jumpUrl 支付成功跳转 
-	 */
-	wechatPay(obj = {}, url = '/client/pay/wechat', jumpUrl) {
-		uni.showLoading({
-			title: '支付中'
-		});
-		return new Promise(r => {
-			$http.post(url, obj)
-				.then(res=>{
-					// 区分包月支付和普通支付
-					if (res.data.needPay && !res.data.monthId) {
-						//#ifdef H5
-						$wxApi.JSAPI(res.data.wx, jumpUrl).then(r);
-						//#endif
-					} else if (res.data.monthId) {
-						//#ifdef H5
-						$wxApi.JSAPI(res.data.wx, jumpUrl).then(r);
-						//#endif
-					} else {
-						uni.showToast({
-							title: "无需支付",
-							icon: "none",
-							duration: 2000
-						});
-						setTimeout(() =>{
-							//#ifdef H5
-							if (jumpUrl) {
-								window.location.href = jumpUrl;
-							} else {
-								window.location.reload();
-							}
-							//#endif
-						}, 1500)
-					}
-					this.payError(res);
-				}).catch(err =>{
-					// alert(err.msg);
-					console.log('pay err',err);
-				})
-		});
-	},
-	//支付错误处理
-	payError(res){
-		uni.hideLoading();
-		if(res.code == 623){
-			setTimeout(i=>{
-				new Vue().$api.goto("/pages/userCenter/myOrder/myOrder");
-			},2000);
-			uni.showToast({
-				title:res.msg + "    即将跳转到订单页",
-				icon:"none",
-				duration:2000
-			});
-		}
-	}
-}

+ 0 - 180
wxapi.js

@@ -1,180 +0,0 @@
-//引入微信jssdk
-const wx = require('@/js_sdk/jweixin-1.4.0.js')
-
-//配置注册url
-const url = '/client/wechat/pay/getJsapiTicket';
-
-//http方法
-// import $http from './utils/axios.js'
-import $http from "./uview-ui/libs/request"
-
-//系统域名url
-const href = location.href.split('#')[0];
-// const href = location.href.split("?")[0]
-
-import { config } from '@/common/config'
-
-//系统域名url
-export default {
-	...wx,
-	isOk: false,
-	async config() {
-		wx.config({
-			debug: false,
-			jsApiList: [
-				"updateAppMessageShareData",
-				"updateTimelineShareData",
-				"onMenuShareTimeline",
-				"onMenuShareAppMessage",
-				"onMenuShareQQ",
-				"onMenuShareWeibo",
-				"onMenuShareQZone",
-				"startRecord",
-				"stopRecord",
-				"onVoiceRecordEnd",
-				"playVoice",
-				"pauseVoice",
-				"stopVoice",
-				"onVoicePlayEnd",
-				"uploadVoice",
-				"downloadVoice",
-				"chooseImage",
-				"previewImage",
-				"uploadImage",
-				"downloadImage",
-				"translateVoice",
-				"getNetworkType",
-				"openLocation",
-				"getLocation",
-				"hideOptionMenu",
-				"showOptionMenu",
-				"hideMenuItems",
-				"showMenuItems",
-				"hideAllNonBaseMenuItem",
-				"showAllNonBaseMenuItem",
-				"closeWindow",
-				"scanQRCode",
-				"chooseWXPay",
-				"openProductSpecificView",
-				"addCard",
-				"chooseCard",
-				"openCard"
-			],
-			...(await $http.get(url,{url:href})).data,
-			// ...(await uni.request(url,{url:href})).retBody,
-		});
-		wx.ready(e => {
-			this.isOk = true;
-			// this.hideMenu();
-		});
-		wx.error(e => {
-			console.log("wxapi初始化失败")
-			this.isOk = false;
-		});
-	},
-	hideMenu() {
-		wx.hideAllNonBaseMenuItem();
-		wx.hideMenuItems({		
-		    menuList: [
-				"menuItem:share:appMessage",
-				"menuItem:profile",
-				"menuItem:addContact",
-				"menuItem:dayMode",
-				"menuItem:nightMode",
-				"menuItem:share:timeline",
-				"menuItem:favorite"				
-			] // 要隐藏的菜单项,只能隐藏“传播类”和“保护类”按钮,所有menu项见附录3		
-		});
-	},
-	showMenu() {
-		wx.showMenuItems({
-			menuList: [
-				"menuItem:share:appMessage",
-				"menuItem:profile",
-				"menuItem:addContact",
-				"menuItem:dayMode",
-				"menuItem:nightMode",
-				"menuItem:share:timeline",
-				"menuItem:favorite"
-			] // 要显示的菜单项,所有menu项见附录3
-		});
-	},
-	/**
-	 * 分享配置
-	 * @param {Object} info
-	 */
-	share(data = {}, info = {}) {
-		//添加链接时间戳
-		// data.v = new Date().getTime();
-		// console.log("shareData",data)
-		// let search = [];
-		// for (const [key, value] of Object.entries(data)) {
-		// 	// search.push(`${key}=${encodeURIComponent(value)}`);
-		// 	search.push(`${key}=${value}`);
-		// }
-		// search = "?" + search.join("&");
-		
-		let afterEndUrl = config.afterEndUrl;
-		// let afterEndUrl = 'http://tanhui.hongweisoft.com/api/wechat/h5/authorize?returnUrl='
-		// let afterEndUrl = 'http://gzhjt.gzsdzth.com/api/wechat/h5/authorize?returnUrl='
-		
-		let fullUrl = afterEndUrl + location.href.split('?')[0] + '?togetherId=' + data.togetherId + '/#/' + data.routeUrl
-		const shareInfo = {
-			title: data.nickname + '邀请你参与贵州省单株碳汇精准扶贫',
-			link: fullUrl,
-			desc: "购碳扶贫,你我同行",
-			imgUrl: href + "/static/logo.png",
-			trigger(res) {},
-			success(res) {},
-			cancel(res) {},
-			fail(res) {},
-			...info
-		};
-		console.log('shareInfo',shareInfo,'fullUrl',fullUrl)
-		//自定义“分享给朋友”及“分享到QQ”按钮的分享内容(1.4.0)
-		wx.updateAppMessageShareData(shareInfo);
-		//自定义“分享到朋友圈”及“分享到QQ空间”按钮的分享内容(1.4.0)
-		wx.updateTimelineShareData(shareInfo);
-	},
-	//拉起微信浏览器端支付
-	JSAPI(res, jumpUrl) {
-		return new Promise(r => {
-			wx.chooseWXPay({
-				"timestamp": res.timeStamp, //时间戳,自1970年以来的秒数     
-				"nonceStr": res.nonceStr, //随机串     
-				"package": res.packageValue,
-				"signType": res.signType, //微信签名方式:     
-				"paySign": res.paySign, //微信签名
-				success() {
-					r({
-						code: 0,
-						msg: "成功"
-					});
-				},
-				cancel() {
-					r({
-						code: 1,
-						msg: "取消"
-					});
-				},
-				fail(err) {
-					r({
-						code: 2,
-						msg: err.errMsg.split(':')[1]
-					});
-				},
-				// 无论失败成功都会执行
-				complete(e) {
-					// e.errMsg三种状态 1.chooseWXPay:ok 支付成功 2: chooseWXPay:cancel 支付取消 3:chooseWXPay:fail 支付失败
-					if (e.errMsg === 'chooseWXPay:ok') {
-						if (jumpUrl) {
-							window.location.href = jumpUrl
-						} else {
-							window.location.reload()
-						}
-					}
-				}
-			});
-		});
-	}
-}

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff