diff --git a/src/api/login.ts b/src/api/login.ts
index 3b05b41..a03f772 100644
--- a/src/api/login.ts
+++ b/src/api/login.ts
@@ -4,88 +4,8 @@ import request from '@/utils/request'
// 登录
export const userLogin = (data: any) => {
return request({
- url: `api/customer/login`,
+ url: `admin/login`,
method: 'post',
data
})
}
-// 注册
-export const userRegister = (data: any) => {
- return request({
- url: `api/customer/register`,
- method: 'post',
- data
- })
-}
-
-// 发送邮箱验证码
-export const sendEmail = (data: any) => {
- return request({
- url: `api/customer/send_activation_email`,
- method: 'post',
- data
- })
-}
-
-// 获取用户信息
-export const getUserInfo = () => {
- return request({
- url: `api/customer/info`,
- method: 'get'
- })
-}
-
-// 激活账号
-
-export const verifyCode = (code: any) => {
- return request({
- url: `api/customer/verify_activation_email/${code}`,
- method: 'get'
- })
-}
-
-// 扫码登录
-
-export const getRr = (data) => {
- return request({
- url: `api/customer/qr`,
- method: 'post',
- data
- })
-}
-
-// 轮询登录结果
-
-export const getRrLogin = (data) => {
- return request({
- url: `api/customer/qr_login`,
- method: 'post',
- data
- })
-}
-
-
-export const getUserSearch = (data) => {
- return request({
- url: `api/customer/search`,
- method: 'post',
- data
- })
-}
-
-export const setUserRecharge = (data) => {
- return request({
- url: `api/customer/recharge`,
- method: 'post',
- data
- })
-}
-
-// 充值记录
-export const rechargeList = (data) => {
- return request({
- url: `api/customer/recharge/list`,
- method: 'get',
- params: data
- })
-}
\ No newline at end of file
diff --git a/src/api/news.ts b/src/api/news.ts
index 3b05b41..44e5ce2 100644
--- a/src/api/news.ts
+++ b/src/api/news.ts
@@ -1,91 +1,39 @@
import request from '@/utils/request'
-// 登录
-export const userLogin = (data: any) => {
+
+export const news = (data: any) => {
return request({
- url: `api/customer/login`,
- method: 'post',
- data
- })
-}
-// 注册
-export const userRegister = (data: any) => {
- return request({
- url: `api/customer/register`,
- method: 'post',
- data
- })
-}
-
-// 发送邮箱验证码
-export const sendEmail = (data: any) => {
- return request({
- url: `api/customer/send_activation_email`,
- method: 'post',
- data
- })
-}
-
-// 获取用户信息
-export const getUserInfo = () => {
- return request({
- url: `api/customer/info`,
- method: 'get'
- })
-}
-
-// 激活账号
-
-export const verifyCode = (code: any) => {
- return request({
- url: `api/customer/verify_activation_email/${code}`,
- method: 'get'
- })
-}
-
-// 扫码登录
-
-export const getRr = (data) => {
- return request({
- url: `api/customer/qr`,
- method: 'post',
- data
- })
-}
-
-// 轮询登录结果
-
-export const getRrLogin = (data) => {
- return request({
- url: `api/customer/qr_login`,
- method: 'post',
- data
- })
-}
-
-
-export const getUserSearch = (data) => {
- return request({
- url: `api/customer/search`,
- method: 'post',
- data
- })
-}
-
-export const setUserRecharge = (data) => {
- return request({
- url: `api/customer/recharge`,
- method: 'post',
- data
- })
-}
-
-// 充值记录
-export const rechargeList = (data) => {
- return request({
- url: `api/customer/recharge/list`,
+ url: `admin/articles`,
method: 'get',
params: data
})
-}
\ No newline at end of file
+}
+
+// 添加文章
+export const addNews = (data: any) => {
+ return request({
+ url: `admin/article/create`,
+ method: 'post',
+ data
+ })
+}
+
+// 编辑文章
+export const editNews = (data: any, id: string) => {
+ return request({
+ url: `admin/article/${id}`,
+ method: 'put',
+ data
+ })
+}
+
+// 删除文章
+export const deleteNews = (data: any) => {
+ return request({
+ url: `admin/article/delete`,
+ method: 'post',
+ data
+ })
+}
+
diff --git a/src/layout/home/menu.vue b/src/layout/home/menu.vue
index a43b65c..c29f388 100644
--- a/src/layout/home/menu.vue
+++ b/src/layout/home/menu.vue
@@ -10,7 +10,7 @@