UserController.php
1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
// +----------------------------------------------------------------------
// | bronet [ 以客户为中心 以奋斗者为本 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2017 http://www.bronet.cn All rights reserved.
// +----------------------------------------------------------------------
namespace api\portal\controller;
use cmf\controller\RestBaseController;
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
{
/**
* @title 我的健康档案
* @description 健康档案页渲染
* @author panhaowen
* @url /portal/User/info
* @method POST
* @param
*/
public function info()
{
$data=Db::name('user')->where('id',$this->getUserId())->field('age,height,before_weight,last_yuejin_time,pregnant_week,weight_level')->find();
$data['now_weight']=Db::name('user_week_sign')->where('user_id',$this->getUserId())->order('create_time','desc')->limit(1)['weight'];
$this->success('我的健康档案',$data);
}
public function scoreLog(){
}
}