Browse Source

优化项目基础信息

lex 2 years ago
parent
commit
c50c9a5a5d
45 changed files with 210 additions and 297 deletions
  1. 13 1
      .prettierrc.js
  2. 3 0
      index.html
  3. 3 0
      manage.html
  4. 81 42
      package-lock.json
  5. 1 1
      package.json
  6. BIN
      src/components/col-result/images/liveCert.png
  7. BIN
      src/components/col-result/images/musicCert.png
  8. BIN
      src/components/col-result/images/teacherCert.png
  9. 0 0
      src/components/o-cropper/index.module.less
  10. 2 4
      src/components/o-cropper/index.tsx
  11. 0 0
      src/components/o-empty/images/empty.png
  12. 0 0
      src/components/o-empty/images/emptyContent.png
  13. 0 0
      src/components/o-empty/images/network.png
  14. 0 0
      src/components/o-empty/images/notFond.png
  15. 0 0
      src/components/o-empty/index.module.less
  16. 3 24
      src/components/o-empty/index.tsx
  17. 0 0
      src/components/o-header/index.module.less
  18. 5 6
      src/components/o-header/index.tsx
  19. 0 0
      src/components/o-img-code/index.module.less
  20. 13 28
      src/components/o-img-code/index.tsx
  21. 0 0
      src/components/o-popup/index.module.less
  22. 1 1
      src/components/o-popup/index.tsx
  23. 0 0
      src/components/o-protocol/index.module.less
  24. 12 22
      src/components/o-protocol/index.tsx
  25. 0 0
      src/components/o-search/index.module.less
  26. 0 0
      src/components/o-search/index.tsx
  27. 0 0
      src/components/o-sticky/index.module.less
  28. 1 1
      src/components/o-sticky/index.tsx
  29. 7 7
      src/helpers/utils.ts
  30. 6 7
      src/manage/main.ts
  31. 0 42
      src/router/index-manage.ts
  32. 0 42
      src/router/index-student.ts
  33. 15 2
      src/router/index.ts
  34. 10 1
      src/router/routes-common.ts
  35. 1 9
      src/router/routes-manage.ts
  36. 1 9
      src/router/routes-student.ts
  37. 5 10
      src/router/routes-teacher.ts
  38. 2 3
      src/state.ts
  39. 1 0
      src/student/home/index.tsx
  40. 2 9
      src/student/main.ts
  41. 8 8
      src/teacher/main.ts
  42. 4 9
      src/views/layout/auth.tsx
  43. 2 8
      src/views/layout/login.tsx
  44. 3 0
      teacher.html
  45. 5 1
      vite.config.ts

+ 13 - 1
.prettierrc.js

@@ -4,5 +4,17 @@ module.exports = {
   semi: false,
   arrowParens: 'avoid',
   trailingComma: 'none',
-  endOfLine: 'lf',
+  printWidth: 100,
+  tabWidth: 2,
+  useTabs: false,
+  quoteProps: 'as-needed',
+  jsxSingleQuote: false,
+  jsxBracketSameLine: false,
+  arrowParens: 'always',
+  rangeStart: 0,
+  requirePragma: false,
+  insertPragma: false,
+  proseWrap: 'preserve',
+  htmlWhitespaceSensitivity: 'css',
+  endOfLine: 'lf'
 }

+ 3 - 0
index.html

@@ -36,6 +36,9 @@
   <meta name="msapplication-tap-highlight" content="no" />
   <title>酷乐秀</title>
   <script src="/flexible.js" charset="UTF-8"></script>
+  <script type="text/javascript">
+    window.paymentType = 'STUDENT'
+  </script>
 </head>
 
 <body>

+ 3 - 0
manage.html

@@ -36,6 +36,9 @@
   <meta name="msapplication-tap-highlight" content="no" />
   <title>酷乐秀</title>
   <script src="/flexible.js" charset="UTF-8"></script>
+  <script type="text/javascript">
+    window.paymentType = 'SCHOOL'
+  </script>
 </head>
 
 <body>

+ 81 - 42
package-lock.json

@@ -29,7 +29,6 @@
         "umi-request": "^1.4.0",
         "vant": "^3.4.6",
         "vconsole": "^3.14.6",
-        "vite": "^2.9.8",
         "vue": "^3.2.26",
         "vue-cropper": "^1.0.3",
         "vue-echarts": "^6.2.3",
@@ -64,6 +63,7 @@
         "postcss-pxtorem": "^6.0.0",
         "prettier": "^2.5.1",
         "typescript": "^4.5.2",
+        "vite": "^2.9.8",
         "vite-plugin-style-import": "^1.4.0",
         "vue-eslint-parser": "^8.0.1",
         "vue-tsc": "^0.29.8",
@@ -1850,6 +1850,7 @@
       "cpu": [
         "loong64"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "linux"
@@ -3938,6 +3939,7 @@
       "version": "0.14.54",
       "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.14.54.tgz",
       "integrity": "sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA==",
+      "dev": true,
       "hasInstallScript": true,
       "bin": {
         "esbuild": "bin/esbuild"
@@ -3976,6 +3978,7 @@
       "cpu": [
         "x64"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "android"
@@ -3991,6 +3994,7 @@
       "cpu": [
         "arm64"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "android"
@@ -4006,6 +4010,7 @@
       "cpu": [
         "x64"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "darwin"
@@ -4021,6 +4026,7 @@
       "cpu": [
         "arm64"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "darwin"
@@ -4036,6 +4042,7 @@
       "cpu": [
         "x64"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "freebsd"
@@ -4051,6 +4058,7 @@
       "cpu": [
         "arm64"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "freebsd"
@@ -4066,6 +4074,7 @@
       "cpu": [
         "ia32"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "linux"
@@ -4081,6 +4090,7 @@
       "cpu": [
         "x64"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "linux"
@@ -4096,6 +4106,7 @@
       "cpu": [
         "arm"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "linux"
@@ -4111,6 +4122,7 @@
       "cpu": [
         "arm64"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "linux"
@@ -4126,6 +4138,7 @@
       "cpu": [
         "mips64el"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "linux"
@@ -4141,6 +4154,7 @@
       "cpu": [
         "ppc64"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "linux"
@@ -4156,6 +4170,7 @@
       "cpu": [
         "riscv64"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "linux"
@@ -4171,6 +4186,7 @@
       "cpu": [
         "s390x"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "linux"
@@ -4186,6 +4202,7 @@
       "cpu": [
         "x64"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "netbsd"
@@ -4201,6 +4218,7 @@
       "cpu": [
         "x64"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "openbsd"
@@ -4216,6 +4234,7 @@
       "cpu": [
         "x64"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "sunos"
@@ -4231,6 +4250,7 @@
       "cpu": [
         "ia32"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "win32"
@@ -4246,6 +4266,7 @@
       "cpu": [
         "x64"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "win32"
@@ -4261,6 +4282,7 @@
       "cpu": [
         "arm64"
       ],
+      "dev": true,
       "optional": true,
       "os": [
         "win32"
@@ -5043,6 +5065,7 @@
       "version": "2.3.2",
       "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.2.tgz",
       "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
+      "dev": true,
       "hasInstallScript": true,
       "optional": true,
       "os": [
@@ -5793,15 +5816,12 @@
       }
     },
     "node_modules/is-core-module": {
-      "version": "2.8.1",
-      "resolved": "https://registry.npmmirror.com/is-core-module/-/is-core-module-2.8.1.tgz",
-      "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==",
-      "license": "MIT",
+      "version": "2.11.0",
+      "resolved": "https://registry.npmmirror.com/is-core-module/-/is-core-module-2.11.0.tgz",
+      "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==",
+      "dev": true,
       "dependencies": {
         "has": "^1.0.3"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
       }
     },
     "node_modules/is-expression": {
@@ -7548,6 +7568,7 @@
       "version": "1.0.7",
       "resolved": "https://registry.npmmirror.com/path-parse/-/path-parse-1.0.7.tgz",
       "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
+      "dev": true,
       "license": "MIT"
     },
     "node_modules/path-root": {
@@ -7672,20 +7693,9 @@
       }
     },
     "node_modules/postcss": {
-      "version": "8.4.14",
-      "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.14.tgz",
-      "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==",
-      "funding": [
-        {
-          "type": "opencollective",
-          "url": "https://opencollective.com/postcss/"
-        },
-        {
-          "type": "tidelift",
-          "url": "https://tidelift.com/funding/github/npm/postcss"
-        }
-      ],
-      "license": "MIT",
+      "version": "8.4.19",
+      "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.19.tgz",
+      "integrity": "sha512-h+pbPsyhlYj6N2ozBmHhHrs9DzGmbaarbLvWipMRO7RLS+v4onj26MPFXA5OBYFxyqYhUJK456SwDcY9H2/zsA==",
       "dependencies": {
         "nanoid": "^3.3.4",
         "picocolors": "^1.0.0",
@@ -8169,20 +8179,17 @@
       "license": "MIT"
     },
     "node_modules/resolve": {
-      "version": "1.22.0",
-      "resolved": "https://registry.npmmirror.com/resolve/-/resolve-1.22.0.tgz",
-      "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==",
-      "license": "MIT",
+      "version": "1.22.1",
+      "resolved": "https://registry.npmmirror.com/resolve/-/resolve-1.22.1.tgz",
+      "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",
+      "dev": true,
       "dependencies": {
-        "is-core-module": "^2.8.1",
+        "is-core-module": "^2.9.0",
         "path-parse": "^1.0.7",
         "supports-preserve-symlinks-flag": "^1.0.0"
       },
       "bin": {
         "resolve": "bin/resolve"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
       }
     },
     "node_modules/resolve-dir": {
@@ -8261,6 +8268,7 @@
       "version": "2.79.1",
       "resolved": "https://registry.npmmirror.com/rollup/-/rollup-2.79.1.tgz",
       "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==",
+      "dev": true,
       "bin": {
         "rollup": "dist/bin/rollup"
       },
@@ -8661,6 +8669,7 @@
       "version": "1.0.0",
       "resolved": "https://registry.npmmirror.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
       "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
+      "dev": true,
       "license": "MIT",
       "engines": {
         "node": ">= 0.4"
@@ -9051,6 +9060,7 @@
       "version": "2.9.8",
       "resolved": "https://registry.npmmirror.com/vite/-/vite-2.9.8.tgz",
       "integrity": "sha512-zsBGwn5UT3YS0NLSJ7hnR54+vUKfgzMUh/Z9CxF1YKEBVIe213+63jrFLmZphgGI5zXwQCSmqIdbPuE8NJywPw==",
+      "dev": true,
       "dependencies": {
         "esbuild": "^0.14.27",
         "postcss": "^8.4.13",
@@ -11078,6 +11088,7 @@
       "version": "0.14.54",
       "resolved": "https://registry.npmmirror.com/@esbuild/linux-loong64/-/linux-loong64-0.14.54.tgz",
       "integrity": "sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw==",
+      "dev": true,
       "optional": true
     },
     "@eslint/eslintrc": {
@@ -12520,6 +12531,7 @@
       "version": "0.14.54",
       "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.14.54.tgz",
       "integrity": "sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA==",
+      "dev": true,
       "requires": {
         "@esbuild/linux-loong64": "0.14.54",
         "esbuild-android-64": "0.14.54",
@@ -12548,120 +12560,140 @@
       "version": "0.14.54",
       "resolved": "https://registry.npmmirror.com/esbuild-android-64/-/esbuild-android-64-0.14.54.tgz",
       "integrity": "sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ==",
+      "dev": true,
       "optional": true
     },
     "esbuild-android-arm64": {
       "version": "0.14.54",
       "resolved": "https://registry.npmmirror.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.54.tgz",
       "integrity": "sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg==",
+      "dev": true,
       "optional": true
     },
     "esbuild-darwin-64": {
       "version": "0.14.54",
       "resolved": "https://registry.npmmirror.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.54.tgz",
       "integrity": "sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug==",
+      "dev": true,
       "optional": true
     },
     "esbuild-darwin-arm64": {
       "version": "0.14.54",
       "resolved": "https://registry.npmmirror.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.54.tgz",
       "integrity": "sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==",
+      "dev": true,
       "optional": true
     },
     "esbuild-freebsd-64": {
       "version": "0.14.54",
       "resolved": "https://registry.npmmirror.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.54.tgz",
       "integrity": "sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg==",
+      "dev": true,
       "optional": true
     },
     "esbuild-freebsd-arm64": {
       "version": "0.14.54",
       "resolved": "https://registry.npmmirror.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.54.tgz",
       "integrity": "sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q==",
+      "dev": true,
       "optional": true
     },
     "esbuild-linux-32": {
       "version": "0.14.54",
       "resolved": "https://registry.npmmirror.com/esbuild-linux-32/-/esbuild-linux-32-0.14.54.tgz",
       "integrity": "sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw==",
+      "dev": true,
       "optional": true
     },
     "esbuild-linux-64": {
       "version": "0.14.54",
       "resolved": "https://registry.npmmirror.com/esbuild-linux-64/-/esbuild-linux-64-0.14.54.tgz",
       "integrity": "sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg==",
+      "dev": true,
       "optional": true
     },
     "esbuild-linux-arm": {
       "version": "0.14.54",
       "resolved": "https://registry.npmmirror.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.54.tgz",
       "integrity": "sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw==",
+      "dev": true,
       "optional": true
     },
     "esbuild-linux-arm64": {
       "version": "0.14.54",
       "resolved": "https://registry.npmmirror.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.54.tgz",
       "integrity": "sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==",
+      "dev": true,
       "optional": true
     },
     "esbuild-linux-mips64le": {
       "version": "0.14.54",
       "resolved": "https://registry.npmmirror.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.54.tgz",
       "integrity": "sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw==",
+      "dev": true,
       "optional": true
     },
     "esbuild-linux-ppc64le": {
       "version": "0.14.54",
       "resolved": "https://registry.npmmirror.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.54.tgz",
       "integrity": "sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ==",
+      "dev": true,
       "optional": true
     },
     "esbuild-linux-riscv64": {
       "version": "0.14.54",
       "resolved": "https://registry.npmmirror.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.54.tgz",
       "integrity": "sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg==",
+      "dev": true,
       "optional": true
     },
     "esbuild-linux-s390x": {
       "version": "0.14.54",
       "resolved": "https://registry.npmmirror.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.54.tgz",
       "integrity": "sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA==",
+      "dev": true,
       "optional": true
     },
     "esbuild-netbsd-64": {
       "version": "0.14.54",
       "resolved": "https://registry.npmmirror.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.54.tgz",
       "integrity": "sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w==",
+      "dev": true,
       "optional": true
     },
     "esbuild-openbsd-64": {
       "version": "0.14.54",
       "resolved": "https://registry.npmmirror.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.54.tgz",
       "integrity": "sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw==",
+      "dev": true,
       "optional": true
     },
     "esbuild-sunos-64": {
       "version": "0.14.54",
       "resolved": "https://registry.npmmirror.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.54.tgz",
       "integrity": "sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw==",
+      "dev": true,
       "optional": true
     },
     "esbuild-windows-32": {
       "version": "0.14.54",
       "resolved": "https://registry.npmmirror.com/esbuild-windows-32/-/esbuild-windows-32-0.14.54.tgz",
       "integrity": "sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w==",
+      "dev": true,
       "optional": true
     },
     "esbuild-windows-64": {
       "version": "0.14.54",
       "resolved": "https://registry.npmmirror.com/esbuild-windows-64/-/esbuild-windows-64-0.14.54.tgz",
       "integrity": "sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ==",
+      "dev": true,
       "optional": true
     },
     "esbuild-windows-arm64": {
       "version": "0.14.54",
       "resolved": "https://registry.npmmirror.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.54.tgz",
       "integrity": "sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg==",
+      "dev": true,
       "optional": true
     },
     "escalade": {
@@ -13190,6 +13222,7 @@
       "version": "2.3.2",
       "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.2.tgz",
       "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
+      "dev": true,
       "optional": true
     },
     "function-bind": {
@@ -13678,9 +13711,10 @@
       }
     },
     "is-core-module": {
-      "version": "2.8.1",
-      "resolved": "https://registry.npmmirror.com/is-core-module/-/is-core-module-2.8.1.tgz",
-      "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==",
+      "version": "2.11.0",
+      "resolved": "https://registry.npmmirror.com/is-core-module/-/is-core-module-2.11.0.tgz",
+      "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==",
+      "dev": true,
       "requires": {
         "has": "^1.0.3"
       }
@@ -14869,7 +14903,8 @@
     "path-parse": {
       "version": "1.0.7",
       "resolved": "https://registry.npmmirror.com/path-parse/-/path-parse-1.0.7.tgz",
-      "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="
+      "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
+      "dev": true
     },
     "path-root": {
       "version": "0.1.1",
@@ -14952,9 +14987,9 @@
       "integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw=="
     },
     "postcss": {
-      "version": "8.4.14",
-      "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.14.tgz",
-      "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==",
+      "version": "8.4.19",
+      "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.19.tgz",
+      "integrity": "sha512-h+pbPsyhlYj6N2ozBmHhHrs9DzGmbaarbLvWipMRO7RLS+v4onj26MPFXA5OBYFxyqYhUJK456SwDcY9H2/zsA==",
       "requires": {
         "nanoid": "^3.3.4",
         "picocolors": "^1.0.0",
@@ -15312,11 +15347,12 @@
       "integrity": "sha512-R/tCuvuOHQ8o2boRP6vgx8hXCCy87H1eY9V5imBYeVNyNVpuL9ciReSccLj2gDcax9+2weXy3bc8Vv+NRXeEvQ=="
     },
     "resolve": {
-      "version": "1.22.0",
-      "resolved": "https://registry.npmmirror.com/resolve/-/resolve-1.22.0.tgz",
-      "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==",
+      "version": "1.22.1",
+      "resolved": "https://registry.npmmirror.com/resolve/-/resolve-1.22.1.tgz",
+      "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",
+      "dev": true,
       "requires": {
-        "is-core-module": "^2.8.1",
+        "is-core-module": "^2.9.0",
         "path-parse": "^1.0.7",
         "supports-preserve-symlinks-flag": "^1.0.0"
       }
@@ -15372,6 +15408,7 @@
       "version": "2.79.1",
       "resolved": "https://registry.npmmirror.com/rollup/-/rollup-2.79.1.tgz",
       "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==",
+      "dev": true,
       "requires": {
         "fsevents": "~2.3.2"
       }
@@ -15625,7 +15662,8 @@
     "supports-preserve-symlinks-flag": {
       "version": "1.0.0",
       "resolved": "https://registry.npmmirror.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
-      "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w=="
+      "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
+      "dev": true
     },
     "svg-tags": {
       "version": "1.0.0",
@@ -15895,6 +15933,7 @@
       "version": "2.9.8",
       "resolved": "https://registry.npmmirror.com/vite/-/vite-2.9.8.tgz",
       "integrity": "sha512-zsBGwn5UT3YS0NLSJ7hnR54+vUKfgzMUh/Z9CxF1YKEBVIe213+63jrFLmZphgGI5zXwQCSmqIdbPuE8NJywPw==",
+      "dev": true,
       "requires": {
         "esbuild": "^0.14.27",
         "fsevents": "~2.3.2",

+ 1 - 1
package.json

@@ -41,7 +41,6 @@
     "umi-request": "^1.4.0",
     "vant": "^3.4.6",
     "vconsole": "^3.14.6",
-    "vite": "^2.9.8",
     "vue": "^3.2.26",
     "vue-cropper": "^1.0.3",
     "vue-echarts": "^6.2.3",
@@ -76,6 +75,7 @@
     "postcss-pxtorem": "^6.0.0",
     "prettier": "^2.5.1",
     "typescript": "^4.5.2",
+    "vite": "^2.9.8",
     "vite-plugin-style-import": "^1.4.0",
     "vue-eslint-parser": "^8.0.1",
     "vue-tsc": "^0.29.8",

BIN
src/components/col-result/images/liveCert.png


BIN
src/components/col-result/images/musicCert.png


BIN
src/components/col-result/images/teacherCert.png


+ 0 - 0
src/components/col-cropper/index.module.less → src/components/o-cropper/index.module.less


+ 2 - 4
src/components/col-cropper/index.tsx → src/components/o-cropper/index.tsx

@@ -4,7 +4,7 @@ import { VueCropper } from 'vue-cropper'
 import styles from './index.module.less'
 
 export default defineComponent({
-  name: 'col-cropper',
+  name: 'o-cropper',
   components: { VueCropper },
   props: {
     hideInput: {
@@ -259,9 +259,7 @@ export default defineComponent({
         throw new Error('Arguments base64 MIME is not image/*')
       }
       // Base64 Regex @see https://learnku.com/articles/42295
-      if (
-        !/^[\/]?([\da-zA-Z]+[\/+]+)*[\da-zA-Z]+([+=]{1,2}|[\/])?$/.test(base[1])
-      ) {
+      if (!/^[\/]?([\da-zA-Z]+[\/+]+)*[\da-zA-Z]+([+=]{1,2}|[\/])?$/.test(base[1])) {
         throw new Error('Not standard base64')
       }
       this.img = base64

+ 0 - 0
src/components/col-result/images/empty.png → src/components/o-empty/images/empty.png


+ 0 - 0
src/components/col-result/images/emptyContent.png → src/components/o-empty/images/emptyContent.png


+ 0 - 0
src/components/col-result/images/network.png → src/components/o-empty/images/network.png


+ 0 - 0
src/components/col-result/images/notFond.png → src/components/o-empty/images/notFond.png


+ 0 - 0
src/components/col-result/index.module.less → src/components/o-empty/index.module.less


+ 3 - 24
src/components/col-result/index.tsx → src/components/o-empty/index.tsx

@@ -11,7 +11,7 @@ export const getAssetsHomeFile = (fileName: string) => {
 }
 
 export default defineComponent({
-  name: 'col-result',
+  name: 'o-empty',
   props: {
     tips: {
       type: String
@@ -19,15 +19,7 @@ export default defineComponent({
     type: {
       // 空 | 达人认证 | 音乐人认证 | 直播认证
       type: String as PropType<
-        | 'empty'
-        | 'teacherCert'
-        | 'musicCert'
-        | 'liveCert'
-        | 'error'
-        | 'network'
-        | 'search'
-        | 'emptyContent'
-        | 'notFond'
+        'empty' | 'error' | 'network' | 'search' | 'emptyContent' | 'notFond'
       >,
       default: 'empty'
     },
@@ -62,15 +54,6 @@ export default defineComponent({
     image() {
       let image = null as any
       switch (this.type) {
-        case 'teacherCert':
-          image = getAssetsHomeFile('teacherCert.png')
-          break
-        case 'musicCert':
-          image = getAssetsHomeFile('musicCert.png')
-          break
-        case 'liveCert':
-          image = getAssetsHomeFile('liveCert.png')
-          break
         case 'emptyContent':
           image = getAssetsHomeFile('emptyContent.png')
           break
@@ -96,11 +79,7 @@ export default defineComponent({
   render() {
     return (
       <div class={[styles['col-result'], 'col-result-container']}>
-        <Empty
-          image={this.image}
-          class={styles[this.classImgSize]}
-          description={this.tips}
-        />
+        <Empty image={this.image} class={styles[this.classImgSize]} description={this.tips} />
 
         {this.btnStatus ? (
           <Button

+ 0 - 0
src/components/col-header/index.module.less → src/components/o-header/index.module.less


+ 5 - 6
src/components/col-header/index.tsx → src/components/o-header/index.tsx

@@ -7,7 +7,7 @@ import styles from './index.module.less'
 type backIconColor = 'black' | 'white'
 
 export default defineComponent({
-  name: 'col-header',
+  name: 'o-header',
   props: {
     title: String,
     isBack: {
@@ -92,13 +92,13 @@ export default defineComponent({
         content: { iconStyle: this.backIconColor || 'black' }
       })
 
-      let sNavHeight = sessionStorage.getItem('navHeight')
-      let sTitleHeight = sessionStorage.getItem('titleHeight')
+      const sNavHeight = sessionStorage.getItem('navHeight')
+      const sTitleHeight = sessionStorage.getItem('titleHeight')
       if (sNavHeight && sTitleHeight) {
         this.navBarHeight = Number(sNavHeight)
         callBack && callBack()
       } else {
-        postMessage({ api: 'getNavHeight' }, res => {
+        postMessage({ api: 'getNavHeight' }, (res) => {
           const { content } = res as any
           const dpi = content.dpi || 2
           if (content.navHeight) {
@@ -162,8 +162,7 @@ export default defineComponent({
                 onClick-right={this.clickRight}
                 onClick-left={this.onClickLeft}
                 v-slots={{
-                  right: () =>
-                    (this.$slots.right && this.$slots.right()) || this.rightText
+                  right: () => (this.$slots.right && this.$slots.right()) || this.rightText
                 }}
               ></NavBar>
             </div>

+ 0 - 0
src/components/col-img-code/index.module.less → src/components/o-img-code/index.module.less


+ 13 - 28
src/components/col-img-code/index.tsx → src/components/o-img-code/index.tsx

@@ -5,7 +5,7 @@ import request from '@/helpers/request'
 import { state } from '@/state'
 
 export default defineComponent({
-  name: 'imgCode',
+  name: 'o-img-code',
   props: {
     value: Boolean,
     phone: [String, Number],
@@ -20,14 +20,12 @@ export default defineComponent({
     }
   },
   data() {
-    let origin = window.location.origin
-    let suffix =
-      state.platformType === 'STUDENT' ? '/api-student' : '/api-teacher'
+    const origin = window.location.origin
+    const suffix = state.platformApi
     return {
       isSuffix: suffix,
       showStatus: false,
-      identifyingCode:
-        origin + suffix + '/code/getImageCode?phone=' + this.phone,
+      identifyingCode: origin + suffix + '/code/getImageCode?phone=' + this.phone,
       code: null
     }
   },
@@ -47,10 +45,10 @@ export default defineComponent({
   methods: {
     async updateIdentifyingCode() {
       // 刷新token
-      let origin = window.location.origin
-      this.identifyingCode = `${origin}${
-        this.isSuffix
-      }/code/getImageCode?phone=${this.phone}&token=${Math.random()}`
+      const origin = window.location.origin
+      this.identifyingCode = `${origin}${this.isSuffix}/code/getImageCode?phone=${
+        this.phone
+      }&token=${Math.random()}`
     },
     async checkVerifyLoginImage() {
       try {
@@ -81,7 +79,6 @@ export default defineComponent({
   },
   render() {
     return (
-      // @ts-ignore
       <Popup
         show={this.showStatus}
         class={styles.imgCodePopup}
@@ -96,29 +93,17 @@ export default defineComponent({
           <p class={styles.codeTitle}>输入图形验证码</p>
           <Row>
             <Col span="14">
-              <Field
-                placeholder="请输入验证码"
-                v-model={this.code}
-                class={styles.field}
-              />
+              <Field placeholder="请输入验证码" v-model={this.code} class={styles.field} />
             </Col>
             <Col span="10" class={styles.img}>
-              <VanImage
-                src={this.identifyingCode}
-                onClick={() => this.updateIdentifyingCode()}
-                // @ts-ignore
-                vSlots={{
-                  loading: () => <Loading type="spinner" size="20" />
-                }}
-              />
+              <VanImage src={this.identifyingCode} onClick={() => this.updateIdentifyingCode()}>
+                {{ loading: () => <Loading type="spinner" size="20" /> }}
+              </VanImage>
             </Col>
           </Row>
           <Row style={{ display: 'flex', justifyContent: 'end' }}>
             <Col span="10">
-              <span
-                class={styles.imgChange}
-                onClick={() => this.updateIdentifyingCode()}
-              >
+              <span class={styles.imgChange} onClick={() => this.updateIdentifyingCode()}>
                 看不清?换一换
               </span>
             </Col>

+ 0 - 0
src/components/col-popup/index.module.less → src/components/o-popup/index.module.less


+ 1 - 1
src/components/col-popup/index.tsx → src/components/o-popup/index.tsx

@@ -33,7 +33,7 @@ export default defineComponent({
     }
   },
   watch: {
-    modelValue(val) {
+    modelValue() {
       this.hashState()
     }
   },

+ 0 - 0
src/components/col-protocol/index.module.less → src/components/o-protocol/index.module.less


+ 12 - 22
src/components/col-protocol/index.tsx → src/components/o-protocol/index.tsx

@@ -3,7 +3,7 @@ import { defineComponent, PropType } from 'vue'
 import styles from './index.module.less'
 import activeButtonIcon from '@common/images/icon_checkbox.png'
 import inactiveButtonIcon from '@common/images/icon_checkbox_default.png'
-import ColHeader from '../col-header'
+import ColHeader from '../o-header'
 import { state } from '@/state'
 import request from '@/helpers/request'
 const protocolText = {
@@ -11,7 +11,7 @@ const protocolText = {
   REGISTER: '《酷乐秀平台注册协议》'
 }
 export default defineComponent({
-  name: 'protocol',
+  name: 'o-protocol',
   props: {
     showHeader: {
       type: Boolean,
@@ -33,20 +33,16 @@ export default defineComponent({
       popupStatus: false,
       protocolHTML: '',
       protocolPopup: null as any,
-      baseUrl:
-        state.platformType === 'STUDENT' ? '/api-student' : '/api-teacher'
+      baseUrl: state.platformType === 'STUDENT' ? '/api-student' : '/api-teacher'
     }
   },
   async mounted() {
     try {
-      const res = await request.get(
-        this.baseUrl + '/sysUserContractRecord/checkContractSign',
-        {
-          params: {
-            contractType: this.prototcolType
-          }
+      const res = await request.get(this.baseUrl + '/sysUserContractRecord/checkContractSign', {
+        params: {
+          contractType: this.prototcolType
         }
-      )
+      })
       // console.log(res)
       this.exists = res.data
       this.checked = this.checked || this.exists
@@ -70,14 +66,11 @@ export default defineComponent({
         console.log('getContractDetail')
         // 判断是否有协议内容
         if (!this.protocolHTML) {
-          const res = await request.get(
-            this.baseUrl + '/sysUserContractRecord/queryContract',
-            {
-              params: {
-                contractType: this.prototcolType
-              }
+          const res = await request.get(this.baseUrl + '/sysUserContractRecord/queryContract', {
+            params: {
+              contractType: this.prototcolType
             }
-          )
+          })
           this.protocolHTML = res.data
           console.log(res)
         }
@@ -141,10 +134,7 @@ export default defineComponent({
           {this.showHeader && <ColHeader title="酷乐秀平台服务协议" />}
           {this.popupStatus && (
             <div class={styles.protocolContent} id="mProtocol">
-              <div
-                class={styles.protocolContent}
-                v-html={this.protocolHTML}
-              ></div>
+              <div class={styles.protocolContent} v-html={this.protocolHTML}></div>
             </div>
           )}
         </Popup>

+ 0 - 0
src/components/col-search/index.module.less → src/components/o-search/index.module.less


+ 0 - 0
src/components/col-search/index.tsx → src/components/o-search/index.tsx


+ 0 - 0
src/components/col-sticky/index.module.less → src/components/o-sticky/index.module.less


+ 1 - 1
src/components/col-sticky/index.tsx → src/components/o-sticky/index.tsx

@@ -3,7 +3,7 @@ import { defineComponent } from 'vue'
 import styles from './index.module.less'
 
 export default defineComponent({
-  name: 'col-sticky',
+  name: 'o-sticky',
   props: {
     position: {
       type: String,

+ 7 - 7
src/helpers/utils.ts

@@ -14,14 +14,14 @@ export const browser = () => {
     mobile: !!u.match(/AppleWebKit.*Mobile.*/), //是否为移动终端
     ios: !!u.match(/Mac OS X/), //ios终端
     // ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
-    android: u.indexOf('COLEXIUAPPA') > -1 || u.indexOf('Adr') > -1, //android终端
-    iPhone: u.indexOf('COLEXIUAPPI') > -1, //是否为iPhone或者QQHD浏览器
+    android: u.indexOf('ORCHESTRAAPPA') > -1 || u.indexOf('Adr') > -1, //android终端
+    iPhone: u.indexOf('ORCHESTRAAPPI') > -1, //是否为iPhone或者QQHD浏览器
     isApp:
-      u.indexOf('COLEXIUAPPI') > -1 ||
-      u.indexOf('COLEXIUAPPA') > -1 ||
-      u.indexOf('Adr') > -1,
-    isTeacher: u.indexOf('COLEXIUTEACHER') > -1,
-    isStudent: u.indexOf('COLEXIUSTUDENT') > -1,
+      u.indexOf('ORCHESTRAAPPI') > -1 ||
+      u.indexOf('ORCHESTRAAPPA') > -1,
+    isTeacher: u.indexOf('ORCHESTRATEACHER') > -1,
+    isStudent: u.indexOf('ORCHESTRASTUDENT') > -1,
+    isSchool: u.indexOf('ORCHESTRASCHOOL') > -1,
     iPad: u.indexOf('iPad') > -1, //是否iPad
     webApp: u.indexOf('Safari') == -1, //是否web应该程序,没有头部与底部
     weixin: u.indexOf('MicroMessenger') > -1, //是否微信 (2015-01-22新增)

+ 6 - 7
src/manage/main.ts

@@ -1,8 +1,6 @@
 import { createApp } from 'vue'
 import App from './App.vue'
-import dayjs from 'dayjs'
-import 'dayjs/locale/zh-cn'
-import router from '../router/index-teacher'
+import router from '../router/index'
 import { postMessage } from '@/helpers/native-message'
 
 import 'normalize.css'
@@ -29,18 +27,19 @@ if (browser().isTeacher) {
   state.platformType = 'TEACHER'
 } else if (browser().isStudent) {
   state.platformType = 'STUDENT'
+} else if (browser().isSchool) {
+  state.platformType = 'SCHOOL'
 } else {
-  state.platformType = 'TEACHER'
+  state.platformType = 'SCHOOL'
 }
 if (state.platformType === 'TEACHER') {
   state.platformApi = '/api-teacher'
+} if (state.platformType === 'SCHOOL') {
+  state.platformApi = '/api-manage'
 } else {
   state.platformApi = '/api-student'
 }
 
-dayjs.locale('zh-ch')
-app.config.globalProperties.$dayjs = dayjs
-app.config.globalProperties.$filters = vueFilter
 app.use(router)
 
 app.mount('#app')

+ 0 - 42
src/router/index-manage.ts

@@ -1,42 +0,0 @@
-import { browser } from '@/helpers/utils'
-import { state } from '@/state'
-import { Dialog } from 'vant'
-import { createRouter, createWebHistory, Router } from 'vue-router'
-import { postMessage } from '@/helpers/native-message'
-import routes from './routes-manage'
-const router: Router = createRouter({
-  history: createWebHistory(),
-  routes
-})
-
-router.beforeEach((to, from, next) => {
-  const title = to.meta.title
-  document.title = (title || '酷乐秀') as any
-  next()
-})
-
-let isOpen = false
-router.onError(error => {
-  if (error instanceof Error) {
-    const isChunkLoadFailed = error.name.indexOf('chunk')
-    const targetPath = router.currentRoute.value.fullPath
-    if (isChunkLoadFailed && !isOpen) {
-      isOpen = true
-      Dialog.alert({
-        title: '更新提示',
-        message: 'APP有更新请点击确定刷新页面?',
-        confirmButtonColor: 'var(--van-primary)'
-      }).then(() => {
-        // on close
-        if (browser().isApp) {
-          postMessage({ api: 'back' })
-        } else {
-          location.hash = targetPath
-          window.location.reload()
-        }
-      })
-    }
-  }
-})
-
-export default router

+ 0 - 42
src/router/index-student.ts

@@ -1,42 +0,0 @@
-import { browser } from '@/helpers/utils'
-import { state } from '@/state'
-import { Dialog } from 'vant'
-import { createRouter, createWebHistory, Router } from 'vue-router'
-import { postMessage } from '@/helpers/native-message'
-import routes from './routes-student'
-const router: Router = createRouter({
-  history: createWebHistory(),
-  routes
-})
-
-router.beforeEach((to, from, next) => {
-  const title = to.meta.title
-  document.title = (title || '酷乐秀') as any
-  next()
-})
-
-let isOpen = false
-router.onError(error => {
-  if (error instanceof Error) {
-    const isChunkLoadFailed = error.name.indexOf('chunk')
-    const targetPath = router.currentRoute.value.fullPath
-    if (isChunkLoadFailed && !isOpen) {
-      isOpen = true
-      Dialog.alert({
-        title: '更新提示',
-        message: 'APP有更新请点击确定刷新页面?',
-        confirmButtonColor: 'var(--van-primary)'
-      }).then(() => {
-        // on close
-        if (browser().isApp) {
-          postMessage({ api: 'back' })
-        } else {
-          location.hash = targetPath
-          window.location.reload()
-        }
-      })
-    }
-  }
-})
-
-export default router

+ 15 - 2
src/router/index-teacher.ts → src/router/index.ts

@@ -2,7 +2,20 @@ import { browser } from '@/helpers/utils'
 import { Dialog } from 'vant'
 import { createRouter, createWebHistory, Router } from 'vue-router'
 import { postMessage } from '@/helpers/native-message'
-import routes from './routes-teacher'
+import routesTeacher from './routes-teacher'
+import routesStudent from './routes-student'
+import routesManage from './routes-manage'
+
+const paymentType = (window as any).paymentType
+let routes: any = []
+if (paymentType === 'STUDENT') {
+  routes = routesStudent
+} else if (paymentType === 'TEACHER') {
+  routes = routesTeacher
+} else if (paymentType === 'SCHOOL') {
+  routes = routesManage
+}
+
 const router: Router = createRouter({
   history: createWebHistory(),
   routes,
@@ -17,7 +30,7 @@ const router: Router = createRouter({
 })
 
 router.beforeEach((to, from, next) => {
-  document.title = (to.meta.title || '酷乐秀') as any
+  document.title = (to.meta.title || '管乐团') as any
   next()
 })
 

+ 10 - 1
src/router/routes-common.ts

@@ -1,3 +1,5 @@
+const paymentType = (window as any).paymentType
+
 // 需要登录的路由
 export const router = [
 
@@ -5,5 +7,12 @@ export const router = [
 
 // 不需要登录的路由
 export const rootRouter = [
-
+  {
+    path: '/:pathMatch(.*)*',
+    component: () => import('@/views/404'),
+    meta: {
+      title: '404 Not Fund',
+      platform: paymentType
+    }
+  }
 ]

+ 1 - 9
src/router/routes-manage.ts

@@ -32,13 +32,5 @@ export default [
     ]
   },
   ...rootRouter,
-  ...noLoginRouter,
-  {
-    path: '/:pathMatch(.*)*',
-    component: () => import('@/views/404'),
-    meta: {
-      title: '404 Not Fund',
-      platform: 'TEACHER'
-    }
-  }
+  ...noLoginRouter
 ]

+ 1 - 9
src/router/routes-student.ts

@@ -31,13 +31,5 @@ export default [
     ]
   },
   ...noLoginRouter,
-  ...rootRouter,
-  {
-    path: '/:pathMatch(.*)*',
-    component: () => import('@/views/404'),
-    meta: {
-      title: '404 Not Fund',
-      platform: 'STUDENT'
-    }
-  }
+  ...rootRouter
 ]

+ 5 - 10
src/router/routes-teacher.ts

@@ -1,8 +1,11 @@
 import Auth from '@/views/layout/auth'
 import { router, rootRouter } from './routes-common'
 
+/**
+ * 配置类型
+ */
 type metaType = {
-  isRegister: boolean
+  isRegister: boolean // 是否可注册
 }
 
 // 不需要登录的路由
@@ -32,13 +35,5 @@ export default [
     ]
   },
   ...rootRouter,
-  ...noLoginRouter,
-  {
-    path: '/:pathMatch(.*)*',
-    component: () => import('@/views/404'),
-    meta: {
-      title: '404 Not Fund',
-      platform: 'TEACHER'
-    }
-  }
+  ...noLoginRouter
 ]

+ 2 - 3
src/state.ts

@@ -9,8 +9,8 @@ export const state = reactive({
     status: 'init' as status,
     data: {} as any
   },
-  platformType: '' as 'STUDENT' | 'TEACHER',
-  platformApi: '/api-student' as '/api-student' | '/api-teacher',
+  platformType: '' as 'STUDENT' | 'TEACHER' | 'SCHOOL',
+  platformApi: '/api-student' as '/api-student' | '/api-teacher' | '/api-manage',
   version: '', // 版本号 例如: 1.0.0
   ossUploadUrl: 'https://ks3-cn-beijing.ksyuncs.com/',
   musicCertStatus: false as boolean, // 是否音乐认证
@@ -57,5 +57,4 @@ export const openDefaultWebView = (url?: string, callBack?: any) => {
   } else {
     callBack && callBack()
   }
-
 }

+ 1 - 0
src/student/home/index.tsx

@@ -1,3 +1,4 @@
+import OEmpty from '@/components/o-empty'
 import { Button } from 'vant'
 import { defineComponent } from 'vue'
 import styles from './index.module.less'

+ 2 - 9
src/student/main.ts

@@ -1,20 +1,13 @@
 import { createApp } from 'vue'
 import App from './App.vue'
-import dayjs from 'dayjs'
-import 'dayjs/locale/zh-cn'
-import router from '../router/index-student'
-import { postMessage } from '@/helpers/native-message'
+import router from '../router/index'
+// import { postMessage } from '@/helpers/native-message'
 
 import 'normalize.css'
 
 import '../styles/index.less'
-import { state } from '@/state'
-import { browser } from '@/helpers/utils'
 
 const app = createApp(App)
-
-dayjs.locale('zh-ch')
-app.config.globalProperties.$dayjs = dayjs
 app.use(router)
 
 app.mount('#app')

+ 8 - 8
src/teacher/main.ts

@@ -1,8 +1,6 @@
 import { createApp } from 'vue'
 import App from './App.vue'
-import dayjs from 'dayjs'
-import 'dayjs/locale/zh-cn'
-import router from '../router/index-teacher'
+import router from '../router/index'
 import { postMessage } from '@/helpers/native-message'
 
 import 'normalize.css'
@@ -37,22 +35,24 @@ postMessage(
 
 // import Vconsole from 'vconsole'
 // const vconsole = new Vconsole()
-if (browser().isTeacher) {
+const paymentType = (window as any).paymentType // 浏览器设置
+if (browser().isTeacher || paymentType === 'TEACHER') {
   state.platformType = 'TEACHER'
-} else if (browser().isStudent) {
+} else if (browser().isStudent || paymentType === 'STUDENT') {
   state.platformType = 'STUDENT'
+} else if (browser().isSchool || paymentType === 'SCHOOL') {
+  state.platformType = 'SCHOOL'
 } else {
   state.platformType = 'TEACHER'
 }
 if (state.platformType === 'TEACHER') {
   state.platformApi = '/api-teacher'
+} else if (state.platformType === 'SCHOOL') {
+  state.platformApi = '/api-manage'
 } else {
   state.platformApi = '/api-student'
 }
 
-dayjs.locale('zh-ch')
-app.config.globalProperties.$dayjs = dayjs
-app.config.globalProperties.$filters = vueFilter
 app.use(router)
 
 app.mount('#app')

+ 4 - 9
src/views/layout/auth.tsx

@@ -6,7 +6,7 @@ import { postMessage } from '@/helpers/native-message'
 import { RouterView } from 'vue-router'
 import { Button, Icon } from 'vant'
 import request from '@/helpers/request'
-import ColResult from '@/components/col-result'
+import OEmpty from '@/components/o-empty'
 
 const browserInfo = browser()
 export default defineComponent({
@@ -24,9 +24,7 @@ export default defineComponent({
     },
     isNeedView() {
       return (
-        state.user.status === 'login' ||
-        this.$route.path === '/login' ||
-        (this as any).isExternal
+        state.user.status === 'login' || this.$route.path === '/login' || (this as any).isExternal
       )
     }
   },
@@ -52,10 +50,7 @@ export default defineComponent({
           setLogin(res.data)
         } catch (e: any) {
           const message = e.message
-          if (
-            message.indexOf('403') === -1 &&
-            message.indexOf('authentication') === -1
-          ) {
+          if (message.indexOf('403') === -1 && message.indexOf('authentication') === -1) {
             setLoginError()
           } else {
             setLogout()
@@ -92,7 +87,7 @@ export default defineComponent({
       <>
         {state.user.status === 'error' ? (
           <div class={styles.error}>
-            <ColResult
+            <OEmpty
               type="notFond"
               classImgSize="CERT"
               tips="加载失败,请稍后重试"

+ 2 - 8
src/views/layout/login.tsx

@@ -1,6 +1,6 @@
 import { defineComponent } from 'vue'
 import { CellGroup, Field, Button, CountDown, Row, Col, Toast } from 'vant'
-import ImgCode from '@/components/col-img-code'
+import ImgCode from '@/components/o-img-code'
 import { checkPhone } from '@/helpers/validate'
 import request from '@/helpers/request'
 import { setLogin, state } from '@/state'
@@ -180,13 +180,7 @@ export default defineComponent({
           )}
         </CellGroup>
         <div class={styles.margin34}>
-          <Button
-            round
-            block
-            type="primary"
-            disabled={this.codeDisable}
-            onClick={this.onLogin}
-          >
+          <Button round block type="primary" disabled={this.codeDisable} onClick={this.onLogin}>
             提交
           </Button>
           <Button block round color="#F5F7FB" onClick={this.onChange}>

+ 3 - 0
teacher.html

@@ -36,6 +36,9 @@
   <meta name="msapplication-tap-highlight" content="no" />
   <title>酷乐秀</title>
   <script src="/flexible.js" charset="UTF-8"></script>
+  <script type="text/javascript">
+    window.paymentType = 'TEACHER'
+  </script>
 </head>
 
 <body>

+ 5 - 1
vite.config.ts

@@ -69,6 +69,10 @@ export default defineConfig({
         teacher: resolve('teacher.html'),
         manage: resolve('manage.html')
       }
-    }
+    },
+    // target: 'es2015',
+    // cssTarget: 'chrome80',
+    reportCompressedSize: false,
+    chunkSizeWarningLimit: 500,
   }
 })