作者 潘浩文
1 个管道 的构建 通过 耗费 1 秒

修改意见

... ... @@ -422,7 +422,6 @@ class SignController extends RestBaseController
$param['protein']=ceil($nengliang*0.2/4);
$param['fat']=ceil($nengliang*0.2/9);
$param['water']=ceil($nengliang*0.6/4);
$data=Db::name('user_week_sign')->where('user_id',$this->getUserId())->select()->toArray();
foreach ($data as $k=>$v){
$data[$k]['week']=ceil(($data[$k]['create_time'] - $user['register_time'])/(7*24*60*60));
... ...
... ... @@ -119,4 +119,19 @@ class UserController extends RestBaseController
cmf_verification_code_log($param['mobile'], $code, 180);
$this->success('',$re);
}
/**
* @title 我的页面
* @description 我的页面渲染接口
* @author panhaowen
* @url /portal/User/my
* @method POST
* @header name:XX-Token require:1 default: desc:token
* @return user_status:1:普通会员,2:vip
*/
public function my(){
$user=Db::name('user')->where('id',$this->getUserId())->field('user_nickname,user_status,avatar')->find();
$user['avatar']=cmf_get_image_preview_url( $user['avatar']);
$this->success('获取成功',$user);
}
}
... ...