任一存 3 years ago
parent
commit
116c789d6a
2 changed files with 14 additions and 1 deletions
  1. 0 1
      src/views/HomeView.vue
  2. 14 0
      vue.config.js

+ 0 - 1
src/views/HomeView.vue

@@ -256,7 +256,6 @@ export default {
   },
   watch: {
     tourState(vNew, vOld) {
-      console.log('进入tourState ', vNew)
       if (vOld === 0 && vNew === 1) {
         this.treasureDisplayProgress += 0.001
       } else if (vOld === 1 && vNew === 2) {

+ 14 - 0
vue.config.js

@@ -1,7 +1,21 @@
 const webpack = require('webpack')
 const { defineConfig } = require('@vue/cli-service')
 
+let publicPath = ''
+switch (process.env.NODE_ENV) {
+case 'development':
+  publicPath = '/'
+  break
+case 'production':
+  publicPath = '/one_day_in_southern_song_dynasty/'
+  break
+default:
+  publicPath = '/'
+  break
+}
+
 module.exports = defineConfig({
+  publicPath,
   // transpileDependencies: true,
   configureWebpack: {
     module: {