Commit 9ad2c06e by 庄欣

fix bug

parent df8d17b0
......@@ -20,7 +20,7 @@ class ControllerBase
{
public function getAuth()
{
return request("uuid",12);
return request("uuid",3);
static $id;
if (!$id) {
$code = request()->header("token");
......
......@@ -7,6 +7,7 @@ use App\Exceptions\ApiUnauthorized;
use App\Http\Controllers\ControllerBase;
use Illuminate\Routing\Controller;
use App\Lib\Response\Response;
use Illuminate\Http\Request;
class Sets extends ControllerBase
{
......@@ -17,6 +18,9 @@ class Sets extends ControllerBase
const TIME_IN = 1;
const TIME_AFTER = 2;
const SETS_TYPE_NORMAL = 0;
const SETS_TYPE_TRAVEL = 1;
protected function after_hook($res)
{
$path = app_path("Lib")."/underscore.php";
......@@ -61,5 +65,23 @@ class Sets extends ControllerBase
}
}
/**
* 保存
*/
public function store(Request $request)
{
$data = $request->all();
if ($data['type'] == self::SETS_TYPE_NORMAL) {
$request->merge([
'abroad' => 0 //非旅拍套系则视作国内
]);
} else {
$request->merge([
'abroad' => $data['abroad'] // 旅拍套系按照传入的值来
]);
}
return parent::store($request);
}
}
\ No newline at end of file
......@@ -116,7 +116,7 @@ class CurlClient
$curlinfo = curl_getinfo($http);
}
if ($curlinfo == false || (is_array($curlinfo) && $curlinfo['http_code'] != 200)) {
var_dump($curlinfo);
var_dump($res);
throw new \Exception("返回错误");
}
$res = json_decode($res);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment