mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-03-30 13:46:36 +08:00
feat: 数据库迁移
This commit is contained in:
11
Yi.App.Vue3/src/api/agreeApi.ts
Normal file
11
Yi.App.Vue3/src/api/agreeApi.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import myaxios from '@/utils/myaxios'
|
||||
|
||||
export default {
|
||||
operate(data:any) {
|
||||
return myaxios({
|
||||
url: `/agree/operate`,
|
||||
method: 'get',
|
||||
params: {articleId:data}
|
||||
})
|
||||
},
|
||||
}
|
||||
19
Yi.App.Vue3/src/api/articleApi.ts
Normal file
19
Yi.App.Vue3/src/api/articleApi.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import myaxios from '@/utils/myaxios'
|
||||
import { ArticleEntity } from '@/type/interface/ArticleEntity'
|
||||
|
||||
export default {
|
||||
add(data:any) {
|
||||
return myaxios({
|
||||
url: `/article/add`,
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
},
|
||||
pageList(data:any) {
|
||||
return myaxios({
|
||||
url: '/article/pageList',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
}
|
||||
17
Yi.App.Vue3/src/api/commentApi.ts
Normal file
17
Yi.App.Vue3/src/api/commentApi.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import myaxios from '@/utils/myaxios'
|
||||
|
||||
export default {
|
||||
add(data:any) {
|
||||
return myaxios({
|
||||
url: `/comment/add`,
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
},
|
||||
getListByArticleId(articleId:any) {
|
||||
return myaxios({
|
||||
url: `/comment/GetListByArticleId/${articleId}`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
}
|
||||
12
Yi.App.Vue3/src/api/fileApi.ts
Normal file
12
Yi.App.Vue3/src/api/fileApi.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import myaxios from '@/utils/myaxios'
|
||||
|
||||
export default{
|
||||
upload(type:string,data:any){
|
||||
return myaxios({
|
||||
url: `/file/upload/${type}`,
|
||||
headers:{"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"},
|
||||
method: 'POST',
|
||||
data:data
|
||||
});
|
||||
}
|
||||
}
|
||||
59
Yi.App.Vue3/src/api/login.ts
Normal file
59
Yi.App.Vue3/src/api/login.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
import myaxios from '@/utils/myaxios'
|
||||
|
||||
// 登录方法
|
||||
export function login(username:string, password:string, code:string, uuid:string) {
|
||||
const data = {
|
||||
username,
|
||||
password,
|
||||
code,
|
||||
uuid
|
||||
}
|
||||
return myaxios({
|
||||
url: '/account/login',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 注册方法
|
||||
export function register(data:any) {
|
||||
return myaxios({
|
||||
url: '/register',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取用户详细信息
|
||||
export function getInfo() {
|
||||
return myaxios({
|
||||
url: '/account/getUserAllInfo',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 退出方法
|
||||
export function logout() {
|
||||
return myaxios({
|
||||
url: '/account/logout',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取验证码
|
||||
export function getCodeImg() {
|
||||
return myaxios({
|
||||
url: '/account/captchaImage',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
method: 'get',
|
||||
timeout: 20000
|
||||
})
|
||||
}
|
||||
18
Yi.App.Vue3/src/api/skuApi.ts
Normal file
18
Yi.App.Vue3/src/api/skuApi.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import myaxios from '@/utils/myaxios'
|
||||
|
||||
export default {
|
||||
add(data:any) {
|
||||
return myaxios({
|
||||
url: `/sku/add`,
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
},
|
||||
pageList(data:any) {
|
||||
return myaxios({
|
||||
url: '/sku/pageList',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
}
|
||||
25
Yi.App.Vue3/src/api/spuApi.ts
Normal file
25
Yi.App.Vue3/src/api/spuApi.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import myaxios from '@/utils/myaxios'
|
||||
|
||||
export default {
|
||||
add(data: any) {
|
||||
return myaxios({
|
||||
url: `/spu/add`,
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
},
|
||||
pageList(data: any) {
|
||||
return myaxios({
|
||||
url: '/spu/pageList',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
},
|
||||
getById(id: any) {
|
||||
return myaxios({
|
||||
url: `/spu/GetById/${id}`,
|
||||
method: 'get',
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user