Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dd_school
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangqi
dd_school
Commits
8035bbed
Commit
8035bbed
authored
Oct 09, 2023
by
zhaopanyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zpy 10.9
parent
77d756c5
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
864 additions
and
309 deletions
+864
-309
ruoyi-ui/src/api/ddLogin.js
+9
-0
ruoyi-ui/src/api/home.js
+7
-8
ruoyi-ui/src/main.js
+82
-75
ruoyi-ui/src/permission.js
+37
-34
ruoyi-ui/src/router/index.js
+2
-1
ruoyi-ui/src/store/modules/user.js
+1
-1
ruoyi-ui/src/utils/request.js
+1
-0
ruoyi-ui/src/views/index.vue
+153
-80
ruoyi-ui/src/views/login copy.vue
+329
-0
ruoyi-ui/src/views/login.vue
+163
-104
ruoyi-ui/src/views/whitePage.vue
+72
-0
ruoyi-ui/vue.config.js
+8
-6
No files found.
ruoyi-ui/src/api/ddLogin.js
0 → 100644
View file @
8035bbed
import
request
from
"@/utils/request"
;
export
function
getCode
(
code
)
{
return
request
({
url
:
"/dd/user/login"
,
method
:
"get"
,
params
:
{
code
},
});
}
ruoyi-ui/src/api/home.js
View file @
8035bbed
...
...
@@ -6,17 +6,16 @@ import request from "@/utils/request";
export
function
getUserInfo
(
userId
)
{
return
request
({
url
:
'/school/teacher/queryOne/'
+
userId
,
method
:
'get'
})
url
:
"/school/teacher/queryOne/"
+
userId
,
method
:
"get"
,
})
;
}
// 课表信息
export
function
getCourseInfo
(
teacherId
)
{
return
request
({
url
:
'/schoolTimeTable/getTimeTable'
,
method
:
'get'
,
params
:
{
teacherId
}
})
url
:
"/schoolTimeTable/getTimeTable"
,
method
:
"get"
,
params
:
{
teacherId
},
})
;
}
ruoyi-ui/src/main.js
View file @
8035bbed
import
Vue
from
'vue'
import
Cookies
from
'js-cookie'
import
Element
from
'element-ui'
import
'./assets/styles/element-variables.scss'
import
Vue
from
"vue"
;
import
Cookies
from
"js-cookie"
;
import
Element
from
"element-ui"
;
import
"./assets/styles/element-variables.scss"
;
// import '@/assets/styles/element-ui.scss'
import
'@/assets/styles/index.scss'
// global css
import
'@/assets/styles/ruoyi.scss'
// ruoyi css
import
App
from
'./App'
import
store
from
'./store'
import
router
from
'./router'
import
directive
from
'./directive'
// directive
import
plugins
from
'./plugins'
// plugins
import
{
download
}
from
'@/utils/request'
import
"@/assets/styles/index.scss"
;
// global css
import
"@/assets/styles/ruoyi.scss"
;
// ruoyi css
import
App
from
"./App"
;
import
store
from
"./store"
;
import
router
from
"./router"
;
import
directive
from
"./directive"
;
// directive
import
plugins
from
"./plugins"
;
// plugins
import
{
download
}
from
"@/utils/request"
;
import
moment
from
"moment"
;
import
'./assets/icons'
// icon
import
'./permission'
// permission control
import
{
getDicts
}
from
'@/api/system/dict/data'
import
{
getConfigKey
}
from
'@/api/system/config'
import
{
parseTime
,
resetForm
,
addDateRange
,
selectDictLabel
,
selectDictLabels
,
handleTree
}
from
'@/utils/ruoyi'
import
{
throttle
}
from
'@/utils/utilLibrary/throttle'
import
"./assets/icons"
;
// icon
import
"./permission"
;
// permission control
import
{
getDicts
}
from
"@/api/system/dict/data"
;
import
{
getConfigKey
}
from
"@/api/system/config"
;
import
{
parseTime
,
resetForm
,
addDateRange
,
selectDictLabel
,
selectDictLabels
,
handleTree
,
}
from
"@/utils/ruoyi"
;
import
{
throttle
}
from
"@/utils/utilLibrary/throttle"
;
import
{
initDingH5RemoteDebug
}
from
"dingtalk-h5-remote-debug"
;
initDingH5RemoteDebug
();
//表格组件
import
Table
from
'@/components/Table'
import
Table
from
"@/components/Table"
;
// 分页组件
import
Pagination
from
'@/components/Pagination'
import
Pagination
from
"@/components/Pagination"
;
// 自定义表格工具组件
import
RightToolbar
from
'@/components/RightToolbar'
import
RightToolbar
from
"@/components/RightToolbar"
;
// 富文本组件
import
Editor
from
'@/components/Editor'
import
Editor
from
"@/components/Editor"
;
// 文件上传组件
import
FileUpload
from
'@/components/FileUpload'
import
FileUpload
from
"@/components/FileUpload"
;
// 图片上传组件
import
ImageUpload
from
'@/components/ImageUpload'
import
ImageUpload
from
"@/components/ImageUpload"
;
// 图片预览组件
import
ImagePreview
from
'@/components/ImagePreview'
import
ImagePreview
from
"@/components/ImagePreview"
;
// 字典标签组件
import
DictTag
from
'@/components/DictTag'
import
DictTag
from
"@/components/DictTag"
;
// 头部标签组件
import
VueMeta
from
'vue-meta'
import
VueMeta
from
"vue-meta"
;
// 字典数据组件
import
DictData
from
'@/components/DictData'
import
DictData
from
"@/components/DictData"
;
// //使用vue-print-nb提供打印功能
// import Print from 'vue-print-nb';
// 列表用户头像
import
ListImage
from
'@/components/ListImage'
import
ListImage
from
"@/components/ListImage"
;
// 扩展组件Pagination
import
ExPagination
from
'@/components/ExPagination'
import
ExPagination
from
"@/components/ExPagination"
;
// 导出组件
import
ExportTable
from
'@/components/ExportTable'
import
VueDND
from
'awe-dnd'
import
weather
from
'vue-mini-weather'
import
axios
from
'axios'
Vue
.
prototype
.
$axios
=
axios
import
ExportTable
from
"@/components/ExportTable"
;
import
VueDND
from
"awe-dnd"
;
import
weather
from
"vue-mini-weather"
;
import
axios
from
"axios"
;
Vue
.
prototype
.
$axios
=
axios
;
Vue
.
use
(
weather
)
Vue
.
use
(
VueDND
)
import
VXETable
from
'vxe-table'
import
'vxe-table/lib/style.css'
Vue
.
use
(
weather
)
;
Vue
.
use
(
VueDND
)
;
import
VXETable
from
"vxe-table"
;
import
"vxe-table/lib/style.css"
;
Vue
.
use
(
VXETable
)
Vue
.
use
(
VXETable
)
;
// 全局方法挂载
Vue
.
prototype
.
getDicts
=
getDicts
Vue
.
prototype
.
getConfigKey
=
getConfigKey
Vue
.
prototype
.
parseTime
=
parseTime
Vue
.
prototype
.
resetForm
=
resetForm
Vue
.
prototype
.
addDateRange
=
addDateRange
Vue
.
prototype
.
selectDictLabel
=
selectDictLabel
Vue
.
prototype
.
selectDictLabels
=
selectDictLabels
Vue
.
prototype
.
download
=
download
Vue
.
prototype
.
handleTree
=
handleTree
Vue
.
prototype
.
throttle
=
throttle
Vue
.
prototype
.
getDicts
=
getDicts
;
Vue
.
prototype
.
getConfigKey
=
getConfigKey
;
Vue
.
prototype
.
parseTime
=
parseTime
;
Vue
.
prototype
.
resetForm
=
resetForm
;
Vue
.
prototype
.
addDateRange
=
addDateRange
;
Vue
.
prototype
.
selectDictLabel
=
selectDictLabel
;
Vue
.
prototype
.
selectDictLabels
=
selectDictLabels
;
Vue
.
prototype
.
download
=
download
;
Vue
.
prototype
.
handleTree
=
handleTree
;
Vue
.
prototype
.
throttle
=
throttle
;
Vue
.
prototype
.
$moment
=
moment
;
// 全局组件挂载
Vue
.
component
(
'DictTag'
,
DictTag
)
Vue
.
component
(
'Pagination'
,
Pagination
)
Vue
.
component
(
'RightToolbar'
,
RightToolbar
)
Vue
.
component
(
'Editor'
,
Editor
)
Vue
.
component
(
'FileUpload'
,
FileUpload
)
Vue
.
component
(
'ImageUpload'
,
ImageUpload
)
Vue
.
component
(
'ImagePreview'
,
ImagePreview
)
Vue
.
component
(
'ListImage'
,
ListImage
)
Vue
.
component
(
'ExPagination'
,
ExPagination
)
Vue
.
component
(
'ExportTable'
,
ExportTable
)
Vue
.
component
(
'Table'
,
Table
)
Vue
.
use
(
directive
)
Vue
.
use
(
plugins
)
Vue
.
use
(
VueMeta
)
DictData
.
install
()
Vue
.
component
(
"DictTag"
,
DictTag
);
Vue
.
component
(
"Pagination"
,
Pagination
);
Vue
.
component
(
"RightToolbar"
,
RightToolbar
);
Vue
.
component
(
"Editor"
,
Editor
);
Vue
.
component
(
"FileUpload"
,
FileUpload
);
Vue
.
component
(
"ImageUpload"
,
ImageUpload
);
Vue
.
component
(
"ImagePreview"
,
ImagePreview
);
Vue
.
component
(
"ListImage"
,
ListImage
);
Vue
.
component
(
"ExPagination"
,
ExPagination
);
Vue
.
component
(
"ExportTable"
,
ExportTable
);
Vue
.
component
(
"Table"
,
Table
);
Vue
.
use
(
directive
)
;
Vue
.
use
(
plugins
)
;
Vue
.
use
(
VueMeta
)
;
DictData
.
install
()
;
// Vue.use(Print);
/**
...
...
@@ -103,18 +110,18 @@ DictData.install()
*/
// 修改elementUI默认样式-- 关于对话框中,当点击对话框外部区域或者键入【esc】是退出对话框的问题
Element
.
Dialog
.
props
.
closeOnClickModal
=
false
Element
.
Dialog
.
props
.
closeOnPressEscape
=
false
Element
.
Dialog
.
props
.
closeOnClickModal
=
false
;
Element
.
Dialog
.
props
.
closeOnPressEscape
=
false
;
Vue
.
use
(
Element
,
{
size
:
Cookies
.
get
(
'size'
)
||
'medium'
// set element-ui default size
})
size
:
Cookies
.
get
(
"size"
)
||
"medium"
,
// set element-ui default size
})
;
Vue
.
config
.
productionTip
=
false
Vue
.
config
.
productionTip
=
false
;
new
Vue
({
el
:
'#app'
,
el
:
"#app"
,
router
,
store
,
render
:
h
=>
h
(
App
)
})
render
:
(
h
)
=>
h
(
App
),
})
;
ruoyi-ui/src/permission.js
View file @
8035bbed
import
router
from
'./router'
import
store
from
'./store'
import
{
Message
}
from
'element-ui'
import
NProgress
from
'nprogress'
import
'nprogress/nprogress.css'
import
{
getToken
}
from
'@/utils/auth'
import
{
isRelogin
}
from
'@/utils/request'
import
router
from
"./router"
;
import
store
from
"./store"
;
import
{
Message
}
from
"element-ui"
;
import
NProgress
from
"nprogress"
;
import
"nprogress/nprogress.css"
;
import
{
getToken
}
from
"@/utils/auth"
;
import
{
isRelogin
}
from
"@/utils/request"
;
NProgress
.
configure
({
showSpinner
:
false
})
NProgress
.
configure
({
showSpinner
:
false
})
;
const
whiteList
=
[
'/login'
,
'/auth-redirect'
,
'/bind'
,
'/register'
]
const
whiteList
=
[
"/login"
,
"/auth-redirect"
,
"/bind"
,
"/register"
,
"/index"
];
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
NProgress
.
start
()
NProgress
.
start
()
;
if
(
getToken
())
{
to
.
meta
.
title
&&
store
.
dispatch
(
'settings/setTitle'
,
to
.
meta
.
title
)
to
.
meta
.
title
&&
store
.
dispatch
(
"settings/setTitle"
,
to
.
meta
.
title
);
/* has token*/
if
(
to
.
path
===
'/login'
)
{
next
({
path
:
'/'
})
NProgress
.
done
()
if
(
to
.
path
===
"/login"
)
{
next
({
path
:
"/"
});
NProgress
.
done
()
;
}
else
{
if
(
store
.
getters
.
roles
.
length
===
0
)
{
isRelogin
.
show
=
true
isRelogin
.
show
=
true
;
// 判断当前用户是否已拉取完user_info信息
store
.
dispatch
(
'GetInfo'
).
then
(()
=>
{
isRelogin
.
show
=
false
store
.
dispatch
(
'GenerateRoutes'
).
then
(
accessRoutes
=>
{
// 根据roles权限生成可访问的路由表
router
.
addRoutes
(
accessRoutes
)
// 动态添加可访问路由表
next
({
...
to
,
replace
:
true
})
// hack方法 确保addRoutes已完成
})
}).
catch
(
err
=>
{
store
.
dispatch
(
'LogOut'
).
then
(()
=>
{
Message
.
error
(
err
)
next
({
path
:
'/'
})
})
store
.
dispatch
(
"GetInfo"
)
.
then
(()
=>
{
isRelogin
.
show
=
false
;
store
.
dispatch
(
"GenerateRoutes"
).
then
((
accessRoutes
)
=>
{
// 根据roles权限生成可访问的路由表
router
.
addRoutes
(
accessRoutes
);
// 动态添加可访问路由表
next
({
...
to
,
replace
:
true
});
// hack方法 确保addRoutes已完成
});
})
.
catch
((
err
)
=>
{
store
.
dispatch
(
"LogOut"
).
then
(()
=>
{
Message
.
error
(
err
);
next
({
path
:
"/"
});
});
});
}
else
{
next
()
next
()
;
}
}
}
else
{
// 没有token
if
(
whiteList
.
indexOf
(
to
.
path
)
!==
-
1
)
{
// 在免登录白名单,直接进入
next
()
next
()
;
}
else
{
next
(
`/login?redirect=
${
to
.
fullPath
}
`
)
// 否则全部重定向到登录页
NProgress
.
done
()
next
(
`/login?redirect=
${
to
.
fullPath
}
`
)
;
// 否则全部重定向到登录页
NProgress
.
done
()
;
}
}
})
})
;
router
.
afterEach
(()
=>
{
NProgress
.
done
()
})
NProgress
.
done
()
;
})
;
ruoyi-ui/src/router/index.js
View file @
8035bbed
...
...
@@ -12,7 +12,6 @@ import classAdviser from "@/router/routerMenus/classAdviser";
import
officialWork
from
"@/router/routerMenus/officialWork"
;
import
othersManage
from
"@/router/routerMenus/othersManage"
;
import
examinationManage
from
"@/router/routerMenus/examinationManage"
;
Vue
.
use
(
Router
);
/* Layout */
import
Layout
from
"@/layout"
;
...
...
@@ -72,6 +71,7 @@ export const constantRoutes = [
component
:
()
=>
import
(
"@/views/error/401"
),
hidden
:
true
,
},
{
path
:
""
,
component
:
Layout
,
...
...
@@ -204,6 +204,7 @@ Router.prototype.push = function push(location) {
};
export
default
new
Router
({
// base: "/zpy",
mode
:
"history"
,
// 去掉url中的#
scrollBehavior
:
()
=>
({
y
:
0
}),
routes
:
constantRoutes
,
...
...
ruoyi-ui/src/store/modules/user.js
View file @
8035bbed
...
...
@@ -87,7 +87,7 @@ const user = {
const
teacher
=
res
.
teacher
const
avatar
=
(
user
.
avatar
==
""
||
user
.
avatar
==
null
)
?
require
(
"@/assets/images/profile.jpg"
)
:
process
.
env
.
VUE_APP_BASE_API
+
user
.
avatar
;
const
sign
=
(
user
.
sign
==
""
||
user
.
sign
==
null
)
?
require
(
"@/assets/images/profile.jpg"
)
:
process
.
env
.
VUE_APP_BASE_API
+
user
.
sign
;
if
(
res
.
roles
&&
res
.
roles
.
length
>
0
)
{
// 验证返回的roles是否是一个非空数组
if
(
res
.
roles
&&
/* */
res
.
roles
.
length
>
0
)
{
// 验证返回的roles是否是一个非空数组
commit
(
'SET_ROLES'
,
res
.
roles
)
commit
(
'SET_PERMISSIONS'
,
res
.
permissions
)
}
else
{
...
...
ruoyi-ui/src/utils/request.js
View file @
8035bbed
...
...
@@ -28,6 +28,7 @@ service.interceptors.request.use(config => {
// 是否需要防止数据重复提交
const
isRepeatSubmit
=
(
config
.
headers
||
{}).
repeatSubmit
===
false
if
(
getToken
()
&&
!
isToken
)
{
config
.
headers
[
'Authorization'
]
=
'Bearer '
+
getToken
()
// 让每个请求携带自定义token 请根据实际情况自行修改
}
// get请求映射params参数
...
...
ruoyi-ui/src/views/index.vue
View file @
8035bbed
...
...
@@ -2,7 +2,7 @@
<div
class=
"app-container"
>
<el-row
:gutter=
"6"
>
<el-col
:span=
"9"
>
<el-card
:body-style=
"
{ padding: '0px' }"
>
<el-card
:body-style=
"
{ padding: '0px' }">
<div
style=
"background: #5a5e66; height: 170px; margin: 5px"
>
<el-carousel
height=
"170px"
>
<el-carousel-item
v-for=
"item in images"
:key=
"item.id"
>
...
...
@@ -13,10 +13,10 @@
<!-- 通知 -->
<div
class=
"cardHeader"
style=
"margin-top: 5px; width: 100%;"
>
<div
style=
"display: inline-block; margin-top: 5px"
><i
class=
"el-icon-message-solid"
style=
"color: #2f79ff"
></i>
<span>
通知
</span></div>
style=
"color: #2f79ff"
></i>
<span>
通知
</span></div>
<div
style=
"display: inline-block; height: 25px; float: right"
>
<el-button
type=
"text"
class=
"noticeMore"
style=
"height: 25px; width: 100px; line-height: 25px"
@
click
.
native
.
prevent=
"handleMore"
>
@
click
.
native
.
prevent=
"handleMore"
>
查看更多
<i
class=
"el-icon-d-arrow-right el-icon--right"
style=
"margin-left: -2px"
></i>
</el-button>
...
...
@@ -34,16 +34,15 @@
<
/li
>
<
/ol
>
<
/el-card
>
<
el
-
card
:
body
-
style
=
"{ padding: '0px'
}
"
style
=
"height: 357px; margin-top: 3px; background-color: #ffffff"
>
<
el
-
card
:
body
-
style
=
"{ padding: '0px'
}
"
style
=
"height: 357px; margin-top: 3px; background-color: #ffffff"
>
<
div
class
=
"cardHeader"
style
=
"margin-top:10px"
>
<
div
style
=
"display: inline-block; vertical-align:middle"
>
<
i
class
=
"el-icon-time"
style
=
"color: #2f79ff;"
><
/i> <span>值班表</
span
>
<
/div
>
<
div
style
=
"display: inline-block; height: 25px;float: right"
>
<
el
-
button
type
=
"text"
class
=
"noticeMore"
style
=
"float: right; height: 25px; width: 100px; line-height: 25px; "
@
click
.
native
.
prevent
=
"handleMore2"
>
查看更多
style
=
"float: right; height: 25px; width: 100px; line-height: 25px; "
@
click
.
native
.
prevent
=
"handleMore2"
>
查看更多
<
i
class
=
"el-icon-d-arrow-right el-icon--right"
><
/i
>
<
/el-button
>
<
/div
>
...
...
@@ -51,20 +50,15 @@
<
el
-
divider
><
/el-divider
>
<
div
style
=
"margin:5px"
>
<!--
:
row
-
style
=
"{ height: '30px'
}
"
:
cell
-
style
=
"{ padding: '0'
}
"
style
=
"font-size: 12px"
-->
<
el
-
table
border
:
data
=
"dutyTable"
width
=
"100%"
height
=
"300px"
stripe
@
row
-
click
=
"redirectDutyInfo"
>
<
el
-
table
-
column
label
=
"标题"
prop
=
"dutyName"
min
-
width
=
"120"
show
-
overflow
-
tooltip
align
=
"center"
/>
<
el
-
table
border
:
data
=
"dutyTable"
width
=
"100%"
height
=
"300px"
stripe
@
row
-
click
=
"redirectDutyInfo"
>
<
el
-
table
-
column
label
=
"标题"
prop
=
"dutyName"
min
-
width
=
"120"
show
-
overflow
-
tooltip
align
=
"center"
/>
<
el
-
table
-
column
label
=
"类型"
prop
=
"dutyType"
min
-
width
=
"60"
align
=
"center"
>
<
template
v
-
slot
=
"scope"
>
{{
getDutyType
(
scope
.
row
.
dutyType
)
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"节日"
min
-
width
=
"60"
prop
=
"holidayName"
align
=
"center"
/>
<
el
-
table
-
column
label
=
"说明"
min
-
width
=
"120"
prop
=
"remarks"
show
-
overflow
-
tooltip
align
=
"center"
/>
<
el
-
table
-
column
label
=
"节日"
min
-
width
=
"60"
prop
=
"holidayName"
align
=
"center"
/>
<
el
-
table
-
column
label
=
"说明"
min
-
width
=
"120"
prop
=
"remarks"
show
-
overflow
-
tooltip
align
=
"center"
/>
<
/el-table
>
<
/div
>
<
/el-card
>
...
...
@@ -75,8 +69,9 @@
<
el
-
card
:
body
-
style
=
"{ padding: '0px'
}
"
style
=
"height: 220px; background-color: #ffffff"
>
<
div
class
=
"cardHeader"
style
=
"margin-top: 5px"
>
<
div
style
=
"display: inline-block; vertical-align: middle"
><
i
class
=
"el-icon-user-solid"
style
=
"color: #2f79ff"
><
/i
>
<
span
>&
emsp
;
个人信息
<
/span></
div
>
style
=
"color: #2f79ff"
><
/i
>
<
span
>&
emsp
;
个人信息
<
/span
>
<
/div
>
<
/div
>
<
el
-
divider
><
/el-divider
>
<
div
style
=
"margin-top: 15px"
>
...
...
@@ -87,9 +82,7 @@
<
/div
>
<
/el-col
>
<
el
-
col
:
span
=
"17"
:
offset
=
"1"
class
=
"info"
>
<
el
-
row
><
span
class
=
"name"
>
{{
userInfo
.
teacherName
}}
<
/span></
el
-
row
>
<
el
-
row
><
span
class
=
"name"
>
{{
userInfo
.
teacherName
}}
<
/span></
el
-
row
>
<
el
-
row
style
=
"margin: 13px 0px"
>
<
el
-
col
:
span
=
"12"
>
<
svg
-
icon
icon
-
class
=
"phone-telephone"
style
=
"font-size: 16px"
><
/svg-icon
>
...
...
@@ -101,7 +94,7 @@
<
svg
-
icon
icon
-
class
=
"degree-hat"
style
=
"font-size: 16px"
><
/svg-icon
>
&
emsp
;
<
span
>
当前学历:
<
/span
>
<
dict
-
tag
style
=
"display: inline-block"
:
options
=
"dict.type.education"
:
value
=
"userInfo.education"
/>
:
value
=
"userInfo.education"
/>
<
/el-col
>
<
/el-row
>
<
el
-
row
style
=
"margin: 13px 0px"
>
...
...
@@ -133,19 +126,20 @@
<!--
审批入口
-->
<
el
-
row
>
<
el
-
card
:
body
-
style
=
"{ padding: '0px'
}
"
style
=
"height: 210px; width: 100%; margin-top: 3px; background-color: #ffffff"
>
style
=
"height: 210px; width: 100%; margin-top: 3px; background-color: #ffffff"
>
<
div
class
=
"cardHeader"
style
=
"margin-top: 5px"
>
<
div
style
=
"display: inline-block; vertical-align: middle"
><
i
class
=
"el-icon-s-check"
style
=
"color: #2f79ff"
><
/i
>
<
span
>&
emsp
;
我的任务
<
/span></
div
>
<
div
style
=
"display: inline-block; vertical-align: middle"
><
i
class
=
"el-icon-s-check"
style
=
"color: #2f79ff"
><
/i
>
<
span
>&
emsp
;
我的任务
<
/span
>
<
/div
>
<
/div
>
<
el
-
divider
><
/el-divider
>
<
div
class
=
"card-blocks"
>
<
el
-
badge
v
-
for
=
"item in approves"
style
=
" border-radius: 5px; margin: 10px 20px"
:
class
=
"{ headerBox: taskNumList.hasOwnProperty(item.name) && taskNumList[item.name] != 0
}
"
:
value
=
"handleTaskNum(item)"
:
key
=
"item.label"
>
<
el
-
badge
v
-
for
=
"item in approves"
style
=
" border-radius: 5px; margin: 10px 20px"
:
class
=
"{ headerBox: taskNumList.hasOwnProperty(item.name) && taskNumList[item.name] != 0
}
"
:
value
=
"handleTaskNum(item)"
:
key
=
"item.label"
>
<
el
-
button
@
click
=
"handleInto(item.path)"
type
=
"primary"
plain
size
=
"mini"
style
=
"min-width: 118px; height: 30px"
>
style
=
"min-width: 118px; height: 30px"
>
{{
item
.
label
}}
<
/el-button
>
<
/el-badge
>
...
...
@@ -157,11 +151,12 @@
<
el
-
card
:
body
-
style
=
"{ padding: '0px'
}
"
style
=
"height: 315px; margin-top: 3px; background-color: #ffffff"
>
<
div
class
=
"cardHeader"
style
=
"margin-top: 5px"
>
<
div
style
=
"display: inline-block; vertical-align: middle"
><
i
class
=
"el-icon-message-solid"
style
=
"color: #2f79ff"
><
/i
>
<
span
>&
emsp
;
调整常用功能
<
/span></
div
>
style
=
"color: #2f79ff"
><
/i
>
<
span
>&
emsp
;
调整常用功能
<
/span
>
<
/div
>
<
div
style
=
"display: inline-block; height: 25px; width: 100px; float: right"
>
<
el
-
button
type
=
"text"
class
=
"noticeMore"
style
=
"height: 25px; line-height: 25px; margin-left: 20px"
@
click
.
native
.
prevent
=
"handleCommonFunctions"
>
@
click
.
native
.
prevent
=
"handleCommonFunctions"
>
查看更多
<
i
class
=
"el-icon-d-arrow-right el-icon--right"
style
=
"margin-left: -2px"
><
/i
>
<
/el-button
>
...
...
@@ -173,7 +168,7 @@
<
div
@
click
=
"handleInto(item.path)"
>
<
div
style
=
"margin-bottom: 5px"
>
<
svg
-
icon
:
icon
-
class
=
"item.menuPic == '#' ? '菜单管理' : item.menuPic"
style
=
"font-size: 28px"
><
/svg-icon
>
style
=
"font-size: 28px"
><
/svg-icon
>
<
/div
>
<
span
style
=
"font-size: 14px"
>
{{
item
.
menuName
}}
<
/span
>
<
/div
>
...
...
@@ -186,11 +181,10 @@
<
el
-
card
:
body
-
style
=
"{ padding: '0px'
}
"
style
=
"background-color: #fdfdfe; height:750px"
>
<
div
style
=
"height: 275px; width: 100%; position: relative"
>
<
div
style
=
"position: absolute; width: 100%"
>
<
el
-
image
:
src
=
"indexCalendarImg"
style
=
"width: 100%; height: 270px"
/>
<
el
-
image
:
src
=
"indexCalendarImg"
style
=
"width: 100%; height: 270px"
/>
<
/div
>
<
div
style
=
"position: absolute; width: 100%"
>
<
div
style
=
"font-family: PingFang SC; color: #ffffff; font-size: 16px; margin-top: 20px; margin-left: 20px"
>
<
div
style
=
"font-family: PingFang SC; color: #ffffff; font-size: 16px; margin-top: 20px; margin-left: 20px"
>
{{
user
.
userName
}}
,
欢迎登录智慧校园管理系统
!
<
/div
>
<
div
style
=
"font-size: small; margin-top: 8px; color: #96c4f5; margin-left: 20px"
>
...
...
@@ -213,8 +207,9 @@
<
/div
>
<
/div
>
<
div
class
=
"cardHeader"
style
=
"position: absolute; top: 235px; margin-left: 10px"
><
i
class
=
"el-icon-date"
style
=
"color: #2f79ff"
><
/i
>
<
span
>&
emsp
;
校
历
<
/span></
div
>
style
=
"color: #2f79ff"
><
/i
>
<
span
>&
emsp
;
校
历
<
/span
>
<
/div
>
<
/div
>
<
div
class
=
"calendar"
>
<
el
-
calendar
v
-
model
=
"today"
>
...
...
@@ -233,8 +228,8 @@
<
div
v
-
for
=
"item in things"
:
key
=
"item.label"
style
=
"margin-bottom: 5px; "
>
<
el
-
image
:
src
=
"taskIcon"
style
=
"width: 15px; height: 15px"
><
/el-image
>
<
span
style
=
"font-family: PingFang SC; font-weight: 700; margin-left: 10px; font-size: 15px"
>
{{
item
.
detailName
}}
:
<
/span
>
item
.
detailName
}}
:
<
/span
>
<
span
style
=
"margin-top: 10px; font-weight: 200; font-size: 13px"
>
{{
item
.
startTime
}}
~
...
...
@@ -262,7 +257,7 @@
<
h1
style
=
"display: inline-block"
>
{{
form
.
title
}}
<
/h1
>
<
/div
>
<
span
class
=
"info-container"
:
disabled
=
"true"
v
-
html
=
"form.content"
><
/span
>
<
br
/><
br
/>
<
br
/><
br
/>
<
div
style
=
"float: right;"
>
<
el
-
descriptions
:
column
=
"3"
>
<
el
-
descriptions
-
item
label
=
"接收人"
>
{{
resolveRole
(
form
.
receivePacket
)
}}
<
/el-descriptions-item
>
...
...
@@ -291,24 +286,24 @@
<
/el-row
>
<
el
-
table
key
=
"a"
v
-
if
=
"dutyList.dutyType
==='1'"
border
v
-
loading
=
"loading2
"
:
data
=
"dutyList.list"
style
=
"width: 100%"
:
span
-
method
=
"objectSpanMethod2"
>
<
el
-
table
key
=
"a"
v
-
if
=
"dutyList.dutyType
=== '1'"
border
v
-
loading
=
"loading2"
:
data
=
"dutyList.list
"
style
=
"width: 100%"
:
span
-
method
=
"objectSpanMethod2"
>
<
el
-
table
-
column
label
=
"节日"
align
=
"center"
>
<
template
slot
-
scope
=
"scope"
>
{{
dutyList
.
holidayName
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"日期"
align
=
"center"
prop
=
"dutyDeDate"
/>
<
el
-
table
-
column
label
=
"星期"
align
=
"center"
prop
=
"dutyDeWeek"
/>
<
el
-
table
-
column
label
=
"日期"
align
=
"center"
prop
=
"dutyDeDate"
/>
<
el
-
table
-
column
label
=
"星期"
align
=
"center"
prop
=
"dutyDeWeek"
/>
<
el
-
table
-
column
label
=
"行政值班"
align
=
"center"
>
<
el
-
table
-
column
label
=
"值班人员"
align
=
"center"
prop
=
"adminPerson"
/>
<
el
-
table
-
column
label
=
"值班电话"
align
=
"center"
prop
=
"adminTel"
/>
<
el
-
table
-
column
label
=
"手机"
align
=
"center"
prop
=
"adminPhone"
/>
<
el
-
table
-
column
label
=
"值班人员"
align
=
"center"
prop
=
"adminPerson"
/>
<
el
-
table
-
column
label
=
"值班电话"
align
=
"center"
prop
=
"adminTel"
/>
<
el
-
table
-
column
label
=
"手机"
align
=
"center"
prop
=
"adminPhone"
/>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"办公室值班"
align
=
"center"
>
<
el
-
table
-
column
label
=
"人员"
align
=
"center"
prop
=
"officerPerson"
/>
<
el
-
table
-
column
label
=
"值班电话"
align
=
"center"
min
-
width
=
"110px"
prop
=
"officerTel"
/>
<
el
-
table
-
column
label
=
"手机"
align
=
"center"
min
-
width
=
"110px"
prop
=
"officerPhone"
/>
<
el
-
table
-
column
label
=
"人员"
align
=
"center"
prop
=
"officerPerson"
/>
<
el
-
table
-
column
label
=
"值班电话"
align
=
"center"
min
-
width
=
"110px"
prop
=
"officerTel"
/>
<
el
-
table
-
column
label
=
"手机"
align
=
"center"
min
-
width
=
"110px"
prop
=
"officerPhone"
/>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"门卫值班"
align
=
"center"
>
<
el
-
table
-
column
label
=
"人员"
min
-
width
=
"110px"
align
=
"center"
prop
=
"guardPerson"
>
...
...
@@ -318,8 +313,8 @@
<
/div
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"值班电话"
min
-
width
=
"110px"
align
=
"center"
prop
=
"guardTel"
/>
<
el
-
table
-
column
label
=
"手机"
min
-
width
=
"110px"
align
=
"center"
prop
=
"guardPhone"
/>
<
el
-
table
-
column
label
=
"值班电话"
min
-
width
=
"110px"
align
=
"center"
prop
=
"guardTel"
/>
<
el
-
table
-
column
label
=
"手机"
min
-
width
=
"110px"
align
=
"center"
prop
=
"guardPhone"
/>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"学生宿舍值班"
align
=
"center"
>
<
el
-
table
-
column
label
=
"人员"
min
-
width
=
"180px"
align
=
"center"
prop
=
"dormPerson"
>
...
...
@@ -329,26 +324,25 @@
<
/div
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"手机"
min
-
width
=
"110px"
align
=
"center"
prop
=
"dormPhone"
/>
<
el
-
table
-
column
label
=
"手机"
min
-
width
=
"110px"
align
=
"center"
prop
=
"dormPhone"
/>
<
/el-table-column
>
<
/el-table
>
<
el
-
table
key
=
"b"
v
-
else
border
v
-
loading
=
"loading2"
:
data
=
"dutyList.list"
:
span
-
method
=
"objectSpanMethod"
>
<
el
-
table
key
=
"b"
v
-
else
border
v
-
loading
=
"loading2"
:
data
=
"dutyList.list"
:
span
-
method
=
"objectSpanMethod"
>
<
el
-
table
-
column
label
=
"节日"
align
=
"center"
width
=
"180"
>
<
template
slot
-
scope
=
"scope"
>
{{
dutyList
.
holidayName
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"日期"
align
=
"center"
prop
=
"dateAndWeek"
min
-
width
=
"80"
/>
<
el
-
table
-
column
label
=
"带班领导"
align
=
"center"
prop
=
"leader"
/>
<
el
-
table
-
column
label
=
"职务"
align
=
"center"
prop
=
"postName"
/>
<
el
-
table
-
column
label
=
"电话"
align
=
"center"
prop
=
"dutyDeTel"
/>
<
el
-
table
-
column
label
=
"手机"
align
=
"center"
prop
=
"dutyDePhone"
/>
<
el
-
table
-
column
label
=
"值班人员、手机"
align
=
"center"
prop
=
"personAndPhone"
/>
<
el
-
table
-
column
label
=
"日期"
align
=
"center"
prop
=
"dateAndWeek"
min
-
width
=
"80"
/>
<
el
-
table
-
column
label
=
"带班领导"
align
=
"center"
prop
=
"leader"
/>
<
el
-
table
-
column
label
=
"职务"
align
=
"center"
prop
=
"postName"
/>
<
el
-
table
-
column
label
=
"电话"
align
=
"center"
prop
=
"dutyDeTel"
/>
<
el
-
table
-
column
label
=
"手机"
align
=
"center"
prop
=
"dutyDePhone"
/>
<
el
-
table
-
column
label
=
"值班人员、手机"
align
=
"center"
prop
=
"personAndPhone"
/>
<
/el-table
>
<
br
/>
<
br
/>
<
p
><
b
>
说明:
<
/b> {{ dutyList.remarks
}}
</
p
>
<!--
<
/el-card>--
>
<
div
slot
=
"footer"
class
=
"dialog-footer"
>
...
...
@@ -360,7 +354,7 @@
<
div
>
<
el
-
dialog
title
=
"常用功能列表"
:
visible
.
sync
=
"viewDetail1"
width
=
"600px"
append
-
to
-
body
v
-
if
=
"viewDetail1"
>
<
el
-
table
@
row
-
click
=
"clickRow"
ref
=
"table"
:
data
=
"adjustmentBlocks"
@
selection
-
change
=
"handleSelectionChange"
height
=
"260px"
v
-
loading
=
"loading"
>
height
=
"260px"
v
-
loading
=
"loading"
>
<
el
-
table
-
column
type
=
"selection"
width
=
"100"
><
/el-table-column
>
<
el
-
table
-
column
prop
=
"icon"
label
=
"功能图标"
:
show
-
overflow
-
tooltip
=
"true"
>
<
template
slot
-
scope
=
"scope"
>
...
...
@@ -392,9 +386,9 @@
<
/template
>
<
script
>
import
{
Blocks
,
approves
}
from
'@/enums/home'
import
{
getList
,
getInfoOne
}
from
'@/api/smartSchool/informationPush/school'
import
{
getCourseInfoData
}
from
'@/utils/utilLibrary/getCourseInfo'
import
{
Blocks
,
approves
}
from
'@/enums/home'
import
{
getList
,
getInfoOne
}
from
'@/api/smartSchool/informationPush/school'
import
{
getCourseInfoData
}
from
'@/utils/utilLibrary/getCourseInfo'
import
{
getDutyTableList
,
getDutyDetail
,
...
...
@@ -406,10 +400,16 @@ import {
getNoticeList
,
getTaskNum
}
from
'@/api/smartSchool/index'
import
{
getUser
}
from
'@/api/system/user'
import
{
getUser
}
from
'@/api/system/user'
// 任务模块
// import
{
taskList
}
from
"@/api/smartSchool/studentManage/studentLeave"
;
import
{
listPic
}
from
'@/api/smartSchool/schoolManage/introduce/pic'
import
{
listPic
}
from
'@/api/smartSchool/schoolManage/introduce/pic'
import
Cookies
from
"js-cookie"
;
import
*
as
dd
from
'dingtalk-jsapi'
;
import
{
getToken
,
setToken
,
removeToken
}
from
'@/utils/auth'
import
{
getCode
}
from
"@/api/ddLogin"
;
export
default
{
name
:
'Index'
,
...
...
@@ -502,9 +502,13 @@ export default {
}
}
,
created
()
{
this
.
init
()
// 钉钉code码,正式时打开
// this.getCode()
// token,测试用
this
.
csToken
()
}
,
mounted
()
{
this
.
timer
=
setInterval
(()
=>
{
this
.
getMessageList
()
this
.
taskNum
()
...
...
@@ -526,10 +530,79 @@ export default {
}
,
methods
:
{
// 获取code
getCode
()
{
dd
.
getAuthCode
({
corpId
:
'dingaa3937ff8b7dd267f2c783f7214b6d69'
,
success
:
(
res
)
=>
{
console
.
log
(
'获取新的免登码成功'
,
res
);
const
code
=
res
.
code
// this.code = code;
// this.authCodeTimestamp = currentTime;
// console.log('this.authCodeTimestamp', this.authCodeTimestamp);
console
.
log
(
'code'
,
code
);
this
.
getToken
(
code
)
// console.log('loginResponse', loginResponse);
}
,
fail
:
(
res
)
=>
{
console
.
log
(
'获取免登码失败'
,
res
);
}
,
complete
:
()
=>
{
}
,
}
);
}
,
// 获取token
getToken
(
code
)
{
getCode
(
code
).
then
(
res
=>
{
console
.
log
(
'res'
,
res
.
token
);
if
(
res
.
token
)
{
setToken
(
res
.
token
)
this
.
$store
.
commit
(
'SET_TOKEN'
,
res
.
token
)
// this.$router.push(
{
path
:
'/index'
}
);
// 判断当前用户是否已拉取完user_info信息
this
.
$store
.
dispatch
(
'GetInfo'
).
then
((
res
)
=>
{
this
.
$store
.
dispatch
(
'GenerateRoutes'
).
then
(
accessRoutes
=>
{
// 根据roles权限生成可访问的路由表
router
.
addRoutes
(
accessRoutes
)
// 动态添加可访问路由表
this
.
init
()
}
)
}
)
}
else
{
this
.
$message
.
error
(
res
.
message
)
}
}
)
}
,
// 测试token
csToken
()
{
getCode
(
123
).
then
(
res
=>
{
console
.
log
(
'res'
,
res
.
token
);
if
(
res
.
token
)
{
setToken
(
res
.
token
)
this
.
$store
.
commit
(
'SET_TOKEN'
,
res
.
token
)
// this.$router.push(
{
path
:
'/index'
}
);
// 判断当前用户是否已拉取完user_info信息
this
.
$store
.
dispatch
(
'GetInfo'
).
then
((
res
)
=>
{
this
.
$store
.
dispatch
(
'GenerateRoutes'
).
then
(
accessRoutes
=>
{
// 根据roles权限生成可访问的路由表
router
.
addRoutes
(
accessRoutes
)
// 动态添加可访问路由表
this
.
init
()
}
)
}
)
}
else
{
this
.
$message
.
error
(
res
.
message
)
}
}
)
}
,
//从后端获取任务数量
taskNum
()
{
getTaskNum
().
then
(
res
=>
{
console
.
log
(
'taskNumList'
,
res
)
console
.
log
(
'taskNumList'
,
res
)
this
.
taskNumList
=
res
.
data
}
)
}
,
...
...
@@ -576,7 +649,7 @@ export default {
calendarClick
(
calendarDate
)
{
this
.
todayWorkLoading
=
true
let
date
=
new
Date
(
calendarDate
).
toLocaleDateString
()
getThingListByTime
({
calendarDate
:
date
}
).
then
(
res
=>
{
getThingListByTime
({
calendarDate
:
date
}
).
then
(
res
=>
{
if
(
res
.
data
.
length
===
0
)
{
this
.
things
=
''
this
.
haveThings
=
false
...
...
@@ -614,7 +687,7 @@ export default {
// 获取通知公告信息
getMessageList
()
{
getNoticeList
({
pageNum
:
1
,
pageSize
:
5
}
)
getNoticeList
({
pageNum
:
1
,
pageSize
:
5
}
)
.
then
(
response
=>
{
this
.
messageList
=
response
.
rows
}
)
...
...
@@ -797,7 +870,7 @@ export default {
//
}
,
// 合并单元格
objectSpanMethod
({
row
,
column
,
rowIndex
,
columnIndex
}
)
{
objectSpanMethod
({
row
,
column
,
rowIndex
,
columnIndex
}
)
{
if
(
columnIndex
===
0
)
{
if
(
rowIndex
%
this
.
dutyList
.
list
.
length
===
0
)
{
return
{
...
...
@@ -814,7 +887,7 @@ export default {
}
,
// 合并单元格
objectSpanMethod2
({
row
,
column
,
rowIndex
,
columnIndex
}
)
{
objectSpanMethod2
({
row
,
column
,
rowIndex
,
columnIndex
}
)
{
if
(
columnIndex
===
0
)
{
if
(
rowIndex
%
this
.
dutyList
.
list
.
length
===
0
)
{
return
{
...
...
@@ -843,7 +916,7 @@ export default {
}
}
,
arraySpanMethod
({
row
,
column
,
rowIndex
,
columnIndex
}
)
{
arraySpanMethod
({
row
,
column
,
rowIndex
,
columnIndex
}
)
{
if
(
columnIndex
==
0
)
{
if
(
this
.
dateArr
[
rowIndex
])
{
//第1列 日期
...
...
@@ -929,7 +1002,7 @@ export default {
let
images
=
response
.
rows
let
imagess
=
images
.
filter
(
item
=>
item
.
isShow
==
1
)
this
.
images
=
imagess
.
map
(
item
=>
{
return
{
url
:
this
.
pev
+
item
.
picUrl
}
return
{
url
:
this
.
pev
+
item
.
picUrl
}
}
)
}
)
}
...
...
@@ -979,9 +1052,11 @@ export default {
from
{
border
:
2
px
solid
#
ffffff
;
}
50
%
{
border
:
2
px
solid
red
;
}
to
{
border
:
2
px
solid
#
ffffff
;
}
...
...
@@ -1151,8 +1226,6 @@ a:hover {
overflow
:
visible
;
align
-
items
:
center
;
}
<
/style
>
...
...
ruoyi-ui/src/views/login copy.vue
0 → 100644
View file @
8035bbed
<
template
>
<!--
<div
class=
"login-container"
>
-->
<!--
<div
class=
"login-page login-cover"
>
-->
<!--
<div
class=
"cover-container"
>
-->
<!--
<div
class=
"cover-center"
>
-->
<!--
<div
class=
"cover-center__left"
>
-->
<!--
<p
class=
"left-base-content"
>
智慧校园
</p>
-->
<!--
<p>
智慧校园系统是通过信息化手段,实现对校园内各类资源的有效集成 整合和优化,实现资源的有效配置和充分利用,将校务管理过程的优化协调。为校园提供数字化教学、数字化学习、数字化科研和数字化管理。
</p>
-->
<!--
</div>
-->
<!--
<div
class=
"cover-center__right"
>
-->
<!--
<el-image-->
<!-- style="width: 600px;"-->
<!-- :src="require('@/assets/images/logo-login.gif')"-->
<!-- >
</el-image>
-->
<!--
</div>
-->
<!--
</div>
-->
<!--
</div>
-->
<!--
</div>
-->
<!--
</div>
-->
<div
class=
"login"
>
<div
class=
"login-card-container"
>
<div
class=
"login-card-left"
>
<el-image
style=
"width: 600px;"
:src=
"require('@/assets/images/login.png')"
lazy
></el-image>
<!-- :src="require('@/assets/images/logo-login.gif')"-->
</div>
<div
class=
"login-card-right"
>
<el-form
ref=
"loginForm"
:model=
"loginForm"
:rules=
"loginRules"
class=
"login-form"
>
<h3
class=
"title"
>
智慧校园管理系统
</h3>
<el-form-item
prop=
"phonenumber"
>
<el-input
v-model=
"loginForm.phonenumber"
type=
"text"
auto-complete=
"off"
placeholder=
"手机号码"
>
<svg-icon
slot=
"prefix"
icon-class=
"user"
class=
"el-input__icon input-icon"
/>
</el-input>
</el-form-item>
<el-form-item
prop=
"password"
>
<el-input
v-model=
"loginForm.password"
type=
"text"
style=
"text-security:disc; -webkit-text-security:disc;"
auto-complete=
"off"
placeholder=
"密码"
@
keyup
.
enter
.
native=
"handleLogin"
>
<svg-icon
slot=
"prefix"
icon-class=
"password"
class=
"el-input__icon input-icon"
/>
</el-input>
</el-form-item>
<!--
<el-form-item
prop=
"code"
v-if=
"captchaEnabled"
>
-->
<!--
<el-input-->
<!-- v-model="loginForm.code"-->
<!-- auto-complete="off"-->
<!-- placeholder="验证码"-->
<!-- style="width: 63%"-->
<!-- @keyup.enter.native="handleLogin"-->
<!-- >-->
<!--
<svg-icon
slot=
"prefix"
icon-class=
"validCode"
class=
"el-input__icon input-icon"
/>
-->
<!--
</el-input>
-->
<!--
<div
class=
"login-code"
>
-->
<!--
<img
:src=
"codeUrl"
@
click=
"getCode"
class=
"login-code-img"
/>
-->
<!--
</div>
-->
<!--
</el-form-item>
-->
<el-checkbox
v-model=
"loginForm.rememberMe"
style=
"margin:0px 0px 25px 0px;"
>
记住密码
</el-checkbox>
<el-form-item
style=
"width:100%;"
>
<el-button
:loading=
"loading"
size=
"medium"
type=
"primary"
style=
"width:100%;"
@
click
.
native
.
prevent=
"handleLogin"
>
<span
v-if=
"!loading"
>
登 录
</span>
<span
v-else
>
登 录 中...
</span>
</el-button>
<div
style=
"float: right;"
v-if=
"register"
>
<router-link
class=
"link-type"
:to=
"'/register'"
>
立即注册
</router-link>
</div>
</el-form-item>
</el-form>
</div>
</div>
<!-- 底部 -->
<div
class=
"el-login-footer"
>
<span>
© 2021 zhimin Copyright
</span>
</div>
</div>
</
template
>
<
script
>
import
{
getCodeImg
}
from
"@/api/login"
;
import
Cookies
from
"js-cookie"
;
import
{
encrypt
,
decrypt
}
from
'@/utils/jsencrypt'
export
default
{
name
:
"Login"
,
data
()
{
return
{
codeUrl
:
""
,
loginForm
:
{
// username: "admin",
phonenumber
:
''
,
password
:
""
,
rememberMe
:
false
,
code
:
""
,
uuid
:
""
},
loginRules
:
{
// username: [
// { required: true, trigger: "blur", message: "请输入您的账号" }
// ],
phonenumber
:
[
{
required
:
true
,
trigger
:
"blur"
,
message
:
"请输入您的手机号码"
}
],
password
:
[
{
required
:
true
,
trigger
:
"blur"
,
message
:
"请输入您的密码"
}
],
// code: [{ required: true, trigger: "change", message: "请输入验证码" }]
},
loading
:
false
,
// 验证码开关
// captchaEnabled: true,
captchaEnabled
:
false
,
// 注册开关
register
:
false
,
redirect
:
undefined
};
},
watch
:
{
$route
:
{
handler
:
function
(
route
)
{
this
.
redirect
=
route
.
query
&&
route
.
query
.
redirect
;
},
immediate
:
true
}
},
created
()
{
},
mounted
()
{
this
.
getCode
();
this
.
getCookie
();
},
methods
:
{
getCode
()
{
getCodeImg
().
then
(
res
=>
{
this
.
captchaEnabled
=
res
.
captchaEnabled
===
undefined
?
true
:
res
.
captchaEnabled
;
if
(
this
.
captchaEnabled
)
{
this
.
codeUrl
=
"data:image/gif;base64,"
+
res
.
img
;
this
.
loginForm
.
uuid
=
res
.
uuid
;
}
});
},
getCookie
()
{
// const username = Cookies.get("username");
// 获取手机号码
const
phonenumber
=
Cookies
.
get
(
"phonenumber"
);
const
password
=
Cookies
.
get
(
"password"
);
const
rememberMe
=
Cookies
.
get
(
'rememberMe'
)
this
.
loginForm
=
{
// username: username === undefined ? this.loginForm.username : username,
phonenumber
:
phonenumber
===
undefined
?
this
.
loginForm
.
phonenumber
:
phonenumber
,
password
:
password
===
undefined
?
this
.
loginForm
.
password
:
decrypt
(
password
),
rememberMe
:
rememberMe
===
undefined
?
false
:
Boolean
(
rememberMe
)
};
},
handleLogin
()
{
this
.
$refs
.
loginForm
.
validate
(
valid
=>
{
if
(
valid
)
{
this
.
loading
=
true
;
if
(
this
.
loginForm
.
rememberMe
)
{
// Cookies.set("username", this.loginForm.username, { expires: 30 });
Cookies
.
set
(
"phonenumber"
,
this
.
loginForm
.
phonenumber
,
{
expires
:
30
});
Cookies
.
set
(
"password"
,
encrypt
(
this
.
loginForm
.
password
),
{
expires
:
30
});
Cookies
.
set
(
'rememberMe'
,
this
.
loginForm
.
rememberMe
,
{
expires
:
30
});
}
else
{
// Cookies.remove("username");
Cookies
.
remove
(
"phonenumber"
);
Cookies
.
remove
(
"password"
);
Cookies
.
remove
(
'rememberMe'
);
}
this
.
$store
.
dispatch
(
"Login"
,
this
.
loginForm
).
then
(()
=>
{
this
.
$router
.
push
({
path
:
this
.
redirect
||
"/"
}).
catch
(()
=>
{
});
}).
catch
(()
=>
{
this
.
loading
=
false
;
if
(
this
.
captchaEnabled
)
{
this
.
getCode
();
}
});
}
});
}
}
};
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
>
.login
{
background-color
:
rgba
(
0
,
191
,
255
,
0.15
);
}
.login-container
{
//
transition
:
transform
.5s
ease-in
;
.login-page
{
//
height
:
100vh
;
}
}
//
封面背景
.login-cover
{
//
background-image
:
url("~@/assets/images/head_img.png")
;
background-size
:
cover
;
}
//
封面内容
.cover-container
{
width
:
1200px
;
margin
:
auto
;
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
.cover-center
{
position
:
relative
;
.cover-center__left
{
position
:
absolute
;
left
:
0
;
top
:
0
;
display
:
flex
;
flex-direction
:
column
;
}
.cover-center__right
{
position
:
absolute
;
width
:
559px
;
height
:
559px
;
right
:
0
;
}
}
}
//
封面左侧内容
.left-base-content
{
font-size
:
50px
;
}
//
登录页
.login
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
height
:
100vh
;
//
background-image
:
url("~@/assets/images/head_img.png")
;
background-size
:
cover
;
.login-card-container
{
display
:
flex
;
//
padding
:
20px
;
//
justify-content
:
center
;
//
align-items
:
center
;
.login-card-right
{
display
:
flex
;
padding-left
:
256px
;
}
}
}
.el-card.is-always-shadow
{
-webkit-box-shadow
:
0
2px
12px
0
rgba
(
0
,
0
,
0
,
0.1
);
box-shadow
:
0
2px
12px
0
rgba
(
0
,
0
,
0
,
0.1
);
background-color
:
#fff4
;
backdrop-filter
:
blur
(
6px
);
}
.title
{
margin
:
0px
auto
30px
auto
;
text-align
:
center
;
//
color
:
#707070
;
color
:
#0988ef
;
}
.login-form
{
border-radius
:
6px
;
border
:
1px
solid
#e0e0e0
;
box-shadow
:
0
0
10px
1px
#e0e0e0
;
background
:
aliceblue
;
width
:
350px
;
margin
:
auto
;
padding
:
30px
20px
20px
20px
;
.el-input
{
height
:
38px
;
input
{
height
:
38px
;
}
}
.input-icon
{
height
:
39px
;
width
:
14px
;
margin-left
:
2px
;
}
}
.el-login-footer
{
height
:
40px
;
line-height
:
40px
;
position
:
absolute
;
bottom
:
0
;
width
:
100%
;
text-align
:
center
;
//
color
:
#fff
;
color
:
#989797
;
font-family
:
Arial
;
font-size
:
12px
;
letter-spacing
:
1px
;
}
</
style
>
ruoyi-ui/src/views/login.vue
View file @
8035bbed
<
template
>
<button
@
click=
"getCode"
>
123
</button>
<!--
<div
class=
"login-container"
>
-->
<!--
<div
class=
"login-page login-cover"
>
-->
<!--
<div
class=
"cover-container"
>
-->
...
...
@@ -17,64 +18,44 @@
<!--
</div>
-->
<!--
</div>
-->
<!--
</div>
-->
<div
class=
"login"
>
<
!--
<
div
class=
"login"
>
<div
class=
"login-card-container"
>
<div
class=
"login-card-left"
>
<el-image
style=
"width: 600px;"
:src=
"require('@/assets/images/login.png')"
lazy
></el-image>
<!-- :src="require('@/assets/images/logo-login.gif')"-->
</div>
<div
class=
"login-card-right"
>
<el-image
style=
"width: 600px;"
:src=
"require('@/assets/images/login.png')"
lazy
></el-image>
-->
<!-- :src="require('@/assets/images/logo-login.gif')"-->
<!--
</div>
-->
<!--
<div
class=
"login-card-right"
>
<el-form
ref=
"loginForm"
:model=
"loginForm"
:rules=
"loginRules"
class=
"login-form"
>
<h3
class=
"title"
>
智慧校园管理系统
</h3>
<el-form-item
prop=
"phonenumber"
>
<el-input
v-model=
"loginForm.phonenumber"
type=
"text"
auto-complete=
"off"
placeholder=
"手机号码"
>
<svg-icon
slot=
"prefix"
icon-class=
"user"
class=
"el-input__icon input-icon"
/>
<el-input
v-model=
"loginForm.phonenumber"
type=
"text"
auto-complete=
"off"
placeholder=
"手机号码"
>
<svg-icon
slot=
"prefix"
icon-class=
"user"
class=
"el-input__icon input-icon"
/>
</el-input>
</el-form-item>
<el-form-item
prop=
"password"
>
<el-input
v-model=
"loginForm.password"
type=
"text"
style=
"text-security:disc; -webkit-text-security:disc;"
auto-complete=
"off"
placeholder=
"密码"
@
keyup
.
enter
.
native=
"handleLogin"
>
<svg-icon
slot=
"prefix"
icon-class=
"password"
class=
"el-input__icon input-icon"
/>
<el-input
v-model=
"loginForm.password"
type=
"text"
style=
"text-security:disc; -webkit-text-security:disc;"
auto-complete=
"off"
placeholder=
"密码"
@
keyup
.
enter
.
native=
"handleLogin"
>
<svg-icon
slot=
"prefix"
icon-class=
"password"
class=
"el-input__icon input-icon"
/>
</el-input>
</el-form-item>
<!--
<el-form-item
prop=
"code"
v-if=
"captchaEnabled"
>
-->
<!--
<el-input-->
<!-- v-model="loginForm.code"-->
<!-- auto-complete="off"-->
<!-- placeholder="验证码"-->
<!-- style="width: 63%"-->
<!-- @keyup.enter.native="handleLogin"-->
<!-- >-->
<!--
<svg-icon
slot=
"prefix"
icon-class=
"validCode"
class=
"el-input__icon input-icon"
/>
-->
<!--
</el-input>
-->
<!--
<div
class=
"login-code"
>
-->
<!--
<img
:src=
"codeUrl"
@
click=
"getCode"
class=
"login-code-img"
/>
-->
<!--
</div>
-->
<!--
</el-form-item>
-->
<el-checkbox
v-model=
"loginForm.rememberMe"
style=
"margin:0px 0px 25px 0px;"
>
记住密码
</el-checkbox>
</el-form-item>
-->
<!--
<el-form-item
prop=
"code"
v-if=
"captchaEnabled"
>
-->
<!--
<el-input-->
<!-- v-model="loginForm.code"-->
<!-- auto-complete="off"-->
<!-- placeholder="验证码"-->
<!-- style="width: 63%"-->
<!-- @keyup.enter.native="handleLogin"-->
<!-- >-->
<!--
<svg-icon
slot=
"prefix"
icon-class=
"validCode"
class=
"el-input__icon input-icon"
/>
-->
<!--
</el-input>
-->
<!--
<div
class=
"login-code"
>
-->
<!--
<img
:src=
"codeUrl"
@
click=
"getCode"
class=
"login-code-img"
/>
-->
<!--
</div>
-->
<!--
</el-form-item>
-->
<!--
<el-checkbox
v-model=
"loginForm.rememberMe"
style=
"margin:0px 0px 25px 0px;"
>
记住密码
</el-checkbox>
<el-form-item
style=
"width:100%;"
>
<el-button
:loading=
"loading"
size=
"medium"
type=
"primary"
style=
"width:100%;"
@
click
.
native
.
prevent=
"handleLogin"
>
<el-button
:loading=
"loading"
size=
"medium"
type=
"primary"
style=
"width:100%;"
@
click
.
native
.
prevent=
"handleLogin"
>
<span
v-if=
"!loading"
>
登 录
</span>
<span
v-else
>
登 录 中...
</span>
</el-button>
...
...
@@ -84,23 +65,34 @@
</el-form-item>
</el-form>
</div>
</div>
<!-- 底部 -->
<div
class=
"el-login-footer"
>
</div>
-->
<!-- 底部 -->
<!--
<div
class=
"el-login-footer"
>
<span>
© 2021 zhimin Copyright
</span>
</div>
</div>
</div>
-->
</
template
>
<
script
>
import
{
getCodeImg
}
from
"@/api/login"
;
import
{
getCodeImg
}
from
"@/api/login"
;
import
Cookies
from
"js-cookie"
;
import
{
encrypt
,
decrypt
}
from
'@/utils/jsencrypt'
import
{
encrypt
,
decrypt
}
from
'@/utils/jsencrypt'
import
*
as
dd
from
'dingtalk-jsapi'
;
import
{
getCode
}
from
"@/api/ddLogin"
;
import
{
getToken
,
setToken
,
removeToken
}
from
'@/utils/auth'
import
VueRouter
from
"vue-router"
;
export
default
{
name
:
"Login"
,
data
()
{
return
{
code
:
null
,
token
:
null
,
authCodeTimestamp
:
0
,
// 用于存储免登码的时间戳
authCodeExpiration
:
5
*
60
*
1000
,
// 免登码有效期(假设为5分钟)
codeUrl
:
""
,
loginForm
:
{
// username: "admin",
...
...
@@ -115,10 +107,10 @@ export default {
// { required: true, trigger: "blur", message: "请输入您的账号" }
// ],
phonenumber
:
[
{
required
:
true
,
trigger
:
"blur"
,
message
:
"请输入您的手机号码"
}
{
required
:
true
,
trigger
:
"blur"
,
message
:
"请输入您的手机号码"
}
],
password
:
[
{
required
:
true
,
trigger
:
"blur"
,
message
:
"请输入您的密码"
}
{
required
:
true
,
trigger
:
"blur"
,
message
:
"请输入您的密码"
}
],
// code: [{ required: true, trigger: "change", message: "请输入验证码" }]
},
...
...
@@ -140,70 +132,137 @@ export default {
}
},
created
()
{
this
.
getCode
();
},
mounted
()
{
this
.
getCode
();
this
.
getCookie
();
//
this.getCode();
//
this.getCookie();
},
methods
:
{
// 获取code
getCode
()
{
getCodeImg
().
then
(
res
=>
{
this
.
captchaEnabled
=
res
.
captchaEnabled
===
undefined
?
true
:
res
.
captchaEnabled
;
if
(
this
.
captchaEnabled
)
{
this
.
codeUrl
=
"data:image/gif;base64,"
+
res
.
img
;
this
.
loginForm
.
uuid
=
res
.
uuid
;
}
dd
.
getAuthCode
({
corpId
:
'dingaa3937ff8b7dd267f2c783f7214b6d69'
,
success
:
(
res
)
=>
{
console
.
log
(
'获取新的免登码成功'
,
res
);
const
code
=
res
.
code
// this.code = code;
// this.authCodeTimestamp = currentTime;
// console.log('this.authCodeTimestamp', this.authCodeTimestamp);
console
.
log
(
'code'
,
code
);
this
.
getToken
(
code
)
// console.log('loginResponse', loginResponse);
},
fail
:
(
res
)
=>
{
console
.
log
(
'获取免登码失败'
,
res
);
},
complete
:
()
=>
{
},
});
},
getCookie
()
{
// const username = Cookies.get("username");
// 获取手机号码
const
phonenumber
=
Cookies
.
get
(
"phonenumber"
);
const
password
=
Cookies
.
get
(
"password"
);
const
rememberMe
=
Cookies
.
get
(
'rememberMe'
)
this
.
loginForm
=
{
// username: username === undefined ? this.loginForm.username : username,
phonenumber
:
phonenumber
===
undefined
?
this
.
loginForm
.
phonenumber
:
phonenumber
,
password
:
password
===
undefined
?
this
.
loginForm
.
password
:
decrypt
(
password
),
rememberMe
:
rememberMe
===
undefined
?
false
:
Boolean
(
rememberMe
)
};
},
handleLogin
()
{
this
.
$refs
.
loginForm
.
validate
(
valid
=>
{
if
(
valid
)
{
this
.
loading
=
true
;
if
(
this
.
loginForm
.
rememberMe
)
{
// Cookies.set("username", this.loginForm.username, { expires: 30 });
Cookies
.
set
(
"phonenumber"
,
this
.
loginForm
.
phonenumber
,
{
expires
:
30
});
Cookies
.
set
(
"password"
,
encrypt
(
this
.
loginForm
.
password
),
{
expires
:
30
});
Cookies
.
set
(
'rememberMe'
,
this
.
loginForm
.
rememberMe
,
{
expires
:
30
});
}
else
{
// Cookies.remove("username");
Cookies
.
remove
(
"phonenumber"
);
Cookies
.
remove
(
"password"
);
Cookies
.
remove
(
'rememberMe'
);
}
this
.
$store
.
dispatch
(
"Login"
,
this
.
loginForm
).
then
(()
=>
{
this
.
$router
.
push
({
path
:
this
.
redirect
||
"/"
}).
catch
(()
=>
{
});
}).
catch
(()
=>
{
this
.
loading
=
false
;
if
(
this
.
captchaEnabled
)
{
this
.
getCode
();
}
});
// 获取token
getToken
(
code
)
{
getCode
(
code
).
then
(
res
=>
{
console
.
log
(
'res'
,
res
);
if
(
res
)
{
setToken
(
res
)
this
.
$store
.
commit
(
'SET_TOKEN'
,
res
)
this
.
$router
.
push
({
path
:
'/'
});
// 判断当前用户是否已拉取完user_info信息
this
.
$store
.
dispatch
(
'GetInfo'
).
then
((
res
)
=>
{
this
.
$store
.
dispatch
(
'GenerateRoutes'
).
then
(
accessRoutes
=>
{
// 根据roles权限生成可访问的路由表
router
.
addRoutes
(
accessRoutes
)
// 动态添加可访问路由表
})
})
}
else
{
this
.
$message
.
error
(
res
.
message
)
}
});
}
})
},
// 获取token
// async loginWithAuthCode(code) {
// console.log('code', code);
// try {
// // 向后端发送请求,使用免登码进行登录
// const loginResponse = await getCode({ code });
// console.log('code', code);
// this.$router.push({ path: '/index' });
// console.log('跳转页面');
// // 处理登录成功的情况,可能需要保存用户信息或者跳转到其他页面
// console.log('用户登录成功', loginResponse);
// const { token } = loginResponse.data; // 假设返回的数据中包含 token 字段
// console.log('用户 Token:', token); // 打印返回的 Token
// } catch (error) {
// // 处理登录失败的情况
// // console.error('登录失败', error);
// }
// }
// getCode() {
// getCodeImg().then(res => {
// this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled;
// if (this.captchaEnabled) {
// this.codeUrl = "data:image/gif;base64," + res.img;
// this.loginForm.uuid = res.uuid;
// }
// });
// },
// getCookie() {
// // const username = Cookies.get("username");
// // 获取手机号码
// const phonenumber = Cookies.get("phonenumber");
// const password = Cookies.get("password");
// const rememberMe = Cookies.get('rememberMe')
// this.loginForm = {
// // username: username === undefined ? this.loginForm.username : username,
// phonenumber: phonenumber === undefined ? this.loginForm.phonenumber : phonenumber,
// password: password === undefined ? this.loginForm.password : decrypt(password),
// rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
// };
// },
// handleLogin() {
// this.$refs.loginForm.validate(valid => {
// if (valid) {
// this.loading = true;
// if (this.loginForm.rememberMe) {
// // Cookies.set("username", this.loginForm.username, { expires: 30 });
// Cookies.set("phonenumber", this.loginForm.phonenumber, { expires: 30 });
// Cookies.set("password", encrypt(this.loginForm.password), { expires: 30 });
// Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 });
// } else {
// // Cookies.remove("username");
// Cookies.remove("phonenumber");
// Cookies.remove("password");
// Cookies.remove('rememberMe');
// }
// this.$store.dispatch("Login", this.loginForm).then(() => {
// this.$router.push({ path: this.redirect || "/" }).catch(() => {
// });
// }).catch(() => {
// this.loading = false;
// if (this.captchaEnabled) {
// this.getCode();
// }
// });
// }
// });
// }
}
};
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
>
.login
{
background-color
:
rgba
(
0
,
191
,
255
,
0.15
);
background-color
:
rgba
(
0
,
191
,
255
,
0.15
);
}
.login-container
{
//
transition
:
transform
.5s
ease-in
;
...
...
ruoyi-ui/src/views/whitePage.vue
0 → 100644
View file @
8035bbed
<
template
>
<div>
<button
@
click=
"getAuthCode"
>
获取钉钉授权码
</button>
</div>
</
template
>
<
script
>
import
*
as
dd
from
'dingtalk-jsapi'
;
import
{
getCode
}
from
"@/api/ddLogin"
;
export
default
{
data
()
{
return
{
redirect
:
"/index"
,
// 这里假设要跳转到首页
code
:
null
,
token
:
null
,
authCodeTimestamp
:
0
,
// 用于存储免登码的时间戳
authCodeExpiration
:
5
*
60
*
1000
,
// 免登码有效期(假设为5分钟)
};
},
methods
:
{
getAuthCode
()
{
// 检查是否有有效的免登码
const
currentTime
=
Date
.
now
();
console
.
log
(
currentTime
);
if
(
this
.
code
&&
currentTime
-
this
.
authCodeTimestamp
<
this
.
authCodeExpiration
)
{
// 使用存储的免登码
console
.
log
(
'使用缓存的免登码'
,
this
.
code
);
this
.
loginWithAuthCode
(
this
.
code
);
return
;
}
// 获取新的免登码
dd
.
getAuthCode
({
corpId
:
'dingaa3937ff8b7dd267f2c783f7214b6d69'
,
success
:
(
res
)
=>
{
console
.
log
(
'获取新的免登码成功'
,
res
);
const
{
code
}
=
res
;
// 存储新的免登码和时间戳
this
.
code
=
code
;
this
.
authCodeTimestamp
=
currentTime
;
},
fail
:
(
res
)
=>
{
console
.
log
(
'获取免登码失败'
,
res
);
},
complete
:
()
=>
{
},
});
},
async
loginWithAuthCode
(
code
)
{
console
.
log
(
'code'
,
code
);
try
{
// 向后端发送请求,使用免登码进行登录
const
loginResponse
=
await
getCode
({
code
});
console
.
log
(
'code'
,
code
);
console
.
log
(
'跳转页面'
);
// 处理登录成功的情况,可能需要保存用户信息或者跳转到其他页面
console
.
log
(
'用户登录成功'
,
loginResponse
);
const
{
token
}
=
loginResponse
.
data
;
// 假设返回的数据中包含 token 字段
console
.
log
(
'用户 Token:'
,
token
);
// 打印返回的 Token
this
.
$router
.
push
({
path
:
"/index"
})
}
catch
(
error
)
{
// 处理登录失败的情况
// console.error('登录失败', error);
}
}
},
};
</
script
>
\ No newline at end of file
ruoyi-ui/vue.config.js
View file @
8035bbed
...
...
@@ -20,6 +20,7 @@ module.exports = {
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
publicPath
:
process
.
env
.
NODE_ENV
===
"production"
?
"/"
:
"/"
,
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
// publicPath: "/zpy",
outputDir
:
"dist"
,
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
assetsDir
:
"static"
,
...
...
@@ -30,27 +31,28 @@ module.exports = {
productionSourceMap
:
false
,
// webpack-dev-server 相关配置
devServer
:
{
host
:
"0.0.0.0"
,
port
:
port
,
// host: "0.0.0.0",
host
:
""
,
port
:
1024
,
hot
:
true
,
open
:
true
,
proxy
:
{
// detail: https://cli.vuejs.org/config/#devserver-proxy
[
process
.
env
.
VUE_APP_BASE_API
]:
{
//target: `http://localhost:8848`,
// target: ` http://192.168.1
37.1
:8848`,
// target: ` http://192.168.1
.120
:8848`,
//target: ` http://43.143.63.140:8848`,
//target: ` http://43.143.63.140:8095`,
//部署时后端地址
//target: `http://47.105.176.202:8137`,
//学校内网
// target: `http://10.20.100.201:57321`,
target
:
`http://
192.168.1.116:8848
`
,
// target: `http://192.168.1.11
6
:8848`,
target
:
`http://
47.105.176.202:5112
`
,
// target: `http://192.168.1.11
3
:8848`,
changeOrigin
:
true
,
pathRewrite
:
{
[
"^"
+
process
.
env
.
VUE_APP_BASE_API
]:
""
,
[
"^"
+
process
.
env
.
VUE_APP_BASE_API
]:
"
"
,
},
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment