shaogen1995 1 year ago
parent
commit
9823cb9e24
2 changed files with 7 additions and 11 deletions
  1. 3 3
      src/pages/B3Push/index.tsx
  2. 4 8
      src/utils/http.ts

+ 3 - 3
src/pages/B3Push/index.tsx

@@ -99,9 +99,6 @@ function B3Push() {
   const [selectedRowKeys, setSelectedRowKeys] = useState<React.Key[]>([]);
   const selectedRef = useRef([] as string[]);
 
-  // 清空选中
-  // setSelectedRowKeys([]);
-
   // 点击推送
   const pushsTit = useRef([0, 0, 0]);
 
@@ -111,6 +108,9 @@ function B3Push() {
 
       if (res.code === 0) {
         MessageFu.success("推送成功!");
+        // 清空选中
+        setSelectedRowKeys([]);
+        selectedRef.current = [];
         getListFu();
       }
     },

+ 4 - 8
src/utils/http.ts

@@ -7,12 +7,10 @@ import { domShowFu } from "./domShow";
 // 请求基地址
 export const baseURL =
   // 线下的图片地址需要加上/api/
-  process.env.NODE_ENV === "development"
-    ? "http://192.168.20.61:8057/api/"
-    : "";
   // process.env.NODE_ENV === "development"
-  //   ? "https://sit-tieta3d.4dage.com"
+  //   ? "http://192.168.20.61:8057/api/"
   //   : "";
+  process.env.NODE_ENV === "development" ? "https://tower3d.4dkankan.com" : "";
 
 // 处理  类型“AxiosResponse<any, any>”上不存在属性“code”
 declare module "axios" {
@@ -22,15 +20,13 @@ declare module "axios" {
   }
 }
 
-export const baseUpUrl = baseURL + "/api/";
-
 // 创建 axios 实例
 const http = axios.create({
   // --------线下的地址不用加/api/
-  baseURL: baseURL,
+  // baseURL: baseURL,
 
   // --------打包或线上环境接口需要加上api/
-  // baseURL: baseURL + "/api/",
+  baseURL: baseURL + "/api/",
   timeout: 5000,
 });