Commit ecdc39612f5f82f2280530e2be467ad8fa563649

Authored by YunaiV
1 parent a6437b7c

mall + pay:

1. 后台的收银台,接入微信扫码支付
yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/impl/weixin/WxNativePayClient.java
@@ -50,7 +50,7 @@ public class WxNativePayClient extends AbstractWxPayClient { @@ -50,7 +50,7 @@ public class WxNativePayClient extends AbstractWxPayClient {
50 WxPayNativeOrderResult response = client.createOrder(request); 50 WxPayNativeOrderResult response = client.createOrder(request);
51 51
52 // 转换结果 52 // 转换结果
53 - return new PayOrderUnifiedRespDTO(PayOrderDisplayModeEnum.QR_CODE_URL.getMode(), 53 + return new PayOrderUnifiedRespDTO(PayOrderDisplayModeEnum.QR_CODE.getMode(),
54 response.getCodeUrl()); 54 response.getCodeUrl());
55 } 55 }
56 56
@@ -68,7 +68,7 @@ public class WxNativePayClient extends AbstractWxPayClient { @@ -68,7 +68,7 @@ public class WxNativePayClient extends AbstractWxPayClient {
68 WxPayNativeOrderResult response = client.createOrderV3(TradeTypeEnum.NATIVE, request); 68 WxPayNativeOrderResult response = client.createOrderV3(TradeTypeEnum.NATIVE, request);
69 69
70 // 转换结果 70 // 转换结果
71 - return new PayOrderUnifiedRespDTO(PayOrderDisplayModeEnum.QR_CODE_URL.getMode(), 71 + return new PayOrderUnifiedRespDTO(PayOrderDisplayModeEnum.QR_CODE.getMode(),
72 response.getCodeUrl()); 72 response.getCodeUrl());
73 } 73 }
74 74
yudao-ui-admin/src/assets/images/pay/icon/wx_native.svg 0 → 100644
  1 +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1627279375144" class="icon" viewBox="0 0 1115 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4399" width="43.5546875" height="40" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url(&quot;//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.eot?#iefix&quot;) format(&quot;embedded-opentype&quot;), url(&quot;//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.woff2&quot;) format(&quot;woff2&quot;), url(&quot;//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.woff&quot;) format(&quot;woff&quot;), url(&quot;//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.ttf&quot;) format(&quot;truetype&quot;), url(&quot;//at.alicdn.com/t/font_1031158_1uhr8ri0pk5.svg#iconfont&quot;) format(&quot;svg&quot;); }</style></defs><path d="M751.388 68.267a34.133 34.133 0 0 1 0-68.267h227.556a91.022 91.022 0 0 1 91.022 91.022v227.556a34.133 34.133 0 1 1-68.266 0V91.022a22.756 22.756 0 0 0-22.756-22.755H751.388M1001.7 705.422a34.133 34.133 0 0 1 68.266 0v227.556A91.022 91.022 0 0 1 978.944 1024H748.885a34.133 34.133 0 0 1 0-68.267H978.49a22.756 22.756 0 0 0 22.755-22.755V705.422M364.09 955.733a34.133 34.133 0 1 1 0 68.267H136.533a91.022 91.022 0 0 1-91.022-91.022V705.422a34.133 34.133 0 0 1 68.267 0v227.556a22.756 22.756 0 0 0 22.755 22.755H364.09M113.778 318.578a34.133 34.133 0 1 1-68.267 0V91.022A91.022 91.022 0 0 1 136.533 0H364.09a34.133 34.133 0 0 1 0 68.267H136.533a22.756 22.756 0 0 0-22.755 22.755v227.556M34.133 477.867a34.133 34.133 0 0 0 0 68.266h168.619v-68.266z m1046.756 0H912.27v68.266h168.619a34.133 34.133 0 0 0 0-68.266zM202.752 157.24h709.746v320.627H202.752z m0 388.893h709.746V866.76H202.752z" fill="#04C361" p-id="4400"/></svg>
0 \ No newline at end of file 2 \ No newline at end of file
yudao-ui-admin/src/utils/constants.js
@@ -132,6 +132,10 @@ export const PayChannelEnum = { @@ -132,6 +132,10 @@ export const PayChannelEnum = {
132 "code": "wx_app", 132 "code": "wx_app",
133 "name": "微信 APP 支付" 133 "name": "微信 APP 支付"
134 }, 134 },
  135 + WX_NATIVE: {
  136 + "code": "wx_native",
  137 + "name": "微信扫码支付"
  138 + },
135 WX_BAR: { 139 WX_BAR: {
136 "code": "wx_bar", 140 "code": "wx_bar",
137 "name": "微信条码支付" 141 "name": "微信条码支付"
yudao-ui-admin/src/views/pay/cashier/index.vue
@@ -126,6 +126,10 @@ export default { @@ -126,6 +126,10 @@ export default {
126 icon: require("@/assets/images/pay/icon/wx_app.svg"), 126 icon: require("@/assets/images/pay/icon/wx_app.svg"),
127 code: "wx_app" 127 code: "wx_app"
128 }, { 128 }, {
  129 + name: '微信扫码支付',
  130 + icon: require("@/assets/images/pay/icon/wx_native.svg"),
  131 + code: "wx_native"
  132 + }, {
129 name: '微信条码支付', 133 name: '微信条码支付',
130 icon: require("@/assets/images/pay/icon/wx_bar.svg"), 134 icon: require("@/assets/images/pay/icon/wx_bar.svg"),
131 code: "wx_bar" 135 code: "wx_bar"