Module: 药品列表^2023/8/30

Since:
  • 2023/8/30
Author:
  • zz

Methods

(inner) get /product_list(productIdopt, doctorIdopt, findopt, sortNameopt, orderopt, timestamp, sign, pageSizeopt, pageopt, languageopt)

Parameters:
Name Type Attributes Default Description
productId String(24) <optional>
药品ID
doctorId String(24) <optional>
医生ID
find String(500) <optional>
查询条件,json文本,示例:{"name":{"$regex":"王"}}
sortName String(20) <optional>
createdAt 排序列名,默认createdAt
order Number <optional>
-1 排序参数,默认-1,1 为升序排列,-1 为降序排列
timestamp String(10) 时间戳,值为秒值,长度10位,时间戳有效期:±10分钟
sign String(64) 签名
pageSize Number <optional>
20 分页行数,最大100 2023/8/30
page Number <optional>
1 页码
language String(50) <optional>
语种,不传或无值将维持默认语种(简体中文)不会转换简繁体文字内容,目前支持:simplifiedChinese:简体中文,traditionalChinese:繁体中文
Properties:
Name Type Description
total Number 总行数
data Array.<Object> 当前页数据
Properties
Name Type Attributes Default Description
_id String(24) 药品ID
title String(50) 药品名称
doctorId String(24) <optional>
医生ID
price Number <optional>
0 单价,元
images Array.<Object> <optional>
药品图片
Properties
Name Type Description
name String(100) 图片文件名
url String(500) 图片地址
size Number 图片大小
width Number 图片宽度
height Number 图片高度
isdeleted Boolean <optional>
false 删除标记,true为删除状态
createdAt Date 创建日期
updatedAt Date 更新日期
Examples
请求示例:/product_list?pageSize=5&page=1&sign=1C2B09A2C9E20BB3948833AB7D77B4CA803D05906E8CC600014750275E2909C2&timestamp=1570428513
返回示例:
  {
    "total": 1,
    "data": [
      {
        "_id":"5e1b32e6a8bead28981cfefe"
        "title": "汤成倍健鱼油牛磺酸锌软胶囊",
        "doctorId": "5e0445db99791d7398ccb1ba",
        "price": 158,
        "images": [
          {
            "name": "9b97a83390ed074d.jpg",
            "url": "https://img13.360buyimg.com/n1/jfs/t1/203211/34/24344/226543/62ad9f6aE0db0ebaa/9b97a83390ed074d.jpg",
            "size": 34728,
            "width": 500,
            "height": 600
          }
        ],
        "createdAt":"2022/06/14 14:11:29",
        "updatedAt":"2022/06/14 14:11:29"
      }
    ]
  }