onMenuShareTimeline 分享到朋友圈git
wx.onMenuShareTimeline({ title: '', // 分享标题 link: '', // 分享连接,该连接域名或路径必须与当前页面对应的公众号JS安全域名一致 imgUrl: '', // 分享图标 success: function () { // 用户确认分享后执行的回调函数 }, cancel: function () { // 用户取消分享后执行的回调函数 } });
onMenuShareAppMessage 分享给朋友安全
wx.onMenuShareAppMessage({ title: '', // 分享标题 desc: '', // 分享描述 link: '', // 分享连接,该连接域名或路径必须与当前页面对应的公众号JS安全域名一致 imgUrl: '', // 分享图标 type: '', // 分享类型,music、video或link,不填默认为link dataUrl: '', // 若是type是music或video,则要提供数据连接,默认为空 success: function () { // 用户确认分享后执行的回调函数 }, cancel: function () { // 用户取消分享后执行的回调函数 } });
onMenuShareQQ 分享到QQ服务器
wx.onMenuShareQQ({ title: '', // 分享标题 desc: '', // 分享描述 link: '', // 分享连接 imgUrl: '', // 分享图标 success: function () { // 用户确认分享后执行的回调函数 }, cancel: function () { // 用户取消分享后执行的回调函数 } });
onMenuShareWeibo 分享到腾讯微博微信
wx.onMenuShareWeibo({ title: '', // 分享标题 desc: '', // 分享描述 link: '', // 分享连接 imgUrl: '', // 分享图标 success: function () { // 用户确认分享后执行的回调函数 }, cancel: function () { // 用户取消分享后执行的回调函数 } });
onMenuShareQZone 分享到QQ空间网络
wx.onMenuShareQZone({ title: '', // 分享标题 desc: '', // 分享描述 link: '', // 分享连接 imgUrl: '', // 分享图标 success: function () { // 用户确认分享后执行的回调函数 }, cancel: function () { // 用户取消分享后执行的回调函数 } });
chooseImage 拍照或从手机相册中选图接口ide
wx.chooseImage({ count: 1, // 默认9 sizeType: ['original', 'compressed'], // 能够指定是原图仍是压缩图,默认两者都有 sourceType: ['album', 'camera'], // 能够指定来源是相册仍是相机,默认两者都有 success: function (res) { var localIds = res.localIds; // 返回选定照片的本地ID列表,localId能够做为img标签的src属性显示图片 } });
previewImage 预览图片接口函数
wx.previewImage({ current: '', // 当前显示图片的http连接 urls: [] // 须要预览的图片http连接列表 });
uploadImage 上传图片接口url
wx.uploadImage({ localId: '', // 须要上传的图片的本地ID,由chooseImage接口得到 isShowProgressTips: 1, // 默认为1,显示进度提示 success: function (res) { var serverId = res.serverId; // 返回图片的服务器端ID } });
downloadImage 下载图片接口.net
wx.downloadImage({ serverId: '', // 须要下载的图片的服务器端ID,由uploadImage接口得到 isShowProgressTips: 1, // 默认为1,显示进度提示 success: function (res) { var localId = res.localId; // 返回图片下载后的本地ID } });
getLocalImgData 获取本地图片接口插件
wx.getLocalImgData({ localId: '', // 图片的localID success: function (res) { var localData = res.localData; // localData是图片的base64数据,能够用img标签显示 } });
startRecord 开始录音接口
wx.startRecord();
stopRecord 中止录音接口
wx.stopRecord({ success: function (res) { var localId = res.localId; } });
onVoiceRecordEnd 监听录音自动中止接口
wx.onVoiceRecordEnd({ // 录音时间超过一分钟没有中止的时候会执行 complete 回调 complete: function (res) { var localId = res.localId; } });
playVoice 播放语音接口
wx.playVoice({ localId: '' // 须要播放的音频的本地ID,由stopRecord接口得到 });
pauseVoice 暂停播放接口
wx.pauseVoice({ localId: '' // 须要暂停的音频的本地ID,由stopRecord接口得到 });
stopVoice 中止播放接口
wx.stopVoice({ localId: '' // 须要中止的音频的本地ID,由stopRecord接口得到 });
onVoicePlayEnd 监听语音播放完毕接口
wx.onVoicePlayEnd({ success: function (res) { var localId = res.localId; // 返回音频的本地ID } });
uploadVoice 上传语音接口
wx.uploadVoice({ localId: '', // 须要上传的音频的本地ID,由stopRecord接口得到 isShowProgressTips: 1, // 默认为1,显示进度提示 success: function (res) { var serverId = res.serverId; // 返回音频的服务器端ID } });
downloadVoice 下载语音接口
wx.downloadVoice({ serverId: '', // 须要下载的音频的服务器端ID,由uploadVoice接口得到 isShowProgressTips: 1, // 默认为1,显示进度提示 success: function (res) { var localId = res.localId; // 返回音频的本地ID } });
translateVoice 识别音频并返回识别结果接口
wx.translateVoice({ localId: '', // 须要识别的音频的本地Id,由录音相关接口得到 isShowProgressTips: 1, // 默认为1,显示进度提示 success: function (res) { alert(res.translateResult); // 语音识别的结果 } });
getNetworkType 网络状态
wx.getNetworkType({ success: function (res) { var networkType = res.networkType; // 返回网络类型2g,3g,4g,wifi } });
getLocation 获取地理位置接口
wx.getLocation({ type: 'wgs84', // 默认为wgs84的gps坐标,若是要返回直接给openLocation用的火星坐标,可传入'gcj02' success: function (res) { var latitude = res.latitude; // 纬度,浮点数,范围为90 ~ -90 var longitude = res.longitude; // 经度,浮点数,范围为180 ~ -180。 var speed = res.speed; // 速度,以米/每秒计 var accuracy = res.accuracy; // 位置精度 } });
openLocation 使用微信内置地图查看位置接口
wx.openLocation({ latitude: 0, // 纬度,浮点数,范围为90 ~ -90 longitude: 0, // 经度,浮点数,范围为180 ~ -180。 name: '', // 位置名 address: '', // 地址详情说明 scale: 1, // 地图缩放级别,整形值,范围从1~28。默认为最大 infoUrl: '' // 在查看位置界面底部显示的超连接,可点击跳转 });
scanQRCode
wx.scanQRCode({ needResult: 0, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果, scanType: ["qrCode","barCode"], // 能够指定扫二维码仍是一维码,默认两者都有 success: function (res) { var result = res.resultStr; // 当needResult 为 1 时,扫码返回的结果 } });
yum install vsftpd
systemctl start vsftpd systemctl enable vsftpd
目前只能匿名登陆
useradd 用户名 passwd 刚刚建立的用户名
chown -R 用户名 目录地址