- 自定义组件使用wxs绑定bind:touched参ownerInstance返回undefined?
wxs响应事件 基础库3.5.0 自定义组件引入 wxs文件 <wxs src="../../common/wxs/touchmove.wxs" module="touch"></wxs> touchmove.wxs function handleTouchend(event, ownerInstance) { ownerInstance 返回为 undefined
07-18 - 连续上传2张图片,第二张的成功回调没有执行
https://developers.weixin.qq.com/miniprogram/dev/extended/weui/uploader.html //上传图片文件 uplaodFile(files) { // 文件上传的函数,返回一个promise return new Promise((resolve, reject) => { var tempFilePaths = files.tempFilePaths; //上传返回值 for (var i = 0; i < tempFilePaths.length; i++) { wx.uploadFile({ url: app.globalData.urlCarPic, filePath: tempFilePaths[i], name: 'file', success: function (res) { var data = JSON.parse(res.data) var urls = data.url resolve({ urls }), reject(res) }, fail: function (err) { console.log(err) } }) } }) }, uploadSuccess(e) { var url = e.detail.urls this.setData({ drivefiles: this.data.drivefiles.concat(url), }) },
2020-04-20