Browse Source

项目部署添加前缀 并配置路由

old
jianjun 4 years ago
parent
commit
35ff2662ef
  1. 4
      public/index.html
  2. 5
      src/router/modules/root.js
  3. 2
      vue.config.js

4
public/index.html

@ -17,13 +17,13 @@
<% } %>
<!--百度访问统计-->
<script>
var _hmt = _hmt || [];
/*var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?4dbdbc5421c41984499f878628d60f2f";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
})();*/
</script>
</head>
<body>

5
src/router/modules/root.js

@ -24,6 +24,11 @@ export default [
meta: {requireLogin: false},
component: () => import(/* webpackChunkName: 'root' */ '@/views/official/index.vue')
},
{
path: '/tduck-front',
meta: {requireLogin: false},
component: () => import(/* webpackChunkName: 'root' */ '@/views/official/index.vue')
},
{
path: '/payService',
meta: {requireLogin: false},

2
vue.config.js

@ -7,7 +7,7 @@ function resolve(dir) {
}
module.exports = {
publicPath: '/',
publicPath: '/tduck-front',
lintOnSave: process.env.NODE_ENV === 'development',
productionSourceMap: false,
devServer: {

Loading…
Cancel
Save