SchoolPhysicalExamination/application/testapp/controller/Download.php

71 lines
2.2 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace app\testapp\controller;
use think\Controller;
use think\Db;
class Download extends Base{
public function demo(){
$url = Db::table('app_version_log')->order('id desc')->find();
$this->assign([
'url' => $url['download_url'],
]);
return $this->fetch();
}
public function demo2(){
$url = Db::table('app_version_log')->order('id desc')->find();
$this->assign([
'url' => $url['download_url'],
]);
return $this->fetch();
}
public function business_cooperation(){
return $this->fetch();
}
public function business_cooperation_action(){
$data = input();
$result = Db::table('admin_business_cooperation_log')->insert([
'name'=>$data['name'],
'tel'=>$data['phone'],
'company'=>$data['company'],
'intention_data'=>implode(',',$data['selectedValues']),
'notes_data'=>$data['remark'],
'create_time'=>date('Y-m-d H:i:s'),
]);
if($result){
return json(['code'=>0,'msg'=>'提交成功']);
}else{
return json(['code'=>10001,'msg'=>'网络错误,请直接联系商务合作电话/微信13590959084']);
}
}
#########################################################################其它#########################################################################
#########################################################################其它#########################################################################
#########################################################################其它#########################################################################
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;
}
}