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