## _电子烟接口文档_ —————————————————————————————————————————————————————————— ##### 接口功能 > 1.发送邮箱验证码 ##### URL > `{host}/index.php?s=/api/Captcha/sendEmailCaptcha` ##### HTTP 请求方式 > POST ##### 请求参数 > | 参数 | 必选 | 类型 | 说明 | > | :---- | :--- | :----- | ---------- | > | form | ture | object | 请求的对象 | > | email | true | string | 邮箱地址 | ```javascript { "form": { "email":"541469799@qq.com", } } ``` ##### 返回字段 > | 返回字段 | 字段类型 | 说明 | > | :------- | :------- | :------------------------------------ | > | status | int | 返回结果状态。200:正常;其它:错误。 | > | message | string | 接口信息 | > | data | array | 数据 | ```javascript { "status": 200, "message": "Sent Successful!Please check your new mails.", "data": [] } ``` ———————————————— ##### 接口功能 > 2.登录 ##### URL > `http://vapeshop.com/index.php?s=/api/passport/login` ##### HTTP 请求方式 > POST ##### 请求参数 > | 参数 | 必选 | 类型 | 说明 | > | :-------- | :--- | :------ | -------------------------------- | > | mobile | 是 | string | 登录邮箱 | > | smsCode | 是 | int | 邮箱验证码 | > | isParty | 否 | boolean | 是否第三方登录,true:是,false:否 | > | partyData | 否 | object | 第三方登录数据 | ```javascript { "form": { "mobile": "541469799@qq.com", "smsCode": "439554", "isParty": false, "partyData": [] } } ``` ##### 返回字段 > | 返回字段 | 字段类型 | 说明 | > | :------- | :------- | :------------------------------- | > | status | int | 返回结果状态。0:正常;1:错误。 | > | message | string | 接口消息 | > | data | object | 数据 | > | userId | int | 用户ID | > | token | string | 用户token | ```javascript { "status": 200, "message": "登录成功", "data": { "userId": 1, "token": "7b06840972b7f1896c68d4fc4f64cbbc" } } ``` ———————————————— ##### 接口功能 > 3.首页商品列表 ##### URL > `http://vapeshop.com/index.php?s=/api/goods/list` ##### HTTP 请求方式 > GET ##### 请求参数 > | 参数 | 必选 | 类型 | 说明 | > | :--- | :--- | :----- | --------------------------------------- | > | page | 否 | int | 页数 | > | type | 否 | int | 暂留 | ##### 返回字段 > | 返回字段 | 字段类型 | 说明 | > | :------- | :------- | :------------------------------- | > | status | int | 返回结果状态。0:正常;1:错误。 | > | message | string | 所属公司名 | > | data | string | 数据 | > | list | object | 分页数据 | > | data | array | 商品 | > | goods_sales | int | 商品销量 | > | goods_name | int | 商品名称 | > | goods_price_min | int | 商品实际售价 | > | goods_image | string | 商品图片 | ```javascript { "status": 200, "message": "success", "data": { "list": { "total": 1, "per_page": 15, "current_page": 1, "last_page": 1, "data": [ { "goods_sales": 0, "goods_id": 10001, "goods_type": 10, "goods_name": "Banana Vape", "goods_no": "10000001", "video_id": 0, "video_cover_id": 0, "selling_point": "", "spec_type": 10, "goods_price_min": "19.00", "goods_price_max": "19.00", "line_price_min": "28.00", "line_price_max": "28.00", "stock_total": 100, "is_restrict": 0, "restrict_total": 0, "restrict_single": 0, "delivery_id": 10001, "is_points_gift": 0, "is_points_discount": 1, "is_alone_points_discount": 0, "points_discount_config": "", "is_enable_grade": 0, "is_alone_grade": 0, "alone_grade_equity": [], "is_ind_delivery_type": 0, "delivery_type": [ 10 ], "status": 10, "goods_image": "http://vapeshop.com/uploads/10001/20240226/7b96f812559616af230b55d0e81ac50a.jpg", "is_user_grade": false } ] } } } ``` ———————————————— ##### 接口功能 > 4.商品详情页 ##### URL > `http://vapeshop.com/index.php?s=/api/goods/detail` ##### HTTP 请求方式 > GET ##### 请求参数 > | 参数 | 必选 | 类型 | 说明 | > | :-------- | :--- | :------ |------| > | goodsId | 是 | string | 商品ID | ##### 返回字段 > | 返回字段 | 字段类型 | 说明 | > | :------- | :------- | :------------------------------- | > | status | int | 返回结果状态。0:正常;1:错误。 | > | message | string | 接口消息 | > | data | object | 数据 | > | userId | int | 用户ID | > | token | string | 用户token | ```javascript { "status": 200, "message": "success", "data": { "detail": { "goods_id": 10001, "goods_type": 10, "goods_name": "Banana Vape", "goods_no": "10000001", "video_id": 0, "video_cover_id": 0, "selling_point": "", "spec_type": 10, "goods_price_min": "19.00", "goods_price_max": "19.00", "line_price_min": "28.00", "line_price_max": "28.00", "stock_total": 100, "is_restrict": 0, "restrict_total": 0, "restrict_single": 0, "content": "
dddfffffffffffffffff