Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
VueElementTemplate
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
JIRA
JIRA
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
黄瑜
VueElementTemplate
Commits
61deec54
Commit
61deec54
authored
Nov 07, 2017
by
Pan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor:change name=> fetch.js to request.js
parent
5eda0685
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
14 deletions
+14
-14
article.js
src/api/article.js
+4
-4
login.js
src/api/login.js
+4
-4
qiniu.js
src/api/qiniu.js
+2
-2
remoteSearch.js
src/api/remoteSearch.js
+2
-2
index.vue
src/components/ImageCropper/index.vue
+2
-2
request.js
src/utils/request.js
+0
-0
No files found.
src/api/article.js
View file @
61deec54
import
fetch
from
'@/utils/fetch
'
import
request
from
'@/utils/request
'
export
function
fetchList
(
query
)
{
return
fetch
({
return
request
({
url
:
'/article/list'
,
method
:
'get'
,
params
:
query
...
...
@@ -9,14 +9,14 @@ export function fetchList(query) {
}
export
function
fetchArticle
()
{
return
fetch
({
return
request
({
url
:
'/article/detail'
,
method
:
'get'
})
}
export
function
fetchPv
(
pv
)
{
return
fetch
({
return
request
({
url
:
'/article/pv'
,
method
:
'get'
,
params
:
{
pv
}
...
...
src/api/login.js
View file @
61deec54
import
fetch
from
'@/utils/fetch
'
import
request
from
'@/utils/request
'
export
function
loginByUsername
(
username
,
password
)
{
const
data
=
{
username
,
password
}
return
fetch
({
return
request
({
url
:
'/login/login'
,
method
:
'post'
,
data
...
...
@@ -13,14 +13,14 @@ export function loginByUsername(username, password) {
}
export
function
logout
()
{
return
fetch
({
return
request
({
url
:
'/login/logout'
,
method
:
'post'
})
}
export
function
getUserInfo
(
token
)
{
return
fetch
({
return
request
({
url
:
'/user/info'
,
method
:
'get'
,
params
:
{
token
}
...
...
src/api/qiniu.js
View file @
61deec54
import
fetch
from
'@/utils/fetch
'
import
request
from
'@/utils/request
'
export
function
getToken
()
{
return
fetch
({
return
request
({
url
:
'/qiniu/upload/token'
,
// 假地址 自行替换
method
:
'get'
})
...
...
src/api/remoteSearch.js
View file @
61deec54
import
fetch
from
'@/utils/fetch
'
import
request
from
'@/utils/request
'
export
function
userSearch
(
name
)
{
return
fetch
({
return
request
({
url
:
'/search/user'
,
method
:
'get'
,
params
:
{
name
}
...
...
src/components/ImageCropper/index.vue
View file @
61deec54
...
...
@@ -105,7 +105,7 @@
<
script
>
/* eslint-disable */
import
{
effectRipple
,
data2blob
}
from
'./utils'
;
import
fetch
from
'utils/fetch
'
;
import
request
from
'utils/request
'
;
import
langBag
from
'./lang'
;
const
mimes
=
{
'jpg'
:
'image/jpeg'
,
...
...
@@ -672,7 +672,7 @@
that
.
loading
=
1
;
that
.
setStep
(
3
);
that
.
$emit
(
'crop-success'
,
createImgUrl
,
field
,
ki
);
fetch
({
request
({
url
,
method
:
'post'
,
data
:
fmData
...
...
src/utils/
fetch
.js
→
src/utils/
request
.js
View file @
61deec54
File moved
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