mirror of
https://gitee.com/ssssssss-team/magic-boot.git
synced 2025-03-16 03:51:02 +08:00
修复 外链 iframe方式 刷新页面 跳转空白页面问题
登录 密码加密传输 菜单管理 搜索之后 点击修改 没有清除 font标签问题
This commit is contained in:
parent
880d0a3ae9
commit
a34a3fec38
@ -5,7 +5,7 @@
|
|||||||
"groupId" : "1952f25c81084e24b55b11385767dc38",
|
"groupId" : "1952f25c81084e24b55b11385767dc38",
|
||||||
"name" : "登录",
|
"name" : "登录",
|
||||||
"createTime" : null,
|
"createTime" : null,
|
||||||
"updateTime" : 1653128903331,
|
"updateTime" : 1656424297619,
|
||||||
"lock" : "0",
|
"lock" : "0",
|
||||||
"createBy" : null,
|
"createBy" : null,
|
||||||
"updateBy" : null,
|
"updateBy" : null,
|
||||||
@ -61,13 +61,13 @@
|
|||||||
"expression" : null,
|
"expression" : null,
|
||||||
"children" : null
|
"children" : null
|
||||||
} ],
|
} ],
|
||||||
"requestBody" : "{\r\n \"username\": \"admin\",\r\n \"password\": \"123456\"\r\n}",
|
"requestBody" : "{\r\n \"username\": \"admin\",\r\n \"password\": \"8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92\"\r\n}",
|
||||||
"headers" : [ ],
|
"headers" : [ ],
|
||||||
"paths" : [ ],
|
"paths" : [ ],
|
||||||
"responseBody" : "{\n \"code\": 0,\n \"message\": \"请输入验证码\",\n \"data\": null,\n \"timestamp\": 1651934108567,\n \"executeTime\": 5\n}",
|
"responseBody" : "{\n \"code\": 0,\n \"message\": \"用户名或密码错误\",\n \"data\": null,\n \"timestamp\": 1656424276533,\n \"executeTime\": 11\n}",
|
||||||
"description" : null,
|
"description" : null,
|
||||||
"requestBodyDefinition" : {
|
"requestBodyDefinition" : {
|
||||||
"name" : "root",
|
"name" : "",
|
||||||
"value" : "",
|
"value" : "",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"required" : false,
|
"required" : false,
|
||||||
@ -91,7 +91,7 @@
|
|||||||
"children" : [ ]
|
"children" : [ ]
|
||||||
}, {
|
}, {
|
||||||
"name" : "password",
|
"name" : "password",
|
||||||
"value" : "123456",
|
"value" : "8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"required" : false,
|
"required" : false,
|
||||||
"dataType" : "String",
|
"dataType" : "String",
|
||||||
@ -128,7 +128,7 @@
|
|||||||
"children" : [ ]
|
"children" : [ ]
|
||||||
}, {
|
}, {
|
||||||
"name" : "message",
|
"name" : "message",
|
||||||
"value" : "请输入验证码",
|
"value" : "用户名或密码错误",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"required" : false,
|
"required" : false,
|
||||||
"dataType" : "String",
|
"dataType" : "String",
|
||||||
@ -152,7 +152,7 @@
|
|||||||
"children" : [ ]
|
"children" : [ ]
|
||||||
}, {
|
}, {
|
||||||
"name" : "timestamp",
|
"name" : "timestamp",
|
||||||
"value" : "1651934108567",
|
"value" : "1656424276533",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"required" : false,
|
"required" : false,
|
||||||
"dataType" : "Long",
|
"dataType" : "Long",
|
||||||
@ -164,7 +164,7 @@
|
|||||||
"children" : [ ]
|
"children" : [ ]
|
||||||
}, {
|
}, {
|
||||||
"name" : "executeTime",
|
"name" : "executeTime",
|
||||||
"value" : "5",
|
"value" : "11",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"required" : false,
|
"required" : false,
|
||||||
"dataType" : "Integer",
|
"dataType" : "Integer",
|
||||||
@ -180,7 +180,6 @@
|
|||||||
================================
|
================================
|
||||||
import org.ssssssss.magicboot.utils.AddressUtil
|
import org.ssssssss.magicboot.utils.AddressUtil
|
||||||
import log
|
import log
|
||||||
import 'cn.dev33.satoken.secure.SaSecureUtil';
|
|
||||||
import 'cn.dev33.satoken.stp.StpUtil';
|
import 'cn.dev33.satoken.stp.StpUtil';
|
||||||
import '@/configure/getBykey' as configure;
|
import '@/configure/getBykey' as configure;
|
||||||
import request;
|
import request;
|
||||||
@ -201,7 +200,7 @@ var user
|
|||||||
if(configure('super-password') == body.password){
|
if(configure('super-password') == body.password){
|
||||||
user = db.table("sys_user").where().eq("username",body.username).selectOne()
|
user = db.table("sys_user").where().eq("username",body.username).selectOne()
|
||||||
}else{
|
}else{
|
||||||
user = db.table("sys_user").where().eq("username",body.username).eq("password",SaSecureUtil.sha256(body.password)).selectOne()
|
user = db.table("sys_user").where().eq("username",body.username).eq("password", body.password).selectOne()
|
||||||
}
|
}
|
||||||
|
|
||||||
var loginLog = {
|
var loginLog = {
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^0.24.0",
|
"axios": "^0.24.0",
|
||||||
"element-plus": "^2.2.6",
|
"element-plus": "^2.2.6",
|
||||||
|
"js-sha256": "^0.9.0",
|
||||||
"nprogress": "0.2.0",
|
"nprogress": "0.2.0",
|
||||||
"path-browserify": "^1.0.1",
|
"path-browserify": "^1.0.1",
|
||||||
"vue": "^3.2.25",
|
"vue": "^3.2.25",
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
import global from './global'
|
import global from './global'
|
||||||
import request from '@/scripts/request'
|
import request from '@/scripts/request'
|
||||||
|
import { sha256 } from 'js-sha256'
|
||||||
|
|
||||||
const TokenKey = 'magic_boot_token'
|
const TokenKey = 'magic_boot_token'
|
||||||
|
|
||||||
export function getToken() {
|
export function getToken() {
|
||||||
@ -41,7 +43,11 @@ export function login(data){
|
|||||||
request({
|
request({
|
||||||
url: '/system/security/login',
|
url: '/system/security/login',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data: {
|
||||||
|
username: data.username,
|
||||||
|
password: sha256(data.password),
|
||||||
|
code: data.code
|
||||||
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
var token = res.data
|
var token = res.data
|
||||||
setToken(token)
|
setToken(token)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import request from '@/scripts/request'
|
import request from '@/scripts/request'
|
||||||
import common from '@/scripts/common'
|
import common from '@/scripts/common'
|
||||||
|
import { sha256 } from 'js-sha256'
|
||||||
|
|
||||||
const viewModules = import.meta.glob("../views/**/**.vue")
|
const viewModules = import.meta.glob("../views/**/**.vue")
|
||||||
const layoutModules = import.meta.glob("../layout/**.vue")
|
const layoutModules = import.meta.glob("../layout/**.vue")
|
||||||
@ -11,7 +12,7 @@ export const filterAsyncRouter = (routers, level) => {
|
|||||||
var setIframe = () => {
|
var setIframe = () => {
|
||||||
router.component = loadView(`/common/iframe`)
|
router.component = loadView(`/common/iframe`)
|
||||||
router.props = { url: router.url }
|
router.props = { url: router.url }
|
||||||
router.path = "/" + common.uuid()
|
router.path = "/" + sha256(router.url)
|
||||||
}
|
}
|
||||||
if(router.url.startsWith('http')){
|
if(router.url.startsWith('http')){
|
||||||
if(router.openMode == '0'){
|
if(router.openMode == '0'){
|
||||||
|
@ -93,4 +93,10 @@ treeTable.treeNodeReplace = (fields, searchData, treeNode, text, childrenSearch,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
treeTable.clearFont = (data, fields) => {
|
||||||
|
fields.forEach(field => {
|
||||||
|
data[field] = data[field].replaceAll(/<font.*?>(.*?)<\/font>/g,'$1')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export default treeTable
|
export default treeTable
|
||||||
|
@ -242,7 +242,7 @@ function getInfo(row) {
|
|||||||
}
|
}
|
||||||
openModeRef.value = temp.value.openMode || '0'
|
openModeRef.value = temp.value.openMode || '0'
|
||||||
menuType.value = temp.value.url ? 'menu' : 'button'
|
menuType.value = temp.value.url ? 'menu' : 'button'
|
||||||
temp.value.name = temp.value.name.replaceAll(/<font.*?>(.*?)<\/font>/g,'$1')
|
proxy.$treeTable.clearFont(temp.value, ['name', 'url', 'permission'])
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
dataForm.value.clearValidate()
|
dataForm.value.clearValidate()
|
||||||
})
|
})
|
||||||
|
@ -336,7 +336,7 @@ function handleUpdate(row) {
|
|||||||
for (var t in temp.value) {
|
for (var t in temp.value) {
|
||||||
temp.value[t] = row[t]
|
temp.value[t] = row[t]
|
||||||
}
|
}
|
||||||
temp.value.name = temp.value.name.replaceAll(/<font.*?>(.*?)<\/font>/g,'$1')
|
proxy.$treeTable.clearFont(temp.value, ['name', 'code'])
|
||||||
dialogTitle.value = '修改'
|
dialogTitle.value = '修改'
|
||||||
officeFormDialog.value.show()
|
officeFormDialog.value.show()
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user