feat: 商户密钥受对接类型影响

This commit is contained in:
wangsongsole 2024-02-06 17:11:43 +08:00
parent 43bc911854
commit 8822296656
2 changed files with 9 additions and 7 deletions

View File

@ -975,8 +975,8 @@ export const setResellMerchant = (id, data) => {
} }
/* 获取开发信息密钥 */ /* 获取开发信息密钥 */
export const generateRsaKey = () => { export const generateRsaKey = (data) => {
return req("get", baseurl + "/reseller/merchant/generateRsaKey") return req("get", baseurl + "/reseller/merchant/generateRsaKey", data)
} }
/* 设置分销商通知地址 */ /* 设置分销商通知地址 */

View File

@ -4,7 +4,7 @@ import Form from "@/components/form/main"
import Ipt from "@/components/input/main" import Ipt from "@/components/input/main"
import { omit } from "lodash-es" import { omit } from "lodash-es"
import { useEffect, useRef, useState } from "react" import { useEffect, useRef, useState } from "react"
import { Button, Card, Checkbox, Input, Notify, Radio, RadioGroup } from "zent" import { Button, Card, Checkbox, Input, Notify, Radio, RadioGroup, Pop } from "zent"
import "./index.less" import "./index.less"
export default function Merchant() { export default function Merchant() {
const [state, setState] = useState({ const [state, setState] = useState({
@ -50,7 +50,7 @@ export default function Merchant() {
/* 获取密钥 */ /* 获取密钥 */
function getKey() { function getKey() {
generateRsaKey().then(({ data }) => { generateRsaKey({ api_mode: state.api_mode }).then(({ data }) => {
setState({ ...state, ...data }) setState({ ...state, ...data })
}) })
} }
@ -186,9 +186,11 @@ export default function Merchant() {
/> />
</FormItem> </FormItem>
<FormItem labelname="" required=""> <FormItem labelname="" required="">
<Button type="primary" onClick={getKey}> <Pop trigger="hover" content="密钥受 “对接类型” 影响">
重新获取密钥 <Button type="primary" onClick={getKey}>
</Button> 重新获取密钥
</Button>
</Pop>
</FormItem> </FormItem>
<FormItem labelname="商户公钥" prop="merchant_public_key"> <FormItem labelname="商户公钥" prop="merchant_public_key">
<Input <Input