黄琪勇 hai 1 ano
pai
achega
c610216165

+ 4 - 3
src/assets/elementTheme.scss

@@ -22,7 +22,7 @@
 
 .el-empty .el-empty__description p {
    font-weight: 400;
-   font-size: 22px;
+   font-size: 2.2rem;
    color: #aaaaaa;
 }
 
@@ -35,7 +35,9 @@
       background-color: transparent;
    }
    .el-cascader-menu:last-child .el-cascader-node {
-      padding: 0 8px;
+      padding: 0 12px;
+      line-height: 40px;
+      height: 40px;
    }
    .el-cascader-node__prefix {
       display: none;
@@ -45,7 +47,6 @@
    }
    .el-cascader-node__label {
       font-size: 16px;
-      line-height: 40px;
       border-radius: 8px;
       &:hover {
          color: #994d1c;

+ 1 - 0
src/assets/normalize.css

@@ -15,6 +15,7 @@ body {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-family: PingFang SC, Helvetica Neue, Helvetica, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
+   font-size: 16px;
 }
 
 a:focus,

+ 4 - 3
src/components/dictionary/dictionary.vue

@@ -10,11 +10,11 @@
       :disabled="props.disabled"
       :size="props.size"
       :show-all-levels="false"
-      filterable
       :options="props.options"
       :props="propsOpt"
       :clearable="props.clearable"
       :placeholder="placeholder"
+      :popperClass="popperClass"
    />
 </template>
 
@@ -34,6 +34,7 @@ const props = withDefaults(
       disabled?: boolean
       size?: "default" | "small" | "large"
       placeholder?: string
+      popperClass?: string
    }>(),
    {
       clearable: true,
@@ -43,8 +44,8 @@ const props = withDefaults(
    }
 )
 const emits = defineEmits<{
-   (e: "update:modelValue", value: CascaderValue): void
-   (e: "change", value: CascaderValue): void
+   (e: "update:modelValue", value?: CascaderValue): void
+   (e: "change", value?: CascaderValue): void
 }>()
 
 const propsOpt: CascaderProps = {

BIN=BIN
src/img/homePage/bg.png


+ 2 - 2
src/libs/axios.ts

@@ -41,7 +41,7 @@ class HttpAsynAxios {
             Nprogress.done()
             const rejectData: apiResDataType = {
                code: 500,
-               message: "系统运行异常,请联系管理员处理",
+               message: "系统运行异常,请刷新页面",
                data: null
             }
             return Promise.reject(rejectData)
@@ -76,7 +76,7 @@ class HttpAsynAxios {
             // }
             const rejectData: apiResDataType = {
                code: 500,
-               message: "系统运行异常,请联系管理员处理",
+               message: "系统运行异常,请刷新页面",
                data: null
             }
             return Promise.reject(rejectData) // 返回接口返回的错误信息

+ 9 - 0
src/libs/rem.ts

@@ -0,0 +1,9 @@
+const baseWidth = 1920 // 设计图宽度
+const baseSize = 10 //  rem 比例
+const doc = document.documentElement
+function refreshRem() {
+   const width = doc.getBoundingClientRect().width
+   doc.style.fontSize = baseSize * Math.min(width / baseWidth, 1) + "px"
+}
+refreshRem()
+window.addEventListener("resize", refreshRem)

+ 1 - 0
src/main.ts

@@ -1,5 +1,6 @@
 import { createApp } from "vue"
 import App from "./App.vue"
+import "@/libs/rem"
 
 import "./assets/normalize.css" //初始化css
 import "./assets/index.scss" //全局样式

+ 36 - 19
src/views/cloudTextbooks/cloudTextbooks.vue

@@ -8,7 +8,14 @@
       <div class="cloudTextbooks">
          <div class="headCon">
             <div class="operate">
-               <dictionary class="classTypes" v-model="classType" :options="classTypeOpt" placeholder="课程类型" @change="handleQuery" />
+               <dictionary
+                  class="classTypes"
+                  :popperClass="'classTypeOpt'"
+                  v-model="classType"
+                  :options="classTypeOpt"
+                  placeholder="课程类型"
+                  @change="handleQuery"
+               />
                <el-input
                   @keyup.enter="handleQuery"
                   @input="handleInputQuery"
@@ -121,21 +128,33 @@ function handleGetClassTypeOpt() {
    if (userStoreHook.roles === "GYM") {
       httpAjax(getLessonCoursewareSubjectList_gym).then(res => {
          if (res.code === 200) {
-            classTypeOpt.value = res.data.map((item: any) => {
-               return {
-                  value: item.id,
-                  label: item.name
-               }
-            })
+            classTypeOpt.value = [
+               {
+                  value: "",
+                  label: "全部"
+               },
+               ...res.data.map((item: any) => {
+                  return {
+                     value: item.id,
+                     label: item.name
+                  }
+               })
+            ]
          }
       })
    } else {
-      classTypeOpt.value = Object.keys(courseEmnu).map(type => {
-         return {
-            value: type,
-            label: courseEmnu[type as keyof typeof courseEmnu]
-         }
-      })
+      classTypeOpt.value = [
+         {
+            value: "",
+            label: "全部"
+         },
+         ...Object.keys(courseEmnu).map(type => {
+            return {
+               value: type,
+               label: courseEmnu[type as keyof typeof courseEmnu]
+            }
+         })
+      ]
    }
 }
 
@@ -167,7 +186,7 @@ function handleClick(id: string) {
    height: 100%;
    position: relative;
    .headCon {
-      padding: 40px 26px;
+      padding: 30px 26px;
       display: flex;
       flex-direction: row-reverse;
       .operate {
@@ -361,10 +380,8 @@ function handleClick(id: string) {
       transform: translate(-50%, -50%);
    }
 }
-:global(.headDropdown.el-dropdown__popper.el-popper) {
-   box-shadow: 0px 2px 17px 0px rgba(0, 0, 0, 0.08);
-   background: #ffffff;
-   border-radius: 16px;
-   inset: 84px 54px auto auto !important;
+:global(.classTypeOpt.el-popper .el-cascader-menu) {
+   width: 150px;
+   min-width: auto;
 }
 </style>

+ 16 - 5
src/views/coursewarePlay/component/video-item/index.module.scss

@@ -74,9 +74,10 @@
       }
 
       .actionBtn {
+         cursor: pointer;
          display: flex;
-         width: 36px;
-         height: 36px;
+         width: 44px;
+         height: 44px;
          padding: 0 0;
          background: transparent;
          margin-right: 30px;
@@ -169,12 +170,12 @@
 .sliderPopup {
    position: absolute;
    z-index: 9999;
-   left: 149px;
+   left: 168px;
    bottom: 48px;
    display: flex;
    align-items: center;
    flex-direction: column;
-   height: 165px;
+   height: 168px;
    width: 45px;
    padding: 10px 0 15px;
    background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAAGaCAMAAAC46aQwAAAAOVBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC8dlA9AAAAE3RSTlNaAAxUVwdPRSc7MzYsEEoXGgshjXaABwAAAZBJREFUeNrt1GtO40AQReF77X46tvPY/2IHhiCDA0Ez7pb4cb4FHLVaVSU/isM/i360S5+nnIL+Q0h5On+fXuqoQ8a6fJm+VjVQr4/pEtREKPt0VTP1UzpmNZTjh3RWU3lLn9TY6T1d1Fx5S8eg5kL8m57UwfSaHoI6CIPlSV1MlpO6SNaiThbN6mRWVSdVWZ1kJXWSFNRJEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADg9wnqJGhVJ6uyOsmq6qSqqJOiqzq5yqu6WC3P6mK2HEd1MEbLfZ49+zXtpOaS39IXNXe5p13UWPF72ic1dfKW9ql1eUu7tP2NLf3inNREOnuXflFGHTaWrSdvYsk6JJfoXXoTb1PNabwL+kEY71Ku023r7tOPYv5pFJ6Rn5qfj8KRtC+jvjGefSztYdWX1sFH0k82tUY3SPsWtDfZTdJekj4JN7dKO1Z9kBY3ST+er3x10/R2vqrdOO04BUnp4nbpTVwug30g3cwf1jMLKix6VfsAAAAASUVORK5CYII=")
@@ -199,7 +200,17 @@
       background: url("../../image/jian.png") no-repeat center;
       background-size: contain;
    }
-
+   .el_slider {
+      --el-slider-main-bg-color: #ff8057;
+      --el-slider-button-size: 16px;
+      :global {
+         .el-slider__button:hover,
+         .el-slider__button.hover,
+         .el-slider__button.dragging {
+            transform: scale(1.1);
+         }
+      }
+   }
    .sliderPoint {
       background: #ffffff;
       box-shadow: 0px 2px 4px 0px rgba(102, 102, 102, 0.77);

+ 17 - 11
src/views/coursewarePlay/component/video-item/index.tsx

@@ -5,12 +5,18 @@ import styles from "./index.module.scss"
 
 import icons from "../../image/icons.json"
 
-const { iconVideoBg, iconPlay, iconPause, iconSpeed } = icons
+const { iconVideoBg } = icons
 // eslint-disable-next-line @typescript-eslint/no-var-requires
 const iconLoopActive = require("../../image/iconLoopActive.png")
 // eslint-disable-next-line @typescript-eslint/no-var-requires
 const iconLoop = require("../../image/iconLoop.png")
-import { Slider } from "vant"
+// eslint-disable-next-line @typescript-eslint/no-var-requires
+const iconPause = require("../../image/iconPause.png")
+// eslint-disable-next-line @typescript-eslint/no-var-requires
+const iconPlay = require("../../image/iconPlay.png")
+// eslint-disable-next-line @typescript-eslint/no-var-requires
+const iconSpeed = require("../../image/iconSpeed.png")
+import { ElSlider } from "element-plus"
 
 export default defineComponent({
    name: "video-play",
@@ -121,14 +127,14 @@ export default defineComponent({
                 </div>
                 <div class="${styles.actions}">
                     <div class="${styles.actionWrap}">
-                        <div id="${playBtnId}" class="${styles.actionBtn}" style="margin-right: 24px;">
+                        <div id="${playBtnId}" class="${styles.actionBtn}">
                             <div class="van-loading van-loading--circular" aria-live="polite" aria-busy="true"><span class="van-loading__spinner van-loading__spinner--circular" style="color: rgb(255, 255, 255);"><svg class="van-loading__circular" viewBox="25 25 50 50"><circle cx="50" cy="50" r="20" fill="none"></circle></svg></span></div>
                             <img class="${styles.playIcon}" src="${iconPlay}" />
                             <img class="${styles.playIcon}" src="${iconPause}" />
                         </div>
-                        <div id="${loopBtnId}" style="margin-top:-6px;" class="${styles.actionBtn} ${styles.loopBtn}">
-                            <img class="loop" style="width:48px;height:48px;" src="${iconLoop}" />
-                            <img class="loopActive" style="width:48px;height:48px;" src="${iconLoopActive}" />
+                        <div id="${loopBtnId}" class="${styles.actionBtn} ${styles.loopBtn}">
+                            <img class="loop" style="width:54px;height:44px;" src="${iconLoop}" />
+                            <img class="loopActive" style="width:58px;height:44px;" src="${iconLoopActive}" />
                         </div>
                         <div style="position: relative">
                           <div id="${speedBtnId}" class="${styles.actionBtn} ${styles.speedBtn}">
@@ -292,15 +298,15 @@ export default defineComponent({
                         }
                      }}
                   ></i>
-                  <Slider
+                  <ElSlider
+                     class={styles.el_slider}
+                     style={{ padding: "10px 0" }}
                      min={0.5}
                      max={1.5}
                      step={0.1}
                      v-model={data.defaultSpeed}
-                     active-color="#FF8057"
                      vertical
-                     barHeight={5}
-                     reverse
+                     height={"82px"}
                      onChange={() => {
                         if (data.videoItem) {
                            data.videoItem.speed = data.defaultSpeed
@@ -315,7 +321,7 @@ export default defineComponent({
                            </div>
                         )
                      }}
-                  </Slider>
+                  </ElSlider>
                   <i
                      class={[styles.iconCut]}
                      onClick={() => {

BIN=BIN
src/views/coursewarePlay/image/iconLoop.png


BIN=BIN
src/views/coursewarePlay/image/iconLoopActive.png


BIN=BIN
src/views/coursewarePlay/image/iconPause.png


BIN=BIN
src/views/coursewarePlay/image/iconPlay.png


BIN=BIN
src/views/coursewarePlay/image/iconSpeed.png


+ 1 - 0
src/views/homePage/components/navContainer/navContainer.vue

@@ -60,6 +60,7 @@ function handleRouter(url?: string) {
       border-radius: 20px 0 0 0;
       display: flex;
       align-items: center;
+      padding-top: 6px;
       .cursor {
          cursor: pointer;
          &:hover {

+ 51 - 30
src/views/homePage/homePage_gym.vue

@@ -6,17 +6,19 @@
 <template>
    <navContainer class="navContainer" :headImg="headImg" :navs="navs">
       <div class="homePage">
-         <div class="classTypes">
-            <div class="classType" v-for="item in classTypes" :key="item.name" @click="handleRouter(item.url)">
-               <img :src="item.img" />
-               <div>{{ item.name }}</div>
+         <ElScrollbar class="elScrollbar">
+            <div class="classTypes">
+               <div class="classType" v-for="item in classTypes" :key="item.name" @click="handleRouter(item.url)">
+                  <img :src="item.img" />
+                  <div>{{ item.name }}</div>
+               </div>
             </div>
-         </div>
-         <div class="courseBoard">
-            <div class="details">
-               <el-empty style="margin-top: 50px" :image-size="360" :image="require('@/img/layout/empty1.png')" description="您还没有待上课程哦~" />
+            <div class="courseBoard">
+               <div class="details">
+                  <el-empty class="empty" :image="require('@/img/layout/empty1.png')" description="您还没有待上课程哦~" />
+               </div>
             </div>
-         </div>
+         </ElScrollbar>
       </div>
    </navContainer>
 </template>
@@ -79,11 +81,13 @@ function handleRouter(url?: string) {
         })
 }
 </script>
-
 <style lang="scss" scoped>
 .navContainer :deep(.navCon) {
-   .navImg > img {
-      top: 72% !important;
+   .navImg {
+      margin-left: 5rem;
+      > img {
+         top: 70% !important;
+      }
    }
    .nav {
       font-size: 28px;
@@ -96,49 +100,61 @@ function handleRouter(url?: string) {
 .homePage {
    width: 100%;
    height: 100%;
-   padding: 50px;
-   display: flex;
+   & > :deep(.elScrollbar) {
+      .el-scrollbar__view {
+         width: 100%;
+         display: flex;
+         padding: 5rem 5rem 0;
+      }
+      .el-scrollbar__wrap {
+         overflow-x: hidden;
+      }
+      .el-scrollbar__bar.is-vertical {
+         width: 4px;
+         right: 0;
+      }
+   }
    .classTypes {
       flex-grow: 1;
       display: flex;
       flex-wrap: wrap;
-      margin-bottom: -30px;
-      margin-left: -30px;
+      justify-content: space-between;
+      height: 72.9rem;
+      align-content: space-between;
       .classType {
          background: #feffff;
-         box-shadow: 0px 2px 14px 0px #f1e3cc;
-         border-radius: 34px;
-         margin-left: 30px;
-         margin-bottom: 30px;
-         width: calc(33.33% - 30px);
+         box-shadow: 0px 0.2rem 1.4rem 0 #f1e3cc;
+         border-radius: 3.4rem;
+         width: 36rem;
+         height: 35rem;
          display: flex;
          justify-content: center;
          align-items: center;
          flex-direction: column;
          cursor: pointer;
+         padding: 4.4rem 5.3rem;
          &:hover {
             transform: scale(1.02);
-            box-shadow: 0px 2px 14px 0px #e4d7c2;
+            box-shadow: 0px 0.2rem 1.4rem 0px #e4d7c2;
          }
          > div {
-            margin-top: 10px;
+            margin-top: 1rem;
             font-family: AlimamaFangYuanTiVF, AlimamaFangYuanTiVF;
             font-weight: bold;
-            font-size: 28px;
+            font-size: 2.8rem;
             color: #393939;
          }
          > img {
             width: 100%;
-            max-width: 254px;
          }
       }
    }
    .courseBoard {
       flex-shrink: 0;
-      margin-left: 50px;
-      margin-top: -35px;
-      width: 572px;
-      height: calc(100% + 35px);
+      margin-left: 5rem;
+      margin-top: -3.5rem;
+      width: 57.2rem;
+      height: 76.4rem;
       background: url("@/img/homePage/bg.png") no-repeat;
       background-size: 100% 100%;
       position: relative;
@@ -148,7 +164,12 @@ function handleRouter(url?: string) {
          display: flex;
          justify-content: center;
          align-items: center;
-         top: 168px;
+         top: 24.8rem;
+         :deep(.empty) {
+            .el-empty__image {
+               width: 36rem;
+            }
+         }
       }
    }
 }

+ 51 - 29
src/views/homePage/homePage_gyt.vue

@@ -6,17 +6,19 @@
 <template>
    <navContainer class="navContainer" :headImg="headImg" :navs="navs">
       <div class="homePage">
-         <div class="classTypes">
-            <div class="classType" v-for="item in classTypes" :key="item.name" @click="handleRouter(item.url)">
-               <img :src="item.img" />
-               <div>{{ item.name }}</div>
+         <ElScrollbar class="elScrollbar">
+            <div class="classTypes">
+               <div class="classType" v-for="item in classTypes" :key="item.name" @click="handleRouter(item.url)">
+                  <img :src="item.img" />
+                  <div>{{ item.name }}</div>
+               </div>
             </div>
-         </div>
-         <div class="courseBoard">
-            <div class="details">
-               <el-empty style="margin-top: 50px" :image-size="360" :image="require('@/img/layout/empty1.png')" description="您还没有待上课程哦~" />
+            <div class="courseBoard">
+               <div class="details">
+                  <el-empty class="empty" :image="require('@/img/layout/empty1.png')" description="您还没有待上课程哦~" />
+               </div>
             </div>
-         </div>
+         </ElScrollbar>
       </div>
    </navContainer>
 </template>
@@ -82,8 +84,11 @@ function handleRouter(url?: string) {
 
 <style lang="scss" scoped>
 .navContainer :deep(.navCon) {
-   .navImg > img {
-      top: 72% !important;
+   .navImg {
+      margin-left: 5rem;
+      > img {
+         top: 70% !important;
+      }
    }
    .nav {
       font-size: 28px;
@@ -96,49 +101,61 @@ function handleRouter(url?: string) {
 .homePage {
    width: 100%;
    height: 100%;
-   padding: 50px;
-   display: flex;
+   & > :deep(.elScrollbar) {
+      .el-scrollbar__view {
+         width: 100%;
+         display: flex;
+         padding: 5rem 5rem 0;
+      }
+      .el-scrollbar__wrap {
+         overflow-x: hidden;
+      }
+      .el-scrollbar__bar.is-vertical {
+         width: 4px;
+         right: 0;
+      }
+   }
    .classTypes {
       flex-grow: 1;
       display: flex;
       flex-wrap: wrap;
-      margin-bottom: -30px;
-      margin-left: -30px;
+      justify-content: space-between;
+      height: 72.9rem;
+      align-content: space-between;
       .classType {
          background: #feffff;
-         box-shadow: 0px 2px 14px 0px #f1e3cc;
-         border-radius: 34px;
-         margin-left: 30px;
-         margin-bottom: 30px;
-         width: calc(33.33% - 30px);
+         box-shadow: 0px 0.2rem 1.4rem 0 #f1e3cc;
+         border-radius: 3.4rem;
+         width: 36rem;
+         height: 35rem;
          display: flex;
          justify-content: center;
          align-items: center;
          flex-direction: column;
          cursor: pointer;
+         padding: 4.4rem 5.3rem;
          &:hover {
             transform: scale(1.02);
-            box-shadow: 0px 2px 14px 0px #e4d7c2;
+            box-shadow: 0px 0.2rem 1.4rem 0px #e4d7c2;
          }
          > div {
-            margin-top: 10px;
+            margin-top: 1rem;
             font-family: AlimamaFangYuanTiVF, AlimamaFangYuanTiVF;
             font-weight: bold;
-            font-size: 28px;
+            font-size: 2.8rem;
             color: #393939;
          }
          > img {
             width: 100%;
-            max-width: 254px;
          }
       }
    }
    .courseBoard {
       flex-shrink: 0;
-      margin-left: 50px;
-      margin-top: -35px;
-      width: 572px;
-      height: calc(100% + 35px);
+      margin-left: 5rem;
+      margin-top: -3.5rem;
+      width: 57.2rem;
+      height: 76.4rem;
       background: url("@/img/homePage/bg.png") no-repeat;
       background-size: 100% 100%;
       position: relative;
@@ -148,7 +165,12 @@ function handleRouter(url?: string) {
          display: flex;
          justify-content: center;
          align-items: center;
-         top: 168px;
+         top: 24.8rem;
+         :deep(.empty) {
+            .el-empty__image {
+               width: 36rem;
+            }
+         }
       }
    }
 }

+ 3 - 0
src/viewsframe/errorPage/errorPage.vue

@@ -18,7 +18,9 @@
 </template>
 
 <script setup lang="ts">
+import "vant/lib/index.css"
 import { useRouter } from "vue-router"
+
 const router = useRouter()
 
 function handleGoHome() {
@@ -55,6 +57,7 @@ function handleGoBack() {
          line-height: 41px;
       }
       .title {
+         margin-top: 10px;
          font-weight: 400;
          font-size: 22px;
          color: #aaaaaa;

+ 0 - 1
src/viewsframe/layout/layout.vue

@@ -67,7 +67,6 @@ function handleLogout() {
 .layout {
    width: 100%;
    height: 100%;
-   min-height: 880px;
    background: linear-gradient(180deg, #ffd884 0%, #ffa943 100%);
    box-shadow: 0px 11px 15px 0px #63bd73, inset 0px 1px 14px 0px rgba(255, 255, 255, 0.5);
    .head {