【小程序开发】地图circle自适应大小(radius适配) |
您所在的位置:网站首页 › 微信小程序map组件的使用 › 【小程序开发】地图circle自适应大小(radius适配) |
【踩坑日常】mysql查询错误排查
用数据说话用数据决策: 果然优秀的博主才能写出这么优秀动人的博客,知识点详细清晰,干货满满 【promise与递归调用】小李不背锅: 我也是遇到这个问题,也思考是return 的问题, [code=javascript] //上传图片到云存储,异步函数,防止图片还没上传,就执行插入云数据库 uploadImages(index) { return new Promise(() => { wx.showLoading({ title: '上传第' + index + '张图片' }) wx.cloud.uploadFile({ cloudPath: 'goodsImgs/' + new Date().getTime() + '_' + Math.floor(Math.random() * 1000) + '.jpg', //给图片命名 filePath: this.data.selectImg[index], //本地图片路径 success: (res) => { console.log('上传成功', res.fileID) this.data.uploadImgs[index] = res.fileID wx.hideLoading({ success: (res) => {}, }) //判断是否全部上传 if (this.data.selectImg.length - 1 == index) { console.log('已全部上传') } else { this.uploadImages(index + 1) } }, fail: (err) => { wx.showToast({ title: '上传失败,请重新上传', type: 'none' }) } }) }) }, [/code] 【promise与递归调用】Jserm: 有用,解决一个我的有点相似的问题 【小程序开发技巧】input框保持focus状态Athain: 这个方法确实不错,至于滑动这个应该可以考虑重写onfocus ,不过没尝试过就是了。。 【小程序开发技巧】input框保持focus状态gongshunkai3: 可以加一个hold-keyboard属性在文本框, 问题是在页面上手指滑动文本框还是会失焦。。 |
今日新闻 |
点击排行 |
|
推荐新闻 |
图片新闻 |
|
专题文章 |
CopyRight 2018-2019 实验室设备网 版权所有 win10的实时保护怎么永久关闭 |