正在显示
2 个修改的文件
包含
15 行增加
和
1 行删除
@@ -422,7 +422,6 @@ class SignController extends RestBaseController | @@ -422,7 +422,6 @@ class SignController extends RestBaseController | ||
422 | $param['protein']=ceil($nengliang*0.2/4); | 422 | $param['protein']=ceil($nengliang*0.2/4); |
423 | $param['fat']=ceil($nengliang*0.2/9); | 423 | $param['fat']=ceil($nengliang*0.2/9); |
424 | $param['water']=ceil($nengliang*0.6/4); | 424 | $param['water']=ceil($nengliang*0.6/4); |
425 | - | ||
426 | $data=Db::name('user_week_sign')->where('user_id',$this->getUserId())->select()->toArray(); | 425 | $data=Db::name('user_week_sign')->where('user_id',$this->getUserId())->select()->toArray(); |
427 | foreach ($data as $k=>$v){ | 426 | foreach ($data as $k=>$v){ |
428 | $data[$k]['week']=ceil(($data[$k]['create_time'] - $user['register_time'])/(7*24*60*60)); | 427 | $data[$k]['week']=ceil(($data[$k]['create_time'] - $user['register_time'])/(7*24*60*60)); |
@@ -119,4 +119,19 @@ class UserController extends RestBaseController | @@ -119,4 +119,19 @@ class UserController extends RestBaseController | ||
119 | cmf_verification_code_log($param['mobile'], $code, 180); | 119 | cmf_verification_code_log($param['mobile'], $code, 180); |
120 | $this->success('',$re); | 120 | $this->success('',$re); |
121 | } | 121 | } |
122 | + | ||
123 | + /** | ||
124 | + * @title 我的页面 | ||
125 | + * @description 我的页面渲染接口 | ||
126 | + * @author panhaowen | ||
127 | + * @url /portal/User/my | ||
128 | + * @method POST | ||
129 | + * @header name:XX-Token require:1 default: desc:token | ||
130 | + * @return user_status:1:普通会员,2:vip | ||
131 | + */ | ||
132 | + public function my(){ | ||
133 | + $user=Db::name('user')->where('id',$this->getUserId())->field('user_nickname,user_status,avatar')->find(); | ||
134 | + $user['avatar']=cmf_get_image_preview_url( $user['avatar']); | ||
135 | + $this->success('获取成功',$user); | ||
136 | + } | ||
122 | } | 137 | } |
-
请 注册 或 登录 后发表评论