zaijin 2 жил өмнө
parent
commit
c28c925740

+ 2 - 1
components/swiper-list-item/swiper-list-item.vue

@@ -16,7 +16,8 @@
           </view>
           <template v-if="Number(item.status) === 0">
             <view class="clit-right">
-              <u-button class="clit-right-btn" type="primary" size="default" @click="goToUse(item)">立即使用</u-button>
+              <!-- <u-button class="clit-right-btn" type="primary" size="default" @click="goToUse(item)">立即使用</u-button> -->
+              <u-button class="clit-right-btn" disabled type="primary" size="default">未使用</u-button>
             </view>
           </template>
           <template v-else-if="Number(item.status) === 1">

+ 345 - 342
pages.json

@@ -1,344 +1,347 @@
 {
-	"easycom": {
-		"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
-	},
-	"pages": [{
-			"path": "pages/index/index",
-			"style": {
-				"navigationStyle": "custom",
-				"navigationBarTitleText": "城市智慧停车"
-			}
-		},
-		{
-			"path": "pages/center/index",
-			"style": {
-				"navigationStyle": "custom",
-				"navigationBarTextStyle": "white",
-				"navigationBarTitleText": "城市智慧停车"
-			}
-		},
-		{
-			"path": "pages/center/phoneLogin/phoneLogin",
-			"style": {
-				"navigationBarTitleText": "手机号登录",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/center/order/order",
-			"style": {
-				"navigationBarTitleText": "停车记录",
-				"navigationBarBackgroundColor": "#008CFF",
-				"navigationBarTextStyle": "white"
-			}
-		},
-		{
-			"path": "pages/center/order/orderDetails/orderDetails",
-			"style": {
-				"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": {
-				"navigationStyle": "custom",
-				"navigationBarTitleText": "停车点"
-			}
-		},
-		{
-			"path": "pages/myCars/myCars",
-			"style": {
-				"navigationStyle": "custom",
-				"navigationBarTitleText": "我的车辆"
-			}
-		},
-		{
-			"path": "pages/message/message",
-			"style": {
-				"navigationStyle": "custom",
-				"navigationBarTitleText": "消息中心"
-			}
-		},
-		{
-			"path": "pages/message/messageInfo",
-			"style": {
-				"navigationStyle": "custom",
-				"navigationBarTitleText": "消息中心"
-			}
-		},
-		{
-			"path": "pages/payLists/payLists",
-			"style": {
-				"navigationBarTitleText": "停车缴费",
-				"enablePullDownRefresh": false,
-				"navigationBarBackgroundColor": "#008CFF",
-				"navigationBarTextStyle": "white"
-			}
-		},
-		{
-			"path": "pages/parkingInformation/parkingInformation",
-			"style": {
-				"navigationBarTitleText": "停车场信息",
-				"enablePullDownRefresh": false,
-				"navigationBarBackgroundColor": "#ffffff",
-				"navigationBarTextStyle": "black"
-			}
-		},
-		{
-			"path": "pages/chargeStandard/chargeStandard",
-			"style": {
-				"navigationBarTitleText": "收费标准",
-				"enablePullDownRefresh": false,
-				"navigationBarBackgroundColor": "#008CFF",
-				"navigationBarTextStyle": "white"
-			}
-		},
-		{
-			"path": "pages/handleMonthly/handleMonthly",
-			"style": {
-				"navigationBarTitleText": "办理包月",
-				"enablePullDownRefresh": false,
-				"navigationBarBackgroundColor": "#008CFF",
-				"navigationBarTextStyle": "white"
-			}
-		},
-		{
-			"path": "pages/center/monthly/monthly1",
-			"style": {
-				"navigationBarTitleText": "我的包月",
-				"navigationBarBackgroundColor": "#008CFF",
-				"navigationBarTextStyle": "white",
-				"enablePullDownRefresh": false
-			}
-		},
-		{
-			"path": "pages/center/monthly/monthly",
-			"style": {
-				"navigationBarTitleText": "我的包月",
-				"navigationBarBackgroundColor": "#008CFF",
-				"navigationBarTextStyle": "white",
-				"enablePullDownRefresh": false
-			}
-		},
-		{
-			"path": "pages/payLists/pay",
-			"style": {
-				"navigationStyle": "custom",
-				"navigationBarTitleText": "支付"
-			}
-		},
-		{
-			"path": "pages/paymentMethod/jumpMiddle",
-			"style": {
-				"navigationStyle": "custom",
-				"navigationBarTitleText": "跳转"
-			}
-		},
-		{
-			"path": "pages/handleMonthly/monthPay",
-			"style": {
-				"navigationStyle": "custom",
-				"navigationBarTitleText": "包月支付"
-			}
-		},
-		{
-			"path": "pages/searchparking/searchparking",
-			"style": {
-				"navigationStyle": "custom",
-				"navigationBarTitleText": "停车查询"
-			}
-		},
-		{
-			"path": "pages/favourableActivity/favourableActivity",
-			"style": {
-				"navigationBarTitleText": "一分钱停车",
-				"enablePullDownRefresh": false,
-				"navigationBarBackgroundColor": "#008CFF",
-				"navigationBarTextStyle": "white"
-			}
-		},
-		{
-			"path": "pages/parkingLock/parkingLock",
-			"style": {
-				"navigationBarTitleText": "车位锁",
-				"enablePullDownRefresh": false,
-				"navigationBarBackgroundColor": "#008CFF",
-				"navigationBarTextStyle": "white"
-			}
-		},
-		{
-			"path": "pages/parkingLists/map_web_view/map_web_view",
-			"style": {
-				"navigationStyle": "custom",
-				"navigationBarTitleText": "导航",
-				"enablePullDownRefresh": false
-			}
-		},
-		{
-			"path": "pages/bannerDetails/bannerDetails",
-			"style": {
-				"navigationBarTitleText": "详情页",
-				"enablePullDownRefresh": false,
-				"navigationBarBackgroundColor": "#008CFF",
-				"navigationBarTextStyle": "white"
-			}
-		},
-		{
-			"path": "pages/applyRefund/applyRefund",
-			"style": {
-				"navigationBarTitleText": "申请退款",
-				"enablePullDownRefresh": false,
-				"navigationBarBackgroundColor": "#008CFF",
-				"navigationBarTextStyle": "white"
-			}
-		},
-		{
-			"path": "pages/applyRefundDetails/applyRefundDetails",
-			"style": {
-				"navigationBarTitleText": "申请退款",
-				"navigationStyle": "custom",
-				"enablePullDownRefresh": false
-			}
-		},
-		{
-			"path": "pages/applyRefundDetails/applyRefundAchieveDetails",
-			"style": {
-				"navigationBarTitleText": "订单详情"
-			}
-		},
-		{
-			"path": "pages/privacyPolicy/privacyPolicy",
-			"style": {
-				"navigationBarTitleText": "隐私政策",
-				"enablePullDownRefresh": false
-			}
-		},
-		{
-			"path": "pages/wechatLogin/wechatLogin",
-			"style": {
-				"navigationBarTitleText": "微信登录",
-				"enablePullDownRefresh": false
-			}
-		},
-		{
-			"path": "pages/geomagnetismLock/geomagnetismLock",
-			"style": {
-				"navigationBarTitleText": "地磁",
-				"enablePullDownRefresh": false,
-				"navigationBarBackgroundColor": "#008CFF",
-				"navigationBarTextStyle": "white"
-			}
-		},
-		{
-			"path": "pages/parkentrace/parkentrace",
-			"style": {
-				"navigationBarTitleText": "入口扫码",
-				"enablePullDownRefresh": false,
-				"navigationBarBackgroundColor": "#008CFF",
-				"navigationBarTextStyle": "white"
-			}
-		},
-		{
-			"path": "pages/parkadvance/parkadvance",
-			"style": {
-				"navigationBarTitleText": "场内扫码",
-				"enablePullDownRefresh": false,
-				"navigationBarBackgroundColor": "#008CFF",
-				"navigationBarTextStyle": "white"
-			}
-		},
-		{
-			"path": "pages/parkexport/parkexport",
-			"style": {
-				"navigationBarTitleText": "出口扫码",
-				"enablePullDownRefresh": false,
-				"navigationBarBackgroundColor": "#008CFF",
-				"navigationBarTextStyle": "white"
-			}
-		},
-		{
-			"path": "pages/parkroadgate/parkroadgate",
-			"style": {
-				"navigationBarTitleText": "道闸",
-				"enablePullDownRefresh": false,
-				"navigationBarBackgroundColor": "#008CFF",
-				"navigationBarTextStyle": "white"
-			}
-		},
-		{
-			"path": "pages/roadGateSystem/roadGateSystem",
-			"style": {
-				"navigationBarTitleText": "道闸系统",
-				"enablePullDownRefresh": false,
-				"navigationBarBackgroundColor": "#008CFF",
-				"navigationBarTextStyle": "white"
-			}
-		}, {
-			"path": "pages/center/coupon/myCoupon/myCoupon",
-			"style": {
-				"navigationBarTitleText": "我的优惠券",
-				"enablePullDownRefresh": false,
-				"navigationStyle": "custom"
-			}
-		}, {
-			"path": "pages/center/coupon/couponRules/couponRules",
-			"style": {
-				"navigationBarTitleText": "优惠券说明",
-				"enablePullDownRefresh": false,
-				"navigationBarBackgroundColor": "#008CFF",
-				"navigationBarTextStyle": "white"
-			}
-
-		}
-	],
-	"globalStyle": {
-		"navigationBarTextStyle": "black",
-		"navigationBarTitleText": "普定智慧停车",
-		"navigationBarBackgroundColor": "#F8F8F8",
-		"backgroundColor": "#F8F8F8",
-		"backgroundColorTop": "#FFFFFF"
-	},
-	"tabBar": {
-		"color": "#909399",
-		"selectedColor": "#303133",
-		"borderStyle": "black",
-		"backgroundColor": "#ffffff",
-		"list": [{
-				"pagePath": "pages/index/index",
-				"iconPath": "static/index.png",
-				"selectedIconPath": "static/index-selected.png",
-				"text": "首页"
-			},
-			{
-				"pagePath": "pages/parkingLists/parkingLists",
-				"iconPath": "static/car_h.png",
-				"selectedIconPath": "static/car.png",
-				"text": "找车位"
-			},
-			{
-				"pagePath": "pages/center/index",
-				"iconPath": "static/center.png",
-				"selectedIconPath": "static/center-selected.png",
-				"text": "我"
-			}
-		]
-	}
+  "easycom": {
+    "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
+  },
+  "pages": [
+    {
+      "path": "pages/index/index",
+      "style": {
+        "navigationStyle": "custom",
+        "navigationBarTitleText": "城市智慧停车"
+      }
+    },
+    {
+      "path": "pages/center/index",
+      "style": {
+        "navigationStyle": "custom",
+        "navigationBarTextStyle": "white",
+        "navigationBarTitleText": "城市智慧停车"
+      }
+    },
+    {
+      "path": "pages/center/phoneLogin/phoneLogin",
+      "style": {
+        "navigationBarTitleText": "手机号登录",
+        "navigationStyle": "custom"
+      }
+    },
+    {
+      "path": "pages/center/order/order",
+      "style": {
+        "navigationBarTitleText": "停车记录",
+        "navigationBarBackgroundColor": "#008CFF",
+        "navigationBarTextStyle": "white"
+      }
+    },
+    {
+      "path": "pages/center/order/orderDetails/orderDetails",
+      "style": {
+        "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": {
+        "navigationStyle": "custom",
+        "navigationBarTitleText": "停车点"
+      }
+    },
+    {
+      "path": "pages/myCars/myCars",
+      "style": {
+        "navigationStyle": "custom",
+        "navigationBarTitleText": "我的车辆"
+      }
+    },
+    {
+      "path": "pages/message/message",
+      "style": {
+        "navigationStyle": "custom",
+        "navigationBarTitleText": "消息中心"
+      }
+    },
+    {
+      "path": "pages/message/messageInfo",
+      "style": {
+        "navigationStyle": "custom",
+        "navigationBarTitleText": "消息中心"
+      }
+    },
+    {
+      "path": "pages/payLists/payLists",
+      "style": {
+        "navigationBarTitleText": "停车缴费",
+        "enablePullDownRefresh": false,
+        "navigationBarBackgroundColor": "#008CFF",
+        "navigationBarTextStyle": "white"
+      }
+    },
+    {
+      "path": "pages/parkingInformation/parkingInformation",
+      "style": {
+        "navigationBarTitleText": "停车场信息",
+        "enablePullDownRefresh": false,
+        "navigationBarBackgroundColor": "#ffffff",
+        "navigationBarTextStyle": "black"
+      }
+    },
+    {
+      "path": "pages/chargeStandard/chargeStandard",
+      "style": {
+        "navigationBarTitleText": "收费标准",
+        "enablePullDownRefresh": false,
+        "navigationBarBackgroundColor": "#008CFF",
+        "navigationBarTextStyle": "white"
+      }
+    },
+    {
+      "path": "pages/handleMonthly/handleMonthly",
+      "style": {
+        "navigationBarTitleText": "办理包月",
+        "enablePullDownRefresh": false,
+        "navigationBarBackgroundColor": "#008CFF",
+        "navigationBarTextStyle": "white"
+      }
+    },
+    {
+      "path": "pages/center/monthly/monthly1",
+      "style": {
+        "navigationBarTitleText": "我的包月",
+        "navigationBarBackgroundColor": "#008CFF",
+        "navigationBarTextStyle": "white",
+        "enablePullDownRefresh": false
+      }
+    },
+    {
+      "path": "pages/center/monthly/monthly",
+      "style": {
+        "navigationBarTitleText": "我的包月",
+        "navigationBarBackgroundColor": "#008CFF",
+        "navigationBarTextStyle": "white",
+        "enablePullDownRefresh": false
+      }
+    },
+    {
+      "path": "pages/payLists/pay",
+      "style": {
+        "navigationStyle": "custom",
+        "navigationBarTitleText": "支付"
+      }
+    },
+    {
+      "path": "pages/paymentMethod/jumpMiddle",
+      "style": {
+        "navigationStyle": "custom",
+        "navigationBarTitleText": "跳转"
+      }
+    },
+    {
+      "path": "pages/handleMonthly/monthPay",
+      "style": {
+        "navigationStyle": "custom",
+        "navigationBarTitleText": "包月支付"
+      }
+    },
+    {
+      "path": "pages/searchparking/searchparking",
+      "style": {
+        "navigationStyle": "custom",
+        "navigationBarTitleText": "停车查询"
+      }
+    },
+    {
+      "path": "pages/favourableActivity/favourableActivity",
+      "style": {
+        "navigationBarTitleText": "一分钱停车",
+        "enablePullDownRefresh": false,
+        "navigationBarBackgroundColor": "#008CFF",
+        "navigationBarTextStyle": "white"
+      }
+    },
+    {
+      "path": "pages/parkingLock/parkingLock",
+      "style": {
+        "navigationBarTitleText": "车位锁",
+        "enablePullDownRefresh": false,
+        "navigationBarBackgroundColor": "#008CFF",
+        "navigationBarTextStyle": "white"
+      }
+    },
+    {
+      "path": "pages/parkingLists/map_web_view/map_web_view",
+      "style": {
+        "navigationStyle": "custom",
+        "navigationBarTitleText": "导航",
+        "enablePullDownRefresh": false
+      }
+    },
+    {
+      "path": "pages/bannerDetails/bannerDetails",
+      "style": {
+        "navigationBarTitleText": "详情页",
+        "enablePullDownRefresh": false,
+        "navigationBarBackgroundColor": "#008CFF",
+        "navigationBarTextStyle": "white"
+      }
+    },
+    {
+      "path": "pages/applyRefund/applyRefund",
+      "style": {
+        "navigationBarTitleText": "申请退款",
+        "enablePullDownRefresh": false,
+        "navigationBarBackgroundColor": "#008CFF",
+        "navigationBarTextStyle": "white"
+      }
+    },
+    {
+      "path": "pages/applyRefundDetails/applyRefundDetails",
+      "style": {
+        "navigationBarTitleText": "申请退款",
+        "navigationStyle": "custom",
+        "enablePullDownRefresh": false
+      }
+    },
+    {
+      "path": "pages/applyRefundDetails/applyRefundAchieveDetails",
+      "style": {
+        "navigationBarTitleText": "订单详情"
+      }
+    },
+    {
+      "path": "pages/privacyPolicy/privacyPolicy",
+      "style": {
+        "navigationBarTitleText": "隐私政策",
+        "enablePullDownRefresh": false
+      }
+    },
+    {
+      "path": "pages/wechatLogin/wechatLogin",
+      "style": {
+        "navigationBarTitleText": "微信登录",
+        "enablePullDownRefresh": false
+      }
+    },
+    {
+      "path": "pages/geomagnetismLock/geomagnetismLock",
+      "style": {
+        "navigationBarTitleText": "地磁",
+        "enablePullDownRefresh": false,
+        "navigationBarBackgroundColor": "#008CFF",
+        "navigationBarTextStyle": "white"
+      }
+    },
+    {
+      "path": "pages/parkentrace/parkentrace",
+      "style": {
+        "navigationBarTitleText": "入口扫码",
+        "enablePullDownRefresh": false,
+        "navigationBarBackgroundColor": "#008CFF",
+        "navigationBarTextStyle": "white"
+      }
+    },
+    {
+      "path": "pages/parkadvance/parkadvance",
+      "style": {
+        "navigationBarTitleText": "场内扫码",
+        "enablePullDownRefresh": false,
+        "navigationBarBackgroundColor": "#008CFF",
+        "navigationBarTextStyle": "white"
+      }
+    },
+    {
+      "path": "pages/parkexport/parkexport",
+      "style": {
+        "navigationBarTitleText": "出口扫码",
+        "enablePullDownRefresh": false,
+        "navigationBarBackgroundColor": "#008CFF",
+        "navigationBarTextStyle": "white"
+      }
+    },
+    {
+      "path": "pages/parkroadgate/parkroadgate",
+      "style": {
+        "navigationBarTitleText": "道闸",
+        "enablePullDownRefresh": false,
+        "navigationBarBackgroundColor": "#008CFF",
+        "navigationBarTextStyle": "white"
+      }
+    },
+    {
+      "path": "pages/roadGateSystem/roadGateSystem",
+      "style": {
+        "navigationBarTitleText": "道闸系统",
+        "enablePullDownRefresh": false,
+        "navigationBarBackgroundColor": "#008CFF",
+        "navigationBarTextStyle": "white"
+      }
+    },
+    {
+      "path": "pages/center/coupon/myCoupon/myCoupon",
+      "style": {
+        "navigationBarTitleText": "我的优惠券",
+        "enablePullDownRefresh": false,
+        "navigationStyle": "custom"
+      }
+    },
+    {
+      "path": "pages/center/coupon/couponRules/couponRules",
+      "style": {
+        "navigationBarTitleText": "优惠券说明",
+        "enablePullDownRefresh": false,
+        "navigationBarBackgroundColor": "#008CFF",
+        "navigationBarTextStyle": "white"
+      }
+    }
+  ],
+  "globalStyle": {
+    "navigationBarTextStyle": "black",
+    "navigationBarTitleText": "普定智慧停车",
+    "navigationBarBackgroundColor": "#F8F8F8",
+    "backgroundColor": "#F8F8F8",
+    "backgroundColorTop": "#FFFFFF"
+  },
+  "tabBar": {
+    "color": "#909399",
+    "selectedColor": "#303133",
+    "borderStyle": "black",
+    "backgroundColor": "#ffffff",
+    "list": [
+      {
+        "pagePath": "pages/index/index",
+        "iconPath": "static/index.png",
+        "selectedIconPath": "static/index-selected.png",
+        "text": "首页"
+      },
+      {
+        "pagePath": "pages/parkingLists/parkingLists",
+        "iconPath": "static/car_h.png",
+        "selectedIconPath": "static/car.png",
+        "text": "找车位"
+      },
+      {
+        "pagePath": "pages/center/index",
+        "iconPath": "static/center.png",
+        "selectedIconPath": "static/center-selected.png",
+        "text": "我"
+      }
+    ]
+  }
 }

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

@@ -129,7 +129,7 @@
     </view>
 
     <!-- 停车场和路段切换 -->
-    <!-- <view class="type-list">
+    <view class="type-list">
       <view
         class="type-list-item"
         v-for="(item, index) in typeList"
@@ -139,7 +139,7 @@
       >
         {{ item.label }}
       </view>
-    </view> -->
+    </view>
 
     <u-toast ref="uToast" />
   </view>

+ 25 - 0
pages/choosePayment/choosePayment.scss

@@ -0,0 +1,25 @@
+.pay-content {
+  padding: 40rpx;
+  .pay-list {
+    &-item {
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      height: 104rpx;
+      border-top: solid 1px #eeeeee;
+      &-image {
+        display: flex;
+        font-size: 30rpx;
+        color: #1E1E1E;
+        .image {
+          width: 54rpx;
+          height: 45rpx;
+          margin-right: 20rpx;
+        }
+      }
+      &:last-child {
+        border-bottom: solid 1px #eeeeee;
+      }
+    }
+  }
+}

+ 365 - 0
pages/choosePayment/choosePayment.vue

@@ -0,0 +1,365 @@
+<template>
+  <view>
+    <u-modal
+      v-model="payWayPop"
+      :title-style="{ color: '#404040' }"
+      title="选择支付方式"
+      width="660rpx"
+      :show-confirm-button="false"
+      :show-cancel-button="false"
+    >
+      <view class="pay-content">
+        <view class="pay-list">
+          <radio-group>
+            <view class="pay-list-item">
+              <view class="pay-list-item-image">
+                <image class="image" src="/static/img/wechat-icon-new.png" mode="aspectFit" />
+                <view>微信支付</view>
+              </view>
+              <view class="radioBox">
+                <radio color="#2DCF8C" value="1" :checked="1 === radioCurrent" />
+              </view>
+            </view>
+            <view class="pay-list-item">
+              <view class="pay-list-item-image">
+                <image class="image" src="/static/img/gy-icon-new.png" mode="aspectFit" />
+                <view>贵州银行</view>
+              </view>
+              <view class="radioBox">
+                <radio color="#2DCF8C" value="2" :checked="2 === radioCurrent" />
+              </view>
+            </view>
+            <view class="pay-list-item">
+              <view class="pay-list-item-image">
+                <image class="image" src="/static/img/juhe-icon-new.png" mode="aspectFit" />
+                <view>聚合支付</view>
+              </view>
+              <view class="radioBox">
+                <radio color="#2DCF8C" value="3" :checked="3 === radioCurrent" />
+              </view>
+            </view>
+          </radio-group>
+        </view>
+      </view>
+    </u-modal>
+    <u-toast ref="uToast" />
+  </view>
+</template>
+
+<script>
+import { getEnvIsWx } from '@/utils/judgEnvironment.js';
+import $wxPay from '@/utils/wxPay.js';
+export default {
+  props: {
+    // 弹框显示
+    payWayPop: {
+      type: Boolean,
+      default: false
+    },
+    // 订单数组
+    curOrderList: {
+      type: Array,
+      default: null
+    },
+    // 设备编号
+    deviceNo: {
+      type: String,
+      default: null
+    },
+    // 地磁支付需要字段
+    payeeId: {
+      type: String,
+      default: undefined
+    },
+    // 地磁支付需要字段
+    payeeName: {
+      type: String,
+      default: undefined
+    },
+    // 扫码支付需要字段
+    sanPay: {
+      type: Boolean,
+      default: false
+    },
+    // 追缴类型
+    pursueType: {
+      type: String,
+      default: undefined
+    },
+    // 车牌号
+    vehicleNo: {
+      type: String,
+      default: undefined
+    },
+    // 跳转页面
+    jumpUrl: {
+      type: String,
+      default: null
+    },
+    // 出口扫码   接口不一样
+    exportFlag: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data() {
+    return {
+      wxEnv: true,
+      radioCurrent: 1
+    };
+  },
+  created() {
+    this.wxEnv = getEnvIsWx();
+  },
+  methods: {
+    /**
+     * 贵阳银行支付
+     * @param {Array} orderList 需要支付的订单号组成的数组
+     * @param {String} deviceNo 设备编号(只有车位锁部分有)
+     * */
+    gyBankPay() {
+      const params = {
+        orderList: this.curOrderList,
+        deviceNo: this.deviceNo,
+        jumpUrl: this.jumpUrl,
+        payeeId: this.payeeId,
+        payeeName: this.payeeName,
+        pursueType: this.pursueType,
+        vehicleNo: this.vehicleNo,
+        sanPay: this.sanPay
+      };
+      if (this.exportFlag == true) {
+        this.$u.api
+          .quickPayExportApi(params)
+          .then((res) => {
+            if (res.data.needPay) {
+              let payUrl = res.data.url;
+              location.href = payUrl;
+            } else {
+              this.$refs.uToast.show({
+                title: '无需支付',
+                type: 'info'
+              });
+              setTimeout(() => {
+                uni.hideLoading();
+                location.reload();
+              }, 1000);
+            }
+          })
+          .catch((err) => {
+            this.$refs.uToast.show({
+              title: err.msg,
+              type: 'error'
+            });
+          });
+      } else {
+        this.$u.api
+          .payGzbank(params)
+          .then((res) => {
+            if (res.data.needPay) {
+              let payUrl = res.data.url;
+              location.href = payUrl;
+            } else {
+              this.$refs.uToast.show({
+                title: '无需支付',
+                type: 'info'
+              });
+              setTimeout(() => {
+                uni.hideLoading();
+                location.reload();
+              }, 1000);
+            }
+          })
+          .catch((err) => {
+            this.$refs.uToast.show({
+              title: err.msg,
+              type: 'error'
+            });
+          });
+      }
+    },
+    /**
+     * 聚合支付
+     * */
+    juhePay() {
+      this.getWXPayByJava(this.curOrderList, this.deviceNo);
+    },
+    /**
+     * 微信支付
+     */
+    wechatPay() {
+      const params = {
+        orderList: this.curOrderList,
+        openid: this.vuex_wxinfo.openId,
+        deviceNo: this.deviceNo || undefined,
+        payeeId: this.payeeId || undefined,
+        payeeName: this.payeeName || undefined,
+        vehicleNo: this.vehicleNo,
+        sanPay: this.sanPay
+      };
+      if (this.exportFlag) {
+        this.$u.api.parkingWechatPayApi(params).then((res) => {
+          if (res.code === 200) {
+            if (res.data.needPay) {
+              $wxPay.wexinPay(res.data.wx).then((r) => {
+                switch (Number(r.code)) {
+                  case 0: // 成功
+                    //#ifdef H5
+                    window.location.reload();
+                    //#endif
+                    break;
+                  case 1: // 取消
+                    this.$refs.uToast.show({
+                      title: '已取消支付',
+                      type: 'info'
+                    });
+                    window.location.reload();
+                    break;
+                  case 2: // 支付失败
+                    this.$refs.uToast.show({
+                      title: '支付失败,请检查!',
+                      type: 'error'
+                    });
+                    break;
+                }
+              });
+            } else {
+              this.$refs.uToast.show({
+                title: '无需支付',
+                type: 'info'
+              });
+              setTimeout(() => {
+                uni.hideLoading();
+                location.reload();
+              }, 1000);
+            }
+          }
+        });
+      } else {
+        this.$u.api.wechatPayApi(params).then((res) => {
+          if (res.code === 200) {
+            if (res.data.needPay) {
+              $wxPay.wexinPay(res.data.wx).then((r) => {
+                switch (Number(r.code)) {
+                  case 0: // 成功
+                    //#ifdef H5
+                    window.location.reload();
+                    //#endif
+                    break;
+                  case 1: // 取消
+                    this.$refs.uToast.show({
+                      title: '已取消支付',
+                      type: 'info'
+                    });
+                    window.location.reload();
+                    break;
+                  case 2: // 支付失败
+                    this.$refs.uToast.show({
+                      title: '支付失败,请检查!',
+                      type: 'error'
+                    });
+                    break;
+                }
+              });
+            } else {
+              this.$refs.uToast.show({
+                title: '无需支付',
+                type: 'info'
+              });
+              setTimeout(() => {
+                uni.hideLoading();
+                location.reload();
+              }, 1000);
+            }
+          }
+        });
+      }
+    },
+    /**
+     * 直接通过后台获取贵阳银行微信支付地址
+     * @param {Array} list 需要支付的订单组合数组
+     * @param {Number} deviceNo 设备编号(在停车锁部分需要)
+     * */
+    getWXPayByJava(orderList, deviceNo) {
+      let params = {
+        orderList: orderList,
+        openid: this.vuex_wxinfo.openId,
+        jumpUrl: this.jumpUrl,
+        deviceNo: deviceNo ? deviceNo : null,
+        payeeId: this.payeeId,
+        payeeName: this.payeeName,
+        pursueType: this.pursueType,
+        vehicleNo: this.vehicleNo,
+        sanPay: this.sanPay
+      };
+      if (this.exportFlag) {
+        this.$u.api
+          .polyPayExportApi(params)
+          .then((res) => {
+            if (res.code === 200) {
+              if (res.data.needPay) {
+                localStorage.setItem('jumpUrl', this.jumpUrl);
+                location.href = res.data.qrCodeUrl;
+              } else {
+                this.$refs.uToast.show({
+                  title: '无需支付',
+                  type: 'info'
+                });
+                setTimeout(() => {
+                  uni.hideLoading();
+                  location.href = this.jumpUrl;
+                }, 1000);
+              }
+            } else {
+              uni.hideLoading();
+            }
+          })
+          .catch((err) => {
+            this.$refs.uToast.show({
+              title: '无法调起微信支付!',
+              type: 'error'
+            });
+          });
+      } else {
+        this.$u.api
+          .ordinaryWxPay(params)
+          .then((res) => {
+            if (res.code === 200) {
+              if (res.data.needPay) {
+                localStorage.setItem('jumpUrl', this.jumpUrl);
+                location.href = res.data.qrCodeUrl;
+              } else {
+                this.$refs.uToast.show({
+                  title: '无需支付',
+                  type: 'info'
+                });
+                setTimeout(() => {
+                  uni.hideLoading();
+                  location.href = this.jumpUrl;
+                }, 1000);
+              }
+            } else {
+              uni.hideLoading();
+            }
+          })
+          .catch((err) => {
+            this.$refs.uToast.show({
+              title: '无法调起微信支付!',
+              type: 'error'
+            });
+          });
+      }
+    },
+    /**
+     * 关闭弹框
+     * */
+    closePaymentMethod() {
+      this.$emit('closePaymentMethod');
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+@import './choosePayment.scss';
+</style>

+ 2 - 2
pages/paymentMethod/paymentMethod.vue

@@ -3,8 +3,8 @@
  * @Author: 空白格
  * @Date: 2022-08-01 11:45:20
  * @LastEditors: 空白格
- * @LastEditTime: 2022-10-14 14:31:31
- * @FilePath: \parking_h5\pages\paymentMethod\paymentMethod.vue
+ * @LastEditTime: 2023-01-03 10:21:16
+ * @FilePath: \parking_h5\pages\choosePayment\choosePayment.vue
  * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved. 
 -->
 

BIN
static/img/gy-icon-new.png


BIN
static/img/juhe-icon-new.png


BIN
static/img/wechat-icon-new.png