Эх сурвалжийг харах

织金微信支付用v1版本

gcz 3 өдөр өмнө
parent
commit
a62ef25b06

+ 1 - 1
common/apiurl.js

@@ -131,7 +131,7 @@ export const apiurl = {
   // 获取数据字典接口
   getDictUrl: '/admin/dict/data/type/',
   // 微信支付
-  // wechatPayUrl: '/client/pay/wechat',
+  wechatPayUrlV1: '/client/pay/wechat',
   wechatPayUrl: '/client/pay/wechatV2',
   // 停车场微信支付
   parkingWechatPayUrl: '/client/payment/parking/wechat',

+ 2 - 0
common/http.api.js

@@ -119,6 +119,7 @@ const install = (Vue, vm) => {
   let quickPayExportApi = (params = {}) => vm.$u.post(apiurl.quickPayExportUrl, params);
   let polyPayExportApi = (params = {}) => vm.$u.post(apiurl.polyPayExportUrl, params);
   let getDictApi = (params = {}) => vm.$u.get(apiurl.getDictUrl + params.type);
+  let wechatPayApiV1 = (params = {}) => vm.$u.post(apiurl.wechatPayUrlV1, params);
   let wechatPayApi = (params = {}) => vm.$u.post(apiurl.wechatPayUrl, params);
   let parkingWechatPayApi = (params = {}) => vm.$u.post(apiurl.parkingWechatPayUrl, params);
   let getParamsApi = (params = {}) => vm.$u.get(apiurl.getParamsUrl + params.key);
@@ -227,6 +228,7 @@ const install = (Vue, vm) => {
     getRoomParkingApi,
     getRoomOrderDetail,
     getDictApi,
+	wechatPayApiV1,
     wechatPayApi,
     parkingWechatPayApi,
     getParamsApi,

+ 9 - 1
pages/choosePayment/choosePayment.vue

@@ -482,7 +482,15 @@ export default {
      * @return {*}
      */
     handleWxPay(params) {
-      const api = this.exportFlag ? this.$u.api.parkingWechatPayApi : this.$u.api.wechatPayApi;
+      // const api = this.exportFlag ? this.$u.api.parkingWechatPayApi : this.$u.api.wechatPayApi;
+	  let api;
+	  if (this.exportFlag) {
+	    api = this.$u.api.parkingWechatPayApi;
+	  } else if (this.projectFlag === 'zhijin') {
+	    api = this.$u.api.wechatPayApiV1;
+	  } else {
+	    api = this.$u.api.wechatPayApi;
+	  }
       api({ ...params }).then((res) => {
         if (res.code !== 200) {
           return;