摘要: 用js 写的倒计时逻辑。 countDown(time) { let sTime = { min1: '',//十位分钟 min2: '',//个位分钟 second: '',//十位秒 second2: '',//个位秒 }; var cut_time = time; let timer = se 阅读全文
posted @ 2021-08-18 18:15 吃好每一口饭 阅读(298) 评论(0) 推荐(0)
摘要: getRequestParams() { const url = window.location.search; // 获取url中"?"符后的字串 const theRequest = {}; if (url.indexOf('?') !== -1) { const str = url.subst 阅读全文
posted @ 2021-08-18 18:07 吃好每一口饭 阅读(171) 评论(0) 推荐(0)
摘要: browserutil.client.agent.indexOf('xxxx') ,'xxxx'为该浏览器的标志值 browserutil.client.agent.indexOf('firefox') > 0 || // 火狐浏览器 android browserutil.client.agent 阅读全文
posted @ 2021-08-18 18:01 吃好每一口饭 阅读(214) 评论(0) 推荐(0)
摘要: /** * 邮箱 * @param {*} s */ export function isEmail(s) { return /^([a-zA-Z0-9._-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/.test( s ); } /** * 手 阅读全文
posted @ 2021-08-18 17:41 吃好每一口饭 阅读(286) 评论(0) 推荐(0)
摘要: 用于前端国家选择列表的数据来源。 js 文件地址 https://blog-static.cnblogs.com/files/erinmin/countriesList.js 阅读全文
posted @ 2021-08-18 17:35 吃好每一口饭 阅读(764) 评论(0) 推荐(0)
摘要: ####目前项目一套代码会打包多个版本,进入测试阶段经常一个bug就要部署多套代码。为了节约时间(当然不可能是bug太多啦),写了一个自动批量打包部署的js脚本。 ####一、批量打包 通过node-cmd 批量执行打包命令 npm run build --client=${buildName} 不 阅读全文
posted @ 2021-08-16 17:56 吃好每一口饭 阅读(1299) 评论(0) 推荐(0)
摘要: 例如取2到3中的 随机小数(一位)或整数 mt_rand(20,30)/10 mt_rand()是随机取整函数 先扩大一定倍数,再缩小相应倍数,倍数代表精确到哪一位 阅读全文
posted @ 2019-11-21 17:49 吃好每一口饭 阅读(2531) 评论(0) 推荐(0)
摘要: //返回两数相除之商和余数function get_div_and_mod($left_operand, $right_operand){ $div = intval($left_operand / $right_operand); $mod = $left_operand % $right_ope 阅读全文
posted @ 2019-11-21 16:37 吃好每一口饭 阅读(1582) 评论(0) 推荐(0)