- OPPO R9使用wx.uploadFile接口参数丢失?
API名称:wx.uploadFile 设备信息: System: Android 5.1, WeChat 8.0.19.2080 Network: wifi UA: Mozilla/5.0 (Linux; Android 5.1; OPPO R9tm Build/LMY47I; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3211 MMWEBSDK/20220105 Mobile Safari/537.36 MMWEBID/2615 MicroMessenger/8.0.19.2080(0x28001377) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android WeChatLib: 2.23.4 (2022.5.16 20:18:05) Subpackages: N/A LazyCodeLoading: false Launch Time: 8768 ms 我的代码: wx.uploadFile({ filePath: path, name: 'img', url: `${base_url.sq}/index/Image/upload2`, header: { "Content-Type": "multipart/form-data", "accept": "application/json" }, success: res => { let data = JSON.parse(res.data); if (data.code === 2000) { resolve({ id: data.data.image_id, path: data.data.path }); } else { reject({ error: data.msg }); } }, fail: err => { reject({ error: err }) } })
2022-05-17 - 微信公众号分享的链接点开后无法触发vue的生命周期?
分享后的链接点进去后我写的alert一个都没触发,不是分享的链接点进去可以触发
2022-03-22 - 如何设置recycle-view的宽度为动态宽度?
组件名称:recycle-view 需求如图: [图片]红框内的是长列表,recycle-view 组件,要根据屏幕宽度的变化自动占满剩余部分,所以 recycle-view 的 width 属性应该是个动态的值 我的尝试: // dom代码 <recycle-view width="{{viewWidth}}" batch="{{batchSetRecycleData}}" lower-threshold="100" id="recycleId" bindscrolltolower="nextPage" class="bottom"> </recycle-view> // js代码 data: { realyList: [], viewWidth: 0, }, lifetimes: { ready: function () { let that = this; that.createSelectorQuery().select('.bottom').fields({size: true}, function(res) { that.viewWidth = res.width; console.log(res); // {width: 227, height: 332} ctx = createRecycleContext({ id: 'recycleId', dataKey: 'realyList', page: that, itemSize: that.itemSizeFunc }) console.log(that.viewWidth); // 227 }).exec(); }, detached: function () { ctx.destroy(); ctx = null; } }
2022-02-11 - 微信小程序体验版可以分享,正式版不可以?
[图片][图片] 代码如下: onShareAppMessage() { return { title: 'XXX', path: '/pages/index/index', imageUrl: '../../assets/images/share@2x.png' } },
2021-04-02 - weui扩展组件tabs如何控制切换菜单节流?
[图片]快速切换菜单项时页面请求会无限请求,我给请求单独加了节流也没用,[图片][图片]
2021-03-26 - 使用textarea组件时设置auto-height,值是动态添加,textarea的高度会变化
https://developers.weixin.qq.com/miniprogram/dev/component/textarea.html 刚进入页面是这样的[图片],然后会很快闪一下变成这样[图片]
2021-03-18