Last active
February 5, 2020 05:44
-
-
Save paulyung541/30f8804067f6f5c5b72e4812e066cf8f to your computer and use it in GitHub Desktop.
医联: 云药房; 经纪人ME小程序; 2019-02-05
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 根据类目获取 药品列表 | |
import ( | |
"git.medlinker.com/service-sdk/med-sdk-go/med-ih-medication/spu-pack" | |
spuSrv "med-patient-medication/app/api_http/medication/spu_pack" | |
) | |
// fcid 是类目id(path) params(query) 只用传 start 和 limit | |
result, err := spuSrv.Service{}.PaginateByFrontCategory(api_http.ParserMedContext(ctx), 0, fcid, *params) | |
// 分页数据转换为前端可用的数据 | |
func (r Response) PaginateConvert(target, origin interface{}, err error) {} | |
// 使用上面这个函数,返回下面这种json | |
// { | |
// "errcode": 0, | |
// "errmsg": "success", | |
// "data": { | |
// "more": true, | |
// "list": [ | |
// {}, | |
// {} | |
// ] | |
// } | |
// } | |
// | |
// 传入的结构体要是下面这样 | |
type Model struct { | |
HasMore bool | |
Data []*XXX | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment