您可以捐助,支持我们的公益事业。

1元 10元 50元





认证码:  验证码,看不清楚?请点击刷新验证码 必填



  求知 文章 文库 Lib 视频 Code iProcess 课程 认证 咨询 工具 火云堂 讲座吧   成长之路  
会员   
 
   
 
  
每天15篇文章
不仅获得谋生技能
更可以追随信仰
 
     
   
 订阅
  捐助
小程序端接口需求分析
 
1181 次浏览     评价:  
 2018-9-14 
 
编辑推荐:

本文来自于简书,文章介绍了微信用户获取和更新用户个人信息,接口所用的请求方式和参数等相关内容。

微信用户登录

请求URL:

./public/wxAppUserCodeComes

请求方式:

POST

参数:

返回示例

{
"code":"OK",
"data":{
"token": 'IamTokenFromWxAPPAPI',
"user_info": {
"wx_app_open_id": "IamOpenId",
"wx_app_session_key": "12154545"
}
}
}

返回参数说明

备注

公众号尚未被用户授权时,user_info中nick_name,province等信息暂无,前端调用wx.getUserInfo获取raw_data,session_key用于encryptedData解密;

系统目前open_id和系统账号只是绑定关联,没有绝对依赖,可以暂不考虑wx.checkSession;

微信用户更新微信用户信息接口(用户授权后)

请求URL:

./public/updateWxUserInfo

请求方式:

POST

参数:

返回示例

{
"code":"OK",
"data":{
"done": true
}
}

返回参数说明

高校推荐模块

获取高校信息列表

请求URL:

./public/HomeController/universityList

请求方式:

POST

参数:

返回示例

{
"code": "OK",
"data": {
"list": [
{
"university_id": 1,
"university_name": "Harvard",
"badge": "jss292424.png",
"image": "bsdihdjaass.png",
"rank": 1,
"status": "NORMAL",
"desc": "Philadelphia University is located in Philadelphia, Pennsylvania, USA. In 1884, the Philadelphia Philology School",
"address": "Philadelphia, Pennsylvania, USA"
},
{
"university_id": 2,
"university_name": "William and Mary College",
"badge": "jss26524.png",
"image": "bsdihd455ss.png",
"rank": 2,
"status": "NORMAL",
"desc": "Founded in 1693, the William and Mary College, also known as the William and Mary College, is the second oldest institution of higher education in the nation with a history just behind Harvard University founded in 1636",
"address": "Virginia, United States"
},
]
}

获取某高校详情

请求URL:

./public/HomeController/universityItem

请求方式:

POST

参数:

返回示例

{
"code": "OK",
"data": {
"universityItem": {
"university_id": 1,
"university_name": "Harvard",
"badge": "jss292424.png",
"image": "bsdihdjaass.png",
"rank": 1,
"status": "NORMAL",
"desc": "Philadelphia University is located in Philadelphia, Pennsylvania, USA. In 1884, the Philadelphia Philology School",
"address": "Philadelphia, Pennsylvania, USA"
}
}

搜索高校

请求URL:

./public/HomeController/search

请求方式:

POST

参数:

返回示例

{
"code": "OK",
"data": {
"list": [
{
"university_id": 1,
"university_name": "Harvard",
"badge": "jss292424.png",
"image": "bsdihdjaass.png",
"rank": 1,
"status": "NORMAL",
"desc": "Philadelphia University is located in Philadelphia, Pennsylvania, USA. In 1884, the Philadelphia Philology School",
"address": "Philadelphia, Pennsylvania, USA"
}
]
}

评估模块

当用户符合评估条件时,小程序获取用户个人信息,若在返回信息中获取不到用户邮箱(这里只是用来做判断)则要求用户填写详细信息,上传用户详细个人信息,若用户上传成功则提示用户可下单,当用户点击下单则创建订单,当用户点击支付确定取消或者则记录订单支付结果。

获取用户个人信息

请求URL:

./public/UserController/getUserInfo

请求方式:

POST

参数:

返回示例

{
"code": "OK",
"data": {
"user_info": {
"open_id": "olx8H0UHfk3RrzTe4ofZBWzl8J-0",
"nick_name": "小样儿960",
"user_name": "刘小倪",
"avatar_url": "https://wx.qlogo.cn/mmopen/vi_32/wUMSLGCic1FOh
TM5yV1Nw3S7txib7v0Fp0TPogtegNUeqvKS9t0OFxRiaqo27K
gxtwReJmicUkeHl3FX2fxVVuZwmA/0",
"gender": 2,
"city": "Hangzhou",
"province": "Zhejiang",
"country": "China",
"language": "zh_CN",
"status": "NORMAL",
"mobile": "13588235393",
"email": "xiaoni960@163.com",
"university": "杭州电子科技大学",
"subject": "数字媒体技术",
"degree": "本科",
}
}
}

更新用户个人信息

请求URL:

./public/updateWxUserInfo

请求方式:

POST

参数:

返回示例

{
"code":"OK",
"data":{
"done": true
}
}

创建订单

请求URL:

./OrderController/placeOrder

请求方式:

POST

参数:

返回示例

{
"code": "OK",
"data": {
"order_info": {
"order_id": 2,
"order_sn": "18021250445844",
"open_id": "olx8H0Tx0rlev97sa2bCIOQcWVKo",
"status": "INIT",
"payment": "200.00",
"order_time": "2018-02-05 10:31:42",
"pay_time": null,
"publication": 200,
"citation": 200,
"review": 100,
"immigration_type": "EB1A",
"user_info":{
"open_id": "olx8H0UHfk3RrzTe4ofZBWzl8J-0",
"nick_name": "小样儿960",
"user_name": "刘小倪",
"avatar_url": "https://wx.qlogo.cn/mmopen/vi_32/wUMSL
GCic1FOhTM5yV1Nw3S7txib7v0Fp0TPogtegNUeqvKS9t0OFxR
iaqo27KgxtwReJmicUkeHl3FX2fxVVuZwmA/0",
"gender": 2,
"city": "Hangzhou",
"province": "Zhejiang",
"country": "China",
"language": "zh_CN",
"status": "NORMAL",
"mobile": "13588235393",
"email": "xiaoni960@163.com",
"university": "杭州电子科技大学",
"subject": "数字媒体技术",
"degree": "本科",
}
}
}
}

记录支付结果

请求URL:

./OrderController/recordOrder

请求方式:

POST

参数:

返回示例

{
"code":"OK",
"data":{
"done": true
}
}

status为订单状态,分为INIT(待付款),PAID(已付款),SERVED(已服务),CANCELLED(已取消)。

注:只要订单的状态为已付款则系统将把订单信息发送至管理员邮箱

个人中心模块

获取订单列表

请求URL:

./OrderController/getOrderList

请求方式:

POST

参数:

返回示例

{
"code": "OK",
"data": {
"order_list": [
{
"order_id": 1,
"order_sn": "18021250445844",
"open_id": "olx8H0Tx0rlev97sa2bCIOQcWVKo",
"status": "INIT",
"payment": "200.00",
"order_time": "2018-02-05 10:31:42",
"pay_time": null,
"publication": 200,
"citation": 200,
"review": 100,
"immigration_type": "EB1A",
"user_info":{
"open_id": "olx8H0UHfk3RrzTe4ofZBWzl8J-0",
"nick_name": "小样儿960",
"user_name": "刘小倪",
"avatar_url": "https://wx.qlogo.cn/mmopen/vi_32/wUMS
LGCic1FOhTM5yV1Nw3S7txib7v0Fp0TPogtegNUeqvKS9t0O
FxRiaqo27KgxtwReJmicUkeHl3FX2fxVVuZwmA/0",
"gender": 2,
"city": "Hangzhou",
"province": "Zhejiang",
"country": "China",
"language": "zh_CN",
"status": "NORMAL",
"mobile": "13588235393",
"email": "xiaoni960@163.com",
"university": "杭州电子科技大学",
"subject": "数字媒体技术",
"degree": "本科",
}
},
{
"order_id": 2,
"order_sn": "18021250445844",
"open_id": "olx8H0Tx0rlev97sa2bCIOQcWVKo",
"status": "INIT",
"payment": "200.00",
"order_time": "2018-02-05 10:31:42",
"pay_time": null,
"publication": 200,
"citation": 200,
"review": 100,
"immigration_type": "EB1A",
"user_info":{
"open_id": "olx8H0UHfk3RrzTe4ofZBWzl8J-0",
"nick_name": "小样儿960",
"user_name": "刘小倪",
"avatar_url": "https://wx.qlogo.cn/mmopen/vi_32/wUMSLGCic
1FOhTM5yV1Nw3S7txib7v0Fp0TPogtegNUeqvKS9t0OFxRiaqo27K
gxtwReJmicUkeHl3FX2fxVVuZwmA/0",
"gender": 2,
"city": "Hangzhou",
"province": "Zhejiang",
"country": "China",
"language": "zh_CN",
"status": "NORMAL",
"mobile": "13588235393",
"email": "xiaoni960@163.com",
"university": "杭州电子科技大学",
"subject": "数字媒体技术",
"degree": "本科",
}
}
]
}
}
   
1181 次浏览  评价: 差  订阅 捐助
 
相关文章

锻造软件需求人员的六大要素
开发需求路线图:重要的是规划
需求用例模板
如何做好需求变更管理?流程规范
 
相关文档

需求分析方法
需求分析与建模(两个周期)
如何将客户需求转化为技术需求
产品生命周期管理
 
相关课程

面向产品的需求分析与管理
面向产品的需求分析与管理
非功能需求分析与管理
用户体验 & 界面设计
软件需求分析与管理
每天2个文档/视频
扫描微信二维码订阅
订阅技术月刊
获得每月300个技术资源
 
 

关于我们 | 联系我们 | 京ICP备10020922号 京公海网安备110108001071号