lrf402788946 4 лет назад
Родитель
Сommit
2102af4fea
3 измененных файлов с 8 добавлено и 3 удалено
  1. 2 2
      src/router/index.js
  2. 4 0
      src/views/index.vue
  3. 2 1
      vue.config.js

+ 2 - 2
src/router/index.js

@@ -14,8 +14,8 @@ const routes = [
 ];
 
 const router = new VueRouter({
-  mode: 'history',
-  base: process.env.NODE_ENV === 'development' ? '' : 'msgconfirm',
+  // mode: 'history',
+  // base: process.env.NODE_ENV === 'development' ? '' : 'msgconfirm',
   routes,
 });
 

+ 4 - 0
src/views/index.vue

@@ -112,6 +112,10 @@ export default {
   methods: {
     ...notice(['fetch', 'lookFetch']),
     async search() {
+      if (!this.noticeid) {
+        this.$toast.fail('没有消息相关信息,无法找到消息来源');
+        return;
+      }
       const res = await this.fetch(this.noticeid);
       if (res.errcode == '0') {
         this.$set(this, `notice`, res.data);

+ 2 - 1
vue.config.js

@@ -2,7 +2,8 @@ const path = require('path');
 const question = path.resolve(__dirname, '../question-examine');
 const frame = path.resolve(__dirname, '../frame');
 module.exports = {
-  publicPath: process.env.NODE_ENV === 'development' ? '/' : '/msgconfirm',
+  // publicPath: process.env.NODE_ENV === 'development' ? '/' : '/msgconfirm',
+  publicPath: '/',
   outputDir: 'msgconfirm',
   configureWebpack: config => {
     Object.assign(config, {