|
@@ -2,7 +2,7 @@
|
|
|
<div class="receiving-account-page">
|
|
<div class="receiving-account-page">
|
|
|
<h2 class="page-title">收款账号</h2>
|
|
<h2 class="page-title">收款账号</h2>
|
|
|
<p class="page-tip">
|
|
<p class="page-tip">
|
|
|
- 请选择收款方式并填写相关信息;配置微信/支付宝商户参数或绑定借记卡银行账户,带 * 为必填项。修改后请保存。
|
|
|
|
|
|
|
+ 请选择收款方式并填写商户信息;微信/支付宝各填写商户ID与商户ID号码,或绑定借记卡银行账户,带 * 为必填项。修改后请保存。
|
|
|
</p>
|
|
</p>
|
|
|
|
|
|
|
|
<el-card shadow="never" class="form-card">
|
|
<el-card shadow="never" class="form-card">
|
|
@@ -16,121 +16,20 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<template v-if="form.accountType === 'wechat'">
|
|
<template v-if="form.accountType === 'wechat'">
|
|
|
- <el-form-item label="appid" prop="wechatAppid">
|
|
|
|
|
- <el-input v-model="form.wechatAppid" placeholder="请输入" clearable />
|
|
|
|
|
|
|
+ <el-form-item label="商户ID" prop="wechatAppid">
|
|
|
|
|
+ <el-input v-model="form.wechatAppid" placeholder="请输入商户ID" clearable />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="mchld" prop="wechatMchld">
|
|
|
|
|
- <el-input v-model="form.wechatMchld" placeholder="请输入" clearable />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="API证书序列号" prop="wechatApiCertSerialNo">
|
|
|
|
|
- <el-input v-model="form.wechatApiCertSerialNo" placeholder="请输入" clearable />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="APIv3 Key" prop="wechatApiV3Key">
|
|
|
|
|
- <el-input v-model="form.wechatApiV3Key" placeholder="请输入" clearable />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="支付公钥ID" prop="wechatPayPublicKeyId">
|
|
|
|
|
- <el-input v-model="form.wechatPayPublicKeyId" placeholder="请输入" clearable />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="私钥证书" prop="wechatPrivateKeyFile">
|
|
|
|
|
- <el-upload
|
|
|
|
|
- v-model:file-list="form.wechatPrivateKeyFile"
|
|
|
|
|
- class="cert-upload"
|
|
|
|
|
- drag
|
|
|
|
|
- :auto-upload="false"
|
|
|
|
|
- :limit="1"
|
|
|
|
|
- accept=".pem"
|
|
|
|
|
- :on-exceed="() => ElMessage.warning('最多上传1个文件')"
|
|
|
|
|
- >
|
|
|
|
|
- <div class="upload-inner">
|
|
|
|
|
- <el-icon :size="32" color="#6c8ff8">
|
|
|
|
|
- <UploadFilled />
|
|
|
|
|
- </el-icon>
|
|
|
|
|
- <p>点击或拖拽 .pem 至此处</p>
|
|
|
|
|
- <span>不超过 2MB</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-upload>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="公钥证书" prop="wechatPayPublicKeyFile">
|
|
|
|
|
- <el-upload
|
|
|
|
|
- v-model:file-list="form.wechatPayPublicKeyFile"
|
|
|
|
|
- class="cert-upload"
|
|
|
|
|
- drag
|
|
|
|
|
- :auto-upload="false"
|
|
|
|
|
- :limit="1"
|
|
|
|
|
- accept=".pem"
|
|
|
|
|
- :on-exceed="() => ElMessage.warning('最多上传1个文件')"
|
|
|
|
|
- >
|
|
|
|
|
- <div class="upload-inner">
|
|
|
|
|
- <el-icon :size="32" color="#6c8ff8">
|
|
|
|
|
- <UploadFilled />
|
|
|
|
|
- </el-icon>
|
|
|
|
|
- <p>点击或拖拽 .pem 至此处</p>
|
|
|
|
|
- <span>不超过 2MB</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-upload>
|
|
|
|
|
|
|
+ <el-form-item label="商户ID号码" prop="wechatMchld">
|
|
|
|
|
+ <el-input v-model="form.wechatMchld" placeholder="请输入商户ID号码" clearable />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<template v-else-if="form.accountType === 'alipay'">
|
|
<template v-else-if="form.accountType === 'alipay'">
|
|
|
- <el-form-item label="应用ID" prop="aliAppid">
|
|
|
|
|
- <el-input v-model="form.aliAppid" placeholder="请输入" clearable />
|
|
|
|
|
|
|
+ <el-form-item label="商户ID" prop="aliAppid">
|
|
|
|
|
+ <el-input v-model="form.aliAppid" placeholder="请输入商户ID" clearable />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="应用私钥" prop="aliPrivateId">
|
|
|
|
|
- <el-input v-model="form.aliPrivateId" type="textarea" :rows="4" placeholder="请输入应用私钥" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="应用公钥证书" prop="appPublicCertFile">
|
|
|
|
|
- <el-upload
|
|
|
|
|
- v-model:file-list="form.appPublicCertFile"
|
|
|
|
|
- class="cert-upload"
|
|
|
|
|
- drag
|
|
|
|
|
- :auto-upload="false"
|
|
|
|
|
- :limit="1"
|
|
|
|
|
- accept=".crt,.pem"
|
|
|
|
|
- :on-exceed="() => ElMessage.warning('最多上传1个文件')"
|
|
|
|
|
- >
|
|
|
|
|
- <div class="upload-inner">
|
|
|
|
|
- <el-icon :size="32" color="#6c8ff8">
|
|
|
|
|
- <UploadFilled />
|
|
|
|
|
- </el-icon>
|
|
|
|
|
- <p>应用公钥证书</p>
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-upload>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="支付宝公钥证书" prop="alipayPublicCertFile">
|
|
|
|
|
- <el-upload
|
|
|
|
|
- v-model:file-list="form.alipayPublicCertFile"
|
|
|
|
|
- class="cert-upload"
|
|
|
|
|
- drag
|
|
|
|
|
- :auto-upload="false"
|
|
|
|
|
- :limit="1"
|
|
|
|
|
- accept=".crt,.pem"
|
|
|
|
|
- :on-exceed="() => ElMessage.warning('最多上传1个文件')"
|
|
|
|
|
- >
|
|
|
|
|
- <div class="upload-inner">
|
|
|
|
|
- <el-icon :size="32" color="#6c8ff8">
|
|
|
|
|
- <UploadFilled />
|
|
|
|
|
- </el-icon>
|
|
|
|
|
- <p>支付宝公钥证书</p>
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-upload>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="支付宝根证书" prop="alipayRootCertFile">
|
|
|
|
|
- <el-upload
|
|
|
|
|
- v-model:file-list="form.alipayRootCertFile"
|
|
|
|
|
- class="cert-upload"
|
|
|
|
|
- drag
|
|
|
|
|
- :auto-upload="false"
|
|
|
|
|
- :limit="1"
|
|
|
|
|
- accept=".crt,.pem"
|
|
|
|
|
- :on-exceed="() => ElMessage.warning('最多上传1个文件')"
|
|
|
|
|
- >
|
|
|
|
|
- <div class="upload-inner">
|
|
|
|
|
- <el-icon :size="32" color="#6c8ff8">
|
|
|
|
|
- <UploadFilled />
|
|
|
|
|
- </el-icon>
|
|
|
|
|
- <p>支付宝根证书</p>
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-upload>
|
|
|
|
|
|
|
+ <el-form-item label="商户ID号码" prop="aliPrivateId">
|
|
|
|
|
+ <el-input v-model="form.aliPrivateId" placeholder="请输入商户ID号码" clearable />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -159,8 +58,7 @@
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
import { ref, reactive, onMounted, computed, watch } from "vue";
|
|
import { ref, reactive, onMounted, computed, watch } from "vue";
|
|
|
import { ElMessage } from "element-plus";
|
|
import { ElMessage } from "element-plus";
|
|
|
-import type { FormInstance, FormRules, UploadUserFile } from "element-plus";
|
|
|
|
|
-import { UploadFilled } from "@element-plus/icons-vue";
|
|
|
|
|
|
|
+import type { FormInstance, FormRules } from "element-plus";
|
|
|
import {
|
|
import {
|
|
|
getDict,
|
|
getDict,
|
|
|
getPaymentStoreUserId,
|
|
getPaymentStoreUserId,
|
|
@@ -205,35 +103,22 @@ const form = reactive({
|
|
|
accountType: "wechat",
|
|
accountType: "wechat",
|
|
|
wechatAppid: "",
|
|
wechatAppid: "",
|
|
|
wechatMchld: "",
|
|
wechatMchld: "",
|
|
|
- wechatApiCertSerialNo: "",
|
|
|
|
|
- wechatApiV3Key: "",
|
|
|
|
|
- wechatPayPublicKeyId: "" as string | null,
|
|
|
|
|
- wechatPrivateKeyFile: [] as UploadUserFile[],
|
|
|
|
|
- wechatPayPublicKeyFile: [] as UploadUserFile[],
|
|
|
|
|
aliAppid: "",
|
|
aliAppid: "",
|
|
|
aliPrivateId: "",
|
|
aliPrivateId: "",
|
|
|
- alipayRootCertFile: [] as UploadUserFile[],
|
|
|
|
|
- alipayPublicCertFile: [] as UploadUserFile[],
|
|
|
|
|
- appPublicCertFile: [] as UploadUserFile[],
|
|
|
|
|
bankName: "",
|
|
bankName: "",
|
|
|
bankAccountNo: ""
|
|
bankAccountNo: ""
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
const wechatRules: FormRules = {
|
|
const wechatRules: FormRules = {
|
|
|
accountType: [{ required: true, message: "请选择账号类型", trigger: "change" }],
|
|
accountType: [{ required: true, message: "请选择账号类型", trigger: "change" }],
|
|
|
- wechatAppid: [{ required: true, message: "请输入appid", trigger: "blur" }],
|
|
|
|
|
- wechatMchld: [{ required: true, message: "请输入mchId", trigger: "blur" }],
|
|
|
|
|
- wechatApiCertSerialNo: [{ required: true, message: "请输入API证书序列号", trigger: "blur" }],
|
|
|
|
|
- wechatApiV3Key: [{ required: true, message: "请输入APIv3 Key", trigger: "blur" }],
|
|
|
|
|
- wechatPayPublicKeyId: [{ required: true, message: "请输入支付公钥ID", trigger: "blur" }],
|
|
|
|
|
- wechatPrivateKeyFile: [{ required: true, type: "array", min: 1, message: "请上传私钥证书", trigger: "change" }],
|
|
|
|
|
- wechatPayPublicKeyFile: [{ required: true, type: "array", min: 1, message: "请上传公钥证书", trigger: "change" }]
|
|
|
|
|
|
|
+ wechatAppid: [{ required: true, message: "请输入商户ID", trigger: "blur" }],
|
|
|
|
|
+ wechatMchld: [{ required: true, message: "请输入商户ID号码", trigger: "blur" }]
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const alipayRules: FormRules = {
|
|
const alipayRules: FormRules = {
|
|
|
accountType: [{ required: true, message: "请选择账号类型", trigger: "change" }],
|
|
accountType: [{ required: true, message: "请选择账号类型", trigger: "change" }],
|
|
|
- aliAppid: [{ required: true, message: "请输入应用ID", trigger: "blur" }],
|
|
|
|
|
- aliPrivateId: [{ required: true, message: "请输入应用私钥", trigger: "blur" }]
|
|
|
|
|
|
|
+ aliAppid: [{ required: true, message: "请输入商户ID", trigger: "blur" }],
|
|
|
|
|
+ aliPrivateId: [{ required: true, message: "请输入商户ID号码", trigger: "blur" }]
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const bankRules: FormRules = {
|
|
const bankRules: FormRules = {
|
|
@@ -268,13 +153,7 @@ watch(
|
|
|
}
|
|
}
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
-const base64ToFile = (base64Str: string, fileName: string): File => {
|
|
|
|
|
- const bstr = atob(base64Str);
|
|
|
|
|
- const u8arr = new Uint8Array(bstr.length);
|
|
|
|
|
- for (let i = 0; i < bstr.length; i++) u8arr[i] = bstr.charCodeAt(i);
|
|
|
|
|
- return new File([u8arr], fileName, { type: "application/x-pem-file" });
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
|
|
+/** 从接口拉取收款配置,用于页面进入时初始化表单,以及「取消」时放弃本地修改并重新回填 */
|
|
|
const fetchPayAccountConfig = async () => {
|
|
const fetchPayAccountConfig = async () => {
|
|
|
const storeUserId = localGet("geeker-user")?.userInfo?.id;
|
|
const storeUserId = localGet("geeker-user")?.userInfo?.id;
|
|
|
if (!storeUserId) {
|
|
if (!storeUserId) {
|
|
@@ -289,61 +168,36 @@ const fetchPayAccountConfig = async () => {
|
|
|
|
|
|
|
|
form.wechatAppid = "";
|
|
form.wechatAppid = "";
|
|
|
form.wechatMchld = "";
|
|
form.wechatMchld = "";
|
|
|
- form.wechatApiCertSerialNo = "";
|
|
|
|
|
- form.wechatApiV3Key = "";
|
|
|
|
|
- form.wechatPayPublicKeyId = null;
|
|
|
|
|
- form.wechatPrivateKeyFile = [];
|
|
|
|
|
- form.wechatPayPublicKeyFile = [];
|
|
|
|
|
form.aliAppid = "";
|
|
form.aliAppid = "";
|
|
|
form.aliPrivateId = "";
|
|
form.aliPrivateId = "";
|
|
|
- form.appPublicCertFile = [];
|
|
|
|
|
- form.alipayPublicCertFile = [];
|
|
|
|
|
- form.alipayRootCertFile = [];
|
|
|
|
|
form.bankName = "";
|
|
form.bankName = "";
|
|
|
form.bankAccountNo = "";
|
|
form.bankAccountNo = "";
|
|
|
|
|
|
|
|
- if (data.wechatAppId) {
|
|
|
|
|
- form.accountType = "wechat";
|
|
|
|
|
- form.wechatAppid = data.wechatAppId ?? "";
|
|
|
|
|
- form.wechatMchld = data.wechatMchId ?? "";
|
|
|
|
|
- form.wechatApiCertSerialNo = data.merchantSerialNumber ?? "";
|
|
|
|
|
- form.wechatApiV3Key = data.apiV3Key ?? "";
|
|
|
|
|
- form.wechatPayPublicKeyId = data.wechatPayPublicKeyId ?? null;
|
|
|
|
|
- if (data.wechatPrivateKeyFile && data.wechatPrivateKeyName) {
|
|
|
|
|
- const file = base64ToFile(data.wechatPrivateKeyFile, data.wechatPrivateKeyName);
|
|
|
|
|
- form.wechatPrivateKeyFile = [{ name: file.name, raw: file, status: "success", uid: Date.now() } as UploadUserFile];
|
|
|
|
|
- }
|
|
|
|
|
- if (data.wechatPayPublicKeyFile && data.wechatPayPublicKeyFileName) {
|
|
|
|
|
- const f = base64ToFile(data.wechatPayPublicKeyFile, data.wechatPayPublicKeyFileName);
|
|
|
|
|
- form.wechatPayPublicKeyFile = [{ name: f.name, raw: f, status: "success", uid: Date.now() + 1 } as UploadUserFile];
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // 后端可能同时返回三类配置,须分别回填;若用 else if 只会填到第一项,切换支付宝/银行会没有初始值
|
|
|
|
|
+ if (data.storeWechatId || data.wechatAppId) {
|
|
|
|
|
+ form.wechatAppid = String(data.storeWechatId ?? data.wechatAppId ?? "");
|
|
|
|
|
+ form.wechatMchld = String(data.storeWechatName ?? data.wechatMchId ?? "");
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- if (data.appId) {
|
|
|
|
|
- form.aliAppid = data.appId ?? "";
|
|
|
|
|
- form.aliPrivateId = data.appSecretCert ?? "";
|
|
|
|
|
- if (data.appPublicCert && data.appPublicCertName) {
|
|
|
|
|
- const file = base64ToFile(data.appPublicCert, data.appPublicCertName);
|
|
|
|
|
- form.appPublicCertFile = [{ name: file.name, raw: file, status: "success", uid: Date.now() } as UploadUserFile];
|
|
|
|
|
- }
|
|
|
|
|
- if (data.alipayPublicCert && data.alipayPublicCertName) {
|
|
|
|
|
- const file = base64ToFile(data.alipayPublicCert, data.alipayPublicCertName);
|
|
|
|
|
- form.alipayPublicCertFile = [{ name: file.name, raw: file, status: "success", uid: Date.now() + 1 } as UploadUserFile];
|
|
|
|
|
- }
|
|
|
|
|
- if (data.alipayRootCert && data.alipayRootCertName) {
|
|
|
|
|
- const file = base64ToFile(data.alipayRootCert, data.alipayRootCertName);
|
|
|
|
|
- form.alipayRootCertFile = [{ name: file.name, raw: file, status: "success", uid: Date.now() + 2 } as UploadUserFile];
|
|
|
|
|
- }
|
|
|
|
|
- if (!data.wechatAppId) form.accountType = "alipay";
|
|
|
|
|
|
|
+ if (data.storeAliId || data.appId) {
|
|
|
|
|
+ form.aliAppid = String(data.storeAliId ?? data.appId ?? "");
|
|
|
|
|
+ form.aliPrivateId = String(data.storeAliName ?? data.appSecretCert ?? "");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const bankNo = data.bankAccountNo ?? data.bankCardNo ?? data.settlementAccount;
|
|
const bankNo = data.bankAccountNo ?? data.bankCardNo ?? data.settlementAccount;
|
|
|
const bankNm = data.bankName ?? data.openingBankName ?? data.openingBank;
|
|
const bankNm = data.bankName ?? data.openingBankName ?? data.openingBank;
|
|
|
- if (!data.wechatAppId && !data.appId && bankNo) {
|
|
|
|
|
- form.accountType = "bank";
|
|
|
|
|
|
|
+ if (bankNo) {
|
|
|
form.bankAccountNo = String(bankNo).replace(/\s/g, "");
|
|
form.bankAccountNo = String(bankNo).replace(/\s/g, "");
|
|
|
form.bankName = bankNm ? String(bankNm) : "";
|
|
form.bankName = bankNm ? String(bankNm) : "";
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // 单选「当前展示哪一类」:有数据时优先微信 > 支付宝 > 银行(与保存时三选一一致)
|
|
|
|
|
+ if (data.storeWechatId || data.wechatAppId) {
|
|
|
|
|
+ form.accountType = "wechat";
|
|
|
|
|
+ } else if (data.storeAliId || data.appId) {
|
|
|
|
|
+ form.accountType = "alipay";
|
|
|
|
|
+ } else if (bankNo) {
|
|
|
|
|
+ form.accountType = "bank";
|
|
|
|
|
+ }
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const submit = async () => {
|
|
const submit = async () => {
|
|
@@ -371,55 +225,22 @@ const submit = async () => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (form.accountType === "alipay") {
|
|
if (form.accountType === "alipay") {
|
|
|
- const appPublicCertFile = (form.appPublicCertFile as UploadUserFile[])[0]?.raw as File | undefined;
|
|
|
|
|
- const alipayPublicCertFile = (form.alipayPublicCertFile as UploadUserFile[])[0]?.raw as File | undefined;
|
|
|
|
|
- const alipayRootCertFile = (form.alipayRootCertFile as UploadUserFile[])[0]?.raw as File | undefined;
|
|
|
|
|
-
|
|
|
|
|
- if (!appPublicCertFile || !alipayPublicCertFile || !alipayRootCertFile) {
|
|
|
|
|
- ElMessage.warning("请上传应用公钥证书、支付宝公钥证书和支付宝根证书");
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- const res: any = await saveAlipayWithFiles(
|
|
|
|
|
- {
|
|
|
|
|
- storeUserId: String(storeUserId),
|
|
|
|
|
- appId: form.aliAppid.trim(),
|
|
|
|
|
- appSecretCert: form.aliPrivateId.trim()
|
|
|
|
|
- },
|
|
|
|
|
- appPublicCertFile,
|
|
|
|
|
- alipayPublicCertFile,
|
|
|
|
|
- alipayRootCertFile
|
|
|
|
|
- );
|
|
|
|
|
- if (res?.code === 200) ElMessage.success("保存成功");
|
|
|
|
|
|
|
+ const res: any = await saveAlipayWithFiles({
|
|
|
|
|
+ storeUserId,
|
|
|
|
|
+ storeAliId: form.aliAppid.trim(),
|
|
|
|
|
+ storeAliName: form.aliPrivateId.trim()
|
|
|
|
|
+ });
|
|
|
|
|
+ if (res?.code === 200 || res?.code === "200") ElMessage.success(res?.msg || "保存成功");
|
|
|
else ElMessage.error(res?.msg || "保存失败");
|
|
else ElMessage.error(res?.msg || "保存失败");
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- const privateKeyUpload = (form.wechatPrivateKeyFile as UploadUserFile[])[0];
|
|
|
|
|
- const publicKeyUpload = (form.wechatPayPublicKeyFile as UploadUserFile[])[0];
|
|
|
|
|
- const privateKeyFile = privateKeyUpload?.raw as File | undefined;
|
|
|
|
|
- const publicKeyFile = publicKeyUpload?.raw as File | undefined;
|
|
|
|
|
-
|
|
|
|
|
- if (!privateKeyFile || !publicKeyFile) {
|
|
|
|
|
- ElMessage.warning("请上传私钥证书和公钥证书");
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- const res: any = await saveWechatWithFiles(
|
|
|
|
|
- {
|
|
|
|
|
- storeUserId: String(storeUserId),
|
|
|
|
|
- apiV3Key: form.wechatApiV3Key || "",
|
|
|
|
|
- merchantSerialNumber: form.wechatApiCertSerialNo || "",
|
|
|
|
|
- wechatAppId: form.wechatAppid || "",
|
|
|
|
|
- wechatMchId: form.wechatMchld || "",
|
|
|
|
|
- wechatMiniAppId: "",
|
|
|
|
|
- wechatPayPublicKeyId: form.wechatPayPublicKeyId || "",
|
|
|
|
|
- accountType: "wechat"
|
|
|
|
|
- },
|
|
|
|
|
- privateKeyFile,
|
|
|
|
|
- publicKeyFile
|
|
|
|
|
- );
|
|
|
|
|
- if (res?.code === 200) ElMessage.success("保存成功");
|
|
|
|
|
|
|
+ const res: any = await saveWechatWithFiles({
|
|
|
|
|
+ storeUserId,
|
|
|
|
|
+ storeWechatId: form.wechatAppid.trim(),
|
|
|
|
|
+ storeWechatName: form.wechatMchld.trim()
|
|
|
|
|
+ });
|
|
|
|
|
+ if (res?.code === 200 || res?.code === "200") ElMessage.success(res?.msg || "保存成功");
|
|
|
else ElMessage.error(res?.msg || "保存失败");
|
|
else ElMessage.error(res?.msg || "保存失败");
|
|
|
} catch (e: any) {
|
|
} catch (e: any) {
|
|
|
ElMessage.error(e?.message || "保存失败");
|
|
ElMessage.error(e?.message || "保存失败");
|
|
@@ -462,18 +283,4 @@ onMounted(async () => {
|
|
|
line-height: 1.5;
|
|
line-height: 1.5;
|
|
|
color: #909399;
|
|
color: #909399;
|
|
|
}
|
|
}
|
|
|
-.cert-upload :deep(.el-upload-dragger) {
|
|
|
|
|
- padding: 20px;
|
|
|
|
|
-}
|
|
|
|
|
-.upload-inner {
|
|
|
|
|
- color: var(--el-text-color-secondary);
|
|
|
|
|
- text-align: center;
|
|
|
|
|
- p {
|
|
|
|
|
- margin: 8px 0 4px;
|
|
|
|
|
- font-size: 14px;
|
|
|
|
|
- }
|
|
|
|
|
- span {
|
|
|
|
|
- font-size: 12px;
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
</style>
|
|
</style>
|