Browse Source

室内扫码支付

zaijin 2 years ago
parent
commit
7135b6b306

+ 1 - 1
App.vue

@@ -33,7 +33,7 @@ export default {
       this.getUserInfo(openId);
     }
     // 获取参数
-    const paramsPage = ['pages/goldPlan/goldPlan', 'pages/wechatLogin/wechatLogin'],
+    const paramsPage = ['pages/goldPlan/goldPlan', 'pages/wechatLogin/wechatLogin', 'pages/VehicleInquiry/VehicleInquiry'],
       paramsValidPage = paramsPage.filter((item) => backUrl.indexOf(item) > -1);
     if (paramsValidPage.length === 0) {
       this.getFreeTime();

+ 6 - 2
common/apiurl.js

@@ -145,6 +145,10 @@ export const apiurl = {
   updateCouponStatusUrl: '/client/couponInfo/backCoupon',
   // 根据订单id获取符合要求的优惠券
   getCouponByOrderIdUrl: '/client/couponInfo/memberCoupon',
-  // 根据车牌查询车辆欠费(针对场内支付)
-  getVehicleInquiryListUrl: ''
+  // 根据室内停车场二维码查询车辆列表信息
+  getVehicleInquiryListUrl: '/client/parking-orderinfo/detail/advance',
+  // 根据停车场编号和车牌查询订单
+  getOrderInfoByParknoUrl: '/client/parking-orderinfo/advance/getOrderInfo',
+  // 停车场支付
+  indoorPaymentUrl: '/client/payment/parking/gotoPay'
 };

+ 8 - 6
common/config.js

@@ -5,13 +5,15 @@
  */
 const node_dev = process.env.H_NODE_ENV;
 let baseUrl = 'https://wx.hw.hongweisoft.com/parking',
-  wxAppid = 'wx6e9cdf7a0ee8a51b';
+	wxAppid = 'wx6e9cdf7a0ee8a51b';
 console.log(process.env.H_BASE_URL);
 if (node_dev) {
-  (baseUrl = process.env.H_BASE_URL), (wxAppid = process.env.H_WXAPPID);
+	(baseUrl = process.env.H_BASE_URL), (wxAppid = process.env.H_WXAPPID);
 }
 export const config = {
-  wxAppid,
-  baseUrl,
-  onlyWxLogin: ['pages/parkingLock/parkingLock', 'pages/wechatLogin/wechatLogin'] // 只需要微信登录的页面路径
-};
+	wxAppid,
+	baseUrl,
+	onlyWxLogin: ['pages/parkingLock/parkingLock', 'pages/wechatLogin/wechatLogin',
+		'pages/VehicleInquiry/VehicleInquiry'
+	] // 只需要微信登录的页面路径
+};

+ 6 - 2
common/http.api.js

@@ -125,7 +125,9 @@ const install = (Vue, vm) => {
   let exchangeCouponApi = (params = {}) => vm.$u.put(apiurl.exchangeCouponUrl, params);
   let updateCouponStatusApi = (params = {}) => vm.$u.post(apiurl.updateCouponStatusUrl, params);
   let getCouponByOrderIdApi = (params = {}) => vm.$u.get(apiurl.getCouponByOrderIdUrl, params);
-  let getVehicleInquiryListApi = (params = {}) => vm.$u.get(apiurl.getVehicleInquiryListUrl, params);
+  let getVehicleInquiryListApi = (params = {}) => vm.$u.post(apiurl.getVehicleInquiryListUrl, params);
+  let getOrderInfoByParknoApi = (params = {}) => vm.$u.post(apiurl.getOrderInfoByParknoUrl, params);
+  let indoorPaymentApi = (params = {}) => vm.$u.post(apiurl.indoorPaymentUrl, params);
   // 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
   vm.$u.api = {
     feedbackAdd,
@@ -193,7 +195,9 @@ const install = (Vue, vm) => {
     exchangeCouponApi,
     updateCouponStatusApi,
     getCouponByOrderIdApi,
-    getVehicleInquiryListApi
+    getVehicleInquiryListApi,
+    getOrderInfoByParknoApi,
+    indoorPaymentApi
   };
 };
 

+ 1 - 1
common/http.interceptor.js

@@ -35,13 +35,13 @@ const install = (Vue, vm) => {
         if (backUrl.indexOf('backUrl') === -1) {
           localStorage.setItem('backUrl', encodeURIComponent(backUrl));
         }
-        localStorage.removeItem('lifeData');
         uni.showModal({
           title: '提示',
           content: '未查询到登录信息或信息已失效, 请重新登录',
           showCancel: false,
           success: function (res) {
             if (res.confirm) {
+              localStorage.removeItem('lifeData');
               uni.redirectTo({
                 url: '/pages/center/phoneLogin/phoneLogin'
               });

+ 9 - 0
pages.json

@@ -328,6 +328,15 @@
         "navigationBarBackgroundColor": "#008CFF",
         "navigationBarTextStyle": "white"
       }
+    },
+    {
+      "path": "pages/common/paymentSuccess/paymentSuccess",
+      "style": {
+        "navigationBarTitleText": "支付成功",
+        "enablePullDownRefresh": false,
+				"navigationBarBackgroundColor": "#008CFF",
+        "navigationBarTextStyle": "white"
+      }
     }
   ],
   "globalStyle": {

+ 68 - 0
pages/OnsitePayment/OnsitePayment.scss

@@ -0,0 +1,68 @@
+.parking-lock {
+  min-height: calc(100vh - 88rpx);
+  background-color: #f6f6ff;
+  &-box {
+    padding: 40rpx 0 0;
+  }
+  &-title {
+    font-size: 46rpx;
+    color: #292929;
+    text-align: center;
+    padding-top: 31rpx;
+    line-height: 65rpx;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+  }
+  &-tips {
+    width: calc(100% - 72rpx);
+    font-size: 30rpx;
+    color: #777777;
+    text-align: center;
+    margin: 10rpx auto;
+    line-height: 47rpx;
+  }
+  &-info {
+    width: calc(100% - 72rpx);
+    margin: 31rpx auto 54rpx;
+    background-color: #fff;
+    border-radius: 15rpx;
+    padding: 39rpx 41rpx;
+    &-item {
+      display: flex;
+      margin-bottom: 16rpx;
+      view {
+        font-size: 28rpx;
+        &:first-child {
+          width: 30%;
+          color: #2a2a2a;
+        }
+        &:last-child {
+          color: #6e6e6e;
+        }
+      }
+      .really-money {
+        color: #fa7319 !important;
+      }
+    }
+  }
+  &-pay-btn {
+    width: calc(100% - 72rpx);
+    margin: 0 auto;
+    button {
+      width: 100%;
+      height: 100rpx;
+      line-height: 100rpx;
+      background-color: #008cff;
+      border: none;
+      color: #fff;
+      box-shadow: 0px 7px 13px 0px rgba(16, 153, 250, 0.31);
+      font-size: 28rpx;
+      font-weight: 500;
+    }
+  }
+  &-pay-attention {
+    width: calc(100% - 100rpx);
+    margin: 50rpx auto;
+    color: #777777;
+  }
+}

+ 164 - 16
pages/OnsitePayment/OnsitePayment.vue

@@ -1,23 +1,171 @@
-<!-- 场内支付 -->
+<!-- 场内支付---停车场 -->
 <template>
-	<view>
-		
-	</view>
+  <view class="parking-lock">
+    <view class="parking-lock-box">
+      <view class="parking-lock-pay">
+        <view class="parking-lock-title">支付停车费</view>
+        <view class="parking-lock-tips">请您确认停车费用,确认后请支付费用,结束停车。谢谢您的使用!</view>
+        <view class="parking-lock-info">
+          <view class="parking-lock-info-item" v-for="(item, index) in fieldList" :key="index">
+            <view>{{ item.label }}</view>
+            <view :class="item.money ? 'really-money' : ''">{{ orderInfo[item.key] }}</view>
+          </view>
+        </view>
+        <view class="parking-lock-pay-btn">
+          <button type="default" @click="payMoney">立即支付</button>
+        </view>
+        <view class="parking-lock-pay-attention">
+          <text>温馨提示:支付完成请尽快离场,超过免费时长将会重新计费</text>
+        </view>
+      </view>
+      <!-- 支付方式 -->
+      <ChoosePayment ref="choosePayment" :curOrderList="orderList" :jumpUrl="jumpUrl" :isIndoor="true" />
+    </view>
+    <u-toast ref="uToast" />
+  </view>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				
-			}
-		},
-		methods: {
-			
-		}
-	}
+import ChoosePayment from '@/pages/choosePayment/choosePayment.vue';
+export default {
+  components: {
+    ChoosePayment
+  },
+  data() {
+    return {
+      // 支付订单编号
+      orderList: [],
+      // 订单信息
+      orderInfo: {},
+      // 回调地址
+      jumpUrl: location.href + '&isBack=1',
+      // 显示的字段集合
+      fieldList: [
+        { key: 'vehicleNo', label: '车牌号' },
+        { key: 'parkingName', label: '停车场名称' },
+        { key: 'entranceName', label: '入场车道' },
+        { key: 'inTime', label: '入场时间' },
+        { key: 'freeDuration', label: '免费时长' },
+        { key: 'calcDuration', label: '计费时长' },
+        { key: 'duration', label: '累计停车时长' },
+        { key: 'payAmount', label: '应缴金额', money: true },
+        { key: 'id', label: '订单编号' }
+      ],
+      paramsObj: {
+        vehicleNo: '',
+        parkNo: ''
+      },
+      timer: null,
+      polyOrderId: undefined, // 预支付订单id
+      isBack: 0
+    };
+  },
+  onLoad(page) {
+    const { vehicleNo, parkNo, isBack, polyOrderId } = page;
+    if (vehicleNo && parkNo) {
+      this.paramsObj.vehicleNo = vehicleNo;
+      this.paramsObj.parkNo = parkNo;
+      this.isBack = isBack ?? 0;
+      this.polyOrderId = polyOrderId;
+      this.getOrderDetails(vehicleNo, parkNo);
+    } else {
+      this.$nextTick(() => {
+        this.showToast('参数丢失!', 'error');
+      });
+    }
+  },
+  onShow() {
+    const { isBack } = this;
+    if (Number(isBack) === 1 && this.polyOrderId) {
+      uni.showLoading({
+        title: '支付查询中...',
+        mask: true
+      });
+      this.timer = setInterval(() => {
+        this.handlePayStatus(this.polyOrderId);
+      }, 2000);
+    }
+  },
+  methods: {
+    /**
+     * 立即支付
+     * @date 2023-02-22
+     * @returns {any}
+     */
+    payMoney() {
+      this.$nextTick(() => {
+        this.$refs['choosePayment'].openPopup({ ...this.orderInfo }, 'single', 'parking');
+      });
+    },
+    /**
+     * 根据订单id查询订单信息
+     * @date 2023-02-22
+     * @param {any} vehicleNo
+     * @param {any} parkNo
+     * @returns {any}
+     */
+    async getOrderDetails(vehicleNo, parkNo) {
+      try {
+        const { code, data } = await this.$u.api.getOrderInfoByParknoApi({ vehicleNo, parkNo });
+        if (code === 200) {
+          const { id } = data;
+          this.orderList = [id];
+          this.orderInfo = data;
+          if (Number(data?.payStatus) === 1) {
+            this.$refs.uToast.show({
+              title: '该订单已支付完成!',
+              type: 'success',
+              url: '/pages/common/paymentSuccess/paymentSuccess',
+              callback: () => {
+                // this.loading = false;
+              }
+            });
+          }
+        }
+      } catch (error) {
+        this.showToast(error?.msg, 'error');
+      }
+    },
+    /**
+     * 反复查询支付状态
+     * @param { String } orderId
+     */
+    async handlePayStatus(orderId) {
+      try {
+        const { code, data } = await this.$u.api.getOrderInfo({ orderId });
+        if (code === 200) {
+          if (data?.payStatus === 1 || data?.payStatus === 3) {
+            clearInterval(this.timer);
+            this.getOrderDetails(this.paramsObj.vehicleNo, this.paramsObj.parkNo);
+            uni.hideLoading();
+          }
+        }
+      } catch (error) {
+        uni.hideLoading();
+      }
+    },
+    // 返回首页
+    cancel() {
+      uni.switchTab({
+        url: '/pages/index/index'
+      });
+    },
+    /**
+     * @description: 显示提示信息
+     * @param {*} title
+     * @param {*} type
+     * @return {*}
+     */
+    showToast(title = '操作失败', type = 'error') {
+      this.$refs.uToast.show({
+        title,
+        type
+      });
+    }
+  }
+};
 </script>
 
-<style>
-
+<style lang="scss" scoped>
+@import './OnsitePayment.scss';
 </style>

+ 59 - 41
pages/VehicleInquiry/VehicleInquiry.vue

@@ -28,7 +28,7 @@
       </u-collapse>
     </view>
     <view class="container-btn">
-      <u-button type="primary" :loading="loading" @click="submitVehicleInquiry">确定</u-button>
+      <u-button type="primary" :loading="loading" :disabled="!form.vehicleNo" @click="submitVehicleInquiry">确定</u-button>
     </view>
     <!-- 选择颜色 -->
     <u-action-sheet :list="bindVehiclePop.colorList" @click="confirmColor" v-model="bindVehiclePop.colorShow" />
@@ -43,7 +43,8 @@ export default {
   data() {
     return {
       form: {
-        vehicleNo: ''
+        vehicleNo: '',
+        parkNo: ''
       },
       vehicleList: [],
       keyboardshow: false,
@@ -77,28 +78,23 @@ export default {
             colorCode: 99
           }
         ]
-      }
+      },
+      parkNo: null,
+      parkInfo: {}
     };
   },
-  onShow() {
-    this.getCarsList();
+  onLoad(options) {
+    const { parkNo } = options;
+    if (parkNo) {
+      this.form.parkNo = parkNo;
+      this.getVehicleInquiryList(parkNo);
+    } else {
+      this.$nextTick(() => {
+        this.showToast('参数丢失!', 'error');
+      });
+    }
   },
   methods: {
-    /**
-     * @description: 获取我的车辆列表
-     * @return {*}
-     */
-    async getCarsList() {
-      const { data } = await this.$u.api.getMycars({ pageNum: 1, pageSize: 100 });
-      const vehicleList = [];
-      data.rows.forEach((item) => {
-        const { vehicleNo } = item;
-        vehicleList.push({ label: vehicleNo, value: vehicleNo });
-      });
-      this.vehicleList = vehicleList;
-      await this.$nextTick();
-      this.$refs.refValue.init();
-    },
     /**
      * @description: 车牌输入框点击
      * @return {*}
@@ -146,18 +142,22 @@ export default {
       // 删除value的最后一个字符
       if (this.form.vehicleNo.length) this.form.vehicleNo = this.form.vehicleNo.substr(0, this.form.vehicleNo.length - 1);
     },
-    /** 
+    /**
      * @description: 获取当前用户车辆
      * @return {*}
      */
-    async getVehicleInquiryList() {
+    async getVehicleInquiryList(parkNo) {
       try {
-        const response = await this.$u.api.getVehicleInquiryListApi();
-        if (response.code === 200) {
-          console.log(response);
+        const { data, code } = await this.$u.api.getVehicleInquiryListApi({ parkNo });
+        if (code === 200) {
+          this.parkInfo = data;
+          this.vehicleList = data.vehicleList.map((item) => {
+            return { label: item, value: item };
+          });
+          await this.$nextTick();
+          this.$refs.refValue.init();
         }
-      } catch (error) {
-      }
+      } catch (error) {}
     },
     /**
      * @description: 确认车费查询
@@ -167,23 +167,41 @@ export default {
       const { vehicleNo } = this.form;
       if (this.$u.test.carNo(vehicleNo)) {
         this.loading = true;
-        this.$refs.uToast.show({
-          title: '查询成功!',
-          type: 'success',
-          url: '/pages/OnsitePayment/OnsitePayment',
-          params: {
-            vehicleNo
-          },
-          callback: () => {
-            this.loading = false;
+        try {
+          const { code } = await this.$u.api.getOrderInfoByParknoApi({ ...this.form });
+          if (code === 200) {
+            this.$refs.uToast.show({
+              title: '查询成功!',
+              type: 'success',
+              url: '/pages/OnsitePayment/OnsitePayment',
+              params: {
+                ...this.form
+              },
+              callback: () => {
+                this.loading = false;
+              }
+            });
           }
-        });
+        } catch (error) {
+          this.loading = false;
+          // this.showToast(error?.msg, 'error');
+        }
       } else {
-        this.$refs.uToast.show({
-          title: '请输入有效的车牌号!',
-          type: 'error'
-        });
+        this.loading = false;
+        this.showToast('请输入有效的车牌号!', 'error');
       }
+    },
+    /**
+     * @description: 提示
+     * @param {*} title
+     * @param {*} type
+     * @return {*}
+     */
+    showToast(title = '操作失败!', type = 'error') {
+      this.$refs.uToast.show({
+        title,
+        type
+      });
     }
   }
 };

+ 223 - 225
pages/choosePayment/choosePayment.vue

@@ -13,8 +13,7 @@
       <view class="pay-content">
         <view class="pay-list">
           <radio-group @change="payRadioChange">
-            <!-- #ifdef H5 || MP-WEIXIN -->
-            <view class="pay-list-item" v-if="wxEnv">
+            <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>
@@ -23,7 +22,6 @@
                 <radio color="#2DCF8C" value="weixin" :checked="'weixin' === radioCurrent" />
               </view>
             </view>
-            <!-- #endif -->
             <template v-if="alipayEnv">
               <view class="pay-list-item">
                 <view class="pay-list-item-image">
@@ -210,6 +208,11 @@ export default {
     monthId: {
       type: String,
       default: null
+    },
+    // 室内扫码
+    isIndoor: {
+      type: Boolean,
+      default: false
     }
   },
   data() {
@@ -299,26 +302,25 @@ export default {
      * @param {String} deviceNo 设备编号(只有车位锁部分有)
      * */
     async gyBankPay() {
+      const { curOrderList, deviceNo, jumpUrl, payeeName, payeeId, pursueType, sanPay } = this;
       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
+        orderList: curOrderList,
+        deviceNo,
+        jumpUrl,
+        payeeId,
+        payeeName,
+        pursueType,
+        vehicleNo,
+        sanPay
       };
       const apiCall = this.exportFlag ? this.$u.api.quickPayExportApi : this.$u.api.payGzbank;
       try {
         const res = await apiCall({ ...params });
         if (res.data.needPay) {
-          let payUrl = res.data.url;
-          location.href = payUrl;
+          location.href = res?.data?.url;
         } else {
           this.showToast('无需支付', 'info');
           setTimeout(() => {
-            uni.hideLoading();
             location.reload();
           }, 1000);
         }
@@ -330,22 +332,19 @@ export default {
      * @description: 贵阳银行包月支付
      * @return {*}
      */
-    gyBankMonthPay() {
-      this.$u.api
-        .monthPay({
+    async gyBankMonthPay() {
+      try {
+        const params = {
           monthId: this.monthId,
           jumpUrl: this.jumpUrl
-        })
-        .then((res) => {
-          if (res.code === 200) {
-            location.href = res?.data?.url;
-          } else {
-            this.showToast(res?.msg, 'error');
-          }
-        })
-        .catch((err) => {
-          this.showToast('无法调起支付', 'error');
-        });
+        };
+        const { code, data } = await this.$u.api.monthPay({ ...params });
+        if (code === 200) {
+          location.href = data?.url;
+        }
+      } catch (error) {
+        this.showToast(error?.msg ?? '无法调起支付', 'error');
+      }
     },
     /**
      * 聚合支付
@@ -357,216 +356,150 @@ export default {
      * @description: 聚合包月支付
      * @return {*}
      */
-    juheMonthPay() {
-      // 支付成功跳转到包月页面
-      let params = {
-        monthId: this.monthId,
-        jumpUrl: this.jumpUrl
-      };
-      this.$u.api
-        .monthlyWxPay(params)
-        .then((res) => {
-          if (res.code === 200) {
-            localStorage.setItem('jumpUrl', this.jumpUrl);
-            location.href = res.data.qrCodeUrl;
-          }
-        })
-        .catch((err) => {
-          this.showToast(`无法调起${this.alipayEnv ? '支付宝' : this.wxEnv ? '微信' : '聚合'}支付!`, 'error');
-        });
+    async juheMonthPay() {
+      try {
+        const { monthId, jumpUrl } = this;
+        const { code, data } = await this.$u.api.monthlyWxPay({ monthId, jumpUrl });
+        if (code === 200) {
+          localStorage.setItem('jumpUrl', this.jumpUrl);
+          location.href = data?.qrCodeUrl;
+        }
+      } catch (error) {
+        this.showToast(error?.msg ?? '拉起支付失败!', 'error');
+      }
     },
     /**
      * 微信支付
      */
-    wechatPay() {
+    async wechatPay() {
+      const { curOrderList, vuex_wxinfo, deviceNo, payeeId, payeeName, vehicleNo, sanPay, couponPopup } = this;
       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
+        orderList: curOrderList,
+        openid: vuex_wxinfo?.openId,
+        deviceNo,
+        payeeId,
+        payeeName,
+        vehicleNo,
+        sanPay,
+        couponMemberId: couponPopup?.radioCurrent
       };
-      if (this.couponPopup.radioCurrent) {
-        params.couponMemberId = this.couponPopup.radioCurrent;
-      }
-      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.$u.api
-                      .updateCouponStatusApi({
-                        orderList: this.curOrderList
-                      })
-                      .then((res) => {
-                        if (res.code === 200) {
-                          this.showToast('已取消支付', 'info');
-                          window.location.reload();
-                        }
-                      });
-                    break;
-                  case 2: // 支付失败
-                    this.showToast('支付失败,请检查!', 'error');
-                    break;
-                }
-              });
-            } else {
-              this.showToast('无需支付', '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.$u.api
-                      .updateCouponStatusApi({
-                        orderList: this.curOrderList
-                      })
-                      .then((res) => {
-                        if (res.code === 200) {
-                          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);
-            }
-          }
-        });
-      }
-    },
-    /**
-     * @description: 微信包月支付
-     * @return {*}
-     */
-    wechatMonthPay() {
-      this.$u.api
-        .wechatMonthlyPayapi({
-          monthId: this.monthId,
-          openid: this.vuex_wxinfo.openId
-        })
-        .then((r) => {
-          if (r.code === 200) {
-            $wxPay.wexinPay(r.data.wx).then((res) => {
-              switch (Number(res.code)) {
+      const apiCall = this.exportFlag ? this.$u.api.parkingWechatPayApi : this.$u.api.wechatPayApi;
+      try {
+        const { code, data } = await apiCall({ ...params });
+        if (code === 200) {
+          if (data.needPay) {
+            $wxPay.weixinPay(data.wx).then((r) => {
+              const messageMap = {
+                0: '成功',
+                1: '已取消支付',
+                2: '支付失败,请检查!'
+              };
+              switch (Number(r.code)) {
                 case 0: // 成功
                   //#ifdef H5
-                  location.href = this.jumpUrl;
+                  location.reload();
                   //#endif
                   break;
                 case 1: // 取消
-                  this.showToast('已取消支付', 'info');
+                  if (this.isCancelCoupon) {
+                    this.cancelCoupon(messageMap[r.code]);
+                  } else {
+                    this.showToast(messageMap[r.code], 'info');
+                    location.reload();
+                  }
                   break;
                 case 2: // 支付失败
-                  this.showToast('支付失败,请检查!', 'error');
+                  this.showToast(messageMap[r.code], 'error');
                   break;
               }
             });
+          } else {
+            this.showToast('无需支付', 'info');
+            setTimeout(() => {
+              uni.hideLoading();
+              location.reload();
+            }, 1000);
           }
+        }
+      } catch (error) {}
+    },
+    /**
+     * @description: 取消优惠券
+     * @param {*} msg
+     * @return {*}
+     */
+    async cancelCoupon(msg) {
+      try {
+        const { code } = await this.$u.api.updateCouponStatusApi({ orderList: this.curOrderList });
+        if (code === 200) {
+          this.showToast(msg, 'info');
+          location.reload();
+        }
+      } catch (error) {}
+    },
+    /**
+     * @description: 微信包月支付
+     * @return {*}
+     */
+    async wechatMonthPay() {
+      const { code, data } = await this.$u.api.wechatMonthlyPayapi({ monthId: this.monthId, openid: this.vuex_wxinfo.openId });
+      if (code === 200) {
+        $wxPay.weixinPay(data?.wx).then((res) => {
+          this.handleMonthlyPay.call(this, res);
         });
+      }
+    },
+    /**
+     * @description: 微信包月支付响应处理
+     * @param {*} response
+     * @return {*}
+     */
+    handleMonthlyPay(response) {
+      const messageMap = {
+        0: { title: '成功', jumpUrl: this.jumpUrl },
+        1: { title: '已取消支付' },
+        2: { title: '支付失败,请检查!', type: 'error' }
+      };
+      const message = messageMap[Number(response.code)];
+      this.showToast(message.title, message.type || 'info');
+      if (message.jumpUrl) {
+        location.href = message.jumpUrl;
+      }
     },
     /**
      * 直接通过后台获取贵阳银行微信支付地址
      * @param {Array} list 需要支付的订单组合数组
      * @param {Number} deviceNo 设备编号(在停车锁部分需要)
      * */
-    getWXPayByJava(orderList, deviceNo) {
-      let params = {
-        orderList: orderList,
+    async getWXPayByJava(orderList, deviceNo) {
+      const params = {
+        orderList,
         openid: this.vuex_wxinfo.openId,
         jumpUrl: this.jumpUrl,
-        deviceNo: deviceNo ? deviceNo : null,
+        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.showToast('无需支付', 'info');
-                setTimeout(() => {
-                  uni.hideLoading();
-                  location.href = this.jumpUrl;
-                }, 1000);
-              }
-            } else {
-              uni.hideLoading();
-            }
-          })
-          .catch((err) => {
-            this.showToast(`无法调起${this.alipayEnv ? '支付宝' : this.wxEnv ? '微信' : '聚合'}支付!`, '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.showToast('无需支付', 'info');
-                setTimeout(() => {
-                  uni.hideLoading();
-                  location.href = this.jumpUrl;
-                }, 1000);
-              }
-            } else {
+      const apiCall = this.exportFlag ? this.$u.api.polyPayExportApi : this.$u.api.ordinaryWxPay;
+      try {
+        const { code, data } = await apiCall({ ...params });
+        if (code === 200) {
+          if (data.needPay) {
+            localStorage.setItem('jumpUrl', this.jumpUrl);
+            location.href = data.qrCodeUrl;
+          } else {
+            this.showToast('无需支付', 'info');
+            setTimeout(() => {
               uni.hideLoading();
-            }
-          })
-          .catch((err) => {
-            this.showToast(`无法调起${this.alipayEnv ? '支付宝' : this.wxEnv ? '微信' : '聚合'}支付!`, 'info');
-          });
+              location.href = this.jumpUrl;
+            }, 1000);
+          }
+        }
+      } catch (error) {
+        // this.showToast(`无法调起${this.alipayEnv ? '支付宝' : this.wxEnv ? '微信' : '聚合'}支付!`, 'error');
       }
     },
     /**
@@ -614,11 +547,7 @@ export default {
       // this.couponPopup.currentCoupon = this.couponPopup.couponList.find((item) => item.id === this.couponPopup.radioCurrent);
     },
     couponItemClick(item) {
-      if (item.id === this.couponPopup.radioCurrent) {
-        this.couponPopup.radioCurrent = '';
-      } else {
-        this.couponPopup.radioCurrent = item.id;
-      }
+      this.couponPopup.radioCurrent = item.id === this.couponPopup.radioCurrent ? '' : item.id;
     },
     /**
      * 优惠券确认
@@ -626,11 +555,9 @@ export default {
      * @returns {any}
      */
     confimCoupon() {
-      if (this.couponPopup.radioCurrent) {
-        this.couponPopup.currentCoupon = this.couponPopup.couponList.find((item) => item.id === this.couponPopup.radioCurrent);
-      } else {
-        this.couponPopup.currentCoupon = {};
-      }
+      this.couponPopup.currentCoupon = this.couponPopup.radioCurrent
+        ? this.couponPopup.couponList.find((item) => item.id === this.couponPopup.radioCurrent)
+        : {};
       this.couponPopup.show = false;
     },
     /**
@@ -639,16 +566,87 @@ export default {
      * @returns {any}
      */
     immediatePayment() {
-      switch (this.radioCurrent) {
-        case 'weixin': // 微信支付
-          this.isMonthPay ? this.wechatMonthPay() : this.wechatPay();
-          break;
-        case 'gzyh':
-          this.isMonthPay ? this.gyBankMonthPay() : this.gyBankPay();
-          break;
-        case 'juhe':
-          this.isMonthPay ? this.juheMonthPay() : this.juhePay();
-          break;
+      if (this.isIndoor) {
+        const relationObj = {
+          weixin: 'wechat',
+          gzyh: 'quick',
+          juhe: 'poly'
+        };
+        this.indoorPayment(relationObj[this.radioCurrent]);
+      } else {
+        switch (this.radioCurrent) {
+          case 'weixin': // 微信支付
+            this.isMonthPay ? this.wechatMonthPay() : this.wechatPay();
+            break;
+          case 'gzyh': // 贵州银行支付或快捷支付
+            this.isMonthPay ? this.gyBankMonthPay() : this.gyBankPay();
+            break;
+          case 'juhe': // 聚合支付
+            this.isMonthPay ? this.juheMonthPay() : this.juhePay();
+            break;
+        }
+      }
+    },
+    /**
+     * @description: 室内支付
+     * @param {*} payMode
+     * @return {*}
+     */
+    async indoorPayment(payMode) {
+      const { curOrderList, couponPopup, vuex_wxinfo, jumpUrl } = this;
+      const params = {
+        orderList: curOrderList,
+        payMode,
+        couponMemberId: couponPopup?.radioCurrent,
+        openid: vuex_wxinfo?.openId,
+        sanPay: true,
+        jumpUrl
+      };
+      const { code, data } = await this.$u.api.indoorPaymentApi({ ...params });
+      if (code === 200) {
+        if (data?.needPay) {
+          switch (payMode) {
+            case 'wechat': // 微信支付
+              $wxPay.weixinPay(data?.wechat?.wx).then((r) => {
+                const messageMap = {
+                  0: '成功',
+                  1: '已取消支付',
+                  2: '支付失败,请检查!'
+                };
+                switch (Number(r.code)) {
+                  case 0: // 成功
+                    //#ifdef H5
+                    location.reload();
+                    //#endif
+                    break;
+                  case 1: // 取消
+                    if (this.isCancelCoupon) {
+                      this.cancelCoupon(messageMap[r.code]);
+                    } else {
+                      this.showToast(messageMap[r.code], 'info');
+                      location.reload();
+                    }
+                    break;
+                  case 2: // 支付失败
+                    this.showToast(messageMap[r.code], 'error');
+                    break;
+                }
+              });
+              break;
+            case 'quick': // 快捷支付
+              location.href = data?.quick?.url;
+              break;
+            case 'poly':
+              localStorage.setItem('jumpUrl', this.jumpUrl);
+              location.href = data?.poly?.qrCodeUrl;
+              break;
+          }
+        } else {
+          this.showToast('无需支付', 'info');
+          setTimeout(() => {
+            location.href = this.jumpUrl;
+          }, 1000);
+        }
       }
     },
     /**

+ 21 - 0
pages/common/paymentSuccess/paymentSuccess.scss

@@ -0,0 +1,21 @@
+.payment-success {
+  width: calc(100% - 60rpx);
+  margin: 0 auto;
+
+  &-icon {
+    width: 441rpx;
+    height: 100%;
+    margin: 0 auto;
+    padding: 133rpx 0 55rpx 0;
+  }
+
+  &-content {
+    color: #4ccd8a;
+    font-size: 50rpx;
+    text-align: center;
+  }
+
+  &-cancel {
+    margin-top: 202rpx;
+  }
+}

+ 38 - 0
pages/common/paymentSuccess/paymentSuccess.vue

@@ -0,0 +1,38 @@
+<!-- 支付成功 -->
+<template>
+  <view class="payment-success">
+    <view class="payment-success-icon">
+      <u-image width="441rpx" height="441rpx" src="/static/img/payment-success-icon.svg" />
+    </view>
+    <view class="payment-success-content">
+      <text>支付成功!</text>
+    </view>
+    <view class="payment-success-cancel">
+      <u-button type="primary" @click="cancelClick">返回</u-button>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  data() {
+    return {};
+  },
+  methods: {
+    /**
+     * @description: 返回操作
+     * @return {*}
+     */
+    cancelClick() {
+      this.$u.route({
+        url: '/pages/center/order/order',
+        type: 'redirectTo'
+      });
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+@import './paymentSuccess.scss';
+</style>

+ 1 - 1
pages/handleMonthly/handleMonthly20230220.vue

@@ -426,7 +426,7 @@
 					})
 					.then((r) => {
 						if (r.code === 200) {
-							$wxPay.wexinPay(r.data.wx).then((res) => {
+							$wxPay.weixinPay(r.data.wx).then((res) => {
 								switch (Number(res.code)) {
 									case 0: // 成功
 										//#ifdef H5

+ 1 - 1
pages/handleMonthly/handleMonthly20230315.vue

@@ -454,7 +454,7 @@ export default {
         })
         .then((r) => {
           if (r.code === 200) {
-            $wxPay.wexinPay(r.data.wx).then((res) => {
+            $wxPay.weixinPay(r.data.wx).then((res) => {
               switch (Number(res.code)) {
                 case 0: // 成功
                   //#ifdef H5

+ 245 - 236
pages/parkingLock/parkingLock.scss

@@ -1,206 +1,206 @@
 .parking-lock {
-	min-height: calc(100vh - 88rpx);
-	background-color: #F6F6FF;
-	&-box {
-		padding: 40rpx 0 0;
-	}
-	.parking-lock-title {
-		font-size: 46rpx;
-		color: #292929;
-		text-align: center;
-		padding-top: 31rpx;
-		line-height: 65rpx;
-		font-family: PingFangSC-Regular, PingFang SC;
-		font-weight: 400;
-	}
-	.parking-lock-tips {
-		width: calc(100% - 72rpx);
-		font-size: 30rpx;
-		color: #777777;
-		text-align: center;
-		margin: 10rpx auto;
-		line-height: 47rpx;
-	}
-	.parking-lock-info {
-		width: calc(100% - 72rpx);
-		margin: 31rpx auto 54rpx;
-		background-color: #fff;
-		border-radius: 15rpx;
-		padding: 39rpx 41rpx;
-		.parking-lock-info-item {
-			display: flex;
-			margin-bottom: 16rpx;
-			view {
-				font-size: 28rpx;
-				&:first-child {
-					width: 30%;
-					color: #2A2A2A;
-				}
-				&:last-child {
-					color: #6E6E6E;
-				}
-			}
-			.really-money {
-				color: #FA7319!important;
-			}
-		}
-	}
-	.parking-lock-pay-btn {
-		width: calc(100% - 72rpx);
-		margin: 0 auto;
-		button {
-			width: 100%;
-			height: 100rpx;
-			line-height: 100rpx;
-			background-color: #008CFF;
-			border: none;
-			color: #fff;
-			box-shadow: 0px 7px 13px 0px rgba(16, 153, 250, 0.31);
-			font-size: 28rpx;
-			font-weight: 500;
-		}
-	}
-	.parking-lock-begin-box {
-		width: 441rpx;
-		height: 441rpx;
-		line-height: 441rpx;
-		background: #31A2FF;
-		background: linear-gradient(270deg, rgba(49,162,255,0.1) 20%, rgba(49,162,255,1) 100%);
-		border-radius: 50%;
-		text-align: center;
-		margin: 0 auto;
-		// animation: spin 3s linear infinite;
-		.parking-lock-begin-bg {
-			display: inline-block;
-			width: 420rpx;
-			height: 420rpx;
-			line-height: 420rpx;
-			vertical-align: middle;
-			border: solid 12rpx #fff;
-			background: linear-gradient(346deg, #008CFF 0%, #95CFFF 100%);
-			border-radius: 50%;
-			image {
-				width: 194rpx;
-				height: 239rpx;
-				vertical-align: middle;
-			}
-		}
-	}
-	.parking-lock-begin-info {
-		text-align: center;
-		font-size: 50rpx;
-		color: #008CFF;
-		margin-top: 57rpx;
-	}
-	.parking-lock-loading-box {
-		width: 441rpx;
-		height: 441rpx;
-		line-height: 441rpx;
-		background: #31A2FF;
-		background: linear-gradient(0deg, rgba(49,162,255,0.1) 20%, rgba(49,162,255,1) 100%);
-		border-radius: 50%;
-		text-align: center;
-		margin: 0 auto;
-		animation: spin 3s linear infinite;
-		.parking-lock-loading-bg {
-			display: inline-block;
-			width: 420rpx;
-			height: 420rpx;
-			line-height: 420rpx;
-			vertical-align: middle;
-			border: solid 12rpx #fff;
-			background: linear-gradient(346deg, #008CFF 0%, #95CFFF 100%);
-			border-radius: 50%;
-			image {
-				width: 194rpx;
-				height: 239rpx;
-				vertical-align: middle;
-			}
-		}
-	}
-	.parking-lock-loading-info {
-		text-align: center;
-		font-size: 50rpx;
-		color: #008CFF;
-		margin-top: 57rpx;
-	}
-	.parking-lock-success {
-		.parking-lock-success-box {
-			width: 441rpx;
-			height: 441rpx;
-			margin: 0 auto;
-			image {
-				width: 100%;
-				height: 100%;
-			}
-		}
-		.parking-lock-success-info {
-			color: #4CCD8A;
-			font-size: 50rpx;
-			text-align: center;
-			margin: 56rpx 0 202rpx;
-		}
-		.parking-lock-success-button {
-			width: calc(100% - 80rpx);
-			margin: 0 auto;
-			button {
-				width: 100%;
-				height: 100rpx;
-				line-height: 100rpx;
-				background-color: #008CFF;
-				font-size: 28rpx;
-				color: #fff;
-			}
-		}
-	}
+  min-height: calc(100vh - 88rpx);
+  background-color: #f6f6ff;
+  &-box {
+    padding: 40rpx 0 0;
+  }
+  .parking-lock-title {
+    font-size: 46rpx;
+    color: #292929;
+    text-align: center;
+    padding-top: 31rpx;
+    line-height: 65rpx;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+  }
+  .parking-lock-tips {
+    width: calc(100% - 72rpx);
+    font-size: 30rpx;
+    color: #777777;
+    text-align: center;
+    margin: 10rpx auto;
+    line-height: 47rpx;
+  }
+  .parking-lock-info {
+    width: calc(100% - 72rpx);
+    margin: 31rpx auto 54rpx;
+    background-color: #fff;
+    border-radius: 15rpx;
+    padding: 39rpx 41rpx;
+    .parking-lock-info-item {
+      display: flex;
+      margin-bottom: 16rpx;
+      view {
+        font-size: 28rpx;
+        &:first-child {
+          width: 30%;
+          color: #2a2a2a;
+        }
+        &:last-child {
+          color: #6e6e6e;
+        }
+      }
+      .really-money {
+        color: #fa7319 !important;
+      }
+    }
+  }
+  .parking-lock-pay-btn {
+    width: calc(100% - 72rpx);
+    margin: 0 auto;
+    button {
+      width: 100%;
+      height: 100rpx;
+      line-height: 100rpx;
+      background-color: #008cff;
+      border: none;
+      color: #fff;
+      box-shadow: 0px 7px 13px 0px rgba(16, 153, 250, 0.31);
+      font-size: 28rpx;
+      font-weight: 500;
+    }
+  }
+  .parking-lock-begin-box {
+    width: 441rpx;
+    height: 441rpx;
+    line-height: 441rpx;
+    background: #31a2ff;
+    background: linear-gradient(270deg, rgba(49, 162, 255, 0.1) 20%, rgba(49, 162, 255, 1) 100%);
+    border-radius: 50%;
+    text-align: center;
+    margin: 0 auto;
+    // animation: spin 3s linear infinite;
+    .parking-lock-begin-bg {
+      display: inline-block;
+      width: 420rpx;
+      height: 420rpx;
+      line-height: 420rpx;
+      vertical-align: middle;
+      border: solid 12rpx #fff;
+      background: linear-gradient(346deg, #008cff 0%, #95cfff 100%);
+      border-radius: 50%;
+      image {
+        width: 194rpx;
+        height: 239rpx;
+        vertical-align: middle;
+      }
+    }
+  }
+  .parking-lock-begin-info {
+    text-align: center;
+    font-size: 50rpx;
+    color: #008cff;
+    margin-top: 57rpx;
+  }
+  .parking-lock-loading-box {
+    width: 441rpx;
+    height: 441rpx;
+    line-height: 441rpx;
+    background: #31a2ff;
+    background: linear-gradient(0deg, rgba(49, 162, 255, 0.1) 20%, rgba(49, 162, 255, 1) 100%);
+    border-radius: 50%;
+    text-align: center;
+    margin: 0 auto;
+    animation: spin 3s linear infinite;
+    .parking-lock-loading-bg {
+      display: inline-block;
+      width: 420rpx;
+      height: 420rpx;
+      line-height: 420rpx;
+      vertical-align: middle;
+      border: solid 12rpx #fff;
+      background: linear-gradient(346deg, #008cff 0%, #95cfff 100%);
+      border-radius: 50%;
+      image {
+        width: 194rpx;
+        height: 239rpx;
+        vertical-align: middle;
+      }
+    }
+  }
+  .parking-lock-loading-info {
+    text-align: center;
+    font-size: 50rpx;
+    color: #008cff;
+    margin-top: 57rpx;
+  }
+  .parking-lock-success {
+    .parking-lock-success-box {
+      width: 441rpx;
+      height: 441rpx;
+      margin: 0 auto;
+      image {
+        width: 100%;
+        height: 100%;
+      }
+    }
+    .parking-lock-success-info {
+      color: #4ccd8a;
+      font-size: 50rpx;
+      text-align: center;
+      margin: 56rpx 0 202rpx;
+    }
+    .parking-lock-success-button {
+      width: calc(100% - 80rpx);
+      margin: 0 auto;
+      button {
+        width: 100%;
+        height: 100rpx;
+        line-height: 100rpx;
+        background-color: #008cff;
+        font-size: 28rpx;
+        color: #fff;
+      }
+    }
+  }
 }
 .pay-way {
-	display: flex;
-	justify-content: space-between;
-	width: calc(100% - 34rpx);
-	border-top: solid 1px #979797;
-	margin: 23rpx auto;
-	padding: 38rpx 86rpx;
-	.pay-way-item {
-		text-align: center;
-		font-size: 30rpx;
-		color: #5F5F5F;
-		image {
-			width: 143rpx;
-			height: 143rpx;
-		}
-	}
+  display: flex;
+  justify-content: space-between;
+  width: calc(100% - 34rpx);
+  border-top: solid 1px #979797;
+  margin: 23rpx auto;
+  padding: 38rpx 86rpx;
+  .pay-way-item {
+    text-align: center;
+    font-size: 30rpx;
+    color: #5f5f5f;
+    image {
+      width: 143rpx;
+      height: 143rpx;
+    }
+  }
 }
 .pay-way-close-btn {
-	width: calc(100% - 34rpx);
-	margin: 0 auto 68rpx;
-	border: none;
-	background-color: #3397FA;
-	color: #fff;
-	border-radius: 10rpx;
+  width: calc(100% - 34rpx);
+  margin: 0 auto 68rpx;
+  border: none;
+  background-color: #3397fa;
+  color: #fff;
+  border-radius: 10rpx;
 }
 @keyframes rotate {
-    0%{
-        transform: rotate(0);
-    }
-    50% {
-    	transform:rotate(200deg);
-    }
-    100% {
-        transform: rotate(0);
-	}
+  0% {
+    transform: rotate(0);
+  }
+  50% {
+    transform: rotate(200deg);
+  }
+  100% {
+    transform: rotate(0);
+  }
 }
 @keyframes spin {
   from {
     transform: rotate(0);
   }
-  to{
+  to {
     transform: rotate(359deg);
   }
 }
-.loadingSelect{
-	    text-align: center;
-	    margin-top: 20rpx;
+.loadingSelect {
+  text-align: center;
+  margin-top: 20rpx;
 }
 .spinner {
   margin: auto;
@@ -209,89 +209,98 @@
   text-align: center;
   font-size: 10px;
 }
- 
+
 .spinner > view {
-  background-color: #6495ED;
+  background-color: #6495ed;
   height: 100%;
   width: 10rpx;
   margin-right: 2rpx;
   display: inline-block;
-   
+
   -webkit-animation: stretchdelay 1.2s infinite ease-in-out;
   animation: stretchdelay 1.2s infinite ease-in-out;
 }
- 
+
 .spinner .rect2 {
   -webkit-animation-delay: -1.1s;
   animation-delay: -1.1s;
 }
- 
+
 .spinner .rect3 {
-  -webkit-animation-delay: -1.0s;
-  animation-delay: -1.0s;
+  -webkit-animation-delay: -1s;
+  animation-delay: -1s;
 }
- 
+
 .spinner .rect4 {
   -webkit-animation-delay: -0.9s;
   animation-delay: -0.9s;
 }
- 
+
 .spinner .rect5 {
   -webkit-animation-delay: -0.8s;
   animation-delay: -0.8s;
 }
- 
+
 @-webkit-keyframes stretchdelay {
-  0%, 40%, 100% { -webkit-transform: scaleY(0.4) } 
-  20% { -webkit-transform: scaleY(1.0) }
+  0%,
+  40%,
+  100% {
+    -webkit-transform: scaleY(0.4);
+  }
+  20% {
+    -webkit-transform: scaleY(1);
+  }
 }
- 
+
 @keyframes stretchdelay {
-  0%, 40%, 100% {
+  0%,
+  40%,
+  100% {
     transform: scaleY(0.4);
     -webkit-transform: scaleY(0.4);
-  }  20% {
-    transform: scaleY(1.0);
-    -webkit-transform: scaleY(1.0);
   }
+  20% {
+    transform: scaleY(1);
+    -webkit-transform: scaleY(1);
+  }
+}
+.new-plate-number {
+  margin-bottom: 70rpx;
 }
-.new-plate-number{	
-	margin-bottom: 70rpx;
+.message-input-wrap {
+  margin: 0 -40rpx;
 }
-.message-input-wrap{
-	margin: 0 -40rpx;
+.message-input-wrap /deep/ .u-input ~ uni-view:last-of-type .u-char-item {
+  background-color: #e8ffe8;
 }
-.message-input-wrap /deep/ .u-input ~ uni-view:last-of-type .u-char-item{
-	background-color: #E8FFE8;
+.really-license-txt {
+  color: #008cff;
 }
-.really-license-txt{
-	color: #008CFF;
+.really-license-txt1 {
+  color: #008cff;
+  margin: 20rpx;
 }
-.really-license-txt1{
-	color: #008CFF;
-	margin: 20rpx;
+.popup-vehicleNo-title {
+  font-size: 48rpx;
+  text-align: center;
+  padding-top: 20rpx;
 }
-.popup-vehicleNo-title{
-	font-size: 48rpx;
-	text-align: center;
-	padding-top: 20rpx;
+.popup-vehicleNo-center {
+  width: 95%;
+  height: 2rpx;
+  border-top: solid rgb(146, 146, 146) 2rpx;
+  margin: 30rpx 20rpx 50rpx 20rpx;
 }
-.popup-vehicleNo-center{
-	width: 95%;
-	height: 2rpx;
-	border-top: solid rgb(146, 146, 146) 2rpx;
-	margin: 30rpx 20rpx 50rpx 20rpx;
+.popup-vehicleNo-select {
+  text-align: center;
+  color: #777777;
 }
-.popup-vehicleNo-select{
-	text-align: center;
-	color: #777777;
+.vehicleNo-btn {
+  display: flex;
+  margin: 40rpx 0;
 }
-.vehicleNo-btn{
-	display: flex;
-	margin: 40rpx 0;
+.parking-lock-pay-attention {
+  margin: 50rpx;
+  line-height: 48rpx;
+  color: #777777;
 }
-.parking-lock-pay-attention{
-	margin: 50rpx;
-	line-height: 48rpx;
-	color: #777777;
-}

+ 2 - 2
pages/paymentMethod/paymentMethod.vue

@@ -216,7 +216,7 @@
 					this.$u.api.parkingWechatPayApi(params).then((res) => {
 						if (res.code === 200) {
 							if (res.data.needPay) {
-								$wxPay.wexinPay(res.data.wx).then((r) => {
+								$wxPay.weixinPay(res.data.wx).then((r) => {
 									switch (Number(r.code)) {
 										case 0: // 成功
 											//#ifdef H5
@@ -260,7 +260,7 @@
 					this.$u.api.wechatPayApi(params).then((res) => {
 						if (res.code === 200) {
 							if (res.data.needPay) {
-								$wxPay.wexinPay(res.data.wx).then((r) => {
+								$wxPay.weixinPay(res.data.wx).then((r) => {
 									switch (Number(r.code)) {
 										case 0: // 成功
 											//#ifdef H5

+ 26 - 0
static/img/payment-success-icon.svg

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="441px" height="441px" viewBox="0 0 441 441" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>编组 3</title>
+    <defs>
+        <linearGradient x1="60.4722943%" y1="100%" x2="34.9913817%" y2="0%" id="linearGradient-1">
+            <stop stop-color="#4ACC89" offset="0%"></stop>
+            <stop stop-color="#AEF1CD" offset="100%"></stop>
+        </linearGradient>
+    </defs>
+    <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="道闸已开启" transform="translate(-155.000000, -275.000000)">
+            <g id="编组-3" transform="translate(155.000000, 275.000000)">
+                <g id="编组">
+                    <circle id="椭圆形" fill="url(#linearGradient-1)" cx="220.9375" cy="220.9375" r="192.9375"></circle>
+                    <g id="putongtingchewei_huabanfuben" transform="translate(121.000000, 121.000000)" fill="#FFFFFF" fill-opacity="0.105059003" fill-rule="nonzero">
+                        <path d="M190.1,142.1 L181.1,119 C179.4,114.6 175.7,110.8 168.7,110.8 L121.2,110.8 C114.2,110.8 110.6,114.6 108.9,119 L99.8,142.1 C96.2,142.6 89.9,146.7 89.9,154.6 L89.9,184 L100,184 L100,191.3 C100,202.9 113.8,202.7 113.8,191.3 L113.8,184 L176,184 L176,191.3 C176,202.7 189.8,202.9 189.8,191.3 L189.8,184 L200,184 L200,154.6 C200,146.8 193.6,142.6 190.1,142.1 Z M116,123.7 C116.9,121.1 118.1,119.3 121.1,119.3 L168.8,119.3 C171.8,119.3 173.1,121.2 173.9,123.7 L180.7,141.6 L109.2,141.6 L116,123.7 L116,123.7 Z M112,166.3 C107.7,166.3 104.2,162.7 104.2,158.3 C104.2,153.9 107.7,150.3 112,150.3 C116.3,150.3 119.8,153.9 119.8,158.3 C119.8,162.7 116.3,166.3 112,166.3 Z M177.8,166.3 C173.5,166.3 170,162.7 170,158.3 C170,153.9 173.5,150.3 177.8,150.3 C182.1,150.3 185.6,153.9 185.6,158.3 C185.7,162.7 182.2,166.3 177.8,166.3 Z M133.2,54.3 C133.2,24.3 108.5,0 78,0 C76.6,0 75.2,0.1 73.9,0.2 L25,0.2 L25,0.3 L0,0.3 L0,199.8 L28.1,199.8 L28.1,108.7 L73.7,108.7 C75.8,108.9 75.8,108.8 78,108.8 C108.5,108.8 133.2,84.4 133.2,54.3 L133.2,54.3 Z M73.5,80.6 L28.1,80.6 L28.1,28.1 L73.7,28.1 C87,28.7 99.2,40.9 99.2,54.2 C99.2,67.5 86.9,80 73.5,80.6 Z" id="形状"></path>
+                    </g>
+                    <circle id="椭圆形" stroke="#4FCD8C" stroke-width="8" cx="220.5" cy="220.5" r="216.5"></circle>
+                </g>
+                <g id="gou" transform="translate(96.000000, 133.000000)" fill="#FFFFFF" fill-rule="nonzero">
+                    <path d="M87.8274207,175 C84.5050377,174.938305 81.3225037,173.646986 78.8910871,171.374053 L3.80398605,96.3113079 C1.42336497,94.0284617 0.0537851625,90.8833934 0,87.5794913 C-0.0506842356,84.2755893 1.21878422,81.0885048 3.5260417,78.7310231 C8.35987684,73.9080993 16.1290425,73.7848806 21.112342,78.4521052 L21.3902864,78.7310231 L87.5494764,144.859941 L228.778922,3.67673022 C233.562103,-1.15350833 241.32381,-1.23490187 246.206534,3.49397468 C251.089258,8.22285122 251.283721,16.0097257 246.643167,20.9780972 L246.365222,21.2570151 L96.4436972,171.103587 C94.2635871,173.585329 91.1242336,175.004988 87.8274207,175 Z" id="路径"></path>
+                </g>
+            </g>
+        </g>
+    </g>
+</svg>

+ 1 - 1
utils/wxPay.js

@@ -1,6 +1,6 @@
 const wx = require('weixin-js-sdk');
 export default {
-  wexinPay(data, jumpUrl) {
+  weixinPay(data, jumpUrl) {
     return new Promise((r) => {
       wx.config({
         debug: false,