refactor
This commit is contained in:
@@ -1,16 +1,25 @@
|
||||
import fetch from 'utils/fetch'
|
||||
import fetch from '@/utils/fetch'
|
||||
|
||||
export function getList() {
|
||||
export function fetchList(query) {
|
||||
return fetch({
|
||||
url: '/article/list',
|
||||
method: 'get'
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getArticle() {
|
||||
export function fetchArticle() {
|
||||
return fetch({
|
||||
url: '/article/detail',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchPv(pv) {
|
||||
return fetch({
|
||||
url: '/article/pv',
|
||||
method: 'get',
|
||||
params: { pv }
|
||||
})
|
||||
}
|
||||
|
||||
|
@@ -1,17 +0,0 @@
|
||||
import fetch from 'utils/fetch'
|
||||
|
||||
export function fetchList(query) {
|
||||
return fetch({
|
||||
url: '/article_table/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchPv(pv) {
|
||||
return fetch({
|
||||
url: '/article_table/pv',
|
||||
method: 'get',
|
||||
params: { pv }
|
||||
})
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
import fetch from 'utils/fetch'
|
||||
import fetch from '@/utils/fetch'
|
||||
|
||||
export function loginByUsername(username, password) {
|
||||
const data = {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import fetch from 'utils/fetch'
|
||||
import fetch from '@/utils/fetch'
|
||||
|
||||
export function getToken() {
|
||||
return fetch({
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import fetch from 'utils/fetch'
|
||||
import fetch from '@/utils/fetch'
|
||||
|
||||
export function userSearch(name) {
|
||||
return fetch({
|
||||
|
Reference in New Issue
Block a user