个人案例
Customizer
定制手机壳,3.9元起。
Customizer扫码体验
- 建议有开发能力的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 - 【已解决】代码片段如何设置二维码的预览权限?
代码片段的二维码只有自己能看吗? 别的微信号,绑定了开发者权限也提示暂无预览权限? 那么代码片段要如何分享给除我之外的其他人呢?
2023-07-12 - wx.createOffscreenCanvas返回Null?
iPhone 11 真机稳定复现。 [图片]
2023-07-10 - 物流查询组件trace_waybill接口报图片url错误
图片是阿里云私有 Bucket 但是给了公网访问的签名,有效期内公网访问一切正常,但是请求物流查询组件的 trace_waybill 接口报图片URL错误: {"errcode":9300561,"errmsg":"图片url错误 rid: 64a09bc4-4cc9b3a2-5308f49e"} MDN官网找了个图片的URL尝试发现正常: https://developer.mozilla.org/assets/mdn_contributor.png 是这个接口的服务器还有别的限制?难道直接剔除了 query 参数?
2023-07-02