仰望星辰工作室

better-staridc-MNBT

better-staridc-MNBT/ docs/zjmf-api-doc/zjmf-api.md 1.2 MB · 46,568 行 原始文件
Z zfhsh first commit 1 天前
1# zjmf finance API doc
2
3> crawled from http://w2.test.idcsmart.com/doc at 2026-08-15 09:06 | actions: 1759
4> sources: doc_list.json + raw/*.html | re-crawl: powershell -ExecutionPolicy Bypass -File fetch_api_docs.ps1
5
6---
7
8## 前台首页
9
10### 前台首页 -- GET index
11
12- controller: ``app\home\controller\IndexController::index``
13- desc: 前台首页 -- wyh
14
15**response example**
16
17```json
18{
19  "status":200/201/203/204/400/401/406,
20  "msg":提示信息,
21  "data":{
22    "client":[{//客户信息
23      "username":"用户名",
24      "phonenumber":"手机号",
25      "credit":"余额",
26    }]
27    "ticket_count":"待处理工单",
28    "order_count":"待支付订单",
29    "over_due":"即将过期",
30    "intotal":"用户消费",
31    "invoice_unpaid:本月待支付":"",
32    "news":"公告通知",
33    "allow_recharge":"是否允许充值,1允许,充值按钮可用,0不允许,充值按钮不可用",
34  }
35}
36```
37
38### 销售列表 -- GET sale_list
39
40- controller: ``app\home\controller\IndexController::SaleList``
41- desc: 销售列表 -- liyongjun
42
43**response example**
44
45```json
46{
47  "status":200/201/203/204/400/401/406,
48  "msg":提示信息,
49  "data":{
50    "data":[{//销售列表
51    }]
52  }
53}
54```
55
56### 清除登录禁用缓存 -- GET del_cwxt_home_login
57
58- controller: ``app\home\controller\IndexController::del_cwxt_home_login``
59- desc: 清除登录禁用缓存 -- liyongjun
60
61**params**
62
63| name | type | required | default | other | desc |
64| --- | --- | --- | --- | --- | --- |
65| - | - | 非必填 | - | - | - |
66
67**response example**
68
69```json
70{
71  "status":200/201/203/204/400/401/406,
72  "msg":提示信息,
73  "data":{
74    "data":[{//销售列表
75    }]
76  }
77}
78```
79
80### 公共配置 -- GET common_list
81
82- controller: ``app\home\controller\IndexController::common_list``
83- desc: 公共配置 -- 菜鸟
84
85**response example**
86
87```json
88{
89  "status":200/201/203/204/400/401/406,
90  "msg":提示信息,
91  "data":{
92    "string logo_url - Logo地址1(登录页)":"",
93    "string logo_url_home - Logo地址2(客户中心)":"",
94    "string main_tenance_mode - 维护模式1=开启 0=关闭":"",
95    "string main_tenance_mode_message - 维护模式提示":"",
96    "string main_tenance_mode_url - 维护模式跳转地址":"",
97    "string language - 语言":"",
98    "string company_name - 公司名称":"",
99    "string domain - 网站域名":"",
100    "string system_url - 系统链接":"",
101    "string company_email - 公司邮箱":"",
102    "string certifi_open - 身份认证是否开启1=开启2=关闭":"",
103    "string map - 坐标":"",
104    "string company_profile - 公司简介":"",
105    "string msfntk - 作为cookie写入,并在发送短信时作为token传入":"",
106    "string main_phone - 手机":"",
107    "string main_address -地址":"",
108  }
109}
110```
111
112### 已开通列表 -- GET create_list
113
114- controller: ``app\home\controller\IndexController::createList``
115- desc: 已开通列表 -- lgd
116
117**response example**
118
119```json
120{
121  "status":200/201/203/204/400/401/406,
122  "msg":提示信息,
123  "data":{
124    "data":[{//销售列表
125    }]
126  }
127}
128```
129
130### 头部底部 -- GET /config_general/header
131
132- controller: ``app\home\controller\IndexController::getHeader``
133- desc: 头部底部 -- 萧十一郎
134
135**response example**
136
137```json
138{
139  "status":200/201/203/204/400/401/406,
140  "msg":提示信息,
141  "data":{
142    "header":"头部",
143    "footer":"底部",
144  }
145}
146```
147
148### 友情链接 -- GET config_general/friendlyLinks
149
150- controller: ``app\home\controller\IndexController::getFriendlyLinks``
151- desc: 友情链接 -- x
152
153**response example**
154
155```json
156{
157  "status":200/201/203/204/400/401/406,
158  "msg":提示信息,
159  "data":{
160    "array":"",
161  }
162}
163```
164
165### 用户可添加目录 -- GET /addindex_page
166
167- controller: ``app\home\controller\IndexController::addindexPage``
168- desc: 用户可添加目录 -- lgd
169
170**response example**
171
172```json
173{
174  "status":200/201/203/204/400/401/406,
175  "msg":提示信息,
176  "data":{
177    "data":[{//导航列表
178      "id":"产品分类ID",
179      "groupname":"产品分类name",
180      "fa_icon":"图标",
181    }]
182  }
183}
184```
185
186### 用户添加目录 -- POST /addindex_post
187
188- controller: ``app\home\controller\IndexController::addindexPost``
189- desc: 用户添加目录 -- lgd
190
191**params**
192
193| name | type | required | default | other | desc |
194| --- | --- | --- | --- | --- | --- |
195| id | 整型 | 非必填 | - | - | 分类id |
196
197**response example**
198
199```json
200{
201  "status":200/201/203/204/400/401/406,
202  "msg":提示信息,
203  "data":{
204  }
205}
206```
207
208### 用户目录删除 -- POST /addindex_del
209
210- controller: ``app\home\controller\IndexController::addindexDel``
211- desc: 用户目录删除 -- lgd
212
213**params**
214
215| name | type | required | default | other | desc |
216| --- | --- | --- | --- | --- | --- |
217| id | 整型 | 非必填 | - | - | 分类id |
218
219**response example**
220
221```json
222{
223  "status":200/201/203/204/400/401/406,
224  "msg":提示信息,
225  "data":{
226  }
227}
228```
229
230
231---
232
233## 微信
234
235### 扫码登录(线上) -- GET /wechat_login
236
237- controller: ``app\home\controller\WechatController::index``
238- desc: 扫码登录(线上) -- 上官磨刀
239
240**params**
241
242| name | type | required | default | other | desc |
243| --- | --- | --- | --- | --- | --- |
244| key | 必填 | - | 秘钥(区别设置) |
245
246**response example**
247
248```json
249{
250  "status":200/201/203/204/400/401/406,
251  "msg":提示信息,
252  "data":{
253    "data 微信二维码地址":"",
254  }
255}
256```
257
258### 获取微信二维码配置 -- GET /get_wechat_config
259
260- controller: ``app\home\controller\WechatController::get_wechat_config``
261- desc: 获取微信二维码配置 -- 上官磨刀
262
263**params**
264
265| name | type | required | default | other | desc |
266| --- | --- | --- | --- | --- | --- |
267| key | 必填 | - | 秘钥(区别设置) |
268
269**response example**
270
271```json
272{
273  "status":200/201/203/204/400/401/406,
274  "msg":提示信息,
275  "data":{
276    ".appid":"",
277    ".redirect_uri":"回调地址",
278    ".state":"签名",
279  }
280}
281```
282
283### 用户可添加目录 -- GET /addindex_page
284
285- controller: ``app\home\controller\WechatController::addindexPage``
286- desc: 用户可添加目录 -- lgd
287
288**params**
289
290| name | type | required | default | other | desc |
291| --- | --- | --- | --- | --- | --- |
292| key | 必填 | - | 秘钥(区别设置) |
293
294**response example**
295
296```json
297{
298  "status":200/201/203/204/400/401/406,
299  "msg":提示信息,
300  "data":{
301    "data":[{//导航列表
302      "id":"产品分类ID",
303      "groupname":"产品分类name",
304      "fa_icon":"图标",
305    }]
306  }
307}
308```
309
310### 用户添加目录 -- POST /addindex_post
311
312- controller: ``app\home\controller\WechatController::addindexPost``
313- desc: 用户添加目录 -- lgd
314
315**params**
316
317| name | type | required | default | other | desc |
318| --- | --- | --- | --- | --- | --- |
319| key | 必填 | - | 秘钥(区别设置) |
320
321**response example**
322
323```json
324{
325  "status":200/201/203/204/400/401/406,
326  "msg":提示信息,
327  "data":{
328  }
329}
330```
331
332### 用户目录删除 -- POST /addindex_del
333
334- controller: ``app\home\controller\WechatController::addindexDel``
335- desc: 用户目录删除 -- lgd
336
337**params**
338
339| name | type | required | default | other | desc |
340| --- | --- | --- | --- | --- | --- |
341| key | 必填 | - | 秘钥(区别设置) |
342
343**response example**
344
345```json
346{
347  "status":200/201/203/204/400/401/406,
348  "msg":提示信息,
349  "data":{
350  }
351}
352```
353
354
355---
356
357## 前台用户
358
359### 基本信息 -- GET /user_info
360
361- controller: ``app\home\controller\UserController::index``
362- desc: 基本信息 -- 上官🔪
363
364**response example**
365
366```json
367{
368  "status":200/201/203/204/400/401/406,
369  "msg":提示信息,
370  "data":{
371    ".username":"用户名",
372    ".usertype":"用户类型",
373    ".sex":"性别",
374    ".avatar":"头像",
375    ".profession":"职业",
376    ".signature":"个性签名",
377    ".companyname":"所在公司",
378    ".email":"邮件 邮箱有则绑定",
379    ".wechat_id":"微信id 大于0有则绑定",
380    ".country":"国家",
381    ".province":"省份",
382    ".city":"城市",
383    ".region":"区",
384    ".address1":"具体地址1",
385    ".postcode":"邮编",
386    ".phonenumber":"电话 有则绑定手机",
387    ".tax_id":"税号ID",
388    ".authmodule":"授权模块",
389    ".authdata":"授权数据",
390    ".currency":"使用货币ID",
391    ".defaultgateway":"选择默认支付接口",
392    ".credit":"信用卡",
393    ".taxexempt":"免税(1:是",
394    ".latefeeoveride":"滞纳金覆盖(1:是;0:否)",
395    ".overideduenotices":"覆盖过期notices(是,否)",
396    ".separateinvoices":"单独发票(1:是;0:否)",
397    ".disableautocc":"禁用自动CC处理(是,否)",
398    ".datecreated":"创建日期",
399    ".notes":"备注",
400    ".billingcid":"付款联系人(子账户)ID",
401    ".groupid":"用户组ID",
402    ".cardlastfour":"信用卡后四位",
403    ".cardnum":"信用卡号",
404    ".lastlogin":"最后登录时间",
405    ".host":"主机",
406    ".status":"状态(1激活,0未激活,2关闭)",
407    ".language":"语言",
408    ".marketing_emails_opt_in":"发送客户营销邮件(1:是;0:否)",
409    ".create_time":"创建时间",
410    ".update_time":"更新时间",
411    ".pwresetexpiry":"密码重置过期时间",
412    ".know_us":"了解途径",
413    ".initiative_renew":"是否使用余额自动续费(1使用,0不使用)",
414    ".is_login_sms_reminder":"是否开启登录短信提醒(1开启,0不开启)",
415    ".email_remind":"是否开启登录邮件提醒(1开启默认,0不开启)",
416    ".certifi.status 个人认证信息状态和失败原因(1已认证,2未通过,3待审核,4已提交资料)0=为认证":"",
417    ".certifi.type 认证类型certifi_pseson个人认证,certifi_company企业认证":"",
418    ".certifi.auth_fail 失败原因":"",
419    ".is_password 是否设置密码1=设置 0=未设置":"",
420    ".second_verify":" 是否开启二次验证:0否默认,1是",
421    "allow_resource_api":"是否开启api设置菜单",
422    "allow_second_verify":"是否开启二次验证设置菜单",
423    "second_verify_action_home":"需要二次验证的动作,数组(['name'=>'on','name_zh'=>'开机'],",
424    "cart_product_description":"购物车页面 应用说明",
425    "shd_allow_sms_send":"短信设置",
426    "shd_allow_email_send":"邮件设置",
427  }
428}
429```
430
431### 二次验证切换开关 -- POST /toggle_second_verify
432
433- controller: ``app\home\controller\UserController::toggleSecondVerify``
434- desc: 二次验证切换开关 -- wyh
435
436**params**
437
438| name | type | required | default | other | desc |
439| --- | --- | --- | --- | --- | --- |
440| second_verify | tinyint | 非必填 | 0 | 0关闭,1开启 | - |
441| code | 字符串 | 非必填 | 0 | 验证码 | - |
442| type | 字符串 | 非必填 | 0 | 发送验证方式,email,phone | - |
443
444**response example**
445
446```json
447{
448  "status":200/201/203/204/400/401/406,
449  "msg":提示信息,
450  "data":{
451  }
452}
453```
454
455### 二次验证页面 -- GET /second_verify_page
456
457- controller: ``app\home\controller\UserController::getSecondVerifyPage``
458- desc: 二次验证页面 -- wyh
459
460**response example**
461
462```json
463{
464  "status":200/201/203/204/400/401/406,
465  "msg":提示信息,
466  "data":{
467  }
468}
469```
470
471### 二次验证发送验证码 -- POST /second_verify_send
472
473- controller: ``app\home\controller\UserController::secondVerifySend``
474- desc: 二次验证发送验证码 -- wyh
475
476**params**
477
478| name | type | required | default | other | desc |
479| --- | --- | --- | --- | --- | --- |
480| type | 字符串 | 必填 | 0 | 发送方式email,phone | - |
481| action | 字符串 | 必填 | 0 | 发送动作(closed关闭二次验证) | - |
482
483**response example**
484
485```json
486{
487  "status":200/201/203/204/400/401/406,
488  "msg":提示信息,
489  "data":{
490  }
491}
492```
493
494### 修改api秘钥页面 -- GET /get_api_pwd
495
496- controller: ``app\home\controller\UserController::getApiPwd``
497- desc: 修改api秘钥页面 -- wyh
498
499**response example**
500
501```json
502{
503  "status":200/201/203/204/400/401/406,
504  "msg":提示信息,
505  "data":{
506  }
507}
508```
509
510### 修改api秘钥 -- POST /modify_api_pwd
511
512- controller: ``app\home\controller\UserController::modifyApiPwd``
513- desc: 修改api秘钥 -- wyh
514
515**params**
516
517| name | type | required | default | other | desc |
518| --- | --- | --- | --- | --- | --- |
519| api_password | 字符串 | 非必填 | 0 | api秘钥 | - |
520
521**response example**
522
523```json
524{
525  "status":200/201/203/204/400/401/406,
526  "msg":提示信息,
527  "data":{
528  }
529}
530```
531
532### 随机生成api秘钥 -- GET /auto_api_pwd
533
534- controller: ``app\home\controller\UserController::autoApiPwd``
535- desc: 随机生成api秘钥 -- wyh
536
537**response example**
538
539```json
540{
541  "status":200/201/203/204/400/401/406,
542  "msg":提示信息,
543  "data":{
544  }
545}
546```
547
548### 修改用户资料 -- PUT /user_info
549
550- controller: ``app\home\controller\UserController::update``
551- desc: 修改用户资料 -- 上官🔪
552
553**params**
554
555| name | type | required | default | other | desc |
556| --- | --- | --- | --- | --- | --- |
557| username | 字符串 | 必填 | 1 | - | 用户名 |
558| sex | 整型 | 必填 | 1 | - | 性别(0未知,1男,2女) |
559| avatar | 字符串 | 非必填 | 1 | - | 头像 |
560| profession | 字符串 | 非必填 | 1 | - | 职业 |
561| signature | 字符串 | 非必填 | 1 | - | 个性签名 |
562| companyname | 字符串 | 非必填 | 1 | - | 所在公司 |
563| email | 字符串 | 非必填 | 0 | - | 邮件 |
564| country | 字符串 | 非必填 | 0 | - | 国家 |
565| province | 字符串 | 非必填 | 0 | - | 省份 |
566| city | 字符串 | 非必填 | 0 | - | 城市 |
567| region | 字符串 | 非必填 | 0 | - | 区 |
568| address1 | 字符串 | 非必填 | 1 | - | 具体地址1 |
569| postcode | 字符串 | 非必填 | 1 | - | 邮编 |
570| phone_code | 整型 | 非必填 | 1 | - | 电话区号 |
571| phonenumber | 字符串 | 非必填 | 1 | - | 电话 |
572| currency | 整型 | 必填 | 1 | - | 使用货币ID |
573| defaultgateway | 字符串 | 必填 | 1 | - | 选择默认支付接口 |
574| notes | 字符串 | 非必填 | 0 | - | 管理员备注 |
575| groupid | 整型 | 非必填 | 0 | - | 用户组ID |
576| status | 整型 | 非必填 | 0 | - | 状态(0未激活,1激活,2关闭) |
577| language | 字符串 | 必填 | 0 | - | 语言(传zh_cn/zh_xg/en_us等) |
578| know_us | 字符串 | 非必填 | 0 | - | 了解途径 |
579| custom[id] | 字符串 | 必填 | 0 | - | 自定义字段值.形式:custom[id] |
580
581**response example**
582
583```json
584{
585  "status":200/201/203/204/400/401/406,
586  "msg":提示信息,
587  "data":{
588    ".username":"用户名",
589    ".usertype":"用户类型",
590    ".sex":"性别",
591    ".avatar":"头像",
592    ".profession":"职业",
593    ".signature":"个性签名",
594    ".companyname":"所在公司",
595    ".email":"邮件",
596    ".country":"国家",
597    ".province":"省份",
598    ".city":"城市",
599    ".region":"区",
600    ".address1":"具体地址1",
601    ".postcode":"邮编",
602    ".phonenumber":"电话",
603    ".tax_id":"税号ID",
604    ".authmodule":"授权模块",
605    ".authdata":"授权数据",
606    ".currency":"使用货币ID",
607    ".defaultgateway":"选择默认支付接口",
608    ".credit":"信用卡",
609    ".taxexempt":"免税(1:是",
610    ".latefeeoveride":"滞纳金覆盖(1:是;0:否)",
611    ".overideduenotices":"覆盖过期notices(是,否)",
612    ".separateinvoices":"单独发票(1:是;0:否)",
613    ".disableautocc":"禁用自动CC处理(是,否)",
614    ".datecreated":"创建日期",
615    ".notes":"备注",
616    ".billingcid":"付款联系人(子账户)ID",
617    ".groupid":"用户组ID",
618    ".cardlastfour":"信用卡后四位",
619    ".cardnum":"信用卡号",
620    ".lastlogin":"最后登录时间",
621    ".host":"主机",
622    ".status":"状态(1激活,0未激活,2关闭)",
623    ".language":"语言",
624    ".marketing_emails_opt_in":"发送客户营销邮件(1:是;0:否)",
625    ".create_time":"创建时间",
626    ".update_time":"更新时间",
627    ".pwresetexpiry":"密码重置过期时间",
628    ".know_us":"了解途径",
629  }
630}
631```
632
633### 绑定手机:发送验证码 --页面 -- GET check_origin_phone
634
635- controller: ``app\home\controller\UserController::checkOriginPhone``
636- desc: 绑定手机:发送验证码 --页面 -- wyh
637
638**response example**
639
640```json
641{
642  "status":200/201/203/204/400/401/406,
643  "msg":提示信息,
644  "data":{
645  }
646}
647```
648
649### 绑定手机:发送验证码 -- POST /bind_phone
650
651- controller: ``app\home\controller\UserController::bind_phone_send``
652- desc: 绑定手机:发送验证码 -- wyh
653
654**params**
655
656| name | type | required | default | other | desc |
657| --- | --- | --- | --- | --- | --- |
658| phone_code | 字符串 | 必填 | 1 | - | 国际手机区号 |
659| phone | 字符串 | 必填 | 1 | - | 手机号 |
660| mk | 字符串 | 必填 | - | - | common_list接口返回的msfntk作为cookie写入,并在发送短信时作为token传入 |
661
662**response example**
663
664```json
665{
666  "status":200/201/203/204/400/401/406,
667  "msg":提示信息,
668  "data":{
669  }
670}
671```
672
673### 绑定手机 -- POST bind_phone_handle
674
675- controller: ``app\home\controller\UserController::bind_phone_handle``
676- desc: 绑定手机 -- wyh
677
678**params**
679
680| name | type | required | default | other | desc |
681| --- | --- | --- | --- | --- | --- |
682| phone_code | 字符串 | 必填 | 1 | - | 国际手机区号 |
683| phone | 字符串 | 必填 | 1 | - | 手机号 |
684| code | 整型 | 必填 | - | - | 验证码 |
685
686**response example**
687
688```json
689{
690  "status":200/201/203/204/400/401/406,
691  "msg":提示信息,
692  "data":{
693  }
694}
695```
696
697### 更绑手机:发送手机验证码 -- GET /bind_phone_code
698
699- controller: ``app\home\controller\UserController::bind_phone_code``
700- desc: 更绑手机:发送手机验证码 -- 上官🔪
701
702**params**
703
704| name | type | required | default | other | desc |
705| --- | --- | --- | --- | --- | --- |
706| phone_code | 整型 | 必填 | - | - | 区号 |
707| tel | 整型 | 必填 | - | - | 手机号 |
708| mk | 字符串 | 必填 | - | - | common_list接口返回的msfntk作为cookie写入,并在发送短信时作为token传入 |
709| type | 整型 | 非必填 | - | - | 1为原手机验证,2为新手机验证 |
710
711**response example**
712
713```json
714{
715  "status":200/201/203/204/400/401/406,
716  "msg":提示信息,
717  "data":{
718  }
719}
720```
721
722### 更绑手机 -- POST bind_phone_change
723
724- controller: ``app\home\controller\UserController::bind_phone_change``
725- desc: 更绑手机 -- 上官🔪
726
727**params**
728
729| name | type | required | default | other | desc |
730| --- | --- | --- | --- | --- | --- |
731| tel | 整型 | 必填 | - | - | 手机号 |
732| code | 整型 | 必填 | - | - | 验证码 |
733| type | 整型 | 非必填 | - | - | 1为原手机验证,2为新手机验证 |
734
735**response example**
736
737```json
738{
739  "status":200/201/203/204/400/401/406,
740  "msg":提示信息,
741  "data":{
742  }
743}
744```
745
746### 展示 绑定微信二维码 -- GET /bind_wechat
747
748- controller: ``app\home\controller\UserController::bind_wechat``
749- desc: 展示 绑定微信二维码 -- 上官🔪
750
751**response example**
752
753```json
754{
755  "status":200/201/203/204/400/401/406,
756  "msg":提示信息,
757  "data":{
758    "data 微信二维码地址":"",
759  }
760}
761```
762
763### 微信绑定处理 -- GET bind_wechat_handle/:id/
764
765- controller: ``app\home\controller\UserController::bind_wechat_handle``
766- desc: 微信绑定处理 -- 请设置auhtor注释
767
768**params**
769
770| name | type | required | default | other | desc |
771| --- | --- | --- | --- | --- | --- |
772| code | 整型 | 必填 | - | - | 用户授权 |
773| state | 整型 | 必填 | - | - | 微信state |
774| id | 整型 | 非必填 | - | - | - |
775
776**response example**
777
778```json
779{
780  "status":200/201/203/204/400/401/406,
781  "msg":提示信息,
782  "data":{
783  }
784}
785```
786
787### 邮箱绑定:获取验证码 -- POST /bind_email
788
789- controller: ``app\home\controller\UserController::bind_email``
790- desc: 邮箱绑定:获取验证码 -- 请设置auhtor注释
791
792**params**
793
794| name | type | required | default | other | desc |
795| --- | --- | --- | --- | --- | --- |
796| email | str | 必填 | - | - | 邮箱 |
797
798**response example**
799
800```json
801{
802  "status":200/201/203/204/400/401/406,
803  "msg":提示信息,
804  "data":{
805  }
806}
807```
808
809### 邮箱绑定:执行 -- POST /bind_email_handle
810
811- controller: ``app\home\controller\UserController::bind_email_handle``
812- desc: 邮箱绑定:执行 -- 请设置auhtor注释
813
814**params**
815
816| name | type | required | default | other | desc |
817| --- | --- | --- | --- | --- | --- |
818| email | str | 必填 | - | - | 邮箱 |
819| code | 整型 | 必填 | - | - | 验证码 |
820
821**response example**
822
823```json
824{
825  "status":200/201/203/204/400/401/406,
826  "msg":提示信息,
827  "data":{
828  }
829}
830```
831
832### 邮箱更绑:获取验证码 -- POST /change_email
833
834- controller: ``app\home\controller\UserController::change_email``
835- desc: 邮箱更绑:获取验证码 -- 上官🔪
836
837**params**
838
839| name | type | required | default | other | desc |
840| --- | --- | --- | --- | --- | --- |
841| email | str | 必填 | - | - | 邮箱 |
842| type | 整型 | 非必填 | 1 | - | 1:原邮箱获取,2:新邮箱获取 |
843
844**response example**
845
846```json
847{
848  "status":200/201/203/204/400/401/406,
849  "msg":提示信息,
850  "data":{
851  }
852}
853```
854
855### 邮箱更绑:执行验证 -- POST /change_email_handle
856
857- controller: ``app\home\controller\UserController::change_email_handle``
858- desc: 邮箱更绑:执行验证 -- 上官🔪
859
860**params**
861
862| name | type | required | default | other | desc |
863| --- | --- | --- | --- | --- | --- |
864| email | str | 必填 | - | - | 邮箱 |
865| code | str | 必填 | - | - | 验证码 |
866| type | 整型 | 非必填 | 1 | - | 1:原邮箱验证,2:新邮箱验证 |
867
868**response example**
869
870```json
871{
872  "status":200/201/203/204/400/401/406,
873  "msg":提示信息,
874  "data":{
875  }
876}
877```
878
879### 用户日志 -- GET /user_action_log/:page/
880
881- controller: ``app\home\controller\UserController::user_action_log``
882- desc: 用户日志 -- 上官🔪
883
884**params**
885
886| name | type | required | default | other | desc |
887| --- | --- | --- | --- | --- | --- |
888| page | 整型 | 非必填 | 1 | - | 分页 |
889| page_size | 整型 | 非必填 | 10 | - | 页数据 |
890| action | 整型 | 非必填 | 空字符传 | - | login=登录日志 |
891| keywords | 整型 | 非必填 | - | - | 关键字 |
892
893**response example**
894
895```json
896{
897  "status":200/201/203/204/400/401/406,
898  "msg":提示信息,
899  "data":{
900    ".id":"",
901    ".username":"用户名",
902    ".url":"拜访资源",
903    ".ip":"ip",
904    ".create_time":"时间戳",
905  }
906}
907```
908
909### 地区列表 -- GET /areas/:pid/
910
911- controller: ``app\home\controller\UserController::areas``
912- desc: 地区列表 -- 上官🔪
913
914**params**
915
916| name | type | required | default | other | desc |
917| --- | --- | --- | --- | --- | --- |
918| pid | 整型 | 非必填 | 1 | - | - |
919
920**response example**
921
922```json
923{
924  "status":200/201/203/204/400/401/406,
925  "msg":提示信息,
926  "data":{
927    ".area_id":" 地区id",
928    ".name":"名称",
929    ".pid":"父级id",
930  }
931}
932```
933
934### 获取国家列表 -- GET /country
935
936- controller: ``app\home\controller\UserController::country``
937- desc: 获取国家列表 -- 上官🔪
938
939**response example**
940
941```json
942{
943  "status":200/201/203/204/400/401/406,
944  "msg":提示信息,
945  "data":{
946    ".id":" 国家id",
947    ".name":"名称",
948  }
949}
950```
951
952### 用户修改密码 -- POST modify_password
953
954- controller: ``app\home\controller\UserController::modifyPassword``
955- desc: 用户修改密码 -- wyh
956
957**params**
958
959| name | type | required | default | other | desc |
960| --- | --- | --- | --- | --- | --- |
961| old_password | 字符串 | 非必填 | 1 | - | - |
962| password | 字符串 | 必填 | 1 | - | 新密码 |
963| re_password | 字符串 | 必填 | 1 | - | 重复新密码 |
964| code | 字符串 | 必填 | 1 | - | 验证码 |
965| flag | 字符串 | 必填 | 1 | - | 1为有原密码2为没有原密码 |
966
967**response example**
968
969```json
970{
971  "status":200/201/203/204/400/401/406,
972  "msg":提示信息,
973  "data":{
974  }
975}
976```
977
978### 登录短信提醒 -- POST login_sms_reminder
979
980- controller: ``app\home\controller\UserController::loginSmsReminder``
981- desc: 登录短信提醒 -- liyongjun
982
983**params**
984
985| name | type | required | default | other | desc |
986| --- | --- | --- | --- | --- | --- |
987| status | 整型 | 必填 | 0 | - | 开启1=开启0=关闭 |
988| code | 整型 | 非必填 | 0 | - | 关闭的时候需要短信验证 |
989
990**response example**
991
992```json
993{
994  "status":200/201/203/204/400/401/406,
995  "msg":提示信息,
996  "data":{
997  }
998}
999```
1000
1001### 登录提醒关闭验证短信发送 -- GET /remind_send
1002
1003- controller: ``app\home\controller\UserController::remindSend``
1004- desc: 登录提醒关闭验证短信发送 -- lyj
1005
1006**params**
1007
1008| name | type | required | default | other | desc |
1009| --- | --- | --- | --- | --- | --- |
1010| captcha | 整型 | 非必填 | 0 | - | - |
1011
1012**response example**
1013
1014```json
1015{
1016  "status":200/201/203/204/400/401/406,
1017  "msg":提示信息,
1018  "data":{
1019  }
1020}
1021```
1022
1023### 登录提醒关闭验证邮件发送 -- GET /remind_email_send
1024
1025- controller: ``app\home\controller\UserController::remindEmailSend``
1026- desc: 登录提醒关闭验证邮件发送 -- wyh
1027
1028**params**
1029
1030| name | type | required | default | other | desc |
1031| --- | --- | --- | --- | --- | --- |
1032| captcha | 整型 | 非必填 | 0 | - | - |
1033
1034**response example**
1035
1036```json
1037{
1038  "status":200/201/203/204/400/401/406,
1039  "msg":提示信息,
1040  "data":{
1041  }
1042}
1043```
1044
1045### 登录邮件提醒 -- POST login_email_reminder
1046
1047- controller: ``app\home\controller\UserController::loginEmailReminder``
1048- desc: 登录邮件提醒 -- wyh
1049
1050**params**
1051
1052| name | type | required | default | other | desc |
1053| --- | --- | --- | --- | --- | --- |
1054| status | 整型 | 必填 | 0 | - | 开启1=开启0=关闭 |
1055| code | 整型 | 非必填 | 0 | - | 关闭的时候需要短信验证 |
1056
1057**response example**
1058
1059```json
1060{
1061  "status":200/201/203/204/400/401/406,
1062  "msg":提示信息,
1063  "data":{
1064  }
1065}
1066```
1067
1068### 获取地址信息 -- GET get_areas
1069
1070- controller: ``app\home\controller\UserController::getAreas``
1071- desc: 获取地址信息 -- liyongjun
1072
1073**response example**
1074
1075```json
1076{
1077  "status":200/201/203/204/400/401/406,
1078  "msg":提示信息,
1079  "data":{
1080    "areas - 地址信息(数组)":"",
1081    "country - 国家信息(数组)":"",
1082  }
1083}
1084```
1085
1086### 获取销售员 -- GET get_saler
1087
1088- controller: ``app\home\controller\UserController::getSaler``
1089- desc: 获取销售员 -- lgd
1090
1091**response example**
1092
1093```json
1094{
1095  "status":200/201/203/204/400/401/406,
1096  "msg":提示信息,
1097  "data":{
1098    "list":[{//销售员数据
1099      "id":"销售员id",
1100      "user_nickname":"销售员昵称",
1101      "user_email":"销售员邮箱",
1102    }]
1103    "saleset":[{//是否显示销售
1104    }]
1105  }
1106}
1107```
1108
1109### 设定销售员 -- POST set_saler
1110
1111- controller: ``app\home\controller\UserController::setSaler``
1112- desc: 设定销售员 -- lgd
1113
1114**params**
1115
1116| name | type | required | default | other | desc |
1117| --- | --- | --- | --- | --- | --- |
1118| uid | 整型 | 非必填 | 1 | - | 用户id |
1119| sale_id | 整型 | 非必填 | 1 | - | 销售员id |
1120| type | 整型 | 非必填 | 1 | - | 1下单2注册 |
1121
1122**response example**
1123
1124```json
1125{
1126  "status":200/201/203/204/400/401/406,
1127  "msg":提示信息,
1128  "data":{
1129  }
1130}
1131```
1132
1133### 注销 -- GET /logOut
1134
1135- controller: ``app\home\controller\UserController::logOut``
1136- desc: 注销 -- 请设置auhtor注释
1137
1138**response example**
1139
1140```json
1141{
1142  "status":200/201/203/204/400/401/406,
1143  "msg":提示信息,
1144  "data":{
1145  }
1146}
1147```
1148
1149### 用户可添加目录 -- GET /addindex_page
1150
1151- controller: ``app\home\controller\UserController::addindexPage``
1152- desc: 用户可添加目录 -- lgd
1153
1154**response example**
1155
1156```json
1157{
1158  "status":200/201/203/204/400/401/406,
1159  "msg":提示信息,
1160  "data":{
1161    "data":[{//导航列表
1162      "id":"产品分类ID",
1163      "groupname":"产品分类name",
1164      "fa_icon":"图标",
1165    }]
1166  }
1167}
1168```
1169
1170### 用户添加目录 -- POST /addindex_post
1171
1172- controller: ``app\home\controller\UserController::addindexPost``
1173- desc: 用户添加目录 -- lgd
1174
1175**params**
1176
1177| name | type | required | default | other | desc |
1178| --- | --- | --- | --- | --- | --- |
1179| id | 整型 | 非必填 | - | - | 分类id |
1180
1181**response example**
1182
1183```json
1184{
1185  "status":200/201/203/204/400/401/406,
1186  "msg":提示信息,
1187  "data":{
1188  }
1189}
1190```
1191
1192### 用户目录删除 -- POST /addindex_del
1193
1194- controller: ``app\home\controller\UserController::addindexDel``
1195- desc: 用户目录删除 -- lgd
1196
1197**params**
1198
1199| name | type | required | default | other | desc |
1200| --- | --- | --- | --- | --- | --- |
1201| id | 整型 | 非必填 | - | - | 分类id |
1202
1203**response example**
1204
1205```json
1206{
1207  "status":200/201/203/204/400/401/406,
1208  "msg":提示信息,
1209  "data":{
1210  }
1211}
1212```
1213
1214
1215---
1216
1217## 前台登录
1218
1219### 登录、注册页面 -- GET /login_register_index
1220
1221- controller: ``app\home\controller\LoginController::LoginRegisterIndex``
1222- desc: 登录、注册页面 -- wyh
1223
1224**response example**
1225
1226```json
1227{
1228  "status":200/201/203/204/400/401/406,
1229  "msg":提示信息,
1230  "data":{
1231    "allow_second_verify":"是否开启二次验证设置菜单",
1232    "second_verify_action_home":"需要二次验证的动作,数组(['name'=>'on','name_zh'=>'开机'],",
1233  }
1234}
1235```
1236
1237### 登录短信验证码发送 -- POST /login_send
1238
1239- controller: ``app\home\controller\LoginController::mobileSend``
1240- desc: 登录短信验证码发送 -- wyh
1241
1242**params**
1243
1244| name | type | required | default | other | desc |
1245| --- | --- | --- | --- | --- | --- |
1246| phone_code | 字符串 | 必填 | 1 | - | 国际手机区号 |
1247| phone | 字符串 | 必填 | 1 | - | 手机号 |
1248| mk | 字符串 | 必填 | - | - | common_list接口返回的msfntk作为cookie写入,并在发送短信时作为token传入 |
1249
1250**response example**
1251
1252```json
1253{
1254  "status":200/201/203/204/400/401/406,
1255  "msg":提示信息,
1256  "data":{
1257  }
1258}
1259```
1260
1261### 手机+验证码登录页面(手机+密码登录页面)获取国际手机区号 -- GET /mobile_login_page
1262
1263- controller: ``app\home\controller\LoginController::mobileLoginVerifyPage``
1264- desc: 手机+验证码登录页面(手机+密码登录页面)获取国际手机区号 -- wyh
1265
1266**params**
1267
1268| name | type | required | default | other | desc |
1269| --- | --- | --- | --- | --- | --- |
1270| phone | 字符串 | 必填 | 1 | - | 手机号 |
1271| code | 字符串 | 必填 | 1 | - | 验证码 |
1272
1273**response example**
1274
1275```json
1276{
1277  "status":200/201/203/204/400/401/406,
1278  "msg":提示信息,
1279  "data":{
1280  }
1281}
1282```
1283
1284### 手机+验证码登录 -- POST /mobile_login
1285
1286- controller: ``app\home\controller\LoginController::mobileLoginVerify``
1287- desc: 手机+验证码登录 -- wyh
1288
1289**params**
1290
1291| name | type | required | default | other | desc |
1292| --- | --- | --- | --- | --- | --- |
1293| phone_code | 字符串 | 必填 | 1 | - | 国际手机区号 |
1294| phone | 字符串 | 必填 | 1 | - | 手机号 |
1295| code | 字符串 | 必填 | 1 | - | 验证码 |
1296
1297**response example**
1298
1299```json
1300{
1301  "status":200/201/203/204/400/401/406,
1302  "msg":提示信息,
1303  "data":{
1304  }
1305}
1306```
1307
1308### 手机+密码登录 -- POST /login_pass_phone
1309
1310- controller: ``app\home\controller\LoginController::phonePassLogin``
1311- desc: 手机+密码登录 -- wyh
1312
1313**params**
1314
1315| name | type | required | default | other | desc |
1316| --- | --- | --- | --- | --- | --- |
1317| phone_code | 字符串 | 必填 | 1 | - | 国际手机区号 |
1318| phone | 字符串 | 必填 | 1 | - | 手机号 |
1319| password | 字符串 | 必填 | 1 | - | 密码 |
1320| code | 字符串 | 非必填 | 0 | - | 验证码 |
1321
1322**response example**
1323
1324```json
1325{
1326  "status":200/201/203/204/400/401/406,
1327  "msg":提示信息,
1328  "data":{
1329  }
1330}
1331```
1332
1333### 邮箱+密码登录 -- POST /login_pass_email
1334
1335- controller: ``app\home\controller\LoginController::emailLogin``
1336- desc: 邮箱+密码登录 -- wyh
1337
1338**params**
1339
1340| name | type | required | default | other | desc |
1341| --- | --- | --- | --- | --- | --- |
1342| email | 字符串 | 必填 | 1 | - | 邮箱 |
1343| password | 字符串 | 必填 | 1 | - | 密码 |
1344| code | 字符串 | 非必填 | 1 | - | 验证码 |
1345
1346**response example**
1347
1348```json
1349{
1350  "status":200/201/203/204/400/401/406,
1351  "msg":提示信息,
1352  "data":{
1353  }
1354}
1355```
1356
1357### 推介计划入口 -- GET /aff
1358
1359- controller: ``app\home\controller\LoginController::aff``
1360- desc: 推介计划入口 -- lgd
1361
1362**response example**
1363
1364```json
1365{
1366  "status":200/201/203/204/400/401/406,
1367  "msg":提示信息,
1368  "data":{
1369  }
1370}
1371```
1372
1373### api接口登录、验证 -- POST /zjmf_api_login
1374
1375- controller: ``app\home\controller\LoginController::zjmfApiLogin``
1376- desc: api接口登录、验证 -- wyh
1377
1378**params**
1379
1380| name | type | required | default | other | desc |
1381| --- | --- | --- | --- | --- | --- |
1382| username | 字符串 | 必填 | 1 | - | 用户名(手机号+区号 |
1383| password | 字符串 | 必填 | 1 | - | 密码 |
1384
1385**response example**
1386
1387```json
1388{
1389  "status":200/201/203/204/400/401/406,
1390  "msg":提示信息,
1391  "data":{
1392  }
1393}
1394```
1395
1396### 资源池登录供应商 -- POST /resource_login_supplier
1397
1398- controller: ``app\home\controller\LoginController::resourceLogin``
1399- desc: 资源池登录供应商 -- wyh
1400
1401**params**
1402
1403| name | type | required | default | other | desc |
1404| --- | --- | --- | --- | --- | --- |
1405| username | 字符串 | 必填 | 1 | - | 用户名(手机号+区号 |
1406| password | 字符串 | 必填 | 1 | - | 密码 |
1407
1408**response example**
1409
1410```json
1411{
1412  "status":200/201/203/204/400/401/406,
1413  "msg":提示信息,
1414  "data":{
1415  }
1416}
1417```
1418
1419### 产品服务列表页面 -- GET /product_list_page
1420
1421- controller: ``app\home\controller\LoginController::getProuductlistPage``
1422- desc: 产品服务列表页面 -- lgd
1423
1424**params**
1425
1426| name | type | required | default | other | desc |
1427| --- | --- | --- | --- | --- | --- |
1428| type | 字符串 | 非必填 | - | - | 产品类型(dcim智简魔方裸金属,dcimcloud智简魔方云)不传则为通用产品 |
1429
1430**response example**
1431
1432```json
1433{
1434  "status":200/201/203/204/400/401/406,
1435  "msg":提示信息,
1436  "data":{
1437    "id":"产品组ID",
1438    "name":"产品组名称",
1439    "headline":"产品组标题",
1440    "tagline":"产品组标语",
1441    "order_frm_tpl":"该产品组的购买模板",
1442    "disabled_gateways":"隐藏的网关,以逗号分隔",
1443    "hidden":"是否隐藏",
1444    "order":"排序",
1445    "create_time":"创建时间",
1446    "update_time":"修改时间",
1447    "products":[{//产品信息
1448      "id":"产品ID",
1449      "gid":"产品组ID",
1450      "type":"产品类型",
1451      "pay_type":"产品周期",
1452      "qty":"库存",
1453      "auto_setup":"自动开通:order,下单后;payment:支付后;on:手动审核",
1454    }]
1455  }
1456}
1457```
1458
1459### 二次验证页面 -- GET login/second_verify_page
1460
1461- controller: ``app\home\controller\LoginController::getSecondVerifyPage``
1462- desc: 二次验证页面 -- wyh
1463
1464**params**
1465
1466| name | type | required | default | other | desc |
1467| --- | --- | --- | --- | --- | --- |
1468| username | 字符串 | 非必填 | 0 | 用户名 | - |
1469| password | 字符串 | 非必填 | 0 | 密码 | - |
1470
1471**response example**
1472
1473```json
1474{
1475  "status":200/201/203/204/400/401/406,
1476  "msg":提示信息,
1477  "data":{
1478  }
1479}
1480```
1481
1482### 二次验证发送验证码 -- POST login/second_verify_send
1483
1484- controller: ``app\home\controller\LoginController::secondVerifySend``
1485- desc: 二次验证发送验证码 -- wyh
1486
1487**params**
1488
1489| name | type | required | default | other | desc |
1490| --- | --- | --- | --- | --- | --- |
1491| type | 字符串 | 必填 | 0 | 发送方式email,phone | - |
1492| action | 字符串 | 必填 | 0 | 发送动作(closed关闭二次验证) | - |
1493| username | 字符串 | 非必填 | 0 | 用户名 | - |
1494| password | 字符串 | 非必填 | 0 | 密码 | - |
1495
1496**response example**
1497
1498```json
1499{
1500  "status":200/201/203/204/400/401/406,
1501  "msg":提示信息,
1502  "data":{
1503  }
1504}
1505```
1506
1507### 验证码图形 -- GET verify
1508
1509- controller: ``app\home\controller\LoginController::verify``
1510- desc: 验证码图形 -- lgd
1511
1512**params**
1513
1514| name | type | required | default | other | desc |
1515| --- | --- | --- | --- | --- | --- |
1516| name | 字符串 | 必填 | 1 | - | - |
1517
1518**response example**
1519
1520```json
1521{
1522  "status":200/201/203/204/400/401/406,
1523  "msg":提示信息,
1524  "data":{
1525  }
1526}
1527```
1528
1529
1530---
1531
1532## 前台注册和密码重置
1533
1534### 短信注册--验证码发送 -- POST /register_phone_send
1535
1536- controller: ``app\home\controller\RegisterController::registerPhoneSend``
1537- desc: 短信注册--验证码发送 -- wyh
1538
1539**params**
1540
1541| name | type | required | default | other | desc |
1542| --- | --- | --- | --- | --- | --- |
1543| phone_code | 字符串 | 必填 | 1 | - | 国际手机区号 |
1544| phone | 字符串 | 必填 | 1 | - | 手机号 |
1545| mk | 字符串 | 必填 | - | - | common_list接口返回的msfntk作为cookie写入,并在发送短信时作为token传入 |
1546
1547**response example**
1548
1549```json
1550{
1551  "status":200/201/203/204/400/401/406,
1552  "msg":提示信息,
1553  "data":{
1554  }
1555}
1556```
1557
1558### 邮箱注册--验证码发送 -- POST /register_email_send
1559
1560- controller: ``app\home\controller\RegisterController::registerEmailSend``
1561- desc: 邮箱注册--验证码发送 -- wyh
1562
1563**params**
1564
1565| name | type | required | default | other | desc |
1566| --- | --- | --- | --- | --- | --- |
1567| email | 字符串 | 必填 | 1 | - | 邮箱 |
1568
1569**response example**
1570
1571```json
1572{
1573  "status":200/201/203/204/400/401/406,
1574  "msg":提示信息,
1575  "data":{
1576  }
1577}
1578```
1579
1580### 手机注册 -- POST /register_phone
1581
1582- controller: ``app\home\controller\RegisterController::registerPhone``
1583- desc: 手机注册 -- wyh
1584
1585**params**
1586
1587| name | type | required | default | other | desc |
1588| --- | --- | --- | --- | --- | --- |
1589| phone_code | 字符串 | 必填 | 1 | - | 手机号区号 |
1590| phone | 字符串 | 必填 | 1 | - | 手机号 |
1591| password | 字符串 | 必填 | 1 | - | 密码 |
1592| code | 字符串 | 必填 | 1 | - | 验证码 |
1593| sale_id | 字符串 | 非必填 | 1 | - | 销售员 |
1594| captcha | 字符串 | 必填 | 1 | - | 图形验证码 |
1595| fields[自定义字段ID] | 数组 | 非必填 | 1 | - | 值,此字段非必传参数,数组形式 |
1596
1597**response example**
1598
1599```json
1600{
1601  "status":200/201/203/204/400/401/406,
1602  "msg":提示信息,
1603  "data":{
1604  }
1605}
1606```
1607
1608### 邮箱注册 -- POST /register_email
1609
1610- controller: ``app\home\controller\RegisterController::registerEmail``
1611- desc: 邮箱注册 -- wyh
1612
1613**params**
1614
1615| name | type | required | default | other | desc |
1616| --- | --- | --- | --- | --- | --- |
1617| email | 字符串 | 必填 | 1 | - | 手机号 |
1618| password | 字符串 | 必填 | 1 | - | 密码 |
1619| code | 字符串 | 必填 | 1 | - | 验证码 |
1620| sale_id | 字符串 | 非必填 | 1 | - | 销售员 |
1621| captcha | 字符串 | 必填 | 1 | - | 图形验证码 |
1622| fields[自定义字段ID] | 数组 | 非必填 | 1 | - | 值,此字段非必传参数,数组形式 |
1623
1624**response example**
1625
1626```json
1627{
1628  "status":200/201/203/204/400/401/406,
1629  "msg":提示信息,
1630  "data":{
1631  }
1632}
1633```
1634
1635### 短信密码重置发送验证码 -- POST /reset_phone_send
1636
1637- controller: ``app\home\controller\RegisterController::resetPhoneSend``
1638- desc: 短信密码重置发送验证码 -- wyh
1639
1640**params**
1641
1642| name | type | required | default | other | desc |
1643| --- | --- | --- | --- | --- | --- |
1644| phone_code | 字符串 | 必填 | 1 | - | 区号 |
1645| phone | 字符串 | 必填 | 1 | - | 手机号 |
1646| mk | 字符串 | 必填 | - | - | common_list接口返回的msfntk作为cookie写入,并在发送短信时作为token传入 |
1647
1648**response example**
1649
1650```json
1651{
1652  "status":200/201/203/204/400/401/406,
1653  "msg":提示信息,
1654  "data":{
1655  }
1656}
1657```
1658
1659### 邮箱密码重置发送验证码 -- POST /reset_email_send
1660
1661- controller: ``app\home\controller\RegisterController::resetEmailSend``
1662- desc: 邮箱密码重置发送验证码 -- wyh
1663
1664**params**
1665
1666| name | type | required | default | other | desc |
1667| --- | --- | --- | --- | --- | --- |
1668| email | 字符串 | 必填 | 1 | - | 邮箱 |
1669
1670**response example**
1671
1672```json
1673{
1674  "status":200/201/203/204/400/401/406,
1675  "msg":提示信息,
1676  "data":{
1677  }
1678}
1679```
1680
1681### 手机验证码密码重置 -- POST /reset_phone
1682
1683- controller: ``app\home\controller\RegisterController::passPhoneReset``
1684- desc: 手机验证码密码重置 -- wyh
1685
1686**params**
1687
1688| name | type | required | default | other | desc |
1689| --- | --- | --- | --- | --- | --- |
1690| phone_code | 字符串 | 必填 | 1 | - | 区号 |
1691| phone | 字符串 | 必填 | 1 | - | 手机号 |
1692| password | 字符串 | 必填 | 1 | - | 密码 |
1693| code | 字符串 | 必填 | 1 | - | 验证码 |
1694
1695**response example**
1696
1697```json
1698{
1699  "status":200/201/203/204/400/401/406,
1700  "msg":提示信息,
1701  "data":{
1702  }
1703}
1704```
1705
1706### 邮箱验证码密码重置 -- POST /reset_email
1707
1708- controller: ``app\home\controller\RegisterController::passEmailReset``
1709- desc: 邮箱验证码密码重置 -- wyh
1710
1711**params**
1712
1713| name | type | required | default | other | desc |
1714| --- | --- | --- | --- | --- | --- |
1715| email | 字符串 | 必填 | 1 | - | 邮箱 |
1716| password | 字符串 | 必填 | 1 | - | 密码 |
1717| code | 字符串 | 必填 | 1 | - | 验证码 |
1718
1719**response example**
1720
1721```json
1722{
1723  "status":200/201/203/204/400/401/406,
1724  "msg":提示信息,
1725  "data":{
1726  }
1727}
1728```
1729
1730### 设定销售员 -- POST set_saler
1731
1732- controller: ``app\home\controller\RegisterController::getSalerId``
1733- desc: 设定销售员 -- lgd
1734
1735**params**
1736
1737| name | type | required | default | other | desc |
1738| --- | --- | --- | --- | --- | --- |
1739| sale_id | 整型 | 非必填 | 1 | - | 销售员id |
1740
1741**response example**
1742
1743```json
1744{
1745  "status":200/201/203/204/400/401/406,
1746  "msg":提示信息,
1747  "data":{
1748  }
1749}
1750```
1751
1752
1753---
1754
1755## 前台实名认证资料提交
1756
1757### 认证首页(判断) -- GET /certifi
1758
1759- controller: ``app\home\controller\CertificationController::certifi``
1760- desc: 认证首页(判断) -- wyh
1761
1762**response example**
1763
1764```json
1765{
1766  "status":200/201/203/204/400/401/406,
1767  "msg":提示信息,
1768  "data":{
1769    ".certifi_message":"认证信息,空,则未认证过;",
1770    ".auth_user_id":"用户id",
1771    ".auth_rela_name":"真实姓名",
1772    ".auth_card_type":"认证方式1=大陆 0 =非大陆",
1773    ".auth_card_number":"认证卡号",
1774    ".company_name":"公司名称",
1775    ".company_organ_code":"公司代码",
1776    ".img_one":"正面照片",
1777    ".img_two":"反面照片",
1778    ".img_three":"公司执照",
1779    ".status":"认证状态1已认证,2未通过,3待审核,4已提交资料0为认证",
1780    ".certifi_is_upload":"是否上传图片1=上传2=不上传",
1781    ".cerify_id":"阿里认证id",
1782    ".auth_fail":"失败原因",
1783    ".create_time":"创建时间",
1784    ".update_time":"修改时间",
1785    ".certifi.type 认证类型certifi_company=企业认证,certifi_person=个人认证":"",
1786  }
1787}
1788```
1789
1790### 企业认证资料提交 -- POST /company_certifi_post
1791
1792- controller: ``app\home\controller\CertificationController::companyCertifiPost``
1793- desc: 企业认证资料提交 -- wyh
1794
1795**params**
1796
1797| name | type | required | default | other | desc |
1798| --- | --- | --- | --- | --- | --- |
1799| certifi_type | 字符串 | 非必填 | 1 | - | 选择类型 |
1800| company_name | 字符串 | 必填 | 1 | - | 企业名称 |
1801| company_organ_code | 字符串 | 必填 | 1 | - | 营业执照号码 |
1802| real_name | 字符串 | 必填 | 1 | - | 提交人姓名 |
1803| card_type | tinyint | 必填 | 1 | - | card类型:1内地身份证(默认);0港澳台身份证 |
1804| idcard | 字符串 | 必填 | 1 | - | 身份证号 |
1805| idimage[] | image | 必填 | 1 | - | 身份证正面、反面、公司营业执照(多文件上传) |
1806
1807**response example**
1808
1809```json
1810{
1811  "status":200/201/203/204/400/401/406,
1812  "msg":提示信息,
1813  "data":{
1814  }
1815}
1816```
1817
1818### 个人认证转企业认证 -- POST /person_to_company
1819
1820- controller: ``app\home\controller\CertificationController::personToCompany``
1821- desc: 个人认证转企业认证 -- wyh
1822
1823**params**
1824
1825| name | type | required | default | other | desc |
1826| --- | --- | --- | --- | --- | --- |
1827| company_name | 字符串 | 必填 | 1 | - | 企业名称 |
1828| company_organ_code | 字符串 | 必填 | 1 | - | 营业执照号码 |
1829| real_name | 字符串 | 必填 | 1 | - | 提交人姓名 |
1830| card_type | tinyint | 必填 | 1 | - | card类型:1内地身份证(默认);0港澳台身份证 |
1831| idcard | 字符串 | 必填 | 1 | - | 身份证号 |
1832| idimage[] | image | 必填 | 1 | - | 身份证正面、反面、公司营业执照(多文件上传) |
1833
1834**response example**
1835
1836```json
1837{
1838  "status":200/201/203/204/400/401/406,
1839  "msg":提示信息,
1840  "data":{
1841  }
1842}
1843```
1844
1845### 查询认证是否完成 -- GET /certifi_ping
1846
1847- controller: ``app\home\controller\CertificationController::ping``
1848- desc: 查询认证是否完成 -- wyh
1849
1850**response example**
1851
1852```json
1853{
1854  "status":200/201/203/204/400/401/406,
1855  "msg":提示信息,
1856  "data":{
1857    "status":"400失败,200成功",
1858  }
1859}
1860```
1861
1862### 用户目录 -- GET /navindex
1863
1864- controller: ``app\home\controller\CertificationController::index``
1865- desc: 用户目录 -- lgd
1866
1867**response example**
1868
1869```json
1870{
1871  "status":200/201/203/204/400/401/406,
1872  "msg":提示信息,
1873  "data":{
1874    "data":[{//导航列表
1875      "id":"产品分类ID",
1876      "groupname":"产品分类name",
1877      "fa_icon":"图标",
1878    }]
1879  }
1880}
1881```
1882
1883### 用户可添加目录 -- GET /addindex_page
1884
1885- controller: ``app\home\controller\CertificationController::addindexPage``
1886- desc: 用户可添加目录 -- lgd
1887
1888**response example**
1889
1890```json
1891{
1892  "status":200/201/203/204/400/401/406,
1893  "msg":提示信息,
1894  "data":{
1895    "data":[{//导航列表
1896      "id":"产品分类ID",
1897      "groupname":"产品分类name",
1898      "fa_icon":"图标",
1899    }]
1900  }
1901}
1902```
1903
1904### 用户添加目录 -- POST /addindex_post
1905
1906- controller: ``app\home\controller\CertificationController::addindexPost``
1907- desc: 用户添加目录 -- lgd
1908
1909**params**
1910
1911| name | type | required | default | other | desc |
1912| --- | --- | --- | --- | --- | --- |
1913| id | 整型 | 非必填 | - | - | 分类id |
1914
1915**response example**
1916
1917```json
1918{
1919  "status":200/201/203/204/400/401/406,
1920  "msg":提示信息,
1921  "data":{
1922  }
1923}
1924```
1925
1926### 用户目录删除 -- POST /addindex_del
1927
1928- controller: ``app\home\controller\CertificationController::addindexDel``
1929- desc: 用户目录删除 -- lgd
1930
1931**params**
1932
1933| name | type | required | default | other | desc |
1934| --- | --- | --- | --- | --- | --- |
1935| id | 整型 | 非必填 | - | - | 分类id |
1936
1937**response example**
1938
1939```json
1940{
1941  "status":200/201/203/204/400/401/406,
1942  "msg":提示信息,
1943  "data":{
1944  }
1945}
1946```
1947
1948
1949---
1950
1951## 前台工单
1952
1953### 工单创建页面数据 -- GET ticket/ticket_page
1954
1955- controller: ``app\home\controller\TicketController::getOpenTicketPage``
1956- desc: 工单创建页面数据 -- 萧十一郎
1957
1958**response example**
1959
1960```json
1961{
1962  "status":200/201/203/204/400/401/406,
1963  "msg":提示信息,
1964  "data":{
1965    "have_user":"1",
1966    "user_info":[{//用户信息d
1967      "username":"用户名",
1968      "email":"邮箱",
1969    }]
1970    "host_list":"用户产品列表",
1971    "priority":"优先级",
1972    "depart":[{//部门d
1973      "id":"部门id",
1974      "name":"部门名称",
1975    }]
1976    "hosts":[{//产品列表
1977      "id":"购买产品ID",
1978      "name":"名称",
1979    }]
1980  }
1981}
1982```
1983
1984### 获取部门自定义字段数据 -- GET ticket/get_custom
1985
1986- controller: ``app\home\controller\TicketController::getTicketCustom``
1987- desc: 获取部门自定义字段数据 -- 萧十一郎
1988
1989**params**
1990
1991| name | type | required | default | other | desc |
1992| --- | --- | --- | --- | --- | --- |
1993| depart_id | number | 必填 | - | - | 部门id |
1994
1995**response example**
1996
1997```json
1998{
1999  "status":200/201/203/204/400/401/406,
2000  "msg":提示信息,
2001  "data":{
2002    "id":"字段id",
2003    "fieldname":"字段id",
2004    "fieldtype":"字段id",
2005    "description":"字段id",
2006    "fieldoptions":"",
2007    "child":"当类型dropdown时会存在,下拉数据",
2008    "regexpr":"验证正则表达式",
2009    "required":"是否必填",
2010  }
2011}
2012```
2013
2014### 获取可用部门列表 -- GET ticket/department
2015
2016- controller: ``app\home\controller\TicketController::getDepartmentList``
2017- desc: 获取可用部门列表 -- huanghao
2018
2019**response example**
2020
2021```json
2022{
2023  "status":200/201/203/204/400/401/406,
2024  "msg":提示信息,
2025  "data":{
2026    ".id":"部门id",
2027    ".name":"部门名称",
2028  }
2029}
2030```
2031
2032### 创建工单 -- POST ticket/create
2033
2034- controller: ``app\home\controller\TicketController::createTicket``
2035- desc: 创建工单 -- huanghao
2036
2037**params**
2038
2039| name | type | required | default | other | desc |
2040| --- | --- | --- | --- | --- | --- |
2041| name | 字符串 | 非必填 | - | - | 姓名 |
2042| email | 字符串 | 非必填 | - | - | 邮箱 |
2043| dptid | 整型 | 必填 | - | - | 部门id |
2044| service | 整型 | 非必填 | - | - | 服务id |
2045| priority | 字符串 | 非必填 | - | - | 优先级 |
2046| title | 字符串 | 必填 | - | - | 标题 |
2047| content | 字符串 | 必填 | - | - | 内容 |
2048| attachment | file | 非必填 | - | - | 附件 |
2049| customfield | 数组 | 非必填 | - | - | 自定义字段的值 |
2050| hostid | 数组 | 非必填 | - | - | 产品ID |
2051
2052**response example**
2053
2054```json
2055{
2056  "status":200/201/203/204/400/401/406,
2057  "msg":提示信息,
2058  "data":{
2059    ".tid":"工单号",
2060    ".c":"验证标识",
2061  }
2062}
2063```
2064
2065### 工单详情 -- GET ticket/detail
2066
2067- controller: ``app\home\controller\TicketController::ticketDetail``
2068- desc: 工单详情 -- huanghao
2069
2070**params**
2071
2072| name | type | required | default | other | desc |
2073| --- | --- | --- | --- | --- | --- |
2074| tid | 字符串 | 必填 | - | - | 工单号 |
2075| c | 字符串 | 非必填 | - | - | 工单标识 |
2076
2077**response example**
2078
2079```json
2080{
2081  "status":200/201/203/204/400/401/406,
2082  "msg":提示信息,
2083  "data":{
2084    ".list.id":"工单id|回复id",
2085    ".list.type":"类型,t工单,r回复",
2086    ".list.content":"内容",
2087    ".list.attachment":"附件",
2088    ".list.format_time":"时间",
2089    ".list.user":"发出人",
2090    ".list.user_type":"用户类型",
2091    ".list.star":"评价星级(只会在管理员回复有)",
2092    ".ticket.dptid":"工单部门id",
2093    ".ticket.title":"工单标题",
2094    ".ticket.status":"工单状态数组",
2095    ".ticket.priority":"优先级",
2096    ".evaluate":"客户是否能评价",
2097  }
2098}
2099```
2100
2101### 回复工单 -- POST ticket/reply
2102
2103- controller: ``app\home\controller\TicketController::replyTicket``
2104- desc: 回复工单 -- huanghao
2105
2106**params**
2107
2108| name | type | required | default | other | desc |
2109| --- | --- | --- | --- | --- | --- |
2110| tid | 字符串 | 必填 | - | - | 工单tid |
2111| c | 字符串 | 非必填 | - | - | 工单随机字串 |
2112| name | 字符串 | 非必填 | - | - | 姓名 |
2113| email | 字符串 | 非必填 | - | - | 邮箱 |
2114| content | 字符串 | 非必填 | - | - | 内容 |
2115| attachment | 字符串 | 非必填 | - | - | 附件 |
2116
2117**response example**
2118
2119```json
2120{
2121  "status":200/201/203/204/400/401/406,
2122  "msg":提示信息,
2123  "data":{
2124  }
2125}
2126```
2127
2128### 关闭工单 -- POST ticket/close
2129
2130- controller: ``app\home\controller\TicketController::closeTicket``
2131- desc: 关闭工单 -- huanghao
2132
2133**params**
2134
2135| name | type | required | default | other | desc |
2136| --- | --- | --- | --- | --- | --- |
2137| tid | 字符串 | 必填 | - | - | 工单号 |
2138| c | 字符串 | 非必填 | - | - | 工单标识 |
2139
2140**response example**
2141
2142```json
2143{
2144  "status":200/201/203/204/400/401/406,
2145  "msg":提示信息,
2146  "data":{
2147  }
2148}
2149```
2150
2151### 评价工单回复 -- POST ticket/evaluate
2152
2153- controller: ``app\home\controller\TicketController::evaluate``
2154- desc: 评价工单回复 -- huanghao
2155
2156**params**
2157
2158| name | type | required | default | other | desc |
2159| --- | --- | --- | --- | --- | --- |
2160| tid | 字符串 | 必填 | - | - | 工单号 |
2161| rid | 整型 | 必填 | - | - | 回复id |
2162| star | 整型 | 必填 | - | - | 评价星级 |
2163| type | 字符串 | 非必填 | r | - | 回复类下r |
2164
2165**response example**
2166
2167```json
2168{
2169  "status":200/201/203/204/400/401/406,
2170  "msg":提示信息,
2171  "data":{
2172  }
2173}
2174```
2175
2176### 获取工单列表 -- GET ticket/list
2177
2178- controller: ``app\home\controller\TicketController::getList``
2179- desc: 获取工单列表 -- huanghao
2180
2181**params**
2182
2183| name | type | required | default | other | desc |
2184| --- | --- | --- | --- | --- | --- |
2185| limit | - | 非必填 | - | - | 条数 |
2186| page | 整型 | 非必填 | - | - | 回复id |
2187
2188**response example**
2189
2190```json
2191{
2192  "status":200/201/203/204/400/401/406,
2193  "msg":提示信息,
2194  "data":{
2195    ".limit":"每页条数",
2196    ".page":"当前页数",
2197    ".sum":"总条数",
2198    ".list.id":"工单id",
2199    ".list.tid":"工单tid",
2200    ".list.title":"工单标题",
2201    ".list.status":"工单状态",
2202    ".list.last_reply_time":"最后回复时间戳",
2203    ".list.department_name":"部门名称",
2204    ".list.show_time":"格式化的最后回复时间",
2205    ".list.client_unread":"是否有未读回复",
2206  }
2207}
2208```
2209
2210### 下载回复中附件 -- POST直接访问 ticket/download
2211
2212- controller: ``app\home\controller\TicketController::downloadAttachment``
2213- desc: 下载回复中附件 -- huanghao
2214
2215**params**
2216
2217| name | type | required | default | other | desc |
2218| --- | --- | --- | --- | --- | --- |
2219| tid | 字符串 | 必填 | - | - | 工单号 |
2220| c | 字符串 | 非必填 | - | - | 工单标识 |
2221| rid | 整型 | 必填 | - | - | 工单回复id |
2222| index | 整型 | 必填 | - | - | 要下载的附件的index |
2223
2224**response example**
2225
2226```json
2227{
2228  "status":200/201/203/204/400/401/406,
2229  "msg":提示信息,
2230  "data":{
2231  }
2232}
2233```
2234
2235### 下载附件 -- GET ticket/download
2236
2237- controller: ``app\home\controller\TicketController::download``
2238- desc: 下载附件 -- liyongjun
2239
2240**params**
2241
2242| name | type | required | default | other | desc |
2243| --- | --- | --- | --- | --- | --- |
2244| type | 字符串 | 必填 | - | - | ticket=工单ticket_reply=工单回复 |
2245| id | 字符串 | 必填 | - | - | 文件所属id |
2246| filename | 整型 | 必填 | - | - | 返回的附件名称 |
2247
2248**response example**
2249
2250```json
2251{
2252  "status":200/201/203/204/400/401/406,
2253  "msg":提示信息,
2254  "data":{
2255  }
2256}
2257```
2258
2259### 用户目录 -- GET /navindex
2260
2261- controller: ``app\home\controller\TicketController::index``
2262- desc: 用户目录 -- lgd
2263
2264**response example**
2265
2266```json
2267{
2268  "status":200/201/203/204/400/401/406,
2269  "msg":提示信息,
2270  "data":{
2271    "data":[{//导航列表
2272      "id":"产品分类ID",
2273      "groupname":"产品分类name",
2274      "fa_icon":"图标",
2275    }]
2276  }
2277}
2278```
2279
2280### 用户可添加目录 -- GET /addindex_page
2281
2282- controller: ``app\home\controller\TicketController::addindexPage``
2283- desc: 用户可添加目录 -- lgd
2284
2285**response example**
2286
2287```json
2288{
2289  "status":200/201/203/204/400/401/406,
2290  "msg":提示信息,
2291  "data":{
2292    "data":[{//导航列表
2293      "id":"产品分类ID",
2294      "groupname":"产品分类name",
2295      "fa_icon":"图标",
2296    }]
2297  }
2298}
2299```
2300
2301### 用户添加目录 -- POST /addindex_post
2302
2303- controller: ``app\home\controller\TicketController::addindexPost``
2304- desc: 用户添加目录 -- lgd
2305
2306**params**
2307
2308| name | type | required | default | other | desc |
2309| --- | --- | --- | --- | --- | --- |
2310| id | 整型 | 非必填 | - | - | 分类id |
2311
2312**response example**
2313
2314```json
2315{
2316  "status":200/201/203/204/400/401/406,
2317  "msg":提示信息,
2318  "data":{
2319  }
2320}
2321```
2322
2323### 用户目录删除 -- POST /addindex_del
2324
2325- controller: ``app\home\controller\TicketController::addindexDel``
2326- desc: 用户目录删除 -- lgd
2327
2328**params**
2329
2330| name | type | required | default | other | desc |
2331| --- | --- | --- | --- | --- | --- |
2332| id | 整型 | 非必填 | - | - | 分类id |
2333
2334**response example**
2335
2336```json
2337{
2338  "status":200/201/203/204/400/401/406,
2339  "msg":提示信息,
2340  "data":{
2341  }
2342}
2343```
2344
2345
2346---
2347
2348## 前台购物车
2349
2350### 获取分组 -- POST /cart/productsgroups
2351
2352- controller: ``app\home\controller\CartController::postProductGroups``
2353- desc: 获取分组 -- xiong
2354
2355**response example**
2356
2357```json
2358{
2359  "status":200/201/203/204/400/401/406,
2360  "msg":提示信息,
2361  "data":{
2362  }
2363}
2364```
2365
2366### 导入商品 -- POST /cart/createproducts
2367
2368- controller: ``app\home\controller\CartController::postCreateProducts``
2369- desc: 导入商品 -- wyh
2370
2371**response example**
2372
2373```json
2374{
2375  "status":200/201/203/204/400/401/406,
2376  "msg":提示信息,
2377  "data":{
2378  }
2379}
2380```
2381
2382### 批量拉取产品信息的前台会员中心接口 -- GET /cart/hostinfo
2383
2384- controller: ``app\home\controller\CartController::hostInfo``
2385- desc: 批量拉取产品信息的前台会员中心接口 -- wyh
2386
2387**params**
2388
2389| name | type | required | default | other | desc |
2390| --- | --- | --- | --- | --- | --- |
2391| hostid[] | 整型 | 必填 | - | - | 产品ID,数组 |
2392| all | 整型 | 非必填 | - | - | 当all=1时,表示需要配置数据 |
2393
2394**response example**
2395
2396```json
2397{
2398  "status":200/201/203/204/400/401/406,
2399  "msg":提示信息,
2400  "data":{
2401    "hosts":[{//基础数据
2402      "domain":"主机dedicatedip:ipassignedips:附加ipcreate_time:购买时间nextduedate:到期时间billingcycle:周期billingcycle_zhfirstpaymentamount:首付金额amount:续费金额port:端口username:用户名password:密码initiative_renew:自动续费domainstatus:状态domainstatus_zh",
2403    }]
2404  }
2405}
2406```
2407
2408### API概览 -- GET /cart/summary
2409
2410- controller: ``app\home\controller\CartController::summary``
2411- desc: API概览 -- wyh
2412
2413**params**
2414
2415| name | type | required | default | other | desc |
2416| --- | --- | --- | --- | --- | --- |
2417| uid | 整型 | 必填 | - | - | 客户ID |
2418
2419**response example**
2420
2421```json
2422{
2423  "status":200/201/203/204/400/401/406,
2424  "msg":提示信息,
2425  "data":{
2426    "client":[{//基础数据
2427      "api_password":"api密钥api_create_time:开通时间agent_count:代理商品数量host_count:API产品数量",
2428      "active_count":"API产品数量",
2429      "api_count":"昨日api请求次数ratio:日环比up:1上升,0下降",
2430    }]
2431    "form_api":"最近7天每天的api请求次数",
2432    "free_products":[{//豁免产品
2433      "id":"name:名称ontrial:试用数量qty:最大购买数量",
2434    }]
2435  }
2436}
2437```
2438
2439### 获取所有产品 -- GET /cart/all
2440
2441- controller: ``app\home\controller\CartController::getProducts``
2442- desc: 获取所有产品 -- wyh
2443
2444**response example**
2445
2446```json
2447{
2448  "status":200/201/203/204/400/401/406,
2449  "msg":提示信息,
2450  "data":{
2451    ".products":"所有在售产品",
2452    ".count":"产品数量",
2453  }
2454}
2455```
2456
2457### 获取产品配置 -- GET /cart/get_product_config
2458
2459- controller: ``app\home\controller\CartController::getProductConfig``
2460- desc: 获取产品配置 -- wyh
2461
2462**params**
2463
2464| name | type | required | default | other | desc |
2465| --- | --- | --- | --- | --- | --- |
2466| pid | 整型 | 必填 | 1 | - | 产品ID |
2467
2468**response example**
2469
2470```json
2471{
2472  "status":200/201/203/204/400/401/406,
2473  "msg":提示信息,
2474  "data":{
2475    ".products":"",
2476  }
2477}
2478```
2479
2480### 产品搜索-- -- GET /cart/global_search
2481
2482- controller: ``app\home\controller\CartController::globalSearch``
2483- desc: 产品搜索-- -- wyh
2484
2485**params**
2486
2487| name | type | required | default | other | desc |
2488| --- | --- | --- | --- | --- | --- |
2489| keywords | 字符串 | 非必填 | 0 | - | 产品搜索关键词 |
2490
2491**response example**
2492
2493```json
2494{
2495  "status":200/201/203/204/400/401/406,
2496  "msg":提示信息,
2497  "data":{
2498    ".product_groups":"所有产品组信息",
2499    ".product_groups.id":"产品组id",
2500    ".product_groups.name":"产品组名称",
2501    ".product_groups.headline":"产品组标题",
2502    ".product_groups.tagline":"产品组标签",
2503    ".product_groups.order":"产品组排序",
2504    ".currencies":"所有货币信息",
2505    ".currencies.id":"所有货币信息",
2506    ".currencies.code":"符号",
2507    ".currencies.prefix":"前缀",
2508    ".currencies.suffix":"后缀",
2509    ".default_currency":"默认选中货币",
2510    ".products":"此产品组下所有产品的信息",
2511    ".products.id":"产品ID",
2512    ".products.type":"产品类型",
2513    ".products.gid":"产品所属产品组",
2514    ".products.name":"产品名称",
2515    ".products.description":"产品描述",
2516    ".products.pay_method":"付费方式(预付费'prepayment','后付费:postpaid',)",
2517    ".products.tax":"税率",
2518    ".products.order":"产品排序",
2519    ".products.currencyid.product_price":"此产品currencyid货币下的产品价格(选择周期第一个大于等于0的价格数据及相应的初装费)",
2520    ".products.currencyid.setup_fee":"此产品currencyid货币下的产品初装费",
2521    ".products.currencyid.billingcycle":"付费周期",
2522  }
2523}
2524```
2525
2526### 购物车支付,信用接口 -- GET /cartgateway
2527
2528- controller: ``app\home\controller\CartController::getGateway``
2529- desc: 购物车支付,信用接口 -- wyh
2530
2531**response example**
2532
2533```json
2534{
2535  "status":200/201/203/204/400/401/406,
2536  "msg":提示信息,
2537  "data":{
2538    "gateways":" 支付方式",
2539    "client":[{//客户
2540      "credit":"余额is_open_credit_limit:1开启信用额支付credit_limit_balance:信用额",
2541    }]
2542  }
2543}
2544```
2545
2546### 产品首页 -- GET /cart/index
2547
2548- controller: ``app\home\controller\CartController::index``
2549- desc: 产品首页 -- wyh
2550
2551**params**
2552
2553| name | type | required | default | other | desc |
2554| --- | --- | --- | --- | --- | --- |
2555| first_gid | 整型 | 非必填 | 1 | - | 一级分组ID |
2556| gid | 整型 | 非必填 | 1 | - | 产品组ID(可选参数,无此参数,默认显示数据库表第一个产品组及其产品) |
2557| keywords | 字符串 | 非必填 | 0 | - | 产品搜索关键词 |
2558| type | 字符串 | 非必填 | 1 | - | 官网应用商店列表uuid |
2559| currencyid | 整型 | 非必填 | 1 | - | 货币ID(可选) |
2560
2561**response example**
2562
2563```json
2564{
2565  "status":200/201/203/204/400/401/406,
2566  "msg":提示信息,
2567  "data":{
2568    "first_groups":"一级分组信息",
2569    ".product_groups":"所有产品组信息",
2570    ".product_groups.id":"产品组id",
2571    ".product_groups.name":"产品组名称",
2572    ".product_groups.headline":"产品组标题",
2573    ".product_groups.tagline":"产品组标签",
2574    ".product_groups.order":"产品组排序",
2575    ".currencies":"所有货币信息",
2576    ".currencies.id":"所有货币信息",
2577    ".currencies.code":"符号",
2578    ".currencies.prefix":"前缀",
2579    ".currencies.suffix":"后缀",
2580    ".default_currency":"默认选中货币",
2581    ".products":"此产品组下所有产品的信息",
2582    ".products.id":"产品ID",
2583    ".products.type":"产品类型",
2584    ".products.gid":"产品所属产品组",
2585    ".products.name":"产品名称",
2586    ".products.description":"产品描述",
2587    ".products.pay_method":"付费方式(预付费'prepayment','后付费:postpaid',)",
2588    ".products.tax":"税率",
2589    ".products.order":"产品排序",
2590    ".products.product_price":"产品价格",
2591    ".products.sale_price":"客户折扣价格",
2592    ".products.currencyid.product_price":"此产品currencyid货币下的产品价格(选择周期第一个大于等于0的价格数据及相应的初装费)",
2593    ".products.currencyid.setup_fee":"此产品currencyid货币下的产品初装费",
2594    ".products.currencyid.billingcycle":"付费周期",
2595    "ontrial":"1时,表示有试用周期,ontrial_cycle表示天数,ontrial_price表示产品价格,ontrial_setup_fee表示初装费;0时,不管;ontrial_cycle_type试用单位",
2596  }
2597}
2598```
2599
2600### 选择配置页面 -- GET /cart/set_config
2601
2602- controller: ``app\home\controller\CartController::setConfig``
2603- desc: 选择配置页面 -- wyh
2604
2605**params**
2606
2607| name | type | required | default | other | desc |
2608| --- | --- | --- | --- | --- | --- |
2609| pid | 整型 | 必填 | 1 | - | 产品ID |
2610| billingcycle | 整型 | 必填 | 1 | - | 周期 |
2611
2612**response example**
2613
2614```json
2615{
2616  "status":200/201/203/204/400/401/406,
2617  "msg":提示信息,
2618  "data":{
2619    "product":"当周期为ontrial时,会多一个参数pay_ontrial_cycle(试用天数)",
2620  }
2621}
2622```
2623
2624### 配置页面异步请求计算总价-- -- POST /cart/get_total
2625
2626- controller: ``app\home\controller\CartController::getTotal``
2627- desc: 配置页面异步请求计算总价-- -- wyh
2628
2629**params**
2630
2631| name | type | required | default | other | desc |
2632| --- | --- | --- | --- | --- | --- |
2633| pid | 整型 | 必填 | 1 | - | 产品ID |
2634| billingcycle | 字符串 | 必填 | 1 | - | 周期名称(比如:day、ontrial、monthly、hour等) |
2635| qty | 字符串 | 非必填 | 1 | - | 非必传,产品数量 |
2636| configoption[配置项ID] | 字符串 | 必填 | 1 | - | 配置子项ID(或者数量)后端根据配置项ID的类型判断是子项ID还是数量! |
2637| currencyid | 整型 | 非必填 | 1 | - | 货币ID |
2638| customfield[自定义字段ID] | 整型 | 非必填 | 1 | - | 自定义字段 |
2639
2640**response example**
2641
2642```json
2643{
2644  "status":200/201/203/204/400/401/406,
2645  "msg":提示信息,
2646  "data":{
2647    "currency":"货币信息",
2648    "products":[{//产品信息
2649      "name":"",
2650      "billingcycle":"",
2651      "product_setup_fee":"产品初装费",
2652      "product_price":"产品价格",
2653      "setupfee_total":"产品初装费(总:包括选择多个数量)",
2654      "price_total":"产品周期费用(总:包括选择多个数量)",
2655      "signal_setupfee":"单个产品初装费(产品初装费+配置项初装费)",
2656      "signal_price":"产品周期费用(单个产品,不含初装费)",
2657      "child":[{//配置项+子项+价格
2658        "option_name":"配置项名称",
2659        "suboption_name":"子项名称",
2660        "suboption_setup_fee":"子项初装费",
2661        "suboption_price":"子项价格",
2662        "suboption_price_total":"子项总价",
2663        "qty":"数量(拉条的数量,前端需要判断是否有此值)",
2664      }]
2665    }]
2666    "total":"总计",
2667  }
2668}
2669```
2670
2671### 获取购物车页面数据 -- GET /cart/get_shop_data
2672
2673- controller: ``app\home\controller\CartController::getShopDataPage``
2674- desc: 获取购物车页面数据 -- 萧十一郎
2675
2676**params**
2677
2678| name | type | required | default | other | desc |
2679| --- | --- | --- | --- | --- | --- |
2680| currency | number | 非必填 | - | - | - |
2681| pos[] | 数组 | 非必填 | - | - | - |
2682
2683**response example**
2684
2685```json
2686{
2687  "status":200/201/203/204/400/401/406,
2688  "msg":提示信息,
2689  "data":{
2690    "currency":[{//货币数据
2691      "id":"货币ID",
2692      "code":"货币标识",
2693      "prefix":"货币前缀",
2694      "suffix":"货币后缀",
2695    }]
2696    "cart_products":[{//购物车产品数组
2697      "productid":"产品ID",
2698      "productsname":"产品名",
2699      "serverid":"可用区ID",
2700      "servername":"可用区域名",
2701      "billingcycle":"周期",
2702      "billingcycle_desc":"周期描述",
2703      "configoptions":"可配置选项",
2704      "pricing":"该产品价格(不带价格单位)",
2705      "setup_pricing":"该产品安装费用(不带价格单位)",
2706      "pricing_show":"该产品价格",
2707      "setup_pricing_show":"该产品安装费用",
2708    }]
2709    "promo":[{//优惠码数据
2710      "promo_desc":"优惠码描述",
2711      "promo_desc_str":"优惠码描述(带优惠码)",
2712      "promo_price":"优惠码抵扣价格",
2713      "promo_price_str":"优惠码抵扣价格(带价格单位)",
2714    }]
2715    "total_pricing":"价格小计(带价格单位)",
2716    "total_setup_pricing":"安装小计(带价格单位)",
2717    "subtotal":"总价格小计(带价格单位)",
2718    "total_price":"合计",
2719    "total_desc":"合计(带价格单位)",
2720  }
2721}
2722```
2723
2724### 修改购物车产品数量 -- POST /cart/modify_product_qty
2725
2726- controller: ``app\home\controller\CartController::modifyProductQty``
2727- desc: 修改购物车产品数量 -- wyh
2728
2729**params**
2730
2731| name | type | required | default | other | desc |
2732| --- | --- | --- | --- | --- | --- |
2733| i | number | 必填 | - | - | - |
2734| qty | number | 必填 | - | - | - |
2735| pos[] | 数组 | 非必填 | - | - | 购物车已选产品位置 |
2736
2737**response example**
2738
2739```json
2740{
2741  "status":200/201/203/204/400/401/406,
2742  "msg":提示信息,
2743  "data":{
2744    "currency":[{//货币数据
2745      "id":"货币ID",
2746      "code":"货币标识",
2747      "prefix":"货币前缀",
2748      "suffix":"货币后缀",
2749    }]
2750    "cart_products":[{//购物车产品数组
2751      "productid":"产品ID",
2752      "productsname":"产品名",
2753      "serverid":"可用区ID",
2754      "servername":"可用区域名",
2755      "billingcycle":"周期",
2756      "billingcycle_desc":"周期描述",
2757      "configoptions":"可配置选项",
2758      "pricing":"该产品价格(不带价格单位)",
2759      "setup_pricing":"该产品安装费用(不带价格单位)",
2760      "pricing_show":"该产品价格",
2761      "setup_pricing_show":"该产品安装费用",
2762    }]
2763    "promo":[{//优惠码数据
2764      "promo_desc":"优惠码描述",
2765      "promo_desc_str":"优惠码描述(带优惠码)",
2766      "promo_price":"优惠码抵扣价格",
2767      "promo_price_str":"优惠码抵扣价格(带价格单位)",
2768    }]
2769    "total_pricing":"价格小计(带价格单位)",
2770    "total_setup_pricing":"安装小计(带价格单位)",
2771    "subtotal":"总价格小计(带价格单位)",
2772    "total_price":"合计",
2773    "total_desc":"合计(带价格单位)",
2774  }
2775}
2776```
2777
2778### 结算购物车 -- POST /cart/settle
2779
2780- controller: ``app\home\controller\CartController::settle``
2781- desc: 结算购物车 -- huanghao
2782
2783**params**
2784
2785| name | type | required | default | other | desc |
2786| --- | --- | --- | --- | --- | --- |
2787| payment | 字符串 | 非必填 | - | - | 支付方式 |
2788| pos[] | 数组 | 非必填 | - | - | 产品在购物车位置标识,i=0,1,2……自然数 |
2789| checkout | 整型 | 非必填 | - | - | 1直接结算,0加入购物车 |
2790
2791**response example**
2792
2793```json
2794{
2795  "status":200/201/203/204/400/401/406,
2796  "msg":提示信息,
2797  "data":{
2798    "[type] [description]":"",
2799    "invoiceid":"账单id(跳转到网关支付页面,可不携带支付方式)",
2800  }
2801}
2802```
2803
2804### 添加产品到购物车 -- POST /cart/add_to_shop
2805
2806- controller: ``app\home\controller\CartController::addToShop``
2807- desc: 添加产品到购物车 -- 萧十一郎
2808
2809**params**
2810
2811| name | type | required | default | other | desc |
2812| --- | --- | --- | --- | --- | --- |
2813| pid | number | 必填 | - | - | 产品ID |
2814| billingcycle | 字符串 | 必填 | - | - | 产品周期 |
2815| qty | 字符串 | 必填 | - | - | 产品数量 |
2816| serverid | number | 非必填 | - | - | 服务器可用区ID |
2817| configoption | 数组 | 必填 | - | - | 产品配置数组 |
2818| customfield | 数组 | 必填 | - | - | 产品自定义字段数组 |
2819| currencyid | 数组 | 必填 | - | - | 货币ID |
2820| os[id] | 数组 | 必填 | - | - | 值:操作系统name |
2821| host | 字符串 | 非必填 | - | - | 主机名 |
2822| password | 字符串 | 非必填 | - | - | 密码 |
2823| hostid | 整型 | 非必填 | - | - | 应用产品ID(当产品为开发者应用时,此字段必传) |
2824| checkout | 整型 | 非必填 | - | - | 1表示直接结算,0加到购物车 |
2825
2826**response example**
2827
2828```json
2829{
2830  "status":200/201/203/204/400/401/406,
2831  "msg":提示信息,
2832  "data":{
2833    "i":"当前产品在购物车的位置0,1,2……",
2834  }
2835}
2836```
2837
2838### 重新编辑产品到购物车--页面 -- GET /cart/edit_to_shop_page
2839
2840- controller: ``app\home\controller\CartController::editToshopPage``
2841- desc: 重新编辑产品到购物车--页面 -- wyh
2842
2843**params**
2844
2845| name | type | required | default | other | desc |
2846| --- | --- | --- | --- | --- | --- |
2847| i | number | 必填 | - | - | 产品在购物车位置标识 |
2848
2849**response example**
2850
2851```json
2852{
2853  "status":200/201/203/204/400/401/406,
2854  "msg":提示信息,
2855  "data":{
2856  }
2857}
2858```
2859
2860### 重新编辑产品到购物车 -- POST /cart/edit_to_shop
2861
2862- controller: ``app\home\controller\CartController::editToShop``
2863- desc: 重新编辑产品到购物车 -- 萧十一郎
2864
2865**params**
2866
2867| name | type | required | default | other | desc |
2868| --- | --- | --- | --- | --- | --- |
2869| i | number | 必填 | - | - | 产品在购物车位置标识 |
2870| billingcycle | 字符串 | 必填 | desc: | - | - |
2871| qty | 字符串 | 必填 | desc: | - | - |
2872| serverid | number | 非必填 | - | - | 服务器可用区ID |
2873| configoption | 数组 | 必填 | - | - | 产品配置数组 |
2874| customfield | 数组 | 必填 | - | - | 产品自定义字段数组 |
2875| currencyid | 整型 | 必填 | - | - | 货币ID |
2876| os[id] | 数组 | 必填 | - | - | 值:操作系统name |
2877| hostid | 整型 | 非必填 | - | - | 应用产品ID(当产品为开发者应用时,此字段必传) |
2878
2879**response example**
2880
2881```json
2882{
2883  "status":200/201/203/204/400/401/406,
2884  "msg":提示信息,
2885  "data":{
2886  }
2887}
2888```
2889
2890### 添加优惠码到购物车 -- POST /cart/add_promo
2891
2892- controller: ``app\home\controller\CartController::addPromoToShop``
2893- desc: 添加优惠码到购物车 -- 萧十一郎
2894
2895**params**
2896
2897| name | type | required | default | other | desc |
2898| --- | --- | --- | --- | --- | --- |
2899| promo | 字符串 | 必填 | - | - | 优惠码代码 |
2900| currency | number | 非必填 | - | - | 货币id |
2901| pos[] | 数组 | 非必填 | - | - | 产品在购物车位置标识,i=0,1,2……自然数 |
2902
2903**response example**
2904
2905```json
2906{
2907  "status":200/201/203/204/400/401/406,
2908  "msg":提示信息,
2909  "data":{
2910    "promo":[{//优惠码数据
2911      "promo_desc":"优惠码描述",
2912      "promo_desc_str":"优惠码描述(带优惠码)",
2913      "promo_price":"优惠码抵扣价格",
2914      "promo_price_str":"优惠码抵扣价格(带价格单位)",
2915    }]
2916    "total_price":"合计",
2917    "total_desc":"合计(带价格单位)",
2918    "promo_waring_desc":"可能存在的字段,当优惠码正确,当前列表却不适用优惠的时候会出现",
2919  }
2920}
2921```
2922
2923### 移除优惠码 -- POST /cart/remove_promo
2924
2925- controller: ``app\home\controller\CartController::removePromoToShop``
2926- desc: 移除优惠码 -- 萧十一郎
2927
2928**params**
2929
2930| name | type | required | default | other | desc |
2931| --- | --- | --- | --- | --- | --- |
2932| currency | number | 非必填 | - | - | - |
2933| pos[] | 数组 | 非必填 | - | - | 产品在购物车位置标识,i=0,1,2……自然数 |
2934
2935**response example**
2936
2937```json
2938{
2939  "status":200/201/203/204/400/401/406,
2940  "msg":提示信息,
2941  "data":{
2942    "total_price":"合计",
2943    "total_desc":"合计(带价格单位)",
2944  }
2945}
2946```
2947
2948### 移除购物车中产品 -- POST /cart/remove_product
2949
2950- controller: ``app\home\controller\CartController::removeProduct``
2951- desc: 移除购物车中产品 -- 萧十一郎
2952
2953**params**
2954
2955| name | type | required | default | other | desc |
2956| --- | --- | --- | --- | --- | --- |
2957| i | number | 必填 | - | - | 循环购物车列表时的key,移除后需要刷新页面 |
2958
2959**response example**
2960
2961```json
2962{
2963  "status":200/201/203/204/400/401/406,
2964  "msg":提示信息,
2965  "data":{
2966  }
2967}
2968```
2969
2970### 购物车检查结算页面 -- GET /cart/check_page
2971
2972- controller: ``app\home\controller\CartController::checkoutPage``
2973- desc: 购物车检查结算页面 -- 萧十一郎
2974
2975**params**
2976
2977| name | type | required | default | other | desc |
2978| --- | --- | --- | --- | --- | --- |
2979| pos[] | 数组 | 非必填 | - | - | 产品在购物车位置标识,i=0,1,2……自然数 |
2980
2981**response example**
2982
2983```json
2984{
2985  "status":200/201/203/204/400/401/406,
2986  "msg":提示信息,
2987  "data":{
2988    "user_login":"是否登录(true,false)",
2989    "total_price":"购物车合计",
2990    "total_desc":"购物车显示合计",
2991    "gateway_list":[{//网关列表
2992      "id":"网关id",
2993      "name":"网关",
2994      "title":"网关显示名",
2995    }]
2996    "user_info":[{//用户信息
2997      "credit":"余额",
2998    }]
2999  }
3000}
3001```
3002
3003### 清空购物车 -- POST /cart/clear
3004
3005- controller: ``app\home\controller\CartController::clearCart``
3006- desc: 清空购物车 -- hh
3007
3008**response example**
3009
3010```json
3011{
3012  "status":200/201/203/204/400/401/406,
3013  "msg":提示信息,
3014  "data":{
3015  }
3016}
3017```
3018
3019### 官网应用详情页,版本不要,版本不要,版本不要,版本不要,版本不要,版本不要!!!!!!!!!! -- GET /cart/app_detail
3020
3021- controller: ``app\home\controller\CartController::getDeveloperAppDetail``
3022- desc: 官网应用详情页,版本不要,版本不要,版本不要,版本不要,版本不要,版本不要!!!!!!!!!! -- wyh
3023
3024**params**
3025
3026| name | type | required | default | other | desc |
3027| --- | --- | --- | --- | --- | --- |
3028| id | 整型 | 必填 | - | - | 应用ID |
3029
3030**response example**
3031
3032```json
3033{
3034  "status":200/201/203/204/400/401/406,
3035  "msg":提示信息,
3036  "data":{
3037    "product":[{//应用信息(编辑时才有)
3038      "name":"应用名称info:应用简述type:应用类型description:应用描述instruction:应用说明icon:应用图标pay_type:销售方式pricing:销售价格unretired_time:发布时间",
3039    }]
3040    "currency":"货币",
3041    "product_type":"应用类型--所有",
3042    "developer":[{//开发者信息
3043      "name":"开发者昵称desc:简介",
3044    }]
3045    "relation_app":"应用作者更多应用,与应用列表一样",
3046  }
3047}
3048```
3049
3050### 官网 应用列表 -- GET /cart/index_app
3051
3052- controller: ``app\home\controller\CartController::indexAppHomeOrigin``
3053- desc: 官网 应用列表 -- wyh
3054
3055**params**
3056
3057| name | type | required | default | other | desc |
3058| --- | --- | --- | --- | --- | --- |
3059| page | 整型 | 非必填 | - | - | 页码 |
3060| limit | 整型 | 非必填 | - | - | 长度 |
3061| keywords | 整型 | 非必填 | - | - | 关键字搜索 |
3062
3063**response example**
3064
3065```json
3066{
3067  "status":200/201/203/204/400/401/406,
3068  "msg":提示信息,
3069  "data":{
3070    ".products":[{//此产品组下所有产品的信息
3071    }]
3072  }
3073}
3074```
3075
3076### 应用商店(客户后台 应用) -- GET cart/market_app
3077
3078- controller: ``app\home\controller\CartController::getMarketApp``
3079- desc: 应用商店(客户后台 应用) -- wyh
3080
3081**params**
3082
3083| name | type | required | default | other | desc |
3084| --- | --- | --- | --- | --- | --- |
3085| page | 整型 | 非必填 | - | - | 页码 |
3086| limit | 整型 | 非必填 | - | - | 长度 |
3087| order | 字符串 | 非必填 | - | - | 排序字段 |
3088| sort | 字符串 | 非必填 | - | - | - |
3089
3090**response example**
3091
3092```json
3093{
3094  "status":200/201/203/204/400/401/406,
3095  "msg":提示信息,
3096  "data":{
3097  }
3098}
3099```
3100
3101### 应用排行榜 -- GET cart/app_ranking_list
3102
3103- controller: ``app\home\controller\CartController::appRankingList``
3104- desc: 应用排行榜 -- xj
3105
3106**params**
3107
3108| name | type | required | default | other | desc |
3109| --- | --- | --- | --- | --- | --- |
3110| page | 整型 | 非必填 | - | - | 页码 |
3111| limit | 整型 | 非必填 | - | - | 长度 |
3112
3113**response example**
3114
3115```json
3116{
3117  "status":200/201/203/204/400/401/406,
3118  "msg":提示信息,
3119  "data":{
3120  }
3121}
3122```
3123
3124### 应用评论 -- GET cart/app/:id/evaluation
3125
3126- controller: ``app\home\controller\CartController::appEvaluation``
3127- desc: 应用评论 -- xj
3128
3129**params**
3130
3131| name | type | required | default | other | desc |
3132| --- | --- | --- | --- | --- | --- |
3133| page | 整型 | 非必填 | - | - | 页码 |
3134| limit | 整型 | 非必填 | - | - | 长度 |
3135| page | 整型 | 非必填 | 1 | - | 页数 |
3136| limit | 整型 | 非必填 | 10 | - | 每页条数 |
3137| orderby | 字符串 | 非必填 | create_time | - | 排序(create_time,score) |
3138| score | 字符串 | 非必填 | - | - | 查询分数(1,2,3,4,5) |
3139
3140**response example**
3141
3142```json
3143{
3144  "status":200/201/203/204/400/401/406,
3145  "msg":提示信息,
3146  "data":{
3147  }
3148}
3149```
3150
3151### 购物车商品列表(拉取缓存) -- GET cart/prolist
3152
3153- controller: ``app\home\controller\CartController::proList``
3154- desc: 购物车商品列表(拉取缓存) -- wyh
3155
3156**response example**
3157
3158```json
3159{
3160  "status":200/201/203/204/400/401/406,
3161  "msg":提示信息,
3162  "data":{
3163    "fgs":[{//商品信息
3164    }]
3165  }
3166}
3167```
3168
3169### 用户可添加目录 -- GET /addindex_page
3170
3171- controller: ``app\home\controller\CartController::addindexPage``
3172- desc: 用户可添加目录 -- lgd
3173
3174**response example**
3175
3176```json
3177{
3178  "status":200/201/203/204/400/401/406,
3179  "msg":提示信息,
3180  "data":{
3181    "data":[{//导航列表
3182      "id":"产品分类ID",
3183      "groupname":"产品分类name",
3184      "fa_icon":"图标",
3185    }]
3186  }
3187}
3188```
3189
3190### 用户添加目录 -- POST /addindex_post
3191
3192- controller: ``app\home\controller\CartController::addindexPost``
3193- desc: 用户添加目录 -- lgd
3194
3195**params**
3196
3197| name | type | required | default | other | desc |
3198| --- | --- | --- | --- | --- | --- |
3199| id | 整型 | 非必填 | - | - | 分类id |
3200
3201**response example**
3202
3203```json
3204{
3205  "status":200/201/203/204/400/401/406,
3206  "msg":提示信息,
3207  "data":{
3208  }
3209}
3210```
3211
3212### 用户目录删除 -- POST /addindex_del
3213
3214- controller: ``app\home\controller\CartController::addindexDel``
3215- desc: 用户目录删除 -- lgd
3216
3217**params**
3218
3219| name | type | required | default | other | desc |
3220| --- | --- | --- | --- | --- | --- |
3221| id | 整型 | 非必填 | - | - | 分类id |
3222
3223**response example**
3224
3225```json
3226{
3227  "status":200/201/203/204/400/401/406,
3228  "msg":提示信息,
3229  "data":{
3230  }
3231}
3232```
3233
3234
3235---
3236
3237## 支付
3238
3239### 可用【支付】网关列表 -- GET /get_gateways/[:gateways]/
3240
3241- controller: ``app\home\controller\PayController::getGatewayList``
3242- desc: 可用【支付】网关列表 -- 上官🔪
3243
3244**params**
3245
3246| name | type | required | default | other | desc |
3247| --- | --- | --- | --- | --- | --- |
3248| gateways | 字符串 | 必填 | gateways | - | 模块名[gateways,addons] |
3249
3250**response example**
3251
3252```json
3253{
3254  "status":200/201/203/204/400/401/406,
3255  "msg":提示信息,
3256  "data":{
3257    ".id":"id",
3258    ".name":"网关名",
3259    ".title":"描述",
3260    ".module":"所属模块",
3261  }
3262}
3263```
3264
3265### -- GET /recharge_page
3266
3267- controller: ``app\home\controller\PayController::rechargePage``
3268- desc: 请设置title注释 -- wyh
3269
3270**params**
3271
3272| name | type | required | default | other | desc |
3273| --- | --- | --- | --- | --- | --- |
3274| page | 整型 | 非必填 | - | - | 页码 |
3275| size | 整型 | 非必填 | - | - | 长度 |
3276| order | 字符串 | 非必填 | - | - | 排序字段(trans_id,amount_in,pay_time,type,gateway) |
3277| sort | 字符串 | 非必填 | - | - | 排序规则(asc/desc) |
3278| keywords | 字符串 | 非必填 | - | - | 关键字搜索(trans_id,amount_in) |
3279
3280**response example**
3281
3282```json
3283{
3284  "status":200/201/203/204/400/401/406,
3285  "msg":提示信息,
3286  "data":{
3287    "trans_id":"流水单号",
3288    "amount_in":"金额",
3289    "pay_time":"交易日期",
3290    "type":"来源",
3291    "gateway":"支付方式",
3292  }
3293}
3294```
3295
3296### 余额充值 -- POST /recharge
3297
3298- controller: ``app\home\controller\PayController::recharge``
3299- desc: 余额充值 -- 上官🔪
3300
3301**params**
3302
3303| name | type | required | default | other | desc |
3304| --- | --- | --- | --- | --- | --- |
3305| payment | 字符串 | 必填 | - | - | 网关名(如WxPay) |
3306| amount | decimal | 必填 | - | - | 金额 |
3307
3308**response example**
3309
3310```json
3311{
3312  "status":200/201/203/204/400/401/406,
3313  "msg":提示信息,
3314  "data":{
3315    "":"",
3316  }
3317}
3318```
3319
3320### 账单页面数据 -- POST /invoice_page
3321
3322- controller: ``app\home\controller\PayController::invoicePage``
3323- desc: 账单页面数据 -- 萧十一郎
3324
3325**params**
3326
3327| name | type | required | default | other | desc |
3328| --- | --- | --- | --- | --- | --- |
3329| invoiceid | number | 必填 | - | - | 账单id |
3330
3331**response example**
3332
3333```json
3334{
3335  "status":200/201/203/204/400/401/406,
3336  "msg":提示信息,
3337  "data":{
3338    "invoice_subtotal":"小计",
3339    "invoice_credit":"账单已使用余额",
3340    "invoice_total":"合计",
3341    "due_time":"账单到期时间",
3342    "item_data":[{//账单子项数据
3343      "description":"账单子项描述",
3344      "type":"账单子项类型",
3345      "amount":"账单子项金额",
3346    }]
3347    "gateway_list":"支持的网关数据",
3348    "user_credit":"用户可用余额",
3349  }
3350}
3351```
3352
3353### 使用余额--页面 -- GET /use_credit_page
3354
3355- controller: ``app\home\controller\PayController::useCreditPage``
3356- desc: 使用余额--页面 -- wyh
3357
3358**params**
3359
3360| name | type | required | default | other | desc |
3361| --- | --- | --- | --- | --- | --- |
3362| invoiceid | number | 必填 | - | - | 要支付的账单id |
3363
3364**response example**
3365
3366```json
3367{
3368  "status":200/201/203/204/400/401/406,
3369  "msg":提示信息,
3370  "data":{
3371    "invoiceid":"账单ID",
3372    "invoice_credit":"账单已使用余额",
3373    "total":"账单总额",
3374    "credit":"用户余额",
3375    "amount":"剩余需支付金额",
3376    "currency":"货币信息",
3377    "used":"是否已使用余额,1是(打钩),0否",
3378  }
3379}
3380```
3381
3382### 向账单使用余额 -- POST /apply_credit
3383
3384- controller: ``app\home\controller\PayController::applyCredit``
3385- desc: 向账单使用余额 -- 萧十一郎
3386
3387**params**
3388
3389| name | type | required | default | other | desc |
3390| --- | --- | --- | --- | --- | --- |
3391| invoiceid | number | 必填 | - | - | 账单id |
3392| use_credit | 浮点型 | 必填 | - | - | 1使用余额,0不使用 |
3393| enough | 整型 | 非必填 | 0 | - | 全部够才支付 |
3394
3395**response example**
3396
3397```json
3398{
3399  "status":200/201/203/204/400/401/406,
3400  "msg":提示信息,
3401  "data":{
3402  }
3403}
3404```
3405
3406### 向账单使用信用额 -- POST /apply_credit_limit
3407
3408- controller: ``app\home\controller\PayController::applyCreditLimit``
3409- desc: 向账单使用信用额 -- xj
3410
3411**params**
3412
3413| name | type | required | default | other | desc |
3414| --- | --- | --- | --- | --- | --- |
3415| invoiceid | number | 必填 | - | - | 账单id |
3416| use_credit_limit | 浮点型 | 必填 | - | - | 1使用余额,0不使用 |
3417| enough | 整型 | 非必填 | 0 | - | 全部够才支付 |
3418
3419**response example**
3420
3421```json
3422{
3423  "status":200/201/203/204/400/401/406,
3424  "msg":提示信息,
3425  "data":{
3426  }
3427}
3428```
3429
3430### 获取网关支付页面数据 -- POST /start_pay
3431
3432- controller: ``app\home\controller\PayController::startPay``
3433- desc: 获取网关支付页面数据 -- 萧十一郎
3434
3435**params**
3436
3437| name | type | required | default | other | desc |
3438| --- | --- | --- | --- | --- | --- |
3439| invoiceid | number | 必填 | - | - | 要支付的账单id |
3440| payment | 字符串 | 非必填 | - | - | 支付方式 |
3441| flag | number | 非必填 | - | - | 是否不调三方支付:1是 |
3442
3443**response example**
3444
3445```json
3446{
3447  "status":200/201/203/204/400/401/406,
3448  "msg":提示信息,
3449  "data":{
3450    "payment":"支付方式",
3451    "gateway_list":[{//支付方式列表数据
3452      "name":"支付方式title:名称",
3453    }]
3454    "total":"金额",
3455    "total_desc":"金额",
3456    "pay_html":"支付html",
3457  }
3458}
3459```
3460
3461### 更新支付选择模式 -- POST /change_paymt
3462
3463- controller: ``app\home\controller\PayController::changePaymt``
3464- desc: 更新支付选择模式 -- 请设置auhtor注释
3465
3466**params**
3467
3468| name | type | required | default | other | desc |
3469| --- | --- | --- | --- | --- | --- |
3470| - | - | 非必填 | - | - | - |
3471
3472**response example**
3473
3474```json
3475{
3476  "status":200/201/203/204/400/401/406,
3477  "msg":提示信息,
3478  "data":{
3479  }
3480}
3481```
3482
3483### 用户目录 -- GET /navindex
3484
3485- controller: ``app\home\controller\PayController::index``
3486- desc: 用户目录 -- lgd
3487
3488**response example**
3489
3490```json
3491{
3492  "status":200/201/203/204/400/401/406,
3493  "msg":提示信息,
3494  "data":{
3495    "data":[{//导航列表
3496      "id":"产品分类ID",
3497      "groupname":"产品分类name",
3498      "fa_icon":"图标",
3499    }]
3500  }
3501}
3502```
3503
3504### 用户可添加目录 -- GET /addindex_page
3505
3506- controller: ``app\home\controller\PayController::addindexPage``
3507- desc: 用户可添加目录 -- lgd
3508
3509**response example**
3510
3511```json
3512{
3513  "status":200/201/203/204/400/401/406,
3514  "msg":提示信息,
3515  "data":{
3516    "data":[{//导航列表
3517      "id":"产品分类ID",
3518      "groupname":"产品分类name",
3519      "fa_icon":"图标",
3520    }]
3521  }
3522}
3523```
3524
3525### 用户添加目录 -- POST /addindex_post
3526
3527- controller: ``app\home\controller\PayController::addindexPost``
3528- desc: 用户添加目录 -- lgd
3529
3530**params**
3531
3532| name | type | required | default | other | desc |
3533| --- | --- | --- | --- | --- | --- |
3534| id | 整型 | 非必填 | - | - | 分类id |
3535
3536**response example**
3537
3538```json
3539{
3540  "status":200/201/203/204/400/401/406,
3541  "msg":提示信息,
3542  "data":{
3543  }
3544}
3545```
3546
3547### 用户目录删除 -- POST /addindex_del
3548
3549- controller: ``app\home\controller\PayController::addindexDel``
3550- desc: 用户目录删除 -- lgd
3551
3552**params**
3553
3554| name | type | required | default | other | desc |
3555| --- | --- | --- | --- | --- | --- |
3556| id | 整型 | 非必填 | - | - | 分类id |
3557
3558**response example**
3559
3560```json
3561{
3562  "status":200/201/203/204/400/401/406,
3563  "msg":提示信息,
3564  "data":{
3565  }
3566}
3567```
3568
3569
3570---
3571
3572## 前台新闻
3573
3574### 新闻分类
3575
3576- controller: ``app\home\controller\NewsController::newsCate``
3577- desc: 新闻分类 -- 请设置auhtor注释
3578
3579**response example**
3580
3581```json
3582{
3583  "status":200/201/203/204/400/401/406,
3584  "msg":提示信息,
3585  "data":{
3586  }
3587}
3588```
3589
3590### 帮助分类
3591
3592- controller: ``app\home\controller\NewsController::helpCate``
3593- desc: 帮助分类 -- 请设置auhtor注释
3594
3595**response example**
3596
3597```json
3598{
3599  "status":200/201/203/204/400/401/406,
3600  "msg":提示信息,
3601  "data":{
3602  }
3603}
3604```
3605
3606### 分类
3607
3608- controller: ``app\home\controller\NewsController::cateList``
3609- desc: 分类 -- 请设置auhtor注释
3610
3611**response example**
3612
3613```json
3614{
3615  "status":200/201/203/204/400/401/406,
3616  "msg":提示信息,
3617  "data":{
3618  }
3619}
3620```
3621
3622### 新闻列表页 -- GET news/list
3623
3624- controller: ``app\home\controller\NewsController::getList``
3625- desc: 新闻列表页 -- 萧十一郎
3626
3627**params**
3628
3629| name | type | required | default | other | desc |
3630| --- | --- | --- | --- | --- | --- |
3631| parent_id | 整型 | 非必填 | 1 | - | 分类id |
3632| page | 整型 | 非必填 | 1 | - | 页码 |
3633| limit | 整型 | 非必填 | 1 | - | 每页个数 |
3634| search | 字符串 | 非必填 | - | - | 搜索关键词 |
3635
3636**response example**
3637
3638```json
3639{
3640  "status":200/201/203/204/400/401/406,
3641  "msg":提示信息,
3642  "data":{
3643    "list":[{//新闻数据
3644      "id":"文章id",
3645      "title":"新闻标题",
3646      "description":"描述",
3647      "head_img":"封面图片",
3648    }]
3649    "pagecount":"每页显示条数",
3650    "page":"当前页码",
3651    "total_page":"总页码",
3652    "count":"总新闻数量",
3653  }
3654}
3655```
3656
3657### 工单帮助首页 -- GET news/notice
3658
3659- controller: ``app\home\controller\NewsController::getNotice``
3660- desc: 工单帮助首页 -- 萧十一郎
3661
3662**response example**
3663
3664```json
3665{
3666  "status":200/201/203/204/400/401/406,
3667  "msg":提示信息,
3668  "data":{
3669    "id":"新闻分类id",
3670    "title":"新闻分类标题",
3671    "list":[{//帮助数据
3672      "id":"文章id",
3673      "title":"新闻分类标题",
3674      "description":"描述",
3675      "head_img":"封面图片",
3676    }]
3677  }
3678}
3679```
3680
3681### 获取新闻内容 -- GET news/content
3682
3683- controller: ``app\home\controller\NewsController::getContent``
3684- desc: 获取新闻内容 -- 萧十一郎
3685
3686**params**
3687
3688| name | type | required | default | other | desc |
3689| --- | --- | --- | --- | --- | --- |
3690| id | 整型 | 非必填 | - | - | 新闻id |
3691
3692**response example**
3693
3694```json
3695{
3696  "status":200/201/203/204/400/401/406,
3697  "msg":提示信息,
3698  "data":{
3699    "new_content":"新闻数据",
3700    "cat_data":"分类数据",
3701    "next":"下一个对象,如果没有则为空对象",
3702    "prev":"上一个",
3703  }
3704}
3705```
3706
3707### 新闻分类所有数据 -- GET /news/catelist
3708
3709- controller: ``app\home\controller\NewsController::getCateList``
3710- desc: 新闻分类所有数据 -- 萧十一郎
3711
3712**params**
3713
3714| name | type | required | default | other | desc |
3715| --- | --- | --- | --- | --- | --- |
3716| parent_id | 整型 | 非必填 | - | - | 父级id,默认获取所有分页数据,此参数传0获取所有顶级分类,1获取新闻分类数据,2获取公告数据 |
3717| status | 字符串 | 非必填 | - | - | 搜索状态 |
3718
3719**response example**
3720
3721```json
3722{
3723  "status":200/201/203/204/400/401/406,
3724  "msg":提示信息,
3725  "data":{
3726    "list":[{//分类数据
3727      "id":"分类id",
3728      "parent_id":"父级id",
3729      "title":"分类名",
3730      "status":"是否禁用(1/0)",
3731      "sort":"排序id",
3732      "list":"子集数据",
3733    }]
3734  }
3735}
3736```
3737
3738### 公告列表页 -- GET notice/list
3739
3740- controller: ``app\home\controller\NewsController::getNoticeList``
3741- desc: 公告列表页 -- 萧十一郎
3742
3743**params**
3744
3745| name | type | required | default | other | desc |
3746| --- | --- | --- | --- | --- | --- |
3747| parent_id | 整型 | 非必填 | 1 | - | 分类id |
3748| page | 整型 | 非必填 | 1 | - | 页码 |
3749| limit | 整型 | 非必填 | 1 | - | 每页个数 |
3750| search | 字符串 | 非必填 | - | - | 搜索关键词 |
3751
3752**response example**
3753
3754```json
3755{
3756  "status":200/201/203/204/400/401/406,
3757  "msg":提示信息,
3758  "data":{
3759    "list":[{//新闻数据
3760      "id":"文章id",
3761      "title":"新闻标题",
3762      "description":"描述",
3763      "head_img":"封面图片",
3764    }]
3765    "pagecount":"每页显示条数",
3766    "page":"当前页码",
3767    "total_page":"总页码",
3768    "count":"总新闻数量",
3769  }
3770}
3771```
3772
3773### 获取公告内容 -- GET notice/content
3774
3775- controller: ``app\home\controller\NewsController::getNoticeContent``
3776- desc: 获取公告内容 -- 萧十一郎
3777
3778**params**
3779
3780| name | type | required | default | other | desc |
3781| --- | --- | --- | --- | --- | --- |
3782| id | 整型 | 非必填 | - | - | 公告id |
3783
3784**response example**
3785
3786```json
3787{
3788  "status":200/201/203/204/400/401/406,
3789  "msg":提示信息,
3790  "data":{
3791    "new_content":"新闻数据",
3792    "cat_data":"分类数据",
3793    "next":"下一个对象,如果没有则为空对象",
3794    "prev":"上一个",
3795  }
3796}
3797```
3798
3799
3800---
3801
3802## 系统消息
3803
3804### 获取系统消息列表 -- GET /sys_messgage
3805
3806- controller: ``app\home\controller\SystemMessageController::getMessageList``
3807- desc: 获取系统消息列表 -- 请设置auhtor注释
3808
3809**params**
3810
3811| name | type | required | default | other | desc |
3812| --- | --- | --- | --- | --- | --- |
3813| type | 整型 | 非必填 | 0 | - | 消息类型:0-全部,1-工单消息,2-产品消息,3-站内信,4-活动消息 |
3814| page | 整型 | 非必填 | 1 | - | 页码 |
3815| limit | 整型 | 非必填 | 10 | - | 每页个数 |
3816
3817**response example**
3818
3819```json
3820{
3821  "status":200/201/203/204/400/401/406,
3822  "msg":提示信息,
3823  "data":{
3824    "list":[{//列表数据
3825      "id":"消息id",
3826      "title":"消息标题",
3827      "content":"内容",
3828      "attachment":"附件地址",
3829      "create_time":"创建时间",
3830      "read_time":"阅读时间,未阅读则为0",
3831    }]
3832    "count":"总数量",
3833    "unread_count":[{//未阅读统计
3834      "id":"消息分类idname:消息分类名称unread_num:消息分类-未读数量",
3835    }]
3836    "total_page":"总页码",
3837  }
3838}
3839```
3840
3841### 系统消息列表-未读 -- GET /sys_messgage_unread
3842
3843- controller: ``app\home\controller\SystemMessageController::getUnreadList``
3844- desc: 系统消息列表-未读 -- 请设置auhtor注释
3845
3846**response example**
3847
3848```json
3849{
3850  "status":200/201/203/204/400/401/406,
3851  "msg":提示信息,
3852  "data":{
3853  }
3854}
3855```
3856
3857### 阅读消息 -- GET /read_messgage
3858
3859- controller: ``app\home\controller\SystemMessageController::readSystemMessage``
3860- desc: 阅读消息 -- 请设置auhtor注释
3861
3862**params**
3863
3864| name | type | required | default | other | desc |
3865| --- | --- | --- | --- | --- | --- |
3866| ids | 数组 | 非必填 | - | - | - |
3867| type | 字符串 | 非必填 | 0 | - | - |
3868
3869**response example**
3870
3871```json
3872{
3873  "status":200/201/203/204/400/401/406,
3874  "msg":提示信息,
3875  "data":{
3876  }
3877}
3878```
3879
3880### 删除消息 -- GET /delete_messgage
3881
3882- controller: ``app\home\controller\SystemMessageController::deleteSystemMessage``
3883- desc: 删除消息 -- 请设置auhtor注释
3884
3885**params**
3886
3887| name | type | required | default | other | desc |
3888| --- | --- | --- | --- | --- | --- |
3889| ids | 数组 | 非必填 | - | - | - |
3890| type | 字符串 | 非必填 | 0 | - | - |
3891
3892**response example**
3893
3894```json
3895{
3896  "status":200/201/203/204/400/401/406,
3897  "msg":提示信息,
3898  "data":{
3899  }
3900}
3901```
3902
3903
3904---
3905
3906## 前台子账户管理
3907
3908### 客户子账户管理页面 -- GET contacts/index
3909
3910- controller: ``app\home\controller\ContactsController::index``
3911- desc: 客户子账户管理页面 -- 萧十一郎
3912
3913**params**
3914
3915| name | type | required | default | other | desc |
3916| --- | --- | --- | --- | --- | --- |
3917| cid | 整型 | 非必填 | - | - | 子账户id |
3918
3919**response example**
3920
3921```json
3922{
3923  "status":200/201/203/204/400/401/406,
3924  "msg":提示信息,
3925  "data":{
3926    "contact_list":[{//子账户列表
3927      "id":"子账户id",
3928      "username":"用户名",
3929      "email":"子账户邮箱账号",
3930    }]
3931    "cid":"子账户id",
3932    "contact_data":[{//子账户数据
3933      "id":"子账户id",
3934      "username":"用户名",
3935      "sex":"性别",
3936      "avatar":"头像地址",
3937      "companyname":"公司名",
3938      "email":"邮箱",
3939      "wechat_id":"微信id",
3940      "country":"国家",
3941      "province":"省份",
3942      "city":"城市",
3943      "region":"区",
3944      "address1":"地址一",
3945      "address2":"地址二",
3946      "postcode":"邮编",
3947      "phonenumber":"手机号",
3948      "permissions":"权限(使用另一个permissions_arr字段)",
3949      "generalemails":"接收通用邮件通知",
3950      "invoiceemails":"接收账单通知",
3951      "productemails":"接收产品邮件通知",
3952      "supportemails":"接收工单邮件通知",
3953      "authmodule":"",
3954      "authdata":"",
3955      "lastlogin":"",
3956      "status":"",
3957    }]
3958  }
3959}
3960```
3961
3962### 保存/添加子账户 -- POST contacts/save
3963
3964- controller: ``app\home\controller\ContactsController::save``
3965- desc: 保存/添加子账户 -- 萧十一郎
3966
3967**params**
3968
3969| name | type | required | default | other | desc |
3970| --- | --- | --- | --- | --- | --- |
3971| cid | 整型 | 非必填 | - | - | 子账户id |
3972| username | 字符串 | 非必填 | - | - | 用户名 |
3973| sex | 整型 | 必填 | 0 | - | 性别(0未知,1男,2女) |
3974| avatar | 字符串 | 非必填 | - | - | 头像地址 |
3975| companyname | 字符串 | 非必填 | - | - | 公司名 |
3976| email | 字符串 | 必填 | - | - | 邮箱 |
3977| wechat_id | 字符串 | 非必填 | - | - | 微信id |
3978| country | 字符串 | 非必填 | - | - | 国家 |
3979| province | 字符串 | 非必填 | - | - | 省份 |
3980| city | 字符串 | 非必填 | - | - | 城市 |
3981| region | 字符串 | 非必填 | - | - | 区 |
3982| address1 | 字符串 | 非必填 | - | - | 地址一 |
3983| address2 | 字符串 | 非必填 | - | - | 地址二 |
3984| postcode | number | 非必填 | - | - | 邮编 |
3985| phonenumber | 整型 | 非必填 | - | - | 手机号 |
3986| generalemails | 整型 | 非必填 | - | - | 接收通用邮件通知(0,1) |
3987| invoiceemails | 整型 | 非必填 | - | - | 接收账单通知 |
3988| productemails | 整型 | 非必填 | - | - | 接收产品邮件通知 |
3989| supportemails | 整型 | 非必填 | - | - | 接收工单邮件通知 |
3990| status | 整型 | 非必填 | - | - | 状态(1激活,0未激活,2关闭),激活代表该联系人成为子账户,可以登录管理 |
3991| password | 字符串 | 非必填 | - | - | 设置的子账户密码 |
3992| permissions | 数组 | 非必填 | - | - | 权限数组 |
3993
3994**response example**
3995
3996```json
3997{
3998  "status":200/201/203/204/400/401/406,
3999  "msg":提示信息,
4000  "data":{
4001  }
4002}
4003```
4004
4005### 删除子账户 -- DELETE contacts/del
4006
4007- controller: ``app\home\controller\ContactsController::delete``
4008- desc: 删除子账户 -- 萧十一郎
4009
4010**params**
4011
4012| name | type | required | default | other | desc |
4013| --- | --- | --- | --- | --- | --- |
4014| uid | 整型 | 必填 | - | - | 用户id |
4015| cid | 整型 | 必填 | - | - | 子账户id |
4016
4017**response example**
4018
4019```json
4020{
4021  "status":200/201/203/204/400/401/406,
4022  "msg":提示信息,
4023  "data":{
4024  }
4025}
4026```
4027
4028### 用户可添加目录 -- GET /addindex_page
4029
4030- controller: ``app\home\controller\ContactsController::addindexPage``
4031- desc: 用户可添加目录 -- lgd
4032
4033**response example**
4034
4035```json
4036{
4037  "status":200/201/203/204/400/401/406,
4038  "msg":提示信息,
4039  "data":{
4040    "data":[{//导航列表
4041      "id":"产品分类ID",
4042      "groupname":"产品分类name",
4043      "fa_icon":"图标",
4044    }]
4045  }
4046}
4047```
4048
4049### 用户添加目录 -- POST /addindex_post
4050
4051- controller: ``app\home\controller\ContactsController::addindexPost``
4052- desc: 用户添加目录 -- lgd
4053
4054**params**
4055
4056| name | type | required | default | other | desc |
4057| --- | --- | --- | --- | --- | --- |
4058| id | 整型 | 非必填 | - | - | 分类id |
4059
4060**response example**
4061
4062```json
4063{
4064  "status":200/201/203/204/400/401/406,
4065  "msg":提示信息,
4066  "data":{
4067  }
4068}
4069```
4070
4071### 用户目录删除 -- POST /addindex_del
4072
4073- controller: ``app\home\controller\ContactsController::addindexDel``
4074- desc: 用户目录删除 -- lgd
4075
4076**params**
4077
4078| name | type | required | default | other | desc |
4079| --- | --- | --- | --- | --- | --- |
4080| id | 整型 | 非必填 | - | - | 分类id |
4081
4082**response example**
4083
4084```json
4085{
4086  "status":200/201/203/204/400/401/406,
4087  "msg":提示信息,
4088  "data":{
4089  }
4090}
4091```
4092
4093
4094---
4095
4096## 前台产品功能及接口
4097
4098### 获取主机列表 -- GET host/list
4099
4100- controller: ``app\home\controller\HostController::getList``
4101- desc: 获取主机列表 -- 萧十一郎
4102
4103**params**
4104
4105| name | type | required | default | other | desc |
4106| --- | --- | --- | --- | --- | --- |
4107| groupid | 字符串 | 非必填 | other | - | 分组id |
4108| dcim_area | 字符串 | 非必填 | other | - | 区域搜索(传名称) |
4109| domain_status | 字符串 | 非必填 | other | - | 按状态搜索(数组方式传参) |
4110| orderby | 字符串 | 非必填 | id | - | 排序方式('id','domainstatus','productname','regdate','nextduedate','amount') |
4111| sort | 字符串 | 非必填 | id | DESC | 排序类型DESC/ASC |
4112| show_type | 字符串 | 非必填 | id | DESC | 首页index,列表页list |
4113
4114**response example**
4115
4116```json
4117{
4118  "status":200/201/203/204/400/401/406,
4119  "msg":提示信息,
4120  "data":{
4121    "list":[{//主机列表数据
4122      "id":"主机id",
4123      "domainstatus":"机器状态(Pending待审核,Active已激活,Suspended暂停,Terminated已删除,Cancelled已取消,Fraud有欺诈,Completed已完成)",
4124      "dedicatedip":"主ip",
4125      "assignedips":"分配的IP",
4126      "nextinvoicedate":"下次续约日期",
4127      "regdate":"开通时间",
4128      "nextduedate":"到期时间",
4129      "notes":"备注",
4130      "amount":"续费金额",
4131      "billingcycle":"周期",
4132      "productname":"产品名称",
4133      "cycle_desc":"展示周期",
4134      "price_desc":"展示价格",
4135      "os":"操作系统",
4136      "svg":"操作系统图标",
4137      "area_code":"区域代码",
4138      "area_name":"区域名称",
4139    }]
4140    "page":"当前页数",
4141    "limit":"每页条数",
4142    "sum":"总条数",
4143    "max_page":"总页数",
4144    "orderby":"排序字段",
4145    "sort":"排序方向",
4146    "auth.traffic":"流量图(on开启off关闭)",
4147    "auth.kvm":"kvm(on开启off关闭)",
4148    "auth.ikvm":"ikvm(on开启off关闭)",
4149    "auth.bmc":"重置bmc(on开启off关闭)",
4150    "auth.reinstall":"重装系统(on开启off关闭)",
4151    "auth.reboot":"重启(on开启off关闭)",
4152    "auth.on":"开机(on开启off关闭)",
4153    "auth.off":"关机(on开启off关闭)",
4154    "auth.novnc":"novnc(on开启off关闭)",
4155    "auth.rescue":"救援系统(on开启off关闭)",
4156    "auth.crack_pass":"重置密码(on开启off关闭)",
4157    "area":[{//区域信息
4158      "code":"区域代码",
4159      "name":"区域名称",
4160    }]
4161    "domainstatus":"产品状态",
4162  }
4163}
4164```
4165
4166### 修改备注 -- POST /host/remark
4167
4168- controller: ``app\home\controller\HostController::postRemark``
4169- desc: 修改备注 -- huanghao
4170
4171**params**
4172
4173| name | type | required | default | other | desc |
4174| --- | --- | --- | --- | --- | --- |
4175| id | 整型 | 必填 | - | - | hostID |
4176| remark | 字符串 | 必填 | - | - | 备注信息 |
4177
4178**response example**
4179
4180```json
4181{
4182  "status":200/201/203/204/400/401/406,
4183  "msg":提示信息,
4184  "data":{
4185  }
4186}
4187```
4188
4189### 添加/修改分类 -- POST host/savecate
4190
4191- controller: ``app\home\controller\HostController::postSaveCate``
4192- desc: 添加/修改分类 -- 萧十一郎
4193
4194**params**
4195
4196| name | type | required | default | other | desc |
4197| --- | --- | --- | --- | --- | --- |
4198| cate_id | 整型 | 非必填 | - | - | 分类id,不传递时为添加 |
4199| cate_name | 字符串 | 必填 | - | - | 分类名 |
4200
4201**response example**
4202
4203```json
4204{
4205  "status":200/201/203/204/400/401/406,
4206  "msg":提示信息,
4207  "data":{
4208  }
4209}
4210```
4211
4212### 删除分类 -- DELETE host/cate
4213
4214- controller: ``app\home\controller\HostController::deleteCate``
4215- desc: 删除分类 -- 萧十一郎
4216
4217**params**
4218
4219| name | type | required | default | other | desc |
4220| --- | --- | --- | --- | --- | --- |
4221| cate_id | 整型 | 非必填 | - | - | 分类id,不传递时为添加 |
4222
4223**response example**
4224
4225```json
4226{
4227  "status":200/201/203/204/400/401/406,
4228  "msg":提示信息,
4229  "data":{
4230  }
4231}
4232```
4233
4234### 将主机转移到某个分类 -- POST host/transfercate
4235
4236- controller: ``app\home\controller\HostController::postTransferCate``
4237- desc: 将主机转移到某个分类 -- 萧十一郎
4238
4239**params**
4240
4241| name | type | required | default | other | desc |
4242| --- | --- | --- | --- | --- | --- |
4243| host_id | 整型 | 必填 | - | - | 主机id |
4244| cate_id | 整型 | 必填 | - | - | 分类id |
4245
4246**response example**
4247
4248```json
4249{
4250  "status":200/201/203/204/400/401/406,
4251  "msg":提示信息,
4252  "data":{
4253  }
4254}
4255```
4256
4257### 产品内页数据 id:文件标题 -- GET host/details
4258
4259- controller: ``app\home\controller\HostController::getDetails``
4260- desc: 产品内页数据 id:文件标题 -- 萧十一郎
4261
4262**params**
4263
4264| name | type | required | default | other | desc |
4265| --- | --- | --- | --- | --- | --- |
4266| host_id | 整型 | 必填 | - | - | 产品id |
4267
4268**response example**
4269
4270```json
4271{
4272  "status":200/201/203/204/400/401/406,
4273  "msg":提示信息,
4274  "data":{
4275    "host_data":[{//基础数据
4276      "ordernum":"订单id",
4277      "productid":"产品id",
4278      "serverid":"服务器id",
4279      "regdate":"产品开通时间",
4280      "domain":"主机名",
4281      "payment":"支付方式",
4282      "firstpaymentamount":"首付金额",
4283      "firstpaymentamount_desc":"首付金额",
4284      "amount":"续费金额",
4285      "amount_desc":"续费金额",
4286      "billingcycle":"付款周期",
4287      "billingcycle_desc":"付款周期",
4288      "nextduedate":"到期时间",
4289      "nextinvoicedate":"下次帐单时间",
4290      "dedicatedip":"独立ip",
4291      "assignedips":"附加ip",
4292      "ip_num":"IP数量",
4293      "domainstatus":"产品状态",
4294      "domainstatus_desc":"产品状态",
4295      "username":"服务器用户名",
4296      "password":"服务器密码",
4297      "suspendreason":"暂停原因",
4298      "auto_terminate_end_cycle":"是否到期取消",
4299      "auto_terminate_reason":"取消原因",
4300      "productname":"产品名",
4301      "groupname":"产品组名",
4302      "bwusage":"当前使用流量",
4303      "bwlimit":"当前使用流量上限(0表示不限)",
4304      "os":"操作系统",
4305      "port":"端口",
4306      "remark":"备注",
4307    }]
4308    "config_options":[{//可配置选项
4309      "name":"配置名",
4310      "sub_name":"配置项值",
4311    }]
4312    "custom_field_data":[{//自定义字段
4313      "fieldname":"字段名",
4314      "value":"字段值",
4315    }]
4316    "download_data":[{//可下载数据
4317      "id":"文件id",
4318    }]
4319    "module_button":[{//模块按钮
4320      "type":"default:默认,custom:自定义",
4321      "type":"func:函数名",
4322      "type":"name:名称",
4323    }]
4324    "module_client_area":"模块页面输出",
4325    "hook_output":"钩子在本页面的输出,数组,循环显示的html",
4326    "dcim.flowpacket":[{//当前产品可购买的流量包
4327      "id":"流量包ID",
4328      "name":"流量包名称",
4329      "price":"价格",
4330      "sale_times":"销售次数",
4331      "stock":"库存(0不限)",
4332    }]
4333    "dcim.auth":"服务器各种操作权限控制(on有权限off没权限)",
4334    "dcim.area_code":"区域代码",
4335    "dcim.area_name":"区域名称",
4336    "dcim.os_group":[{//操作系统分组
4337      "id":"分组ID",
4338      "name":"分组名称",
4339      "svg":"分组svg号",
4340    }]
4341    "dcim.os":[{//操作系统数据
4342      "id":"操作系统ID",
4343      "name":"操作系统名称",
4344      "ostype":"操作系统类型(1windows0linux)",
4345      "os_name":"操作系统真实名称(用来判断具体的版本和操作系统)",
4346      "group_id":"所属分组ID",
4347    }]
4348    "flow_packet_use_list":[{//流量包使用情况
4349      "name":"流量包名称",
4350      "capacity":"流量包大小",
4351      "price":"价格",
4352      "pay_time":"支付时间",
4353      "used":"已用流量",
4354      "used":"已用流量",
4355    }]
4356    "host_cancel":" 取消请求数据,空对象",
4357  }
4358}
4359```
4360
4361### 产品内页数据 -- GET host/product
4362
4363- controller: ``app\home\controller\HostController::getProduct``
4364- desc: 产品内页数据 -- 萧十一郎
4365
4366**params**
4367
4368| name | type | required | default | other | desc |
4369| --- | --- | --- | --- | --- | --- |
4370| host_id | 整型 | 必填 | - | - | 产品id |
4371
4372**response example**
4373
4374```json
4375{
4376  "status":200/201/203/204/400/401/406,
4377  "msg":提示信息,
4378  "data":{
4379    "host_data":[{//基础数据
4380      "ordernum":"订单id",
4381      "productid":"产品id",
4382      "serverid":"服务器id",
4383      "regdate":"产品开通时间",
4384      "domain":"主机名",
4385      "payment":"支付方式",
4386      "firstpaymentamount":"首付金额",
4387      "firstpaymentamount_desc":"首付金额",
4388      "amount":"续费金额",
4389      "amount_desc":"续费金额",
4390      "billingcycle":"付款周期",
4391      "billingcycle_desc":"付款周期",
4392      "nextduedate":"到期时间",
4393      "nextinvoicedate":"下次帐单时间",
4394      "dedicatedip":"独立ip",
4395      "assignedips":"附加ip",
4396      "ip_num":"IP数量",
4397      "domainstatus":"产品状态",
4398      "domainstatus_desc":"产品状态",
4399      "username":"服务器用户名",
4400      "password":"服务器密码",
4401      "suspendreason":"暂停原因",
4402      "auto_terminate_end_cycle":"是否到期取消",
4403      "auto_terminate_reason":"取消原因",
4404      "productname":"产品名",
4405      "groupname":"产品组名",
4406      "bwusage":"当前使用流量",
4407      "bwlimit":"当前使用流量上限(0表示不限)",
4408      "os":"操作系统",
4409      "port":"端口",
4410      "remark":"备注",
4411      "allow_upgrade_config":"是否输出“升级配置项”按钮:1是",
4412      "allow_upgrade_product":"是否输出“升级产品”按钮:1是",
4413      "show_traffic_usage":"是否显示用量图",
4414    }]
4415    "config_options":[{//可配置选项
4416      "name":"配置名",
4417      "sub_name":"配置项值",
4418    }]
4419    "module_button":[{//模块按钮
4420      "type":"default:默认,custom:自定义",
4421      "type":"func:函数名",
4422      "type":"name:名称",
4423    }]
4424  }
4425}
4426```
4427
4428### 产品内页下载数据 -- GET host/down
4429
4430- controller: ``app\home\controller\HostController::getDown``
4431- desc: 产品内页下载数据 -- 萧十一郎
4432
4433**params**
4434
4435| name | type | required | default | other | desc |
4436| --- | --- | --- | --- | --- | --- |
4437| productid | 整型 | 必填 | - | - | 产品id |
4438| domainstatus | 整型 | 必填 | - | - | 主机状态 |
4439
4440**response example**
4441
4442```json
4443{
4444  "status":200/201/203/204/400/401/406,
4445  "msg":提示信息,
4446  "data":{
4447    "download_data":[{//基础数据
4448    }]
4449  }
4450}
4451```
4452
4453### 产品内页取消原因 -- GET host/cancel
4454
4455- controller: ``app\home\controller\HostController::getCancel``
4456- desc: 产品内页取消原因 -- 萧十一郎
4457
4458**params**
4459
4460| name | type | required | default | other | desc |
4461| --- | --- | --- | --- | --- | --- |
4462| host_id | 整型 | 必填 | - | - | 主机id |
4463
4464**response example**
4465
4466```json
4467{
4468  "status":200/201/203/204/400/401/406,
4469  "msg":提示信息,
4470  "data":{
4471    "download_data":[{//基础数据
4472    }]
4473  }
4474}
4475```
4476
4477### 产品内页系统 -- GET host/cloudos
4478
4479- controller: ``app\home\controller\HostController::getCloudOs``
4480- desc: 产品内页系统 -- 萧十一郎
4481
4482**params**
4483
4484| name | type | required | default | other | desc |
4485| --- | --- | --- | --- | --- | --- |
4486| productid | 整型 | 必填 | - | - | 产品id |
4487| os_config_option_id | 整型 | 必填 | - | - | 操作系统id |
4488
4489**response example**
4490
4491```json
4492{
4493  "status":200/201/203/204/400/401/406,
4494  "msg":提示信息,
4495  "data":{
4496    "cloud_os":[{//云操作系统
4497      "id":"操作系统ID",
4498      "name":"名称",
4499      "group":"分组id",
4500    }]
4501    "cloud_os_group":[{//云操作系统分组
4502      "id":"分组id",
4503      "name":"分组名称",
4504    }]
4505  }
4506}
4507```
4508
4509### 产品内页图表 -- GET host/chart
4510
4511- controller: ``app\home\controller\HostController::getChart``
4512- desc: 产品内页图表 -- 萧十一郎
4513
4514**params**
4515
4516| name | type | required | default | other | desc |
4517| --- | --- | --- | --- | --- | --- |
4518| host_id | 整型 | 必填 | - | - | 主机id |
4519| api_type | 整型 | 必填 | - | - | api类型 |
4520| domainstatus | 整型 | 必填 | - | - | 主机状态 |
4521| type | 整型 | 必填 | - | - | 类型 |
4522| zjmf_api_id | 整型 | 必填 | - | - | zjmf_api_id |
4523| dcimid | 整型 | 必填 | - | - | dcimid |
4524
4525**response example**
4526
4527```json
4528{
4529  "status":200/201/203/204/400/401/406,
4530  "msg":提示信息,
4531  "data":{
4532    "":[{//基础数据
4533    }]
4534  }
4535}
4536```
4537
4538### 产品内页moudle -- GET host/moudle
4539
4540- controller: ``app\home\controller\HostController::getMoudle``
4541- desc: 产品内页moudle -- 萧十一郎
4542
4543**params**
4544
4545| name | type | required | default | other | desc |
4546| --- | --- | --- | --- | --- | --- |
4547| productid | 整型 | 必填 | - | - | 产品id |
4548| host_id | 整型 | 必填 | - | - | 主机id |
4549| api_type | 整型 | 必填 | - | - | api类型 |
4550| domainstatus | 整型 | 必填 | - | - | 主机状态 |
4551| type | 整型 | 必填 | - | - | 类型 |
4552| zjmf_api_id | 整型 | 必填 | - | - | zjmf_api_id |
4553| dcimid | 整型 | 必填 | - | - | dcimid |
4554| bwlimit | 整型 | 必填 | - | - | bwlimit |
4555
4556**response example**
4557
4558```json
4559{
4560  "status":200/201/203/204/400/401/406,
4561  "msg":提示信息,
4562  "data":{
4563    "":[{//基础数据
4564    }]
4565  }
4566}
4567```
4568
4569### 产品内页流量包数据 -- GET host/flowpacket
4570
4571- controller: ``app\home\controller\HostController::getFlowpacket``
4572- desc: 产品内页流量包数据 -- 萧十一郎
4573
4574**params**
4575
4576| name | type | required | default | other | desc |
4577| --- | --- | --- | --- | --- | --- |
4578| uid | 整型 | 必填 | - | - | 用户id |
4579| host_id | 整型 | 必填 | - | - | 主机id |
4580| productid | 整型 | 必填 | - | - | 产品id |
4581| serverid | 整型 | 必填 | - | - | 服务器id |
4582| api_type | 整型 | 必填 | - | - | apitype |
4583| upstream_price_type | 整型 | 必填 | - | - | upstream_price_type |
4584| zjmf_api_id | 整型 | 必填 | - | - | zjmf_api_id |
4585| dcimid | 整型 | 必填 | - | - | dcimid |
4586| upstream_price_value | 整型 | 必填 | - | - | upstream_price_value |
4587| type | 整型 | 必填 | - | - | 类型 |
4588| bwlimit | 整型 | 必填 | - | - | bwlimit |
4589| bwusage | 整型 | 必填 | - | - | bwusage |
4590
4591**response example**
4592
4593```json
4594{
4595  "status":200/201/203/204/400/401/406,
4596  "msg":提示信息,
4597  "data":{
4598  }
4599}
4600```
4601
4602### 产品内页数据 id:文件标题 -- GET host/header
4603
4604- controller: ``app\home\controller\HostController::getHeader``
4605- desc: 产品内页数据 id:文件标题 -- 萧十一郎
4606
4607**params**
4608
4609| name | type | required | default | other | desc |
4610| --- | --- | --- | --- | --- | --- |
4611| host_id | 整型 | 必填 | - | - | 产品id |
4612
4613**response example**
4614
4615```json
4616{
4617  "status":200/201/203/204/400/401/406,
4618  "msg":提示信息,
4619  "data":{
4620    "host_data":[{//基础数据
4621      "ordernum":"订单id",
4622      "productid":"产品id",
4623      "serverid":"服务器id",
4624      "regdate":"产品开通时间",
4625      "domain":"主机名",
4626      "payment":"支付方式",
4627      "firstpaymentamount":"首付金额",
4628      "firstpaymentamount_desc":"首付金额",
4629      "amount":"续费金额",
4630      "amount_desc":"续费金额",
4631      "billingcycle":"付款周期",
4632      "billingcycle_desc":"付款周期",
4633      "nextduedate":"到期时间",
4634      "nextinvoicedate":"下次帐单时间",
4635      "dedicatedip":"独立ip",
4636      "assignedips":"附加ip",
4637      "ip_num":"IP数量",
4638      "domainstatus":"产品状态",
4639      "domainstatus_desc":"产品状态",
4640      "username":"服务器用户名",
4641      "password":"服务器密码",
4642      "suspendreason":"暂停原因",
4643      "auto_terminate_end_cycle":"是否到期取消",
4644      "auto_terminate_reason":"取消原因",
4645      "productname":"产品名",
4646      "groupname":"产品组名",
4647      "bwusage":"当前使用流量",
4648      "bwlimit":"当前使用流量上限(0表示不限)",
4649      "os":"操作系统",
4650      "port":"端口",
4651      "remark":"备注",
4652      "allow_upgrade_config":"是否输出“升级配置项”按钮:1是",
4653      "allow_upgrade_product":"是否输出“升级产品”按钮:1是",
4654      "show_traffic_usage":"是否显示用量图",
4655    }]
4656    "config_options":[{//可配置选项
4657      "name":"配置名",
4658      "sub_name":"配置项值",
4659    }]
4660    "custom_field_data":[{//自定义字段
4661      "fieldname":"字段名",
4662      "value":"字段值",
4663    }]
4664    "download_data":[{//可下载数据
4665      "id":"文件id",
4666    }]
4667    "module_button":[{//模块按钮
4668      "type":"default:默认,custom:自定义",
4669      "type":"func:函数名",
4670      "type":"name:名称",
4671    }]
4672    "module_client_area":[{//模块页面输出
4673      "key":"键值用于获取内容",
4674      "name":"名称",
4675    }]
4676    "hook_output":"钩子在本页面的输出,数组,循环显示的html",
4677    "dcim.flowpacket":[{//当前产品可购买的流量包
4678      "id":"流量包ID",
4679      "name":"流量包名称",
4680      "price":"价格",
4681      "sale_times":"销售次数",
4682      "stock":"库存(0不限)",
4683    }]
4684    "dcim.auth":"服务器各种操作权限控制(on有权限off没权限)",
4685    "dcim.area_code":"区域代码",
4686    "dcim.area_name":"区域名称",
4687    "dcim.os_group":[{//操作系统分组
4688      "id":"分组ID",
4689      "name":"分组名称",
4690      "svg":"分组svg号",
4691    }]
4692    "dcim.os":[{//操作系统数据
4693      "id":"操作系统ID",
4694      "name":"操作系统名称",
4695      "ostype":"操作系统类型(1windows0linux)",
4696      "os_name":"操作系统真实名称(用来判断具体的版本和操作系统)",
4697      "group_id":"所属分组ID",
4698    }]
4699    "flow_packet_use_list":[{//流量包使用情况
4700      "name":"流量包名称",
4701      "capacity":"流量包大小",
4702      "price":"价格",
4703      "pay_time":"支付时间",
4704      "used":"已用流量",
4705      "leave":"剩余流量",
4706    }]
4707    "cloud_os":[{//云操作系统
4708      "id":"操作系统ID",
4709      "name":"名称",
4710      "group":"分组id",
4711    }]
4712    "cloud_os_group":[{//云操作系统分组
4713      "id":"分组id",
4714      "name":"分组名称",
4715    }]
4716    "system_config.company_name":"系统公司名",
4717    "dcimcloud.nat_acl":"远程地址",
4718    "dcimcloud.nat_web":"建站解析",
4719    "module_power_status":"是否请求电源状态",
4720  }
4721}
4722```
4723
4724### 产品转移根据邮箱或手机号获取用户信息 -- POST host/nametouser
4725
4726- controller: ``app\home\controller\HostController::postNameToUser``
4727- desc: 产品转移根据邮箱或手机号获取用户信息 -- 萧十一郎
4728
4729**params**
4730
4731| name | type | required | default | other | desc |
4732| --- | --- | --- | --- | --- | --- |
4733| tranfer_name | 字符串 | 必填 | - | - | 查找到邮箱或者手机号 |
4734
4735**response example**
4736
4737```json
4738{
4739  "status":200/201/203/204/400/401/406,
4740  "msg":提示信息,
4741  "data":{
4742    "id":"用户id(调用转移时需要)",
4743    "username":"用户名(展示给客户确认)",
4744  }
4745}
4746```
4747
4748### 提交转移请求 -- POST host/transfer
4749
4750- controller: ``app\home\controller\HostController::postTransfer``
4751- desc: 提交转移请求 -- 萧十一郎
4752
4753**params**
4754
4755| name | type | required | default | other | desc |
4756| --- | --- | --- | --- | --- | --- |
4757| host_id | number | 必填 | - | - | 主机id |
4758| remarks | 字符串 | 必填 | - | - | 备注 |
4759| transfer_uid | number | 必填 | - | - | 接收人id |
4760
4761**response example**
4762
4763```json
4764{
4765  "status":200/201/203/204/400/401/406,
4766  "msg":提示信息,
4767  "data":{
4768  }
4769}
4770```
4771
4772### 取消产品转移(发起端) -- POST host/canceltranfer
4773
4774- controller: ``app\home\controller\HostController::postCancelTranfer``
4775- desc: 取消产品转移(发起端) -- 萧十一郎
4776
4777**params**
4778
4779| name | type | required | default | other | desc |
4780| --- | --- | --- | --- | --- | --- |
4781| transfer_id | number | 必填 | - | - | 转移id(有请求时会显示到产品内页) |
4782
4783**response example**
4784
4785```json
4786{
4787  "status":200/201/203/204/400/401/406,
4788  "msg":提示信息,
4789  "data":{
4790  }
4791}
4792```
4793
4794### 接收产品转移(接收端) -- POST host/teceivetranfer
4795
4796- controller: ``app\home\controller\HostController::postReceiveTranfer``
4797- desc: 接收产品转移(接收端) -- 萧十一郎
4798
4799**params**
4800
4801| name | type | required | default | other | desc |
4802| --- | --- | --- | --- | --- | --- |
4803| transfer_id | number | 必填 | - | - | 转移id |
4804
4805**response example**
4806
4807```json
4808{
4809  "status":200/201/203/204/400/401/406,
4810  "msg":提示信息,
4811  "data":{
4812  }
4813}
4814```
4815
4816### 拒绝产品转移(接收端) -- POST host/refusetranfer
4817
4818- controller: ``app\home\controller\HostController::postRefuseTranfer``
4819- desc: 拒绝产品转移(接收端) -- 萧十一郎
4820
4821**params**
4822
4823| name | type | required | default | other | desc |
4824| --- | --- | --- | --- | --- | --- |
4825| transfer_id | number | 必填 | - | - | 转移id |
4826
4827**response example**
4828
4829```json
4830{
4831  "status":200/201/203/204/400/401/406,
4832  "msg":提示信息,
4833  "data":{
4834  }
4835}
4836```
4837
4838### 产品续费--页面 -- GET host/renewpage
4839
4840- controller: ``app\home\controller\HostController::getRenewPage``
4841- desc: 产品续费--页面 -- wyh
4842
4843**params**
4844
4845| name | type | required | default | other | desc |
4846| --- | --- | --- | --- | --- | --- |
4847| hostid | number | 必填 | - | - | 主机id,可传单个值hostid |
4848| billingcycles | number | 非必填 | - | - | 周期 |
4849
4850**response example**
4851
4852```json
4853{
4854  "status":200/201/203/204/400/401/406,
4855  "msg":提示信息,
4856  "data":{
4857    "host":[{//产品数据
4858    }]
4859    "cycle":"可用周期",
4860    "accounts":[{//充值记录
4861      "trans_id":"交易流水amount_in:金额pay_time:交易日期type:来源gateway:支付方式",
4862    }]
4863  }
4864}
4865```
4866
4867### 产品续费--页面(模板调用) -- GET host/renewpageview
4868
4869- controller: ``app\home\controller\HostController::getRenewPageView``
4870- desc: 产品续费--页面(模板调用) -- wyh
4871
4872**params**
4873
4874| name | type | required | default | other | desc |
4875| --- | --- | --- | --- | --- | --- |
4876| hostid | number | 必填 | - | - | 主机id |
4877
4878**response example**
4879
4880```json
4881{
4882  "status":200/201/203/204/400/401/406,
4883  "msg":提示信息,
4884  "data":{
4885    "host":[{//产品数据
4886    }]
4887    "cycle":"可用周期",
4888    "accounts":[{//充值记录
4889      "trans_id":"交易流水amount_in:金额pay_time:交易日期type:来源gateway:支付方式",
4890    }]
4891  }
4892}
4893```
4894
4895### 产品续费--页面=--充值记录 -- GET host/hostrecharge
4896
4897- controller: ``app\home\controller\HostController::getHostRecharge``
4898- desc: 产品续费--页面=--充值记录 -- wyh
4899
4900**params**
4901
4902| name | type | required | default | other | desc |
4903| --- | --- | --- | --- | --- | --- |
4904| hostid | 整型 | 非必填 | - | - | 产品ID |
4905| page | 整型 | 非必填 | - | - | 页码 |
4906| limit | 整型 | 非必填 | - | - | 长度 |
4907
4908**response example**
4909
4910```json
4911{
4912  "status":200/201/203/204/400/401/406,
4913  "msg":提示信息,
4914  "data":{
4915    "trans_id":"流水单号",
4916    "amount_in":"金额",
4917    "pay_time":"交易日期",
4918    "type":"来源",
4919    "gateway":"支付方式",
4920    "amount_out":"退款金额(取负数)",
4921    "refund":"当refund>0时,表示退款,展示amount_in == amout_out的数据,并取负数",
4922  }
4923}
4924```
4925
4926### 产品续费 -- POST host/renew
4927
4928- controller: ``app\home\controller\HostController::postRenew``
4929- desc: 产品续费 -- wyh
4930
4931**params**
4932
4933| name | type | required | default | other | desc |
4934| --- | --- | --- | --- | --- | --- |
4935| hostid | number | 必填 | - | - | 主机id,可传单个值hostid |
4936| billingcycles | number | 非必填 | - | - | 周期 |
4937| duration | number | 非必填 | - | - | 周期时间,秒 |
4938
4939**response example**
4940
4941```json
4942{
4943  "status":200/201/203/204/400/401/406,
4944  "msg":提示信息,
4945  "data":{
4946  }
4947}
4948```
4949
4950### 产品设置自动续费 -- POST host/autorenew
4951
4952- controller: ``app\home\controller\HostController::postAutoRenew``
4953- desc: 产品设置自动续费 -- wyh
4954
4955**params**
4956
4957| name | type | required | default | other | desc |
4958| --- | --- | --- | --- | --- | --- |
4959| hostid | number | 必填 | - | - | 主机id,可传单个值hostid |
4960| initiative_renew | number | 非必填 | - | - | 是否自动续费 |
4961
4962**response example**
4963
4964```json
4965{
4966  "status":200/201/203/204/400/401/406,
4967  "msg":提示信息,
4968  "data":{
4969  }
4970}
4971```
4972
4973### 结算批量续费(页面) -- POST host/batchrenewpage
4974
4975- controller: ``app\home\controller\HostController::postBatchRenewPage``
4976- desc: 结算批量续费(页面) -- wyh
4977
4978**params**
4979
4980| name | type | required | default | other | desc |
4981| --- | --- | --- | --- | --- | --- |
4982| host_ids | 数组 | 必填 | - | - | 批量续费的产品数组 |
4983| cycles[产品ID] | 数组 | 非必填 | - | - | (可选参数,第一次不传,在续费页面修改周期时传递此值)批量续费的产品周期:cycles[38] |
4984
4985**response example**
4986
4987```json
4988{
4989  "status":200/201/203/204/400/401/406,
4990  "msg":提示信息,
4991  "data":{
4992    "currency":"货币信息",
4993    "hosts":[{//产品信息
4994      "id":[{//产品IDname
4995      }]
4996    }]
4997    "total":"总价",
4998  }
4999}
5000```
…文件过长,仅显示前 5000 行