微信用户登录
请求URL:
./public/wxAppUserCodeComes
请求方式:
- POST
参数:
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
code | 是 | string | wx.login |
返回示例
{
"code":"OK",
"data":{
"token": 'IamTokenFromWxAPPAPI',
"user_info": {
"wx_app_open_id": "IamOpenId",
"wx_app_session_key": "12154545"
}
}
}
返回参数说明
参数名 | 类型 | 说明 |
---|---|---|
wx_app_open_id | string | open_id |
wx_app_session_key | string | session_key |
备注
- 公众号尚未被用户授权时,user_info中nick_name,province等信息暂无,前端调用wx.getUserInfo获取raw_data,session_key用于encryptedData解密;
- 系统目前open_id和系统账号只是绑定关联,没有绝对依赖,可以暂不考虑wx.checkSession;
微信用户更新微信用户信息接口(用户授权后)
请求URL:
./public/updateWxUserInfo
请求方式:
- POST
参数:
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
token | 是 | string | Get from wx.login response |
nick_name | 是 | string | getUserInfo解密后的nick_name |
avatar_url | 是 | string | ...avatar_url |
gender | 是 | string | ...gender |
city | 是 | string | ...city |
province | 是 | string | ...province |
country | 是 | string | ...country |
language | 是 | string | ...language |
返回示例
{
"code":"OK",
"data":{
"done": true
}
}
返回参数说明
参数名 | 类型 | 说明 |
---|---|---|
done | string | true or false 更新成功或失败 |
高校推荐模块
获取高校信息列表
请求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
参数:
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
university_id | 是 | int |
返回示例
{
"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
参数:
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
token | 是 | string | Get from wx.login response |
keywords | 是 | string | 默认为空字符串 |
page | 否 | int | 默认为1 |
返回示例
{
"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
参数:
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
token | 是 | string |
返回示例
{
"code": "OK",
"data": {
"user_info": {
"open_id": "olx8H0UHfk3RrzTe4ofZBWzl8J-0",
"nick_name": "花开",
"user_name": "朱梓骁",
"avatar_url": "https://wx.qlogo.cn/mmopen/vi_32/wUMSLGCic1FOhTM5yV1Nw3S7txib7v0Fp0TPogtegNUeqvKS9t0OFxRiaqo27KgxtwReJmicUkeHl3FX2fxVVuZwmA/0",
"gender": 2,
"city": "Hangzhou",
"province": "Zhejiang",
"country": "China",
"language": "zh_CN",
"status": "NORMAL",
"mobile": "13588235393",
"email": "[email protected]",
"university": "杭州电子科技大学",
"subject": "数字媒体技术",
"degree": "本科",
}
}
}
更新用户个人信息
请求URL:
./public/updateWxUserInfo
请求方式:
- POST
参数:
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
token | 是 | string | Get from wx.login response |
user_name | 是 | string | |
mobile | 是 | string | |
是 | string | ||
university | 是 | string | |
province | 是 | string | |
subject | 是 | string | |
degree | 是 | string |
返回示例
{
"code":"OK",
"data":{
"done": true
}
}
创建订单
请求URL:
./OrderController/placeOrder
请求方式:
- POST
参数:
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
token | 是 | string | Get from wx.login response |
publication | 是 | string | |
citation | 是 | string | |
review | 是 | string | |
immigration_type | 是 | string | |
payment | 是 | string |
返回示例
{
"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": "花开",
"user_name": "朱梓骁",
"avatar_url": "https://wx.qlogo.cn/mmopen/vi_32/wUMSLGCic1FOhTM5yV1Nw3S7txib7v0Fp0TPogtegNUeqvKS9t0OFxRiaqo27KgxtwReJmicUkeHl3FX2fxVVuZwmA/0",
"gender": 2,
"city": "Hangzhou",
"province": "Zhejiang",
"country": "China",
"language": "zh_CN",
"status": "NORMAL",
"mobile": "13588235393",
"email": "[email protected]",
"university": "杭州电子科技大学",
"subject": "数字媒体技术",
"degree": "本科",
}
}
}
}
记录支付结果
请求URL:
./OrderController/recordOrder
请求方式:
- POST
参数:
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
token | 是 | string | Get from wx.login response |
order_id | 是 | int | |
order_sn | 是 | string | |
status | 是 | string |
返回示例
{
"code":"OK",
"data":{
"done": true
}
}
status为订单状态,分为INIT(待付款),PAID(已付款),SERVED(已服务),CANCELLED(已取消)。
注:只要订单的状态为已付款则系统将把订单信息发送至管理员邮箱
个人中心模块
获取订单列表
请求URL:
./OrderController/getOrderList
请求方式:
- POST
参数:
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
token | 是 | string | Get from wx.login response |
status | 是 | string |
返回示例
{
"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": "花开",
"user_name": "朱梓骁",
"avatar_url": "https://wx.qlogo.cn/mmopen/vi_32/wUMSLGCic1FOhTM5yV1Nw3S7txib7v0Fp0TPogtegNUeqvKS9t0OFxRiaqo27KgxtwReJmicUkeHl3FX2fxVVuZwmA/0",
"gender": 2,
"city": "Hangzhou",
"province": "Zhejiang",
"country": "China",
"language": "zh_CN",
"status": "NORMAL",
"mobile": "13588235393",
"email": "[email protected]",
"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": "花开",
"user_name": "朱梓骁",
"avatar_url": "https://wx.qlogo.cn/mmopen/vi_32/wUMSLGCic1FOhTM5yV1Nw3S7txib7v0Fp0TPogtegNUeqvKS9t0OFxRiaqo27KgxtwReJmicUkeHl3FX2fxVVuZwmA/0",
"gender": 2,
"city": "Hangzhou",
"province": "Zhejiang",
"country": "China",
"language": "zh_CN",
"status": "NORMAL",
"mobile": "13588235393",
"email": "[email protected]",
"university": "杭州电子科技大学",
"subject": "数字媒体技术",
"degree": "本科",
}
}
]
}
}