Vue 哈希换histroy

这个需要后端支持一下 

前端配置在router下的index.js配置如下:

import Vue from 'vue'
import Router from 'vue-router'
import Info from "../components/info.vue"
import play from "../components/play.vue"
import { resolve } from 'path';
Vue.use(Router)
export default new Router({
    base:'/mobile',
    mode:process.env.NODE_ENV !== 'production'?'hash':'history',
    strict: process.env.NODE_ENV !== 'production',
  routes: [
        {
          path: '/',
          name: 'index',
          redirect:'/Games'
        },
原文地址:https://www.cnblogs.com/jstll/p/11679089.html