跳绳以前OK
This commit is contained in:
parent
0dd9a8ab7c
commit
fb4f606f25
|
|
@ -113,6 +113,18 @@ class Base extends Controller{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 秒转化格式,00:00:00
|
||||||
|
public function handle_hour_branch_second($data = '2000'){
|
||||||
|
$hours = intval($data / 3600);
|
||||||
|
$minutes = intval(($data % 3600) / 60);
|
||||||
|
$remainingSeconds = $data % 60;
|
||||||
|
|
||||||
|
return [
|
||||||
|
'h' => str_pad($hours, 2, '0', STR_PAD_LEFT),
|
||||||
|
'm' => str_pad($minutes, 2, '0', STR_PAD_LEFT),
|
||||||
|
's' => str_pad($remainingSeconds, 2, '0', STR_PAD_LEFT)
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
// 判断token是否过期
|
// 判断token是否过期
|
||||||
public function token_time_validate($token){
|
public function token_time_validate($token){
|
||||||
|
|
|
||||||
|
|
@ -109,8 +109,8 @@ class Card extends Base{
|
||||||
return $this->msg(20001);
|
return $this->msg(20001);
|
||||||
}
|
}
|
||||||
unset($data['token']);
|
unset($data['token']);
|
||||||
$data['s_time'] = $data['s_time'].' 00:00:00';
|
// $data['s_time'] = $data['s_time'].' 00:00:00';
|
||||||
$data['e_time'] = $data['e_time'].' 23:59:59';
|
// $data['e_time'] = $data['e_time'].' 23:59:59';
|
||||||
return $this->curve_chart_action($data);
|
return $this->curve_chart_action($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -230,9 +230,9 @@ class Card extends Base{
|
||||||
acbd.body_type,
|
acbd.body_type,
|
||||||
acbd.age,
|
acbd.age,
|
||||||
acbd.is_del,
|
acbd.is_del,
|
||||||
acbd.height_data as height,
|
acbd.height,
|
||||||
acbd.weight_data as weight,
|
acbd.weight,
|
||||||
acbd.bmi_data as bmi,
|
acbd.bmi,
|
||||||
acbd.body_age,
|
acbd.body_age,
|
||||||
aud.birthday,aud.gender,aud.target_weight,aud.initial_weight,aud.initial_date
|
aud.birthday,aud.gender,aud.target_weight,aud.initial_weight,aud.initial_date
|
||||||
from app_card_body_data as acbd
|
from app_card_body_data as acbd
|
||||||
|
|
@ -251,6 +251,9 @@ class Card extends Base{
|
||||||
// dump($result_end);
|
// dump($result_end);
|
||||||
// die;
|
// die;
|
||||||
$result_end['gender'] = $result[0]['gender'];
|
$result_end['gender'] = $result[0]['gender'];
|
||||||
|
$result_end['record_time'] = $result[0]['record_time'];
|
||||||
|
$result_end['score'] = $result_end['score'];
|
||||||
|
$result_end['body_type'] = $result_end['body_type'];
|
||||||
$result_end = $cardparts->conversion_interval($result_end);
|
$result_end = $cardparts->conversion_interval($result_end);
|
||||||
// dump($result_end);
|
// dump($result_end);
|
||||||
// die;
|
// die;
|
||||||
|
|
@ -352,25 +355,33 @@ class Card extends Base{
|
||||||
// and '".$data['e_time']."'
|
// and '".$data['e_time']."'
|
||||||
// order by record_time desc
|
// order by record_time desc
|
||||||
// ");
|
// ");
|
||||||
|
// dump($card_body_curve_arr);
|
||||||
|
// dump($this->card_body_curve_arr);
|
||||||
$user_data_list = Db::table('app_card_body_data')
|
$user_data_list = Db::table('app_card_body_data')
|
||||||
->where('aud_id', $data['aud_id'])
|
->where('aud_id', $data['aud_id'])
|
||||||
->whereTime('record_time', 'between', [$data['s_time'], $data['e_time']])
|
->whereTime('record_time', 'between', [$data['s_time'], $data['e_time']])
|
||||||
->field("record_time,REPLACE(CONVERT(varchar(10), record_time, 23), '-', '/') AS b_time,$card_body_curve_arr")
|
->field("record_time,REPLACE(CONVERT(varchar(10), record_time, 23), '-', '/') AS b_time,$card_body_curve_arr")
|
||||||
->order('record_time desc')
|
->order('record_time desc')
|
||||||
->select();
|
->select();
|
||||||
|
|
||||||
$data_arr = [];
|
$data_arr = [];
|
||||||
$record_arr1 = [];
|
$record_arr1 = [];
|
||||||
$record_arr2 = [];
|
$record_arr2 = [];
|
||||||
|
// 如果有数据
|
||||||
if(count($user_data_list)>0){
|
if(count($user_data_list)>0){
|
||||||
|
// 循环数据
|
||||||
foreach ($user_data_list as $key => $value) {
|
foreach ($user_data_list as $key => $value) {
|
||||||
|
// 如果数据中的时间不存在临时数组中
|
||||||
if(!in_array($value['b_time'],$record_arr1)){
|
if(!in_array($value['b_time'],$record_arr1)){
|
||||||
array_push($record_arr1,$value['b_time']);
|
array_push($record_arr1,$value['b_time']);
|
||||||
$user_data_list[$key]['muscle'] = explode(',',$user_data_list[$key]['muscle'])[0];
|
foreach ($this->card_body_curve_arr as $k => $v) {
|
||||||
$user_data_list[$key]['fat_r'] = explode(',',$user_data_list[$key]['fat_r'])[0];
|
$user_data_list[$key][$v] = explode(',',$user_data_list[$key][$v])[0];
|
||||||
|
}
|
||||||
array_push($record_arr2,$user_data_list[$key]);
|
array_push($record_arr2,$user_data_list[$key]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// dump($record_arr2);
|
||||||
|
// die;
|
||||||
foreach ($this->card_body_curve_arr as $key => $value) {
|
foreach ($this->card_body_curve_arr as $key => $value) {
|
||||||
$temporary_arr = [];
|
$temporary_arr = [];
|
||||||
$temporary_arr['title'] = $this->card_body_curve_arr2[$key];
|
$temporary_arr['title'] = $this->card_body_curve_arr2[$key];
|
||||||
|
|
@ -434,12 +445,12 @@ class Card extends Base{
|
||||||
'create_time'=>date('Y-m-d H:i:s'),
|
'create_time'=>date('Y-m-d H:i:s'),
|
||||||
'last_update_time'=>date('Y-m-d H:i:s'),
|
'last_update_time'=>date('Y-m-d H:i:s'),
|
||||||
'age'=>$get_body_value['age'],
|
'age'=>$get_body_value['age'],
|
||||||
'height'=>$get_body_value['身高'],
|
'height'=>$get_body_value['身高2'],
|
||||||
'height_data'=>$get_body_value['身高2'],
|
'height_data'=>$get_body_value['身高'],
|
||||||
'weight'=>$get_body_value['体重'],
|
'weight'=>$get_body_value['体重2'],
|
||||||
'weight_data'=>$get_body_value['体重2'],
|
'weight_data'=>$get_body_value['体重'],
|
||||||
'bmi'=>$get_body_value['BMI'],
|
'bmi'=>$get_body_value['BMI2'],
|
||||||
'bmi_data'=>$get_body_value['BMI2'],
|
'bmi_data'=>$get_body_value['BMI'],
|
||||||
'score'=>$get_body_value['身体得分'],
|
'score'=>$get_body_value['身体得分'],
|
||||||
'fat_r'=> implode(',',$get_body_value['脂肪率']),
|
'fat_r'=> implode(',',$get_body_value['脂肪率']),
|
||||||
'fat_w'=>implode(',',$get_body_value['脂肪量']),
|
'fat_w'=>implode(',',$get_body_value['脂肪量']),
|
||||||
|
|
|
||||||
|
|
@ -181,15 +181,26 @@ class Cardparts extends Base{
|
||||||
// 除 bcdiv(,,20)
|
// 除 bcdiv(,,20)
|
||||||
// 计算部分内容的横线标准以及说明文字
|
// 计算部分内容的横线标准以及说明文字
|
||||||
public function conversion_interval($data){
|
public function conversion_interval($data){
|
||||||
// dump($data);
|
|
||||||
// $data['gender'] = $data['gender']==2?'woman':'man';
|
// $data['gender'] = $data['gender']==2?'woman':'man';
|
||||||
$gender = $data['gender']==2?'woman':'man';
|
$gender = $data['gender']==2?'woman':'man';
|
||||||
$age = $data['age']['value'];
|
$age = $data['age']['value'];
|
||||||
$weight = 0;
|
$weight = 0;
|
||||||
$temporary_arr = [
|
$temporary_arr = [
|
||||||
|
'score_name' =>$data['score']['name'],
|
||||||
|
'score_value' =>$data['score']['value'],
|
||||||
|
'score_unit' =>$data['score']['unit'],
|
||||||
|
'body_type_name' =>$data['body_type']['name'],
|
||||||
|
'body_type_value' =>$data['body_type']['value'],
|
||||||
|
'body_type_unit' =>$data['body_type']['unit'],
|
||||||
|
'record_time' =>str_replace('-', '/', $data['record_time']),
|
||||||
'top_list'=>[],
|
'top_list'=>[],
|
||||||
'bottom_list'=>[],
|
'bottom_list'=>[],
|
||||||
];
|
];
|
||||||
|
$date_temporary = new \DateTime($temporary_arr['record_time']);
|
||||||
|
|
||||||
|
// 使用 format 方法来指定新的日期和时间格式
|
||||||
|
$temporary_arr['record_time'] = $date_temporary->format('Y年m月d日 H:i:s');
|
||||||
// dump($data);
|
// dump($data);
|
||||||
// dump($temporary_arr);
|
// dump($temporary_arr);
|
||||||
// 处理格式(顶部)
|
// 处理格式(顶部)
|
||||||
|
|
@ -201,6 +212,7 @@ class Cardparts extends Base{
|
||||||
}
|
}
|
||||||
array_push($temporary_arr['top_list'],$data[$key]);
|
array_push($temporary_arr['top_list'],$data[$key]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理格式(底部)
|
// 处理格式(底部)
|
||||||
foreach ($this->parameter_aggregate_bottom as $key => $value) {
|
foreach ($this->parameter_aggregate_bottom as $key => $value) {
|
||||||
$data[$key]['key_name'] = $key;
|
$data[$key]['key_name'] = $key;
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,11 @@ class Index extends Base{
|
||||||
|
|
||||||
protected $db_name = ['2'=>'app_card_body_data','6'=>'app_card_skip_data','8'=>'app_card_vitalcapacity_data'];
|
protected $db_name = ['2'=>'app_card_body_data','6'=>'app_card_skip_data','8'=>'app_card_vitalcapacity_data'];
|
||||||
// protected $card_key = ['2'=>'body','6'=>'skip','8'=>'vitalcapacity'];
|
// protected $card_key = ['2'=>'body','6'=>'skip','8'=>'vitalcapacity'];
|
||||||
|
protected $default_card = ['2','6','8'];
|
||||||
protected $card_data = [
|
protected $card_data = [
|
||||||
'2'=>['身体数据','body',['height'=>['身高','cm'],'weight'=>['体重','公斤'],'bmi'=>['BMI','无']]],
|
'2'=>['身体数据','body',['height'=>['身高','cm','-'],'weight'=>['体重','公斤','-'],'bmi'=>['BMI','无','-']]],
|
||||||
// 'skip'=>['跳绳数据',['height,weight,bmi,record_time']],
|
'6'=>['跳绳数据','skip',['jump_time'=>['用时','无','--:--:--'],'jump_num'=>['本次次数','次','-'],'average_num'=>['平均成绩','个','-'],'jump_kcal'=>['卡路里','kcal','-']]],
|
||||||
'8'=>['肺活量','vitalcapacity',['average'=>['本次数据','ml']]],
|
'8'=>['肺活量','vitalcapacity',['average'=>['本次数据','ml','-']]],
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $data_name_unit = [
|
protected $data_name_unit = [
|
||||||
|
|
@ -266,73 +267,97 @@ class Index extends Base{
|
||||||
}
|
}
|
||||||
if(count($db_arr) <= 0){
|
if(count($db_arr) <= 0){
|
||||||
// 没有数据,传递一个空的卡片
|
// 没有数据,传递一个空的卡片
|
||||||
// $
|
foreach ($data['card_order'] as $key => $value) {
|
||||||
return [
|
$temporary_arr = [];
|
||||||
[[
|
$temporary_arr['id'] = '';
|
||||||
'id'=>'',
|
$temporary_arr['acd_id'] = $value;
|
||||||
'acd_id'=>'2',
|
$temporary_arr['record_time'] = '';
|
||||||
'record_time'=>'',
|
$temporary_arr['card_name'] = $this->card_data[$value][0];
|
||||||
'card_name'=>'身体数据',
|
$temporary_arr['card_key'] = $this->card_data[$value][1];
|
||||||
'card_key'=>'body',
|
$temporary_arr['inside_data'] = [];
|
||||||
'inside_data'=>[
|
foreach ($this->card_data[$value][2] as $k => $v) {
|
||||||
[
|
|
||||||
'key'=>'',
|
|
||||||
'name'=>'身高',
|
|
||||||
'value'=>'',
|
|
||||||
'unit'=>'cm',
|
|
||||||
'standard'=>'',
|
|
||||||
'color'=>'',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'key'=>'',
|
|
||||||
'name'=>'体重',
|
|
||||||
'value'=>'',
|
|
||||||
'unit'=>'公斤',
|
|
||||||
'standard'=>'',
|
|
||||||
'color'=>'',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'key'=>'',
|
|
||||||
'name'=>'BMI',
|
|
||||||
'value'=>'',
|
|
||||||
'unit'=>'',
|
|
||||||
'standard'=>'',
|
|
||||||
'color'=>'',
|
|
||||||
],
|
|
||||||
]
|
|
||||||
]],
|
|
||||||
$target_current
|
|
||||||
];
|
|
||||||
}
|
|
||||||
// dump($db_arr);
|
|
||||||
// die;
|
|
||||||
foreach ($db_arr as $key => $value) {
|
|
||||||
$temporary_arr = [];
|
|
||||||
$temporary_arr['id'] = $value['id'];
|
|
||||||
$temporary_arr['acd_id'] = $value['acd_id'];
|
|
||||||
$temporary_arr['record_time'] = $value['record_time'];
|
|
||||||
// $temporary_arr['value'] = $value['record_time'];
|
|
||||||
$temporary_arr['card_name'] = $this->card_data[$value['acd_id']][0];
|
|
||||||
$temporary_arr['card_key'] = $this->card_data[$value['acd_id']][1];
|
|
||||||
$temporary_arr['inside_data'] = [];
|
|
||||||
if(array_key_exists($value['acd_id'],$this->card_data)){
|
|
||||||
|
|
||||||
foreach ($this->card_data[$value['acd_id']][2] as $k => $v) {
|
|
||||||
$tem_arr_2 = explode(',', $db_arr[$key][$k."_data"]);
|
|
||||||
array_push($temporary_arr['inside_data'],[
|
array_push($temporary_arr['inside_data'],[
|
||||||
'key'=>$k,
|
'key'=>$k,
|
||||||
'name'=>$v[0],
|
'name'=>$v[0],
|
||||||
'value'=>$tem_arr_2[0],
|
'value'=>$v[2],
|
||||||
'unit'=>$v[1]!='无'?$v[1]:'',
|
'unit'=>$v[1]!='无'?$v[1]:'',
|
||||||
'standard'=>$tem_arr_2[1]!='无'?$tem_arr_2[1]:'',
|
'standard'=>'',
|
||||||
'color'=>$tem_arr_2[2]!='无'?$tem_arr_2[2]:''
|
'color'=>''
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
array_push($result,$temporary_arr);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
// dump($db_arr);
|
||||||
|
// die;
|
||||||
|
foreach ($data['card_order'] as $key => $value) {
|
||||||
|
$temporary_arr = [];
|
||||||
|
$temporary_arr['acd_id'] = $value;
|
||||||
|
$temporary_arr['card_name'] = $this->card_data[$value][0];
|
||||||
|
$temporary_arr['card_key'] = $this->card_data[$value][1];
|
||||||
|
$temporary_arr['inside_data'] = [];
|
||||||
|
if(array_key_exists($value,$db_arr)){
|
||||||
|
$temporary_arr['id'] = $db_arr[$value]['id'];
|
||||||
|
$temporary_arr['record_time'] = $db_arr[$value]['record_time'];
|
||||||
|
foreach ($this->card_data[$value][2] as $k => $v) {
|
||||||
|
if($value == '2'){
|
||||||
|
$tem_arr_2 = explode(',', $db_arr[$value][$k]);
|
||||||
|
}else if($value == '6' && $k == 'jump_time'){
|
||||||
|
$time_conversion = $this->handle_hour_branch_second($db_arr[$value][$k]);
|
||||||
|
$tem_arr_2 = [$time_conversion['h'].':'.$time_conversion['m'].':'.$time_conversion['s'],'',''];
|
||||||
|
}else{
|
||||||
|
$tem_arr_2 = [$db_arr[$value][$k],'',''];
|
||||||
|
}
|
||||||
|
|
||||||
|
// dump($tem_arr_2);
|
||||||
|
array_push($temporary_arr['inside_data'],[
|
||||||
|
'key'=>$k,
|
||||||
|
'name'=>$v[0],
|
||||||
|
'value'=>$tem_arr_2[0],
|
||||||
|
'unit'=>$v[1]!='无'?$v[1]:'',
|
||||||
|
'standard'=>$tem_arr_2[1]!='无'?$tem_arr_2[1]:'',
|
||||||
|
'color'=>$tem_arr_2[2]!='无'?$tem_arr_2[2]:''
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$temporary_arr['id'] = '';
|
||||||
|
$temporary_arr['record_time'] = '';
|
||||||
|
foreach ($this->card_data[$value][2] as $k => $v) {
|
||||||
|
array_push($temporary_arr['inside_data'],[
|
||||||
|
'key'=>$k,
|
||||||
|
'name'=>$v[0],
|
||||||
|
'value'=>$v[2],
|
||||||
|
'unit'=>$v[1]!='无'?$v[1]:'',
|
||||||
|
'standard'=>'',
|
||||||
|
'color'=>''
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
array_push($result,$temporary_arr);
|
||||||
|
|
||||||
|
|
||||||
|
// $temporary_arr['acd_id'] = $value['acd_id'];
|
||||||
|
// $temporary_arr['record_time'] = $value['record_time'];
|
||||||
|
// $temporary_arr['card_name'] = $this->card_data[$value['acd_id']][0];
|
||||||
|
// $temporary_arr['card_key'] = $this->card_data[$value['acd_id']][1];
|
||||||
|
// $temporary_arr['inside_data'] = [];
|
||||||
|
// if(array_key_exists($value['acd_id'],$this->card_data)){
|
||||||
|
|
||||||
|
// foreach ($this->card_data[$value['acd_id']][2] as $k => $v) {
|
||||||
|
// $tem_arr_2 = explode(',', $db_arr[$key][$k."_data"]);
|
||||||
|
// array_push($temporary_arr['inside_data'],[
|
||||||
|
// 'key'=>$k,
|
||||||
|
// 'name'=>$v[0],
|
||||||
|
// 'value'=>$tem_arr_2[0],
|
||||||
|
// 'unit'=>$v[1]!='无'?$v[1]:'',
|
||||||
|
// 'standard'=>$tem_arr_2[1]!='无'?$tem_arr_2[1]:'',
|
||||||
|
// 'color'=>$tem_arr_2[2]!='无'?$tem_arr_2[2]:''
|
||||||
|
// ]);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// array_push($result,$temporary_arr);
|
||||||
}
|
}
|
||||||
array_push($result,$temporary_arr);
|
|
||||||
}
|
}
|
||||||
// dump($result);
|
|
||||||
// die;
|
|
||||||
return [$result,$target_current];
|
return [$result,$target_current];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -376,7 +401,7 @@ class Index extends Base{
|
||||||
$parameter['birthday'] = $data['birthday'];
|
$parameter['birthday'] = $data['birthday'];
|
||||||
$parameter['gender'] = $data['gender'];
|
$parameter['gender'] = $data['gender'];
|
||||||
$parameter['grade'] = $data['grade'];
|
$parameter['grade'] = $data['grade'];
|
||||||
$parameter['card_order'] = '2,8';
|
$parameter['card_order'] = '2,6,8';
|
||||||
$parameter['create_time'] = date('Y-m-d H:i:s');
|
$parameter['create_time'] = date('Y-m-d H:i:s');
|
||||||
$parameter['last_update_time'] = date('Y-m-d H:i:s');
|
$parameter['last_update_time'] = date('Y-m-d H:i:s');
|
||||||
$parameter_pd = Db::table('app_account_number')->where(['id'=>$parameter['aan_id']])->count();
|
$parameter_pd = Db::table('app_account_number')->where(['id'=>$parameter['aan_id']])->count();
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ class Pagingcontrast extends Base{
|
||||||
protected $db_name = ['2'=>'app_card_body_data','6'=>'app_card_skip_data','8'=>'app_card_vitalcapacity_data'];
|
protected $db_name = ['2'=>'app_card_body_data','6'=>'app_card_skip_data','8'=>'app_card_vitalcapacity_data'];
|
||||||
protected $request_result = [
|
protected $request_result = [
|
||||||
'2'=>['height'=>['身高','cm'],'weight'=>['体重','kg'],'age'=>['年龄','岁'],'bmi'=>['BMI',''],'fat_w'=>['脂肪量','kg'],'fat_r'=>['脂肪率','%'],'muscleval'=>['肌肉量','kg'],'muscle'=>['肌肉率','%'],'proteinval'=>['蛋白量','kg'],'protein'=>['蛋白率','%'],'water'=>['水分',''],'bone'=>['骨重','kg'],'visceral'=>['内脏指数',''],'sfr'=>['皮下脂肪','%'],'kcal'=>['基础代谢','kcal'],'un_fat_w_weight'=>['去脂体重','kg'],'body_age'=>['体龄',''],'body_level'=>['肥胖等级',''],'body_type'=>['体型','']],
|
'2'=>['height'=>['身高','cm'],'weight'=>['体重','kg'],'age'=>['年龄','岁'],'bmi'=>['BMI',''],'fat_w'=>['脂肪量','kg'],'fat_r'=>['脂肪率','%'],'muscleval'=>['肌肉量','kg'],'muscle'=>['肌肉率','%'],'proteinval'=>['蛋白量','kg'],'protein'=>['蛋白率','%'],'water'=>['水分',''],'bone'=>['骨重','kg'],'visceral'=>['内脏指数',''],'sfr'=>['皮下脂肪','%'],'kcal'=>['基础代谢','kcal'],'un_fat_w_weight'=>['去脂体重','kg'],'body_age'=>['体龄',''],'body_level'=>['肥胖等级',''],'body_type'=>['体型','']],
|
||||||
'6'=>[],
|
'6'=>['jump_num'=>['个数',''],'jump_time'=>['时长',''],'jump_kcal'=>['卡路里','kcal']],
|
||||||
'8'=>[]
|
'8'=>[]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -24,7 +24,7 @@ class Pagingcontrast extends Base{
|
||||||
################################################请求接口################################################
|
################################################请求接口################################################
|
||||||
################################################请求接口################################################
|
################################################请求接口################################################
|
||||||
// 获取记录信息(分组)(包含身体、跳绳、肺活量)
|
// 获取记录信息(分组)(包含身体、跳绳、肺活量)
|
||||||
public function get_all_record_data_group($data = ['aud_id'=>'25','s_time'=>'2024-04-01 10:10:10','e_time'=>'2024-06-12 10:10:10','token'=>'0dafb98a10995c98b5a33b7d59d986ca','type'=>'2']){
|
public function get_all_record_data_group($data = ['aud_id'=>'26','s_time'=>'2024-04-01 10:10:10','e_time'=>'2024-06-12 10:10:10','token'=>'0dafb98a10995c98b5a33b7d59d986ca','type'=>'6']){
|
||||||
if(count(input('post.')) > 0){
|
if(count(input('post.')) > 0){
|
||||||
$data = input('post.');
|
$data = input('post.');
|
||||||
}
|
}
|
||||||
|
|
@ -60,7 +60,7 @@ class Pagingcontrast extends Base{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 获取详细历史数据信息(包含身体、跳绳、肺活量)
|
// 获取详细历史数据信息(包含身体、跳绳、肺活量)
|
||||||
public function get_all_record_detailed_information($data = ['id'=>'30','type'=>'2','token'=>'0dafb98a10995c98b5a33b7d59d986ca']){
|
public function get_all_record_detailed_information($data = ['id'=>'39','type'=>'2','token'=>'0dafb98a10995c98b5a33b7d59d986ca']){
|
||||||
if(count(input('post.')) > 0){
|
if(count(input('post.')) > 0){
|
||||||
$data = input('post.');
|
$data = input('post.');
|
||||||
}
|
}
|
||||||
|
|
@ -75,7 +75,7 @@ class Pagingcontrast extends Base{
|
||||||
return $this->jump_transfer_interface_detailed($data);
|
return $this->jump_transfer_interface_detailed($data);
|
||||||
}
|
}
|
||||||
// 数据对比(包含身体、跳绳、肺活量)
|
// 数据对比(包含身体、跳绳、肺活量)
|
||||||
public function get_all_card_data_contrast($data = ['before_id'=>'33','after_id'=>'35','type'=>'2','token'=>'0dafb98a10995c98b5a33b7d59d986ca']){
|
public function get_all_card_data_contrast($data = ['before_id'=>'692','after_id'=>'691','type'=>'6','token'=>'0dafb98a10995c98b5a33b7d59d986ca']){
|
||||||
if(count(input('post.')) > 0){
|
if(count(input('post.')) > 0){
|
||||||
$data = input('post.');
|
$data = input('post.');
|
||||||
}
|
}
|
||||||
|
|
@ -99,7 +99,7 @@ class Pagingcontrast extends Base{
|
||||||
if($data['type'] == '2'){
|
if($data['type'] == '2'){
|
||||||
return $this->get_body_record_data($data,$str);
|
return $this->get_body_record_data($data,$str);
|
||||||
}else if($data['type'] == '6'){
|
}else if($data['type'] == '6'){
|
||||||
return $this->get_body_record_data($data,$str);
|
return $this->get_skip_record_data($data,$str);
|
||||||
}else if($data['type'] == '8'){
|
}else if($data['type'] == '8'){
|
||||||
return $this->get_body_record_data($data,$str);
|
return $this->get_body_record_data($data,$str);
|
||||||
}
|
}
|
||||||
|
|
@ -108,7 +108,7 @@ class Pagingcontrast extends Base{
|
||||||
if($data['type'] == '2'){
|
if($data['type'] == '2'){
|
||||||
return $this->get_body_detaile_data_msg($data);
|
return $this->get_body_detaile_data_msg($data);
|
||||||
}else if($data['type'] == '6'){
|
}else if($data['type'] == '6'){
|
||||||
// return $this->get_body_record_data($data,$str);
|
return $this->msg(10005);
|
||||||
}else if($data['type'] == '8'){
|
}else if($data['type'] == '8'){
|
||||||
// return $this->get_body_record_data($data,$str);
|
// return $this->get_body_record_data($data,$str);
|
||||||
}
|
}
|
||||||
|
|
@ -117,7 +117,7 @@ class Pagingcontrast extends Base{
|
||||||
if($data['type'] == '2'){
|
if($data['type'] == '2'){
|
||||||
return $this->get_body_data_contrast($data);
|
return $this->get_body_data_contrast($data);
|
||||||
}else if($data['type'] == '6'){
|
}else if($data['type'] == '6'){
|
||||||
// return $this->get_body_record_data($data,$str);
|
return $this->get_skip_data_contrast($data);
|
||||||
}else if($data['type'] == '8'){
|
}else if($data['type'] == '8'){
|
||||||
// return $this->get_body_record_data($data,$str);
|
// return $this->get_body_record_data($data,$str);
|
||||||
}
|
}
|
||||||
|
|
@ -135,15 +135,14 @@ class Pagingcontrast extends Base{
|
||||||
id,
|
id,
|
||||||
CONVERT(varchar(10), record_time, 120) AS r_t,
|
CONVERT(varchar(10), record_time, 120) AS r_t,
|
||||||
CONVERT(varchar(19), record_time, 120) AS record_time,
|
CONVERT(varchar(19), record_time, 120) AS record_time,
|
||||||
height as v1,
|
height_val as v1,
|
||||||
weight as v2,
|
weight_val as v2,
|
||||||
bmi as v3
|
bmi_val as v3
|
||||||
from app_card_body_data
|
from app_card_body_data
|
||||||
where aud_id='".$data['aud_id']."'
|
where aud_id='".$data['aud_id']."'
|
||||||
and record_time between '".$data['s_time']."' and '".$data['e_time']."'
|
and record_time between '".$data['s_time']."' and '".$data['e_time']."'
|
||||||
and is_del = 0
|
and is_del = 0
|
||||||
order by record_time desc");
|
order by record_time desc");
|
||||||
|
|
||||||
foreach ($result as $key => $value) {
|
foreach ($result as $key => $value) {
|
||||||
array_push($return_result, [
|
array_push($return_result, [
|
||||||
'id'=>$value['id'],
|
'id'=>$value['id'],
|
||||||
|
|
@ -157,7 +156,7 @@ class Pagingcontrast extends Base{
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
$result = Db::table('app_card_body_data')->where(['aud_id'=>$data['aud_id'],'is_del'=>0])->field("id,record_time,REPLACE(record_time, '-', '/') AS b_time,height,weight,bmi")->order('record_time desc')->page($data['page'],$this->pagesize)->select();
|
$result = Db::table('app_card_body_data')->where(['aud_id'=>$data['aud_id'],'is_del'=>0])->field("id,record_time,REPLACE(record_time, '-', '/') AS b_time,height_val,weight_val,bmi_val")->order('record_time desc')->page($data['page'],$this->pagesize)->select();
|
||||||
$return_result['totalrows'] = Db::table('app_card_body_data')->where(['aud_id'=>$data['aud_id']])->count();
|
$return_result['totalrows'] = Db::table('app_card_body_data')->where(['aud_id'=>$data['aud_id']])->count();
|
||||||
$return_result['rows'] = [];
|
$return_result['rows'] = [];
|
||||||
$return_result['pageno'] = $data['page'];
|
$return_result['pageno'] = $data['page'];
|
||||||
|
|
@ -166,12 +165,66 @@ class Pagingcontrast extends Base{
|
||||||
foreach ($result as $key => $value) {
|
foreach ($result as $key => $value) {
|
||||||
array_push($return_result['rows'],[
|
array_push($return_result['rows'],[
|
||||||
'id'=>$value['id'],
|
'id'=>$value['id'],
|
||||||
|
'v1'=>$value['height_val'],
|
||||||
|
'v2'=>$value['weight_val'],
|
||||||
|
'v3'=>$value['bmi_val'],
|
||||||
'v1_name'=>'身高',
|
'v1_name'=>'身高',
|
||||||
'v1'=>$value['height'],
|
|
||||||
'v2_name'=>'体重',
|
'v2_name'=>'体重',
|
||||||
'v2'=>$value['weight'],
|
|
||||||
'v3_name'=>'BMI',
|
'v3_name'=>'BMI',
|
||||||
'v3'=>$value['bmi'],
|
'record_time'=>$value['b_time'],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $this->msg($return_result);
|
||||||
|
}
|
||||||
|
// 获取记录信息列表(分组)-跳绳
|
||||||
|
// 获取记录信息列表(分页)-跳绳
|
||||||
|
public function get_skip_record_data($data,$type){
|
||||||
|
$return_result = [];
|
||||||
|
if($type == 'group'){
|
||||||
|
$result = Db::query("
|
||||||
|
select
|
||||||
|
id,
|
||||||
|
CONVERT(varchar(10), record_time, 120) AS r_t,
|
||||||
|
CONVERT(varchar(19), record_time, 120) AS record_time,
|
||||||
|
jump_num as v1,
|
||||||
|
jump_time as v2,
|
||||||
|
jump_kcal as v3
|
||||||
|
from app_card_skip_data
|
||||||
|
where aud_id='".$data['aud_id']."'
|
||||||
|
and record_time between '".$data['s_time']."' and '".$data['e_time']."'
|
||||||
|
and is_del = 0
|
||||||
|
order by record_time desc");
|
||||||
|
foreach ($result as $key => $value) {
|
||||||
|
$time_t = $this->handle_hour_branch_second($value['v2']);
|
||||||
|
array_push($return_result, [
|
||||||
|
'id'=>$value['id'],
|
||||||
|
'v1'=>$value['v1'],
|
||||||
|
'v2'=>$time_t['h'].':'.$time_t['m'].':'.$time_t['s'],
|
||||||
|
'v3'=>$value['v3'],
|
||||||
|
'v1_name'=>'个数',
|
||||||
|
'v2_name'=>'时长',
|
||||||
|
'v3_name'=>'卡路里',
|
||||||
|
'r_t'=>str_replace('-', '/', $value['r_t'])
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$result = Db::table('app_card_skip_data')->where(['aud_id'=>$data['aud_id'],'is_del'=>0])->field("id,record_time,REPLACE(record_time, '-', '/') AS b_time,jump_num,jump_time,jump_kcal")->order('record_time desc')->page($data['page'],$this->pagesize)->select();
|
||||||
|
$return_result['totalrows'] = Db::table('app_card_skip_data')->where(['aud_id'=>$data['aud_id']])->count();
|
||||||
|
$return_result['rows'] = [];
|
||||||
|
$return_result['pageno'] = $data['page'];
|
||||||
|
$return_result['pagesize'] = $this->pagesize;
|
||||||
|
$return_result['totalpage'] = ceil($return_result['totalrows']/$this->pagesize);
|
||||||
|
foreach ($result as $key => $value) {
|
||||||
|
$time_t = $this->handle_hour_branch_second($value['jump_time']);
|
||||||
|
array_push($return_result['rows'],[
|
||||||
|
'id'=>$value['id'],
|
||||||
|
'v1'=>$value['jump_num'],
|
||||||
|
'v2'=>$time_t['h'].':'.$time_t['m'].':'.$time_t['s'],
|
||||||
|
'v3'=>$value['jump_kcal'],
|
||||||
|
'v1_name'=>'个数',
|
||||||
|
'v2_name'=>'时长',
|
||||||
|
'v3_name'=>'卡路里',
|
||||||
'record_time'=>$value['b_time'],
|
'record_time'=>$value['b_time'],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
@ -187,7 +240,7 @@ class Pagingcontrast extends Base{
|
||||||
$temporary_arr['key_name'] = $key;
|
$temporary_arr['key_name'] = $key;
|
||||||
$temporary_arr['name'] = $value[0];
|
$temporary_arr['name'] = $value[0];
|
||||||
if($key == 'un_fat_w_weight'){
|
if($key == 'un_fat_w_weight'){
|
||||||
$temporary_arr['value'] = bcsub($result['weight'],explode(',',$result['fat_r'])[0],2);
|
$temporary_arr['value'] = bcsub(explode(',',$result['weight'])[0],explode(',',$result['fat_w'])[0],2);
|
||||||
}else{
|
}else{
|
||||||
$temporary_arr['value'] = explode(',',$result[$key])[0];
|
$temporary_arr['value'] = explode(',',$result[$key])[0];
|
||||||
}
|
}
|
||||||
|
|
@ -209,9 +262,9 @@ class Pagingcontrast extends Base{
|
||||||
$result = Db::query("
|
$result = Db::query("
|
||||||
select
|
select
|
||||||
acbd.id,
|
acbd.id,
|
||||||
acbd.height_data as height,
|
acbd.height,
|
||||||
acbd.weight_data as weight,
|
acbd.weight,
|
||||||
acbd.bmi_data as bmi,
|
acbd.bmi,
|
||||||
acbd.fat_r,
|
acbd.fat_r,
|
||||||
acbd.fat_w,
|
acbd.fat_w,
|
||||||
acbd.muscle,
|
acbd.muscle,
|
||||||
|
|
@ -247,9 +300,6 @@ class Pagingcontrast extends Base{
|
||||||
$calculate_arr['after'] = $value;
|
$calculate_arr['after'] = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// dump($calculate_arr);
|
|
||||||
// die;
|
|
||||||
|
|
||||||
$return_data['time'] = $calculate_arr['before']['b_time'].'-'.$calculate_arr['after']['b_time'];
|
$return_data['time'] = $calculate_arr['before']['b_time'].'-'.$calculate_arr['after']['b_time'];
|
||||||
$return_data['headimg'] = $calculate_arr['before']['head_pic'];
|
$return_data['headimg'] = $calculate_arr['before']['head_pic'];
|
||||||
$return_data['name'] = $calculate_arr['before']['nickname'];
|
$return_data['name'] = $calculate_arr['before']['nickname'];
|
||||||
|
|
@ -282,12 +332,90 @@ class Pagingcontrast extends Base{
|
||||||
'unit'=>$this->request_result['2'][$key][1],
|
'unit'=>$this->request_result['2'][$key][1],
|
||||||
'name'=>$key,
|
'name'=>$key,
|
||||||
],
|
],
|
||||||
'diffval'=>bcsub($before_arr[0],$after_arr[0],2),
|
'diffval'=>bcsub($after_arr[0],$before_arr[0],2),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $this->msg($return_data);
|
return $this->msg($return_data);
|
||||||
}
|
}
|
||||||
|
// 数据对比
|
||||||
|
public function get_skip_data_contrast($data){
|
||||||
|
// dump($data);
|
||||||
|
$data2 = [$data['before_id'],$data['after_id']];
|
||||||
|
$data3 = implode(',',$data2);
|
||||||
|
$calculate_arr = [];
|
||||||
|
$result = Db::query("
|
||||||
|
select
|
||||||
|
acsd.id,
|
||||||
|
acsd.jump_num,
|
||||||
|
acsd.jump_time,
|
||||||
|
acsd.jump_kcal,
|
||||||
|
acsd.record_time,
|
||||||
|
REPLACE(CONVERT(varchar(10), acsd.record_time, 23), '-', '/') AS b_time,
|
||||||
|
aud.nickname,
|
||||||
|
aud.gender,
|
||||||
|
aud.birthday,
|
||||||
|
aud.head_pic
|
||||||
|
from app_card_skip_data as acsd
|
||||||
|
left join app_user_data as aud on acsd.aud_id=aud.id
|
||||||
|
where acsd.id in ($data3)
|
||||||
|
and acsd.is_del = 0
|
||||||
|
");
|
||||||
|
|
||||||
|
if(!$result || count($result)<2){
|
||||||
|
return $this->msg(10004);
|
||||||
|
}
|
||||||
|
// 调整顺序
|
||||||
|
foreach ($result as $key => $value) {
|
||||||
|
if($value['id'] == $data2[0]){
|
||||||
|
$calculate_arr['before'] = $value;
|
||||||
|
}else{
|
||||||
|
$calculate_arr['after'] = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$return_data['time'] = $calculate_arr['before']['b_time'].'-'.$calculate_arr['after']['b_time'];
|
||||||
|
$return_data['headimg'] = $calculate_arr['before']['head_pic'];
|
||||||
|
$return_data['name'] = $calculate_arr['before']['nickname'];
|
||||||
|
$return_data['gender'] = $calculate_arr['before']['gender'];
|
||||||
|
$return_data['age'] = $this->calculate_age($calculate_arr['before']['birthday']);
|
||||||
|
$return_data['day'] = abs($this->daysSince($calculate_arr['before']['record_time'],$calculate_arr['after']['record_time']));
|
||||||
|
|
||||||
|
$return_data['list'] = [];
|
||||||
|
// dump($calculate_arr);
|
||||||
|
// die;
|
||||||
|
foreach ($calculate_arr['before'] as $key => $value) {
|
||||||
|
if(in_array($key, ['jump_num','jump_time','jump_kcal'])){
|
||||||
|
$before_arr = $value;
|
||||||
|
$after_arr = $calculate_arr['after'][$key];
|
||||||
|
$temporary_arr = [
|
||||||
|
'firstresult'=>[
|
||||||
|
'color'=>'',
|
||||||
|
'level'=>'',
|
||||||
|
'value'=>$key=='jump_time'?implode(':',$this->handle_hour_branch_second($before_arr)):$before_arr,
|
||||||
|
'title'=>$this->request_result['6'][$key][0],
|
||||||
|
'unit'=>$this->request_result['6'][$key][1],
|
||||||
|
'name'=>$key,
|
||||||
|
],
|
||||||
|
'secondresult'=>[
|
||||||
|
'color'=>'',
|
||||||
|
'level'=>'',
|
||||||
|
'value'=>$key=='jump_time'?implode(':',$this->handle_hour_branch_second($after_arr)):$after_arr,
|
||||||
|
'title'=>$this->request_result['6'][$key][0],
|
||||||
|
'unit'=>$this->request_result['6'][$key][1],
|
||||||
|
'name'=>$key,
|
||||||
|
],
|
||||||
|
'diffval'=>bcsub($after_arr,$before_arr,2)
|
||||||
|
];
|
||||||
|
if($key=='jump_time'){
|
||||||
|
$temporary_arr['diffval'] = $temporary_arr['diffval'] >= 0?implode(':',$this->handle_hour_branch_second($before_arr)):'-'.implode(':',$this->handle_hour_branch_second($before_arr));
|
||||||
|
}
|
||||||
|
array_push($return_data['list'], $temporary_arr);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return $this->msg($return_data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ use think\Db;
|
||||||
class Skip extends Base{
|
class Skip extends Base{
|
||||||
|
|
||||||
protected $color = ['#FF5656','#FFAB00','#5AD06D','#6492F6','#3967D6'];
|
protected $color = ['#FF5656','#FFAB00','#5AD06D','#6492F6','#3967D6'];
|
||||||
|
protected $curve_data_format = ['jump_num'=>['跳绳个数','个数/个','#009DFF'],'jump_time'=>['跳绳时长','时长/分','#009DFF'],'jump_kcal'=>['消耗卡路里','卡路里/kcal','#009DFF']];
|
||||||
|
|
||||||
protected $result_end_data_mould = [
|
protected $result_end_data_mould = [
|
||||||
'name'=>'',
|
'name'=>'',
|
||||||
|
|
@ -17,16 +18,20 @@ class Skip extends Base{
|
||||||
'color'=>'',
|
'color'=>'',
|
||||||
'list'=>[]
|
'list'=>[]
|
||||||
];
|
];
|
||||||
|
// 加 bcadd(,,20)
|
||||||
|
// 减 bcsub(,,20)
|
||||||
|
// 乘 bcmul(,,20)
|
||||||
|
// 除 bcdiv(,,20)
|
||||||
################################################################接口################################################################
|
################################################################接口################################################################
|
||||||
################################################################接口################################################################
|
################################################################接口################################################################
|
||||||
################################################################接口################################################################
|
################################################################接口################################################################
|
||||||
// 手动记录
|
// 手动记录
|
||||||
public function skip_manual_recording($data = ['aud_id'=>'25','r_time'=>'2024-04-11 10:10:15','num'=>'856','time'=>'137','type'=>'free','token'=>'0dafb98a10995c98b5a33b7d59d986ca']){
|
public function skip_manual_recording($data = ['aud_id'=>'26','r_time'=>'2024-05-25 10:10:15','num'=>'582','time_m'=>'10','time_s'=>'00','type'=>'free','token'=>'0dafb98a10995c98b5a33b7d59d986ca']){
|
||||||
if(count(input('post.')) > 0){
|
if(count(input('post.')) > 0){
|
||||||
$data = input('post.');
|
$data = input('post.');
|
||||||
}
|
}
|
||||||
if(!array_key_exists('aud_id', $data) || !array_key_exists('r_time', $data) || !array_key_exists('num', $data) || !array_key_exists('time', $data) || !array_key_exists('type', $data) || !array_key_exists('token', $data)){
|
|
||||||
|
if(!array_key_exists('aud_id', $data) || !array_key_exists('r_time', $data) || !array_key_exists('num', $data) || !array_key_exists('time_m', $data) || !array_key_exists('time_s', $data) || !array_key_exists('type', $data) || !array_key_exists('token', $data)){
|
||||||
return $this->msg(10001);
|
return $this->msg(10001);
|
||||||
}
|
}
|
||||||
if($this->token_time_validate($data['token']) === false){
|
if($this->token_time_validate($data['token']) === false){
|
||||||
|
|
@ -36,10 +41,14 @@ class Skip extends Base{
|
||||||
if($this->validate_user_identity($data['aud_id']) === false){
|
if($this->validate_user_identity($data['aud_id']) === false){
|
||||||
return $this->msg(10003);
|
return $this->msg(10003);
|
||||||
}
|
}
|
||||||
|
if(abs($data['time_s']) >= 60){
|
||||||
|
return $this->msg(10005);
|
||||||
|
}
|
||||||
|
|
||||||
return $this->skip_manual_recording_action($data);
|
return $this->skip_manual_recording_action($data);
|
||||||
}
|
}
|
||||||
// 今日数据
|
// 今日数据
|
||||||
public function skip_today_data($data = ['aud_id'=>'25','token'=>'0dafb98a10995c98b5a33b7d59d986ca']){
|
public function skip_today_data($data = ['aud_id'=>'26','token'=>'0dafb98a10995c98b5a33b7d59d986ca']){
|
||||||
if(count(input('post.')) > 0){
|
if(count(input('post.')) > 0){
|
||||||
$data = input('post.');
|
$data = input('post.');
|
||||||
}
|
}
|
||||||
|
|
@ -54,24 +63,63 @@ class Skip extends Base{
|
||||||
// die;
|
// die;
|
||||||
return $this->skip_today_data_action($data);
|
return $this->skip_today_data_action($data);
|
||||||
}
|
}
|
||||||
|
// 曲线
|
||||||
|
public function skip_curve_chart($data = ['aud_id'=>'26','time'=>'2024-05-25','token'=>'0dafb98a10995c98b5a33b7d59d986ca']){
|
||||||
|
if(count(input('post.')) > 0){
|
||||||
|
$data = input('post.');
|
||||||
|
}
|
||||||
|
if(!array_key_exists('aud_id', $data) || !array_key_exists('time', $data) || !array_key_exists('token', $data)){
|
||||||
|
return $this->msg(10001);
|
||||||
|
}
|
||||||
|
if($this->token_time_validate($data['token']) === false){
|
||||||
|
return $this->msg(20001);
|
||||||
|
}
|
||||||
|
unset($data['token']);
|
||||||
|
return $this->skip_curve_chart_action($data);
|
||||||
|
}
|
||||||
|
// 删除历史数据
|
||||||
|
public function skip_del_record_data($data = ['id'=>'16','token'=>'0dafb98a10995c98b5a33b7d59d986ca']){
|
||||||
|
if(count(input('post.')) > 0){
|
||||||
|
$data = input('post.');
|
||||||
|
}
|
||||||
|
if(!array_key_exists('id', $data) || !array_key_exists('token', $data)){
|
||||||
|
return $this->msg(10001);
|
||||||
|
}
|
||||||
|
if($this->token_time_validate($data['token']) === false){
|
||||||
|
return $this->msg(20001);
|
||||||
|
}
|
||||||
|
unset($data['token']);
|
||||||
|
$user_data = Db::table('app_card_skip_data')->where(['id'=>$data['id']])->update(['is_del'=>1]);
|
||||||
|
if($user_data){
|
||||||
|
return $this->msg([]);
|
||||||
|
}else{
|
||||||
|
return $this->msg(10002);
|
||||||
|
}
|
||||||
|
}
|
||||||
################################################################接口################################################################
|
################################################################接口################################################################
|
||||||
################################################################接口################################################################
|
################################################################接口################################################################
|
||||||
################################################################接口################################################################
|
################################################################接口################################################################
|
||||||
################################################################skip_manual_recording
|
################################################################skip_manual_recording
|
||||||
public function skip_manual_recording_action($data){
|
public function skip_manual_recording_action($data){
|
||||||
$last_data_body = Db::table('app_card_body_data')->where(['aud_id'=>$data['aud_id']])->field('weight')->find();
|
// 分秒转换为秒
|
||||||
|
$data['time'] = abs($data['time_m'])*60+abs($data['time_s']);
|
||||||
|
$last_data_body = Db::table('app_card_body_data')->where(['aud_id'=>$data['aud_id']])->order('record_time desc,id desc')->field('id,weight,record_time')->find();
|
||||||
|
if(!$last_data_body){
|
||||||
|
return $this->msg(10004);
|
||||||
|
}
|
||||||
$data_set = [
|
$data_set = [
|
||||||
'create_time'=>date('Y-m-d H:i:s'),
|
'create_time'=>date('Y-m-d H:i:s'),
|
||||||
'last_update_time'=>date('Y-m-d H:i:s'),
|
'last_update_time'=>date('Y-m-d H:i:s'),
|
||||||
'jump_num'=>$data['num'],
|
'jump_num'=>$data['num'],
|
||||||
'jump_time'=>$data['time'],
|
'jump_time'=>$data['time'],
|
||||||
'jump_kcal'=>$this->skip_kcal_calculate($data['num'],$data['time'],$last_data_body['weight'])['totalCalories'],
|
'jump_kcal'=>$this->skip_kcal_calculate($data['num'],$data['time'],$last_data_body['weight'])['totalCalories'],
|
||||||
|
'average_num'=>$this->skip_kcal_calculate($data['num'],$data['time'],$last_data_body['weight'])['averageAchievement'],
|
||||||
|
'average_kcal'=>$this->skip_kcal_calculate($data['num'],$data['time'],$last_data_body['weight'])['caloriesPerMinute'],
|
||||||
'aud_id'=>$data['aud_id'],
|
'aud_id'=>$data['aud_id'],
|
||||||
'record_time'=>$data['r_time'],
|
'record_time'=>$data['r_time'],
|
||||||
'jump_type'=>$data['type']
|
'jump_type'=>$data['type']
|
||||||
];
|
];
|
||||||
$last_data_body = Db::table('app_card_skip_data')->insert($data_set);
|
$last_data_body = Db::table('app_card_skip_data')->insert($data_set);
|
||||||
|
|
||||||
$result = [
|
$result = [
|
||||||
'today_jump_num'=>0,
|
'today_jump_num'=>0,
|
||||||
'today_jump_time'=>0,
|
'today_jump_time'=>0,
|
||||||
|
|
@ -81,17 +129,22 @@ class Skip extends Base{
|
||||||
foreach ($all_data as $key => $value) {
|
foreach ($all_data as $key => $value) {
|
||||||
$result['today_jump_num'] = $result['today_jump_num']+$value['jump_num'];
|
$result['today_jump_num'] = $result['today_jump_num']+$value['jump_num'];
|
||||||
$result['today_jump_time'] = $result['today_jump_time']+$value['jump_time'];
|
$result['today_jump_time'] = $result['today_jump_time']+$value['jump_time'];
|
||||||
$result['today_jump_kcal'] = $result['today_jump_kcal']+$value['jump_kcal'];
|
$result['today_jump_kcal'] = bcadd($result['today_jump_kcal'],$value['jump_kcal'],2);
|
||||||
}
|
}
|
||||||
$result['jump_num'] = $data['num'];
|
$result['last_jump_num'] = $data['num'];
|
||||||
$result['jump_time'] = $data['time'];
|
$result['last_jump_time'] = $data['time'];
|
||||||
$result['jump_kcal'] = $data_set['jump_kcal'];
|
$result['last_jump_kcal'] = $data_set['jump_kcal'];
|
||||||
|
$result['last_record_time'] = str_replace('-', '/', $data['r_time']);
|
||||||
|
$time_conversion = $this->handle_hour_branch_second($result['today_jump_time']);
|
||||||
|
$result['today_jump_time'] = $time_conversion['h'].':'.$time_conversion['m'].':'.$time_conversion['s'];
|
||||||
|
$time_conversion = $this->handle_hour_branch_second($result['last_jump_time']);
|
||||||
|
$result['last_jump_time'] = $time_conversion['h'].':'.$time_conversion['m'].':'.$time_conversion['s'];
|
||||||
return $this->msg($result);
|
return $this->msg($result);
|
||||||
}
|
}
|
||||||
################################################################skip_today_data
|
################################################################skip_today_data
|
||||||
public function skip_today_data_action($data){
|
public function skip_today_data_action($data){
|
||||||
$all_data = Db::table('app_card_skip_data')->where(['aud_id'=>$data['aud_id']])->whereTime('record_time','today')->field('jump_num,jump_time,jump_kcal')->select();
|
$all_data = Db::table('app_card_skip_data')->where(['aud_id'=>$data['aud_id']])->whereTime('record_time','today')->field('jump_num,jump_time,jump_kcal')->select();
|
||||||
$last_data = Db::table('app_card_skip_data')->where(['aud_id'=>$data['aud_id']])->order('record_time desc')->field('jump_num,jump_time,jump_kcal,record_time')->find();
|
$last_data = Db::table('app_card_skip_data')->where(['aud_id'=>$data['aud_id']])->order('record_time desc,id desc')->field('id,jump_num,jump_time,jump_kcal,record_time')->find();
|
||||||
$result = [
|
$result = [
|
||||||
'today_jump_num'=>0,
|
'today_jump_num'=>0,
|
||||||
'today_jump_time'=>0,
|
'today_jump_time'=>0,
|
||||||
|
|
@ -100,77 +153,37 @@ class Skip extends Base{
|
||||||
foreach ($all_data as $key => $value) {
|
foreach ($all_data as $key => $value) {
|
||||||
$result['today_jump_num'] = $result['today_jump_num']+$value['jump_num'];
|
$result['today_jump_num'] = $result['today_jump_num']+$value['jump_num'];
|
||||||
$result['today_jump_time'] = $result['today_jump_time']+$value['jump_time'];
|
$result['today_jump_time'] = $result['today_jump_time']+$value['jump_time'];
|
||||||
$result['today_jump_kcal'] = $result['today_jump_kcal']+$value['jump_kcal'];
|
$result['today_jump_kcal'] = bcadd($result['today_jump_kcal'],$value['jump_kcal'],2);
|
||||||
}
|
}
|
||||||
$result['jump_num'] = $last_data['jump_num'];
|
if($last_data){
|
||||||
$result['jump_time'] = $last_data['jump_time'];
|
$result['last_jump_num'] = $last_data['jump_num'];
|
||||||
$result['jump_kcal'] = $last_data['jump_kcal'];
|
$result['last_jump_time'] = $last_data['jump_time'];
|
||||||
|
$result['last_jump_kcal'] = $last_data['jump_kcal'];
|
||||||
|
$result['last_record_time'] = str_replace('-', '/', $last_data['record_time']);
|
||||||
|
}else{
|
||||||
|
$result['last_jump_num'] = 0;
|
||||||
|
$result['last_jump_time'] = 0;
|
||||||
|
$result['last_jump_kcal'] = 0;
|
||||||
|
$result['last_record_time'] = '';
|
||||||
|
}
|
||||||
|
$time_conversion = $this->handle_hour_branch_second($result['today_jump_time']);
|
||||||
|
$result['today_jump_time'] = $time_conversion['h'].':'.$time_conversion['m'].':'.$time_conversion['s'];
|
||||||
|
$time_conversion = $this->handle_hour_branch_second($result['last_jump_time']);
|
||||||
|
$result['last_jump_time'] = $time_conversion['h'].':'.$time_conversion['m'].':'.$time_conversion['s'];
|
||||||
return $this->msg($result);
|
return $this->msg($result);
|
||||||
}
|
}
|
||||||
// 今日数据
|
################################################################skip_curve_chart
|
||||||
// public function skip_today_data($data = ['aud_id'=>11]){
|
|
||||||
// $result = Db::query("
|
|
||||||
// select
|
|
||||||
// jump_num,
|
|
||||||
// jump_time,
|
|
||||||
// jump_kcal,
|
|
||||||
// aud_id,
|
|
||||||
// CAST(GETDATE() AS DATE) as today_date
|
|
||||||
// from app_card_skip_data
|
|
||||||
// where
|
|
||||||
// CAST(record_time AS DATE) = CAST(GETDATE() AS DATE)
|
|
||||||
// and aud_id = ".$data['aud_id']."
|
|
||||||
// ");
|
|
||||||
|
|
||||||
// $return_data = ['jump_num'=>0,'jump_time'=>0,'jump_kcal'=>0];
|
|
||||||
// foreach ($result as $key => $value) {
|
|
||||||
// $return_data['jump_num'] = $value['jump_num']+$return_data['jump_num'];
|
|
||||||
// $return_data['jump_time'] = $value['jump_time']+$return_data['jump_time'];
|
|
||||||
// $return_data['jump_kcal'] = $value['jump_kcal']+$return_data['jump_kcal'];
|
|
||||||
// }
|
|
||||||
|
|
||||||
// return $this->msg(0,'success',$return_data);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// 数据记录
|
|
||||||
public function skip_record_data($data = ['aud_id'=>11,'num'=>50,'time'=>60,'kcal'=>150,'record_time'=>'','jump_type'=>'free']){
|
|
||||||
|
|
||||||
if($data['record_time'] == ''){
|
|
||||||
$data['record_time'] = date('Y-m-d H:i:s');
|
|
||||||
}
|
|
||||||
|
|
||||||
$user_data = Db::table('app_card_skip_data')->insert([
|
|
||||||
'create_time' => date('Y-m-d H:i:s'),
|
|
||||||
'record_time' => $data['record_time'],
|
|
||||||
'jump_num' => $data['num'],
|
|
||||||
'jump_time' => $data['time'],
|
|
||||||
'jump_kcal' => $data['kcal'],
|
|
||||||
'aud_id' => $data['aud_id'],
|
|
||||||
'acd_id' => 5,
|
|
||||||
'jump_type' => $data['num']
|
|
||||||
]);
|
|
||||||
|
|
||||||
if($user_data){
|
|
||||||
return $this->msg(0,'success');
|
|
||||||
}else {
|
|
||||||
return $this->msg(10001,'数据记录失败');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 运动曲线
|
// 运动曲线
|
||||||
public function skip_motion_curve($data = ['aud_id'=>'11','time_data'=>['2024']]){
|
public function skip_curve_chart_action($data = ['aud_id'=>'11','time'=>'2024']){
|
||||||
// public function skip_motion_curve($data = ['aud_id'=>'11','time_data'=>['2024','04']]){
|
// public function skip_motion_curve($data = ['aud_id'=>'11','time_data'=>['2024','04']]){
|
||||||
// public function skip_motion_curve($data = ['aud_id'=>'11','time_data'=>['2024','12','31']]){
|
// public function skip_motion_curve($data = ['aud_id'=>'11','time_data'=>['2024','12','31']]){
|
||||||
// 确保传入的$data是一个数组且包含所需的键
|
|
||||||
if (!is_array($data) || !isset($data['aud_id'], $data['time_data'])) {
|
|
||||||
return $this->msg(10001,'参数格式错误'); // 返回false或抛出异常
|
|
||||||
}
|
|
||||||
|
|
||||||
$audId = $data['aud_id'];
|
$audid = $data['aud_id'];
|
||||||
$timeData = $data['time_data'];
|
$timeData = explode('-', $data['time']);
|
||||||
|
|
||||||
// 根据$timeData的长度构建不同的查询条件
|
// 根据$timeData的长度构建不同的查询条件
|
||||||
$map = ['aud_id' => $audId];
|
$map = ['aud_id' => $audid];
|
||||||
switch (count($timeData)) {
|
switch (count($timeData)) {
|
||||||
case 3: // 年月日
|
case 3: // 年月日
|
||||||
$map['record_time'] = ['between', [date('Y-m-d 00:00:00', strtotime($timeData[0] . '-' . $timeData[1] . '-' . $timeData[2])), date('Y-m-d 23:59:59', strtotime($timeData[0] . '-' . $timeData[1] . '-' . $timeData[2]))]];
|
$map['record_time'] = ['between', [date('Y-m-d 00:00:00', strtotime($timeData[0] . '-' . $timeData[1] . '-' . $timeData[2])), date('Y-m-d 23:59:59', strtotime($timeData[0] . '-' . $timeData[1] . '-' . $timeData[2]))]];
|
||||||
|
|
@ -182,13 +195,13 @@ class Skip extends Base{
|
||||||
$map['record_time'] = ['between', [date('Y-01-01 00:00:00', strtotime($timeData[0])), date('Y-12-31 23:59:59', strtotime($timeData[0]))]];
|
$map['record_time'] = ['between', [date('Y-01-01 00:00:00', strtotime($timeData[0])), date('Y-12-31 23:59:59', strtotime($timeData[0]))]];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return $this->msg(10002,'时间参数错误'); // 无效的时间数据格式
|
return $this->msg(10005); // 无效的时间数据格式
|
||||||
}
|
}
|
||||||
|
|
||||||
// 使用查询构造器进行查询
|
// 使用查询构造器进行查询
|
||||||
$result = Db::name('app_card_skip_data')->where($map)->field('jump_num,jump_time,jump_kcal,aud_id,record_time,jump_type,DATEPART(hour, record_time) AS hour,DATEPART(day, record_time) AS day,DATEPART(month, record_time) AS month')->order('record_time')->select();
|
$result = Db::name('app_card_skip_data')->where($map)->field('jump_num,jump_time,jump_kcal,aud_id,record_time,jump_type,DATEPART(hour, record_time) AS hour,DATEPART(day, record_time) AS day,DATEPART(month, record_time) AS month')->order('record_time')->select();
|
||||||
|
|
||||||
$return_data = ['jump_num'=>['max'=>0,'list'=>[]],'jump_time'=>['max'=>0,'list'=>[]],'jump_kcal'=>['max'=>0,'list'=>[]]];
|
$return_data = [];
|
||||||
if(count($timeData) == 3){
|
if(count($timeData) == 3){
|
||||||
$key_condition = 'hour';
|
$key_condition = 'hour';
|
||||||
}else if(count($timeData) == 2){
|
}else if(count($timeData) == 2){
|
||||||
|
|
@ -196,58 +209,58 @@ class Skip extends Base{
|
||||||
}else if(count($timeData) == 1){
|
}else if(count($timeData) == 1){
|
||||||
$key_condition = 'month';
|
$key_condition = 'month';
|
||||||
}
|
}
|
||||||
// dump($result);
|
|
||||||
// die;
|
foreach ($this->curve_data_format as $key => $value) {
|
||||||
foreach ($result as $key => $value) {
|
$temporary_arr['title'] = $value[0];
|
||||||
if(!array_key_exists($value[$key_condition], $return_data['jump_num']['list'])){
|
$temporary_arr['key'] = $key;
|
||||||
$return_data['jump_num']['list'][$value[$key_condition]] = $value['jump_num'];
|
$temporary_arr['line']['categories'] = [];
|
||||||
}else{
|
$temporary_arr['line']['series'][0]['color'] = $value[2];
|
||||||
$return_data['jump_num']['list'][$value[$key_condition]] = $return_data['jump_num']['list'][$value[$key_condition]] + $value['jump_num'];
|
$temporary_arr['line']['series'][0]['name'] = $value[0];
|
||||||
}
|
$temporary_arr['line']['series'][0]['data'] = [];
|
||||||
if(!array_key_exists($value[$key_condition], $return_data['jump_time']['list'])){
|
foreach ($result as $k => $v) {
|
||||||
$return_data['jump_time']['list'][$value[$key_condition]] = $value['jump_time'];
|
if($key_condition == 'hour'){
|
||||||
}else{
|
if(in_array($result[$k][$key_condition].'时',$temporary_arr['line']['categories'])){
|
||||||
$return_data['jump_time']['list'][$value[$key_condition]] = $return_data['jump_time']['list'][$value[$key_condition]] + $value['jump_time'];
|
$num = array_search($result[$k][$key_condition].'时', $temporary_arr['line']['categories']);
|
||||||
}
|
$temporary_arr['line']['series'][0]['data'][$num] = bcadd($temporary_arr['line']['series'][0]['data'][$num],$result[$k][$key],2);
|
||||||
if(!array_key_exists($value[$key_condition], $return_data['jump_kcal']['list'])){
|
}else{
|
||||||
$return_data['jump_kcal']['list'][$value[$key_condition]] = $value['jump_kcal'];
|
array_push($temporary_arr['line']['categories'],$result[$k][$key_condition].'时');
|
||||||
}else{
|
array_push($temporary_arr['line']['series'][0]['data'],$result[$k][$key]);
|
||||||
$return_data['jump_kcal']['list'][$value[$key_condition]] = $return_data['jump_kcal']['list'][$value[$key_condition]] + $value['jump_kcal'];
|
}
|
||||||
|
}else if($key_condition = 'day'){
|
||||||
|
if(in_array($result[$k]['month'].'/'.$result[$k][$key_condition],$temporary_arr['line']['categories'])){
|
||||||
|
$num = array_search($result[$k]['month'].'/'.$result[$k][$key_condition], $temporary_arr['line']['categories']);
|
||||||
|
$temporary_arr['line']['series'][0]['data'][$num] = bcadd($temporary_arr['line']['series'][0]['data'][$num],$result[$k][$key],2);
|
||||||
|
}else{
|
||||||
|
array_push($temporary_arr['line']['categories'],$result[$k]['month'].'/'.$result[$k][$key_condition]);
|
||||||
|
array_push($temporary_arr['line']['series'][0]['data'],$result[$k][$key]);
|
||||||
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
if(in_array($result[$k]['month'].'月',$temporary_arr['line']['categories'])){
|
||||||
|
$num = array_search($result[$k]['month'].'月', $temporary_arr['line']['categories']);
|
||||||
|
$temporary_arr['line']['series'][0]['data'][$num] = bcadd($temporary_arr['line']['series'][0]['data'][$num],$result[$k][$key],2);
|
||||||
|
}else{
|
||||||
|
array_push($temporary_arr['line']['categories'],$result[$k]['month'].'月');
|
||||||
|
array_push($temporary_arr['line']['series'][0]['data'],$result[$k][$key]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
// dump($temporary_arr);
|
||||||
|
array_push($return_data,$temporary_arr);
|
||||||
}
|
}
|
||||||
|
foreach ($return_data[1]['line']['series'][0]['data'] as $key => $value) {
|
||||||
foreach ($return_data as $key => $value) {
|
$return_data[1]['line']['series'][0]['data'][$key] = bcdiv($return_data[1]['line']['series'][0]['data'][$key],60,2);
|
||||||
foreach ($value['list'] as $k => $v) {
|
|
||||||
$return_data[$key]['max'] = $v>$return_data[$key]['max']?$v:$return_data[$key]['max'];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
return $this->msg($return_data);
|
||||||
return $this->msg(0,'success',$return_data);
|
|
||||||
|
|
||||||
// dump($result);
|
|
||||||
// dump($return_data);
|
|
||||||
// die;
|
|
||||||
// return $result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
################################################################跳绳数据卡片接口################################################################
|
|
||||||
################################################################跳绳数据卡片接口################################################################
|
|
||||||
|
|
||||||
public function get_skip_record_data(){}
|
|
||||||
|
|
||||||
|
|
||||||
################################################################other################################################################
|
################################################################other################################################################
|
||||||
################################################################other################################################################
|
################################################################other################################################################
|
||||||
################################################################other################################################################
|
################################################################other################################################################
|
||||||
|
|
||||||
// 跳绳卡路里计算
|
// 跳绳卡路里计算
|
||||||
public function skip_kcal_calculate($num=466, $time=166, $weight=70) {
|
public function skip_kcal_calculate($num=143, $time=222, $weight=70) {
|
||||||
// 加 bcadd(,,20)
|
// 加 bcadd(,,20)
|
||||||
// 减 bcsub(,,20)
|
// 减 bcsub(,,20)
|
||||||
// 乘 bcmul(,,20)
|
// 乘 bcmul(,,20)
|
||||||
|
|
@ -255,9 +268,9 @@ class Skip extends Base{
|
||||||
// 将时间从秒转换为分钟
|
// 将时间从秒转换为分钟
|
||||||
$minutes = bcdiv($time,60,20);
|
$minutes = bcdiv($time,60,20);
|
||||||
// 计算每分钟的跳绳次数
|
// 计算每分钟的跳绳次数
|
||||||
$jumpsPerMinute = bcdiv($num,$minutes,20);
|
$jumpsPerMinute = bcdiv($num,$minutes,2);
|
||||||
// 根据跳绳次数确定MET值
|
// 根据跳绳次数确定MET值
|
||||||
$met;
|
// $met = 11.8;
|
||||||
if ($jumpsPerMinute < 100) {
|
if ($jumpsPerMinute < 100) {
|
||||||
$met = 8.8;
|
$met = 8.8;
|
||||||
} else if ($jumpsPerMinute >= 100 && $jumpsPerMinute < 120) {
|
} else if ($jumpsPerMinute >= 100 && $jumpsPerMinute < 120) {
|
||||||
|
|
@ -271,7 +284,8 @@ class Skip extends Base{
|
||||||
$totalCalories = bcmul($caloriesPerMinute,$minutes,2);
|
$totalCalories = bcmul($caloriesPerMinute,$minutes,2);
|
||||||
// 返回结果
|
// 返回结果
|
||||||
return [
|
return [
|
||||||
'caloriesPerMinute' => $caloriesPerMinute,
|
'averageAchievement' => $jumpsPerMinute,
|
||||||
|
'caloriesPerMinute' => $caloriesPerMinute,
|
||||||
'totalCalories' => $totalCalories
|
'totalCalories' => $totalCalories
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -78,10 +78,10 @@ Route::any('/card_manual_recording', 'app/card/card_manual_recording');
|
||||||
// 修改初始体重/目标体重
|
// 修改初始体重/目标体重
|
||||||
Route::any('/card_modify_weight', 'app/card/card_modify_weight');
|
Route::any('/card_modify_weight', 'app/card/card_modify_weight');
|
||||||
|
|
||||||
// 获取所有记录接口(分组)
|
// // 获取所有记录接口(分组)
|
||||||
Route::any('/get_card_record_data_group', 'app/card/get_card_record_data_group');
|
// Route::any('/get_card_record_data_group', 'app/card/get_card_record_data_group');
|
||||||
// 获取所有记录接口(分页)
|
// // 获取所有记录接口(分页)
|
||||||
Route::any('/get_card_record_data_page', 'app/card/get_card_record_data_page');
|
// Route::any('/get_card_record_data_page', 'app/card/get_card_record_data_page');
|
||||||
// 删除某个历史数据
|
// 删除某个历史数据
|
||||||
Route::any('/card_del_record_data', 'app/card/card_del_record_data');
|
Route::any('/card_del_record_data', 'app/card/card_del_record_data');
|
||||||
|
|
||||||
|
|
@ -89,8 +89,8 @@ Route::any('/card_del_record_data', 'app/card/card_del_record_data');
|
||||||
Route::any('/card_curve_chart', 'app/card/card_curve_chart');
|
Route::any('/card_curve_chart', 'app/card/card_curve_chart');
|
||||||
// 曲线页面底部目标
|
// 曲线页面底部目标
|
||||||
Route::any('/card_curve_target', 'app/card/card_curve_target');
|
Route::any('/card_curve_target', 'app/card/card_curve_target');
|
||||||
// 数据对比
|
// // 数据对比
|
||||||
Route::any('/card_data_contrast', 'app/card/card_data_contrast');
|
// Route::any('/card_data_contrast', 'app/card/card_data_contrast');
|
||||||
|
|
||||||
// ################################跳绳接口################################
|
// ################################跳绳接口################################
|
||||||
// 手动记录
|
// 手动记录
|
||||||
|
|
@ -98,7 +98,10 @@ Route::any('/skip_manual_recording', 'app/skip/skip_manual_recording');
|
||||||
// 今日数据
|
// 今日数据
|
||||||
Route::any('/skip_today_data', 'app/skip/skip_today_data');
|
Route::any('/skip_today_data', 'app/skip/skip_today_data');
|
||||||
// 运动曲线
|
// 运动曲线
|
||||||
Route::any('/skip_motion_curve', 'app/skip/skip_motion_curve');
|
Route::any('/skip_curve_chart', 'app/skip/skip_curve_chart');
|
||||||
|
// 删除某个历史数据
|
||||||
|
Route::any('/skip_del_record_data', 'app/skip/skip_del_record_data');
|
||||||
|
|
||||||
// Route::any('/generateRandomJumpData', 'app/skip/generateRandomJumpData');
|
// Route::any('/generateRandomJumpData', 'app/skip/generateRandomJumpData');
|
||||||
// ################################肺活量接口################################
|
// ################################肺活量接口################################
|
||||||
// 今日数据
|
// 今日数据
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue