|
@@ -19,21 +19,29 @@ import card from "./modules/card/router";
|
|
|
import admin from "./modules/admin/router";
|
|
|
|
|
|
// ignore NavigationDuplicated. https://github.com/vuejs/vue-router/issues/2881
|
|
|
-const originalPush = Router.prototype.push;
|
|
|
-Router.prototype.push = function push(location, onResolve, onReject) {
|
|
|
- if (onResolve || onReject)
|
|
|
- return originalPush.call(this, location, onResolve, onReject);
|
|
|
- try {
|
|
|
- return originalPush.call(this, location).catch((err) => err);
|
|
|
- } catch (error) {
|
|
|
- console.log(error);
|
|
|
- }
|
|
|
-};
|
|
|
+// const originalPush = Router.prototype.push;
|
|
|
+// Router.prototype.push = function push(location, onResolve, onReject) {
|
|
|
+// if (onResolve || onReject)
|
|
|
+// return originalPush.call(this, location, onResolve, onReject);
|
|
|
+// try {
|
|
|
+// return originalPush.call(this, location).catch((err) => err);
|
|
|
+// } catch (error) {
|
|
|
+// console.log(error);
|
|
|
+// }
|
|
|
+// };
|
|
|
// end ignore
|
|
|
|
|
|
Vue.use(Router);
|
|
|
|
|
|
+/*
|
|
|
+history模式 nginx配置
|
|
|
+location / {
|
|
|
+ try_files $uri $uri/ /index.html;
|
|
|
+}
|
|
|
+*/
|
|
|
+
|
|
|
let router = new Router({
|
|
|
+ mode: "history",
|
|
|
routes: [
|
|
|
{
|
|
|
path: "/",
|