diff --git a/application/admin/view/content/index.html b/application/admin/view/content/index.html
index 4c3c58b2..c7650b14 100644
--- a/application/admin/view/content/index.html
+++ b/application/admin/view/content/index.html
@@ -66,20 +66,20 @@
{if isset($item['is_top'])}
{if $item['is_top']}
- 取消置顶
+ 取消置顶
{else/}
- 置顶
+ 置顶
{/if}
{/if}
{if isset($item['status'])}
{if $item['status']}
- 取消审核
+ 取消审核
{else/}
- 审核
+ 审核
{/if}
{/if}
- 编辑
- 删除
+ 编辑
+ 删除
|
{/volist}
diff --git a/application/common/behavior/InitHook.php b/application/common/behavior/InitHook.php
index f9a08e5a..83a89da9 100644
--- a/application/common/behavior/InitHook.php
+++ b/application/common/behavior/InitHook.php
@@ -72,7 +72,7 @@ class InitHook {
$route["user/" . $value['name'] . "/del"] = "user/content/del?model_id=" . $value['id'];
$route["user/" . $value['name'] . "/status"] = "user/content/status?model_id=" . $value['id'];
}
- $route["list/:id"] = "index/content/category";
+ $route["list/:id"] = "index/content/category";
\think\Route::rule($route);
}
}
\ No newline at end of file
diff --git a/application/common/controller/Upload.php b/application/common/controller/Upload.php
index 65461c51..b59e0fc2 100644
--- a/application/common/controller/Upload.php
+++ b/application/common/controller/Upload.php
@@ -61,17 +61,30 @@ class Upload {
}
public function editor() {
+ $callback = request()->get('callback');
$file = request()->file('upfile');
$info = $file->move(config('editor_upload.rootPath'), true, false);
if ($info) {
- $data = $this->parseFile($info);
- $data['success'] = true;
- $data['file_path'] = $data['url'];
+ $fileInfo = $this->parseFile($info);
+ $data = array(
+ "originalName" => $fileInfo['name'],
+ "name" => $fileInfo['name'],
+ "url" => $fileInfo['url'],
+ "size" => $fileInfo['size'],
+ "type" => $fileInfo['ext'],
+ "state" => 'SUCCESS'
+ );
} else {
- $data['success'] = false;
- $data['msg'] = "error message";
+ $data['state'] = $file->getError();
+ }
+ /**
+ * 返回数据
+ */
+ if($callback) {
+ return '';
+ } else {
+ return json_encode($data);
}
- return $data;
}
public function delete() {
diff --git a/application/index/controller/Index.php b/application/index/controller/Index.php
index 4e31ff48..d8e9614a 100644
--- a/application/index/controller/Index.php
+++ b/application/index/controller/Index.php
@@ -10,10 +10,10 @@
namespace app\index\controller;
use app\common\controller\Fornt;
-class Index extends Fornt{
+class Index extends Fornt {
//网站首页
- public function index(){
+ public function index() {
//设置SEO
$this->setSeo(config('web_site_title'), config('web_site_keyword'), config('web_site_description'));
return $this->fetch();
diff --git a/application/route.php b/application/route.php
index 1cc787f5..b856abe3 100644
--- a/application/route.php
+++ b/application/route.php
@@ -8,34 +8,30 @@
// +----------------------------------------------------------------------
return array(
- '__pattern__' => array(
+ '__pattern__' => array(
'name' => '\w+',
),
- '/' => 'index/index/index', // 首页访问路由
- 'search' => 'index/search/index', // 首页访问路由
+ '/' => 'index/index/index', // 首页访问路由
+ 'search' => 'index/search/index', // 首页访问路由
- 'cart/index' => 'index/cart/index',
- 'cart/add' => 'index/cart/add',
- 'cart/count' => 'index/cart/count',
+ 'cart/index' => 'index/cart/index',
+ 'cart/add' => 'index/cart/add',
+ 'cart/count' => 'index/cart/count',
- 'login' => 'user/login/index',
- 'register' => 'user/login/register',
- 'logout' => 'user/login/logout',
- 'uc' => 'user/index/index',
+ 'login' => 'user/login/index',
+ 'register' => 'user/login/register',
+ 'logout' => 'user/login/logout',
+ 'uc' => 'user/index/index',
- 'order/index' => 'user/order/index',
- 'order/list' => 'user/order/lists',
+ 'order/index' => 'user/order/index',
+ 'order/list' => 'user/order/lists',
- 'admin/login' => 'admin/index/login',
- 'admin/logout' => 'admin/index/logout',
+ 'admin/login' => 'admin/index/login',
+ 'admin/logout' => 'admin/index/logout',
// 变量传入index模块的控制器和操作方法
- 'addons/:mc/:ac' => 'index/addons/execute', // 静态地址和动态地址结合
- 'usera/:mc/:ac' => 'user/addons/execute', // 静态地址和动态地址结合
- 'admina/:mc/:ac' => 'admin/addons/execute', // 静态地址和动态地址结合
-
- 'book/list' => 'index/book/index',
- 'book/search' => 'index/book/search',
- 'book/detail/:id' => 'index/book/detail',
+ 'addons/:mc/:ac' => 'index/addons/execute', // 静态地址和动态地址结合
+ 'usera/:mc/:ac' => 'user/addons/execute', // 静态地址和动态地址结合
+ 'admina/:mc/:ac' => 'admin/addons/execute', // 静态地址和动态地址结合
);
\ No newline at end of file
diff --git a/public/plugs/umeditor/umeditor.config.js b/public/plugs/umeditor/umeditor.config.js
index ee3fd426..0af4b837 100644
--- a/public/plugs/umeditor/umeditor.config.js
+++ b/public/plugs/umeditor/umeditor.config.js
@@ -137,7 +137,7 @@
//图片上传配置区
,imageUrl: "imageUp.php" //图片上传提交地址
- ,imagePath: "php/" //图片修正地址,引用了fixedImagePath,如有特殊需求,可自行配置
+ ,imagePath: "" //图片修正地址,引用了fixedImagePath,如有特殊需求,可自行配置
,imageFieldName: "upfile" //图片数据的key,若此处修改,需要在后台对应文件修改对应参数