
NodeJs
NodeJs技术积累
liuyuinsdu
这个作者很懒,什么都没留下…
展开
-
axios POST提交数据的三种请求方式写法
1、Content-Type: application/jsonimport axios from 'axios' let data = {"code":"1234","name":"yyyy"}; axios.post(`${this.$url}/test/testRequest`,data) .then(res=>{ console.log('res=>',res); }) 2、Content-Type: multipart/fo.原创 2021-03-11 08:19:44 · 615 阅读 · 0 评论 -
注意:localStorage存储数据的格式都是以字符串的
注意注意注意!!!localStorage存储数据的格式都是以字符串的形式来存储的,存储数组对象的方式就是将数组对象转为字符串,在读取的时候再将字符串转成数组对象操作的方式:存:var obj = {"name":"xiaoming","age":"16"}localStorage.setItem("userInfo",JSON.stringify(obj));取:var user = JSON.parse(localStorage.getItem("userIn...原创 2021-03-11 08:18:15 · 1601 阅读 · 0 评论 -
常用正则表达式大全
密码验证类6-16位字符,区分大小写(不能是9位以下的纯数字,不含空格):^(?!\d{6,8}$)(?! )(?=.*[a-z])(?=.*[0-9])[a-zA-Z0-9_]{6,16}$ 6-16位字符,区分大小写(不能是9位以下的纯数字,不含空格),必须包含大写字母:^(?!\d{6,8}$)(?! )(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])[a-zA-Z0-9_]{6,16}$ 密码不能为纯数字或字母,不少于6位:^(?![0-9]+$)(?![a-zA-Z]+$原创 2021-03-11 08:17:43 · 894 阅读 · 0 评论