50 lines
1.3 KiB
PHP
50 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace app\testapp\controller;
|
|
|
|
use think\Controller;
|
|
use think\Db;
|
|
|
|
class Download extends Base{
|
|
public function demo(){
|
|
|
|
// $num = Db::table('app_version_log')->order('id desc')->find();
|
|
// echo '你好,这里仅仅是个下载展示页面-1';
|
|
// echo '<br><a href="'.$num['download_url'].'">点击下载</a>';
|
|
$url = Db::table('test_app_version_log')->order('id desc')->find();
|
|
$this->assign([
|
|
|
|
'url' => $url['download_url'],
|
|
]);
|
|
return $this->fetch();
|
|
}
|
|
|
|
public function demo2(){
|
|
|
|
$url = Db::table('test_app_version_log')->order('id desc')->find();
|
|
|
|
|
|
$this->assign([
|
|
|
|
'url' => $url['download_url'],
|
|
]);
|
|
return $this->fetch();
|
|
}
|
|
|
|
public function ceshi(){
|
|
$data = input();
|
|
$url = 'https://klcz.pcxbc.com/open-api/calc/healthcalc/bodyfat3';
|
|
$temporary_parameter = [
|
|
'weight'=>$data['weight'],
|
|
'height'=>$data['height'],
|
|
'age'=>$data['age'],
|
|
'adc'=>$data['adc'],
|
|
'gender'=>$data['gender'],
|
|
];
|
|
dump($temporary_parameter);
|
|
|
|
$result = $this->postRequest($url,$temporary_parameter);
|
|
dump($result);
|
|
die;
|
|
}
|
|
} |