70 lines
1.6 KiB
PHP
70 lines
1.6 KiB
PHP
|
<?php
|
||
|
|
||
|
namespace app\controller\api;
|
||
|
|
||
|
use support\Request;
|
||
|
|
||
|
use App\Utils\ApiResponseApp;
|
||
|
|
||
|
|
||
|
use App\model\Dictionary;
|
||
|
use hg\apidoc\annotation as Apidoc;
|
||
|
use support\Db;
|
||
|
|
||
|
/**
|
||
|
* @Apidoc\Title("公共控制器?")
|
||
|
*/
|
||
|
|
||
|
class CommonController
|
||
|
{
|
||
|
protected $noNeedLogin = ['config', 'get_project', 'get_projectdetailed', 'get_mechanism_list'];
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @Apidoc\Title("1.0 获取全局配置")
|
||
|
* @Apidoc\Url("api/common/config")
|
||
|
* @Apidoc\Method("POST")
|
||
|
*/
|
||
|
public function config(Request $request)
|
||
|
{
|
||
|
|
||
|
$Dictionary=Dictionary::all();
|
||
|
$res=[];
|
||
|
$res = [
|
||
|
"account_notice" => "Log in to link account and get 300 to 3,000 random points a day",
|
||
|
"vi_rate" => "2.49",
|
||
|
"trx_rate" => "0.00",
|
||
|
"nrly_rate" => "30",
|
||
|
"trx_rate1" => "",
|
||
|
"inr_rate" => "1.62",
|
||
|
"php_rate" => null,
|
||
|
"brl_rate" => "0.10",
|
||
|
"brl_fee" => "300",
|
||
|
"pkr_fee" => "300",
|
||
|
"pkr_rate" => "5",
|
||
|
"pkr_min" => "2000",
|
||
|
"brl_min" => "5000"
|
||
|
];
|
||
|
$col=['service_1','service_2','service_3','service_url','service_user_url','points'];
|
||
|
foreach($Dictionary as $key=>$value){
|
||
|
$res[$value->key]=$value->value;
|
||
|
}
|
||
|
return ApiResponseApp::success($res);
|
||
|
}
|
||
|
/**
|
||
|
* @Apidoc\Title("1.0 消息根据type 判断类型")
|
||
|
* @Apidoc\Url("api/common/messageList")
|
||
|
* @Apidoc\Method("POST")
|
||
|
*/
|
||
|
public function messageList(Request $request){
|
||
|
$type=$request->get('type');
|
||
|
/**
|
||
|
* 返回轮播图
|
||
|
*/
|
||
|
if($type==5){
|
||
|
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|