![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JS
笑明媚
这个作者很懒,什么都没留下…
展开
-
js中 时间戳与日期相互转换,时间戳转换星期
const formatTime = date => {const year = date.getFullYear()const month = date.getMonth() + 1const day = date.getDate()const hour = date.getHours()const minute = date.getMinutes()const second ...原创 2019-04-17 14:31:15 · 1998 阅读 · 0 评论 -
手机号明细正则
/*** 移动号段正则表达式*/var mobilePhone = '^((13[4-9])|(147)|(15[0-2,7-9])|(178)|(18[2-4,7-8]))\\d{8}|(1705)\\d{7}$';/*** 联通号段正则表达式*/var UnicomMobilePhone= '^((13[0-2])|(145)|(15[5-6])|(176)|(18[5,6]...原创 2019-05-10 11:29:33 · 275 阅读 · 0 评论 -
JS生成uuid的四种方法
原文:https://blog.csdn.net/mcj_2017/article/details/82115015在开发过程中,有时候需要js生成全局唯一标识符,在java中可以使用uuid,但是JS中没有现成的函数。总结了一下,JS生成唯一标识符的几种方法。第一种:function uuid() { var s = []; var hexDigits = "01...转载 2019-05-15 11:01:30 · 1593 阅读 · 1 评论 -
异步请求成功后再执行后续方法
方法一:利用Promise/*** 请求接口*/function requestUrlS(url, method, data, header) { return new Promise(function(resolve, reject) { wx.request({ url: url, method: method, data: dat...原创 2019-05-15 15:37:55 · 7409 阅读 · 0 评论