1.在index页面 替换title代码为
<title><%= htmlWebpackPlugin.options.title %></title>
2.在router.js添加beforeResolve 方法
router.beforeResolve(function (to, form, next) {
let title = to.query.pageTitle ? decodeURI(to.query.pageTitle) : to.meta.title;
document.title = title;
store.commit('uploadPageTitle', {pageTitle: title}); //页面标题
next();
});