master
parent
ca0ed8624a
commit
c55c214c0e
|
|
@ -1 +1 @@
|
||||||
window.common={API_QUERY_URL:"http://localhost:7000/tansci/lcPages/get/",API_SAVE_URL:"http://localhost:7000/tansci/lcPages/update",TOKEN_KEY:"token"};
|
window.common={API_QUERY_URL:"http://localhost:7001/tansci/lcPages/get/",API_SAVE_URL:"http://localhost:7001/tansci/lcPages/update",TOKEN_KEY:"token"};
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "tansci-boot-ui-editor",
|
"name": "tansci-boot-ui-editor",
|
||||||
"version": "2.0.0",
|
"version": "1.2.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "tansci-boot-ui-editor",
|
"name": "tansci-boot-ui-editor",
|
||||||
"version": "2.0.0",
|
"version": "1.2.0",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fortawesome/fontawesome-free": "^5.15.3",
|
"@fortawesome/fontawesome-free": "^5.15.3",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
window.common = {
|
window.common = {
|
||||||
API_QUERY_URL: 'http://localhost:7000/tansci/lowcode/lcPages/get/',
|
API_QUERY_URL: 'http://localhost:7001/tansci/lowcode/lcPages/get/',
|
||||||
API_SAVE_URL: 'http://localhost:7000/tansci/lowcode/lcPages/update',
|
API_SAVE_URL: 'http://localhost:7001/tansci/lowcode/lcPages/update',
|
||||||
TOKEN_KEY: 'token'
|
TOKEN_KEY: 'token'
|
||||||
}
|
}
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
VITE_BASE_API = 'http://localhost:7000/tansci'
|
VITE_BASE_API = 'http://localhost:7001/tansci'
|
||||||
VITE_EDITOR_URL = 'http://localhost:5173'
|
VITE_EDITOR_URL = 'http://localhost:5173'
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
.vite-ssg-temp
|
.vite-ssg-temp
|
||||||
|
|
||||||
node_modules
|
node_modules
|
||||||
.DS_Store
|
.DS_Store
|
||||||
dist
|
dist
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
"typecheck": "vue-tsc --noEmit"
|
"typecheck": "vue-tsc --noEmit"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"amis": "^6.0.0",
|
"amis": "^6.10.0",
|
||||||
"axios": "^1.3.4",
|
"axios": "^1.3.4",
|
||||||
"copy-to-clipboard": "^3.3.3",
|
"copy-to-clipboard": "^3.3.3",
|
||||||
"element-plus": "^2.6.3",
|
"element-plus": "^2.6.3",
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
window.common={API_QUERY_URL:"http://localhost:7000/tansci/lowcode/lcPages/get/",API_SAVE_URL:"http://localhost:7000/tansci/lowcode/lcPages/update",TOKEN_KEY:"token"};
|
window.common={API_QUERY_URL:"http://localhost:7001/tansci/lowcode/lcPages/get/",API_SAVE_URL:"http://localhost:7001/tansci/lowcode/lcPages/update",TOKEN_KEY:"token"};
|
||||||
|
|
@ -22,6 +22,7 @@ export function removeToken() {
|
||||||
// 菜单信息
|
// 菜单信息
|
||||||
export function getMenus() {
|
export function getMenus() {
|
||||||
let menu = sessionStorage.getItem(menuKey);
|
let menu = sessionStorage.getItem(menuKey);
|
||||||
|
console.info(menu);
|
||||||
return menu ? JSON.parse(menu) : null;
|
return menu ? JSON.parse(menu) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,51 @@
|
||||||
import { createRouter, createWebHistory } from "vue-router"
|
import { createRouter, createWebHistory,RouteRecordRaw } from "vue-router"
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { getToken, removeToken, setMenus, getUserInfo } from "@/api/auth"
|
import { getToken, removeToken, setMenus, getUserInfo } from "@/api/auth"
|
||||||
import common from '@/utils/common'
|
import common from '@/utils/common'
|
||||||
import { generateRoutes } from "./permission"
|
import { generateRoutes } from "./permission"
|
||||||
|
|
||||||
import staticRouter from './staticRouter'
|
const staticRouter: RouteRecordRaw[] = [
|
||||||
|
{
|
||||||
|
path: '/',
|
||||||
|
redirect: 'login',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/login',
|
||||||
|
name: 'login',
|
||||||
|
meta: {title: "登录"},
|
||||||
|
component: () => import("@/views/common/Login.vue"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/404',
|
||||||
|
name: '404',
|
||||||
|
meta: {title: "404"},
|
||||||
|
component: () => import('@/views/common/404.vue')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/500',
|
||||||
|
name: '500',
|
||||||
|
meta: {title: "500"},
|
||||||
|
component: () => import('@/views/common/500.vue')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/index',
|
||||||
|
name: 'index',
|
||||||
|
meta: { title: "首页" },
|
||||||
|
redirect: '/index/index',
|
||||||
|
component: () => import("@/components/layout/Index.vue"),
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'index',
|
||||||
|
name: 'index',
|
||||||
|
meta: { title: "首页" },
|
||||||
|
component: () => import('@/views/Index.vue')
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
];
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHistory(),
|
history: createWebHistory(),
|
||||||
routes: [
|
routes: staticRouter
|
||||||
...staticRouter
|
|
||||||
]
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const whiteList = ['/login']
|
const whiteList = ['/login']
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import axios, { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios'
|
import axios, { AxiosInstance, InternalAxiosRequestConfig, AxiosResponse } from 'axios'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { logout, getToken } from '@/api/auth'
|
import { logout, getToken } from '@/api/auth'
|
||||||
import router from '../router'
|
import router from '../router'
|
||||||
|
|
@ -14,7 +14,7 @@ const axiosInstance: AxiosInstance = axios.create({
|
||||||
})
|
})
|
||||||
|
|
||||||
// axios实例拦截请求
|
// axios实例拦截请求
|
||||||
axiosInstance.interceptors.request.use((config: AxiosRequestConfig) => {
|
axiosInstance.interceptors.request.use((config: InternalAxiosRequestConfig<any>) => {
|
||||||
// 设置token
|
// 设置token
|
||||||
if (getToken()) {
|
if (getToken()) {
|
||||||
config.headers.token = getToken()
|
config.headers.token = getToken()
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ export default defineConfig({
|
||||||
server: {
|
server: {
|
||||||
proxy: {
|
proxy: {
|
||||||
'/tansci': {
|
'/tansci': {
|
||||||
target: 'http://127.0.0.1:7000',
|
target: 'http://localhost:7001',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {'^/tansci':'/tansci'}
|
pathRewrite: {'^/tansci':'/tansci'}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ spring:
|
||||||
type: com.alibaba.druid.pool.DruidDataSource
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
url: jdbc:mysql://127.0.0.1:3306/tansci_boot?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&autoReconnect=true
|
url: jdbc:mysql://127.0.0.1:3306/tansci_boot?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&autoReconnect=true
|
||||||
username: root
|
username: tansci
|
||||||
password: root
|
password: tansci
|
||||||
initialSize: 10
|
initialSize: 10
|
||||||
minIdle: 10
|
minIdle: 10
|
||||||
maxActive: 100
|
maxActive: 100
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
server:
|
server:
|
||||||
port: 7000
|
port: 7001
|
||||||
servlet:
|
servlet:
|
||||||
context-path: /tansci
|
context-path: /tansci
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue