您的位置:首页 > 移动开发 > 微信开发

小程序之上传图片——wx.uploadFile()

2018-03-29 10:40 671 查看
js代码

uploadFile: function () { wx.chooseImage({ success: function (res) {
console.log(res); var path=res.tempFilePaths[0]; wx.uploadFile({ url: 'https://www.minshu.xin/My/index.php/Home/Index/uploadfile', filePath: path, name: 'file', formData:{ data1:"w", }, success:function(res){ console.log(res); }, fail :function(res){ console.log("tt"); } }) }, })
},后端代码:

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  小程序  tp php
相关文章推荐