荣誉完成
This commit is contained in:
1 parent
8e8f1142f8
commit
a7f612eba6
9 files changed
+111
-93
No files matched your search
@@ -23,10 +23,10 @@ class Jiaoshi extends BaseController
|
||||
$list['dataurl'] = 'jiaoshi/data';
|
||||
|
||||
// 模板赋值
|
||||
$this->assign('list',$list);
|
||||
$this->view->assign('list',$list);
|
||||
|
||||
// 渲染模板
|
||||
return $this->fetch();
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -90,9 +90,9 @@ class Jiaoshi extends BaseController
|
||||
);
|
||||
|
||||
// 模板赋值
|
||||
$this->assign('list',$list);
|
||||
$this->view->assign('list',$list);
|
||||
// 渲染
|
||||
return $this->fetch('create');
|
||||
return $this->view->fetch('create');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -157,13 +157,13 @@ class Jiaoshi extends BaseController
|
||||
'webtitle'=>'编辑荣誉册',
|
||||
'butname'=>'修改',
|
||||
'formpost'=>'PUT',
|
||||
'url'=>'/jiaoshi/update/'.$id,
|
||||
'url'=>'/rongyu/jiaoshi/update/'.$id,
|
||||
);
|
||||
|
||||
// 模板赋值
|
||||
$this->assign('list',$list);
|
||||
$this->view->assign('list',$list);
|
||||
// 渲染
|
||||
return $this->fetch('create');
|
||||
return $this->view->fetch('create');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -25,12 +25,13 @@ class JsRongyuInfo extends BaseController
|
||||
// 设置要给模板赋值的信息
|
||||
$list['webtitle'] = '荣誉列表';
|
||||
$list['dataurl'] = 'jsryinfo/data';
|
||||
$list['status'] = 'jsryinfo/status';
|
||||
|
||||
// 模板赋值
|
||||
$this->assign('list',$list);
|
||||
$this->view->assign('list',$list);
|
||||
|
||||
// 渲染模板
|
||||
return $this->fetch();
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -45,12 +46,14 @@ class JsRongyuInfo extends BaseController
|
||||
// 设置要给模板赋值的信息
|
||||
$list['webtitle'] = $ry->where('id',$rongyuce)->value('title') . ' 荣誉';
|
||||
$list['rongyuce'] = $rongyuce;
|
||||
$list['dataurl'] = '/rongyu/jsryinfo/data';
|
||||
$list['status'] = '/rongyu/jsryinfo/status';
|
||||
|
||||
// 模板赋值
|
||||
$this->assign('list',$list);
|
||||
$this->view->assign('list',$list);
|
||||
|
||||
// 渲染模板
|
||||
return $this->fetch();
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
|
||||
@@ -114,14 +117,16 @@ class JsRongyuInfo extends BaseController
|
||||
'webtitle'=>'添加荣誉',
|
||||
'butname'=>'添加',
|
||||
'formpost'=>'POST',
|
||||
'url'=>'save',
|
||||
'url'=>'/rongyu/jsryinfo/save',
|
||||
'rongyuce'=>$rongyuce
|
||||
);
|
||||
|
||||
dump($list);
|
||||
|
||||
// 模板赋值
|
||||
$this->assign('list',$list);
|
||||
$this->view->assign('list',$list);
|
||||
// 渲染
|
||||
return $this->fetch('create');
|
||||
return $this->view->fetch('create');
|
||||
}
|
||||
|
||||
/**留备用
|
||||
@@ -205,13 +210,13 @@ class JsRongyuInfo extends BaseController
|
||||
'webtitle'=>'批量上传教师荣誉册图片',
|
||||
'butname'=>'批传',
|
||||
'formpost'=>'POST',
|
||||
'url'=>'/jsryinfoaddall/'.$rongyuce,
|
||||
'url'=>'saveall/'.$rongyuce,
|
||||
);
|
||||
|
||||
// 模板赋值
|
||||
$this->assign('list',$list);
|
||||
$this->view->assign('list',$list);
|
||||
// 渲染
|
||||
return $this->fetch();
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
// 保存批传
|
||||
@@ -224,7 +229,7 @@ class JsRongyuInfo extends BaseController
|
||||
// 获取表单上传文件
|
||||
$file = request()->file('file');
|
||||
// 上传文件并返回结果
|
||||
$data = upload($list,$file);
|
||||
$data = saveFileInfo($file,$list,false);
|
||||
|
||||
if($data['val'] != 1)
|
||||
{
|
||||
@@ -244,25 +249,25 @@ class JsRongyuInfo extends BaseController
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 上传荣誉图片并保存
|
||||
*
|
||||
* @param \think\Request $request
|
||||
* @return \think\Response
|
||||
*/
|
||||
public function upload()
|
||||
{
|
||||
// 获取文件信息
|
||||
$list['text'] = $this->request->post('text');
|
||||
$list['serurl'] = $this->request->post('serurl');
|
||||
// /**
|
||||
// * 上传荣誉图片并保存
|
||||
// *
|
||||
// * @param \think\Request $request
|
||||
// * @return \think\Response
|
||||
// */
|
||||
// public function upload()
|
||||
// {
|
||||
// // 获取文件信息
|
||||
// $list['text'] = $this->request->post('text');
|
||||
// $list['serurl'] = $this->request->post('serurl');
|
||||
|
||||
// 获取表单上传文件
|
||||
$file = request()->file('file');
|
||||
// 上传文件并返回结果
|
||||
$data = upload($list,$file);
|
||||
// // 获取表单上传文件
|
||||
// $file = request()->file('file');
|
||||
// // 上传文件并返回结果
|
||||
// $data = upload($list,$file);
|
||||
|
||||
return json($data);
|
||||
}
|
||||
// return json($data);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 荣誉册中荣誉信息列表
|
||||
@@ -310,14 +315,14 @@ class JsRongyuInfo extends BaseController
|
||||
'webtitle'=>'编辑荣誉',
|
||||
'butname'=>'修改',
|
||||
'formpost'=>'PUT',
|
||||
'url'=>'/jsryinfo/update/'.$id,
|
||||
'url'=>'/rongyu/jsryinfo/update/'.$id,
|
||||
'rongyuce'=>$id
|
||||
);
|
||||
|
||||
// 模板赋值
|
||||
$this->assign('list',$list);
|
||||
$this->view->assign('list',$list);
|
||||
// 渲染
|
||||
return $this->fetch('create');
|
||||
return $this->view->fetch('create');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -56,19 +56,25 @@ Route::group('jiaoshi', function () {
|
||||
Route::rule('update/<id>','Jiaoshi/update','put'); # 更新信息
|
||||
Route::rule('delete/<id>','Jiaoshi/delete','delete'); # 删除信息
|
||||
Route::rule('status','Jiaoshi/setStatus','post'); # 删除信息
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
// 教师荣誉信息
|
||||
Route::group('jsryinfo', function () {
|
||||
Route::rule('','jsryinfo/index','get'); # 信息列表
|
||||
Route::rule('data','jsryinfo/ajaxdata','post'); # 获取数据
|
||||
Route::rule('create','jsryinfo/create','get'); # 添加信息
|
||||
Route::rule('save','jsryinfo/save','post'); # 保存信息
|
||||
// Route::rule('read/<id>','jsryinfo/read','get'); # 读取信息
|
||||
Route::rule('edit/<id>','jsryinfo/edit','get'); # 修改信息
|
||||
Route::rule('update/<id>','jsryinfo/update','put'); # 更新信息
|
||||
Route::rule('delete/<id>','jsryinfo/delete','delete'); # 删除信息
|
||||
Route::rule('status','jsryinfo/setStatus','post'); # 删除信息
|
||||
Route::rule('','JsRongyuInfo/index','get'); # 信息列表
|
||||
Route::rule('data','JsRongyuInfo/ajaxdata','post'); # 获取数据
|
||||
Route::rule('create/<rongyuce>','JsRongyuInfo/create','get'); # 添加信息
|
||||
Route::rule('save','JsRongyuInfo/save','post'); # 保存信息
|
||||
// Route::rule('read/<id>','JsRongyuInfo/read','get'); # 读取信息
|
||||
Route::rule('edit/<id>','JsRongyuInfo/edit','get'); # 修改信息
|
||||
Route::rule('update/<id>','JsRongyuInfo/update','put'); # 更新信息
|
||||
Route::rule('delete/<id>','JsRongyuInfo/delete','delete'); # 删除信息
|
||||
Route::rule('status','JsRongyuInfo/setStatus','post'); # 删除信息
|
||||
Route::rule('createall/<rongyuce>','JsRongyuInfo/createAll','get'); # 批量导入
|
||||
Route::rule('saveall','JsRongyuInfo/saveAll','post'); # 批量保存
|
||||
Route::rule('list/<rongyuce>','JsRongyuInfo/rongyuList','get'); # 批量保存
|
||||
|
||||
|
||||
});
|
||||
Loaded 3 of 9 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user