订阅事件选项修改为接口获取

This commit is contained in:
xiaogang 2024-08-27 11:36:56 +08:00
parent 8275a00958
commit da3498ab70
2 changed files with 19 additions and 5 deletions

View File

@ -959,6 +959,11 @@ export const deleteOrderDownload = (data) => {
return req("get", baseurl + `/order/export/delete`, data) return req("get", baseurl + `/order/export/delete`, data)
} }
// 查询营销事件
export const querySubscribe = (data) => {
return req("get", baseurl + `/plan/marketEvent`, data)
}
// //订单下载列表-数据下载 // //订单下载列表-数据下载
// export const exportDownload = (md5) => { // export const exportDownload = (md5) => {
// return derive("get", download_url + `/export/excel/marketOrder/download/${md5}`) // return derive("get", download_url + `/export/excel/marketOrder/download/${md5}`)

View File

@ -1,4 +1,4 @@
import { generateRsaKey, setResellMerchant, getApiMode } from "@/assets/api" import { generateRsaKey, setResellMerchant, getApiMode,querySubscribe } from "@/assets/api"
import FormItem from "@/components/form-item/main" import FormItem from "@/components/form-item/main"
import Form from "@/components/form/main" import Form from "@/components/form/main"
import Ipt from "@/components/input/main" import Ipt from "@/components/input/main"
@ -21,9 +21,10 @@ export default function Merchant() {
merchant_public_key: "", // * merchant_public_key: "", // *
secret_key: "", //api mode 1 2* secret_key: "", //api mode 1 2*
notify_url: "", // * notify_url: "", // *
subscribe_event: [], //
status: 1, // 1 2 * status: 1, // 1 2 *
api_mode: 2 // 1-RSA+ 2- * api_mode: 2, // 1-RSA+ 2- *
subscribe_event: [], //
marketEvent:[]
}) })
const fromRef = useRef() const fromRef = useRef()
const rules = { const rules = {
@ -51,6 +52,9 @@ export default function Merchant() {
getApiMode().then(({ data }) => { getApiMode().then(({ data }) => {
setState({ apiMode: data, reseller_id: id, ...merchant }) setState({ apiMode: data, reseller_id: id, ...merchant })
}) })
querySubscribe().then(({data}) => {
setState({ marketEvent:data })
})
}, []) }, [])
/* 获取密钥 */ /* 获取密钥 */
@ -258,8 +262,13 @@ export default function Merchant() {
}) })
} }
> >
<Checkbox value={"KEY.USED"}>key码核销通知</Checkbox> {
<Checkbox value={"VOUCHER.USED"}>立减金核销通知</Checkbox> state.marketEvent?.map((item) => (
<Checkbox value={item.event}>{item.name}</Checkbox>
))
}
{/* <Checkbox value={"KEY.USED"}>key</Checkbox>
<Checkbox value={"VOUCHER.USED"}>立减金核销通知</Checkbox> */}
</Checkbox.Group> </Checkbox.Group>
</FormItem> </FormItem>
</Form> </Form>