|
|
@@ -38,6 +38,7 @@ class NoticeController extends Controller{
|
|
|
$arr[] = 'edit';
|
|
|
}
|
|
|
$dt->setToolBar($arr, array('width' => 140));
|
|
|
+
|
|
|
return view('admin.systemSet/arictle', $dt->render($request));
|
|
|
}
|
|
|
|
|
|
@@ -46,29 +47,39 @@ class NoticeController extends Controller{
|
|
|
}
|
|
|
|
|
|
function Edit(Req $req){
|
|
|
+
|
|
|
+ dd(1231);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ function __Edit(Req $req){
|
|
|
$id = $req->id;
|
|
|
// $id=Request::has('id')?Request::get('id'):'';
|
|
|
if (intval($id) < 1) {
|
|
|
abort(404);
|
|
|
- }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
$acticle_type = new ArticleType();
|
|
|
$db = new \App\Models\Article;
|
|
|
if (!$req->isMethod('post')) {
|
|
|
- $data = $db->getDmsg($id, 1);
|
|
|
+ $data = $db->getDmsg($id, 1);
|
|
|
+
|
|
|
if (!$data) {
|
|
|
return responseToJson($data);
|
|
|
- }
|
|
|
+ }
|
|
|
$datas = new \App\Models\LotteryMoney();
|
|
|
$arr = $datas->getlist();
|
|
|
-// $admin = \App\Model\TypeName::getAllType();
|
|
|
- $selectdata = $acticle_type->type();
|
|
|
+ $admin = \App\Model\TypeName::getAllType();
|
|
|
+ $selectdata = $acticle_type->type();
|
|
|
$_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]);
|
|
|
+ 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');
|
|
|
@@ -95,7 +106,7 @@ class NoticeController extends Controller{
|
|
|
* [delete description]
|
|
|
* @return [type] [description]
|
|
|
*/
|
|
|
- function delete(Req $req) {
|
|
|
+ function __delete(Req $req) {
|
|
|
$id = $req->input('id');
|
|
|
if (empty($id)) {
|
|
|
return responseToJson(-2001); //id������
|
|
|
@@ -118,7 +129,7 @@ class NoticeController extends Controller{
|
|
|
return responseToJson(1); //id����
|
|
|
}
|
|
|
|
|
|
- function addNotice(Req $req){
|
|
|
+ function __addNotice(Req $req){
|
|
|
$acticle_type = new ArticleType();
|
|
|
if (!$req->isMethod('post')) {
|
|
|
$datas = new \App\Models\LotteryMoney();
|
|
|
@@ -158,7 +169,7 @@ class NoticeController extends Controller{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- function upImg(Req $req){
|
|
|
+ function __upImg(Req $req){
|
|
|
if (!$req->hasFile('file')) {
|
|
|
return responseToJson(-5050010022);
|
|
|
}
|
|
|
@@ -187,7 +198,7 @@ class NoticeController extends Controller{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private function getTree($array, $pid = 0, $cen = 0)
|
|
|
+ private function __getTree($array, $pid = 0, $cen = 0)
|
|
|
{
|
|
|
$arr = array();
|
|
|
$cen = ++$cen;
|
|
|
@@ -206,7 +217,7 @@ 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') : '';
|
|
|
|
|
|
@@ -230,7 +241,6 @@ class NoticeController extends Controller{
|
|
|
$res = $lottery->closeGame(["id"=>intval($active_id)],$data );
|
|
|
return responseToJson($res);
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
?>
|