空白格 2 years ago
parent
commit
736d486fc1

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

@@ -46,7 +46,7 @@
 					<u-cell-item title="免费时长 " :arrow="false" :border-bottom="false" :border-top="false"
 					<u-cell-item title="免费时长 " :arrow="false" :border-bottom="false" :border-top="false"
 						:value="orderInfo.freeDuration"></u-cell-item>
 						:value="orderInfo.freeDuration"></u-cell-item>
 				</template>
 				</template>
-				<<!-- template v-else>
+				<!-- <template v-else>
 					<u-cell-item title="免费时长 " :arrow="false" :border-bottom="false" :border-top="false" :value="new Date(orderInfo.createTime).valueOf() < new Date('2022-06-20 00:00:00').valueOf() ? '0天0时15分0秒' : '0天0时30分0秒'"></u-cell-item>
 					<u-cell-item title="免费时长 " :arrow="false" :border-bottom="false" :border-top="false" :value="new Date(orderInfo.createTime).valueOf() < new Date('2022-06-20 00:00:00').valueOf() ? '0天0时15分0秒' : '0天0时30分0秒'"></u-cell-item>
 				</template> -->
 				</template> -->
 				<u-cell-item title=" 计费时长 " :arrow=" false" :border-bottom="false" :border-top="false"
 				<u-cell-item title=" 计费时长 " :arrow=" false" :border-bottom="false" :border-top="false"

+ 38 - 38
pages/parkingLists/parkingLists.scss

@@ -1,5 +1,5 @@
 .parking {
 .parking {
-	background-color: #008CFF;
+	background-color: #008cff;
 	position: relative;
 	position: relative;
 }
 }
 .parking-header {
 .parking-header {
@@ -19,7 +19,7 @@
 	left: 30rpx;
 	left: 30rpx;
 	background-color: #fff;
 	background-color: #fff;
 	border-radius: 26.5rpx;
 	border-radius: 26.5rpx;
-	box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1)
+	box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
 }
 }
 .parking-details-header {
 .parking-details-header {
 	display: flex;
 	display: flex;
@@ -43,7 +43,7 @@
 	color: rgba(0, 140, 255, 1);
 	color: rgba(0, 140, 255, 1);
 }
 }
 .parking-details-button {
 .parking-details-button {
-	background-color: #008CFF;
+	background-color: #008cff;
 	height: 103rpx;
 	height: 103rpx;
 	line-height: 103rpx;
 	line-height: 103rpx;
 	border-bottom-left-radius: 26.5rpx;
 	border-bottom-left-radius: 26.5rpx;
@@ -57,7 +57,7 @@
 .parking-details-right-distance {
 .parking-details-right-distance {
 	height: 44rpx;
 	height: 44rpx;
 	line-height: 44rpx;
 	line-height: 44rpx;
-	color: #008CFF;
+	color: #008cff;
 	display: flex;
 	display: flex;
 	flex-direction: row;
 	flex-direction: row;
 	margin-bottom: 20rpx;
 	margin-bottom: 20rpx;
@@ -76,13 +76,13 @@
 }
 }
 .parking-current-address {
 .parking-current-address {
 	position: absolute;
 	position: absolute;
-	bottom: 84rpx;
+	bottom: 80rpx;
 	z-index: 1000;
 	z-index: 1000;
 	width: 100%;
 	width: 100%;
 	height: 345rpx;
 	height: 345rpx;
 }
 }
 .parking-current-address .swiper {
 .parking-current-address .swiper {
-	height: 400rpx;
+	height: 430rpx;
 }
 }
 .parking-current-address .swiper-item {
 .parking-current-address .swiper-item {
 	background-color: #fff;
 	background-color: #fff;
@@ -91,21 +91,21 @@
 	border-radius: 25rpx;
 	border-radius: 25rpx;
 	padding: 30rpx;
 	padding: 30rpx;
 }
 }
-.parking-current-address .swiper-item>view:first-child {
+.parking-current-address .swiper-item > view:first-child {
 	font-size: 32rpx;
 	font-size: 32rpx;
 	color: #484848;
 	color: #484848;
 	line-height: 50rpx;
 	line-height: 50rpx;
 }
 }
-.parking-current-address .swiper-item>view:nth-child(2) {
+.parking-current-address .swiper-item > view:nth-child(2) {
 	font-size: 24rpx;
 	font-size: 24rpx;
 	color: #969696;
 	color: #969696;
 	line-height: 50rpx;
 	line-height: 50rpx;
 }
 }
-.parking-current-address .swiper-item>view:nth-child(3) {
+.parking-current-address .swiper-item > view:nth-child(3) {
 	display: flex;
 	display: flex;
 	flex-direction: row;
 	flex-direction: row;
-	background: -webkit-gradient(linear, 0% 0%, 0% 100%,from(#fff), to(#F4F7FF));/*谷歌*/
+	background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff), to(#f4f7ff)); /*谷歌*/
-	background: linear-gradient(to right, #fff 0%, #F4F7FF 50%, #fff 100%);
+	background: linear-gradient(to right, #fff 0%, #f4f7ff 50%, #fff 100%);
 	justify-content: space-around;
 	justify-content: space-around;
 	height: 71rpx;
 	height: 71rpx;
 	line-height: 71rpx;
 	line-height: 71rpx;
@@ -113,15 +113,15 @@
 	margin-top: 20rpx;
 	margin-top: 20rpx;
 	margin-bottom: 20rpx;
 	margin-bottom: 20rpx;
 }
 }
-.parking-current-address .swiper-item>view:nth-child(4) {
+.parking-current-address .swiper-item > view:nth-child(4) {
 	display: flex;
 	display: flex;
 	flex-direction: row;
 	flex-direction: row;
 	justify-content: space-around;
 	justify-content: space-around;
 }
 }
-.parking-current-address .swiper-item>view:nth-child(5) {
+.parking-current-address .swiper-item > view:nth-child(5) {
 	text-align: center;
 	text-align: center;
 	margin-top: 30rpx;
 	margin-top: 30rpx;
-	color: #A4A4A4;
+	color: #a4a4a4;
 	font-size: 24rpx;
 	font-size: 24rpx;
 }
 }
 .parking-address-list {
 .parking-address-list {
@@ -159,7 +159,7 @@
 	color: #969696;
 	color: #969696;
 	margin-top: 10rpx;
 	margin-top: 10rpx;
 	overflow: hidden;
 	overflow: hidden;
-	text-overflow:ellipsis;
+	text-overflow: ellipsis;
 	white-space: nowrap;
 	white-space: nowrap;
 }
 }
 .pali-right image {
 .pali-right image {
@@ -171,11 +171,11 @@
 	font-size: 20rpx;
 	font-size: 20rpx;
 }
 }
 .yellow-font {
 .yellow-font {
-	color: #FA6400;
+	color: #fa6400;
 	margin-left: 10rpx;
 	margin-left: 10rpx;
 }
 }
 .swiper-item-font {
 .swiper-item-font {
-	color: #6D6D6D;
+	color: #6d6d6d;
 	font-size: 28rpx;
 	font-size: 28rpx;
 }
 }
 .swiper-item-button button {
 .swiper-item-button button {
@@ -185,16 +185,16 @@
 	font-size: 30rpx;
 	font-size: 30rpx;
 }
 }
 .swiper-item-button button:first-child {
 .swiper-item-button button:first-child {
-	border: solid 1px #008CFF;
+	border: solid 1px #008cff;
-	color: #008CFF;
+	color: #008cff;
 	margin-right: 4%;
 	margin-right: 4%;
 }
 }
 .swiper-item-button button:last-child {
 .swiper-item-button button:last-child {
-	background-color: #008CFF;
+	background-color: #008cff;
 	color: #fff;
 	color: #fff;
 }
 }
 .swiper-item-button .disabled {
 .swiper-item-button .disabled {
-	background-color: #d2d2d2!important;
+	background-color: #d2d2d2 !important;
 }
 }
 .loading {
 .loading {
 	width: 100%;
 	width: 100%;
@@ -224,11 +224,11 @@
 	justify-content: space-between;
 	justify-content: space-between;
 	padding: 25rpx;
 	padding: 25rpx;
 }
 }
-.padt-header>view>view:nth-child(1) {
+.padt-header > view > view:nth-child(1) {
 	color: #484848;
 	color: #484848;
 	font-size: 32rpx;
 	font-size: 32rpx;
 }
 }
-.padt-header>view.padt-header-title>view:nth-child(2) {
+.padt-header > view.padt-header-title > view:nth-child(2) {
 	color: #969696;
 	color: #969696;
 	font-size: 24rpx;
 	font-size: 24rpx;
 	margin-top: 16rpx;
 	margin-top: 16rpx;
@@ -238,7 +238,7 @@
 }
 }
 .padt-header-icon view {
 .padt-header-icon view {
 	font-size: 18rpx;
 	font-size: 18rpx;
-	color: #3A3A3A;
+	color: #3a3a3a;
 }
 }
 .padt-header image {
 .padt-header image {
 	width: 45rpx;
 	width: 45rpx;
@@ -251,7 +251,7 @@
 	color: #727275;
 	color: #727275;
 }
 }
 .padt-timeline text {
 .padt-timeline text {
-	color: #FA6B0B;
+	color: #fa6b0b;
 	margin-left: 5rpx;
 	margin-left: 5rpx;
 	font-size: 29rpx;
 	font-size: 29rpx;
 }
 }
@@ -264,25 +264,25 @@
 	display: flex;
 	display: flex;
 	flex-direction: row;
 	flex-direction: row;
 }
 }
-.parking-address-details-numer>view {
+.parking-address-details-numer > view {
 	width: 48%;
 	width: 48%;
 	height: 110rpx;
 	height: 110rpx;
 	padding: 15rpx;
 	padding: 15rpx;
 	text-align: center;
 	text-align: center;
-	background: linear-gradient(359deg, #FFFFFF 0%, #F6F6FF 100%);
+	background: linear-gradient(359deg, #ffffff 0%, #f6f6ff 100%);
 	border-radius: 15px;
 	border-radius: 15px;
 }
 }
-.parking-address-details-numer>view>view:first-child {
+.parking-address-details-numer > view > view:first-child {
-	color: #008CFF;
+	color: #008cff;
 	font-size: 56rpx;
 	font-size: 56rpx;
 	font-weight: 400;
 	font-weight: 400;
 }
 }
-.parking-address-details-numer>view>view:last-child {
+.parking-address-details-numer > view > view:last-child {
 	color: #838383;
 	color: #838383;
 	font-size: 24rpx;
 	font-size: 24rpx;
 	font-weight: 400;
 	font-weight: 400;
 }
 }
-.parking-address-details-numer>view:last-child {
+.parking-address-details-numer > view:last-child {
 	margin-left: 4%;
 	margin-left: 4%;
 }
 }
 .parking-address-details-price {
 .parking-address-details-price {
@@ -291,22 +291,22 @@
 	width: calc(100% - 30rpx);
 	width: calc(100% - 30rpx);
 	margin: 10rpx auto 0;
 	margin: 10rpx auto 0;
 }
 }
-.parking-address-details-price>view:first-child {
+.parking-address-details-price > view:first-child {
 	font-size: 24rpx;
 	font-size: 24rpx;
 	color: #787878;
 	color: #787878;
 	font-weight: 400;
 	font-weight: 400;
 	text-align: center;
 	text-align: center;
 	padding-top: 24rpx;
 	padding-top: 24rpx;
 }
 }
-.parking-address-details-price>view>text:first-child {
+.parking-address-details-price > view > text:first-child {
 	font-size: 66rpx;
 	font-size: 66rpx;
-	color: #008CFF;
+	color: #008cff;
 }
 }
-.parking-address-details-price>view:last-child {
+.parking-address-details-price > view:last-child {
 	width: 100%;
 	width: 100%;
 	height: 81rpx;
 	height: 81rpx;
 	line-height: 81rpx;
 	line-height: 81rpx;
-	background: linear-gradient(180deg, #EFEFFF 0%, #FFFFFF 100%);
+	background: linear-gradient(180deg, #efefff 0%, #ffffff 100%);
 	border-bottom-left-radius: 25rpx;
 	border-bottom-left-radius: 25rpx;
 	border-bottom-right-radius: 25rpx;
 	border-bottom-right-radius: 25rpx;
 	text-align: center;
 	text-align: center;
@@ -317,9 +317,9 @@
 	height: 96rpx;
 	height: 96rpx;
 	line-height: 96rpx;
 	line-height: 96rpx;
 	margin: 103rpx auto 57rpx;
 	margin: 103rpx auto 57rpx;
-	background-color: #008CFF;
+	background-color: #008cff;
 	border-radius: 10rpx;
 	border-radius: 10rpx;
 	text-align: center;
 	text-align: center;
 	font-size: 28rpx;
 	font-size: 28rpx;
 	color: #fff;
 	color: #fff;
-}
+}

+ 413 - 426
pages/parkingLists/parkingLists.vue

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

+ 28 - 10
pages/paymentMethod/paymentMethod.scss

@@ -17,26 +17,26 @@
 }
 }
 .pay-way-new {
 .pay-way-new {
 	display: flex;
 	display: flex;
-	justify-content: space-between;
+	justify-content: space-around;
-	width: calc(100% - 80rpx);
+	width: calc(100% - 60rpx);
 	border-top: solid 1px #979797;
 	border-top: solid 1px #979797;
-	margin: 23rpx auto;
+	margin: 23rpx auto 0;
-	padding: 36rpx 0;
+	padding: 36rpx 0 10rpx;
 	.pay-way-item {
 	.pay-way-item {
-		width: calc(50% - 9rpx);
+		width: calc(33% - 9rpx);
 		border-radius: 20rpx;
 		border-radius: 20rpx;
 		text-align: center;
 		text-align: center;
 		padding: 30rpx 0;
 		padding: 30rpx 0;
 		image {
 		image {
-			width: 159rpx;
+			width: 110rpx;
-			height: 159rpx;
+			height: 110rpx;
 		}
 		}
 		.title {
 		.title {
-			font-size: 30rpx;
+			font-size: 28rpx;
 			font-weight: 400;
 			font-weight: 400;
 			font-family: 'PingFangSC-Regular, PingFang SC';
 			font-family: 'PingFangSC-Regular, PingFang SC';
 			color: #fff;
 			color: #fff;
-			margin: 15rpx 0;
+			margin: 10rpx 0;
 		}
 		}
 		.subtitle {
 		.subtitle {
 			font-size: 14rpx;
 			font-size: 14rpx;
@@ -49,9 +49,27 @@
 	.pay-way-item-hy {
 	.pay-way-item-hy {
 		background: linear-gradient(153deg, #FA9460 0%, #FF5065 100%)
 		background: linear-gradient(153deg, #FA9460 0%, #FF5065 100%)
 	}
 	}
-	.pay-way-item-jh {
+	.pay-way-item-wx {
 		background: linear-gradient(155deg, #5EE3A6 0%, #3EB9C8 100%);
 		background: linear-gradient(155deg, #5EE3A6 0%, #3EB9C8 100%);
 	}
 	}
+	.pay-way-item-jh {
+		background: linear-gradient(155deg, #5AA6FF 0%, #C782FF 100%);
+	}
+}
+.pay-way-subtitle {
+	display: flex;
+	justify-content: space-around;
+	width: calc(100% - 60rpx);
+	margin: 0 auto 60rpx;
+	&-item {
+		width: calc(33% - 9rpx);
+		border-radius: 20rpx;
+		text-align: center;
+		font-size: 20rpx;
+		font-weight: 400;
+		font-family: 'PingFangSC-Regular, PingFang SC';
+		opacity: 0.73;
+	}
 }
 }
 .pay-way-close-btn {
 .pay-way-close-btn {
 	width: calc(100% - 80rpx);
 	width: calc(100% - 80rpx);

+ 232 - 202
pages/paymentMethod/paymentMethod.vue

@@ -3,25 +3,10 @@
 		支付方式选择  微信or贵阳银行
 		支付方式选择  微信or贵阳银行
 	 -->
 	 -->
 	<view>
 	<view>
-		<u-modal
+		<u-modal v-model="payWayPop" :title-style="{ color: '#404040' }" title="缴费方式" width="660rpx" :show-confirm-button="false" :show-cancel-button="false">
-		v-model="payWayPop"
-		:title-style="{color: '#404040'}"
-		title="缴费方式"
-		:show-confirm-button="false"
-		:show-cancel-button="false">
 			<view class="slot-content">
 			<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-new">
-					<view class="pay-way-item pay-way-item-hy" @click="gyBankPay">
+					<!-- <view class="pay-way-item pay-way-item-hy" @click="gyBankPay">
 						<image src="../../static/img/guiyang-bank-icon.png" mode=""></image>
 						<image src="../../static/img/guiyang-bank-icon.png" mode=""></image>
 						<view class="title">贵州银行</view>
 						<view class="title">贵州银行</view>
 						<view class="subtitle">前三个月每天首次一分钱<br/>长期八折优惠</view>
 						<view class="subtitle">前三个月每天首次一分钱<br/>长期八折优惠</view>
@@ -29,7 +14,28 @@
 					<view class="pay-way-item pay-way-item-jh" @click="wechatPay">
 					<view class="pay-way-item pay-way-item-jh" @click="wechatPay">
 						<image src="../../static/img/juhe-icon.png" mode=""></image>
 						<image src="../../static/img/juhe-icon.png" mode=""></image>
 						<view class="title">微信/支付宝</view>
 						<view class="title">微信/支付宝</view>
+					</view> -->
+					<view class="pay-way-item pay-way-item-hy" @click="gyBankPay">
+						<image src="/static/img/gyyh-icon.svg" mode=""></image>
+						<view class="title">贵州银行</view>
+					</view>
+					<!-- #ifdef H5 || MP-WEIXIN -->
+					<view class="pay-way-item pay-way-item-wx" @click="wechatPay" v-if="wxEnv">
+						<image src="/static/img/weixin-icon.svg" mode=""></image>
+						<view class="title">微信支付</view>
 					</view>
 					</view>
+					<!-- #endif -->
+					<view class="pay-way-item pay-way-item-jh" @click="juhePay">
+						<image src="/static/img/juhe-icon.svg" mode=""></image>
+						<view class="title">聚合支付</view>
+					</view>
+				</view>
+				<view class="pay-way-subtitle">
+					<view class="pay-way-subtitle-item">前三个月每天首次一分钱,长期八折优惠</view>
+					<!-- #ifdef H5 || MP-WEIXIN -->
+					<view class="pay-way-subtitle-item" v-if="wxEnv">&nbsp;</view>
+					<!-- #endif -->
+					<view class="pay-way-subtitle-item">&nbsp;</view>
 				</view>
 				</view>
 				<button class="pay-way-close-btn" @click="closePaymentMethod">关闭</button>
 				<button class="pay-way-close-btn" @click="closePaymentMethod">关闭</button>
 			</view>
 			</view>
@@ -39,218 +45,242 @@
 </template>
 </template>
 
 
 <script>
 <script>
-	import getUrlParams from "@/utils/getUrlParams.js";
+import getUrlParams from '@/utils/getUrlParams.js';
-	// import {
+import { getEnvIsWx } from '@/utils/judgEnvironment.js';
-	// 	getEnvIsWx
+export default {
-	// } from '@/utils/judgEnvironment.js'
+	props: {
-	export default {
+		// 弹框显示
-		props: {
+		payWayPop: {
-			// 弹框显示
+			type: Boolean,
-			payWayPop: {
+			default: false
-				type: Boolean,
-				default: false
-			},
-			// 订单数组
-			curOrderList: {
-				type: Array,
-				default: null
-			},
-			// 设备编号
-			deviceNo: {
-				type: String,
-				default: null
-			},
-			// 地磁支付需要字段
-			payeeId: {
-				type: String,
-				default: undefined
-			},
-			// 地磁支付需要字段
-			payeeName: {
-				type: String,
-				default: undefined
-			},
-			// 跳转页面
-			jumpUrl: {
-				type: String,
-				default: null
-			}
 		},
 		},
-		data() {
+		// 订单数组
-			return {}
+		curOrderList: {
+			type: Array,
+			default: null
 		},
 		},
-		methods: {
+		// 设备编号
-			/**
+		deviceNo: {
-			 * 贵阳银行支付
+			type: String,
-			 * @param {Array} orderList 需要支付的订单号组成的数组
+			default: null
-			 * @param {String} deviceNo 设备编号(只有车位锁部分有)
+		},
-			 * */
+		// 地磁支付需要字段
-			gyBankPay() {
+		payeeId: {
-				uni.showLoading({
+			type: String,
-				    title: '加载中'
+			default: undefined
-				});
+		},
-				const params = {
+		// 地磁支付需要字段
-					orderList: this.curOrderList,
+		payeeName: {
-					deviceNo: this.deviceNo,
+			type: String,
-					jumpUrl: this.jumpUrl,
+			default: undefined
-					payeeId: this.payeeId,
+		},
-					payeeName: this.payeeName
+		// 跳转页面
-				};
+		jumpUrl: {
-				this.$u.api.payGzbank(params).then(res=>{
+			type: String,
+			default: null
+		}
+	},
+	data() {
+		return {
+			wxEnv: true
+		};
+	},
+	created() {
+		this.wxEnv = getEnvIsWx();
+	},
+	methods: {
+		/**
+		 * 贵阳银行支付
+		 * @param {Array} orderList 需要支付的订单号组成的数组
+		 * @param {String} deviceNo 设备编号(只有车位锁部分有)
+		 * */
+		gyBankPay() {
+			uni.showLoading({
+				title: '加载中'
+			});
+			const params = {
+				orderList: this.curOrderList,
+				deviceNo: this.deviceNo,
+				jumpUrl: this.jumpUrl,
+				payeeId: this.payeeId,
+				payeeName: this.payeeName
+			};
+			this.$u.api
+				.payGzbank(params)
+				.then(res => {
 					if (res.data.needPay) {
 					if (res.data.needPay) {
 						let payUrl = res.data.url;
 						let payUrl = res.data.url;
 						location.href = payUrl;
 						location.href = payUrl;
 					} else {
 					} else {
 						this.$refs.uToast.show({
 						this.$refs.uToast.show({
 							title: '无需支付',
 							title: '无需支付',
-							type: 'info',
+							type: 'info'
 						});
 						});
 						setTimeout(() => {
 						setTimeout(() => {
 							uni.hideLoading();
 							uni.hideLoading();
-							location.reload()
+							location.reload();
-						}, 1000)
+						}, 1000);
 					}
 					}
-				}).catch(err=>{
+				})
+				.catch(err => {
 					this.$refs.uToast.show({
 					this.$refs.uToast.show({
 						title: err.msg,
 						title: err.msg,
-						type: 'error',
+						type: 'error'
 					});
 					});
 				});
 				});
-			},
+		},
-			/**
+		/**
-			 * 微信支付
+		 * 聚合支付
-			 * 判断vuex中是否存在openId
+		 * 判断vuex中是否存在openId
-			 * 存在直接调起微信支付
+		 * 存在直接调起微信支付
-			 * 不存在则通过微信登录去获取用户的code
+		 * 不存在则通过微信登录去获取用户的code
-			 * 完成后通过code去获取用户的openId等信息
+		 * 完成后通过code去获取用户的openId等信息
-			 * 最后再调起微信支付
+		 * 最后再调起微信支付
-			 * */
+		 * */
-			wechatPay() {
+		juhePay() {
-				uni.showLoading({
+			uni.showLoading({
-				    title: '加载中'
+				title: '加载中'
-				});
+			});
-				this.getWXPayByJava(this.curOrderList, this.deviceNo)
+			this.getWXPayByJava(this.curOrderList, this.deviceNo);
-			},
+		},
-			/**
+		/**
-			 * 调起微信支付接口
+		 * 微信支付
-			 * @param {Array} list 需要支付的订单组合数组
+		 */
-			 * @param {Number} deviceNo 设备编号(在停车锁部分需要)
+		wechatPay() {
-			 * */
+			// this.$refs.uToast.show({
-			async getWXPay(orderList, deviceNo){
+			// 	title: '暂不支持',
-				let params = {
+			// 	type: 'info',
-					orderList: orderList,
+			// });
-					openid: this.$store.state.vuex_wxinfo.openId,
+			this.$pay.wxPay({ orderList: this.curOrderList, openid: this.vuex_wxinfo.openId }).then(res => {
-					deviceNo: deviceNo ? deviceNo : null
+				console.log(res);
-				};
+			});
-				
+		},
-				await this.$wxApi.config();
+		/**
-				this.$pay.wechatPay(params).then(res =>{
+		 * 调起微信支付接口
-					switch (Number(res.code)) {
+		 * @param {Array} list 需要支付的订单组合数组
-						case 0: // 成功
+		 * @param {Number} deviceNo 设备编号(在停车锁部分需要)
-							//#ifdef H5
+		 * */
-								
+		async getWXPay(orderList, deviceNo) {
-								window.location.reload();
+			let params = {
-							//#endif
+				orderList: orderList,
-							break;
+				openid: this.$store.state.vuex_wxinfo.openId,
-						case 1: // 取消
+				deviceNo: deviceNo ? deviceNo : null
-							this.$refs.uToast.show({
+			};
-								title: '已取消支付',
+
-								type: 'info',
+			await this.$wxApi.config();
-							});
+			this.$pay.wechatPay(params).then(res => {
-							break;
+				switch (Number(res.code)) {
-						case 2: // 支付失败
+					case 0: // 成功
-							this.$refs.uToast.show({
+						//#ifdef H5
-								title: '支付失败,请检查!',
+
-								type: 'error',
+						window.location.reload();
-							});
+						//#endif
-							break;
+						break;
-					}
+					case 1: // 取消
-				});
+						this.$refs.uToast.show({
-			},
+							title: '已取消支付',
-			/**
+							type: 'info'
-			 * 直接通过后台获取贵阳银行微信支付地址
+						});
-			 * @param {Array} list 需要支付的订单组合数组
+						break;
-			 * @param {Number} deviceNo 设备编号(在停车锁部分需要)
+					case 2: // 支付失败
-			 * */
-			getWXPayByJava(orderList, deviceNo) {
-				let params = {
-					orderList: orderList,
-					openid: '',
-					jumpUrl: this.jumpUrl,
-					deviceNo: deviceNo ? deviceNo : null,
-					payeeId: this.payeeId,
-					payeeName: this.payeeName
-				};
-				this.$u.api.ordinaryWxPay(params)
-					.then(res => {
-						if (res.code === 200) {
-							// if (getEnvIsWx()) {
-							// 	location.href = res.data.qrCodeUrl + '&jump_url=' + encodeURIComponent(this.jumpUrl)
-							// } else {
-							// 	location.href = res.data.qrCodeUrl
-							// }
-							localStorage.setItem('jumpUrl', this.jumpUrl)
-							location.href = res.data.qrCodeUrl
-							// this.cookie.set("jumpUrl",this.jumpUrl);
-						} else {
-							uni.hideLoading();
-						}
-					})
-					.catch(err => {
 						this.$refs.uToast.show({
 						this.$refs.uToast.show({
-							title: '无法调起微信支付!',
+							title: '支付失败,请检查!',
-							type: 'error',
+							type: 'error'
 						});
 						});
-					})
+						break;
-			},
-			/**
-			 * 获取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等用户信息
+		/**
-			 * 拿到用户信息后再调起微信支付
+		 * 直接通过后台获取贵阳银行微信支付地址
-			 * */
+		 * @param {Array} list 需要支付的订单组合数组
-			handleGetWXInfo (code) {
+		 * @param {Number} deviceNo 设备编号(在停车锁部分需要)
-				let _this = this
+		 * */
-				this.$u.api.getWXInfo(code).then((res) => {
+		getWXPayByJava(orderList, deviceNo) {
-					if (res.code === 200 ) {
+			let params = {
+				orderList: orderList,
+				openid: '',
+				jumpUrl: this.jumpUrl,
+				deviceNo: deviceNo ? deviceNo : null,
+				payeeId: this.payeeId,
+				payeeName: this.payeeName
+			};
+			this.$u.api
+				.ordinaryWxPay(params)
+				.then(res => {
+					if (res.code === 200) {
+						// if (getEnvIsWx()) {
+						// 	location.href = res.data.qrCodeUrl + '&jump_url=' + encodeURIComponent(this.jumpUrl)
+						// } else {
+						// 	location.href = res.data.qrCodeUrl
+						// }
+						localStorage.setItem('jumpUrl', this.jumpUrl);
+						location.href = res.data.qrCodeUrl;
+						// this.cookie.set("jumpUrl",this.jumpUrl);
+					} else {
+						uni.hideLoading();
+					}
+				})
+				.catch(err => {
+					this.$refs.uToast.show({
+						title: '无法调起微信支付!',
+						type: 'error'
+					});
+				});
+		},
+		/**
+		 * 获取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.$u.vuex('vuex_wxinfo', res.data);
-						this.getWXPay(this.currentItem)
+						this.getWXPay(this.currentItem);
 					}
 					}
-				}).catch((err) => {
+				})
+				.catch(err => {
 					this.$refs.uToast.show({
 					this.$refs.uToast.show({
 						title: err.msg,
 						title: err.msg,
-						type: 'error',
+						type: 'error'
 					});
 					});
-				})
+				});
-			},
+		},
-			/**
+		/**
-			 * 关闭弹框
+		 * 关闭弹框
-			 * */
+		 * */
-			closePaymentMethod() {
+		closePaymentMethod() {
-				this.$emit('closePaymentMethod')
+			this.$emit('closePaymentMethod');
-			}
 		}
 		}
 	}
 	}
+};
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
-@import './paymentMethod.scss'
+@import './paymentMethod.scss';
 </style>
 </style>

+ 62 - 40
pay.js

@@ -11,42 +11,64 @@ import $http from "./uview-ui/libs/request"
 
 
 export default {
 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);
+	// 			})
+	// 	});
+	// },
+	// 微信支付
 	wxPay(obj = {}) {
 	wxPay(obj = {}) {
 		uni.showLoading({
 		uni.showLoading({
 			title: '支付中'
 			title: '支付中'
 		});
 		});
 		return new Promise(r => {
 		return new Promise(r => {
-			$http.post("/client/wechat/pay",obj)
+			$http.post("/client/wechat/pay", obj)
-				// 区分包月支付和普通支付
+			// 区分包月支付和普通支付
-					if (res.data.needPay && !res.data.monthId) {
+			if (res.data.needPay && !res.data.monthId) {
-						//#ifdef H5
+				//#ifdef H5
-						$wxApi.JSAPI(res.data.wx, jumpUrl).then(r);
+				$wxApi.JSAPI(res.data.wx, jumpUrl).then(r);
-						//#endif
+				//#endif
-					} else if (res.data.monthId) {
+			} else if (res.data.monthId) {
-						//#ifdef H5
+				//#ifdef H5
-						$wxApi.JSAPI(res.data.wx, jumpUrl).then(r);
+				$wxApi.JSAPI(res.data.wx, jumpUrl).then(r);
-						//#endif
+				//#endif
+			} else {
+				uni.showToast({
+					title: "无需支付",
+					icon: "none",
+					duration: 2000
+				});
+				setTimeout(() => {
+					//#ifdef H5
+					if (jumpUrl) {
+						window.location.href = jumpUrl;
 					} else {
 					} else {
-						uni.showToast({
+						window.location.reload();
-							title: "无需支付",
-							icon: "none",
-							duration: 2000
-						});
-						setTimeout(() =>{
-							//#ifdef H5
-							if (jumpUrl) {
-								window.location.href = jumpUrl;
-							} else {
-								window.location.reload();
-							}
-							//#endif
-						}, 1500)
 					}
 					}
-					this.payError(res);
+					//#endif
-				}).catch(err =>{
+				}, 1500)
-					// alert(err.msg);
+			}
-					console.log('pay err',err);
+			// $http.post("/client/pay/wechat", obj)
-				})
+			// 	.then(res => {
+			// 		//#ifdef H5
+			// 		$wxApi.JSAPI(res.data).then(r);
+			// 		//#endif
+			// 		this.payError(res);
+			// 	}).catch(err => {
+			// 		console.log('pay err', err);
+			// 	})
 		});
 		});
 	},
 	},
 	/**
 	/**
@@ -61,7 +83,7 @@ export default {
 		});
 		});
 		return new Promise(r => {
 		return new Promise(r => {
 			$http.post(url, obj)
 			$http.post(url, obj)
-				.then(res=>{
+				.then(res => {
 					// 区分包月支付和普通支付
 					// 区分包月支付和普通支付
 					if (res.data.needPay && !res.data.monthId) {
 					if (res.data.needPay && !res.data.monthId) {
 						//#ifdef H5
 						//#ifdef H5
@@ -77,7 +99,7 @@ export default {
 							icon: "none",
 							icon: "none",
 							duration: 2000
 							duration: 2000
 						});
 						});
-						setTimeout(() =>{
+						setTimeout(() => {
 							//#ifdef H5
 							//#ifdef H5
 							if (jumpUrl) {
 							if (jumpUrl) {
 								window.location.href = jumpUrl;
 								window.location.href = jumpUrl;
@@ -88,23 +110,23 @@ export default {
 						}, 1500)
 						}, 1500)
 					}
 					}
 					this.payError(res);
 					this.payError(res);
-				}).catch(err =>{
+				}).catch(err => {
 					// alert(err.msg);
 					// alert(err.msg);
-					console.log('pay err',err);
+					console.log('pay err', err);
 				})
 				})
 		});
 		});
 	},
 	},
 	//支付错误处理
 	//支付错误处理
-	payError(res){
+	payError(res) {
 		uni.hideLoading();
 		uni.hideLoading();
-		if(res.code == 623){
+		if (res.code == 623) {
-			setTimeout(i=>{
+			setTimeout(i => {
 				new Vue().$api.goto("/pages/userCenter/myOrder/myOrder");
 				new Vue().$api.goto("/pages/userCenter/myOrder/myOrder");
-			},2000);
+			}, 2000);
 			uni.showToast({
 			uni.showToast({
-				title:res.msg + "    即将跳转到订单页",
+				title: res.msg + "    即将跳转到订单页",
-				icon:"none",
+				icon: "none",
-				duration:2000
+				duration: 2000
 			});
 			});
 		}
 		}
 	}
 	}

File diff suppressed because it is too large
+ 13 - 0
static/img/gyyh-icon.svg


File diff suppressed because it is too large
+ 10 - 0
static/img/juhe-icon.svg


+ 14 - 0
static/img/weixin-icon.svg

@@ -0,0 +1,14 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 110 110" class="design-iconfont">
+  <defs>
+    <filter id="povwgb59f__yjzzw2ry2a">
+      <feColorMatrix in="SourceGraphic" values="0 0 0 0 0.200000 0 0 0 0 0.729412 0 0 0 0 0.768627 0 0 0 1.000000 0"/>
+    </filter>
+  </defs>
+  <g fill="none" fill-rule="evenodd">
+    <path fill="#FFF" opacity=".2" d="M55 0A55 55 0 1 0 55 110A55 55 0 1 0 55 0Z"/>
+    <path fill="#FFF" d="M55 10A45 45 0 1 0 55 100A45 45 0 1 0 55 10Z"/>
+    <g filter="url(#povwgb59f__yjzzw2ry2a)">
+      <path d="M35.1975,13.0072114 C35.7955,13.0072114 36.38375,13.0533947 36.97525,13.1193709 C35.38275,5.59148446 27.456,0 18.40475,0 C8.2875,0 0,6.99677791 0,15.8870733 C0,21.0167242 2.756,25.2293057 7.3645,28.5017261 L5.525,34.1196011 L11.96,30.8471807 C14.261,31.3057154 16.107,31.7807442 18.40475,31.7807442 C18.98325,31.7807442 19.55525,31.7543537 20.12075,31.7114691 C19.76325,30.4612198 19.552,29.1548907 19.552,27.7924818 C19.55525,19.6312236 26.45825,13.0072114 35.1975,13.0072114 Z M25.3045,7.94353663 C26.6955,7.94353663 27.60875,8.87050249 27.60875,10.2757959 C27.60875,11.6744918 26.6955,12.611354 25.3045,12.611354 C23.92975,12.611354 22.54525,11.6744918 22.54525,10.2757959 C22.54525,8.86720368 23.9265,7.94353663 25.3045,7.94353663 Z M12.42475,12.611354 C11.0435,12.611354 9.6525,11.6744918 9.6525,10.2757959 C9.6525,8.87050249 11.0435,7.94353663 12.42475,7.94353663 C13.806,7.94353663 14.7225,8.86720368 14.7225,10.2757959 C14.7225,11.6744918 13.806,12.611354 12.42475,12.611354 Z M52,27.5681626 C52,20.0996548 44.6355,14.0133487 36.36425,14.0133487 C27.6055,14.0133487 20.71225,20.1029536 20.71225,27.5681626 C20.71225,35.0564634 27.60875,41.1229766 36.36425,41.1229766 C38.19725,41.1229766 40.0465,40.6578443 41.886,40.1894131 L46.93325,43 L45.54875,38.3288838 C49.244,35.5116993 52,31.7807442 52,27.5681626 Z M31.28775,25.2293057 C30.3745,25.2293057 29.44825,24.3056387 29.44825,23.3621787 C29.44825,22.4319141 30.3745,21.4950518 31.28775,21.4950518 C32.68525,21.4950518 33.592,22.4319141 33.592,23.3621787 C33.592,24.3056387 32.68525,25.2293057 31.28775,25.2293057 Z M41.4115,25.2293057 C40.50475,25.2293057 39.58175,24.3056387 39.58175,23.3621787 C39.58175,22.4319141 40.5015,21.4950518 41.4115,21.4950518 C42.796,21.4950518 43.71575,22.4319141 43.71575,23.3621787 C43.71575,24.3056387 42.796,25.2293057 41.4115,25.2293057 Z" fill="#000" fill-rule="nonzero" transform="translate(29 34)"/>
+    </g>
+  </g>
+</svg>

Some files were not shown because too many files changed in this diff