|
@@ -11,8 +11,6 @@ use think\Db; |
|
@@ -11,8 +11,6 @@ use think\Db; |
11
|
/**
|
11
|
/**
|
12
|
* @title 我的
|
12
|
* @title 我的
|
13
|
* @description 个人中心相关接口
|
13
|
* @description 个人中心相关接口
|
14
|
- * @header name:key require:1 default: desc:秘钥(区别设置)
|
|
|
15
|
- * @param name:public type:int require:1 default:1 other: desc:公共参数(区别设置)
|
|
|
16
|
*/
|
14
|
*/
|
17
|
class UserController extends RestBaseController
|
15
|
class UserController extends RestBaseController
|
18
|
{
|
16
|
{
|
|
@@ -22,7 +20,7 @@ class UserController extends RestBaseController |
|
@@ -22,7 +20,7 @@ class UserController extends RestBaseController |
22
|
* @author panhaowen
|
20
|
* @author panhaowen
|
23
|
* @url /portal/User/info
|
21
|
* @url /portal/User/info
|
24
|
* @method POST
|
22
|
* @method POST
|
25
|
- * @param
|
23
|
+ * @header name:XX-Token require:1 default: desc:token
|
26
|
*/
|
24
|
*/
|
27
|
public function info()
|
25
|
public function info()
|
28
|
{
|
26
|
{
|
|
@@ -30,8 +28,17 @@ class UserController extends RestBaseController |
|
@@ -30,8 +28,17 @@ class UserController extends RestBaseController |
30
|
$data['now_weight']=Db::name('user_week_sign')->where('user_id',$this->getUserId())->order('create_time','desc')->limit(1)['weight'];
|
28
|
$data['now_weight']=Db::name('user_week_sign')->where('user_id',$this->getUserId())->order('create_time','desc')->limit(1)['weight'];
|
31
|
$this->success('我的健康档案',$data);
|
29
|
$this->success('我的健康档案',$data);
|
32
|
}
|
30
|
}
|
33
|
-
|
31
|
+ /**
|
|
|
32
|
+ * @title 我的积分管理
|
|
|
33
|
+ * @description 积分记录接口
|
|
|
34
|
+ * @author panhaowen
|
|
|
35
|
+ * @url /portal/User/info
|
|
|
36
|
+ * @method POST
|
|
|
37
|
+ * @header name:XX-Token require:1 default: desc:token
|
|
|
38
|
+ */
|
34
|
public function scoreLog(){
|
39
|
public function scoreLog(){
|
35
|
- $data=1;
|
40
|
+ $data=Db::name('user_score_log')->where('user_id',$this->getUserId())->select();
|
|
|
41
|
+ Db::name('user_score_log')->insert(['score'=>-1]);
|
|
|
42
|
+ $this->success('我的健康档案',$data);
|
36
|
}
|
43
|
}
|
37
|
} |
44
|
} |