diff --git a/src/utils/constants.ts b/src/utils/constants.ts
index f4d67b4e..cfa785b0 100644
--- a/src/utils/constants.ts
+++ b/src/utils/constants.ts
@@ -109,6 +109,14 @@ export const PayChannelEnum = {
code: 'wx_app',
name: '微信 APP 支付'
},
+ WX_NATIVE: {
+ code: 'wx_native',
+ name: '微信 Native 支付'
+ },
+ WX_WAP: {
+ code: 'wx_wap',
+ name: '微信 WAP 网站支付'
+ },
WX_BAR: {
code: 'wx_bar',
name: '微信条码支付'
diff --git a/src/views/pay/app/components/channel/WeixinChannelForm.vue b/src/views/pay/app/components/channel/WeixinChannelForm.vue
index 34e92c69..cfd46bc0 100644
--- a/src/views/pay/app/components/channel/WeixinChannelForm.vue
+++ b/src/views/pay/app/components/channel/WeixinChannelForm.vue
@@ -80,7 +80,8 @@
:http-request="keyContentUpload"
>
- 点击上传
+
+ 点击上传
@@ -120,7 +121,8 @@
:http-request="privateKeyContentUpload"
>
- 点击上传
+
+ 点击上传
@@ -148,7 +150,8 @@
:http-request="privateCertContentUpload"
>
- 点击上传
+
+ 点击上传
@@ -310,7 +313,7 @@ const pemFileBeforeUpload = (file) => {
/**
* 读取 apiclient_key.pem 到 privateKeyContent 字段
*/
-const privateKeyContentUpload = (event) => {
+const privateKeyContentUpload = async (event) => {
const readFile = new FileReader()
readFile.onload = (e: any) => {
formData.value.config.privateKeyContent = e.target.result
@@ -321,7 +324,7 @@ const privateKeyContentUpload = (event) => {
/**
* 读取 apiclient_cert.pem 到 privateCertContent 字段
*/
-const privateCertContentUpload = (event) => {
+const privateCertContentUpload = async (event) => {
const readFile = new FileReader()
readFile.onload = (e: any) => {
formData.value.config.privateCertContent = e.target.result
@@ -332,7 +335,7 @@ const privateCertContentUpload = (event) => {
/**
* 读取 apiclient_cert.p12 到 keyContent 字段
*/
-const keyContentUpload = (event) => {
+const keyContentUpload = async (event) => {
const readFile = new FileReader()
readFile.onload = (e: any) => {
formData.value.config.keyContent = e.target.result.split(',')[1]
diff --git a/src/views/pay/app/index.vue b/src/views/pay/app/index.vue
index 2f4a9c1e..6b60d9b1 100644
--- a/src/views/pay/app/index.vue
+++ b/src/views/pay/app/index.vue
@@ -45,10 +45,17 @@
/>
- 搜索
- 重置
+
+
+ 搜索
+
+
+
+ 重置
+
- 新增
+
+ 新增
@@ -70,12 +77,17 @@
-
+
@@ -84,87 +96,7 @@
v-else
type="danger"
circle
- @click="openChannelForm(scope.row, PayChannelEnum.ALIPAY_APP.code)"
- >
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -172,13 +104,18 @@
-
+
@@ -186,67 +123,7 @@
v-else
type="danger"
circle
- @click="openChannelForm(scope.row, PayChannelEnum.WX_LITE.code)"
- >
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -338,12 +215,11 @@
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import * as AppApi from '@/api/pay/app'
import AppForm from './components/AppForm.vue'
-import { PayChannelEnum } from '@/utils/constants'
+import { CommonStatusEnum, PayChannelEnum } from '@/utils/constants'
import AlipayChannelForm from './components/channel/AlipayChannelForm.vue'
import WeixinChannelForm from './components/channel/WeixinChannelForm.vue'
import MockChannelForm from './components/channel/MockChannelForm.vue'
import WalletChannelForm from './components/channel/WalletChannelForm.vue'
-import { CommonStatusEnum } from '@/utils/constants'
defineOptions({ name: 'PayApp' })
@@ -365,6 +241,23 @@ const queryParams = reactive({
})
const queryFormRef = ref() // 搜索的表单
+const alipayChannels = [
+ PayChannelEnum.ALIPAY_APP,
+ PayChannelEnum.ALIPAY_PC,
+ PayChannelEnum.ALIPAY_WAP,
+ PayChannelEnum.ALIPAY_QR,
+ PayChannelEnum.ALIPAY_BAR
+]
+
+const wxChannels = [
+ PayChannelEnum.WX_LITE,
+ PayChannelEnum.WX_PUB,
+ PayChannelEnum.WX_APP,
+ PayChannelEnum.WX_NATIVE,
+ PayChannelEnum.WX_WAP,
+ PayChannelEnum.WX_BAR,
+]
+
/** 查询列表 */
const getList = async () => {
loading.value = true