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