Ver código fonte

feat(KIP-7159): 临时停车优惠券。当用户没有优惠券时,页面UI显示有异常。

John-Hong 2 anos atrás
pai
commit
41eba6449b

+ 1 - 45
nginx_parking.conf

@@ -5,56 +5,12 @@ server {
     location / {
         root   /usr/share/nginx/html;
         index  index.html index.htm;
-        try_files $uri $uri/ router;
+	try_files $uri $uri/ router;
     }
-
     location router {
         rewrite ^.*$ /index.html last;
     }
 
-    location /MP_verify_ZlDO9qUqFIe2bqrN.txt {
-        default_type text/html;
-        return 200 'ZlDO9qUqFIe2bqrN';
-    }
-
-    location /TmXne3Z1gY.txt {
-        default_type text/html;
-        return 200 '5502f2268a4087961af8bcbaacda0190';
-    }
-
-    location /MP_verify_rmja2iMHaYCiylSG.txt {
-        default_type text/html;
-        return 200 'rmja2iMHaYCiylSG';
-    }
-
-    # location /qaPayment {
-    #     proxy_pass https://qa-apim.kerryplus.com/c/api/payment/v1;
-    # }
-
-    location /profileApi {
-        proxy_pass https://qa-apim.kerryplus.com/c/api;
-    }
-
-    location /profileApiProd {
-        proxy_pass https://apim.kerryplus.com/c/api;
-    }
-
-    location /qaApi {
-        proxy_pass https://qa-crm-kpl.kerryprops.com.cn/xcrm-api;
-    }
-    location /api {
-        proxy_pass https://crm.kerryplus.com/xcrm-api;
-    }
-
-    location /sns {
-        proxy_pass https://api.weixin.qq.com/sns;
-    }
-
-    location /cgi-bin {
-        proxy_pass https://api.weixin.qq.com/cgi-bin/;
-    }
-
-
 
     error_page   500 502 503 504  /50x.html;
     location = /50x.html {

+ 13 - 13
src/pages/login/openWx.vue

@@ -91,24 +91,24 @@ export default {
           });
         });*/
         // 通过code获取 openId等用户信息,/api/user/wechat/login 为后台接口
-        const { appid, secret } = getAppIdByGroupIdAndMallId({
-          groupId: this.$route.params.groupId,
-          mallId: this.$route.params.mallId,
-          type: 'all',
-        });
-        console.log(99, appid, secret, code);
+        // const { appid, secret } = getAppIdByGroupIdAndMallId({
+        //   groupId: this.$route.params.groupId,
+        //   mallId: this.$route.params.mallId,
+        //   type: 'all',
+        // });
+        // console.log(99, appid, secret, code);
         // return;
         // ?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code
         const res = await WxJsOpenId({
-          appid,
-          secret,
+          // appid,
+          // secret,
           code,
-          grant_type: 'authorization_code',
+          // grant_type: 'authorization_code',
         });
-        if (res?.expires_in && res?.openid) {
-          this.$store.commit('SET_OPENID', res.openid);
-          this.$store.commit('SET_WX_ACCESS_TOKEN', res.access_token);
-          this.$store.commit('SET_WX_REFRESH_TOKEN', res.refresh_token);
+        if (res?.code === '000000' && res?.data) {
+          this.$store.commit('SET_OPENID', res.data);
+          // this.$store.commit('SET_WX_ACCESS_TOKEN', res.access_token);
+          // this.$store.commit('SET_WX_REFRESH_TOKEN', res.refresh_token);
           // 判断用户是否需要登录,
           await this.checkIsLogin(() => {
             this.$router.replace({

+ 1 - 0
src/pages/parkingFee/parkingFeeCoupon.vue

@@ -733,6 +733,7 @@ export default {
     left: 0;
     right: 0;
     bottom: 50px;
+    z-index: 20;
   }
 }
 

+ 1 - 1
src/pages/parkingFee/parkingFeeDetail.vue

@@ -1823,7 +1823,7 @@ export default {
               window.subscribe('wxPayOver', (options) => {
                 this.Toastloading.clear();
                 // console.log('微信支付结束之后的返回参数', options);
-                // TODO: 在 qa 新发版前,只提示支付成功的信息
+                // T-ODO: 在 qa 新发版前,只提示支付成功的信息(已处理成功信息)
                 if (options?.wxPayOver === 'fail') {
                   // console.log('支付失败');
                   this.failedParkOrder();

+ 9 - 5
src/utils/login.js

@@ -127,8 +127,15 @@ export function logout() {
  }>
  */
 export function WxJsOpenId(param) {
-  return request.get(`/tparking/sns/oauth2/access_token`, param);
+  return request.get(`/oauth/v1/wx/config/openId`, param);
 }
+// 微信公众号H5获取用户openId - 需要登录
+// export function WxJsOpenId(param: { code: string }, config?:RequestConfig ): Promise<{
+//   code: string,
+//   data: string
+// }> {
+//   return post(`/oauth/v1/wx/config/openId`, param, config);
+// }
 
 /**
  * 获取 jsapi_ticket
@@ -201,10 +208,7 @@ export function createWxSign({ noncestr, jsapi_ticket, url, jsApiList }) {
  }>
  */
 function WxJsSdkSignature(param) {
-  return request.post(
-    `https://qa-apim.kerryplus.com/c/api/oauth/v1/wx/config/signature`,
-    param
-  );
+  return request.post(`/oauth/v1/wx/config/signature`, param);
 }
 
 /*

+ 1 - 1
src/utils/request-kip.js

@@ -133,7 +133,7 @@ export default {
     };
     return new Promise((resolve, reject) => {
       const url = getUrl(
-        /tparking\/sns|http/g.test(path) ? path : `${window.profileApi}${path}`
+        /|http/g.test(path) ? path : `${window.profileApi}${path}`
       );
       // console.log(130, url);
       const { header } = handleConfig(config);