Browse Source

统一代码

zaijin 2 years ago
parent
commit
8925ae70a2

+ 9 - 1
common/config.js

@@ -17,6 +17,14 @@ export const config = {
     'pages/parkingLock/parkingLock',
     'pages/wechatLogin/wechatLogin',
     'pages/VehicleInquiry/VehicleInquiry',
-    'pages/OnsitePayment/OnsitePayment'
+    'pages/OnsitePayment/OnsitePayment',
+    'pages/parkadvance/parkadvance',
+    'pages/parkexport/parkexport',
+    'pages/parkroadgate/parkroadgate',
+    'pages/roadGateSystem/roadGateSystem',
+    'pages/parkentrace/parkentrace',
+    'pages/geomagnetismLock/geomagnetismLock',
+    'pages/wechatLogin/wechatLogin',
+    'pages/goldPlan/goldPlan'
   ] // 只需要微信登录的页面路径
 };

+ 10 - 43
pages.json

@@ -39,24 +39,6 @@
         "navigationBarTitleText": "订单详情"
       }
     },
-    {
-      "path": "pages/center/invoice/invoice",
-      "style": {
-        "navigationBarTitleText": "我的发票"
-      }
-    },
-    {
-      "path": "pages/center/invoice/makeinvoice/makeinvoice",
-      "style": {
-        "navigationBarTitleText": "我要开票"
-      }
-    },
-    {
-      "path": "pages/center/invoice/invoiceDetails/invoiceDetails",
-      "style": {
-        "navigationBarTitleText": "发票详情"
-      }
-    },
     {
       "path": "pages/parkingLists/parkingLists",
       "style": {
@@ -122,15 +104,6 @@
         "navigationBarTextStyle": "white"
       }
     },
-    {
-      "path": "pages/center/monthly/monthly1",
-      "style": {
-        "navigationBarTitleText": "我的包月",
-        "navigationBarBackgroundColor": "#008CFF",
-        "navigationBarTextStyle": "white",
-        "enablePullDownRefresh": false
-      }
-    },
     {
       "path": "pages/center/monthly/monthly",
       "style": {
@@ -140,20 +113,6 @@
         "enablePullDownRefresh": false
       }
     },
-    {
-      "path": "pages/payLists/pay",
-      "style": {
-        "navigationStyle": "custom",
-        "navigationBarTitleText": "支付"
-      }
-    },
-    {
-      "path": "pages/paymentMethod/jumpMiddle",
-      "style": {
-        "navigationStyle": "custom",
-        "navigationBarTitleText": "跳转"
-      }
-    },
     {
       "path": "pages/handleMonthly/monthPay",
       "style": {
@@ -334,14 +293,22 @@
       "style": {
         "navigationBarTitleText": "支付成功",
         "enablePullDownRefresh": false,
-				"navigationBarBackgroundColor": "#008CFF",
+        "navigationBarBackgroundColor": "#008CFF",
         "navigationBarTextStyle": "white"
       }
+    },
+    {
+      "path": "pages/goldPlan/goldPlan",
+      "style": {
+        "navigationBarTitleText": "点金计划",
+        "enablePullDownRefresh": false,
+        "navigationStyle": "custom"
+      }
     }
   ],
   "globalStyle": {
     "navigationBarTextStyle": "black",
-    "navigationBarTitleText": "普定智慧停车",
+    "navigationBarTitleText": "智慧停车",
     "navigationBarBackgroundColor": "#F8F8F8",
     "backgroundColor": "#F8F8F8",
     "backgroundColorTop": "#FFFFFF"

+ 11 - 2
pages/OnsitePayment/OnsitePayment.vue

@@ -81,8 +81,17 @@ export default {
       }
       this.jumpUrl = `${location.origin}/#/pages/OnsitePayment/OnsitePayment?vehicleNo=${vehicleNo}&parkNo=${parkNo}&isBack=1`;
     } else {
-      this.$nextTick(() => {
-        this.showToast('参数丢失!', 'error');
+      uni.showModal({
+        title: '提示',
+        content: '参数丢失, 返回首页',
+        showCancel: false,
+        success: function (res) {
+          if (res.confirm) {
+            uni.switchTab({
+              url: '/pages/index/index'
+            });
+          }
+        }
       });
     }
   },

+ 11 - 2
pages/VehicleInquiry/VehicleInquiry.vue

@@ -89,8 +89,17 @@ export default {
       this.form.parkNo = parkNo;
       this.getVehicleInquiryList(parkNo);
     } else {
-      this.$nextTick(() => {
-        this.showToast('参数丢失!', 'error');
+      uni.showModal({
+        title: '提示',
+        content: '参数丢失, 返回首页',
+        showCancel: false,
+        success: function (res) {
+          if (res.confirm) {
+            uni.switchTab({
+              url: '/pages/index/index'
+            });
+          }
+        }
       });
     }
   },

+ 1 - 0
pages/choosePayment/choosePayment.vue

@@ -262,6 +262,7 @@ export default {
     openPopup(details, numType = 'single', orderType = 'road') {
       // 获取环境信息
       this.wxEnv = getEnvIsWx();
+      // 判断支付宝环境
       this.alipayEnv = getEnvIsAlipay();
       // 打开弹出层
       this.payWayPop = true;

+ 551 - 528
pages/parkingLists/parkingLists.vue

@@ -1,539 +1,562 @@
 <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="address-box" :class="nearParkingObj.type == 'down' ? 'address-down' : 'address-up'"
-			v-if="nearParkingFlag">
-			<view class="address-box-down-icon" :class="{ 'up-icon': nearParkingObj.type === 'up' }" @click="pullDown">
-			</view>
-			<!-- tab -->
-			<u-tabs :list="tabObj.tabList" :is-scroll="false" :current="tabObj.current" bg-color="transparent"
-				@change="tabChange"></u-tabs>
-			<scroll-view scroll-y class="address-box-scroll"
-				:style="{ height: `calc(${nearParkingObj.height} - 164rpx)` }">
-				<view class="address-box-list" v-if="nearParkingList.length > 0">
-					<view class="address-box-list-item" v-for="(item, index) in nearParkingList" :key="index"
-						@click="positionAddress(item)">
-						<view class="abli-header">
-							<view class="abli-header-title">{{ item.roadName || item.parkName }} <text
-									class="abli-header-subtitle">{{ item.areaName }}</text></view>
-							<view class="abli-header-surplus">
-								<view class="abli-header-surplus-left">
-									余位<text>{{ item.spaceIdle || item.surplusPlace }}</text></view>
-								<template v-if="tabObj.current === 1">
-									<view class="abli-header-surplus-right" @click.stop="createMonth(item)">办理包月</view>
-								</template>
-								<template v-else-if="item.monthAmount">
-									<view class="abli-header-surplus-right" @click.stop="createMonth(item)">办理包月</view>
-								</template>
-								<template v-else>
-									<view class="abli-header-surplus-right" :class="{ disabled: !item.monthAmount }">
-										办理包月</view>
-								</template>
-							</view>
-						</view>
-						<view class="abli-bottom">
-							<view class="abli-bottom-left">
-								<view class="abli-bottom-left-navigation"
-									@click.stop="navigation(item.latitude, item.longitude, item.areaName)">导航</view>
-								<view class="abli-bottom-left-distance">{{ item.distance | kmUnit }}</view>
-							</view>
-							<view class="abli-bottom-right" @click.stop="lookParkingRule(item)">收费规则</view>
-						</view>
-					</view>
-				</view>
-				<view class="address-box-list" v-else>
-					<u-empty text="暂无数据" mode="list"></u-empty>
-				</view>
-			</scroll-view>
-		</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 || item.parkName }}</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, item.areaName)"></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
+        v-if="searchContent || isShowSearchParking == true"
+        class="icon"
+        name="close"
+        size="36"
+        color="#ffffff"
+        placeholder-color="#B5B5B5"
+        search-icon-color="#B3B3B3"
+        @click="clearSearchInput"
+      />
+    </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"
+      />
+    </view>
+    <view class="address-box" :class="nearParkingObj.type == 'down' ? 'address-down' : 'address-up'" v-if="nearParkingFlag">
+      <view class="address-box-down-icon" :class="{ 'up-icon': nearParkingObj.type === 'up' }" @click="pullDown"> </view>
+      <!-- tab -->
+      <u-tabs :list="tabObj.tabList" :is-scroll="false" :current="tabObj.current" bg-color="transparent" @change="tabChange"></u-tabs>
+      <scroll-view scroll-y class="address-box-scroll" :style="{ height: `calc(${nearParkingObj.height} - 164rpx)` }">
+        <view class="address-box-list" v-if="nearParkingList.length > 0">
+          <view class="address-box-list-item" v-for="(item, index) in nearParkingList" :key="index" @click="positionAddress(item)">
+            <view class="abli-header">
+              <view class="abli-header-title"
+                >{{ item.roadName || item.parkName }} <text class="abli-header-subtitle">{{ item.areaName }}</text></view
+              >
+              <view class="abli-header-surplus">
+                <view class="abli-header-surplus-left">
+                  余位<text>{{ item.spaceIdle || item.surplusPlace }}</text></view
+                >
+                <template v-if="tabObj.current === 1">
+                  <view class="abli-header-surplus-right" @click.stop="createMonth(item)">办理包月</view>
+                </template>
+                <template v-else-if="item.monthAmount">
+                  <view class="abli-header-surplus-right" @click.stop="createMonth(item)">办理包月</view>
+                </template>
+                <template v-else>
+                  <view class="abli-header-surplus-right" :class="{ disabled: !item.monthAmount }"> 办理包月</view>
+                </template>
+              </view>
+            </view>
+            <view class="abli-bottom">
+              <view class="abli-bottom-left">
+                <view class="abli-bottom-left-navigation" @click.stop="navigation(item.latitude, item.longitude, item.areaName)">导航</view>
+                <view class="abli-bottom-left-distance">{{ item.distance | kmUnit }}</view>
+              </view>
+              <view class="abli-bottom-right" @click.stop="lookParkingRule(item)">收费规则</view>
+            </view>
+          </view>
+        </view>
+        <view class="address-box-list" v-else>
+          <u-empty text="暂无数据" mode="list"></u-empty>
+        </view>
+      </scroll-view>
+    </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 || item.parkName }}</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, item.areaName)"></image>
+          <view>路线</view>
+        </view>
+      </view>
+    </view>
+    <u-select v-model="mapSelect" :list="mapSelectList" @confirm="mapSelectConfirm" />
+    <map id="map" hidden="true" />
+    <u-toast ref="uToast" />
+  </view>
 </template>
 
 <script>
-	import {
-		qqMapTransBMap
-	} from '@/utils/mapTrans.js';
-	export default {
-		data() {
-			return {
-				tabObj: {
-					current: 0,
-					tabList: [{
-						name: '路段'
-					}, {
-						name: '停车场'
-					}],
-				},
-				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: {},
-				nearParkingObj: {
-					height: '60vh',
-					type: 'down'
-				}
-			};
-		},
-		onLoad(page) {
-			this.getLocation();
-			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;
-				const obj = {
-					0: 'getNearRoadsl',
-					1: 'getParkingLotList'
-				}
-				this[obj[this.tabObj.current]]()
-			},
-			/**
-			 * 获取定位
-			 * @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('浏览器获取位置成功:', JSON.stringify(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;
-						const obj = {
-							0: 'getNearRoadsl',
-							1: 'getParkingLotList'
-						}
-						that[obj[that.tabObj.current]]()
-					}, function(err) {
-						console.log('浏览器获取位置失败:', JSON.stringify(err));
-						uni.getLocation({
-							type: 'gcj02',
-							success: function (res) {
-								console.log('当前位置的经度:' + res.longitude);
-								console.log('当前位置的纬度:' + res.latitude);
-								that.currentPosition.latitude = res.latitude;
-								that.currentPosition.longitude = res.longitude;
-								that.loading = false;
-								const obj = {
-									0: 'getNearRoadsl',
-									1: 'getParkingLotList'
-								}
-								that[obj[that.tabObj.current]]()
-							}
-						});
-				});
-				} 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, areaName) {
-				this.currentPositionHover = {
-					latitude,
-					longitude,
-					areaName
-				};
-				this.mapSelect = true;
-			},
-			// 多地图选择
-			mapSelectConfirm(item) {
-				const name = item[0].label;
-				switch (name) {
-					case '腾讯地图':
-						location.href =
-							`https://apis.map.qq.com/uri/v1/routeplan?type=drive&from=我的位置&fromcoord=${this.currentPosition.latitude},${this.currentPosition.longitude}&to=${this.currentPositionHover.areaName || item.parkName}&tocoord=${this.currentPositionHover.latitude},${this.currentPositionHover.longitude}&policy=1&referer=BOGBZ-2BZ33-O4L32-Y3QJR-PGN66-RFFEL`;
-						break;
-					case '百度地图':
-						const lnglatObj = qqMapTransBMap(this.currentPositionHover.longitude, this.currentPositionHover
-							.latitude);
-						location.href = `http://api.map.baidu.com/marker?location=
+import { qqMapTransBMap } from '@/utils/mapTrans.js';
+export default {
+  data() {
+    return {
+      tabObj: {
+        current: 0,
+        tabList: [
+          {
+            name: '路段'
+          },
+          {
+            name: '停车场'
+          }
+        ]
+      },
+      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: {},
+      nearParkingObj: {
+        height: '60vh',
+        type: 'down'
+      }
+    };
+  },
+  onLoad(page) {
+    this.getLocation();
+    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;
+      const obj = {
+        0: 'getNearRoadsl',
+        1: 'getParkingLotList'
+      };
+      this[obj[this.tabObj.current]]();
+    },
+    /**
+     * 获取定位
+     * @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('浏览器获取位置成功:', JSON.stringify(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;
+            const obj = {
+              0: 'getNearRoadsl',
+              1: 'getParkingLotList'
+            };
+            that[obj[that.tabObj.current]]();
+          },
+          function (err) {
+            console.log('浏览器获取位置失败:', JSON.stringify(err));
+            uni.getLocation({
+              type: 'gcj02',
+              success: function (res) {
+                console.log('当前位置的经度:' + res.longitude);
+                console.log('当前位置的纬度:' + res.latitude);
+                that.currentPosition.latitude = res.latitude;
+                that.currentPosition.longitude = res.longitude;
+                that.loading = false;
+                const obj = {
+                  0: 'getNearRoadsl',
+                  1: 'getParkingLotList'
+                };
+                that[obj[that.tabObj.current]]();
+              }
+            });
+          }
+        );
+      } 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, areaName) {
+      this.currentPositionHover = {
+        latitude,
+        longitude,
+        areaName
+      };
+      this.mapSelect = true;
+    },
+    // 多地图选择
+    mapSelectConfirm(item) {
+      const name = item[0].label;
+      switch (name) {
+        case '腾讯地图':
+          location.href = `https://apis.map.qq.com/uri/v1/routeplan?type=drive&from=我的位置&fromcoord=${this.currentPosition.latitude},${
+            this.currentPosition.longitude
+          }&to=${this.currentPositionHover.areaName || item.parkName}&tocoord=${this.currentPositionHover.latitude},${
+            this.currentPositionHover.longitude
+          }&policy=1&referer=BOGBZ-2BZ33-O4L32-Y3QJR-PGN66-RFFEL`;
+          break;
+        case '百度地图':
+          const lnglatObj = qqMapTransBMap(this.currentPositionHover.longitude, this.currentPositionHover.latitude);
+          location.href = `http://api.map.baidu.com/marker?location=
 			${lnglatObj.lat},${lnglatObj.lng}&title=目的地&content=${this.currentPositionHover.areaName || item.parkName}
 			&output=html&src=webapp.baidu.openAPIdemo`;
-						break;
-					case '高德地图':
-						location.href =
-							`https://uri.amap.com/navigation?from=${this.currentPosition.longitude},${this.currentPosition.latitude},我的位置&to=${this.currentPositionHover.longitude},${this.currentPositionHover.latitude},${this.currentPositionHover.areaName || item.parkName}&mode=car&policy=1&src=mypage&coordinate=gaode&callnative=0`;
-						break;
-				}
-			},
-			/**
-			 * 清空搜索框内容
-			 * @date 2021-08-10
-			 * @returns {any}
-			 */
-			clearSearchInput() {
-				this.searchContent = '';
-				this.isShowSearchParking = false;
-				const obj = {
-					0: 'getNearRoadsl',
-					1: 'getParkingLotList'
-				}
-				this[obj[this.tabObj.current]]()
-			},
-			/**
-			 * 默认首个点放大 如果有传入经纬度则对应的点放大
-			 * @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;
-						}
-						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'
-						});
-					});
-			},
-			getParkingLotList(lon, lat) {
-				this.$u.api
-					.nearParkingLot({
-						status: 1,
-						latitude: this.currentPosition.latitude,
-						longitude: this.currentPosition.longitude,
-						parkName: this.searchContent
-					})
-					.then((res) => {
-						const nearParkingList = []; // 附近停车场列表
-						this.covers = [];
-						res?.data?.rows.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;
-						}
-						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;
-					}
-				});
-				const obj = {
-					0: 'getNearRoadsl',
-					1: 'getParkingLotList'
-				}
-				this[obj[this.tabObj.current]](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
-				});
-				const obj = {
-					0: 'getNearRoadsl',
-					1: 'getParkingLotList'
-				}
-				this[obj[this.tabObj.current]](this.nearParkingList[item.detail.current].longitude, this.nearParkingList[
-					item.detail
-					.current].latitude)
-			},
-			/**
-			 * 点击单个地址
-			 * @date 2022-08-31
-			 * @param {any} item
-			 * @returns {any}
-			 */
-			positionAddress(item) {
-				const map = uni.createMapContext('pagemap');
-				map.moveToLocation({
-					longitude: item.longitude,
-					latitude: item.latitude
-				});
-				const obj = {
-					0: 'getNearRoadsl',
-					1: 'getParkingLotList'
-				}
-				this[obj[this.tabObj.current]](item.longitude, item.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),
-							longitude: this.currentPosition.longitude,
-							latitude: this.currentPosition.latitude
-						}
-					});
-				}
-			},
-			/**
-			 * 跳转停车标准页面
-			 * @date 2021-08-10
-			 * @param {Object} item
-			 * @returns {any}
-			 */
-			lookParkingRule(item) {
-				const obj = {
-					0: 'roadNo',
-					1: 'parkNo'
-				}
-				const params = {}
-				params[obj[this.tabObj.current]] = item[obj[this.tabObj.current]]
-				this.$u.route({
-					url: 'pages/chargeStandard/chargeStandard',
-					params
-				});
-			},
-			/**
-			 * 搜索右侧按钮点击
-			 **/
-			listIconClick() {
-				this.isShowSearchParking = true;
-				this.nearParkingFlag = false;
-				this.searchParkingList = this.nearParkingList;
-			},
-			/**
-			 * 跳转包月
-			 * @date 2021-08-10
-			 * @param {Object} item
-			 * @returns {any}
-			 */
-			createMonth(item) {
-				const obj = {
-					0: 'roadNo',
-					1: 'parkNo'
-				}
-				const params = {}
-				params[obj[this.tabObj.current]] = item[obj[this.tabObj.current]]
-				this.$u.route({
-					url: 'pages/handleMonthly/handleMonthly',
-					params
-				})
-			},
-			pullDown() {
-				if (this.nearParkingObj.height === '20vh') {
-					this.nearParkingObj.height = '60vh';
-					this.nearParkingObj.type = 'down';
-				} else {
-					this.nearParkingObj.height = '20vh';
-					this.nearParkingObj.type = 'up';
-				}
-			},
-			/**
-			 * tab切换触发
-			 * @param {Object} val
-			 */
-			tabChange(val) {
-				this.tabObj.current = val
-				const obj = {
-					0: 'getNearRoadsl',
-					1: 'getParkingLotList'
-				}
-				this[obj[val]]()
-			}
-		}
-	};
+          break;
+        case '高德地图':
+          location.href = `https://uri.amap.com/navigation?from=${this.currentPosition.longitude},${this.currentPosition.latitude},我的位置&to=${
+            this.currentPositionHover.longitude
+          },${this.currentPositionHover.latitude},${
+            this.currentPositionHover.areaName || item.parkName
+          }&mode=car&policy=1&src=mypage&coordinate=gaode&callnative=0`;
+          break;
+      }
+    },
+    /**
+     * 清空搜索框内容
+     * @date 2021-08-10
+     * @returns {any}
+     */
+    clearSearchInput() {
+      this.searchContent = '';
+      this.isShowSearchParking = false;
+      const obj = {
+        0: 'getNearRoadsl',
+        1: 'getParkingLotList'
+      };
+      this[obj[this.tabObj.current]]();
+    },
+    /**
+     * 默认首个点放大 如果有传入经纬度则对应的点放大
+     * @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;
+          }
+          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'
+          });
+        });
+    },
+    getParkingLotList(lon, lat) {
+      this.$u.api
+        .nearParkingLot({
+          status: 1,
+          latitude: this.currentPosition.latitude,
+          longitude: this.currentPosition.longitude,
+          parkName: this.searchContent
+        })
+        .then((res) => {
+          const nearParkingList = []; // 附近停车场列表
+          this.covers = [];
+          res?.data?.rows.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;
+          }
+          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;
+        }
+      });
+      const obj = {
+        0: 'getNearRoadsl',
+        1: 'getParkingLotList'
+      };
+      this[obj[this.tabObj.current]](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
+      });
+      const obj = {
+        0: 'getNearRoadsl',
+        1: 'getParkingLotList'
+      };
+      this[obj[this.tabObj.current]](this.nearParkingList[item.detail.current].longitude, this.nearParkingList[item.detail.current].latitude);
+    },
+    /**
+     * 点击单个地址
+     * @date 2022-08-31
+     * @param {any} item
+     * @returns {any}
+     */
+    positionAddress(item) {
+      const map = uni.createMapContext('pagemap');
+      map.moveToLocation({
+        longitude: item.longitude,
+        latitude: item.latitude
+      });
+      const obj = {
+        0: 'getNearRoadsl',
+        1: 'getParkingLotList'
+      };
+      this[obj[this.tabObj.current]](item.longitude, item.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),
+            longitude: this.currentPosition.longitude,
+            latitude: this.currentPosition.latitude
+          }
+        });
+      }
+    },
+    /**
+     * 跳转停车标准页面
+     * @date 2021-08-10
+     * @param {Object} item
+     * @returns {any}
+     */
+    lookParkingRule(item) {
+      const obj = {
+        0: 'roadNo',
+        1: 'parkNo'
+      };
+      const params = {};
+      params[obj[this.tabObj.current]] = item[obj[this.tabObj.current]];
+      this.$u.route({
+        url: 'pages/chargeStandard/chargeStandard',
+        params
+      });
+    },
+    /**
+     * 搜索右侧按钮点击
+     **/
+    listIconClick() {
+      this.isShowSearchParking = true;
+      this.nearParkingFlag = false;
+      this.searchParkingList = this.nearParkingList;
+    },
+    /**
+     * 跳转包月
+     * @date 2021-08-10
+     * @param {Object} item
+     * @returns {any}
+     */
+    createMonth(item) {
+      const obj = {
+        0: 'roadNo',
+        1: 'parkNo'
+      };
+      const params = {};
+      params[obj[this.tabObj.current]] = item[obj[this.tabObj.current]];
+      this.$u.route({
+        url: 'pages/handleMonthly/handleMonthly',
+        params
+      });
+    },
+    pullDown() {
+      if (this.nearParkingObj.height === '20vh') {
+        this.nearParkingObj.height = '60vh';
+        this.nearParkingObj.type = 'down';
+      } else {
+        this.nearParkingObj.height = '20vh';
+        this.nearParkingObj.type = 'up';
+      }
+    },
+    /**
+     * tab切换触发
+     * @param {Object} val
+     */
+    tabChange(val) {
+      this.tabObj.current = val;
+      const obj = {
+        0: 'getNearRoadsl',
+        1: 'getParkingLotList'
+      };
+      this[obj[val]]();
+    }
+  }
+};
 </script>
 
 <style lang="scss" scoped>
-	.wrap {
-		margin-top: 20vh;
-	}
+.wrap {
+  margin-top: 20vh;
+}
 
-	@import './parkingLists.scss';
+@import './parkingLists.scss';
 </style>

+ 12 - 1
pages/parkingLock/parkingLock.vue

@@ -164,7 +164,18 @@ export default {
       this.isBack = page?.isBack;
       this.polyOrderId = page?.polyOrderId;
     } else {
-      this.tipsMsg = page.msg || '参数丢失!';
+      uni.showModal({
+        title: '提示',
+        content: '参数丢失, 返回首页',
+        showCancel: false,
+        success: function (res) {
+          if (res.confirm) {
+            uni.switchTab({
+              url: '/pages/index/index'
+            });
+          }
+        }
+      });
       this.parkingLockStatus = 5;
     }
   },

+ 1 - 1
pages/searchparking/searchparking.vue

@@ -18,7 +18,7 @@
         @change="tabChange"
         :is-scroll="false"
         swiperWidth="100%"
-      ></u-tabs-swiper>
+      />
     </view>
     <mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" height="calc(100vh - 84px)" top="50rpx">
       <view class="parkinglist">

+ 2 - 0
static/js/jgoldplan-1.0.0.js

@@ -0,0 +1,2 @@
+(function(){var d="";window.addEventListener("message",function(a){var b="string"==typeof a.data?JSON.parse(a.data):a.data;console.log("parent origin",a.origin);console.log("parent data",b);"https://payapp.weixin.qq.com"===a.origin&&Object.prototype.hasOwnProperty.call(b,"action")&&"setToken"===b.action&&Object.prototype.hasOwnProperty.call(b,"token")?d=b.token:console.log("valid")});window.addEventListener("pagehide",function(){var a=JSON.stringify({action:"onSubPageLeave",subPageUrl:window.location.href,
+token:d,sdkVersion:"0.1"});console.log("child page will leave");parent.postMessage(a,"https://payapp.weixin.qq.com")});var c={action:"onLoadSdk",subPageUrl:window.location.href,token:d,sdkVersion:"0.1"};console.log("send message",c);c=JSON.stringify(c);parent.postMessage(c,"https://payapp.weixin.qq.com")})();/*  |xGv00|08097d7ae5858d3c6941d62e581cff57 */