in this page, I use like this.$root.view='enterpriseUserAuthentication' to change the view, but,The browser's address bar will appear '?' before '#', just like http://localhost:3000/?#/userInfo/55ee9b0c4b13237e45a3d790 ,
this will let the route failure. my route is director.
the route's code is
var Vue = require('vue');
Vue.use(require('vue-resource'));
var Router = require('director').Router;
var app = new Vue(require('./views/index.vue'));
var router = new Router();
//个体用户认证
router.on('/individualUserAuthentication', function () {
app.view = 'individualUserAuthentication';
});
//企业用户认证
router.on('/enterpriseUserAuthentication', function () {
app.view = 'enterpriseUserAuthentication';
});
//用户详情--个体用户认证详情页面
router.on('/userInfo/:userid', function (userid) {
app.view = 'userInfo';
app.params.userid=userid;
});
//企业人力
router.on('/enterpriseWorker', function (userid) {
app.view = 'enterpriseWorker';
});
//个人人力
router.on('/freeWorker', function (userid) {
app.view = 'freeWorker';
});
//企业服务
router.on('/enterpriseService', function (userid) {
app.view = 'enterpriseService';
});
//人力需求
router.on('/humanRequirment', function (userid) {
app.view = 'humanRequirment';
});
//项目需求
router.on('/projectRequirment', function (userid) {
app.view = 'projectRequirment';
});
router.on('/index', function () {
app.view = 'index';
});
//404页面
router.on('/404', function () {
app.view = '404';
});
//500页面
router.on('/500', function () {
app.view = '500';
});
router.configure({
notfound: function () {
router.setRoute('/404')
}
});
router.init('/index');
Hey! I've meet some trouble. I have some components ,use dynamic components to change the view. index.vu is the first page.
userInfo.vue is the subpage
in this page, I use like this.$root.view='enterpriseUserAuthentication' to change the view, but,The browser's address bar will appear '?' before '#', just like http://localhost:3000/?#/userInfo/55ee9b0c4b13237e45a3d790 , this will let the route failure. my route is director. the route's code is