shaogen1995 2 vuotta sitten
vanhempi
commit
a48435901d

+ 3 - 2
src/pages/GoodsAdd/index.tsx

@@ -44,6 +44,7 @@ function GoodsAdd({ id, closePage, upTableList, addTableList }: Props) {
     const data: GoodsTableSearch = res.data;
     FormBoxRef.current.setFieldsValue(data);
 
+    setDirCode(data.dirCode!)
     setCover(data.thumb!);
     setType(data.type!);
 
@@ -399,7 +400,7 @@ function GoodsAdd({ id, closePage, upTableList, addTableList }: Props) {
               </div>
             </div>
             <div className="fileBoxRow_r_tit">
-              格式要求:支持png、jpg和jpeg的图片格式;最大支持10M。
+              支持png、jpg和jpeg的图片格式;最大支持10M。
             </div>
 
             {/* 文件类型 */}
@@ -464,7 +465,7 @@ function GoodsAdd({ id, closePage, upTableList, addTableList }: Props) {
                   </Popconfirm>
                 </div>
                 <div className="fileBoxRow_r_tit">
-                  格式要求:支持png、jpg、gif和jpeg的图片格式;最大支持20M。
+                  支持png、jpg、gif和jpeg的图片格式;最大支持20M。
                 </div>
               </div>
 

+ 1 - 1
src/pages/Hot/index.tsx

@@ -231,7 +231,7 @@ function Hot() {
 
   return (
     <div className={styles.Hot}>
-      <div className="pageTitlt">热度管理</div>
+      <div className="pageTitlt">热度统计</div>
 
       <div className="hotBox">
         <div className="hotLeft">

+ 33 - 3
src/pages/Layout/index.module.scss

@@ -8,7 +8,7 @@
 
     .topTitle {
       position: relative;
-      z-index: 10;
+      z-index: 11;
       width: 100%;
       height: 70px;
       background-image: url('../../assets/img/layoutTopBg.png');
@@ -110,12 +110,13 @@
         background-image: url('../../assets/img/layotLftBg.png');
         background-size: 100% 100%;
         margin-right: 15px;
-        padding: 20px 0 0 10px;
+        padding: 30px 0 0 10px;
         display: flex;
 
 
         .mainBoxL2 {
           padding-left: 0px;
+
           .mainBoxL2Row {
             padding-left: 60px;
             cursor: pointer;
@@ -124,6 +125,7 @@
             font-size: 16px;
             color: #fef4e9;
             position: relative;
+
             &:hover {
               &::before {
                 content: '';
@@ -136,7 +138,8 @@
                 background-size: 100% 100%;
               }
             }
-            .tabImg{
+
+            .tabImg {
               z-index: 3;
               position: absolute;
               top: 50%;
@@ -144,10 +147,37 @@
               transform: translateY(-50%);
               width: 20px;
             }
+
+            .txt {
+              &::before {
+                content: '';
+                position: absolute;
+                z-index: 10;
+                bottom: -10px;
+                left: 11px;
+                height: 20px;
+                width: 1px;
+                border-left: 1px dashed #fef4e9;
+              }
+              &:nth-of-type(1){
+                &::after {
+                  content: '';
+                  position: absolute;
+                  z-index: 10;
+                  top: -10px;
+                  left: 11px;
+                  height: 20px;
+                  width: 1px;
+                  border-left: 1px dashed #fef4e9;
+                }
+              }
+            }
+
           }
 
           .active {
             pointer-events: none;
+
             &::before {
               content: '';
               position: absolute;

+ 6 - 1
src/pages/Role/RoleAdd/index.css

@@ -18,11 +18,16 @@
   width: 80px;
   line-height: 32px;
 }
+.roleAdd .roleAddMain .row .rowSpan > span {
+  position: relative;
+  top: 2px;
+  color: #ff4d4f;
+}
 .roleAdd .roleAddMain .row .bs::before {
   content: '*';
   position: absolute;
   top: 2px;
-  left: 2px;
+  left: 1px;
   z-index: 10;
   color: #ff4d4f;
 }

+ 6 - 1
src/pages/Role/RoleAdd/index.less

@@ -19,6 +19,11 @@
         display: inline-block;
         width: 80px;
         line-height: 32px;
+        &>span{
+          position: relative;
+          top: 2px;
+          color: #ff4d4f;
+        }
       }
 
       .bs {
@@ -26,7 +31,7 @@
           content: '*';
           position: absolute;
           top: 2px;
-          left: 2px;
+          left: 1px;
           z-index: 10;
           color: #ff4d4f;
         }

+ 8 - 1
src/pages/Role/RoleAdd/index.tsx

@@ -57,6 +57,10 @@ function RoleAdd({ id, closePage, upTableList, addTableList }: Props) {
   // 点击提交
   const btnOkFu = useCallback(async () => {
     if (roleName === "") return message.warning("请输入角色名称!");
+
+    if (list.every((v) => !v.authority))
+      return message.warning("至少勾选一个页面权限!");
+
     const obj: AddRoleType = {
       id: id ? id : null,
       resources: list.filter((v) => v.authority).map((v) => v.id),
@@ -112,7 +116,10 @@ function RoleAdd({ id, closePage, upTableList, addTableList }: Props) {
         </div>
 
         <div className="row rowThree">
-          <span className="rowSpan">权限设置:</span>
+          <span className="rowSpan">
+            {" "}
+            <span>*</span> 权限设置:
+          </span>
           <div className="inputBox inputBoxCheck">
             {list.map((v) => (
               <Checkbox

+ 1 - 0
src/store/action/goods.ts

@@ -25,6 +25,7 @@ export const goodsUploadAPI = (data: any) => {
   UpAsyncLodingDom.style.opacity = 1;
 
   return http.post("cms/goods/upload", data, {
+    timeout:30000,
     // 显示进度条
     onUploadProgress: (e: any) => {
       const complete = (e.loaded / e.total) * 100 || 0;

+ 1 - 0
src/store/action/wall.ts

@@ -45,6 +45,7 @@ export const wallUploadAPI = (data: any) => {
   UpAsyncLodingDom.style.opacity = 1;
 
   return http.post("cms/wall/upload", data, {
+    timeout:30000,
     // 显示进度条
     onUploadProgress: (e: any) => {
       const complete = (e.loaded / e.total) * 100 || 0;

+ 9 - 11
src/utils/http.ts

@@ -10,7 +10,7 @@ export const baseURL =
   //   ? "http://192.168.20.55:8038/api/"
   //   : "";
   process.env.NODE_ENV === "development" ? "https://xuzhouwall.4dage.com" : "";
-  // process.env.NODE_ENV === "development" ? "http://192.168.20.55:8039" : "";
+// process.env.NODE_ENV === "development" ? "http://192.168.20.55:8039" : "";
 
 // 创建 axios 实例
 const http = axios.create({
@@ -19,7 +19,7 @@ const http = axios.create({
 
   // --------打包或线上环境接口需要加上api/
   baseURL: baseURL + "/api/",
-  timeout: 30000,
+  timeout: 5000,
 });
 
 let axajInd = 0;
@@ -43,10 +43,6 @@ http.interceptors.request.use(
 
 let timeId = -1;
 
-// 上传附件的进度条
-const UpAsyncLodingDom: any = document.querySelector("#UpAsyncLoding");
-const progressDom: any = document.querySelector("#progress");
-
 // 响应拦截器
 http.interceptors.response.use(
   function (response) {
@@ -73,17 +69,19 @@ http.interceptors.response.use(
     axajInd = 0;
     store.dispatch({ type: "login/asyncLoding", payload: false });
 
-    // 响应错误也要取消 上传文件的进度条
-    if(UpAsyncLodingDom) UpAsyncLodingDom.style.opacity = 0;
-    if(progressDom) progressDom.style.width = "0%";
-    
+    // 上传附件的进度条
+    const UpAsyncLodingDom: any = document.querySelector("#UpAsyncLoding");
+    const progressDom: any = document.querySelector("#progress");
+
     // 如果因为网络原因,response没有,给提示消息
     if (!err.response) {
       message.warning("网络繁忙,请稍后重试!");
     } else {
       message.warning("错误!");
     }
-
+    // 响应错误也要取消 上传文件的进度条
+    if (UpAsyncLodingDom) UpAsyncLodingDom.style.opacity = 0;
+    if (progressDom) progressDom.style.width = "0%";
     return Promise.reject(err);
   }
 );