11 2021 档案
摘要:function setCookie(cname, cvalue, exSeconds = 30) { //默认30分钟 var d = new Date(); d.setTime(d.getTime() + (exSeconds*60*1000)); var expires = "expires=
阅读全文
摘要:苹果系统需要 new Date("2019/01/01 00:00:00").getTime(); 事件格式需要是 2019/01/01 00:00:00 下面的方法判断两个时间差,为秒 ,如果为分的话,把除以1000换成除以1000*60,依次类推 function datedifference(
阅读全文
摘要:安装 crypto-js 项目地址:https://github.com/lzx-cloud/examples-h5/tree/main/aes 运行命令: cnpm install crypto-js --save 新建脚本 tool.js const CryptoJS = require('cr
阅读全文
摘要:废话不多说,直接上代码,后面会附上项目地址 1、创建react工程,运行 npm install react-router-dom@5.2.0 --save 2、在src里面新建router文件夹,文件夹目录如下 3、在router文件夹里面新建index.jsx import React, { C
阅读全文