检测小程序接口文档
1. 注册接口
POST http://check.lokimo.xyz/api/account/register
请求参数
| 参数名 | 类型 | 说明 |
| mobile | string | 手机号 |
| password | string | 密码(需包含字母、数字、符号等,6~20位) |
| password_confirm | string | 确认密码,需与 password 一致 |
| client | int | 客户端:1-小程序,2-H5/公众号,3-iOS,4-Android,5-PC,6-H5;不传默认小程序 |
| birthday | string | 生日,格式 Y-m-d,如 1990-06-26 |
| sex | int | 性别:0-未知,1-男,2-女 |
| height | int | 身高,单位 cm,范围 1~300 |
| weight | float | 体重,单位 kg,范围 1~500 |
| occupation | string | 职业,最长 64 字符 |
请求入参 demo
{
"mobile": "13800138000",
"password": "Abc123!@#",
"password_confirm": "Abc123!@#",
"birthday": "1990-06-26",
"sex": 1,
"height": 175,
"weight": 65.5,
"occupation": "软件工程师",
"client":1
}
响应示例
{
"code": 1,
"msg": "注册成功",
"data": "登录令牌 token 字符串",
"show": 0,
"time": "0.125048"
}
2. 账号密码登录接口
POST http://check.lokimo.xyz/api/account/login
请求参数
| 参数名 | 类型 | 说明 |
| account | string | 账号或手机号 |
| password | string | 密码 |
| client | int | 客户端类型:2-H5/公众号,3-iOS,4-Android,5-PC,6-H5 |
请求入参 demo
{
"account": "13800138000",
"password": "Abc123!@#",
"client": 6
}
响应示例
{
"code": 1,
"msg": "登录成功",
"data": {
"token": "登录令牌",
"nickname": "用户昵称",
"avatar": "头像 URL",
"level": 0
},
"show": 0,
"time": "0.775400"
}
3. 微信小程序登录接口
POST http://check.lokimo.xyz/api/account/mnplogin
请求参数
| 参数名 | 类型 | 说明 |
| code | string | 小程序 wx.login 返回的 code |
请求入参 demo
{
"code": "081aBcDe0xYz1234yZAbCdE5xYz12"
}
响应示例
{
"code": 1,
"msg": "登录成功",
"data": {
"token": "登录令牌",
"nickname": "用户昵称",
"avatar": "头像 URL",
"level": 0
},
"show": 0,
"time": "0.775400"
}
4. 首页接口
GET http://check.lokimo.xyz/api/index/home
请求参数
| 参数名 | 类型 | 说明 |
| token | string | 选填,请求头携带,登录后可返回当日打卡状态 |
返回参数(data)
| 参数名 | 类型 | 说明 |
| ads | array | 广告列表,每项含 title、image |
| ads[].title | string | 广告标题 |
| ads[].image | string | 广告图 URL |
| time_display | object | 时间展示(公历、农历、节气、子午流注) |
| time_display.lunar_text | string | 农历文案,如「蛇年 · 农历 腊月 初二 大寒」 |
| time_display.ziwu | object | 子午流注 |
| time_display.ziwu.shichen | string | 时辰,如「午时」 |
| time_display.ziwu.jingluo | string | 经络,如「心经」 |
| time_display.gregorian | string | 公历文案,如「2026年1月28日 星期三」 |
| today_sign | int | 当日是否已打卡:0-未打卡,1-已打卡(需传 token) |
响应示例
{
"code": 1,
"msg": "",
"data": {
"ads": [
{ "title": "首页轮播1", "image": "http://check.lokimo.xyz/uploads/images/xxx.jpg" }
],
"time_display": {
"lunar_text": "蛇年 · 农历 腊月 初二 大寒",
"ziwu": { "shichen": "午时", "jingluo": "心经" },
"gregorian": "2026年1月28日 星期三"
},
"today_sign": 0
},
"show": 0,
"time": "0.052341"
}
5. 个人中心接口
GET http://check.lokimo.xyz/api/user/center
请求参数
| 参数名 | 类型 | 说明 |
| token | string | 必填,请求头携带 |
返回参数(data)
| 参数名 | 类型 | 说明 |
| id | int | 用户 id |
| nickname | string | 昵称 |
| sn | string | 用户编号(UID) |
| avatar | string | 头像 URL |
| mobile | string | 手机号 |
| birthday | string | 生日,格式 Y-m-d H:i:s,未设置为空 |
| birthday_profile | object | 生日档案(有生日时有值,否则为空对象) |
| birthday_profile.birthday_gregorian | string | 公历生日,如 1982-05-14 |
| birthday_profile.birthday_lunar | string | 农历生日(含干支年),如 1982年(壬戌年)四月廿一 |
| birthday_profile.age | int | 周岁年龄 |
| birthday_profile.zodiac_cn | string | 生肖,如 属狗 |
| birthday_profile.constellation | string | 星座,如 金牛座 |
| constellation_today | object | 星座今日指数(有生日且星座有效时有值,按星座缓存 1 天) |
| constellation_today.all | string | 综合指数 |
| constellation_today.love | string | 爱情指数 |
| constellation_today.money | string | 财运指数 |
| constellation_today.work | string | 工作指数 |
| constellation_today.health | string | 健康指数 |
| constellation_today.color | string | 幸运色 |
| constellation_today.number | int | 幸运数字 |
| constellation_today.QFriend | string | 速配星座 |
| constellation_today.summary | string | 今日概述 |
| hasPayPassword | int | 是否设置支付密码:0-否,1-是 |
| next_level_tips | string | 下一等级提示文案 |
| user_money | string | 用户余额 |
| total_order_amount | string | 累计消费 |
| total_recharge_amount | string | 累计充值 |
| coupon | int | 优惠券数量 |
| user_integral | int | 积分 |
| level | int | 等级 |
| wait_pay | int | 待支付订单数 |
| wait_take | int | 待收货订单数 |
| wait_delivery | int | 待发货订单数 |
| wait_comment | int | 待评论数 |
| after_sale | int | 售后中数量 |
| distribution_setting | int | 分销开关 |
| distribution_code | string | 分销邀请码 |
| notice_num | int | 未读消息数 |
| is_new_user | int | 是否新用户 |
响应示例
{
"code": 1,
"msg": "获取成功",
"data": {
"id": 1,
"nickname": "魏文",
"sn": "174034770",
"avatar": "http://xxx/avatar.jpg",
"mobile": "138****8000",
"birthday": "1982-05-14 00:00:00",
"birthday_profile": {
"birthday_gregorian": "1982-05-14",
"birthday_lunar": "1982年(壬戌年)四月廿一",
"age": 43,
"zodiac_cn": "属狗",
"constellation": "金牛座"
},
"constellation_today": {
"all": "89",
"love": "80",
"money": "84",
"work": "80",
"health": "95",
"color": "古铜色",
"number": 8,
"QFriend": "处女座",
"summary": "有些思考的小漩涡,可能让你忽然的放空..."
},
"hasPayPassword": 1,
"next_level_tips": "",
"user_money": "0.00",
"total_order_amount": "0.00",
"total_recharge_amount": "0.00",
"coupon": 0,
"user_integral": 0,
"level": 0,
"wait_pay": 0,
"wait_take": 0,
"wait_delivery": 0,
"wait_comment": 0,
"after_sale": 0,
"distribution_setting": 1,
"distribution_code": "xxx",
"notice_num": 0,
"is_new_user": 0
},
"show": 0,
"time": "0.052341"
}
6. 获取进度数据(需登录)
GET http://check.lokimo.xyz/api/progress/detail
请求参数
| 参数名 | 类型 | 说明 |
| type | string | life-人生进度,time-时间进度,默认 life |
| dimension | string | 仅 type=time 时有效:day-年月日,month-年月,year-年,默认 day |
返回参数(data,type=life 人生进度时)
| 参数名 | 类型 | 说明 |
| type | string | 固定 "life" |
| percent | number | 人生进度百分比(0~100) |
| life_months | int | 人均寿命月数,900(75岁) |
| lived_months | int | 已度过月数(从生日至今) |
| birthday_text | string | 文案,如「1982年5月至今 525个月」或「请设置生日」 |
| birthday | string | 生日展示,如「1982年5月」,未设置为空 |
| birthday_ymd | string | 生日日期 Y-m-d,如「1990-06-26」,未设置为空(用于换日期回显) |
| has_birthday | boolean | 是否已设置生日 |
| life_desc | string | 人均寿命说明,如「中国现阶段人均寿命 900个月 (75岁)」 |
人生进度返回示例
{
"type": "life",
"percent": 41.67,
"life_months": 900,
"lived_months": 375,
"birthday_text": "1982年5月至今 525个月",
"birthday": "1982年5月",
"birthday_ymd": "1982-05-01",
"has_birthday": true,
"life_desc": "中国现阶段人均寿命 900个月 (75岁)"
}
返回参数(data,type=time 时间进度)
| 参数名 | 类型 | 说明 |
| type | string | 固定 "time" |
| percent | number | 当前维度进度百分比(0~100) |
| dimension | string | 维度:day-年月日,month-年月,year-年 |
| date_text | string | 日期文案,如「2026年1月20日」「2026年1月」「2026年」 |
| total | number | 维度总量:day 为 24(小时),month 为当月天数,year 为 12(月) |
| current | number | 当前进度值(与 total 同单位) |
| dimensions | array | 可切换的维度列表 |
| dimensions[].key | string | 维度 key:day / month / year |
| dimensions[].name | string | 维度名称:年月日 / 年月 / 年 |
时间进度返回示例
{
"type": "time",
"percent": 51.9149,
"dimension": "day",
"date_text": "2026年1月20日",
"total": 24,
"current": 12.46,
"dimensions": [
{ "key": "day", "name": "年月日" },
{ "key": "month", "name": "年月" },
{ "key": "year", "name": "年" }
]
}
7. 设置/修改生日(需登录)
POST http://check.lokimo.xyz/api/progress/setBirthday
请求参数
| 参数名 | 类型 | 说明 |
| birthday | string | 格式 Y-m-d,如 1990-06-26,不能晚于今天 |
请求入参 demo
{
"birthday": "1990-06-26"
}
8. 清除生日(需登录)
POST http://check.lokimo.xyz/api/progress/clearBirthday
9. 获取档案详情(编辑回显)
GET http://check.lokimo.xyz/api/user/getProfile
返回参数(data)
| 参数名 | 类型 | 说明 |
| id | int | 用户 id |
| nickname | string | 昵称 |
| sex | int | 性别:0-未知,1-男,2-女 |
| group_id | int | 分类(关联用户 id) |
| birthday | string | 出生日期,格式 Y-m-d H:i |
| birth_timezone | string | 出生时区 |
| birth_place | string | 出生地(省,市,区县) |
| birth_place_lng | float | 出生地经度 |
| birth_place_lat | float | 出生地纬度 |
| current_residence | string | 现居地(省,市,区县) |
| current_residence_lng | float | 现居地经度 |
| current_residence_lat | float | 现居地纬度 |
| remarks | string | 备注 |
| keywords | string | 关键词 |
响应示例
{
"code": 1,
"msg": "获取成功",
"data": {
"id": 1,
"nickname": "魏",
"sex": 1,
"group_id": 1,
"birthday": "1982-05-14 06:30",
"birth_timezone": "东8区",
"birth_place": "内蒙古,通辽,奈曼旗",
"birth_place_lng": 120.67,
"birth_place_lat": 42.85,
"current_residence": "黑龙江,哈尔滨,南岗",
"current_residence_lng": 126.67,
"current_residence_lat": 45.77,
"remarks": "",
"keywords": ""
},
"show": 0,
"time": "0.032156"
}
10. 完善/保存档案
POST http://check.lokimo.xyz/api/user/completeProfile
请求参数
| 参数名 | 类型 | 说明 |
| nickname | string | 必填,昵称 1-32 字符 |
| sex | int | 必填,性别:0-未知,1-男,2-女 |
| group_id | int | 选填,分类(来自 categoryList 的 id) |
| birthday | string/int | 必填,出生日期,支持时间戳或 Y-m-d / Y-m-d H:i |
| birth_timezone | string | 选填,出生时区 |
| birth_place | string | 选填,出生地(省,市,区县) |
| birth_place_lng | float | 选填,出生地经度 |
| birth_place_lat | float | 选填,出生地纬度 |
| current_residence | string | 选填,现居地(省,市,区县) |
| current_residence_lng | float | 选填,现居地经度 |
| current_residence_lat | float | 选填,现居地纬度 |
| remarks | string | 选填,备注 0-500 字 |
| keywords | string | 选填,关键词 0-80 字 |
请求入参 demo
{
"nickname": "魏",
"sex": 1,
"group_id": 1,
"birthday": "1982-05-14 06:30",
"birth_timezone": "东8区",
"birth_place": "内蒙古,通辽,奈曼旗",
"birth_place_lng": 120.67,
"birth_place_lat": 42.85,
"current_residence": "黑龙江,哈尔滨,南岗",
"current_residence_lng": 126.67,
"current_residence_lat": 45.77,
"remarks": "",
"keywords": ""
}
11. 时区列表(出生时区下拉)
GET http://check.lokimo.xyz/api/user/timezoneList
返回参数(data)
| 参数名 | 类型 | 说明 |
| data[] | array | 时区列表,东12区~东1区、东0区、西1区~西12区 |
| data[].value | string | 时区值,如「东8区」 |
| data[].label | string | 时区显示文案,如「东8区」 |
响应示例
{
"code": 1,
"msg": "获取成功",
"data": [
{ "value": "东8区", "label": "东8区" },
{ "value": "东7区", "label": "东7区" },
{ "value": "东0区", "label": "东0区" },
{ "value": "西1区", "label": "西1区" }
],
"show": 0,
"time": "0.021045"
}
12. 分类列表(档案分类下拉)
GET http://check.lokimo.xyz/api/user/categoryList
返回参数(data)
| 参数名 | 类型 | 说明 |
| data[] | array | 用户列表 |
| data[].id | int | 用户 id,保存档案时作为 group_id 传入 |
| data[].nickname | string | 昵称 |
| data[].is_self | int | 是否当前用户:0-否,1-是(可显示为「自己」) |
响应示例
{
"code": 1,
"msg": "获取成功",
"data": [
{ "id": 1, "nickname": "魏", "is_self": 1 },
{ "id": 5, "nickname": "张三", "is_self": 0 }
],
"show": 0,
"time": "0.031256"
}
13. 邀请(需登录)
POST http://check.lokimo.xyz/api/user_relation/invite
请求参数
| 参数名 | 类型 | 说明 |
| mobile | string | 对方手机号 |
请求入参 demo
{
"mobile": "13800138001"
}
响应示例
{
"code": 1,
"msg": "邀请成功",
"data": [],
"show": 0,
"time": "0.032156"
}
14. 关系列表(需登录)
GET http://check.lokimo.xyz/api/user_relation/relationList
请求参数
| 参数名 | 类型 | 说明 |
| token | string | 必填,请求头携带 |
| page_no | int | 页码,默认 1 |
| page_size | int | 每页条数,默认 15 |
返回参数(data)
| 参数名 | 类型 | 说明 |
| lists | array | 关系列表 |
| lists[].id | int | 关系记录 id |
| lists[].uid | int | 发起人 uid |
| lists[].to_uid | int | 接收人 uid |
| lists[].nickname | string | 对方昵称(关联 ls_user) |
| lists[].status | int | 0-待确认 1-已确认 |
| lists[].status_text | string | 待确认 / 已关联 |
| lists[].is_inviter | int | 是否本人发起:0-否 1-是 |
| lists[].create_time | string | 创建时间 |
| count | int | 总条数 |
响应示例
{
"code": 1,
"msg": "",
"data": {
"lists": [
{
"id": 1,
"uid": 1,
"to_uid": 2,
"nickname": "张三",
"status": 0,
"status_text": "待确认",
"is_inviter": 1,
"create_time": "2026-02-10 12:00:00"
}
],
"count": 1
},
"show": 0,
"time": "0.028341"
}
15. 确认/拒绝(需登录)
POST http://check.lokimo.xyz/api/user_relation/confirm
请求参数
| 参数名 | 类型 | 说明 |
| id | int | 关系记录 id(来自关系列表) |
| status | int | 1-确认(更新为已关联) 2-拒绝(删除该条) |
请求入参 demo
{
"id": 1,
"status": 1
}
响应示例
{
"code": 1,
"msg": "已确认",
"data": [],
"show": 0,
"time": "0.021045"
}