import { fetch } from '../../../utils/util'; export type ResponseType = Promise>; export const URL = '/api/menu/add'; /** * @desc 添加菜单 */ export function request( bodyParams: defs.Menu, options?: WechatMiniprogram.RequestOption, ): ResponseType { let url = '/api/menu/add'; const fetchOption = Object.assign( { url: url, method: 'POST', headers: { 'Content-Type': 'application/json', }, data: bodyParams, }, options, ); return fetch(fetchOption); }