问答
# 如何更改Assistant的模板?
可以参考一下格式
import request from '$axiosPath';
#foreach($method in $apiJsInfo.getApiMethodList())
export function $method.getMethodName()(#foreach($param in $method.getMethodParam())$param#if($velocityCount!= $method.getMethodParam().size()),#end #end) {
return request({
url: '$method.getMethodUrl()/'#if($method.getMethodType() == 'get'&&$method.getIsRestFul()==true)#foreach($param in $method.getMethodParam())+ $param +'/'#end#end,
method: $method.getMethodType(),
#if($method.getMethodType() == 'get'&&$method.getIsRestFul()==false)
params: {
#foreach($param in $method.getMethodParam())
$param:$param,
#end
}
#elseif($method.getMethodType() == 'post')
data: {
#foreach($param in $method.getMethodParam())
$param:$param,
#end
}
#end
});
}
#end
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
帮助我们改善此页面! (opens new window)
上次更新: 2024/06/22, 16:36:11