Imitating the background API of Weitong mall

Keywords: Mobile SDK Attribute MySQL

Imitating the background API of Weitong mall

1. introduction

Original item: https://gitee.com/fuyang_lipengjun/platform
This project: https://gitee.com/zouchengxin/nide-shop-nest
Because I prefer MVC mode, I choose nestjs to develop api interface.
nestjs development document: https://docs.nestjs.cn/7/firststeps
Main modules used:



  • @nestjs/passport: authentication
  • @nestjs/typeorm: TypeORM is the most mature object relational mapper (ORM) in TypeScript
  • Compression: compression
  • helmet: Security (CORS)
  • @nestjs/swagger: the open API (swagger) specification is a powerful definition format for describing restful APIs
  • @nestjsx/CRUD: help you easily create CRUD controllers and services
  • moment: time plug-in
  • alipay-sdk:Alipay SDK provides the most comprehensive and complete support for all the capabilities of Alipay's open platform.
  • dotenv: Configuration
  • nodemailer: send mailbox
  • mysql: connect to mysql database

2. Interface documents

Swagger UI: http://39.106.207.193:3000/api/

3. interface

3.1. landing

{
  "username": "test",
  "password": "test"
}
  • Response:
{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InRlc3QiLCJ1c2VyX2lkIjo2NiwiZW1haWxfc3RhdHVzIjowLCJpYXQiOjE1ODY4NzEwMzgsImV4cCI6MTU4Njg3ODIzOH0.vwlwGV2gdJiBo7RVqv-xwKs5STcjdnOKgqtlXjgqWt8",
  "expires_time": "2h"
}

3.2. registration

{
  "username": "test",
  "nickname": "test",
  "mobile": "17777777777",
  "password": "test",
  "gender": 0,
  "birthday": "1999-09-09"
}
  • Response:
{
  "username": "test",
  "nickname": "test",
  "mobile": "17777777777",
  "password": "098f6bcd4621d373cade4e832627b4f6",
  "birthday": "1999-09-09",
  "gender": 0,
  "register_ip": "127.0.0.1",
  "id": 66,
  "register_time": "2020-04-14T07:13:48.000Z",
  "last_login_time": null,
  "email_token_exptime": null,
  "email_status": 0
}

3.3. User information

{
  "id": 66,
  "username": "test",
  "nickname": "test",
  "avatar": "",
  "mobile": "17777777777",
  "gender": 0,
  "birthday": "1999-09-09",
  "user_level_id": null,
  "email": null,
  "email_status": 0
}

3.4. Email activation

{
  "code": 200,
  "msg": "Mailbox sent",
  "activeUrl": "http://0.0.0.0:3000/api/email/verify?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjMxLCJ1c2VyRW1haWwiOiIxNzQxNzUwNTkxQHFxLmNvbSIsImlhdCI6MTU4Njg1MTEyOCwiZXhwIjoxNTg2ODU4MzI4fQ.pobyhlP4mlGx0uQ-5eF44l7P04a-UV45B_YBpqQBlZ0"
}

3.5. Email verification

{
	code:200,
	msg:"1741750591@qq.com Mailbox activation succeeded"
}

3.6. Access to advertising

{
  "data": [
    {
      "id": 4,
      "name": "Business Edition",
      "link": "",
      "image_url": "https://platform-wxmall.oss-cn-beijing.aliyuncs.com/platform-plus-mall/banner/38a0b23950b79611fb565bae14351a11.jpg",
      "content": "Business Edition",
      "end_time": "2020-01-30T04:49:25.000Z",
      "adPosition": {
        "id": 1,
        "name": "Mobile home page rotation advertising",
        "width": 750,
        "height": 200
      }
    },
    {
      "id": 5,
      "name": "Double Eleven",
      "link": "",
      "image_url": "https://platform-wxmall.oss-cn-beijing.aliyuncs.com/platform-plus-mall/banner/aa860e44fbd468a7804c1a84796c4827.jpg",
      "content": "",
      "end_time": "2020-01-30T05:49:50.000Z",
      "adPosition": {
        "id": 1,
        "name": "Mobile home page rotation advertising",
        "width": 750,
        "height": 200
      }
    },
    {
      "id": 6,
      "name": "New products of confusion",
      "link": "",
      "image_url": "https://platform-wxmall.oss-cn-beijing.aliyuncs.com/platform-plus-mall/banner/f02a4f8d5bbaf7f32e131c1f08ff21ae.jpg",
      "content": "",
      "end_time": "2020-01-30T06:49:59.000Z",
      "adPosition": {
        "id": 1,
        "name": "Mobile home page rotation advertising",
        "width": 750,
        "height": 200
      }
    },
    {
      "id": 7,
      "name": "family life",
      "link": "",
      "image_url": "https://platform-wxmall.oss-cn-beijing.aliyuncs.com/platform-plus-mall/banner/79b2dbf762217e6e532f335bda4c85b3.jpg",
      "content": "",
      "end_time": "2020-01-30T07:50:02.000Z",
      "adPosition": {
        "id": 1,
        "name": "Rotation advertisement of mobile terminal home page",
        "width": 750,
        "height": 200
      }
    }
  ],
  "count": 4,
  "total": 11,
  "page": 1,
  "pageCount": 3
}

3.7. Obtaining announcement

{
  "data": [
    {
      "id": 1,
      "title": ". . . . . . ",
      "content": ". . . . . . ",
      "add_time": "1504933578"
    },
    {
      "id": 2,
      "title": ". . . . . . ",
      "content": ". . . . . . ",
      "add_time": "1504933999"
    }
  ],
  "count": 2,
  "total": 2,
  "page": 1,
  "pageCount": 1
}

3.8. Access to manufacturer

{
  "data": [
    {
      "id": 1026000,
      "name": "CK Manufacturer",
      "list_pic_url": "http://yanxuan.nosdn.127.net/658f09b7ec522d31742b47b914d64338.png",
      "simple_desc": "Strict selection and search Calvin Klein The manufacturer of the brand,\n Go deep into the world's No.1 production place of ties, and attach equal importance to design and quality,\n We are committed to bringing high-quality and elegant clothing products to consumers.",
      "pic_url": "http://yanxuan.nosdn.127.net/fb139c9f11a10deb41beeb42aaad488e.png",
      "is_new": 1,
      "floor_price": "39.00"
    },
    {
      "id": 1001000,
      "name": "MUJI Manufacturer",
      "list_pic_url": "http://yanxuan.nosdn.127.net/1541445967645114dd75f6b0edc4762d.png",
      "simple_desc": "Selected by Yan Xuan MUJI Manufacturers and production materials,\n With the price of almost zero profit, excluding the brand premium,\n Let users enjoy the quality life of the original brand.",
      "pic_url": "http://yanxuan.nosdn.127.net/4ea3f1e60dd77c45c218e503d721a1ed.jpg",
      "is_new": 1,
      "floor_price": "12.90"
    },
    {
      "id": 1001038,
      "name": "Coach Manufacturer",
      "list_pic_url": "http://yanxuan.nosdn.127.net/1b1cc16135fd8467d40983f75f644127.png",
      "simple_desc": "Strictly selected as the production of high-quality high-value leather accessories,\n from Coach,MK And other brand manufacturers,\n Strictly selected by the 360 degree whole process supervision, to bring you high-quality leather.",
      "pic_url": "http://yanxuan.nosdn.127.net/c933a662bb79b2a47280363e35ab994b.png",
      "is_new": 1,
      "floor_price": "49.00"
    },
    {
      "id": 1028003,
      "name": "Burberry Manufacturer",
      "list_pic_url": "http://yanxuan.nosdn.127.net/07af01e281c7e0b912d162d611e22c32.jpg",
      "simple_desc": "To create a fashionable and comfortable children's wear series,\n Strict selection Burberry Manufacturer, optimized color\n The British style is integrated into the classic plaid pattern, which can be used in all kinds of elegant styles.",
      "pic_url": "http://yanxuan.nosdn.127.net/1a874a6b8cf8c17ef7420b2449179eae.jpg",
      "is_new": 0,
      "floor_price": "99.00"
    },
    {
      "id": 1001037,
      "name": "New beauty manufacturer",
      "list_pic_url": "http://yanxuan.nosdn.127.net/80dce660938931956ee9a3a2b111bd37.jpg",
      "simple_desc": "It is strictly selected as a bag with both quality and beauty,\n Choose new beauty CK,Ricardo And so on,\n With more than 20 domestic advanced assembly lines, our strength guarantees the quality.",
      "pic_url": "http://yanxuan.nosdn.127.net/af5719e20bdbd214a9ce7d961e9031c5.png",
      "is_new": 0,
      "floor_price": "59.00"
    }
  ],
  "count": 5,
  "total": 49,
  "page": 1,
  "pageCount": 10
}

3.9. Get commodity list

{
  "data": [
    {
      "id": 1134032,
      "goods_brief": "The care of slow rebound sponge makes it more attractive.",
      "name": "Funny pastel series memory cotton cushion",
      "market_price": "53.90",
      "retail_price": "49.00"
    },
    {
      "id": 1134030,
      "goods_brief": "Slow rebound sponge, fashionable design.",
      "name": "Simple intellectual memory cotton cushion",
      "market_price": "50.60",
      "retail_price": "46.00"
    },
    {
      "id": 1155015,
      "goods_brief": "Delicate and soft, soft at the entrance",
      "name": "Mung bean cake 80g (4 in)",
      "market_price": "14.19",
      "retail_price": "12.90"
    },
    {
      "id": 1152161,
      "goods_brief": "3 Breathability, fresh and smooth",
      "name": "Four piece bamboo silk and hemp printing set",
      "market_price": "504.90",
      "retail_price": "459.00"
    },
    {
      "id": 1166008,
      "goods_brief": "Diamond coating, non stick pot set",
      "name": "Carat Diamond non stick kitchenware combination",
      "market_price": "504.90",
      "retail_price": "459.00"
    }
  ],
  "count": 5,
  "total": 11,
  "page": 1,
  "pageCount": 3
}

3.10. Obtaining product details

{
  "data": [
    {
      "id": 1181000,
      "sort_order": 1,
      "goods_number": 100,
      "goods_sn": "1181000",
      "goods_brief": "Comfort is the best gift",
      "name": "Mother's Day gift-Comfortable sleeping combination",
      "goods_desc": "<p><img src=\"http://yanxuan.nosdn.127.net/3ddfe10db43f7df33ba82ae7570ada80.jpg\" style=\"\" class=\"fr-fin\"></p>......",
      "goods_unit": "",
      "primary_pic_url": "https://mp123.oss-cn-shenzhen.aliyuncs.com/upload/20170908/092741972ad4b4.jpg",
      "list_pic_url": "http://yanxuan.nosdn.127.net/1f67b1970ee20fd572b7202da0ff705d.png",
      "promotion_desc": "Limited time purchase",
      "market_price": "2857.80",
      "retail_price": "2598.00",
      "sell_volume": 1533,
      "primary_product_id": 1194000,
      "brand": {
        "id": 1001020,
        "name": "Ralph Lauren Manufacturer",
        "list_pic_url": "http://yanxuan.nosdn.127.net/9df78eb751eae2546bd3ee7e61c9b854.png",
        "simple_desc": "We and Ralph Lauren Home Our manufacturers have successfully contacted each other, mastered the advanced production equipment, and passed on the brand technology and process. You who pursue the quality of life are worth having.",
        "pic_url": "http://yanxuan.nosdn.127.net/089e4066f0c2bc6b062d17c6292735dc.png",
        "floor_price": "29.00"
      },
      "goodsAttribute": [
        {
          "id": 870,
          "value": "Combination 1: AB Face independent spring mattress imported latex 150*200cm*1+Washable, antibacterial and mite proof silk down pillow*2. \n Combination two: AB Surface independent spring mattress imported latex 180*200cm*1+Washable, antibacterial and mite proof silk down pillow*2",
          "attribute": {
            "id": 16,
            "name": "Specifications"
          }
        },
        {
          "id": 871,
          "value": "Time: 0:00, May 8-5 24:00 on the 14th.\n Please purchase within the above time period. You can't enjoy the package discount for the rest of the time.",
          "attribute": null
        }
      ],
      "goodsSpecification": [
        {
          "id": 1,
          "value": "1.5m Mattress*1+Pillow*2",
          "pic_url": "",
          "specification": {
            "id": 2,
            "name": "Specifications"
          }
        },
        {
          "id": 2,
          "value": "1.8m Mattress*1+Pillow*2",
          "pic_url": "",
          "specification": {
            "id": 2,
            "name": "Specifications"
          }
        },
        {
          "id": 3,
          "value": "Shallow apricot powder",
          "pic_url": "http://yanxuan.nosdn.127.net/10022c73fa7aa75c2c0d736e96cc56d5.png?quality=90&thumbnail=200x200&imageView",
          "specification": {
            "id": 1,
            "name": "colour"
          }
        },
        {
          "id": 4,
          "value": "Agate red",
          "pic_url": "http://yanxuan.nosdn.127.net/29442127f431a1a1801c195905319427.png?quality=90&thumbnail=200x200&imageView",
          "specification": {
            "id": 1,
            "name": "colour"
          }
        },
        {
          "id": 5,
          "value": "Smoke white ash",
          "pic_url": "http://yanxuan.nosdn.127.net/36f64a7161b67e7fb8ea45be32ecfa25.png?quality=90&thumbnail=200x200&imageView",
          "specification": {
            "id": 1,
            "name": "colour"
          }
        }
      ]
    }
  ],
  "count": 1,
  "total": 1,
  "page": 1,
  "pageCount": 1
}

3.11. Access to subject information

{
  "data": [
    {
      "id": 314,
      "title": "Care for every footprint of his growth",
      "content": "<p><img src=\"//yanxuan.nosdn.127.net/75c55a13fde5eb2bc2dd6813b4c565cc.jpg\" class=\"fr-fin\">......</p>",
      "avatar": "https://yanxuan.nosdn.127.net/14943186689221563.png",
      "item_pic_url": "https://yanxuan.nosdn.127.net/14943267735961674.jpg",
      "subtitle": "Professional sports brands in the same factory, two caterpillar shoes for free",
      "price_info": "0.00",
      "read_count": "6.4k",
      "scene_pic_url": "https://yanxuan.nosdn.127.net/14943267735961674.jpg"
    },
    {
      "id": 313,
      "title": "Solve the gift giving problem of five festivals at a time",
      "content": "<img src=\"//yanxuan.nosdn.127.net/75c55a13fde5eb2bc2dd6813b4c565cc.jpg\">\n    ......",
      "avatar": "https://yanxuan.nosdn.127.net/14942967243991290.png",
      "item_pic_url": "https://yanxuan.nosdn.127.net/14942996754171334.jpg",
      "subtitle": "These are the list of gifts they want",
      "price_info": "59.90",
      "read_count": "7.8k",
      "scene_pic_url": "https://yanxuan.nosdn.127.net/14942996754171334.jpg"
    },
    {
      "id": 300,
      "title": "Pure natural soap of seckill chemical detergent",
      "content": "<img src=\"//yanxuan.nosdn.127.net/75c55a13fde5eb2bc2dd6813b4c565cc.jpg\">\n   ......",
      "avatar": "https://yanxuan.nosdn.127.net/14939843011001088.png",
      "item_pic_url": "https://yanxuan.nosdn.127.net/14939843143621089.jpg",
      "subtitle": "Some time ago, a friend complained to me. When I lived with my mother-in-law, I found that there were too many disagreements in my life philosophy. Nothing else, just washing...",
      "price_info": "0.00",
      "read_count": "15.3k",
      "scene_pic_url": "https://yanxuan.nosdn.127.net/14939843143621089.jpg"
    },
    {
      "id": 299,
      "title": "People who have bought it say it is a travel artifact",
      "content": "<img src=\"//yanxuan.nosdn.127.net/75c55a13fde5eb2bc2dd6813b4c565cc.jpg\">\n   ......",
      "avatar": "https://yanxuan.nosdn.127.net/14938873720850678.png",
      "item_pic_url": "https://yanxuan.nosdn.127.net/14938873919030679.jpg",
      "subtitle": "Many people have experienced the trouble of inconvenient washing and airing their underwear during the journey, especially when they live in the same room with their travelling companions...",
      "price_info": "0.00",
      "read_count": "28.7k",
      "scene_pic_url": "https://yanxuan.nosdn.127.net/14938873919030679.jpg"
    },
    {
      "id": 295,
      "title": "The new life they met in Yan Xuan",
      "content": "<img src=\"//yanxuan.nosdn.127.net/75c55a13fde5eb2bc2dd6813b4c565cc.jpg\">\n   ......",
      "avatar": "https://yanxuan.nosdn.127.net/14937987677390284.png",
      "item_pic_url": "https://yanxuan.nosdn.127.net/14938092956370380.jpg",
      "subtitle": "Among various products, the maximum direct reduction is 400 yuan",
      "price_info": "35.80",
      "read_count": "36.6k",
      "scene_pic_url": "https://yanxuan.nosdn.127.net/14938092956370380.jpg"
    }
  ],
  "count": 5,
  "total": 21,
  "page": 1,
  "pageCount": 5
}

3.12. Access to classification information

{
  "data": [
    {
      "id": 1005000,
      "name": "Home",
      "sort_order": 2,
      "front_desc": "Go home and relax",
      "front_name": "Go home and relax",
      "banner_url": "http://yanxuan.nosdn.127.net/92357337378cce650797444bc107b0f7.jpg",
      "icon_url": "http://yanxuan.nosdn.127.net/a45c2c262a476fea0b9fc684fed91ef5.png",
      "img_url": "//nos.netease.com/yanxuan/f0d0e1a542e2095861b42bf789d948ce.jpg",
      "wap_banner_url": "http://yanxuan.nosdn.127.net/e8bf0cf08cf7eda21606ab191762e35c.png",
      "children": [
        {
          "id": 1008002,
          "name": "Soft clothing",
          "front_desc": "Change soft clothes, change home",
          "front_name": "All kinds of soft clothes decorate your home",
          "banner_url": "http://yanxuan.nosdn.127.net/8bbcd7de60a678846664af998f57e71c.png",
          "wap_banner_url": "http://yanxuan.nosdn.127.net/2e2fb4f2856a021bbcd1b4c8400f2b06.png"
        },
        ......
      ]
    },
    {
      "id": 1005001,
      "name": "Kitchen",
      "sort_order": 3,
      "front_desc": "Kitchen",
      "front_name": "Love, confined to the kitchen",
      "banner_url": "http://yanxuan.nosdn.127.net/f4ff8b3d5b0767d4e578575c1fd6b921.jpg",
      "icon_url": "http://yanxuan.nosdn.127.net/ad8b00d084cb7d0958998edb5fee9c0a.png",
      "img_url": "//nos.netease.com/yanxuan/88855173a0cfcfd889ee6394a3259c4f.jpg",
      "wap_banner_url": "http://yanxuan.nosdn.127.net/3708dbcb35ad5abf9e001500f73db615.png",
      "children": [
        {
          "id": 1005007,
          "name": "Cookware",
          "front_desc": "Zhonghua cast iron, selected stainless steel, imported enamel",
          "front_name": "Three meals a day in a good pot",
          "banner_url": "http://yanxuan.nosdn.127.net/4aab4598017b5749e3b63309d25e9f6b.png",
          "wap_banner_url": "http://yanxuan.nosdn.127.net/d2db0d1d0622c621a8aa5a7c06b0fc6d.png"
        },
        ......
      ]
    }
  ],
  "count": 2,
  "total": 9,
  "page": 1,
  "pageCount": 5
}

3.13. Add shopping cart

Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InRlc3QiLCJ1c2VyX2lkIjo2NiwiZW1haWxfc3RhdHVzIjowLCJpYXQiOjE1ODY4NzEwMzgsImV4cCI6MTU4Njg3ODIzOH0.vwlwGV2gdJiBo7RVqv-xwKs5STcjdnOKgqtlXjgqWt8
  • Body parameter:
{
  "goods_id": 1006002,
  "number": 3
}
  • Response:
{
  "id": 156,
  "user_id": 66,
  "session_id": "",
  "goods_sn": "1006002",
  "product_id": 7,
  "goods_name": "Light luxury cotton embroidery wash four piece set",
  "market_price": "988.90",
  "retail_price": "899.00",
  "number": 3,
  "goods_specifition_name_value": "",
  "goods_specifition_ids": "",
  "checked": 0,
  "list_pic_url": ""
}

3.14. Delete shopping cart

Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InRlc3QiLCJ1c2VyX2lkIjo2NiwiZW1haWxfc3RhdHVzIjowLCJpYXQiOjE1ODY4NzEwMzgsImV4cCI6MTU4Njg3ODIzOH0.vwlwGV2gdJiBo7RVqv-xwKs5STcjdnOKgqtlXjgqWt8
  • Response:
{
  "id": 155,
  "user_id": 66,
  "session_id": "string",
  "goods_id": 0,
  "goods_sn": "string",
  "product_id": 0,
  "goods_name": "string",
  "market_price": "0.00",
  "retail_price": "0.00",
  "number": 0,
  "goods_specifition_name_value": "string",
  "goods_specifition_ids": "string",
  "checked": 0,
  "list_pic_url": "string"
}

3.15. Add address

Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InRlc3QiLCJ1c2VyX2lkIjo2NiwiZW1haWxfc3RhdHVzIjowLCJpYXQiOjE1ODY4NzEwMzgsImV4cCI6MTU4Njg3ODIzOH0.vwlwGV2gdJiBo7RVqv-xwKs5STcjdnOKgqtlXjgqWt8
  • Body parameter:
{
  "user_name": "Hao Moumou",
  "tel_number": "17777777777",
  "postal_Code": "610000",
  "national_Code": "86",
  "province_Name": "Sichuan Province",
  "city_Name": "Chengdu City",
  "county_Name": "Wuhou District",
  "detail_Info": "Section 3, North Binjiang Road",
  "is_default": 0
}
  • Response:
{
  "id": 12,
  "user_name": "Hao Moumou",
  "tel_number": "17777777777",
  "postal_Code": "610000",
  "national_Code": "86",
  "province_Name": "Sichuan Province",
  "city_Name": "Chengdu City",
  "county_Name": "Wuhou District",
  "detail_Info": "Section 3, North Binjiang Road",
  "is_default": 0
}

3.16. Delete address

Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InRlc3QiLCJ1c2VyX2lkIjo2NiwiZW1haWxfc3RhdHVzIjowLCJpYXQiOjE1ODY4NzEwMzgsImV4cCI6MTU4Njg3ODIzOH0.vwlwGV2gdJiBo7RVqv-xwKs5STcjdnOKgqtlXjgqWt8
  • Response:
{
  "id": 12,
  "user_id": 66,
  "user_name": "Hao Moumou",
  "tel_number": "17777777777",
  "postal_Code": "610000",
  "national_Code": "86",
  "province_Name": "Sichuan Province",
  "city_Name": "Chengdu City",
  "county_Name": "Wuhou District",
  "detail_Info": "Section 3, North Binjiang Road",
  "is_default": 0
}

3.17. My footprints

Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InRlc3QiLCJ1c2VyX2lkIjo2NiwiZW1haWxfc3RhdHVzIjowLCJpYXQiOjE1ODY4NzEwMzgsImV4cCI6MTU4Njg3ODIzOH0.vwlwGV2gdJiBo7RVqv-xwKs5STcjdnOKgqtlXjgqWt8
  • Response:
{
  "data": [
    {
      "id": 1,
      "add_time": 1586942733,
      "referrer": null,
      "goods": {
        "id": 1006002,
        "goods_number": 100,
        "goods_sn": "1006002",
        "goods_brief": "Designer original, exquisite embroidery",
        "name": "Light luxury cotton embroidery wash four piece set",
        "goods_desc": "<p><img src=\"http://yanxuan.nosdn.127.net/2597f9e2e41093f50761837eb4c2e6be.jpg\" _src=\"http://yanxuan.nosdn.127.net/2597f9e2e41093f50761837eb4c2e6be.jpg\" style=\"\"/></p>......<p><br/></p>",
        "goods_unit": "piece",
        "primary_pic_url": "http://yanxuan.nosdn.127.net/599ee624350ecb9e70c32375c0cd4807.jpg",
        "list_pic_url": "http://yanxuan.nosdn.127.net/8ab2d3287af0cefa2cc539e40600621d.png",
        "promotion_desc": "Limited time purchase",
        "promotion_tag": "",
        "market_price": "988.90",
        "unit_price": "0.00",
        "retail_price": "899.00",
        "counter_price": "0.00",
        "extra_price": "0.00",
        "sell_volume": 168,
        "primary_product_id": 1006003,
        "add_time": "2017-08-30T03:40:11.000Z",
        "update_time": null
      }
    },
    {
      "id": 2,
      "add_time": 1586942752,
      "referrer": null,
      "goods": {
        "id": 1127024,
        "goods_number": 100,
        "goods_sn": "1127024",
        "goods_brief": "German hot stamping technology seamless",
        "name": "Women's traceless silk underpants",
        "goods_desc": "",
        "goods_unit": "piece",
        "primary_pic_url": "http://yanxuan.nosdn.127.net/a89fcd110c582c28a5f6cd821effb37a.png",
        "list_pic_url": "http://yanxuan.nosdn.127.net/0a70f12a712e90d7d93beec4f686fe8e.png",
        "promotion_desc": "Limited time purchase",
        "promotion_tag": "",
        "market_price": "42.90",
        "unit_price": "0.00",
        "retail_price": "39.00",
        "counter_price": "0.00",
        "extra_price": "0.00",
        "sell_volume": 14193,
        "primary_product_id": 1127044,
        "add_time": "2017-08-30T03:40:11.000Z",
        "update_time": null
      }
    }
  ],
  "count": 2,
  "total": 2,
  "page": 1,
  "pageCount": 1
}

3.18. Create order

{
  "consignee": "Chen Mou",
  "city": "Chengdu City",
  "country": "86",
  "province": "Sichuan Province",
  "district": "Wuhou District",
  "address": "Section 2, North Binjiang Road",
  "mobile": "17777777777",
  "shipping_fee": "10.00",
  "actual_price": "107.00",
  "order_price": "107.00",
  "goods_price": "117.00",
  "orderGoods":[
	{"product_id":178,"number":2},
	{"product_id":179,"number":1}
  ]
}
  • Request header:
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InRlc3QiLCJ1c2VyX2lkIjo2NiwiZW1haWxfc3RhdHVzIjowLCJpYXQiOjE1ODY4NzEwMzgsImV4cCI6MTU4Njg3ODIzOH0.vwlwGV2gdJiBo7RVqv-xwKs5STcjdnOKgqtlXjgqWt8
  • Response:
{
  "id": 25,
  "order_sn": "alipay_20200415174841",
  "order_status": 0,
  "shipping_status": 0,
  "pay_status": 0,
  "consignee": "Chen Mou",
  "city": "Chengdu City",
  "country": "86",
  "province": "Sichuan Province",
  "district": "Wuhou District",
  "address": "Section 2, North Binjiang Road",
  "mobile": "17777777777",
  "postscript": "",
  "shipping_name": "",
  "pay_id": "0",
  "pay_name": "",
  "shipping_fee": "10.00",
  "actual_price": "107.00",
  "integral": 0,
  "integral_money": "0.00",
  "order_price": "107.00",
  "goods_price": "117.00",
  "add_time": "2020-04-15T09:48:42.000Z",
  "confirm_time": null,
  "pay_time": null,
  "freight_price": 0,
  "coupon_price": null,
  "callback_status": "true",
  "full_cut_price": null,
  "shipping_no": null,
  "order_type": null
}

3.19. My order

Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InRlc3QiLCJ1c2VyX2lkIjo2NiwiZW1haWxfc3RhdHVzIjowLCJpYXQiOjE1ODY4NzEwMzgsImV4cCI6MTU4Njg3ODIzOH0.vwlwGV2gdJiBo7RVqv-xwKs5STcjdnOKgqtlXjgqWt8
  • Response:
{
  "data": [
    {
      "id": 25,
      "order_sn": "alipay_20200415174841",
      "order_status": 0,
      "shipping_status": 0,
      "pay_status": 0,
      "consignee": "Chen Mou",
      "city": "Chengdu City",
      "country": "86",
      "province": "Sichuan Province",
      "district": "Wuhou District",
      "address": "Section 2, North Binjiang Road",
      "mobile": "17777777777",
      "postscript": "",
      "shipping_name": "",
      "pay_id": "0",
      "pay_name": "",
      "shipping_fee": "10.00",
      "actual_price": "107.00",
      "integral": 0,
      "integral_money": "0.00",
      "order_price": "107.00",
      "goods_price": "117.00",
      "add_time": "2020-04-15T09:48:42.000Z",
      "confirm_time": null,
      "pay_time": null,
      "freight_price": 0,
      "coupon_price": null,
      "callback_status": "true",
      "full_cut_price": null,
      "shipping_no": null,
      "order_type": null,
      "orderGoods": [
        {
          "id": 36,
          "goods_name": "Women's traceless silk underpants",
          "goods_sn": "1127024",
          "number": 2,
          "market_price": "42.90",
          "retail_price": "39.00",
          "goods_specifition_name_value": null,
          "is_real": 0,
          "goods_specifition_ids": "",
          "list_pic_url": "http://yanxuan.nosdn.127.net/0a70f12a712e90d7d93beec4f686fe8e.png"
        },
        {
          "id": 37,
          "goods_name": "Women's butterfly edge silk underwear",
          "goods_sn": "1127025",
          "number": 1,
          "market_price": "42.90",
          "retail_price": "39.00",
          "goods_specifition_name_value": null,
          "is_real": 0,
          "goods_specifition_ids": "",
          "list_pic_url": "http://yanxuan.nosdn.127.net/b2fe79c872a8a7f647264b5e51bcc802.png"
        }
      ]
    }
  ],
  "count": 1,
  "total": 1,
  "page": 1,
  "pageCount": 1
}

3.20. My collection

Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InRlc3QiLCJ1c2VyX2lkIjo2NiwiZW1haWxfc3RhdHVzIjowLCJpYXQiOjE1ODY4NzEwMzgsImV4cCI6MTU4Njg3ODIzOH0.vwlwGV2gdJiBo7RVqv-xwKs5STcjdnOKgqtlXjgqWt8
  • Response:
{
  "data": [
    {
      "id": 75,
      "value_id": 7,
      "add_time": 1586946095,
      "is_attention": 0,
      "type_id": 0,
      "product": {
        "id": 7,
        "goods_id": 1006002,
        "goods_specification_ids": "",
        "goods_sn": "1006002",
        "goods_number": 100,
        "retail_price": "899.00",
        "market_price": "0.00",
        "goods": {
          "id": 1006002,
          "sort_order": 23,
          "goods_number": 100,
          "goods_sn": "1006002",
          "goods_brief": "Designer original, exquisite embroidery",
          "name": "Light luxury cotton embroidery wash four piece set",
          "goods_desc": "<p><img src=\"http://yanxuan.nosdn.127.net/2597f9e2e41093f50761837eb4c2e6be.jpg\" _src=\"http://yanxuan.nosdn.127.net/2597f9e2e41093f50761837eb4c2e6be.jpg\" style=\"\"/></p>......</p><p><br/></p>",
          "goods_unit": "piece",
          "primary_pic_url": "http://yanxuan.nosdn.127.net/599ee624350ecb9e70c32375c0cd4807.jpg",
          "list_pic_url": "http://yanxuan.nosdn.127.net/8ab2d3287af0cefa2cc539e40600621d.png",
          "promotion_desc": "Limited time purchase",
          "market_price": "988.90",
          "retail_price": "899.00",
          "sell_volume": 168,
          "primary_product_id": 1006003
        }
      }
    }
  ],
  "count": 1,
  "total": 1,
  "page": 1,
  "pageCount": 1
}

3.21. Alipay payment

Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InRlc3QiLCJ1c2VyX2lkIjo2NiwiZW1haWxfc3RhdHVzIjowLCJpYXQiOjE1ODY4NzEwMzgsImV4cCI6MTU4Njg3ODIzOH0.vwlwGV2gdJiBo7RVqv-xwKs5STcjdnOKgqtlXjgqWt8
  • Response:
{"code":200,"msg":"success","data":{"url":"https://openapi.alipaydev.com/gateway.do?method=alipay.trade.page.pay&app_id=2016092000556038&charset=utf-8&version=1.0&sign_type=RSA2&timestamp=2020-04-15%2018%3A32%3A48&notify_url=http%3A%2F%2F0.0.0.0%3A3000%2Fapi%2Falipay%2Fnotify&sign=xjmweW9MxkCwO2hWTEbc7olyE4GeTe7q5n4arXcjduYaH3Tf%2BawG1yl1n1JsBTdnUgEBZE8H%2Fh3CaSoS88nwGl4IWX5%2FBZckdcDOsw2SYYb5AF1sJhtS%2Bjm28mrgbtbxNzxJXoHPvdeJitcL23BrsVpG67ifuYa69SMtgIes6nhrwJFHQAmJ4C4KwP3Dhvmht36LfFYvYASRL017GTYSAnxB2tJL%2BxDe5fnlqXmZUxHx2H1FyOdPrgEdVpd5FCBpU2633o09qBahjBJ8L513eYaVQV9x3fjMU%2B57OL0gzTO05V51bnJSmPzcYC5luJCVU715XIm1qzoN26H9eCtz%2Fg%3D%3D&alipay_sdk=alipay-sdk-nodejs-3.0.8&biz_content=%7B%22out_trade_no%22%3A%22alipay_20200415174841%22%2C%22product_code%22%3A%22FAST_INSTANT_TRADE_PAY%22%2C%22total_amount%22%3A%22107.00%22%2C%22subject%22%3A%22%E5%A5%B3%E5%BC%8F%E6%97%A0%E7%97%95%E7%9C%9F%E4%B8%9D%E5%86%85%E8%A3%A4%22%2C%22body%22%3A%22%E5%A5%B3%E5%BC%8F%E6%97%A0%E7%97%95%E7%9C%9F%E4%B8%9D%E5%86%85%E8%A3%A4%22%7D"}}

Note: Alipay payment in the sandbox environment, you must use a specific account login payment, sandbox environment does not support refund function.

Sandbox account: amqjcs8585@sandbox.com
 Sandbox account password: 111111
 Sandbox account payment password: 111111

Posted by ngu_tri on Fri, 17 Apr 2020 23:06:07 -0700