Commit c26d2b0c authored by zhoujun's avatar zhoujun

调试图片

parent a16f993d
...@@ -62,7 +62,7 @@ class Handler extends ExceptionHandler ...@@ -62,7 +62,7 @@ class Handler extends ExceptionHandler
} }
if ($exception instanceof QueryException) { if ($exception instanceof QueryException) {
return new JsonResponse(['error' => 5001, 'message' => '网络错误']); return response()->json(['error' => 5001, 'message' => '网络错误']);
} }
if ($exception instanceof ErrorException) { if ($exception instanceof ErrorException) {
......
...@@ -242,7 +242,7 @@ class CardController extends Controller ...@@ -242,7 +242,7 @@ class CardController extends Controller
public function getCheckRoleInfoTable($tableName) public function getCheckRoleInfoTable($tableName)
{ {
if ( ! Schema::connection('wx_mysql')->hasTable($tableName)) { if (!Schema::connection('wx_mysql')->hasTable($tableName)) {
Schema::connection('wx_mysql')->create($tableName, function (Blueprint $table) { Schema::connection('wx_mysql')->create($tableName, function (Blueprint $table) {
$table->bigIncrements('id')->comment('自增主键'); $table->bigIncrements('id')->comment('自增主键');
$table->integer('uid')->default(0)->comment('用户id'); $table->integer('uid')->default(0)->comment('用户id');
...@@ -343,6 +343,7 @@ class CardController extends Controller ...@@ -343,6 +343,7 @@ class CardController extends Controller
$roleId = $request->input('roleId'); $roleId = $request->input('roleId');
$serverId = $request->input('serverId'); $serverId = $request->input('serverId');
if (empty($roleId) || empty($serverId)) return $this->jsonReturn(7002, '参数错误'); if (empty($roleId) || empty($serverId)) return $this->jsonReturn(7002, '参数错误');
if (!Schema::connection('wx_mysql')->hasTable('wx_card_role_'.$serverId)) return redirect(route('index'));
$info = DB::connection('wx_mysql')->table('wx_card_role_'.$serverId)->where('uid',$userId)->where('role_id',$roleId)->where('server_id',$serverId)->first(); $info = DB::connection('wx_mysql')->table('wx_card_role_'.$serverId)->where('uid',$userId)->where('role_id',$roleId)->where('server_id',$serverId)->first();
if(!$info) return redirect(route('index')); if(!$info) return redirect(route('index'));
$serverName = ''; $serverName = '';
......
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