权限开发,页面交互开发,增加阅读数
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
package com.zyplayer.doc.manage.web.generator;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2018-12-05
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/auth-info")
|
||||
public class GeneratorAuthInfoController {
|
||||
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.zyplayer.doc.manage.web.generator;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2018-12-05
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/user-auth")
|
||||
public class GeneratorUserAuthController {
|
||||
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.zyplayer.doc.manage.web.generator;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2018-12-05
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/user-info")
|
||||
public class GeneratorUserInfoController {
|
||||
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.zyplayer.doc.manage.web.generator;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2018-12-05
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/zyplayer-storage")
|
||||
public class GeneratorZyplayerStorageController {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.zyplayer.doc.manage.web.manage;
|
||||
|
||||
import com.zyplayer.doc.data.aspect.AuthMan;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
/**
|
||||
* 使用路劲的方式访问页面
|
||||
*/
|
||||
@AuthMan
|
||||
@Controller
|
||||
public class DocSystemController {
|
||||
|
||||
@GetMapping("/doc-wiki")
|
||||
public ModelAndView wiki() {
|
||||
return new ModelAndView("/doc-wiki-v2.html");
|
||||
}
|
||||
|
||||
@GetMapping("/doc-db")
|
||||
public ModelAndView db() {
|
||||
return new ModelAndView("/doc-db.html");
|
||||
}
|
||||
|
||||
@GetMapping("/doc-swagger")
|
||||
public ModelAndView swagger() {
|
||||
return new ModelAndView("/document.html");
|
||||
}
|
||||
|
||||
@GetMapping("/doc-dubbo")
|
||||
public ModelAndView dubbo() {
|
||||
return new ModelAndView("/doc-dubbo.html");
|
||||
}
|
||||
}
|
||||
@@ -72,6 +72,11 @@ public class LoginController {
|
||||
cookie.setDomain("zyplayer.com");
|
||||
cookie.setMaxAge(60 * 60 * 24);
|
||||
response.addCookie(cookie);
|
||||
// 再搞一份当前路劲的cookie
|
||||
cookie = new Cookie("accessToken", accessToken);
|
||||
cookie.setPath("/");
|
||||
cookie.setMaxAge(60 * 60 * 24);
|
||||
response.addCookie(cookie);
|
||||
return DocResponseJson.ok();
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,21 @@
|
||||
-- 直接存权限名,不搞中间表了
|
||||
ALTER TABLE `user_auth` ADD COLUMN `auth_custom_suffix` varchar(100) NULL COMMENT '自定义权限结尾';
|
||||
|
||||
INSERT INTO `auth_info`(`auth_name`, `auth_desc`, `can_edit`, `create_uid`, `creation_time`)
|
||||
VALUES
|
||||
( 'WIKI_CREATE_PAGE_', '创建wiki文档', 0, 1, '2019-06-04 13:01:20')
|
||||
,('WIKI_EDIT_PAGE_', '编辑wiki文档', 0, 1, '2019-06-04 13:01:20')
|
||||
,('WIKI_COMMENT_PAGE_', '评论wiki文档', 0, 1, '2019-06-04 13:01:20')
|
||||
,('WIKI_DELETE_PAGE_', '删除wiki文档', 0, 1, '2019-06-04 13:01:20')
|
||||
,('WIKI_PAGE_FILE_UPLOAD_', '上传wiki文档附件', 0, 1, '2019-06-04 13:01:20')
|
||||
,('WIKI_PAGE_FILE_DELETE_', '删除wiki文档附件', 0, 1, '2019-06-04 13:01:20')
|
||||
,('WIKI_PAGE_AUTH_MANAGE_', 'wiki权限管理', 0, 1, '2019-06-04 13:01:20')
|
||||
;
|
||||
|
||||
ALTER TABLE `wiki_page` ADD COLUMN `view_num` int NOT NULL DEFAULT 0 COMMENT '阅读数';
|
||||
|
||||
|
||||
|
||||
|
||||
-- 权限的库:
|
||||
|
||||
|
||||
Binary file not shown.
@@ -74,16 +74,22 @@
|
||||
app.passwordError = "密码不能为空";
|
||||
return;
|
||||
}
|
||||
post(ctx + "login", param, function (result) {
|
||||
console.log(result);
|
||||
if (result.errCode == 200) {
|
||||
location.href = ctx + "static/manage/home.html";
|
||||
} else {
|
||||
app.passwordError = "登录失败," + result.errMsg;
|
||||
}
|
||||
}, function(){
|
||||
// 通过nginx代理之后没端口,但tomcat容器有端口,会跨域异常,但正常登陆了的,直接跳
|
||||
location.href = ctx + "static/manage/home.html";
|
||||
var returnUrl = common.getParam("returnUrl");
|
||||
if (!!returnUrl) {
|
||||
returnUrl = decodeURI(returnUrl);
|
||||
} else {
|
||||
returnUrl = ctx + "static/manage/home.html";
|
||||
}
|
||||
post(ctx + "login", param, function (result) {
|
||||
console.log(result);
|
||||
if (result.errCode == 200) {
|
||||
location.href = returnUrl;
|
||||
} else {
|
||||
app.passwordError = "登录失败," + result.errMsg;
|
||||
}
|
||||
}, function () {
|
||||
// 通过nginx代理之后没端口,但tomcat容器有端口,会跨域异常,但正常登陆了的,直接跳
|
||||
// location.href = returnUrl;
|
||||
});
|
||||
},
|
||||
init: function () {
|
||||
|
||||
Reference in New Issue
Block a user