lanke
lanke
 在后端处理下 重新返回index.html就可以了。 models下app.js文件中query方法最后调用了window.location
静态文件不用自己再写controller配置了吧,spring boot直接能映射到static文件
 这样,打包前 在webapp中,打包后在static当中
 java端这样返回就好了。 你可以看前端代码 models/app.js 
npm run dev 且开启mock的时候应该没错吧? 有没有可能是哪个后端接口没写的原因?
 对了 ,我当时也因为这个卡住了, 对login.js 的请求配spring mvc 映射到了控制器上而不是文件上。 spring boot 需要加上上图的配置
`@Configuration public class MyWebAppConfig extends WebMvcConfigurerAdapter { @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/*/**.**.js").addResourceLocations("classpath:/static/"); super.addResourceHandlers(registry); } /** * 重写configurePathMatch此方法 * 设置其参数PathMatchConfigurer的属性UseSuffixPatternMatch值为false * 可以让路径中带小数点“.”后面的值不被忽略 */ @Override public void configurePathMatch(PathMatchConfigurer configurer) {...
你看下visit是否被正确的初始化为数组了。 如果不是,就证明permissions没有传过来
 mock/user.js permission增加 visit就不会报错了
你看下 theme中index.less 样式修改下 就没问题了