1 Star 0 Fork 4

PHP-Daemon/tp6-mall

forked from calm/tp6-mall 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
TP6电商api接口文档.doc 43.85 KB
一键复制 编辑 原始数据 按行查看 历史
calm 提交于 2020-08-15 14:14 +08:00 . chenz init
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">
<head><meta http-equiv=Content-Type content="text/html; charset=utf-8">
<style type="text/css">
table
{
border-collapse: collapse;
border: none;
width: 100%;
}
td,tr
{
border: solid #CCC 1px;
padding:3px;
font-size:9pt;
}
.codestyle{
word-break: break-all;
mso-highlight:rgb(252, 252, 252);
padding-left: 5px; background-color: rgb(252, 252, 252); border: 1px solid rgb(225, 225, 232);
}
img {
width:100;
}
</style>
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<xml><w:WordDocument><w:View>Print</w:View></xml></head>
<body><h1>1、开篇</h1><div style="margin-left:20px;"><p>欢迎使用ShowDoc!</p>
<p><strong>API格式:</strong> </p>
<p>备注:API必须返回如下3个字段:</p>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必选</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">status</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">int</td>
<td>状态</td>
</tr>
<tr>
<td style="text-align: left;">message</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">string</td>
<td>信息提示</td>
</tr>
<tr>
<td style="text-align: left;">result</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">mix</td>
<td>结果</td>
</tr>
</tbody>
</table></div><h1>2、用户相关</h1><div style="margin-left:0px;"><h2>2.1、登录/退出</h2><div style="margin-left:0px;"><p><strong>简要描述:</strong> </p>
<ul>
<li>用户登录API</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>http://xx.com/api/login</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>POST </li>
</ul>
<p><strong>参数:</strong> </p>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必选</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">phone_number</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">int</td>
<td>手机号码</td>
</tr>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">int</td>
<td>验证码</td>
</tr>
<tr>
<td style="text-align: left;">type</td>
<td style="text-align: left;">类型</td>
<td style="text-align: left;">tinyint</td>
<td>1 :7天 2:30天,默认传递2</td>
</tr>
</tbody>
</table>
<p><strong>返回示例</strong></p>
<table width='100%' class='codestyle'><pre><code>{
status: 1,
message: "OK",
result: [ ]
}</code></pre></table>
<p><strong>返回参数说明</strong> </p>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<p><strong>简要描述:</strong> </p>
<ul>
<li>用户退出登录接口</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>http://xx.com/api/logout</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>
<p>POST GET</p>
</li>
<li>
<p><strong>备注</strong> </p>
</li>
<li>
<p>更多返回错误代码请看首页的错误代码描述</p>
<p><strong>备注</strong> </p>
</li>
<li>更多返回错误代码请看首页的错误代码描述</li>
</ul></div><h2>2.2、发送验证码</h2><div style="margin-left:0px;"><p><strong>简要描述:</strong> </p>
<ul>
<li>获取短信验证码API</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>http://xx.com/api/smscode</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>POST </li>
</ul>
<p><strong>参数:</strong> </p>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必选</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">phone_number</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">int</td>
<td>手机号码</td>
</tr>
</tbody>
</table>
<p><strong>返回示例</strong></p>
<table width='100%' class='codestyle'><pre><code> {
"status": 1,
"message":"发送成功",
"result":123
}</code></pre></table>
<p><strong>返回参数说明</strong> </p>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">status</td>
<td style="text-align: left;">int</td>
<td>状态:1成功, 0失败, -1不能重新发送</td>
</tr>
<tr>
<td style="text-align: left;">message</td>
<td style="text-align: left;">string</td>
<td>消息提示</td>
</tr>
</tbody>
</table>
<p><strong>备注</strong> </p>
<ul>
<li>更多返回错误代码请看首页的错误代码描述</li>
</ul>
<p>欢迎使用ShowDoc!</p></div><h2>2.3、个人中心</h2><div style="margin-left:0px;"><p><strong>简要描述:</strong> </p>
<ul>
<li>用户个人中心数据</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>http://xx.com/api/user</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>
<p>GET </p>
</li>
<li>用户个人中心数据</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>http://xx.com/api/user/1</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>PUT</li>
</ul>
<p>参数:
username:用户名
sex: 0:保密, 1男, 2女。</p>
<p><strong>备注</strong> </p>
<ul>
<li>更多返回错误代码请看首页的错误代码描述</li>
</ul></div></div><h1>3、首页相关</h1><div style="margin-left:0px;"><h2>3.1、获取轮播图</h2><div style="margin-left:0px;"><p><strong>简要描述:</strong> </p>
<ul>
<li>获取轮播图</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>http://xx.com/api/index/getRotationChart</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>
<p>GET </p>
<p><strong>返回示例</strong></p>
</li>
</ul>
<table width='100%' class='codestyle'><pre><code> {
status: 1,
message: "ok",
result: [
{
id: 1,
title: "abcd",
image: "http://testmall.singwa.com/static/upload/image/1.jpg"
},
{
id: 2,
title: "abcd",
image: "http://testmall.singwa.com/static/upload/image/3.jpg"
},
{
id: 3,
title: "abcd",
image: "http://testmall.singwa.com/static/upload/image/3.jpg"
},
{
id: 4,
title: "abcd",
image: "http://testmall.singwa.com/static/upload/image/5.jpg"
},
{
id: 5,
title: "abcd",
image: "http://testmall.singwa.com/static/upload/image/5.jpg"
}
]
}</code></pre></table>
<p>点击轮播图跳转到详情页 xxx/api/detail/商品ID</p>
<p><strong>返回示例</strong></p>
<p><strong>备注</strong> </p>
<ul>
<li>更多返回错误代码请看首页的错误代码描述</li>
</ul>
<p>欢迎使用ShowDoc!</p></div><h2>3.2、获取首页栏目推荐的商品</h2><div style="margin-left:0px;"><p><strong>简要描述:</strong> </p>
<ul>
<li>用户注册接口</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>http://xx.com/api/index/cagegoryGoodsRecommend</code></li>
</ul>
<p><strong>请求方式:</strong>
-GET</p>
<p><strong>返回示例</strong></p>
<table width='100%' class='codestyle'><pre><code> {
status: 1,
message: "ok",
result: [
{
categorys: {
category_id: 1,
name: "女装",
icon: "",
list: [
{
name: "牛仔裤",
category_id: 2
},
{
name: "短裤",
category_id: 2
},
{
name: "休闲裤",
category_id: 2
},
{
name: "打底裤",
category_id: 2
},
{
name: "丝袜",
category_id: 2
}
]
},
goods: [
{
id: 1,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 12.13,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
},
{
id: 2,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 123.13,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
},
{
id: 1,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 1256.1,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
},
{
id: 1,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 4569,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
},
{
id: 1,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 89.9,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
},
{
id: 1,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 320.1,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
},
{
id: 1,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 12.13,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
},
{
id: 1,
title: "8原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 458,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
},
{
id: 1,
title: "9原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 123,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
},
{
id: 1,
title: "10原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 345,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
}
]
},
{
categorys: {
category_id: 2,
name: "电子设备",
icon: "",
list: [
{
name: "电脑",
category_id: 2
},
{
name: "手机",
category_id: 2
},
{
name: "摄像",
category_id: 2
},
{
name: "singwa",
category_id: 2
},
{
name: "abc",
category_id: 2
}
]
},
goods: [
{
id: 1,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 12.13,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
},
{
id: 2,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 123.13,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
},
{
id: 1,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 1256.1,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
},
{
id: 1,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 4569,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
},
{
id: 1,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 89.9,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
},
{
id: 1,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 320.1,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
},
{
id: 1,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 12.13,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
},
{
id: 1,
title: "8原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 458,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
},
{
id: 1,
title: "9原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 123,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
},
{
id: 1,
title: "10原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 345,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
}
]
},
{
categorys: {
category_id: 1,
name: "男装",
icon: "",
list: [
{
name: "牛仔裤",
category_id: 2
},
{
name: "短裤",
category_id: 2
},
{
name: "休闲裤",
category_id: 2
},
{
name: "打底裤",
category_id: 2
},
{
name: "丝袜",
category_id: 2
}
]
},
goods: [
{
id: 1,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 12.13,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
},
{
id: 2,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 123.13,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
},
{
id: 1,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 1256.1,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
},
{
id: 1,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 4569,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
},
{
id: 1,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 89.9,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
},
{
id: 1,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 320.1,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
},
{
id: 1,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 12.13,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
},
{
id: 1,
title: "8原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 458,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
},
{
id: 1,
title: "9原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 123,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
},
{
id: 1,
title: "10原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 345,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
}
]
}
]
}</code></pre></table>
<p><strong>备注</strong> </p>
<ul>
<li>更多返回错误代码请看首页的错误代码描述</li>
</ul></div><h2>3.3、首页分类</h2><div style="margin-left:0px;"><p><strong>简要描述:</strong> </p>
<ul>
<li>分类接口</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>/api/category</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>GET </li>
</ul>
<p><strong>参数:</strong> </p>
<p><strong>返回示例</strong></p>
<table width='100%' class='codestyle'><pre><code> {
status: 1,
message: "OK",
result: [
{
category_id: 51,
name: "男装",
pid: 0,
list: [
{
category_id: 52,
name: "上装",
pid: 51,
list: [
{
category_id: 60,
name: "马甲",
pid: 52
},
{
category_id: 59,
name: "西服",
pid: 52
},
{
category_id: 58,
name: "衬衫",
pid: 52
},
{
category_id: 57,
name: "卫衣",
pid: 52
},
{
category_id: 56,
name: "夹克",
pid: 52
}
]
},
{
category_id: 54,
name: "潮流风向标",
pid: 51,
list: [
{
category_id: 70,
name: "夏装热卖",
pid: 54
},
{
category_id: 69,
name: "玩酷时尚",
pid: 54
},
{
category_id: 68,
name: "雅痞绅潮",
pid: 54
},
{
category_id: 67,
name: "潮男新计",
pid: 54
},
{
category_id: 66,
name: "夏季爆款",
pid: 54
}
]
},
{
category_id: 53,
name: "下装",
pid: 51,
list: [
{
category_id: 65,
name: "哈伦裤",
pid: 53
},
{
category_id: 64,
name: "运动裤",
pid: 53
},
{
category_id: 63,
name: "修身裤装",
pid: 53
},
{
category_id: 62,
name: "休闲裤",
pid: 53
},
{
category_id: 61,
name: "牛仔裤",
pid: 53
}
]
}
]
},
{
category_id: 71,
name: "女装",
pid: 0,
list: [
{
category_id: 74,
name: "女士上装",
pid: 71,
list: [
{
category_id: 78,
name: "衬衫",
pid: 74
},
{
category_id: 77,
name: "卫衣",
pid: 74
},
{
category_id: 76,
name: "毛衣外套",
pid: 74
},
{
category_id: 75,
name: "牛仔外套",
pid: 74
}
]
},
{
category_id: 73,
name: "女士下装",
pid: 71,
list: [
{
category_id: 84,
name: "牛仔裤",
pid: 73
},
{
category_id: 83,
name: "打底裤",
pid: 73
},
{
category_id: 82,
name: "休闲裤",
pid: 73
},
{
category_id: 81,
name: "哈伦裤",
pid: 73
},
{
category_id: 80,
name: "阔腿裤",
pid: 73
}
]
},
{
category_id: 72,
name: "女士裙装",
pid: 71,
list: [
{
category_id: 89,
name: "背带裙",
pid: 72
},
{
category_id: 88,
name: "羊绒连衣裙",
pid: 72
},
{
category_id: 87,
name: "毛呢连衣裙",
pid: 72
},
{
category_id: 86,
name: "针织连衣裙",
pid: 72
},
{
category_id: 85,
name: "蕾丝连衣裙",
pid: 72
}
]
}
]
},
{
category_id: 28,
name: "电脑",
pid: 0,
list: [
{
category_id: 41,
name: "小米",
pid: 28,
list: [
{
category_id: 45,
name: "小米游戏本",
pid: 41
},
{
category_id: 44,
name: "小米Air",
pid: 41
},
{
category_id: 43,
name: "小米Ruby",
pid: 41
},
{
category_id: 42,
name: "RedmiBook",
pid: 41
}
]
},
{
category_id: 40,
name: "戴尔",
pid: 28,
list: [
{
category_id: 47,
name: "DELL游匣",
pid: 40
},
{
category_id: 46,
name: "灵越",
pid: 40
}
]
},
{
category_id: 36,
name: "苹果",
pid: 28,
list: [
{
category_id: 50,
name: "一体机",
pid: 36
},
{
category_id: 49,
name: "mac air",
pid: 36
},
{
category_id: 48,
name: "mac book",
pid: 36
}
]
}
]
},
{
category_id: 26,
name: "手机",
pid: 0,
list: [
{
category_id: 30,
name: "苹果",
pid: 26,
list: [
{
category_id: 33,
name: "iphonexr",
pid: 30
},
{
category_id: 32,
name: "iphonexs max",
pid: 30
},
{
category_id: 31,
name: "iphonexr",
pid: 30
}
]
},
{
category_id: 39,
name: "三星",
pid: 26
},
{
category_id: 38,
name: "华为",
pid: 26
}
]
},
{
category_id: 27,
name: "书",
pid: 0,
list: [
{
category_id: 35,
name: "励志",
pid: 27
},
{
category_id: 34,
name: "计算机",
pid: 27
}
]
}
]
}</code></pre></table></div></div><h1>4、商品详情相关</h1><div style="margin-left:0px;"><h2>4.1、商品详情API</h2><div style="margin-left:0px;"><p><strong>简要描述:</strong> </p>
<ul>
<li>商品详情接口</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>/api/detail/商品ID</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>GET </li>
</ul>
<p><strong>参数:</strong> </p>
<p><strong>返回示例</strong></p>
<table width='100%' class='codestyle'><pre><code> {
status: 0,
message: "OK",
result: {
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 12.13,
cost_price: 20.9,
sales_count: 123,
stock: 8967, // 库存
gids: {
1,11: 1,
1,12: 5890,
2,11: 4590,
2,12: 890
},
sku: [
{
name: "颜色",
list: [
{
id: 1,
name: "红色",
flag: 1 , // 1高亮
},
{
id: 2,
name: "粉色",
flag: 0
}
]
},
{
name: "尺寸",
list: [
{
id: 11,
name: "L",
flag: 1
},
{
id: 12,
name: "S",
flag: 0
}
]
}
],
detail: {
d1: {
商品编号: "D-8812",
上架时间: "2017-06-24",
商品毛重: "200克",
商品库存: "1000件"
},
d2: "ssss师父父反反复复方法反反复复方法反反复复方法反反复复方法发发发abc"
}
}
}</code></pre></table>
<p><strong>返回参数说明</strong> </p>
<p>当选择sku中内容时候, 比如 1,11 需要去关联提供的gids中的id对应 比如1,11 对应id=1
那 直接重新请求API带上这个新id</p>
<p><strong>备注</strong> </p>
<ul>
<li>更多返回错误代码请看首页的错误代码描述</li>
</ul></div></div><h1>5、商品列表页面</h1><div style="margin-left:0px;"><h2>5.1、按分类检索 </h2><div style="margin-left:0px;"><p><strong>简要描述:</strong> </p>
<ul>
<li>分类列表接口</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>http://xx.com/api/category/search/分类ID</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>GET</li>
</ul>
<p><strong>参数:</strong> </p>
<p><strong>返回示例</strong></p>
<table width='100%' class='codestyle'><pre><code> {
status: 1,
message: "ok",
result: {
name: "我是一级分类",
focus_ids: [ // 分类的定位焦点 ,注意这个地方 有可能是一个,有可能是两个
1,
11
],
list: [
[
{
id: 1,
name: "二级分类1"
},
{
id: 2,
name: "二级分类2"
},
{
id: 3,
name: "二级分类3"
},
{
id: 4,
name: "二级分类4"
},
{
id: 5,
name: "二级分类5"
}
],
[
{
id: 11,
name: "三级分类1"
},
{
id: 12,
name: "三级分类2"
},
{
id: 13,
name: "三级分类3"
},
{
id: 14,
name: "三级分类4"
},
{
id: 15,
name: "三级分类5"
}
]
]
}
}</code></pre></table>
<ul>
<li>更多返回错误代码请看首页的错误代码描述</li>
</ul></div><h2>5.2、sku分类</h2><div style="margin-left:0px;"><p><strong>简要描述:</strong> </p>
<ul>
<li>sku接口</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>http://xx.com/api/sku</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>GET </li>
</ul>
<p><strong>参数:</strong> </p>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必选</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">category_id</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">int</td>
<td>分类ID</td>
</tr>
</tbody>
</table>
<p><strong>返回示例</strong></p>
<table width='100%' class='codestyle'><pre><code> {
status: 1,
message: "ok",
result: [
{
name: "颜色",
list: [
{
id: 1,
name: "红色"
},
{
id: 2,
name: "粉色"
},
{
id: 3,
name: "黄色"
},
{
id: 4,
name: "蓝色"
}
]
},
{
name: "尺寸",
list: [
{
id: 11,
name: "L"
},
{
id: 12,
name: "S"
},
{
id: 13,
name: "M"
},
{
id: 14,
name: "X"
},
{
id: 15,
name: "XL"
},
{
id: 15,
name: "XXL"
}
]
},
{
name: "价格",
list: [
{
id: 21,
name: "0-20"
},
{
id: 22,
name: "20-40"
},
{
id: 23,
name: "40-80"
},
{
id: 24,
name: "100-150"
},
{
id: 25,
name: "150以上"
}
]
}
]
}</code></pre></table>
<ul>
<li>更多返回错误代码请看首页的错误代码描述</li>
</ul></div><h2>5.3、商品列表API</h2><div style="margin-left:0px;"><p><strong>简要描述:</strong> </p>
<ul>
<li>商品列表/搜索API</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>http://xx.com/api/lists</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>POST </li>
</ul>
<p><strong>参数:</strong> </p>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必选</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">category_id</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">id</td>
<td>分类ID</td>
</tr>
<tr>
<td style="text-align: left;">sku_ids</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">string</td>
<td>1,2,3</td>
</tr>
<tr>
<td style="text-align: left;">price</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">string</td>
<td>10,100 ,如果选择了自定义的价格范围 请传递这个字段</td>
</tr>
<tr>
<td style="text-align: left;">page</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">int</td>
<td>页数,不传递的话默认第一页面</td>
</tr>
<tr>
<td style="text-align: left;">page_size</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">int</td>
<td>每页显示多少条, 默认10条</td>
</tr>
<tr>
<td style="text-align: left;">keyword</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">sring</td>
<td>当是搜索页面的时候 这个字段传递下。</td>
</tr>
<tr>
<td style="text-align: left;">field</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">sring</td>
<td>排序的Key , 价格:price , 销量:sales_count</td>
</tr>
<tr>
<td style="text-align: left;">order</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">int</td>
<td>1: asc , 2:desc</td>
</tr>
</tbody>
</table>
<p><strong>返回示例</strong></p>
<table width='100%' class='codestyle'><pre><code> {
status: 1,
message: "ok",
result: {
total_page_num: 10,
count:100
page: 1,
page_size: 10,
list: [
{
id: 1,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 12.13,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg",
sales_count: 123
},
{
id: 1,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 12.13,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg",
sales_count: 123
},
{
id: 1,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 12.13,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg",
sales_count: 123
},
{
id: 1,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 12.13,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg",
sales_count: 123
},
{
id: 1,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 12.13,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg",
sales_count: 123
},
{
id: 1,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 12.13,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg",
sales_count: 123
},
{
id: 1,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 12.13,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg",
sales_count: 123
},
{
id: 1,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 12.13,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg",
sales_count: 123
},
{
id: 1,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 12.13,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg",
sales_count: 123
},
{
id: 1,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 12.13,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg",
sales_count: 123
}
]
}
}</code></pre></table>
<p><strong>返回参数说明</strong> </p>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">total_page_num</td>
<td style="text-align: left;">int</td>
<td>一共多少页</td>
</tr>
<tr>
<td style="text-align: left;">count</td>
<td style="text-align: left;">int</td>
<td>一共多少商品</td>
</tr>
<tr>
<td style="text-align: left;">sales_count</td>
<td style="text-align: left;">int</td>
<td>销量</td>
</tr>
</tbody>
</table>
<p><strong>备注</strong> </p>
<ul>
<li>更多返回错误代码请看首页的错误代码描述</li>
</ul></div><h2>5.4、获取子分类</h2><div style="margin-left:0px;"><p><strong>简要描述:</strong> </p>
<ul>
<li>根据分类ID获取子分类</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li>
<p><code>/api/subcategory/分类ID</code></p>
<p><strong>返回示例</strong></p>
</li>
</ul>
<table width='100%' class='codestyle'><pre><code> {
status: 1,
message: "ok",
result: [
{
id: 21,
name: "点二到三分类1"
},
{
id: 22,
name: "点二级三分类2"
},
{
id: 33,
name: "点二到三分类3"
},
{
id: 134,
name: "点二到三分类4"
},
{
id: 154,
name: "点二到三分类5"
}
]
}</code></pre></table>
<p><strong>返回参数说明</strong> </p>
<p><strong>备注</strong> </p>
<ul>
<li>更多返回错误代码请看首页的错误代码描述</li>
</ul></div><h2>5.5、获取搜索关键词</h2><div style="margin-left:0px;"><p><strong>简要描述:</strong> </p>
<ul>
<li>搜索关键词</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>/api/mall.recommend/searchTop</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>GET </li>
</ul>
<p><strong>参数:</strong> </p>
<p></p>
<p><strong>返回示例</strong></p>
<table width='100%' class='codestyle'><pre><code> {
status: 1,
message: "OK",
result: [
"鞋子",
"iphonexr",
"iphonex max",
"singwa",
"mac book"
]
}</code></pre></table>
<p><strong>备注</strong> </p>
<ul>
<li>更多返回错误代码请看首页的错误代码描述</li>
</ul></div><h2>5.6、获取推荐商品</h2><div style="margin-left:0px;"><p><strong>简要描述:</strong> </p>
<ul>
<li>获取推荐商品</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>/api/mall.recommend</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>GET </li>
</ul>
<p><strong>参数:</strong> </p>
<p></p>
<p><strong>返回示例</strong></p>
<table width='100%' class='codestyle'><pre><code> {
status: 1,
message: "OK",
result: [
{
id: 1,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 12.13,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
},
{
id: 2,
title: "2原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 12.13,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
},
{
id: 3,
title: "3原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 12.13,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
},
{
id: 4,
title: "4原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 12.13,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
},
{
id: 5,
title: "5原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 12.13,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg"
}
]
}</code></pre></table>
<ul>
<li>更多返回错误代码请看首页的错误代码描述</li>
</ul></div></div><h1>6、购物车</h1><div style="margin-left:0px;"><h2>6.1、添加购物车</h2><div style="margin-left:0px;"><p><strong>简要描述:</strong> </p>
<ul>
<li>添加购物车接口</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>/api/cart/add</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>POST </li>
</ul>
<p><strong>参数:</strong> </p>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必选</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">id</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">int</td>
<td>商品具体ID</td>
</tr>
<tr>
<td style="text-align: left;">num</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">int</td>
<td>商品数量</td>
</tr>
</tbody>
</table>
<p><strong>返回示例</strong></p>
<table width='100%' class='codestyle'><pre><code> {
"status": 1,
"message": "OK",
"result": []
}</code></pre></table></div><h2>6.2、购物车列表</h2><div style="margin-left:0px;"><p><strong>简要描述:</strong> </p>
<ul>
<li>购物车列表接口</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>/api/cart/lists</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>GET </li>
</ul>
<p>id = 1,2 如果传递了这个那说明是提交订单之前的页面,比如:如图
<img width=500 src="https://www.showdoc.cc/server/api/common/visitfile/sign/5393b3ca8169aeb5df8a276b2eb36bde?showdoc=.jpg" alt="" /></p>
<p><strong>返回示例</strong></p>
<table width='100%' class='codestyle'><pre><code> {
"status": 1,
"message": "OK",
"result": [
{
"id": 1,
"title": "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
"price": 12.13,
"num": 2,
"image": "http://testmall.singwa666.com/static/upload/image/10.jpg",
"sku": "颜色:红色 尺码:L"
},
{
"id": 2,
"title": "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏2",
"price": 12.13,
"num": 1,
"image": "http://testmall.singwa666.com/static/upload/image/10.jpg",
"sku": "颜色:黄色 尺码:LL"
}
]
}</code></pre></table></div><h2>6.3、删除购物车</h2><div style="margin-left:0px;"><p><strong>简要描述:</strong> </p>
<ul>
<li>添加购物车接口</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>/api/cart/delete</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>POST </li>
</ul>
<p><strong>参数:</strong> </p>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必选</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">id</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">int</td>
<td>商品具体ID</td>
</tr>
</tbody>
</table>
<p><strong>返回示例</strong></p>
<table width='100%' class='codestyle'><pre><code> {
"status": 1,
"message": "OK",
"result": []
}</code></pre></table></div><h2>6.4、修改购物车数量</h2><div style="margin-left:0px;"><p><strong>简要描述:</strong> </p>
<ul>
<li>修改购物车数量接口</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>http://xx.com/api/cart/update</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>POST </li>
</ul>
<p><strong>参数:</strong> </p>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必选</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">id</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">int</td>
<td>购物车ID</td>
</tr>
<tr>
<td style="text-align: left;">num</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">int</td>
<td>数量</td>
</tr>
</tbody>
</table></div></div><h1>7、订单相关</h1><div style="margin-left:0px;"><h2>7.1、初始化API</h2><div style="margin-left:0px;"><p><strong>简要描述:</strong> </p>
<ul>
<li>初始化接口</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>http://xx.com/api/api/mall.init</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>POST </li>
</ul>
<p><strong>参数:</strong> </p>
<p></p>
<p><strong>返回示例</strong></p>
<table width='100%' class='codestyle'><pre><code> {
status: 1,
message: "OK",
result: {
cart_num: 12
}
}</code></pre></table></div><h2>7.2、获取用户地址信息</h2><div style="margin-left:0px;"><p><strong>简要描述:</strong> </p>
<ul>
<li>地址信息接口</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>http://xx.com/api/address</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>GET </li>
</ul>
<p><strong>参数:</strong>
</p>
<p><strong>返回示例</strong></p>
<table width='100%' class='codestyle'><pre><code> {
status: 1,
message: "OK",
result: [
{
id: 1,
consignee_info: "江西省 上饶市 鄱阳县xxx 王新华收 180xxxx",
is_default: 1
},
{
id: 2,
consignee_info: "2江西省 上饶市 鄱阳县xxx 王新华收 180xxxx",
is_default: 0
},
{
id: 3,
consignee_info: "3江西省 上饶市 鄱阳县xxx 王新华收 180xxxx",
is_default: 0
}
]
}</code></pre></table>
<p><strong>返回参数说明</strong> </p>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">id</td>
<td style="text-align: left;">int</td>
<td>id</td>
</tr>
<tr>
<td style="text-align: left;">consignee_info</td>
<td style="text-align: left;">string</td>
<td>地址基本信息</td>
</tr>
<tr>
<td style="text-align: left;">is_default</td>
<td style="text-align: left;">int</td>
<td>1:默认地址, 0:不是默认</td>
</tr>
</tbody>
</table>
<p><strong>备注</strong> </p>
<ul>
<li>更多返回错误代码请看首页的错误代码描述</li>
</ul></div><h2>7.3、提交订单</h2><div style="margin-left:0px;"><p><strong>简要描述:</strong> </p>
<ul>
<li>提交订单接口</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>http://xx.com/api/order</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>POST </li>
</ul>
<p><strong>参数:</strong> </p>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必选</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">address_id</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">int</td>
<td>地址ID</td>
</tr>
<tr>
<td style="text-align: left;">cart_ids</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">string</td>
<td>购物车id: 如1,2,3</td>
</tr>
</tbody>
</table>
<p><strong>返回示例</strong></p>
<table width='100%' class='codestyle'><pre><code> {
"status": 1,
"message": "OK",
"result": {
"id": 108940795062
}
}</code></pre></table>
<p><strong>备注</strong> </p>
<ul>
<li>更多返回错误代码请看首页的错误代码描述</li>
</ul></div><h2>7.4、获取订单信息</h2><div style="margin-left:0px;"><p><strong>简要描述:</strong> </p>
<ul>
<li>获取订单接口</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>http://xx.com/api/order/订单ID</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>GET </li>
</ul>
<p><strong>参数:</strong> </p>
<p><strong>返回示例</strong></p>
<table width='100%' class='codestyle'><pre><code>{
status: 1,
message: "OK",
result: {
id: 108940795062,
price: 123.34,
consignee_info: "江西省 上饶市 鄱阳县xxx 王新华收 180xxxx",
create_time: "2020-01-20:12:34:67",
pay_time: "2020-01-20:12:35:67",
mall_title: "桂花树苗 嫁接桂花苗盆栽四季桂金桂浓香型庭院室内植物盆景室内阳台种植 白玉藤紫藤苗 三年苗,御春阁 火棘盆景下山桩火棘树桩冬天结果植物 庭院盆栽绿化",
malls: [
{
id: 1,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏",
price: 12.13,
num: 2,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg",
sku: "颜色:红色 尺码:L"
},
{
id: 2,
title: "原创设计日常汉服女款绣花长褙子吊带改良宋裤春夏2",
price: 12.13,
num: 1,
image: "http://testmall.singwa666.com/static/upload/image/10.jpg",
sku: "颜色:黄色 尺码:LL"
}
]
}</code></pre></table></div><h2>7.5、订单列表</h2><div style="margin-left:0px;"><p><strong>简要描述:</strong> </p>
<ul>
<li>订单列表接口</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>http://xx.com/api/order</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>
<p>GET</p>
<p><strong>参数说明</strong> </p>
</li>
</ul>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">type</td>
<td style="text-align: left;">int</td>
<td>1待支付2待发货3待收货4已完成5已取消</td>
</tr>
</tbody>
</table>
<p><strong>返回示例</strong></p>
<table width='100%' class='codestyle'><pre><code> {
status: 1,
message: "OK",
result: {
total_page_num: 1,
count: 4,
page: 1,
page_size: 10,
list: [
{
id: 123456,
cart_ids: "1,2",
create_time: "2020-01-20",
mall_title: "桂花树苗;嫁接桂花苗盆栽四季桂金桂浓香型庭院室内植物盆景室内阳台种植;白玉藤紫藤苗",
count: 3,
unit_price: "100,10,20.4",
price: "130.4",
type: 1,
type_name: "已完成"
},
{
id: 1234516,
cart_ids: "1",
create_time: "2020-01-20",
mall_title: "我就一个商品哦。",
count: 1,
unit_price: "100",
price: "100",
pay_status: 0,
type: 2,
type_name: "待支付"
},
{
id: 1234516,
cart_ids: "2",
create_time: "2020-01-20",
mall_title: "我就一个商品,但是我买了两件",
count: 2,
unit_price: "10",
price: "20",
type: 3,
type_name: "待发货"
},
{
id: 1234516,
cart_ids: "1,2",
create_time: "2020-01-20",
mall_title: "3桂花树苗;嫁接桂花苗盆栽四季桂金桂浓香型庭院室内植物盆景室内阳台种植;白玉藤紫藤苗",
count: 4,
unit_price: "100,10,20.4",
price: "130.4",
type: 4,
type_name: "待收货"
}
]
}
}</code></pre></table>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;"><strong>备注</strong></th>
<th style="text-align: left;">参数名</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">id</td>
<td style="text-align: left;">int</td>
<td>订单号</td>
</tr>
<tr>
<td style="text-align: left;">create_time</td>
<td style="text-align: left;">int</td>
<td>订单创建时间</td>
</tr>
<tr>
<td style="text-align: left;">mall_title</td>
<td style="text-align: left;">string</td>
<td>商品标题</td>
</tr>
<tr>
<td style="text-align: left;">count</td>
<td style="text-align: left;">int</td>
<td>商品数量</td>
</tr>
<tr>
<td style="text-align: left;">unit_price</td>
<td style="text-align: left;">int</td>
<td>单价</td>
</tr>
<tr>
<td style="text-align: left;">price</td>
<td style="text-align: left;">int</td>
<td>总价</td>
</tr>
</tbody>
</table>
<ul>
<li>更多返回错误代码请看首页的错误代码描述</li>
</ul></div><h2>7.6、取消/删除订单</h2><div style="margin-left:0px;"><p><strong>简要描述:</strong> </p>
<ul>
<li>取消订单接口</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>http://xx.com/api/order/订单ID</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>PUT</li>
</ul>
<p><strong>参数:</strong> </p>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必选</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">type</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">int</td>
<td>5 取消订单, 99:删除订单</td>
</tr>
</tbody>
</table></div></div><h1>8、支付</h1><div style="margin-left:0px;"><h2>8.1、页面异步回调订单支付状态</h2><div style="margin-left:0px;"><p><strong>简要描述:</strong> </p>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>http://xx.com/api/order.async/queryState</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>POST </li>
</ul>
<p><strong>参数:</strong> </p>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必选</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">order_id</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">int</td>
<td>订单ID</td>
</tr>
</tbody>
</table>
<p><strong>返回示例</strong></p>
<table width='100%' class='codestyle'><pre><code> {
status: 1,
message: "OK",
result: {
pay_status: 1
}
}</code></pre></table>
<p><strong>返回参数说明</strong> </p>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">pay_status</td>
<td style="text-align: left;">int</td>
<td>订单状态,1:支付成功;0 :未支付</td>
</tr>
</tbody>
</table>
<p><strong>备注</strong> </p>
<ul>
<li>更多返回错误代码请看首页的错误代码描述</li>
</ul></div><h2>8.2、支付</h2><div style="margin-left:0px;"><p><strong>简要描述:</strong> </p>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>http://xx.com/api/pay</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>POST </li>
</ul>
<p><strong>参数:</strong> </p>
<table>
<thead><tr style='background-color: rgb(0, 136, 204); color: rgb(255, 255, 255);'>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必选</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">order_id</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">int</td>
<td>订单号</td>
</tr>
<tr>
<td style="text-align: left;">pay_type</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">string</td>
<td>支付类型: alipay:支付宝 , weixin:微信支付</td>
</tr>
</tbody>
</table></div></div></body></html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/PHP-Daemon/tp6-mall.git
git@gitee.com:PHP-Daemon/tp6-mall.git
PHP-Daemon
tp6-mall
tp6-mall
master

搜索帮助