problem description
modified the route pattern of the vue project. There is no problem with the hash mode, and the server side will not recognize the front-end route after-sharp.
https://cloud.hfq.huift.com.cn/huiquan/-sharp/
https://cloud.hfq.huift.com.cn/huiquan/-sharp/shops
but due to a series of parameter problems with Wechat jump, the-sharp sign had to be removed, so he began to use history mode!
changes to the following form
https://cloud.hfq.huift.com.cn/huiquan/
other routes are
https://cloud.hfq.huift.com.cn/huiquan/shops
but after removal, there is no problem in entering for the first time, and there is no problem in switching routes!
but! Refresh will report the error that the module cannot be found
the environmental background of the problems and what methods you have tried
flipped through some documents ide/essentials/history-mode.html-sharp%E5%90%8E%E7%AB%AF%E9%85%8D%E7%BD%AE%E4%BE%8B%E5%AD%90" rel=" nofollow noreferrer "> https://router.vuejs.org/zh/g., modified the configuration of the nginx server
location /huiquan {
root html/ml/hfq.huift.com.cn;
try_files /huiquan/an/index.html /hu /huiquan/;
index ex index.html;
}
but. Start to report this error again. The, unexpected token page is blank
.
what result do you expect? What is the error message actually seen?
I hope the page can be displayed normally as in hash mode, in conjunction with Wechat"s server-side jump