...
|
...
|
@@ -11,8 +11,6 @@ use think\Db; |
|
|
/**
|
|
|
* @title 我的
|
|
|
* @description 个人中心相关接口
|
|
|
* @header name:key require:1 default: desc:秘钥(区别设置)
|
|
|
* @param name:public type:int require:1 default:1 other: desc:公共参数(区别设置)
|
|
|
*/
|
|
|
class UserController extends RestBaseController
|
|
|
{
|
...
|
...
|
@@ -22,7 +20,7 @@ class UserController extends RestBaseController |
|
|
* @author panhaowen
|
|
|
* @url /portal/User/info
|
|
|
* @method POST
|
|
|
* @param
|
|
|
* @header name:XX-Token require:1 default: desc:token
|
|
|
*/
|
|
|
public function info()
|
|
|
{
|
...
|
...
|
@@ -30,8 +28,17 @@ class UserController extends RestBaseController |
|
|
$data['now_weight']=Db::name('user_week_sign')->where('user_id',$this->getUserId())->order('create_time','desc')->limit(1)['weight'];
|
|
|
$this->success('我的健康档案',$data);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @title 我的积分管理
|
|
|
* @description 积分记录接口
|
|
|
* @author panhaowen
|
|
|
* @url /portal/User/info
|
|
|
* @method POST
|
|
|
* @header name:XX-Token require:1 default: desc:token
|
|
|
*/
|
|
|
public function scoreLog(){
|
|
|
$data=1;
|
|
|
$data=Db::name('user_score_log')->where('user_id',$this->getUserId())->select();
|
|
|
Db::name('user_score_log')->insert(['score'=>-1]);
|
|
|
$this->success('我的健康档案',$data);
|
|
|
}
|
|
|
} |
...
|
...
|
|