import { fetch } from '../../../utils/util'; export class Params { /** param */ param?: string; } export type ResponseType = Promise; export const URL = '/test/user/detail2'; /** * @desc get方法传参,类接收,requestparam注解 */ export function request( params: Params, options?: WechatMiniprogram.RequestOption, ): ResponseType { let url = '/test/user/detail2'; const fetchOption = Object.assign( { url: url, method: 'GET', headers: { 'Content-Type': 'application/json', }, params: params, }, options, ); return fetch(fetchOption); }