海门市爱美阁美容中心,卡优卡,人民的名义种子
html <span> <a class="file" onclick="uploadimg()">选择图片</a> </span> js function uploadimg(me) { wxshop.wx_config(function() { wx.chooseimage({ count: 9, //设置一次能选择的图片的数量 sizetype: ['original', 'compressed'], //指定是原图还是压缩,默认二者都有 sourcetype: ['album','camera'], //可以指定来源是相册还是相机,默认二者都有 success: function(res) { //微信返回了一个资源对象 //res.localids 是一个数组 保存了用户一次性选择的所有图片的信息imgid = res.localids;
//把图片的路径保存在images[localid]中--图片本地的id信息,用于上传图片到微信浏览器时使用 ulloadtowechat(me); //把这些图片上传到微信服务器 一张一张的上传 } }); }); }
function ulloadtowechat(me) { wxshop.wx_config(function() { if (!imgid.length) { alert('图片上传成功!'); } else { var localid = imgid.pop(); wx.uploadimage({ localid: localid, success: function(res) { wximgdown(res.serverid, me);//将图片路径存在了本地数据库 ulloadtowechat(); }, fail: function(res) { alert(json.stringify(res)); } }); } }); };
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
浅析我对 String、StringBuilder、StringBuffer 的理解
使用IDEA搭建SSM框架的详细教程(spring + springMVC +MyBatis)
Springboot整合freemarker 404问题解决方案
引入mybatis-plus报 Invalid bound statement错误问题的解决方法
网友评论