This commit is contained in:
Pan
2017-08-23 11:16:54 +08:00
committed by 花裤衩
parent 33a4369cd7
commit 385ec5a762
18 changed files with 34 additions and 113 deletions

View File

@@ -1,13 +1,13 @@
import fetch from 'utils/fetch'
export function getList () {
export function getList() {
return fetch({
url: '/article/list',
method: 'get'
})
}
export function getArticle () {
export function getArticle() {
return fetch({
url: '/article/detail',
method: 'get'

View File

@@ -1,6 +1,6 @@
import fetch from 'utils/fetch'
export function fetchList (query) {
export function fetchList(query) {
return fetch({
url: '/article_table/list',
method: 'get',
@@ -8,7 +8,7 @@ export function fetchList (query) {
})
}
export function fetchPv (pv) {
export function fetchPv(pv) {
return fetch({
url: '/article_table/pv',
method: 'get',

View File

@@ -1,6 +1,6 @@
import fetch from 'utils/fetch'
export function loginByUsername (username, password) {
export function loginByUsername(username, password) {
const data = {
username,
password
@@ -12,14 +12,14 @@ export function loginByUsername (username, password) {
})
}
export function logout () {
export function logout() {
return fetch({
url: '/login/logout',
method: 'post'
})
}
export function getInfo (token) {
export function getInfo(token) {
return fetch({
url: '/user/info',
method: 'get',

View File

@@ -1,6 +1,6 @@
import fetch from 'utils/fetch'
export function getToken () {
export function getToken() {
return fetch({
url: '/qiniu/upload/token', // 假地址 自行替换
method: 'get'

View File

@@ -1,6 +1,6 @@
import fetch from 'utils/fetch'
export function userSearch (name) {
export function userSearch(name) {
return fetch({
url: '/search/user',
method: 'get',