admin 发布的文章
Nginx配置https代理,一直报错 nginx: [emerg] https protocol requires SSL support in /usr/local/nginx/conf/nginx.conf:46这个主要原生是因为nginx没有安装ssl模块执行步骤[root@120 ~]# cd /usr/local/src/nginx-1.6.1
[root@120 nginx-1.16.1]# /usr/local/nginx/sbin/nginx -V
nginx version: nginx/1.16.1
built by gcc 4.8.5 2015062- 阅读剩余部分 -
HTML代码:
<input id="file" type="file">
JS代码:
var eleFile = document.querySelector('#file');
// 压缩图片需要的一些元素和对象
var reader = new FileReader(), img = new Image();
// 选择的文件对象
var file = null;
// 缩放图片需要的canvas
var canvas = document.createElement('canvas');
var contex- 阅读剩余部分 -
添加两个事件(手指按下时,手指松开时)bindtouchstart="touchStart" //开始
bindtouchend="touchEnd"//结束
wxml<view bindtouchstart="touchStart" bindtouchend="touchEnd" ></view>
wjs:首先在data下添加 data: {
touchDotX:0,//X按下时坐标
touchDotY:0,//y按下时坐标
interval- 阅读剩余部分 -
首先引入小程序语音识别插件let plugin = requirePlugin("WechatSI")
let manager = plugin.getRecordRecognitionManager()
然后在wxml中设置对应的方法 <i-icon type="translation_fill" catchtouchstart="streamRecord" catchtouchend="endStreamRecord" size="28" color="#- 阅读剩余部分 -
1.随机数长度控制,定义一个长度变量(length),生成可控长度的随机数:Math.random().toString(36).substr(3,length)
2.引入时间戳:Date.now().toString(36)
3.合在一起最终办法:genID(length){
return Number(Math.random().toString().substr(3,length) + Date.now()).toString(36);
}
- « 前一页
- 1
- ...
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- ...
- 75
- 后一页 »