Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-business
/
website-middleground
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit eb153561
authored
Jul 27, 2024
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加上传和新增公告逻辑
1 parent
e6f0776b
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
4 deletions
src/utils/http.ts
src/utils/request.ts
src/views/investorRelated/components/AddForm.vue
src/utils/http.ts
View file @
eb15356
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Author: huyue
* @Date: 2022-08-23 11:04:56
* @Date: 2022-08-23 11:04:56
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2024-07-2
5 11:51:11
* @LastEditTime: 2024-07-2
6 22:26:13
*/
*/
import
axios
,
{
AxiosInstance
,
AxiosRequestConfig
,
AxiosResponse
,
AxiosError
}
from
'axios'
import
axios
,
{
AxiosInstance
,
AxiosRequestConfig
,
AxiosResponse
,
AxiosError
}
from
'axios'
// import { Toast } from 'vant';
// import { Toast } from 'vant';
...
@@ -29,7 +29,7 @@ interface Config {
...
@@ -29,7 +29,7 @@ interface Config {
}
}
const
mockConfig
:
Config
=
JSON
.
parse
(
options
)
const
mockConfig
:
Config
=
JSON
.
parse
(
options
)
const
{
response
,
request
,
sign
,
secret
}
=
mockConfig
const
{
response
,
request
,
sign
,
secret
}
=
mockConfig
//
axios.defaults.baseURL = request.baseURL
axios
.
defaults
.
baseURL
=
request
.
baseURL
// 配置新建一个axios 实例
// 配置新建一个axios 实例
const
service
:
AxiosInstance
=
axios
.
create
({
const
service
:
AxiosInstance
=
axios
.
create
({
timeout
:
50000
,
timeout
:
50000
,
...
...
src/utils/request.ts
View file @
eb15356
...
@@ -3,11 +3,12 @@
...
@@ -3,11 +3,12 @@
* @Author: huyue
* @Author: huyue
* @Date: 2022-12-06 16:17:36
* @Date: 2022-12-06 16:17:36
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2024-07-2
5 11:23:29
* @LastEditTime: 2024-07-2
6 22:26:36
*/
*/
import
http
from
'./http'
import
http
from
'./http'
import
{
useUserStore
}
from
'../store/user'
import
{
useUserStore
}
from
'../store/user'
const
PATH
=
'rop-sk-gw/router'
const
PATH
=
'rop-sk-gw/router'
const
UPLOADPATH
=
'rop-scrm-carlife/router'
const
req
:
any
=
(
url
:
string
,
data
:
any
=
{},
returnAll
=
false
,
method
=
'POST'
,)
=>
{
const
req
:
any
=
(
url
:
string
,
data
:
any
=
{},
returnAll
=
false
,
method
=
'POST'
,)
=>
{
data
.
method
=
url
data
.
method
=
url
const
options
=
{
const
options
=
{
...
@@ -19,7 +20,19 @@ const req: any = (url: string, data: any = {}, returnAll = false, method = 'POST
...
@@ -19,7 +20,19 @@ const req: any = (url: string, data: any = {}, returnAll = false, method = 'POST
}
}
return
http
(
options
)
return
http
(
options
)
}
}
const
uploadReq
=
(
url
:
string
,
data
:
any
=
{},
returnAll
=
false
,
method
=
'POST'
,)
=>
{
data
.
method
=
url
const
options
=
{
domain
:
'uploadRequest'
,
url
:
UPLOADPATH
,
method
,
data
,
returnAll
}
return
http
(
options
)
}
export
{
export
{
req
req
,
uploadReq
}
}
\ No newline at end of file
\ No newline at end of file
src/views/investorRelated/components/AddForm.vue
View file @
eb15356
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
Attach a file
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 post a comment