正在显示
4 个修改的文件
包含
308 行增加
和
32 行删除
1 | -### 接口完成进度 | ||
2 | -|功能|完成状态|时间|接口路径|人员 | ||
3 | -|---|---|----|----|---| | ||
4 | -|登录|完成|2019.10.20|/v1/auth/login| | ||
5 | -|短信验证码|完成|2019.10.20|/v1/auth/smsCode| | ||
6 | -|获取token|完成|2019.10.20|/v1/auth/accessToken| | ||
7 | -|刷新token|完成|2019.10.20|/v1/auth/refreshToken| | ||
8 | -|注销|完成|2019.10.26|/v1/auth/revoke| | ||
9 | -|更新设备|完成|2019.10.26|/v1/auth/updateDevice| | ||
10 | -|修改手机号-校验验证码|完成|2019.11.20|/v1/user/checkSmsCode| | ||
11 | -|修改手机号|完成|2019.11.20|/v1/user/changePhone| | ||
12 | -|修改密码|完成|2019.11.20|v1/user/changePassword| | ||
13 | -|忘记密码|完成|2019.11.20|v1/user/resetPassword| | ||
14 | -|切换企业| | |v1/user/switchCompany| | ||
15 | -|用户公司列表| | |v1/user/companys| | ||
16 | -|机会评论列表|完成|2019.11.21|/v1/chance/comments| | 1 | +### 阶段一接口完成进度 |
2 | +|功能|完成状态|时间|接口路径 | ||
3 | +|---|---|----|----| | ||
4 | +|认证-登录|完成|2019.10.20|/v1/auth/login| | ||
5 | +|认证-短信验证码|完成|2019.10.20|/v1/auth/smsCode| | ||
6 | +|认证-获取token|完成|2019.10.20|/v1/auth/accessToken| | ||
7 | +|认证-刷新token|完成|2019.10.20|/v1/auth/refreshToken| | ||
8 | +|认证-注销|完成|2019.10.26|/v1/auth/revoke| | ||
9 | +|认证-更新设备|完成|2019.10.26|/v1/auth/updateDevice| | ||
10 | +|用户中心-修改手机号(校验验证码)|完成|2019.11.20|/v1/user/checkSmsCode| | ||
11 | +|用户中心-修改手机号|完成|2019.11.20|/v1/user/changePhone| | ||
12 | +|用户中心-修改密码|完成|2019.11.20|v1/user/changePassword| | ||
13 | +|用户中心-忘记密码|完成|2019.11.20|v1/user/resetPassword| | ||
14 | +|用户中心-切换企业| | |v1/user/switchCompany| | ||
15 | +|用户中心-用户公司列表| | |v1/user/companys| | ||
16 | +|机会发布-机会类型| | |v1/chance/chanceType| | ||
17 | +|机会发布-模板列表| | |v1/chance/templates| | ||
18 | +|机会发布-提交机会| | |v1/chance/submit| | ||
19 | +|机会发布-部门列表|完成|2019.12.3|v1/department/departments| | ||
20 | +|消息-公告| | | | | ||
21 | +|消息-消息中心|完成|2019.11.22|v1/message/messageCenter| | ||
22 | +|消息-标记已读|完成|2019.11.22|v1/message/msgCenterRead| | ||
23 | +|消息-标记全部已读|完成|2019.11.22|v1/message/msgCenterAllRead| | ||
24 | + | ||
25 | +### 阶段二接口完成进度 | ||
26 | +|功能|完成状态|时间|接口路径 | ||
27 | +|---|---|----|----| | ||
28 | +|消息-点赞|进行中| |v1/message/msgInteractive| | ||
29 | +|消息-评论|进行中| |v1/message/msgInteractive| | ||
30 | +|机会评论列表| | |/v1/chance/comments| | ||
31 | +|点赞/取消点赞| | |v1/chance/sympathyAction| | ||
17 | |我来评论|完成|2019.11.21|/v1/chance/iComment| | 32 | |我来评论|完成|2019.11.21|/v1/chance/iComment| |
18 | |我的评论|完成|2019.11.21|/v1/chance/iComments| | 33 | |我的评论|完成|2019.11.21|/v1/chance/iComments| |
19 | |评论详情-继续评论|完成|2019.11.26|/v1/chance/commentDetailsMulti| | 34 | |评论详情-继续评论|完成|2019.11.26|/v1/chance/commentDetailsMulti| |
20 | |评论详情-不能评论|完成|2019.11.26|/v1/chance/commentDetailsSingle| | 35 | |评论详情-不能评论|完成|2019.11.26|/v1/chance/commentDetailsSingle| |
21 | -|我的点赞|进行中| |v1/chance/favorite| | ||
22 | -|我的收藏|进行中| |v1/chance/favorite| | ||
23 | -|点赞/取消点赞|进行中| |v1/chance/sympathyAction| | ||
24 | -|消息中心|完成|2019.11.22|v1/message/messageCenter| | ||
25 | -|标记已读|完成|2019.11.22|v1/message/msgCenterRead| | ||
26 | -|标记全部已读|完成|2019.11.22|v1/message/msgCenterAllRead| | ||
27 | -|互动消息-点赞|进行中| |v1/message/msgInteractive| | ||
28 | -|互动消息-评论|进行中| |v1/message/msgInteractive| | ||
29 | -|机会审核消息|进行中| |v1/message/msgInteractive| | 36 | +|我的点赞| | |v1/chance/favorite| |
37 | +|我的收藏| | |v1/chance/favorite| | ||
38 | +|机会审核消息| | |v1/message/msgInteractive| | ||
30 | |我提交的机会| | | v1/chance/chances| | 39 | |我提交的机会| | | v1/chance/chances| |
31 | |我审核的机会| | | v1/chance/chances| | 40 | |我审核的机会| | | v1/chance/chances| |
32 | |机会详情| | | v1/chance/detail| | 41 | |机会详情| | | v1/chance/detail| |
33 | |待抓住机会列表| | |v1/chance/chances| | 42 | |待抓住机会列表| | |v1/chance/chances| |
34 | -|机会类型|进行中| |v1/chance/chanceType| | ||
35 | -|模板列表|进行中| |v1/chance/templates| | ||
36 | -|提交机会|进行中| |v1/chance/submit| | ||
37 | -|部门列表|完成|2019.12.3|v1/department/departments| | ||
38 | |配置-评分| | |v1/config/score| | 43 | |配置-评分| | |v1/config/score| |
39 | |机会审核| | |v1/chance/audit| | 44 | |机会审核| | |v1/chance/audit| |
40 | |机会修改评分| | |v1/chance/editScore| | 45 | |机会修改评分| | |v1/chance/editScore| |
@@ -29,7 +29,8 @@ net_im_base_url ="https://api.netease.im/nimserver" | @@ -29,7 +29,8 @@ net_im_base_url ="https://api.netease.im/nimserver" | ||
29 | net_im_app_secret ="a8d231f5c13a" | 29 | net_im_app_secret ="a8d231f5c13a" |
30 | net_im_app_key ="9c5410602597a7fe367aeeebd8210262" | 30 | net_im_app_key ="9c5410602597a7fe367aeeebd8210262" |
31 | 31 | ||
32 | -#统一用户中心 | 32 | +#统一用户中心 39aefef9e22744a3b2d2d3791824ae7b |
33 | user_center_url ="http://suplus-ucenter-dev.fjmaimaimai.com" | 33 | user_center_url ="http://suplus-ucenter-dev.fjmaimaimai.com" |
34 | user_center_salt ="rsF0pL!6DwjBO735" | 34 | user_center_salt ="rsF0pL!6DwjBO735" |
35 | -user_center_app_key ="39aefef9e22744a3b2d2d3791824ae7b" | ||
35 | +user_center_app_key ="39aefef9e22744a3b2d2d3791824ae7b" | ||
36 | +user_center_app_secret ="cykbjnfqgctn" |
@@ -531,7 +531,7 @@ func userCenterAuthLogin(request *protocol.UserCenterLoginRequest) (rsp *protoco | @@ -531,7 +531,7 @@ func userCenterAuthLogin(request *protocol.UserCenterLoginRequest) (rsp *protoco | ||
531 | httpReq.JSONBody(request) | 531 | httpReq.JSONBody(request) |
532 | httpReq.Header("appKey", appKey) | 532 | httpReq.Header("appKey", appKey) |
533 | httpReq.Header("curTime", curTime) | 533 | httpReq.Header("curTime", curTime) |
534 | - httpReq.Header("checkSum", getUserCenterCheckSum(curTime, "", appKey, salt)) | 534 | + httpReq.Header("checkSum", getUserCenterCheckSum(curTime, "", beego.AppConfig.String("user_center_app_secret"), salt)) |
535 | if httpRsp, err = httpReq.DoRequest(); err != nil { | 535 | if httpRsp, err = httpReq.DoRequest(); err != nil { |
536 | log.Error(err) | 536 | log.Error(err) |
537 | return | 537 | return |
接口模型.md
0 → 100644
1 | +## 认证 | ||
2 | + | ||
3 | +### 登录 | ||
4 | + | ||
5 | +* URL: /v1/auth/login | ||
6 | +* 格式: JSON | ||
7 | +* HTTP请求方式: POST | ||
8 | +* 请求示例 | ||
9 | +```json | ||
10 | +{ | ||
11 | + "phone": "18860180001", | ||
12 | + "code": "784657", | ||
13 | + "grantType": "signInPassword", | ||
14 | + "password": "123456", | ||
15 | + "clientId": "signInPassword" | ||
16 | +} | ||
17 | +``` | ||
18 | + | ||
19 | + | ||
20 | +* 应答示例 | ||
21 | +```json | ||
22 | +{ | ||
23 | + "code": 0, | ||
24 | + "msg": "登录成功", | ||
25 | + "data": { | ||
26 | + "authCode": "5251839614a611eaab01000c29ad8d6d" | ||
27 | + } | ||
28 | +} | ||
29 | +``` | ||
30 | + | ||
31 | + | ||
32 | +### 短信验证码 | ||
33 | + | ||
34 | +* URL: /v1/auth/smsCode | ||
35 | +* 格式: JSON | ||
36 | +* HTTP请求方式: POST | ||
37 | +* 请求示例 | ||
38 | +```json | ||
39 | +{ | ||
40 | + "phone":"18860180001" | ||
41 | +} | ||
42 | +``` | ||
43 | + | ||
44 | + | ||
45 | +* 应答示例 | ||
46 | +```json | ||
47 | +{ | ||
48 | + "code": 0, | ||
49 | + "msg": "登录成功", | ||
50 | + "data":{} | ||
51 | +} | ||
52 | +``` | ||
53 | + | ||
54 | + | ||
55 | +### 获取token | ||
56 | + | ||
57 | +* URL: /v1/auth/accessToken | ||
58 | +* 格式: JSON | ||
59 | +* HTTP请求方式: POST | ||
60 | +* 请求示例 | ||
61 | +```json | ||
62 | +{ | ||
63 | + "clientId":"lks3Z8Ncn2j", | ||
64 | + "clientSecret":"gtfhyjukiol3Qncbvmdwe67khh", | ||
65 | + "authCode":"5251839614a611eaab01000c29ad8d6d" | ||
66 | +} | ||
67 | +``` | ||
68 | + | ||
69 | + | ||
70 | +* 应答示例 | ||
71 | +```json | ||
72 | +{ | ||
73 | + "code": 0, | ||
74 | + "msg": "成功", | ||
75 | + "data": { | ||
76 | + "refreshToken": "8debc5a314a611eaab01000c29ad8d6d", | ||
77 | + "accessToken": "8debc59814a611eaab01000c29ad8d6d", | ||
78 | + "expiresIn": 3600 | ||
79 | + } | ||
80 | +} | ||
81 | +``` | ||
82 | + | ||
83 | +### 获取token | ||
84 | + | ||
85 | +* URL: /v1/auth/accessToken | ||
86 | +* 格式: JSON | ||
87 | +* HTTP请求方式: POST | ||
88 | +* 请求示例 | ||
89 | +```json | ||
90 | +{ | ||
91 | + "clientId":"lks3Z8Ncn2j", | ||
92 | + "clientSecret":"gtfhyjukiol3Qncbvmdwe67khh", | ||
93 | + "authCode":"5251839614a611eaab01000c29ad8d6d" | ||
94 | +} | ||
95 | +``` | ||
96 | + | ||
97 | + | ||
98 | +* 应答示例 | ||
99 | +```json | ||
100 | +{ | ||
101 | + "code": 0, | ||
102 | + "msg": "成功", | ||
103 | + "data": { | ||
104 | + "refreshToken": "8debc5a314a611eaab01000c29ad8d6d", | ||
105 | + "accessToken": "8debc59814a611eaab01000c29ad8d6d", | ||
106 | + "expiresIn": 3600 | ||
107 | + } | ||
108 | +} | ||
109 | +``` | ||
110 | + | ||
111 | +### 刷新token | ||
112 | + | ||
113 | +* URL: /v1/auth/refreshToken | ||
114 | +* 格式: JSON | ||
115 | +* HTTP请求方式: POST | ||
116 | +* 请求示例 | ||
117 | +```json | ||
118 | +{ | ||
119 | + "clientId":"lks3Z8Ncn2j", | ||
120 | + "clientSecret":"gtfhyjukiol3Qncbvmdwe67khh", | ||
121 | + "refreshToken":"8debc5a314a611eaab01000c29ad8d6d" | ||
122 | +} | ||
123 | +``` | ||
124 | + | ||
125 | + | ||
126 | +* 应答示例 | ||
127 | +```json | ||
128 | +{ | ||
129 | + "code": 0, | ||
130 | + "msg": "成功", | ||
131 | + "data": { | ||
132 | + "refreshToken": "8debc5a314a611eaab01000c29ad8d6d", | ||
133 | + "accessToken": "dd57fa4914a611eaab01000c29ad8d6d", | ||
134 | + "expiresIn": 3600 | ||
135 | + } | ||
136 | +} | ||
137 | +``` | ||
138 | + | ||
139 | +### 更新设备 | ||
140 | + | ||
141 | +* URL: /v1/auth/updateDevice | ||
142 | +* 格式: JSON | ||
143 | +* HTTP请求方式: POST | ||
144 | +* 请求示例 | ||
145 | +```json | ||
146 | +{ | ||
147 | + "clientId":"123456", | ||
148 | + "deviceToken":"123456" | ||
149 | +} | ||
150 | +``` | ||
151 | + | ||
152 | + | ||
153 | +* 应答示例 | ||
154 | +```json | ||
155 | +{ | ||
156 | + "code": 0, | ||
157 | + "msg": "更新成功", | ||
158 | + "data": null | ||
159 | +} | ||
160 | +``` | ||
161 | + | ||
162 | + | ||
163 | +### 注销登录 | ||
164 | + | ||
165 | +* URL: /v1/auth/rovoke | ||
166 | +* 格式: JSON | ||
167 | +* HTTP请求方式: POST | ||
168 | +* 请求示例 | ||
169 | +```json | ||
170 | +{ | ||
171 | + | ||
172 | +} | ||
173 | +``` | ||
174 | + | ||
175 | + | ||
176 | +* 应答示例 | ||
177 | +```json | ||
178 | +{ | ||
179 | + "code": 0, | ||
180 | + "msg": "成功", | ||
181 | + "data":{} | ||
182 | +} | ||
183 | +``` | ||
184 | + | ||
185 | +## 用户中心 | ||
186 | + | ||
187 | +### 修改手机号 检查手机验证码 | ||
188 | +* URL: /v1/user/checkSmsCode | ||
189 | +* 格式: JSON | ||
190 | +* HTTP请求方式: POST | ||
191 | +* 请求示例 | ||
192 | +```json | ||
193 | +{ | ||
194 | + "captcha":"252051" | ||
195 | +} | ||
196 | +``` | ||
197 | + | ||
198 | +* 应答示例 | ||
199 | +```json | ||
200 | +{ | ||
201 | + "code": 0, | ||
202 | + "msg": "成功", | ||
203 | + "data":{} | ||
204 | +} | ||
205 | +``` | ||
206 | + | ||
207 | + | ||
208 | +### 修改手机号 | ||
209 | +* URL: /v1/user/changePhone | ||
210 | +* 格式: JSON | ||
211 | +* HTTP请求方式: POST | ||
212 | +* 请求示例 | ||
213 | +```json | ||
214 | +{ | ||
215 | + "phone":"18860180001", | ||
216 | + "captcha":"077163" | ||
217 | +} | ||
218 | +``` | ||
219 | + | ||
220 | +* 应答示例 | ||
221 | +```json | ||
222 | +{ | ||
223 | + "code": 0, | ||
224 | + "msg": "成功", | ||
225 | + "data":{} | ||
226 | +} | ||
227 | +``` | ||
228 | + | ||
229 | +### 重置密码 | ||
230 | +* URL: /v1/user/resetPassword | ||
231 | +* 格式: JSON | ||
232 | +* HTTP请求方式: POST | ||
233 | +* 请求示例 | ||
234 | +```json | ||
235 | +{ | ||
236 | + "newPwd":"123456", | ||
237 | + "confirmPwd":"123456" | ||
238 | +} | ||
239 | +``` | ||
240 | + | ||
241 | +* 应答示例 | ||
242 | +```json | ||
243 | +{ | ||
244 | + "code": 0, | ||
245 | + "msg": "成功", | ||
246 | + "data":{} | ||
247 | +} | ||
248 | +``` | ||
249 | + | ||
250 | +### 修改密码 | ||
251 | +* URL: /v1/user/changePassword | ||
252 | +* 格式: JSON | ||
253 | +* HTTP请求方式: POST | ||
254 | +* 请求示例 | ||
255 | +```json | ||
256 | +{ | ||
257 | + "newPwd":"1234567", | ||
258 | + "confirmPwd":"1234567", | ||
259 | + "oldPwd":"123456" | ||
260 | +} | ||
261 | +``` | ||
262 | + | ||
263 | +* 应答示例 | ||
264 | +```json | ||
265 | +{ | ||
266 | + "code": 0, | ||
267 | + "msg": "成功", | ||
268 | + "data":{} | ||
269 | +} | ||
270 | +``` |
-
请 注册 或 登录 后发表评论