Browse Source

写不动了

shaogen1995 8 months ago
parent
commit
bd14d41917

BIN
展示端/src/assets/img/my/err.png


BIN
展示端/src/assets/img/my/listBg.png


BIN
展示端/src/assets/img/my/succ.png


+ 21 - 20
展示端/src/components/MyPopconfirm.tsx

@@ -1,46 +1,47 @@
-import React, { useMemo } from "react";
-import { Button, Popconfirm } from "antd";
+import React, { useMemo } from 'react'
+import { Button, Popconfirm } from 'antd'
 
 type Props = {
-  txtK: "删除" | "取消" | "重置密码" | "退出登录";
-  onConfirm: () => void;
-  Dom?: React.ReactNode;
-  loc?: "bottom";
-};
+  txtK: '删除' | '取消' | '重置密码' | '退出登录' | '撤回'
+  onConfirm: () => void
+  Dom?: React.ReactNode
+  loc?: 'bottom'
+}
 
 function MyPopconfirm({ txtK, onConfirm, Dom, loc }: Props) {
   const txt = useMemo(() => {
     const obj = {
-      删除: ["删除后无法恢复,是否删除?", "删除"],
-      取消: ["放弃编辑后,信息将不会保存!", "放弃"],
-      重置密码: ["密码重制后为123456,是否重置?", "重置"],
-      退出登录: ["确定退出吗?", "确定"],
-    };
-    return Reflect.get(obj, txtK) || ["", ""];
-  }, [txtK]);
+      删除: ['删除后无法恢复,是否删除?', '删除'],
+      取消: ['放弃编辑后,信息将不会保存!', '放弃'],
+      重置密码: ['密码重制后为123456,是否重置?', '重置'],
+      退出登录: ['确定退出吗?', '确定'],
+      撤回: ['确定撤回吗?', '确定']
+    }
+    return Reflect.get(obj, txtK) || ['', '']
+  }, [txtK])
 
   return (
     <Popconfirm
       placement={loc}
       title={txt[0]}
       okText={txt[1]}
-      cancelText="取消"
+      cancelText='取消'
       onConfirm={onConfirm}
       okButtonProps={{ loading: false }}
     >
       {Dom ? (
         Dom
-      ) : txtK === "删除" ? (
-        <Button size="small" type="text" danger>
+      ) : txtK === '删除' ? (
+        <Button size='small' type='text' danger>
           {txtK}
         </Button>
       ) : (
         <Button>{txtK}</Button>
       )}
     </Popconfirm>
-  );
+  )
 }
 
-const MemoMyPopconfirm = React.memo(MyPopconfirm);
+const MemoMyPopconfirm = React.memo(MyPopconfirm)
 
-export default MemoMyPopconfirm;
+export default MemoMyPopconfirm

+ 12 - 0
展示端/src/pages/A3selectDay/index.module.scss

@@ -47,6 +47,18 @@
             }
           }
         }
+
+        // 没有信息
+        .A3listNo {
+          height: 100%;
+          display: flex;
+          justify-content: center;
+          align-items: center;
+          font-size: 30px;
+          font-weight: 700;
+          letter-spacing: 4px;
+          color: var(--themeColor);
+        }
       }
     }
     .A3mainNoBtn {

+ 29 - 25
展示端/src/pages/A3selectDay/index.tsx

@@ -62,33 +62,37 @@ function A3selectDay() {
 
       <div className={classNames('A3main', acObj.id ? '' : 'A3mainNoBtn')}>
         <div className='A3list'>
-          <div className='mySorrl'>
-            {list.map(item => (
-              <div className='A3row' key={item.id}>
-                <div className='A3R1'>{item.time}</div>
-                <div className='A3R2'>
-                  <div
-                    onClick={() => setAcObj({ id: item.id, txt: '上午' })}
-                    className={classNames(
-                      item.id === acObj.id && acObj.txt === '上午' ? 'A3ac' : '',
-                      item.shang ? '' : 'myBtnNo'
-                    )}
-                  >
-                    上午{item.shang ? '' : '(已满)'}
-                  </div>
-                  <div
-                    onClick={() => setAcObj({ id: item.id, txt: '下午' })}
-                    className={classNames(
-                      item.id === acObj.id && acObj.txt === '下午' ? 'A3ac' : '',
-                      item.xia ? '' : 'myBtnNo'
-                    )}
-                  >
-                    下午{item.xia ? '' : '(已满)'}
+          {list.length ? (
+            <div className='mySorrl'>
+              {list.map(item => (
+                <div className='A3row' key={item.id}>
+                  <div className='A3R1'>{item.time}</div>
+                  <div className='A3R2'>
+                    <div
+                      onClick={() => setAcObj({ id: item.id, txt: '上午' })}
+                      className={classNames(
+                        item.id === acObj.id && acObj.txt === '上午' ? 'A3ac' : '',
+                        item.shang ? '' : 'myBtnNo'
+                      )}
+                    >
+                      上午{item.shang ? '' : '(已满)'}
+                    </div>
+                    <div
+                      onClick={() => setAcObj({ id: item.id, txt: '下午' })}
+                      className={classNames(
+                        item.id === acObj.id && acObj.txt === '下午' ? 'A3ac' : '',
+                        item.xia ? '' : 'myBtnNo'
+                      )}
+                    >
+                      下午{item.xia ? '' : '(已满)'}
+                    </div>
                   </div>
                 </div>
-              </div>
-            ))}
-          </div>
+              ))}
+            </div>
+          ) : (
+            <div className='A3listNo'>暂无可约日期</div>
+          )}
         </div>
         <ZFlooBtn
           txt={acObj.id ? '下一步' : '请选择日期'}

+ 12 - 0
展示端/src/pages/A4selectCourse/index.module.scss

@@ -118,5 +118,17 @@
         }
       }
     }
+    .A4No {
+      height: calc(100% - 60px);
+      background-image: url('../../assets/img/selectCourse/bg.jpg');
+      background-size: 100% 100%;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      font-size: 30px;
+      font-weight: 700;
+      letter-spacing: 4px;
+      color: var(--themeColor);
+    }
   }
 }

+ 54 - 49
展示端/src/pages/A4selectCourse/index.tsx

@@ -74,59 +74,64 @@ function A4selectCourse() {
   return (
     <div className={styles.A4selectCourse}>
       <TopCom txt='选择课程' />
-      <div className='A4main'>
-        {list.map(item1 => (
-          <div className='A4row' key={item1.id}>
-            {/* 1级标题 */}
-            <div className='A4row1'>
-              <img src={xingImg} alt='' />
-              {item1.tyle}
-            </div>
-            {/* 2级信息 */}
-            {item1.son.map(item2 => (
-              <div className='A4row2' key={item2.id}>
-                <div className='A4row2_1'>{item2.name}</div>
-                <div className='A4row2_2'>
-                  <div>
-                    {item2.txt1 ? (
-                      <>
-                        <div className='A4row2_2tit'>课程简介:</div>
-                        <p>{item2.txt1}</p>
-                      </>
-                    ) : null}
-                    {item2.txt2 ? (
-                      <>
-                        <div className='A4row2_2tit'>授课团队:</div>
-                        <p>{item2.txt2}</p>
-                      </>
-                    ) : null}
-                    {item2.txt3 ? (
-                      <>
-                        <div className='A4row2_2tit'>预约须知:</div>
-                        <p>{item2.txt3}</p>
-                      </>
-                    ) : null}
+      {list.length ? (
+        <div className='A4main'>
+          {list.map(item1 => (
+            <div className='A4row' key={item1.id}>
+              {/* 1级标题 */}
+              <div className='A4row1'>
+                <img src={xingImg} alt='' />
+                {item1.tyle}
+              </div>
+              {/* 2级信息 */}
+              {item1.son.map(item2 => (
+                <div className='A4row2' key={item2.id}>
+                  <div className='A4row2_1'>{item2.name}</div>
+                  <div className='A4row2_2'>
+                    <div>
+                      {item2.txt1 ? (
+                        <>
+                          <div className='A4row2_2tit'>课程简介:</div>
+                          <p>{item2.txt1}</p>
+                        </>
+                      ) : null}
+                      {item2.txt2 ? (
+                        <>
+                          <div className='A4row2_2tit'>授课团队:</div>
+                          <p>{item2.txt2}</p>
+                        </>
+                      ) : null}
+                      {item2.txt3 ? (
+                        <>
+                          <div className='A4row2_2tit'>预约须知:</div>
+                          <p>{item2.txt3}</p>
+                        </>
+                      ) : null}
 
-                    {!item2.txt1 && !item2.txt2 && !item2.txt3 ? (
-                      <div className='A4row2_2No'>暂无信息</div>
-                    ) : null}
+                      {!item2.txt1 && !item2.txt2 && !item2.txt3 ? (
+                        <div className='A4row2_2No'>暂无信息</div>
+                      ) : null}
+                    </div>
                   </div>
-                </div>
-                {/* 按钮 */}
-                <div className='A4row2_3'>
-                  <div
-                    onClick={() => setInfo(item2)}
-                    className={!item2.txt1 && !item2.txt2 && !item2.txt3 ? 'A4row2_3No' : ''}
-                  >
-                    查看详情
+                  {/* 按钮 */}
+                  <div className='A4row2_3'>
+                    <div
+                      onClick={() => setInfo(item2)}
+                      className={!item2.txt1 && !item2.txt2 && !item2.txt3 ? 'A4row2_3No' : ''}
+                    >
+                      查看详情
+                    </div>
+                    <div onClick={arrangeFu}>预约课程</div>
                   </div>
-                  <div onClick={arrangeFu}>预约课程</div>
                 </div>
-              </div>
-            ))}
-          </div>
-        ))}
-      </div>
+              ))}
+            </div>
+          ))}
+        </div>
+      ) : (
+        <div className='A4No'>暂无数据</div>
+      )}
+
       {/* 查看详情 */}
       {info.id ? <A4look info={info} closeFu={() => setInfo({} as SonType)} /> : null}
     </div>

+ 136 - 0
展示端/src/pages/A6my/index.module.scss

@@ -1,4 +1,140 @@
 .A6my {
   :global {
+    .A6main {
+      height: calc(100% - 60px);
+      background-image: url('../../assets/img/notice/bg03.jpg');
+      background-size: cover;
+      padding: 24px 0;
+      .A6top {
+        padding: 0 24px;
+        display: flex;
+        margin-bottom: 20px;
+        .A6tRow {
+          font-weight: 700;
+          color: #979491;
+          font-size: 20px;
+          padding-bottom: 4px;
+          border-bottom: 4px solid transparent;
+          margin-right: 55px;
+        }
+        .A6tRowAc {
+          color: var(--themeColor3);
+          border-color: var(--themeColor3);
+        }
+      }
+
+      .A6No {
+        height: 90%;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        font-size: 30px;
+        font-weight: 700;
+        letter-spacing: 4px;
+        color: var(--themeColor3);
+      }
+
+      .A6list {
+        padding: 0 24px 40px;
+        height: calc(100% - 33px);
+        overflow-y: auto;
+        .A6row {
+          height: 500px;
+
+          background-image: url('../../assets/img/my/listBg.png');
+          background-size: 100% 100%;
+          margin-bottom: 20px;
+          padding: 27px;
+          font-size: 16px;
+          .A6row1 {
+            position: relative;
+            border-bottom: 2px dashed #bebebe;
+            position: relative;
+            height: 86px;
+
+            & > img {
+              position: absolute;
+              top: -10px;
+              right: -10px;
+              width: 60px;
+            }
+
+            .A6row1_1 {
+              position: absolute;
+              top: -10px;
+              right: -10px;
+              width: 80px;
+              height: 30px;
+              border-radius: 15px;
+              border: 1px solid #f45151;
+              color: #f45151;
+              display: flex;
+              justify-content: center;
+              align-items: center;
+            }
+            & > p {
+              width: 90%;
+
+              margin-bottom: 8px;
+              span {
+                font-weight: 700;
+                color: var(--themeColor2);
+              }
+            }
+          }
+
+          .A6row2 {
+            margin-top: 20px;
+            .A6row2Tit {
+              font-weight: 700;
+              color: var(--themeColor);
+            }
+            p {
+              overflow: hidden;
+              text-overflow: ellipsis;
+              white-space: nowrap;
+              margin-top: 5px;
+              span {
+                font-weight: 700;
+              }
+            }
+            .A6row2_1 {
+              height: 127px;
+              overflow-y: auto;
+              padding-right: 10px;
+              & > div {
+                margin-top: 5px;
+                white-space: pre-wrap;
+                word-wrap: break-word;
+                text-align: justify;
+                span {
+                  font-weight: 700;
+                }
+              }
+            }
+          }
+          .A6row3 {
+            margin: 15px 0;
+            border-top: 2px dashed #bebebe;
+            position: relative;
+            height: 40px;
+            & > div {
+              position: absolute;
+              bottom: -8px;
+              right: 0px;
+              width: 103px;
+              height: 33px;
+              background: var(--themeColor3);
+              border-radius: 5px;
+              display: flex;
+              justify-content: center;
+              align-items: center;
+              color: #fff;
+              font-size: 16px;
+            }
+          }
+        }
+      }
+    }
   }
 }

File diff suppressed because it is too large
+ 143 - 2
展示端/src/pages/A6my/index.tsx