shaogen1995 %!s(int64=2) %!d(string=hai) anos
pai
achega
442b8f9676
Modificáronse 2 ficheiros con 18 adicións e 7 borrados
  1. 12 1
      src/pages/GoodsAdd/index.tsx
  2. 6 6
      src/utils/http.ts

+ 12 - 1
src/pages/GoodsAdd/index.tsx

@@ -546,7 +546,12 @@ function GoodsAdd({
                       onDragEnd={() => setDragImg(null)}
                     >
                       {v.filePath ? (
-                        <ImageLazy width={100} height={100} src={v.filePath} />
+                        <ImageLazy
+                          noLook={dragImg ? true : false}
+                          width={100}
+                          height={100}
+                          src={v.filePath}
+                        />
                       ) : null}
 
                       <Popconfirm
@@ -564,6 +569,12 @@ function GoodsAdd({
                 </div>
 
                 <div className="fileBoxRow_r_tit">
+                  {imgFile.length >= 2 ? (
+                    <>
+                      按住鼠标可拖动图片调整顺序。
+                      <br />
+                    </>
+                  ) : null}
                   支持png、jpg、gif和jpeg的图片格式;最大支持20M;最多支持9张。
                 </div>
               </div>

+ 6 - 6
src/utils/http.ts

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