فهرست منبع

修复异步dis回跳登录页报错问题

shaogen1995 2 سال پیش
والد
کامیت
416723ff1c
1فایلهای تغییر یافته به همراه5 افزوده شده و 4 حذف شده
  1. 5 4
      houtai/src/store/action/A2News.ts

+ 5 - 4
houtai/src/store/action/A2News.ts

@@ -41,6 +41,7 @@ export const newSaveAPI = (data: NewsSaveApiType) => {
 export const getNewsListAPI = (data: NewsTableApiType) => {
   return async (dispatch: AppDispatch) => {
     const res = await http.post("cms/news/getList", data);
+
     dispatch({
       type: "news/getList",
       payload: res.data,
@@ -51,20 +52,20 @@ export const getNewsListAPI = (data: NewsTableApiType) => {
 /**
  * 删除
  */
-export const newRemoveAPI = (id:number) => {
+export const newRemoveAPI = (id: number) => {
   return http.get(`cms/news/remove/${id}`);
 };
 
 /**
  * 详情
  */
-export const getNewsDetailAPI = (id:number) => {
+export const getNewsDetailAPI = (id: number) => {
   return http.get(`cms/news/detail/${id}`);
 };
 
 /**
  * 拖动排序
  */
-export const newSortApi = (id1:number,id2:number) => {
+export const newSortApi = (id1: number, id2: number) => {
   return http.get(`cms/news/sort/${id1}/${id2}`);
-};
+};