彭俊 преди 6 години
родител
ревизия
42292ff400
променени са 100 файла, в които са добавени 384 реда и са изтрити 152 реда
  1. 9 3
      app/Http/Controllers/Admin/IndexController.php
  2. 164 148
      app/Http/Controllers/Admin/NoticeController.php
  3. 168 1
      app/Http/Controllers/Api/WriteSportsController.php
  4. 1 0
      app/Http/Middleware/VerifyCsrfToken.php
  5. 1 0
      public/frame/layui254/css/layui.css
  6. 1 0
      public/frame/layui254/css/layui.mobile.css
  7. 2 0
      public/frame/layui254/css/modules/code.css
  8. 1 0
      public/frame/layui254/css/modules/laydate/default/laydate.css
  9. BIN
      public/frame/layui254/css/modules/layer/default/icon-ext.png
  10. BIN
      public/frame/layui254/css/modules/layer/default/icon.png
  11. 1 0
      public/frame/layui254/css/modules/layer/default/layer.css
  12. BIN
      public/frame/layui254/css/modules/layer/default/loading-0.gif
  13. BIN
      public/frame/layui254/css/modules/layer/default/loading-1.gif
  14. BIN
      public/frame/layui254/css/modules/layer/default/loading-2.gif
  15. BIN
      public/frame/layui254/font/iconfont.eot
  16. 25 0
      public/frame/layui254/font/iconfont.svg
  17. BIN
      public/frame/layui254/font/iconfont.ttf
  18. BIN
      public/frame/layui254/font/iconfont.woff
  19. BIN
      public/frame/layui254/font/iconfont.woff2
  20. BIN
      public/frame/layui254/images/face/0.gif
  21. BIN
      public/frame/layui254/images/face/1.gif
  22. BIN
      public/frame/layui254/images/face/10.gif
  23. BIN
      public/frame/layui254/images/face/11.gif
  24. BIN
      public/frame/layui254/images/face/12.gif
  25. BIN
      public/frame/layui254/images/face/13.gif
  26. BIN
      public/frame/layui254/images/face/14.gif
  27. BIN
      public/frame/layui254/images/face/15.gif
  28. BIN
      public/frame/layui254/images/face/16.gif
  29. BIN
      public/frame/layui254/images/face/17.gif
  30. BIN
      public/frame/layui254/images/face/18.gif
  31. BIN
      public/frame/layui254/images/face/19.gif
  32. BIN
      public/frame/layui254/images/face/2.gif
  33. BIN
      public/frame/layui254/images/face/20.gif
  34. BIN
      public/frame/layui254/images/face/21.gif
  35. BIN
      public/frame/layui254/images/face/22.gif
  36. BIN
      public/frame/layui254/images/face/23.gif
  37. BIN
      public/frame/layui254/images/face/24.gif
  38. BIN
      public/frame/layui254/images/face/25.gif
  39. BIN
      public/frame/layui254/images/face/26.gif
  40. BIN
      public/frame/layui254/images/face/27.gif
  41. BIN
      public/frame/layui254/images/face/28.gif
  42. BIN
      public/frame/layui254/images/face/29.gif
  43. BIN
      public/frame/layui254/images/face/3.gif
  44. BIN
      public/frame/layui254/images/face/30.gif
  45. BIN
      public/frame/layui254/images/face/31.gif
  46. BIN
      public/frame/layui254/images/face/32.gif
  47. BIN
      public/frame/layui254/images/face/33.gif
  48. BIN
      public/frame/layui254/images/face/34.gif
  49. BIN
      public/frame/layui254/images/face/35.gif
  50. BIN
      public/frame/layui254/images/face/36.gif
  51. BIN
      public/frame/layui254/images/face/37.gif
  52. BIN
      public/frame/layui254/images/face/38.gif
  53. BIN
      public/frame/layui254/images/face/39.gif
  54. BIN
      public/frame/layui254/images/face/4.gif
  55. BIN
      public/frame/layui254/images/face/40.gif
  56. BIN
      public/frame/layui254/images/face/41.gif
  57. BIN
      public/frame/layui254/images/face/42.gif
  58. BIN
      public/frame/layui254/images/face/43.gif
  59. BIN
      public/frame/layui254/images/face/44.gif
  60. BIN
      public/frame/layui254/images/face/45.gif
  61. BIN
      public/frame/layui254/images/face/46.gif
  62. BIN
      public/frame/layui254/images/face/47.gif
  63. BIN
      public/frame/layui254/images/face/48.gif
  64. BIN
      public/frame/layui254/images/face/49.gif
  65. BIN
      public/frame/layui254/images/face/5.gif
  66. BIN
      public/frame/layui254/images/face/50.gif
  67. BIN
      public/frame/layui254/images/face/51.gif
  68. BIN
      public/frame/layui254/images/face/52.gif
  69. BIN
      public/frame/layui254/images/face/53.gif
  70. BIN
      public/frame/layui254/images/face/54.gif
  71. BIN
      public/frame/layui254/images/face/55.gif
  72. BIN
      public/frame/layui254/images/face/56.gif
  73. BIN
      public/frame/layui254/images/face/57.gif
  74. BIN
      public/frame/layui254/images/face/58.gif
  75. BIN
      public/frame/layui254/images/face/59.gif
  76. BIN
      public/frame/layui254/images/face/6.gif
  77. BIN
      public/frame/layui254/images/face/60.gif
  78. BIN
      public/frame/layui254/images/face/61.gif
  79. BIN
      public/frame/layui254/images/face/62.gif
  80. BIN
      public/frame/layui254/images/face/63.gif
  81. BIN
      public/frame/layui254/images/face/64.gif
  82. BIN
      public/frame/layui254/images/face/65.gif
  83. BIN
      public/frame/layui254/images/face/66.gif
  84. BIN
      public/frame/layui254/images/face/67.gif
  85. BIN
      public/frame/layui254/images/face/68.gif
  86. BIN
      public/frame/layui254/images/face/69.gif
  87. BIN
      public/frame/layui254/images/face/7.gif
  88. BIN
      public/frame/layui254/images/face/70.gif
  89. BIN
      public/frame/layui254/images/face/71.gif
  90. BIN
      public/frame/layui254/images/face/8.gif
  91. BIN
      public/frame/layui254/images/face/9.gif
  92. 1 0
      public/frame/layui254/lay/modules/carousel.js
  93. 2 0
      public/frame/layui254/lay/modules/code.js
  94. 1 0
      public/frame/layui254/lay/modules/colorpicker.js
  95. 1 0
      public/frame/layui254/lay/modules/element.js
  96. 2 0
      public/frame/layui254/lay/modules/flow.js
  97. 1 0
      public/frame/layui254/lay/modules/form.js
  98. 1 0
      public/frame/layui254/lay/modules/jquery.js
  99. 1 0
      public/frame/layui254/lay/modules/laydate.js
  100. 1 0
      public/frame/layui254/lay/modules/layedit.js

+ 9 - 3
app/Http/Controllers/Admin/IndexController.php

@@ -300,15 +300,21 @@ class IndexController extends Controller {
         $time1 = date('Y-m-d H:i:s', time());
         $timearea = [$time2, $time1];
         // $rech_data['money_with'] = DB::table('account_detailed')->join('account', 'account.identity', '=', 'money_details.account_identity')->select(DB::Raw('sum(money) as with'))->whereBetween('money_time', $timearea)->groupBy('account')->where('trade_type', 5)->get();
-        $rimit = \App\Models\Account_list::where('account_status', 1)
-            ->select(DB::Raw('date(register_time) as name, count(identity) as value'))
-            ->whereBetween('register_time', $timearea)->orderBy(DB::Raw('date(register_time)'))->groupBy(DB::Raw('date(register_time)'))->get();
+        // $rimit = \App\Models\Account_list::where('account_status', 1)
+        //     ->select(DB::Raw('date(register_time) as name, count(identity) as value'))
+        //     ->whereBetween('register_time', $timearea)->orderBy(DB::Raw('date(register_time)'))->groupBy(DB::Raw('date(register_time)'))->get();
+        // $data = $rimit->toArray();
+        $rimit = \App\Models\Account_detailed::where('statuss', 1)
+        ->select(DB::Raw('date(register_time) as name, count(identity) as value'))
+        ->whereBetween('register_time', $timearea)->orderBy(DB::Raw('date(register_time)'))->groupBy(DB::Raw('date(register_time)'))->get();
         $data = $rimit->toArray();
+
         foreach ($data as $k => $v) {
             $array['title'][$k] = $v['name'];
             $array['data']['num'][$k] = $v['value'];
         }
         $array['legend'][] = '最近注册用户记录';
+
         return responseToJson($array);
     }
 

+ 164 - 148
app/Http/Controllers/Admin/NoticeController.php

@@ -12,25 +12,27 @@ use Illuminate\Http\Request as Req;
 /**
  *
  */
-class NoticeController extends Controller{
+class NoticeController extends Controller
+{
 
     /**
      * 活动公告
      */
-    function Index(Req $req){
+    function Index(Req $req)
+    {
         $request['title'] = isset($req->title) ? trim($req->title) : null;
         $request['type'] = isset($req->type) ? trim($req->type) : null;
 
         $dt = \App\Lib\DataTable\DataTable::init();
         $dt->setDataSource('/admin/System/getArticle');
         $dt->setLang('notice');
-         $dt->addColsFields('id',array('width' => 50));
+        $dt->addColsFields('id', array('width' => 50));
         $dt->addColsFields('title', array('templet' => '#title', 'sort' => false, 'width' => 120));
         // $dt->addColsFields('content');
         $dt->addColsFields('time');
         $dt->addColsFields('type');
         // $dt->addColsFields('typebind');
-        $dt->addColsFields('sort',array('width' => 120));
+        $dt->addColsFields('sort', array('width' => 120));
         $dt->addColsFields('status', array('templet' => '#closeTool', 'sort' => false, 'width' => 120));
         $dt->enableCheckBox();
         $arr[] = 'view';
@@ -45,67 +47,70 @@ class NoticeController extends Controller{
     /**
      * 查看
      */
-    function view(Req $req){
+    function view(Req $req)
+    {
         return $this->Edit($req);
     }
 
     /**
      * 编辑
      */
-    function Edit(Req $req){
+    function Edit(Req $req)
+    {
         $id = $req->id;
         if (intval($id) < 1) {
             abort(404);
         }
 
-		$db = new \App\Models\Article;
-		if (!$req->isMethod('post')) {
+        $db = new \App\Models\Article;
+        if (!$req->isMethod('post')) {
             $data = $db->getDmsg($id, 1);
-            
-			if (!$data) {
-				return responseToJson($data);
+
+            if (!$data) {
+                return responseToJson($data);
             }
-            $select =    $data["type"];
-            $child_id   =   $data["child_id"];
-          
-            return view('admin.systemSet/editNotice',['select'=>intval($select),'data' => $data,"child_id"=>$child_id]);
-            
-		} else {
-            $data['child_id'] =$req->child_id;
-			$data['title'] = $req->input('title');
-			// $data['author'] = $req->input('author');
-			$data['sort'] = $req->input('sort');
-			$data['type'] = $req->input('type');
-			$data['img'] = $req->input('img');
-			$data['typebind'] = $req->input('typebind');
+            $select = $data["type"];
+            $child_id = $data["child_id"];
+
+            return view('admin.systemSet/editNotice', ['select' => intval($select), 'data' => $data, "child_id" => $child_id]);
+
+        } else {
+            $data['child_id'] = $req->child_id;
+            $data['title'] = $req->input('title');
+            // $data['author'] = $req->input('author');
+            $data['sort'] = $req->input('sort');
+            $data['type'] = $req->input('type');
+            $data['img'] = $req->input('img');
+            $data['typebind'] = $req->input('typebind');
             $data['mobilecontent'] = $req->mobilecontent;
             $data['mobileimg'] = $req->input('mobileimg');
-			$data['content'] = $req->desc;
-			$res = $db->updateMsg($data, $id);
-			$log = array(
-				session('adminInfo.admin_name'),
-				$data['title']
-			);
-			OperationLog(session('adminInfo.admin_id'), 'edit_game', $log);
-			return responseToJson($res);
-		}
+            $data['content'] = $req->desc;
+            $res = $db->updateMsg($data, $id);
+            $log = array(
+                session('adminInfo.admin_name'),
+                $data['title']
+            );
+            OperationLog(session('adminInfo.admin_id'), 'edit_game', $log);
+            return responseToJson($res);
+        }
     }
 
-     /**
+    /**
      * 新增公告
      */
-    function addNotice(Req $req){
+    function addNotice(Req $req)
+    {
         if (!$req->isMethod('post')) {
-            return view('admin.systemSet/editNotice',['select'=>0,"child_id"=>0]);
-        }else{
+            return view('admin.systemSet/editNotice', ['select' => 0, "child_id" => 0]);
+        } else {
             $data['title'] = $req->input('title');
             $data['img'] = $req->input('img');
             $data['sort'] = $req->input('sort');
             $data['typebind'] = $req->input('typebind');
             $data['mobilecontent'] = $req->mobilecontent;
             $data['mobileimg'] = $req->input('mobileimg');
-            $data['type'] =$req->type;
-            $data['child_id'] =$req->child_id;
+            $data['type'] = $req->type;
+            $data['child_id'] = $req->child_id;
             $data['content'] = $req->desc;
             $log = array(
                 session('adminInfo.admin_name'),
@@ -124,131 +129,137 @@ class NoticeController extends Controller{
     }
 
     /**
-	 * 批量删除
-	 * [delete description]
-	 * @return [type] [description]
-	 */
-	function delete(Req $req) {
-		$id = $req->input('id');
-		if (empty($id)) {
-			return responseToJson(-2001);
-		}
-		$ids = explode(',', $id);
-		if (!is_array($ids) && intval($ids) < 0) {
-			return responseToJson(-2002); 
-		}
-		if (is_array($ids) && count($ids) > 0) {
-			foreach ($ids as $k => $v) {
-				if (intval($v) < 1) {
-					unset($ids[$k]);
-				}
-			}
-		}
-		$rows = \App\Models\Article::whereIn('id', $ids)->delete();
-		if (!$rows) {
-			return responseToJson(-2003); 
-		}
-		return responseToJson(1); 
-	}
-
-    function __Edit(Req $req){
+     * 批量删除
+     * [delete description]
+     * @return [type] [description]
+     */
+    function delete(Req $req)
+    {
+        $id = $req->input('id');
+        if (empty($id)) {
+            return responseToJson(-2001);
+        }
+        $ids = explode(',', $id);
+        if (!is_array($ids) && intval($ids) < 0) {
+            return responseToJson(-2002);
+        }
+        if (is_array($ids) && count($ids) > 0) {
+            foreach ($ids as $k => $v) {
+                if (intval($v) < 1) {
+                    unset($ids[$k]);
+                }
+            }
+        }
+        $rows = \App\Models\Article::whereIn('id', $ids)->delete();
+        if (!$rows) {
+            return responseToJson(-2003);
+        }
+        return responseToJson(1);
+    }
+
+    function __Edit(Req $req)
+    {
         $id = $req->id;
-		if (intval($id) < 1) {
-			abort(404);
+        if (intval($id) < 1) {
+            abort(404);
         }
-        
-        $acticle_type   =   new  ArticleType();
-		$db = new \App\Models\Article;
-		if (!$req->isMethod('post')) {
+
+        $acticle_type = new  ArticleType();
+        $db = new \App\Models\Article;
+        if (!$req->isMethod('post')) {
             $data = $db->getDmsg($id, 1);
-            
-			if (!$data) {
-				return responseToJson($data);
+
+            if (!$data) {
+                return responseToJson($data);
             }
-			$datas = new \App\Models\LotteryMoney();
-        	$arr = $datas->getlist();
-       	    $admin = \App\Model\TypeName::getAllType();
+            $datas = new \App\Models\LotteryMoney();
+            $arr = $datas->getlist();
+            $admin = \App\Model\TypeName::getAllType();
             $selectdata = $acticle_type->type();
-            $_selectdata =   $this->getTree($selectdata);
-            $select =    $data["type"];
-            $child_id   =   $data["child_id"];
+            $_selectdata = $this->getTree($selectdata);
+            $select = $data["type"];
+            $child_id = $data["child_id"];
             //查出优惠活动的子类
-            $show_hui   =   $this->getTree($selectdata,3);
-            $show_hui   =   array_column($show_hui,"id");
-            return view('admin.systemSet/editNotice', ['select'=>intval($select),'data' => $data,'show_hui'=>json_encode($show_hui),/*'admin'=>$admin,*/'list'=>1,'arr'=>$arr['data'],"child_id"=>$child_id,"selectdata"=>$_selectdata]);
-            
-		} else {
-            $data['child_id'] =$req->child_id;
-			$data['title'] = $req->input('title');
-			$data['author'] = $req->input('author');
-			$data['sort'] = $req->input('sort');
-			$data['type'] = $req->input('type');
-			$data['img'] = $req->input('img');
-			$data['typebind'] = $req->input('typebind');
+            $show_hui = $this->getTree($selectdata, 3);
+            $show_hui = array_column($show_hui, "id");
+            return view('admin.systemSet/editNotice', ['select' => intval($select), 'data' => $data, 'show_hui' => json_encode($show_hui),/*'admin'=>$admin,*/
+                'list' => 1, 'arr' => $arr['data'], "child_id" => $child_id, "selectdata" => $_selectdata]);
+
+        } else {
+            $data['child_id'] = $req->child_id;
+            $data['title'] = $req->input('title');
+            $data['author'] = $req->input('author');
+            $data['sort'] = $req->input('sort');
+            $data['type'] = $req->input('type');
+            $data['img'] = $req->input('img');
+            $data['typebind'] = $req->input('typebind');
             $data['mobilecontent'] = $req->mobilecontent;
             $data['mobileimg'] = $req->input('mobileimg');
-			$data['content'] = $req->desc;
-			$res = $db->updateMsg($data, $id);
-			$log = array(
-				session('adminInfo.admin_name'),
-				$data['title']
-			);
-			OperationLog(session('adminInfo.admin_id'), 'edit_game', $log);
-			return responseToJson($res);
-		}
+            $data['content'] = $req->desc;
+            $res = $db->updateMsg($data, $id);
+            $log = array(
+                session('adminInfo.admin_name'),
+                $data['title']
+            );
+            OperationLog(session('adminInfo.admin_id'), 'edit_game', $log);
+            return responseToJson($res);
+        }
     }
 
-	/**
-	 * 批量删除
-	 * [delete description]
-	 * @return [type] [description]
-	 */
-	function __delete(Req $req) {
-		$id = $req->input('id');
-		if (empty($id)) {
-			return responseToJson(-2001); //id������
-		}
-		$ids = explode(',', $id);
-		if (!is_array($ids) && intval($ids) < 0) {
-			return responseToJson(-2002); //id����
-		}
-		if (is_array($ids) && count($ids) > 0) {
-			foreach ($ids as $k => $v) {
-				if (intval($v) < 1) {
-					unset($ids[$k]);
-				}
-			}
-		}
-		$rows = \App\Models\Article::whereIn('id', $ids)->delete();
-		if (!$rows) {
-			return responseToJson(-2003); //id����
-		}
-		return responseToJson(1); //id����
-	}
-
-	function __addNotice(Req $req){
+    /**
+     * 批量删除
+     * [delete description]
+     * @return [type] [description]
+     */
+    function __delete(Req $req)
+    {
+        $id = $req->input('id');
+        if (empty($id)) {
+            return responseToJson(-2001); //id������
+        }
+        $ids = explode(',', $id);
+        if (!is_array($ids) && intval($ids) < 0) {
+            return responseToJson(-2002); //id����
+        }
+        if (is_array($ids) && count($ids) > 0) {
+            foreach ($ids as $k => $v) {
+                if (intval($v) < 1) {
+                    unset($ids[$k]);
+                }
+            }
+        }
+        $rows = \App\Models\Article::whereIn('id', $ids)->delete();
+        if (!$rows) {
+            return responseToJson(-2003); //id����
+        }
+        return responseToJson(1); //id����
+    }
+
+    function __addNotice(Req $req)
+    {
         $acticle_type = new ArticleType();
         if (!$req->isMethod('post')) {
-        	$datas = new \App\Models\LotteryMoney();
-        	$arr = $datas->getlist();
+            $datas = new \App\Models\LotteryMoney();
+            $arr = $datas->getlist();
 
-        //	$admin = \App\Model\TypeName::getAllType();
+            //	$admin = \App\Model\TypeName::getAllType();
             $selectdata = $acticle_type->type();
 
             //查出优惠活动的子类
-            $show_hui   =   $this->getTree($selectdata,3);
-            $show_hui   =   array_column($show_hui,"id");
+            $show_hui = $this->getTree($selectdata, 3);
+            $show_hui = array_column($show_hui, "id");
 
-            return view('admin.systemSet/editNotice',['select'=>0,/*'admin'=>$admin,*/'show_hui'=>json_encode($show_hui),'arr'=>$arr['data'],"child_id"=>0,"selectdata" => $this->getTree($selectdata)]);
-        }else{
+            return view('admin.systemSet/editNotice', ['select' => 0,/*'admin'=>$admin,*/
+                'show_hui' => json_encode($show_hui), 'arr' => $arr['data'], "child_id" => 0, "selectdata" => $this->getTree($selectdata)]);
+        } else {
             $data['title'] = $req->input('title');
             $data['img'] = $req->input('img');
             $data['sort'] = $req->input('sort');
             $data['typebind'] = $req->input('typebind');
             $data['mobilecontent'] = $req->mobilecontent;
             $data['mobileimg'] = $req->input('mobileimg');
-            $data['type'] =$req->type;
-            $data['child_id'] =$req->child_id;
+            $data['type'] = $req->type;
+            $data['child_id'] = $req->child_id;
             $data['content'] = $req->desc;
             $log = array(
                 session('adminInfo.admin_name'),
@@ -266,7 +277,9 @@ class NoticeController extends Controller{
         }
     }
 
-    function __upImg(Req $req){
+    public function upImg(Req $req)
+    {
+
         if (!$req->hasFile('file')) {
             return responseToJson(-5050010022);
         }
@@ -275,17 +288,19 @@ class NoticeController extends Controller{
         if (!$img->isValid()) {
             return responseToJson(-5050010122);
         }
-        if (file_exists(public_path('/home/img') . $img->getClientOriginalName())) {
+
+        if (file_exists(public_path('/home/img/' . date("Ym")) . $img->getClientOriginalName())) {
             return responseToJson(-5050012122);
         }
-        $newPath = public_path('/home/img');
-        $res = $img->move($newPath, $img->getClientOriginalName());
+        $path_now = '/upload/img/' . date("Ym");
+        $newPath = public_path($path_now);
+        $res = $img->move($newPath, $newFileName);
         if ($res) {
             $retarr = array(
                 'code' => 0,
                 'msg' => 'success',
                 'data' => array(
-                    'src' => $res->getPathname(),
+                    'src' => $path_now . '/' . $newFileName,
                     'title' => $img->getClientOriginalName(),
                 )
             );
@@ -314,7 +329,8 @@ class NoticeController extends Controller{
     /**
      * 关闭游戏接口
      */
-    function __activeClose(Req $req) {
+    function __activeClose(Req $req)
+    {
         $status = $req->has('status') ? $req->get('status') : '';
         $active_id = $req->has('id') ? $req->get('id') : '';
 
@@ -335,7 +351,7 @@ class NoticeController extends Controller{
         } else {
             $data['status'] = '0';
         }
-        $res = $lottery->closeGame(["id"=>intval($active_id)],$data );
+        $res = $lottery->closeGame(["id" => intval($active_id)], $data);
         return responseToJson($res);
     }
 }

+ 168 - 1
app/Http/Controllers/Api/WriteSportsController.php

@@ -74,7 +74,7 @@ class WriteSportsController extends BaseController
     //写冠军联赛赔率
     public function setOddsCH(Req $data)
     {
-        $ret = $this->setOddsCH_v1($data);
+        $ret = $this->setOddsCH_v2($data);
         return $ret;
     }
 
@@ -632,6 +632,7 @@ class WriteSportsController extends BaseController
                     }
                 }
             }
+
             //剩余 赛事 数据 写入
             if (!empty($s_match_ids)) {
                 foreach ($matchData as $k => $v) {
@@ -1470,6 +1471,7 @@ class WriteSportsController extends BaseController
     /*
     *写 冠军联赛 赔率 数据
     *每个请求 包含 N个联赛 下 N条赔率 
+    *
     */
     public function setOddsCH_v1($data)
     {
@@ -1623,6 +1625,171 @@ class WriteSportsController extends BaseController
         }
     }
 
+    /*
+    *写 冠军联赛 赔率 数据
+    *每个请求 包含 1个联赛 下 N条赔率 
+    *追加赔率过滤
+    */
+    public function setOddsCH_v2($data)
+    {
+        //验证token
+        $user = new \App\Models\System_user;
+        if (empty($data->token)) return Response::generate('未获取到token', Response::TOKEN_ERR);
+        $token = $user::where(['token' => $data->token])->value('token');
+        if (empty($token)) return Response::generate('token验证不通过', Response::TOKEN_ERR);
+        try {
+            //开启事务
+            DB::beginTransaction();
+            $obt = $data->data;
+
+            //请求 数据 为空
+            if (empty($obt)) throw new \Exception(Response::generate('请求数据为空,', Response::ABNORMAL));
+            $getData = $this->getAddData($obt);
+            //不是 冠军 赔率 数据
+            if ($getData['title'] != 'odds_ch') throw new \Exception(Response::generate('不是冠军赔率数据,', Response::ABNORMAL));
+
+            /*
+            //写请求数据 日志记录
+            if($this->isRecord){
+                $setSportsRecord = St_set_sports_recordModel::setSportsRecord($getData['title'],$obt,$getData);
+                if($setSportsRecord < 1) throw new \Exception(Response::generate('',Response::SPORTS_RECORD_ERR));    
+            }
+            */
+
+            //获取球类代码
+            $game_code = $getData['game_code'];
+            //获取数据源
+            $source = $getData['source'];
+            //获取球类名称
+            $gameName = gameModel::getGameName($game_code);
+            //获取数据源联赛ID
+            $s_lg_id = $getData['lg_id'];
+            //获取源数据联赛UUID
+             $uuid = $getData['uuid'];
+            //获取 model
+            $models = commonFunction::getModels($game_code, 1);
+
+            //获取 赔率数据
+            $oddsData = $getData['data'];
+
+            //验证本次请求所属联赛/赛事是否存在 返回本地联赛/赛事ID 
+            $lg_id = $this->leagueVerify($models, $uuid, $source, $gameName);
+
+           //===追加处理赔率过滤===
+            //获取当前联赛 在本地的所有赔率
+            $l_odds_data = $models['model_odds']::select('odds_only')->where(['lg_id' => $lg_id,'type' => 1])->get()->toArray();
+            //获取请求待写入数据
+            $setOddsData = [];
+            //获取本地待删除数据
+            $delOddsData = [];
+            //本地没有该赛事赔率,则直接全部写入
+            if (empty($l_odds_data)) {
+                $setOddsData = $oddsData;
+            } //本地有该赛事赔率,则分别获取需写入/删除的数据
+            else {
+                $newodds_t = $this->ArrayKeySet($oddsData, 'odds_only');
+                $oldodds_t = $this->ArrayKeySet($l_odds_data, 'odds_only');
+                foreach ($newodds_t as $key => $val) {
+                    if (isset($oldodds_t[$key])) {
+                        unset($newodds_t[$key]);
+                        unset($oldodds_t[$key]);
+                    }
+                }
+                $oddsData = $newodds_t;
+                $l_odds_data = $oldodds_t;
+
+                sort($oddsData);
+                sort($l_odds_data);
+                //需写入请求数据
+                $setOddsData = $oddsData;
+                //需删除本地数据
+                $delOddsData = $l_odds_data;
+            }
+            //===end===
+
+            //删除本地不在请求中的数据
+            if (!empty($delOddsData)) {
+                //所有需删除数据odds_only
+                $odds_onlys = [];
+                foreach ($delOddsData as $k => $v) {
+                    $odds_onlys[] = $v['odds_only'];
+                }
+
+                $del = $models['model_odds']::whereIn('odds_only', $odds_onlys)->delete();
+                if ($del != count($odds_onlys)) throw new \Exception(Response::generate($gameName, Response::DEL_ODDS_ERR));
+            }
+
+            //写入请求中本地不存在的数据
+            if (!empty($setOddsData)) {
+                foreach ($setOddsData as $k => $v) {
+                    //组装赔率记录数据
+                    $set_odds_r[] = [
+                        'match_id' => 0,
+                        'others_match_id' => $v['match_id'] ?: 0,
+                        'odds_code' => $v['odds_code'] ?: '',
+                        'status' => $v['status'] ?: 0,
+                        'sort' => $v['sort'] ?: 0,
+                        'p_code' => $v['p_code'] ?: '',
+                        'odds' => $v['odds'] ?: 0,
+                        'condition' => $v['condition'],
+                        'odds_only' => $v['odds_only'] ?: '',
+                        'source' => $v['source'] ?: '',
+                        'type' => $v['type'] ?: 1,
+                        'team' => $v['team'] ?: '',
+                        'lg_id' => $lg_id,
+                        'others_lg_id' => $v['lg_id'],
+                        'ctime' => date('Y-m-d H:i:s'),
+                        'utime' => date('Y-m-d H:i:s'),
+                    ];
+                }
+
+                foreach ($oddsData as $k => $v) {
+                    //组装赔率数据
+                    $set_odds[] = [
+                        'match_id' => 0,
+                        'others_match_id' => $v['match_id'] ?: 0,
+                        'odds_code' => $v['odds_code'] ?: '',
+                        'status' => $v['status'] ?: 0,
+                        'sort' => $v['sort'] ?: 0,
+                        'p_code' => $v['p_code'] ?: '',
+                        'odds' => $v['odds'] ?: 0,
+                        'condition' => $v['condition'],
+                        'odds_only' => $v['odds_only'] ?: '',
+                        'source' => $v['source'] ?: '',
+                        'type' => $v['type'] ?: 1,
+                        'team' => $v['team'] ?: '',
+                        'lg_id' => $lg_id,
+                        'others_lg_id' => $v['lg_id'],
+                        'ctime' => date('Y-m-d H:i:s'),
+                        'utime' => date('Y-m-d H:i:s'),
+                        'sole' => $v['sole'],
+                        'expire_time' => date('Y-m-d H:i:s', time() + 60)
+                    ];
+                }
+
+                //写赔率记录数据
+                $ret = $models['model_odds_record']::insert($set_odds_r);
+                if ($ret != true) throw new \Exception(Response::generate($gameName . '赔率记录;', Response::ADD_ODDS_R_ERROR));
+                //写赔率 数据
+                $ret = $models['model_odds']::insert($set_odds);
+                if ($ret != true) throw new \Exception(Response::generate($gameName . '赔率;', Response::ADD_ODDS_ERROR));
+            }
+
+            //提交事务
+            DB::commit();
+            //写请求数据 日志记录
+            if ($this->isRecord) commonFunction::SET_SPORTS_RECORD($game_code, $getData, $getData['title'], Response::success());
+            return Response::success();
+        } catch (\Exception $e) {
+            //回滚事务
+            DB::rollBack();
+            //写请求数据 日志记录
+            if ($this->isRecord) commonFunction::SET_SPORTS_RECORD($game_code, $getData, $getData['title'], $e->getMessage());
+            return $e->getMessage();
+        }
+    }
+
+
     /*
     * 写入直播 数据
     */

+ 1 - 0
app/Http/Middleware/VerifyCsrfToken.php

@@ -22,6 +22,7 @@ class VerifyCsrfToken extends Middleware
         'setMatchResult',
         'setBroadCast',
         'getArea',
+        //'upImg',
         //
     ];
 }

Файловите разлики са ограничени, защото са твърде много
+ 1 - 0
public/frame/layui254/css/layui.css


Файловите разлики са ограничени, защото са твърде много
+ 1 - 0
public/frame/layui254/css/layui.mobile.css


+ 2 - 0
public/frame/layui254/css/modules/code.css

@@ -0,0 +1,2 @@
+/** layui-v2.5.4 MIT License By https://www.layui.com */
+ html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none}

Файловите разлики са ограничени, защото са твърде много
+ 1 - 0
public/frame/layui254/css/modules/laydate/default/laydate.css


BIN
public/frame/layui254/css/modules/layer/default/icon-ext.png


BIN
public/frame/layui254/css/modules/layer/default/icon.png


Файловите разлики са ограничени, защото са твърде много
+ 1 - 0
public/frame/layui254/css/modules/layer/default/layer.css


BIN
public/frame/layui254/css/modules/layer/default/loading-0.gif


BIN
public/frame/layui254/css/modules/layer/default/loading-1.gif


BIN
public/frame/layui254/css/modules/layer/default/loading-2.gif


BIN
public/frame/layui254/font/iconfont.eot


Файловите разлики са ограничени, защото са твърде много
+ 25 - 0
public/frame/layui254/font/iconfont.svg


BIN
public/frame/layui254/font/iconfont.ttf


BIN
public/frame/layui254/font/iconfont.woff


BIN
public/frame/layui254/font/iconfont.woff2


BIN
public/frame/layui254/images/face/0.gif


BIN
public/frame/layui254/images/face/1.gif


BIN
public/frame/layui254/images/face/10.gif


BIN
public/frame/layui254/images/face/11.gif


BIN
public/frame/layui254/images/face/12.gif


BIN
public/frame/layui254/images/face/13.gif


BIN
public/frame/layui254/images/face/14.gif


BIN
public/frame/layui254/images/face/15.gif


BIN
public/frame/layui254/images/face/16.gif


BIN
public/frame/layui254/images/face/17.gif


BIN
public/frame/layui254/images/face/18.gif


BIN
public/frame/layui254/images/face/19.gif


BIN
public/frame/layui254/images/face/2.gif


BIN
public/frame/layui254/images/face/20.gif


BIN
public/frame/layui254/images/face/21.gif


BIN
public/frame/layui254/images/face/22.gif


BIN
public/frame/layui254/images/face/23.gif


BIN
public/frame/layui254/images/face/24.gif


BIN
public/frame/layui254/images/face/25.gif


BIN
public/frame/layui254/images/face/26.gif


BIN
public/frame/layui254/images/face/27.gif


BIN
public/frame/layui254/images/face/28.gif


BIN
public/frame/layui254/images/face/29.gif


BIN
public/frame/layui254/images/face/3.gif


BIN
public/frame/layui254/images/face/30.gif


BIN
public/frame/layui254/images/face/31.gif


BIN
public/frame/layui254/images/face/32.gif


BIN
public/frame/layui254/images/face/33.gif


BIN
public/frame/layui254/images/face/34.gif


BIN
public/frame/layui254/images/face/35.gif


BIN
public/frame/layui254/images/face/36.gif


BIN
public/frame/layui254/images/face/37.gif


BIN
public/frame/layui254/images/face/38.gif


BIN
public/frame/layui254/images/face/39.gif


BIN
public/frame/layui254/images/face/4.gif


BIN
public/frame/layui254/images/face/40.gif


BIN
public/frame/layui254/images/face/41.gif


BIN
public/frame/layui254/images/face/42.gif


BIN
public/frame/layui254/images/face/43.gif


BIN
public/frame/layui254/images/face/44.gif


BIN
public/frame/layui254/images/face/45.gif


BIN
public/frame/layui254/images/face/46.gif


BIN
public/frame/layui254/images/face/47.gif


BIN
public/frame/layui254/images/face/48.gif


BIN
public/frame/layui254/images/face/49.gif


BIN
public/frame/layui254/images/face/5.gif


BIN
public/frame/layui254/images/face/50.gif


BIN
public/frame/layui254/images/face/51.gif


BIN
public/frame/layui254/images/face/52.gif


BIN
public/frame/layui254/images/face/53.gif


BIN
public/frame/layui254/images/face/54.gif


BIN
public/frame/layui254/images/face/55.gif


BIN
public/frame/layui254/images/face/56.gif


BIN
public/frame/layui254/images/face/57.gif


BIN
public/frame/layui254/images/face/58.gif


BIN
public/frame/layui254/images/face/59.gif


BIN
public/frame/layui254/images/face/6.gif


BIN
public/frame/layui254/images/face/60.gif


BIN
public/frame/layui254/images/face/61.gif


BIN
public/frame/layui254/images/face/62.gif


BIN
public/frame/layui254/images/face/63.gif


BIN
public/frame/layui254/images/face/64.gif


BIN
public/frame/layui254/images/face/65.gif


BIN
public/frame/layui254/images/face/66.gif


BIN
public/frame/layui254/images/face/67.gif


BIN
public/frame/layui254/images/face/68.gif


BIN
public/frame/layui254/images/face/69.gif


BIN
public/frame/layui254/images/face/7.gif


BIN
public/frame/layui254/images/face/70.gif


BIN
public/frame/layui254/images/face/71.gif


BIN
public/frame/layui254/images/face/8.gif


BIN
public/frame/layui254/images/face/9.gif


Файловите разлики са ограничени, защото са твърде много
+ 1 - 0
public/frame/layui254/lay/modules/carousel.js


+ 2 - 0
public/frame/layui254/lay/modules/code.js

@@ -0,0 +1,2 @@
+/** layui-v2.5.4 MIT License By https://www.layui.com */
+ ;layui.define("jquery",function(e){"use strict";var a=layui.$,l="http://www.layui.com/doc/modules/code.html";e("code",function(e){var t=[];e=e||{},e.elem=a(e.elem||".layui-code"),e.about=!("about"in e)||e.about,e.elem.each(function(){t.push(this)}),layui.each(t.reverse(),function(t,i){var c=a(i),o=c.html();(c.attr("lay-encode")||e.encode)&&(o=o.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#39;").replace(/"/g,"&quot;")),c.html('<ol class="layui-code-ol"><li>'+o.replace(/[\r\t\n]+/g,"</li><li>")+"</li></ol>"),c.find(">.layui-code-h3")[0]||c.prepend('<h3 class="layui-code-h3">'+(c.attr("lay-title")||e.title||"code")+(e.about?'<a href="'+l+'" target="_blank">layui.code</a>':"")+"</h3>");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss");

Файловите разлики са ограничени, защото са твърде много
+ 1 - 0
public/frame/layui254/lay/modules/colorpicker.js


Файловите разлики са ограничени, защото са твърде много
+ 1 - 0
public/frame/layui254/lay/modules/element.js


+ 2 - 0
public/frame/layui254/lay/modules/flow.js

@@ -0,0 +1,2 @@
+/** layui-v2.5.4 MIT License By https://www.layui.com */
+ ;layui.define("jquery",function(e){"use strict";var l=layui.$,o=function(e){},t='<i class="layui-anim layui-anim-rotate layui-anim-loop layui-icon ">&#xe63e;</i>';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var f=l(e.elem);if(f[0]){var m=l(e.scrollElem||document),u=e.mb||50,s=!("isAuto"in e)||e.isAuto,v=e.end||"没有更多了",y=e.scrollElem&&e.scrollElem!==document,d="<cite>加载更多</cite>",h=l('<div class="layui-flow-more"><a href="javascript:;">'+d+"</a></div>");f.find(".layui-flow-more")[0]||f.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(v):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(m.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),i||(r=setTimeout(function(){var i=y?e.height():l(window).height(),n=y?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=u&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var m=e.attr("lay-src");layui.img(m,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",m).removeAttr("lay-src"),l[0]&&f(l),i++})}},f=function(e,o){var f=a?(o||n).height():l(window).height(),m=n.scrollTop(),u=m+f;if(t.lazyimg.elem=l(r),e)c(e,f);else for(var s=0;s<t.lazyimg.elem.length;s++){var v=t.lazyimg.elem.eq(s),y=a?function(){return v.offset().top-n.offset().top+m}():v.offset().top;if(c(v,f),i=s,y>u)break}};if(f(),!o){var m;n.on("scroll",function(){var e=l(this);m&&clearTimeout(m),m=setTimeout(function(){f(null,e)},50)}),o=!0}return f},e("flow",new o)});

Файловите разлики са ограничени, защото са твърде много
+ 1 - 0
public/frame/layui254/lay/modules/form.js


Файловите разлики са ограничени, защото са твърде много
+ 1 - 0
public/frame/layui254/lay/modules/jquery.js


Файловите разлики са ограничени, защото са твърде много
+ 1 - 0
public/frame/layui254/lay/modules/laydate.js


Файловите разлики са ограничени, защото са твърде много
+ 1 - 0
public/frame/layui254/lay/modules/layedit.js


Някои файлове не бяха показани, защото твърде много файлове са промени