baiseventeen 2 роки тому
батько
коміт
ca9f1bb6fc

+ 27 - 0
src/apis/index.ts

@@ -0,0 +1,27 @@
+import userApis from "@/apis/user";
+import testApis from "@/apis/test";
+import editorApis from "@/apis/editor";
+import dictApis from "@/apis/dictionary";
+import aiApis from "@/apis/ai";
+import engagementApis from "@/apis/engagement";
+import assignmentApis from "@/apis/assignment";
+import courseApis from "@/apis/course";
+
+
+const apis = {
+    ...userApis,
+    ...testApis,
+    ...editorApis,
+    ...engagementApis,
+    ...aiApis,
+    ...dictApis,
+    ...assignmentApis,
+    ...courseApis
+}
+
+// hook
+const useApis = () => {
+    return apis
+}
+
+export default useApis

+ 66 - 0
src/router/index.ts

@@ -0,0 +1,66 @@
+import { createRouter, createWebHistory } from 'vue-router'
+
+const router = createRouter({
+  history: createWebHistory(import.meta.env.BASE_URL),
+  routes: [
+    {
+      path: "/",
+      redirect: "/login"
+    },
+    {
+      path: '/login',
+      name: 'login',
+      component: () => import('../views/LoginPage/LoginPage.vue')
+    },
+    {
+      path: '/course',
+      name: 'course',
+      component: () => import('../views/CoursePage/CoursePage.vue')
+    },
+    {
+      path: '/home',
+      name: 'home',
+      redirect: '/home/courseSquare',
+      component: () => import('../layout/Layout/Layout.vue'),
+      children: [
+        {
+          path: 'courseSquare',
+          name: 'courseSquare',
+          component: () => import("../views/CourseSquare/index.vue")
+        },
+        {
+          path: 'courseDetail/:courseId',
+          name: 'courseDetail',
+          component: () => import("../views/CourseSquare/component/CourseDetails/index.vue")
+        },
+        {
+          path: 'allCourse',
+          name: 'allCourse',
+          component: () => import("../views/CourseSquare/component/AllCourse/AllCourse.vue")
+        },
+        {
+          path: 'myCourse',
+          name: 'myCourse',
+          component: () => import("../views/CoursePage/CoursePage.vue")
+        },
+        {
+          path: 'myHomework',
+          name: 'myHomework',
+          component: () => import("@/views/HomeworkPage/index.vue")
+        },
+        {
+          path: 'homeworkDetail/:assignmentId',
+          name: 'homeworkDetail',
+          component: () => import("@/views/HomeworkPage/component/HomeworkDetail.vue")
+        },
+        {
+          path: 'assignment/:assignmentId/edit',
+          name: 'edit',
+          component: () => import('../views/EditPage/EditPage.vue')
+        },
+      ]
+    },
+  ]
+})
+
+export default router

+ 56 - 0
src/views/CourseSquare/component/Course/index.scss

@@ -0,0 +1,56 @@
+.course-content {
+  position: relative;
+  width: 100%;
+  overflow: hidden;
+  margin: 40px auto 0 auto;
+
+  .course-header {
+    display: flex;
+    margin-bottom: 10px;
+  }
+
+  .header-title {
+    font-size: 20px;
+    padding-left: 20%;
+  }
+
+  .header-more {
+    font-size: 14px;
+    color: cornflowerblue;
+  }
+
+  .course-items-container {
+    display: flex;
+    justify-content: center;
+    gap: 10px;
+    //padding: 10px;
+  }
+
+  .el-card__body {
+    padding: 0;
+  }
+
+  .course-item {
+    flex: 1;
+    max-width: 200px;
+    box-sizing: border-box;
+    //padding: 10px;
+    height: 270px;
+    line-height: 30px;
+
+    .course-item-img {
+      width: 100%;
+      height: 100%;
+      object-fit: cover;
+    }
+
+    .course-item-content {
+      font-size: 14px;
+      padding: 0 10px;
+    }
+
+    &.active {
+      cursor: pointer;
+    }
+  }
+}

+ 49 - 0
src/views/CourseSquare/component/CourseDetails/index.scss

@@ -0,0 +1,49 @@
+.course-details {
+  width: 800px;
+  margin: 0 auto;
+  padding: 20px;
+  //background-color: #fff;
+
+
+  .course-details-info {
+    padding: 20px;
+    box-sizing: border-box;
+    border-radius: 7px;
+    border: solid 1px #d0d0d0;
+    display: flex;
+    gap: 20px;
+    background-color: #fff;
+
+    .course-details-image {
+      width: 350px;
+      //background-color: #d9d9d9;
+      height: 200px;
+      border-radius: 7px;
+    }
+
+    .course-details-text {
+      display: flex;
+      flex-direction: column;
+      gap: 15px;
+    }
+
+    .title {
+      font-size: 18px;
+    }
+
+    .item {
+
+    }
+  }
+
+  .course-tabs {
+    border: solid 1px #d0d0d0;
+    padding: 20px;
+    margin-top: 20px;
+    border-radius: 7px;
+    background-color: #fff;
+
+  }
+
+
+}

+ 6 - 0
src/views/CourseSquare/index.scss

@@ -0,0 +1,6 @@
+.course {
+  padding: 20px;
+  box-sizing: border-box;
+  //height: 100%;
+  overflow: auto;
+}

+ 22 - 0
src/views/EditPage/index.scss

@@ -0,0 +1,22 @@
+.my-work {
+  padding: 20px 0 20px 12px;
+  box-sizing: border-box;
+  height: calc(100vh - 40px);
+  display: flex;
+  gap: 20px;
+
+  .my-work-slider {
+    width: 25%;
+    height: 100% ;
+    display: flex;
+    flex-direction: column;
+    gap: 10px;
+    flex-shrink: 0;
+  }
+
+  .my-work-input {
+    width: 100%;
+    flex: 1;
+    max-width: 100%;
+  }
+}

+ 22 - 0
src/views/Home/component/Dictionaries/index.scss

@@ -0,0 +1,22 @@
+.dictionaries {
+  height: 40%; // 原值40%
+  background-color: #ffffff;
+  padding: 10px;
+  border-radius: 10px;
+
+  .box-dialog {
+    border: solid 1px #efefef;
+    border-radius: 5px;
+    margin-top: 10px;
+    height: calc(100% - 40px);
+    display: flex;
+    flex-direction: column;
+    flex: 1;
+    padding: 15px;
+    box-sizing: border-box;
+
+    .ant-input-outlined {
+      border-radius: 100px !important;
+    }
+  }
+}

+ 44 - 0
src/views/Home/component/Edit/index.scss

@@ -0,0 +1,44 @@
+.edit {
+  display: flex;
+  flex-direction: column;
+  height: 100%;
+}
+
+.down {
+  text-align: right;
+}
+
+.edit-box {
+  max-height: 100%;
+  display: flex;
+  gap: 10px;
+  margin-top: auto;
+  flex-direction: column;
+  height: 100%;
+}
+
+
+.button-right {
+  display: flex;
+  gap: 20px;
+  justify-content: flex-end;
+
+}
+
+
+.edit-toolbar-box {
+  height: 300px;
+  overflow: auto;
+  width: 100%;
+}
+
+.edit-root {
+  border: solid 1px rgba(199, 199, 199, 0.3);
+  height: 100%;
+}
+
+.edit-box-header {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}

+ 44 - 0
src/views/LoginPage/component/index.scss

@@ -0,0 +1,44 @@
+.login-style {
+  .box-vessel {
+    padding: 20px 32px;
+    box-sizing: border-box;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    height: 100%;
+    flex: 1;
+
+    .code-button-active {
+      color: #fff;
+      background-color: var(--main-color);
+
+      &:hover {
+        color: #fff;
+        //background-color: rgba(var(--main-color), 0.9);
+        background-color: rgba(#1677ff, 0.5);
+      }
+    }
+
+    .login-button{
+      width: 100%;
+      color: #fff;
+      background-color: var(--main-color);
+    }
+
+    .forget {
+      font-size: 14px;
+      text-align: right;
+      margin-bottom: 20px;
+      cursor: pointer;
+      color: var(--main-color)
+    }
+
+
+    .sign {
+      text-align: center;
+      font-size: 12px;
+      color: #8e8e8e;
+      cursor: pointer;
+    }
+  }
+}

+ 87 - 0
src/views/LoginPage/index.scss

@@ -0,0 +1,87 @@
+@import "@/sass/public";
+// 引入颜色
+@import "@/assets/global.css";
+
+.login-container {
+
+  height: 100%;
+
+  &::before {
+    content: "";
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 100%;
+    margin-left: -48%;
+    //background-image: url("../../image/back.svg");
+    // 上述地址不行
+    background-image: url("@/image/back.svg");
+    background-repeat: no-repeat;
+    background-position: 100%;
+    background-size: auto 100%;
+  }
+
+  .container-box {
+    position: relative;
+    z-index: 999;
+    display: flex;
+    @extend .size-width-100;
+
+    .login-logo {
+      position: relative;
+      @extend .size-width-100;
+
+      .logo-image {
+        position: absolute;
+        @extend .position-center-center;
+        font-size: 100px;
+        color: #fff;
+      }
+    }
+
+    .login-box {
+      @extend .size-width-100;
+      position: relative;
+
+      .box-content {
+        position: absolute;
+        width: 350px;
+        @extend .position-center-center;
+        border: solid 1px var(--boder-color);
+        border-radius: 7px;
+        height: 380px;
+        display: flex;
+        flex-direction: column;
+
+        .box-tabs {
+          display: flex;
+          align-items: center;
+          justify-content: center;
+          border-bottom: solid 1px var(--boder-color);
+
+          .box-tabs-item {
+            width: 50%;
+            text-align: center;
+            padding: 10px 0;
+            cursor: pointer;
+
+            &.active {
+              color: var(--main-color)
+            }
+
+            &:nth-child(1) {
+              border-right: solid 1px var(--boder-color);
+            }
+          }
+        }
+      }
+      .vessel-title {
+        margin-bottom: 20px;
+        text-align: center;
+        font-size: 20px;
+      }
+    }
+  }
+}
+