|
|
@@ -32,11 +32,12 @@ class SportswqController extends Controller {
|
|
|
$dt->setDataSource('/admin/Sportswq/outcomeinfo');
|
|
|
$dt->setLang('sportswq');
|
|
|
$dt->addColsFields('newtime', array('templet' => '#newtime', 'sort' => false, 'width' => 200));
|
|
|
- $dt->addColsFields('home_player_name', array('templet' => '#home_team', 'sort' => false, 'width' => 80));
|
|
|
- $dt->addColsFields('guest_player_name', array('templet' => '#guest_team', 'sort' => false, 'width' => 80));
|
|
|
+ $dt->addColsFields('start_time', array('templet' => '#home_team', 'sort' => false, 'width' => 155));
|
|
|
+ $dt->addColsFields('home_player_name', array('templet' => '#home_team', 'sort' => false, 'width' => 130));
|
|
|
+ $dt->addColsFields('guest_player_name', array('templet' => '#guest_team', 'sort' => false, 'width' => 130));
|
|
|
$dt->addColsFields('dsnum', array('templet' => '#dsnum', 'sort' => false, 'width' => 80));
|
|
|
$dt->addColsFields('csnum', array('templet' => '#home_rate', 'sort' => false, 'width' => 80));
|
|
|
- $dt->addColsFields('match_score', array('templet' => '#home_rate', 'sort' => false, 'width' => 80));
|
|
|
+ $dt->addColsFields('match_score', array('templet' => '#matchscore', 'sort' => false, 'width' => 130));
|
|
|
$dt->addColsFields('statusmatch', array('templet' => '#statusmatch', 'sort' => false, 'width' => 80));
|
|
|
$dt->addColsFields('operation', array('templet' => '#operation', 'sort' => false, 'width' => 300));
|
|
|
return view('admin.Sportswq/outcome', $dt->render($request));
|
|
|
@@ -245,35 +246,33 @@ class SportswqController extends Controller {
|
|
|
return responseToJson(1);
|
|
|
}
|
|
|
|
|
|
- //更新赛事比分
|
|
|
- function updatenum(Req $req){
|
|
|
- $type = $req->type;
|
|
|
- $id = $req->id;
|
|
|
- $num = $req->num;
|
|
|
- $match_id = $req->match_id;
|
|
|
- $newapp = new \App\Models\Stwqresult();
|
|
|
-
|
|
|
- if($type==1){
|
|
|
- $data['u_home_score'] = $num;
|
|
|
- $res = $newapp->updateInfo($data,$id);//联赛id
|
|
|
- }else if($type==2){
|
|
|
- $data['u_guest_score'] = $num;
|
|
|
- $res = $newapp->updateInfo($data,$id);//联赛id
|
|
|
- }else if($type==3){
|
|
|
- $data['home_score'] = $num;
|
|
|
- $res = $newapp->updateInfo($data,$id);//联赛id
|
|
|
- }else{
|
|
|
- $data['guest_score'] = $num;
|
|
|
- $res = $newapp->updateInfo($data,$id);//联赛id
|
|
|
+ //修改添加赛事比分
|
|
|
+ function updatascore(Req $req){
|
|
|
+ $only = $req->only;//节数唯一标识
|
|
|
+ $match_id = $req->match_id;//节数唯一标识
|
|
|
+ $home_player_score = intval($req->home_player_score);//主队比分
|
|
|
+ $guest_player_score = intval($req->guest_player_score);//客队比分
|
|
|
+
|
|
|
+ $model = \App\Models\Stwqresult::where('match_id', $match_id)->first();
|
|
|
+ $model->update_time = date('Y-m-d H:i:s');
|
|
|
+
|
|
|
+ if($home_player_score){
|
|
|
+ $model->home_player_score = $home_player_score;
|
|
|
}
|
|
|
+ if($guest_player_score){
|
|
|
+ $model->guest_player_score = $guest_player_score;
|
|
|
+ }
|
|
|
+ $model->save();
|
|
|
+
|
|
|
$addnew = new \App\Models\Comendnotice();
|
|
|
$addnew->addcomendnotice($match_id,'wq');
|
|
|
|
|
|
- $twoapp = new \App\Models\SportsTennis();
|
|
|
+ $twoapp = new \App\Models\SportsBasket();
|
|
|
$twoapp->updatestatus('match_id',$match_id,['status'=>2]);//修改赛事状态
|
|
|
+ $newapp = new \App\Models\Stwqresult();
|
|
|
$newapp->updatestatus('match_id',$match_id,['status'=>2]);//修改结果状态
|
|
|
|
|
|
- return responseToJson(1);
|
|
|
+ return responseToJson(1);
|
|
|
}
|
|
|
|
|
|
|