🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# 1\. 试衣镜接口 ## 1.1. ProductCtl 程序地址 ./shop/controllers/ProductCtl.php @author guan[pm@shopcncc.com](mailto:xinze@live.cn) ### 1.1.1. 列表数据, 不论用户是否登录,收藏等等数据不做处理。 #### 1.1.1.1. 请求URL [https://www.kwmall888.com/index.php?ctl=Product&met=lists&typ=json](https://www.kwmall888.com/index.php?ctl=Product&met=lists&typ=json) #### 1.1.1.2. 请求参数 | 键值 | 类型 | 描述 | | --- | --- | --- | | store\_is\_selfsupport | int | 1:自营 | | page | int | 当前页码 | | rows | int | 每页记录条数 | #### 1.1.1.3. 返回数据 ~~~json { "cmd_id": -100, "status": 200, "msg": "success", "code": 0, "data": { "page": 1, "total": 5, "records": 122, "items": [{ "product_id": 16, "product_name": "Littleswan\/小天鹅 10公斤洗烘干一体水魔方全自动家用洗衣机TD100-1616WMIDG", "product_tips": "WIFI智控 节能省电 24h预约洗衣", "store_id": 1001, "store_name": "官方旗舰店", "product_market_price": 1099, "product_unit_price": 1099, "product_cost_price": 0, "product_image": "https:\/\/test.shopsuite.cn\/image.php\/shop\/data\/upload\/media\/store\/1001\/image\/20180426\/1524732743913874.jpg", "product_video": "", "transport_type_id": 1, "product_seo_url": "", "layout_route_id": 0, "product_verify_id": 3001, "product_state_id": 1001, "product_sale_time": "2018-12-25 10:49:23", "unit_id": 1009, "product_add_time": 0, "product_unit_points": 0, "id": 16, "is_virtual": false, "kind_id": 1201, "product_sale_num": 57, "store_is_selfsupport": 1, "activity_type_id": 1103, "activity_type_name": "限时折扣", "item_color": [{ "item_id": 32, "item_name": [], "product_id": 16, "color_id": 0, "item_is_default": 1, "item_number": "rnLCaT", "item_barcode": "", "item_cost_price": 0, "item_platform_price": 0, "item_unit_price": 1099, "item_market_price": 0, "item_unit_points": 0, "item_quantity": 995, "item_quantity_frozen": 0, "item_warn_quantity": 0, "item_spec": [], "item_enable": 1001, "item_is_change": 0, "item_weight": 0, "item_fx_commission": 0, "item_title": "", "item_freetime": 0, "id": 32, "item_sale_price": 1099, "price": 1099, "url": "https:\/\/test.shopsuite.cn\/i\/32", "color_image": "https:\/\/test.shopsuite.cn\/image.php\/shop\/data\/upload\/media\/store\/1001\/image\/20180426\/1524732743913874.jpg" }], "item_id": 32, "item_quantity": 995, "item_unit_price": 1099, "item_market_price": 0, "product_quantity": 995, "item_consume_jb": 109.9 }] } } ~~~ ### 1.1.2. 通过商品SKU编号获取对应正反面图片 #### 1.1.2.1. 请求URL [https://www.kwmall888.com/index.php?ctl=Product&met=get2dBg&typ=json](https://www.kwmall888.com/index.php?ctl=Product&met=get2dBg&typ=json) #### 1.1.2.2. 请求参数 | 键值 | 类型 | 描述 | | --- | --- | --- | | id | int | 商品编号 | #### 1.1.2.3. 返回数据 ~~~json { "cmd_id": -100, "status": 200, "msg": "", "code": 0, "data": { "front_img": "正面图片地址", "back_img": "反面图片地址" } } ~~~ #### 1.1.2.4. 接口返回结果描述 | 键值 | 类型 | 描述 | | --- | --- | --- | | status | int | 状态 200:表示正确 250表示错误 | | msg | string | 返回文字说明 | | data | json | 返回数据 | | data.front\_img | url | 正面图片地址 | | data.back\_img | url | 反面图片地址 | ### 1.1.3. 获得二维码 - 打开商品,用户下单购买 #### 1.1.3.1. 请求网址 [https://www.kwmall888.com/index.php?ctl=Product&met=getItemQrcode&typ=json](https://www.kwmall888.com/index.php?ctl=Product&met=getItemQrcode&typ=json) #### 1.1.3.2. 请求参数 | 键值 | 类型 | 描述 | | --- | --- | --- | | id | int | 商品编号 | | poster\_type | int | 2:小程序 | #### 1.1.3.3. 返回数据 ~~~json { "cmd_id": -100, "status": 200, "msg": "", "code": 0, "data": { "qrcode": "二维码URL" } } ~~~ ### 1.1.4. 试衣镜效果通过扫码分享二维码 #### 1.1.4.1. 请求网址 [https://www.kwmall888.com/index.php?ctl=Product&met=getShareQrcode&typ=json](https://www.kwmall888.com/index.php?ctl=Product&met=getShareQrcode&typ=json) #### 1.1.4.2. 请求参数 | 键值 | 类型 | 描述 | | --- | --- | --- | | id | int | 商品编号 | | url | string | 试衣效果图网址 | #### 1.1.4.3. 返回数据 ~~~json { "cmd_id": -100, "status": 200, "msg": "", "code": 0, "data": { "qrcode": "二维码URL" } } ~~~