摘要: html 1、前台 2、后台 阅读全文
posted @ 2018-09-01 19:37 JJRains 阅读(204) 评论(0) 推荐(0) 编辑
摘要: //设置cookie: cookie名,cookie值,天数 const setCookie = (name,value,day=7)=>{ let date = new Date() date.setTime(date.getTime()+(day*24*60*60*1000)) document.cookie = name+"="+value+";expires="+... 阅读全文
posted @ 2018-09-01 19:31 JJRains 阅读(1661) 评论(0) 推荐(0) 编辑
摘要: 1、js 2、css 阅读全文
posted @ 2018-09-01 19:28 JJRains 阅读(230) 评论(0) 推荐(0) 编辑
摘要: console.log(encodeURI("%")) //%25 console.log(encodeURIComponent("%")) // %25 console.log(decodeURIComponent("https://www.mirai.site?id%3d1")) // https://www.mirai.site?id=1 console.log(decodeURI("... 阅读全文
posted @ 2018-09-01 18:53 JJRains 阅读(779) 评论(0) 推荐(0) 编辑
摘要: function dealImage(path, callback){ var img = new Image(); img.src = path; img.onload = function(){ //默认按比例压缩 var w = this.width, h = this.height; ... 阅读全文
posted @ 2018-09-01 18:48 JJRains 阅读(2971) 评论(0) 推荐(0) 编辑
摘要: function getAccessToken(id,secret){ return new Promise((resolve,reject)=>{ axios({ method:'get', url:`https://api.weixin.qq.com/cgi-bin/token?grant_type=client_c... 阅读全文
posted @ 2018-09-01 15:58 JJRains 阅读(18649) 评论(0) 推荐(0) 编辑
摘要: const SMSClient = require('@alicloud/sms-sdk') const accessKeyId = 'accesskeyid' const secretAccessKey = 'secretaccessKey' let smsClient = new SMSClie 阅读全文
posted @ 2018-09-01 11:35 JJRains 阅读(542) 评论(0) 推荐(0) 编辑
摘要: const axios = require("axios") const fs = require("fs") const appId = 'appid' const secret = 'appsecret'let data = { scene: "参数", page: "小程序页面"}picUrl = `./upload/${data.scene}.png` axios({ metho... 阅读全文
posted @ 2018-09-01 11:13 JJRains 阅读(1078) 评论(0) 推荐(0) 编辑