Browse Source

fix: 增加WAF后,增加根路径/admin

lihao16 2 months ago
parent
commit
eedd3f0bd2
3 changed files with 4 additions and 4 deletions
  1. 1 1
      src/layout/components/Sidebar/index.vue
  2. 2 2
      src/utils/upload.js
  3. 1 1
      vue.config.js

+ 1 - 1
src/layout/components/Sidebar/index.vue

@@ -4,7 +4,7 @@
       <router-link
       <router-link
         tag="img"
         tag="img"
         class="c-page-sidebar__logo u-pointer"
         class="c-page-sidebar__logo u-pointer"
-        src="/logo.png"
+        src="/admin/logo.png"
         to="/"
         to="/"
       />
       />
     </div>
     </div>

+ 2 - 2
src/utils/upload.js

@@ -100,7 +100,7 @@ function analyzeMediaInfo () {
 function analyzeByWorker (obj) {
 function analyzeByWorker (obj) {
   return new Promise((resolve, reject) => {
   return new Promise((resolve, reject) => {
     console.log(`开始解析文件${obj.name}`)
     console.log(`开始解析文件${obj.name}`)
-    const worker = new Worker('/mediainfo.js')
+    const worker = new Worker('/admin/mediainfo.js')
     worker.onmessage = e => {
     worker.onmessage = e => {
       let isNeedConfirm = false
       let isNeedConfirm = false
 
 
@@ -398,7 +398,7 @@ function calculateHashByWorker (obj, options = {}) {
     const { progress = noop } = options
     const { progress = noop } = options
     const { token } = obj.source
     const { token } = obj.source
     const chunks = createChunks(obj.file)
     const chunks = createChunks(obj.file)
-    const worker = new Worker('/hash.js')
+    const worker = new Worker('/admin/hash.js')
     token(worker)
     token(worker)
     worker.onmessage = e => {
     worker.onmessage = e => {
       const { hash, index, total } = e.data
       const { hash, index, total } = e.data

+ 1 - 1
vue.config.js

@@ -35,7 +35,7 @@ function getCopyFiles () {
 }
 }
 
 
 module.exports = {
 module.exports = {
-  publicPath: '/',
+  publicPath: '/admin',
   outputDir: `dist/msr_${process.env.ENV}_${version}`,
   outputDir: `dist/msr_${process.env.ENV}_${version}`,
   assetsDir: '',
   assetsDir: '',
   lintOnSave: !isProd,
   lintOnSave: !isProd,