http://name-u.com/index.php/app/v1/getTime
header头必须包含
- sign (签名,加密字符串)
- app_type(APP类型 android/ios)
- did (设备号,字符串)
//====================================================
//设置sign
注意:设置sign前请先同步时间,sign内did、app_type与header保持一致
#app_type
#did
#model
#sign
#time (13位时间戳)
#version
#version_code
1)按字段排序
2)拼接字符串数据 &
3)通过aes来加密
“app_type=android&did=dsfsfsdfsd&model=xiaomi6&sign=33&time=1516335658331&version=1&version_code=1.3”
“tvLSWm6zFbI8Q8mBUIACUrfcmt6t/OSviP4JrIxCHETAiclscHYpmIL//qwrFJK8/62SwhvZxq/TdLDR7C8d0HVFJNSECXjeaGmjrQ69ZRKxkRiqMxLIjRFVr+Z73AjaEJYvLjRbVcStbYoYWmyX1g==”
//====================================================
//获取同步时间
Route::post('app/v1/getTime')
{
"error_code": 0,
"msg": {
"success": "OK"
},
"data": {
"time": 1516330249
},
"rows": [],
"total": null,
"totalPage": null,
"token": "a81zi0WsSBvNRR9MZCf0oetbyrzNwLUaYtLNjLHeWNj8mXmxV5ZMwFdNOFakUM1Gjep2zfXH7ResMEH/kY/Hyq8cyYkBQJfvjpwwy5n3eWU=",
}
//====================================================
//获取版本更新 启用统计
Route::post('app/v1/version');
{
"error_code": 0,
"msg": {
"success": "OK"
},
"data": {
"app_type": "android",
"version": 2,
"version_code": "1.2",
"is_force": 0,
"apk_url": "",
"update_info": "hahha",
"is_update": 1
},
"rows": [],
"total": null,
"totalPage": null,
"token": "a81zi0WsSBvNRR9MZCf0oetbyrzNwLUaYtLNjLHeWNj8mXmxV5ZMwFdNOFakUM1Gjep2zfXH7ResMEH/kY/Hyq8cyYkBQJfvjpwwy5n3eWU=",
}