![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
vue.js
Zonson9999
但行好事,莫问前程
展开
-
后端 sendRedirect 在 ajax 请求中不生效备忘
HttpServletResponse sendRedirect 如是浏览器(地址栏)直接发起的请求,那么网页将重定向。 如果是ajax 发起的请求,那么网页将不会重定向,(打开调试窗口可以看到发起请求,但是页面不变) 以session过期为例,需要重定向到login.html。 需要前后端做一些配合,比如后端返回 401 的时候,前端的ajax 对错误码进行判断,如果是 401 ,就重定向页面。 axios .原创 2021-08-19 15:28:28 · 330 阅读 · 0 评论 -
vue.js 学习
1 判断字符串相等 三个等号 <template v-if="dev.category === 'switch'"> 2 判断json数组长度 <template v-if="dev.pidList !== undefined && dev.pidList.length > 1 "> 3 v-for 可以遍历json数组,也可以遍历json对象的所有属性 <template v-for="(akey,index) in d原创 2021-08-12 13:02:05 · 154 阅读 · 0 评论