mirror of
https://gitee.com/ssssssss-team/magic-boot.git
synced 2026-06-02 00:00:03 +08:00
修复 外链 iframe方式 刷新页面 跳转空白页面问题
登录 密码加密传输 菜单管理 搜索之后 点击修改 没有清除 font标签问题
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user