明树Git Lab
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
J
jt_front
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
jt_front
Commits
43d73b63
Commit
43d73b63
authored
Dec 02, 2025
by
yangyajing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目管理数据对接
parent
cd2cfd16
Pipeline
#104032
failed with stage
in 2 seconds
Changes
4
Pipelines
1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
136 additions
and
43 deletions
+136
-43
https.js
src/data/https.js
+3
-3
main.js
src/main.js
+2
-0
addProject.vue
src/views/managePage/addProject.vue
+128
-40
window.js
src/window.js
+3
-0
No files found.
src/data/https.js
View file @
43d73b63
import
axios
from
"axios"
;
import
{
ElMessage
}
from
"element-plus"
;
import
windowConfig
from
"@/window"
;
axios
.
interceptors
.
request
.
use
(
function
(
config
)
{
let
token
=
"8681f75e775447f7903708c55a35634e"
;
if
(
token
)
{
...
...
@@ -23,12 +24,11 @@ axios.interceptors.response.use(response => {
}
return
Promise
.
reject
(
err
);
});
let
baseUrl
=
"http://10.40.8.9:3000"
export
function
$get
({
url
,
params
=
{},
callback
})
{
return
axios
({
method
:
"get"
,
url
:
baseUrl
+
url
,
url
:
windowConfig
.
baseUrl
+
url
,
params
}).
then
(
response
=>
{
callback
&&
callback
(
response
.
data
);
...
...
@@ -39,7 +39,7 @@ export function $get ({ url, params = {}, callback }) {
};
export
function
$post
({
url
,
data
=
{},
callback
})
{
return
axios
.
post
(
baseUrl
+
url
,
data
).
then
((
response
)
=>
{
return
axios
.
post
(
windowConfig
.
baseUrl
+
url
,
data
).
then
((
response
)
=>
{
if
(
response
.
code
===
0
)
{
callback
&&
callback
(
response
.
data
);
}
else
{
...
...
src/main.js
View file @
43d73b63
...
...
@@ -9,11 +9,13 @@ import { createPinia } from 'pinia';
import
"./assets/fonts/font.less"
;
// 字体样式
import
"../public/iconFont/iconfont.css"
;
// 图标字体样式
import
{
$get
,
$post
}
from
"@/data/https.js"
;
import
windowConfig
from
"@/window"
;
const
pinia
=
createPinia
()
const
app
=
createApp
(
App
)
app
.
config
.
globalProperties
.
$get
=
$get
;
app
.
config
.
globalProperties
.
$post
=
$post
;
app
.
config
.
globalProperties
.
windowConfig
=
windowConfig
;
for
(
const
[
key
,
component
]
of
Object
.
entries
(
ElIcons
))
{
app
.
component
(
key
,
component
)
}
...
...
src/views/managePage/addProject.vue
View file @
43d73b63
This diff is collapsed.
Click to expand it.
src/window.js
0 → 100644
View file @
43d73b63
export
default
{
baseUrl
:
"http://10.40.8.9:3000"
};
\ No newline at end of file
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