diff --git a/API文档.html b/API文档.html new file mode 100644 index 0000000..b5b4b93 --- /dev/null +++ b/API文档.html @@ -0,0 +1,5215 @@ + + + + + + + + + + + + + + + + +
+
+
+
+ + +
+
+
+
+ +

其它

+ +
+

图片上传

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/image_upload

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
filestring二进制流
+ + + +
+

多文件/图片上传,二进制流

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/multiple_file_upload

+ + + + + + +
+

手机验证码校验

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/verifycode_check

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
mobilestring手机号码15280769369
verifyCodestring验证码123456
typenumber验证码类型1
+ + + +
+

二维码图片

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/create_simple_qrcode

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
urlnumberurl链接http://www.baidu.com
sizenumber尺寸,默认150150
is_binarynumber默认0,0表示不是二进制,1表示二进制流base641
+ + + +
+

支付方式列表

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/payment_list

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
statusnumber是否可用:0否,1是,-1全部
+ + + +
+

安卓升级信息

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/andriod_upgrade

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
+ + + +

文章

+ +
+

文章-列表

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/article_list

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
limitnumber每页数量,默认1010
offsetnumber偏移量,默认00
typeidnumber分类id1
+ + + +
+

文章-详情

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/article_detail

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
idnumberid1
+ + + +
+

文章分类-列表

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/arctype_list

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
limitnumber每页数量,默认1010
offsetnumber偏移量,默认00
pidnumber分类父级id1
+ + + +
+

文章分类-详情

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/arctype_detail

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
idnumberid1
+ + + +

商品

+ +
+

商品-列表

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/goods_list

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
limitnumber每页数量,默认1010
offsetnumber偏移量,默认00
typeidnumber分类id1
tuijiannumber推荐等级1
statusnumber状态0
keywordstring关键词,根据标题title、货号sn模糊查询苹果
min_pricefloat最小价格1
max_pricefloat最大价格9999
orderbynumber排序,默认最新,1销量从高到低,2评论从高到低,3价格从高到低,4价格从低到高
+ + + +
+

商品-详情

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/goods_detail

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
idnumber商品id1
user_idnumber用户id1
+ + + +
+

商品搜索词-列表

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/goods_searchword_list

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
limitnumber每页数量,默认1010
offsetnumber偏移量,默认00
+ + + +
+

商品分类-列表

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/goodstype_list

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
limitnumber每页数量,默认1010
offsetnumber偏移量,默认00
pidnumber商品分类父级id1
+ + + +

订单

+ +
+

订单-列表

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/order_list

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
limitnumber每页数量,默认1010
offsetnumber偏移量,默认00
statusnumber0或者不传表示全部,1待付款,2待发货,3待收货,4待评价(确认收货,交易成功),5退款/售后
+ + + +
+

订单-详情

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/order_detail

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
order_idnumber订单id1
order_statusnumber订单状态,0生成订单,1已取消(客户触发),2无效(管理员触发),3完成订单0
pay_statusnumber支付状态;0未付款;1已付款
refund_statusnumber退货退款(订单完成后),0无退货,1有退货,2退货成功,3拒绝
+ + + +
+

订单-添加

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/order_add

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
default_address_idnumber默认收货地址id1
shipping_costsfloat运费
messagestring备注
place_typenumber订单来源,1pc,2微信,3app2
cartidsstring购物车商品id1,2,3
+ + + +
+

订单-修改

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/order_update

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
idnumberid1
order_snstring货号,货号与id两者必传一个
order_amountfloat应付金额=商品总价+运费-优惠(积分、红包)
out_trade_nostring支付订单号
shipping_namestring配送方式名称
shipping_idnumber配送方式
shipping_snstring发货单
shipping_feefloat配送费用
shipping_timenumber发货时间
namestring收货人姓名
provincenumber
citynumber
districtnumber
addressstring地址
zipcodestring邮编
mobilestring手机号
messagestring买家留言
is_commentnumber是否评论,1已评价
is_deletenumber是否删除,1删除
to_buyerstring卖家留言
invoicenumber发票:0不索要,1个人,2企业
invoice_titlestring发票抬头
invoice_taxpayer_numberstring纳税人识别号
+ + + +
+

订单-状态修改

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/order_status_update

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
idnumberid1
typenumber修改订单状态,1设为支付,2设为取消,3设为确认收货,4设为退款退货,5设为删除,6设为已评价1
+ + + +

购物车

+ +
+

购物车-列表

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/cart_list

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
+ + + +
+

购物车-结算商品列表

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/cart_checkout_goods_list

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
idsstringid:1,2,3
+ + + +
+

购物车-添加

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/cart_add

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
goods_numbernumber商品数量1
goods_idnumber商品id1
shop_idnumber店铺id
goods_attrstring商品属性
+ + + +
+

购物车-删除

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/cart_delete

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
idstringid1
+ + + +
+

购物车-清空

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/cart_clear

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
+ + + +

用户中心

+ +
+

用户-列表

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/user_list

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
limitnumber每页数量,默认1010
offsetnumber偏移量,默认00
parent_idnumber父级id1
group_idnumber分组id0
sexnumber性别,1男2女1
+ + + +
+

用户-详细信息

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/user_info

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
+ + + +
+

用户-修改

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/user_info_update

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
user_namestring用户名fanli
emailstring密码,md5374856559@qq.com
sexnumber推荐人id1
birthdaystring推荐人电话15280714787
moneyfloat用户余额1
frozen_moneyfloat用户冻结金额1
pointnumber积分1
address_idstring默认地址id1
user_rankstring用户等级1
parent_idstring父级id1
nicknamestring昵称范例
mobilestring手机号15280718654
statusstring状态1
group_idstring分组id0
head_imgstring头像http://www.baidu.com
+ + + +
+

用户-修改密码、支付密码

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/user_password_update

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
passwordstring密码,md5e10adc3949ba59abbe56e057f20f883e
old_passwordstring旧密码,md5e10adc3949ba59abbe56e057f20f8832
pay_passwordstring支付密码,md5e10adc3949ba59abbe56e057f20f883e
old_pay_passwordstring支付旧密码,md5e10adc3949ba59abbe56e057f20f8831
+ + + +
+

用户-余额修改

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/user_money_update

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
moneyfloat金额,比如传5,表示在原有余额上减去55
+ + + +
+

用户-注册

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/wx_register

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
mobilestring手机号15280714785
user_namestring用户名fanli
passwordstring密码,md5e10adc3949ba59abbe56e057f20f883e
parent_idnumber推荐人id1
parent_mobilestring推荐人电话15280714787
+ + + +
+

用户-登录

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/wx_login

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
user_namestring用户名fanli
passwordstring密码,md5e10adc3949ba59abbe56e057f20f883e
openidstringopenidockGfuLHR3lHQqBNTaTeBzPg-rNs
+ + + +
+

微信授权注册登录

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/wx_oauth_register

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
user_namestring用户名fanli
passwordstring密码,md5e10adc3949ba59abbe56e057f20f883e
openidstringopenidockGfuLHR3lHQqBNTaTeBzPg-rNs
sexnumber性别,1男2女1
head_imgstring头像http://www.baidu.com
nicknamestring昵称范例
parent_idnumber推荐人id1
parent_mobilestring推荐人手机号15280748476
mobilestring手机号15280748475
+ + + +
+

用户-签到

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/user_signin

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
+ + + +

用户充值

+ +
+

充值记录-列表

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/user_recharge_list

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
limitnumber每页数量,默认1010
offsetnumber偏移量,默认00
statusnumber充值状态:0未处理,1已完成,2失败,-1表示获取所有-1
+ + + +
+

充值记录-详情

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/user_recharge_detail

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
idnumberid1
+ + + +
+

充值记录-添加

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/user_recharge_add

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
moneyfloat充值金额5
pay_typenumber充值类型:1微信,2支付宝1
+ + + +

用户余额(钱包)

+ +
+

余额明细-列表

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/user_money_list

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
limitnumber每页数量,默认1010
offsetnumber偏移量,默认00
typenumber类型:0增加,1减少
+ + + +
+

余额明细-添加

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/user_money_add

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
moneyfloat金额5
typenumber类型:0增加,1减少0
desstring说明微信转账
+ + + +

用户消息

+ +
+

用户消息-列表

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/user_message_list

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
limitnumber每页数量,默认1010
offsetnumber偏移量,默认00
typenumber系统消息0,活动消息
statusstring查看状态:0未查看,1已查看
+ + + +
+

用户消息-添加

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/user_message_add

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
titlestring标题回家
typenumber系统消息0,活动消息0
desstring说明微信转账
litpicstring缩略图
+ + + +
+

用户消息-修改

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/user_message_update

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
idnumberid1
titlestring标题回家
typenumber系统消息0,活动消息0
desstring说明微信转账
litpicstring缩略图
+ + + +

用户提现

+ +
+

用户提现-列表

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/user_withdraw_list

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
limitnumber每页数量,默认1010
offsetnumber偏移量,默认00
statusnumber0未处理,1处理中,2成功,3取消,4拒绝
methodstring提现方式,weixin,bank,alipay
+ + + +
+

用户提现-添加

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/user_withdraw_add

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
methodstring提现方式,weixin,bank,alipayalipay
moneyfloat金额5
accountstring支付宝账号或者银行卡号123456@qq.com
namestring姓名范例
notestring备注
statusnumber0未处理,1处理中,2成功,3取消,4拒绝
bank_namestring银行名称
bank_placestring开户行
pay_passwordstring支付密码
+ + + +
+

用户提现-修改

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/user_withdraw_update

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
idstringid1
methodstring提现方式,weixin,bank,alipayalipay
moneyfloat金额5
accountstring支付宝账号或者银行卡号123456@qq.com
namestring姓名范例
notestring备注
statusnumber0未处理,1处理中,2成功,3取消,4拒绝
bank_namestring银行名称
bank_placestring开户行
pay_passwordstring支付密码
+ + + +

优惠券

+ +
+

用户优惠券-列表

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/user_bonus_list

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
limitnumber每页数量,默认1010
offsetnumber偏移量,默认00
statusnumber0未使用1已使用2已过期,不传表示全部
+ + + +
+

用户优惠券-获取

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/user_bonus_add

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
bonus_idnumber优惠券id1
+ + + +
+

用户结算时获取可用优惠券列表

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/user_available_bonus_list

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
min_amountfloat最小金额可以用的优惠券10
+ + + +
+

优惠券-列表

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/bonus_list

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
limitnumber每页数量,默认1010
offsetnumber偏移量,默认00
+ + + +
+

优惠券-添加

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/bonus_add

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
namestring优惠券名称新手奖励
moneyfloat金额10
min_amountfloat满多少使用100
start_timestring有效期开始时间2010-10-10 12:12:12
end_timestring有效期结束时间2020-10-10 12:12:12
pointnumber积分
statusnumber0可用,1不可用
+ + + +
+

优惠券-修改

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/bonus_update

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
idnumberid1
namestring优惠券名称新手奖励
moneyfloat金额10
min_amountfloat满多少使用100
start_timestring有效期开始时间2010-10-10 12:12:12
end_timestring有效期结束时间2020-10-10 12:12:12
pointnumber积分
statusnumber0可用,1不可用
+ + + +
+

优惠券-删除

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/bonus_delete

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
idnumberid1
+ + + +

浏览记录

+ +
+

浏览记录-列表

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/user_goods_history_list

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
limitnumber每页数量,默认1010
offsetnumber偏移量,默认00
+ + + +
+

浏览记录-添加

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/user_goods_history_add

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
goods_idnumber商品id1
+ + + +
+

浏览记录-删除

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/user_goods_history_delete

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
idnumberid1
+ + + +
+

浏览记录-清空

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/user_goods_history_clear

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
+ + + +

商品评价

+ +
+

商品评价-列表

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/comment_list

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
limitnumber每页数量,默认1010
offsetnumber偏移量,默认00
comment_typenumber0商品评价,1文章评价0
comment_ranknumber文章或者商品的重星级;只有1到5星;由数字代替;其中5代表5星
id_valuenumber文章或者商品的id
parent_idnumber评论的父节点
+ + + +
+

商品评价-添加

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/comment_add

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
comment_typenumber用户评论的类型;0评论的是商品,1评论的是文章1
id_valuenumber文章或者商品的id
contentstring评论的内容
comment_ranknumber文章或者商品的重星级;只有1到5星;由数字代替;其中5代表5星
parent_idnumber评论的父节点
ip_addressstringIP地址
+ + + +
+

商品评价-批量添加

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/comment_batch_add

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
commentstring二维数组json
+ + + +
+

商品评价-修改

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/comment_update

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
idnumberid1
contentstring评论的内容
comment_ranknumber文章或者商品的重星级;只有1到5星;由数字代替;其中5代表5星
parent_idnumber评论的父节点
ip_addressstringIP地址
+ + + +
+

商品评价-删除

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/comment_delete

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
comment_typenumber用户评论的类型;0评论的是商品,1评论的是文章0
id_valuenumber文章或者商品的id1
+ + + +

商品收藏

+ +
+

商品收藏-列表

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/collect_goods_list

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
limitnumber每页数量,默认1010
offsetnumber偏移量,默认00
+ + + +
+

商品收藏-添加

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/collect_goods_add

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
goods_idnumber商品id1
is_attentionnumber是否关注该收藏商品;1是;0否
+ + + +
+

商品收藏-取消

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/collect_goods_delete

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
goods_idnumber商品id1
+ + + +

用户积分

+ +
+

用户积分明细-列表

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/user_point_list

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
limitnumber每页数量,默认1010
offsetnumber偏移量,默认00
typenumber0增加,1减少,不传表示全部
+ + + +
+

用户积分明细-添加

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/user_point_add

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
pointnumber51
desstring说明0
typenumber0增加,1减少,默认0
+ + + +

收货地址

+ +
+

收货地址-列表

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/user_address_list

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
limitnumber每页数量,默认1010
offsetnumber偏移量,默认00
+ + + +
+

收货地址-详情

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/user_address_detail

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
idnumberid1
+ + + +
+

获取用户默认地址

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/user_default_address

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
+ + + +
+

设为默认地址

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/user_address_setdefault

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
idnumberid1
+ + + +
+

收货地址-添加

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/user_address_add

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
namestring收货人姓名范例
mobilestring收货人手机号15296354787
provincenumber1
citynumber2
districtnumber3
addressstring详细地址100号
countrystring国家86
telphonestring电话号码0995-2354154
zipcodestring邮编361566
is_defaultnumber是否默认,0不默认,1默认0
+ + + +
+

收货地址-修改

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/user_address_update

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
idnumberid1
namestring收货人姓名范例
mobilestring收货人手机号15296354787
provincenumber1
citynumber2
districtnumber3
addressstring详细地址100号
countrystring国家86
telphonestring电话号码0995-2354154
zipcodestring邮编361566
is_defaultnumber是否默认,0不默认,1默认0
+ + + +
+

收货地址-删除

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/user_address_delete

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
idnumberid1
+ + + +

轮播图

+ +
+

轮播图-列表

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/slide_list

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
limitnumber每页数量,默认1010
offsetnumber偏移量,默认00
group_idnumber分组
+ + + +

地区

+ +
+

地区-列表

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/region_list

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
idnumber地区父级id1
+ + + +
+

地区-详情

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/region_detail

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
idnumber地区id1
+ + + +

意见反馈

+ +
+

意见反馈-列表

+

+ 在线测试 + 在线浏览 +

+

请求方式:GET

+

+ 请求地址:{{api_url}}/feedback_list

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
limitnumber每页数量,默认1010
offsetnumber偏移量,默认00
+ + + +
+

意见反馈-添加

+

+ 在线测试 + 在线浏览 +

+

请求方式:POST

+

+ 请求地址:{{api_url}}/feedback_add

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Body参数名类型必需描述示例 e.g.
access_tokenstringaccess_token123456
contentstring内容
titlestring标题
+ + + +
+

附录

+
+

环境变量

+ +
线上环境
+ + + + + + + + + + + + + + + + +
变量名变量值
api_urlhttp://www.lqycms.com/dataapi
+
+ + +
+
+
+
+ + +
+
+ + 在线编辑 + +
+
+ +
+
+ 目录 +
+
+ + + \ No newline at end of file diff --git a/README.md b/README.md index f70dc2d..7316158 100644 --- a/README.md +++ b/README.md @@ -30,9 +30,12 @@ WAP端 注意:PC端跟微商城的域名是同一个域名,WAP端的域名通常是PC端的子域名,这里的案例PC端的域名是www.lqycms.com,WAP端的域名是m.lqycms.com PC入口:http://+PC域名+/ + WAP入口:http://+WAP域名+/,WAP域名解析与PC域名一致,都是指向同一目录下 + 微商城入口:http://+PC域名+/weixin,支付仅支持微信支付。 + 6、后台功能 1) 文章管理:增删改查,栏目管理 2) 单页管理 diff --git a/app/Common/function.php b/app/Common/function.php index dd04082..2eb4385 100644 --- a/app/Common/function.php +++ b/app/Common/function.php @@ -1138,6 +1138,7 @@ function get_table_columns($table, $field='') return $res; } +//获取http(s)://+域名 function http_host($flag=true) { $res = ''; diff --git a/app/Http/Controllers/Api/ArctypeController.php b/app/Http/Controllers/Api/ArctypeController.php index 49d6ec3..9b20661 100644 --- a/app/Http/Controllers/Api/ArctypeController.php +++ b/app/Http/Controllers/Api/ArctypeController.php @@ -41,8 +41,9 @@ class ArctypeController extends CommonController public function arctypeDetail(Request $request) { //参数 - $data['id'] = $request->input('id'); + $data['id'] = $request->input('id',''); $data['is_show'] = Arctype::IS_SHOW; + if($data['id']==''){return ReturnData::create(ReturnData::PARAMS_ERROR);} $res = Arctype::getOne($data); if($res === false) diff --git a/app/Http/Controllers/Api/ArticleController.php b/app/Http/Controllers/Api/ArticleController.php index 5c79577..e385ad7 100644 --- a/app/Http/Controllers/Api/ArticleController.php +++ b/app/Http/Controllers/Api/ArticleController.php @@ -44,6 +44,7 @@ class ArticleController extends CommonController //参数 $data['id'] = $request->input('id'); $data['ischeck'] = Article::IS_CHECK; + if($data['id']==''){return ReturnData::create(ReturnData::PARAMS_ERROR);} $res = Article::getOne($data); if($res === false) diff --git a/app/Http/Controllers/Api/CommentController.php b/app/Http/Controllers/Api/CommentController.php index 192d737..2109e0e 100644 --- a/app/Http/Controllers/Api/CommentController.php +++ b/app/Http/Controllers/Api/CommentController.php @@ -43,11 +43,10 @@ class CommentController extends CommonController $data['id_value'] = $request->input('id_value',null); $data['content'] = $request->input('content',null); $data['comment_rank'] = $request->input('comment_rank',null); - if($request->input('ip_address', null) !== null){$data['ip_address'] = $request->input('ip_address');} + if($request->input('ip_address', null) !== null){$data['ip_address'] = $request->input('ip_address');}else{$data['ip_address'] = Helper::getRemoteIp();} if($request->input('parent_id', null) !== null){$data['parent_id'] = $request->input('parent_id');} $data['add_time'] = time(); $data['user_id'] = Token::$uid; - $data['ip_address'] = Helper::getRemoteIp(); if($data['comment_type']===null || $data['id_value']===null || $data['content']===null || $data['comment_rank']===null) { diff --git a/app/Http/Controllers/Api/OrderController.php b/app/Http/Controllers/Api/OrderController.php index 1c6a62a..f20d293 100644 --- a/app/Http/Controllers/Api/OrderController.php +++ b/app/Http/Controllers/Api/OrderController.php @@ -19,6 +19,9 @@ class OrderController extends CommonController public function orderList(Request $request) { //参数 + $data['limit'] = $request->input('limit', 10); + $data['offset'] = $request->input('offset', 0); + $data['user_id'] = Token::$uid; $data['status'] = $request->input('status',-1); diff --git a/app/Http/Controllers/Api/QrcodeController.php b/app/Http/Controllers/Api/QrcodeController.php index eaa4027..200a2d4 100644 --- a/app/Http/Controllers/Api/QrcodeController.php +++ b/app/Http/Controllers/Api/QrcodeController.php @@ -17,8 +17,16 @@ class QrcodeController extends CommonController public function createSimpleQrcode(Request $request) { //参数 - $url = $request->input('url'); + $url = $request->input('url',''); $size = $request->input('size', 150); + $is_binary = $request->input('is_binary',0); //0表示不是二进制,1表示二进制流base64 + + if($url=='') + { + return ReturnData::create(ReturnData::PARAMS_ERROR); + } + + if($is_binary==1){return Helper::qrcode($url,$size);} return ''; } diff --git a/app/Http/Model/Goods.php b/app/Http/Model/Goods.php index 626d155..2e4f53b 100644 --- a/app/Http/Model/Goods.php +++ b/app/Http/Model/Goods.php @@ -98,7 +98,7 @@ class Goods extends BaseModel $model = $model->orderBy('price','asc'); //价格从低到高 break; default: - $model = $model->orderBy('pubdate','desc'); //价格从低到高 + $model = $model->orderBy('pubdate','desc'); //最新 } } diff --git a/routes/web.php b/routes/web.php index ab766d3..f5b161d 100644 --- a/routes/web.php +++ b/routes/web.php @@ -185,7 +185,7 @@ Route::group(['prefix' => 'dataapi', 'namespace' => 'Api', 'middleware' => ['web //评价 Route::get('/comment_list', 'CommentController@commentList'); //商品评价列表 Route::post('/comment_add', 'CommentController@commentAdd'); //商品评价添加 - Route::post('/comment_batch_add', 'CommentController@commentBatchAdd'); //商品评价添加 + Route::post('/comment_batch_add', 'CommentController@commentBatchAdd'); //商品评价批量添加 Route::post('/comment_update', 'CommentController@commentUpdate'); //商品评价修改 Route::post('/comment_delete', 'CommentController@commentDelete'); //商品评价删除 //商品收藏 @@ -195,7 +195,7 @@ Route::group(['prefix' => 'dataapi', 'namespace' => 'Api', 'middleware' => ['web //订单 Route::post('/order_add', 'OrderController@orderAdd'); //生成订单 Route::post('/order_update', 'OrderController@orderUpdate'); //订单修改 - Route::post('/order_status_update', 'OrderController@orderStatusUpdate'); //订单修改 + Route::post('/order_status_update', 'OrderController@orderStatusUpdate'); //订单状态修改 Route::get('/order_list', 'OrderController@orderList'); //订单列表 Route::get('/order_detail', 'OrderController@orderDetail'); //订单详情 //购物车 @@ -229,6 +229,7 @@ Route::group(['prefix' => 'dataapi', 'namespace' => 'Api', 'middleware' => ['web Route::get('/payment_list', 'PaymentController@paymentList'); //支付方式列表 //图片上传 Route::post('/image_upload', 'ImageController@imageUpload'); //普通文件/图片上传 + Route::post('/multiple_file_upload', 'ImageController@multipleFileUpload'); //多文件上传 //二维码 Route::get('/create_simple_qrcode', 'QrcodeController@createSimpleQrcode'); //收货地址