<?php
/*
 本代码由 口号帮 创建
 创建时间 2019-05-08 16:22:09
 技术支持 口号帮 
 严禁反编译、逆向等任何形式的侵权行为，违者将追究法律责任
*/

namespace App\Http\Controllers\Admin;use App\Http\Controllers\BaseController;use Illuminate\Http\Request;use App\Http\Controllers\Controller;class CloudOrderController extends BaseController{private $url="http://api.cloud.co/";public function index(){return view('admin.cloudorder.index');}public function data(Request $request){$u='api/v4/cloud/order/list';$P2gAC0=array();$P2gAC0['limit']=$request->get('limit');$P2gAC0['page']=$request->get('page');$P2gAC0['oem_id']=env('OEN_ID');$P2gAC0['appKey']=env('OEM_KEY');$P2gAC0['appSecret']=env('OEM_SECRET');$params=$P2gAC0;$result=$this->cloudCurl($u,$params);$result=json_decode(json_decode($result));$P2g0=$result->code==200;if($P2g0)goto P2gBodyx2;goto P2gNextx2;P2gBodyx2:$P2gAC0=array();$P2gAC0['code']=0;$P2gAC0['msg']='正在请求中...';$P2gAC0['count']=$result->total;$P2gAC0['data']=$result->data;$data=$P2gAC0;goto P2gx1;P2gNextx2:$P2gAC0=array();$P2gAC0['code']=0;$P2gAC0['msg']=$result->info;$P2gAC0['count']=0;$P2gAC1=array();$P2gAC0['data']=$P2gAC1;$data=$P2gAC0;P2gx1:return response()->json($data);}public function create(){}public function store(Request $request){}public function show($id){}public function edit($id){}public function update(Request $request,$id){}public function destroy($id){}public function cloudCurl($u,$params){$P2g0=$this->url . $u;$url=$P2g0;$ch=curl_init();curl_setopt($ch,CURLOPT_URL,$url);curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);curl_setopt($ch,CURLOPT_TIMEOUT,10);curl_setopt($ch,CURLOPT_POST,1);curl_setopt($ch,CURLOPT_POSTFIELDS,$params);$data=curl_exec($ch);if(curl_errno($ch))goto P2gBodyx4;goto P2gNextx4;P2gBodyx4:return curl_error($ch);goto P2gx3;P2gNextx4:P2gx3:curl_close($ch);return json_encode($data);}}
?>