You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
639 B
34 lines
639 B
|
4 years ago
|
import { fetch } from '../../../utils/util';
|
||
|
|
|
||
|
|
export class Params {
|
||
|
|
/** param */
|
||
|
|
param?: string;
|
||
|
|
}
|
||
|
|
|
||
|
|
export type ResponseType = Promise<defs.UserInfoVO>;
|
||
|
|
|
||
|
|
export const URL = '/test/user/detail22';
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @desc post方法传参,类接收,requestparam注解
|
||
|
|
*/
|
||
|
|
export function request(
|
||
|
|
params: Params,
|
||
|
|
options?: WechatMiniprogram.RequestOption,
|
||
|
|
): ResponseType {
|
||
|
|
let url = '/test/user/detail22';
|
||
|
|
|
||
|
|
const fetchOption = Object.assign(
|
||
|
|
{
|
||
|
|
url: url,
|
||
|
|
method: 'POST',
|
||
|
|
headers: {
|
||
|
|
'Content-Type': 'application/json',
|
||
|
|
},
|
||
|
|
params: params,
|
||
|
|
},
|
||
|
|
options,
|
||
|
|
);
|
||
|
|
return fetch(fetchOption);
|
||
|
|
}
|