个人案例
- Customizer
个性化是一种生活方式。
Customizer扫码体验
- scroll-into-view 异常
<scroll-view scroll-x enable-flex scroll-into-view="{{id}}" style="display: flex; flex-direction: row; margin-top: 128px;" > <view wx:for="{{menus}}" wx:key="*this" style="min-width: 96px; text-align: center" id="{{'item_' + index}}" bind:tap="tap" > {{item}} </view> </scroll-view> Page({ data: { menus: ['A', 'B', 'C', 'D', 'E', 'F'], id: 0 }, tap({currentTarget: {id}}) { this.setData({id}) } }) [图片] 异常一: 点击C,期待C移动到视口中央,实际C移动到了视口最左侧。 异常二: 点击F再点击C,期待C移动到视口中央同时展示B,实际C只滚动了几个像素的距离。
2023-07-31 - webp加载失败:getLocalImgData:fail get file data fail
<image src="/test.webp" mode="widthFix" wx:if="{{show}}" bind:error="error" /> <button bind:tap="toggle" style="margin-top: 128px" >show webp</button> Page({ data: { show: false }, toggle() { this.setData({show: !this.data.show}) }, error(e) { console.error(e) } }) 开发者工具正常,iOS 和 Android 真机均异常。 { "type": "error", "timeStamp": 4682, "target": { "id": "", "offsetLeft": 231, "offsetTop": 443, "dataset": {} }, "currentTarget": { "id": "", "offsetLeft": 231, "offsetTop": 443, "dataset": {} }, "mark": {}, "detail": { "errMsg": "getLocalImgData:fail get file data fail" }, "mut": false, "_userTap": false } [图片] [图片]
2023-07-29 - canvas Image加载失败
Page({ async draw() { let {node: cv, width, height} = await new Promise(r => { wx.createSelectorQuery() .select('#canvas') .fields({node: true, size: true}, r) .exec() }) let dpr = wx.getWindowInfo().pixelRatio cv.width = width * dpr cv.height = height * dpr let c = cv.getContext('2d') c.scale(dpr, dpr) let i = cv.createImage() await new Promise(r => { i.onload = r i.onerror = e => { console.error('Image 加载失败:', e); } i.src = 'data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDAwIDMwMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtMTAyLjk1OCAxNjIuMjQ1IDk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OTcuNTUxIDI4Ljg3NyAzOS43OTYtMzcuODU3LTk0LjM4OC0yMy43NzVaIiBmaWxsPSIjREVERkVBIiBzdHJva2U9IiMwMDAiIHN0cm9rZS13aWR0aD0iLjg3IiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg==' }) c.drawImage(i, 0, 0, 320, 240) } }) 开发者工具正常 [图片] iOS 真机 onerror [图片][图片] Andriod 真机 onerror [图片][图片]
2023-07-28 - 建议有开发能力的8.26前切换至阿里云短信服务?
为什么? 最主要的原因是这个接口的扣费时机没办法控制。 他这个接口的扣费时机是获取手机号的 Button 点击就扣费。 其次,是快速验证组件涉嫌违法。 刚刚看了下阿里云短信服务的文档,按量付费四分五一次,虽然比微信贵吧,但时机是百分百可控的。 毕竟用脚趾头都能想明白,在扣费时机都不可自主控制的情况下,单纯地对比价格是毫无意义的。 缺点就是后端要增加一些工作量,但是如果有其他平台的开发计划,这部分代码量也是迟早要来的。 他微信靠着垄断为所欲为是他的事情,咱开发者在有选择空间的情况下不能助纣为虐。
2023-07-27 - 【已解决】扫小程序码打开小程序时的scene参数问题?
文档中写到小程序码参数的获取时机是在 `page.Onload()` 中: Page({ onLoad (query) { // scene 需要使用 decodeURIComponent 才能获取到生成二维码时传入的 scene const scene = decodeURIComponent(query.scene) } }) 那岂不是意味着,如果扫码前,用户已经启动了小程序,就获取不到码的参数了?
2023-07-27 - 腾讯云访问服务端接口?
发现以下来自腾讯云的IP定时集中访问我们的服务端接口: 175.24.213.22481.69.103.102124.222.31.192101.35.210.17243.137.147.252% IANA WHOIS server % for more information on IANA, visit http://www.iana.org % This query returned 1 object refer: whois.apnic.net inetnum: 175.0.0.0 - 175.255.255.255 organisation: APNIC status: ALLOCATED whois: whois.apnic.net changed: 2009-08 source: IANA # whois.apnic.net % [whois.apnic.net] % Whois data copyright terms http://www.apnic.net/db/dbcopyright.html % Information related to '175.24.0.0 - 175.24.255.255' % Abuse contact for '175.24.0.0 - 175.24.255.255' is 'ipas@cnnic.cn' inetnum: 175.24.0.0 - 175.24.255.255 netname: TencentCloud descr: Tencent cloud computing (Beijing) Co., Ltd. country: CN admin-c: JT1125-AP tech-c: JX1747-AP abuse-c: AC1601-AP status: ALLOCATED PORTABLE mnt-by: MAINT-CNNIC-AP mnt-lower: MAINT-CNNIC-AP mnt-routes: MAINT-CNNIC-AP mnt-irt: IRT-CNNIC-CN last-modified: 2021-06-16T01:27:31Z source: APNIC irt: IRT-CNNIC-CN address: Beijing, China e-mail: ipas@cnnic.cn abuse-mailbox: ipas@cnnic.cn admin-c: IP50-AP tech-c: IP50-AP auth: # Filtered remarks: Please note that CNNIC is not an ISP and is not remarks: empowered to investigate complaints of network abuse. remarks: Please contact the tech-c or admin-c of the network. mnt-by: MAINT-CNNIC-AP last-modified: 2021-06-16T01:39:57Z source: APNIC role: ABUSE CNNICCN address: Beijing, China country: ZZ phone: +000000000 e-mail: ipas@cnnic.cn admin-c: IP50-AP tech-c: IP50-AP nic-hdl: AC1601-AP remarks: Generated from irt object IRT-CNNIC-CN abuse-mailbox: ipas@cnnic.cn mnt-by: APNIC-ABUSE last-modified: 2020-05-14T11:19:01Z source: APNIC person: James Tian address: 9F, FIYTA Building, Gaoxinnanyi Road,Southern address: District of Hi-tech Park, Shenzhen country: CN phone: +86-755-86013388-84952 e-mail: clarkcheng@tencent.com nic-hdl: JT1125-AP mnt-by: MAINT-CNNIC-AP last-modified: 2021-09-17T00:37:15Z source: APNIC person: Jimmy Xiao address: 9F, FIYTA Building, Gaoxinnanyi Road,Southern address: District of Hi-tech Park, Shenzhen country: CN phone: +86-755-86013388-80224 e-mail: klayliang@tencent.com nic-hdl: JX1747-AP mnt-by: MAINT-CNNIC-AP last-modified: 2021-09-17T00:38:09Z source: APNIC % Information related to '175.24.0.0/16AS45090' route: 175.24.0.0/16 descr: Shenzhen Tencent Computer Systems Company Limited country: CN origin: AS45090 notify: jimmyxiao@tencent.com mnt-by: MAINT-CNNIC-AP last-modified: 2019-04-18T03:50:02Z source: APNIC % This query was served by the APNIC Whois Service version 1.88.16 (WHOIS-AU1) 这是干嘛?
2023-07-25 - 数组子项字段setData失效
Page({ data: { products: [ {name: 'A', quantity: 0}, {name: 'B', quantity: 0}, ], total: 0, }, plus({currentTarget: {id}}) { let {products, total} = this.data let index = Number(id) let {quantity} = products[index] quantity += 1 total += 1 let key = `products[${index}].quantity` console.log({key, quantity}) this.setData( { key: quantity, total }, () => { console.log('quantity=', this.data.products[index].quantity) } ) } }) 点击按钮,total 正常,而商品数量始终为0。 [图片]
2023-07-17 - 自定义tabBar的attached生命周期回调会在每个页面加载时执行?
// 自定义 tabBar Component({ lifetimes: { attached() { log('custom tabBar attached ...') } } }) tabBar 页面加载时执行 attached 是预期行为。 问题是所有非 tabBar 页面加载时为什么也会执行定义在 tabBar 页面内的 attached ?
2023-07-16 - 建议禁止社区运营回复要代码片段的粘贴话术?
如果说反馈BUG一定要附带代码片段,OK,请修改BUG反馈的表单提交条件,没有代码片段的,禁止提交。 如果说代码片段不是BUG反馈的必要条件,那么请禁止社区运营上来不管什么问题,就是一堆复制粘贴的要代码片段的话术,这种回复,我说是纯粹的垃圾回复没问题吧? 为什么要让问题下面充斥这种垃圾回复? 产品能解决的事情雇人来做还做得一塌糊涂? 不回复没关系,天天问题不解决,上班CV大法搞这些垃圾?
2023-07-13 - Canvas.toDataURL仅返回data:,?
[图片] const url = './WX20230713-152705@2x.png' Page({ data: { width: 256, height: 256, }, async _dataurl() { let {node, width, height} = await new Promise(r => { wx.createSelectorQuery() .select('#canvas') .fields({node: true, size: true}, r) .exec() }) console.log(node, width, height); let img = node.createImage() await new Promise(resolve => { img.onload = resolve img.src = url }) node.getContext('2d').drawImage(img, 0, 0, width, height) let dataURL = node.toDataURL() if (dataURL.length > 6) { console.log(dataURL.length) } else { console.log(dataURL) } }, plus() { let {width, height} = this.data width += 256 height += 256 this.setData( {width, height}, this._dataurl ) }, minus() { let {width, height} = this.data width -= 256 height -= 256 this.setData( {width, height}, this._dataurl ) } }) [图片] 可以看到,在 Canvas 尺寸大于 1536 x 1536 时,直接返回了`data:,`,整个数据部分丢失。 几个问题: 一、为什么随着 Canvas 尺寸的增加,DataURI 的长度却在变小? 二、为什么在并不大的尺寸下会丢失数据? 三、iOS、Android、开发者工具表现为何不一致? 四、这个接口成功返回的 Canvas 尺寸的阈值是多少?
2023-07-13