原来如此。
mac真机无法获取node节点?wxml代码:<canvas type="2d" id="myCanvas"></canvas> js代码:const query = uni.createSelectorQuery() query.select('#myCanvas') .fields({ node: true }) .exec((res) => { console.log('res', res) const canvas = res[0].node }) 通过createSelectorQueryAPI在开发者工具可正常获取canvas的node,在mac上面返回null是什么原因呢?手机也可以正常获取。 [图片] [图片]
2021-05-29对了,经常出现 的 Cannot read property 'contexts' of null ,在源代码的文件里并没有 contexts,这个contexts是否是编码过程产生的?
升级至最新版1.02.1905081编译预览经常不过,是bug吗?- 当前 Bug 的表现(可附上截图) 自动预览 [图片] [图片] [图片] [图片] [图片] 多次错误编译后,居然通过了。 [图片] 自动上传也是如此,自动上传需要clear所有文件后,重新生成,所以一直没过,是否编译时有缓存,并发之类的,导制通过不了? IDE server has started, listening on http://127.0.0.1:50551 initialization finished uploading project... { i [StatusCodeError]: 400 - "{\"code\":40000,\"error\":\"错误 Error: file: lib/storage/word-storage.js\\n unknown: Cannot read property 'contexts' of null\\n \"}" at new i (/Applications/wechatwebdevtools.app/Contents/Resources/package.nw/js/common/cli/index.js:157:46301) at H.callback (/Applications/wechatwebdevtools.app/Contents/Resources/package.nw/js/common/cli/index.js:157:45150) at H.e.callback.a.callback [as _callback] (/Applications/wechatwebdevtools.app/Contents/Resources/package.nw/js/common/cli/index.js:157:44204) at H.a._callback.a.callback.a.callback (/Applications/wechatwebdevtools.app/Contents/Resources/package.nw/js/common/cli/index.js:187:5473) at H.emit (events.js:193:13) at H.<anonymous> (/Applications/wechatwebdevtools.app/Contents/Resources/package.nw/js/common/cli/index.js:187:18286) at H.emit (events.js:193:13) at IncomingMessage.<anonymous> (/Applications/wechatwebdevtools.app/Contents/Resources/package.nw/js/common/cli/index.js:187:17128) at Object.onceWrapper (events.js:281:20) at IncomingMessage.emit (events.js:198:15) name: 'StatusCodeError', statusCode: 400, message: `400 - "{\\"code\\":40000,\\"error\\":\\"错误 Error: file: lib/storage/word-storage.js\\\\n unknown: Cannot read property 'contexts' of null\\\\n \\"}"`, error: `{"code":40000,"error":"错误 Error: file: lib/storage/word-storage.js\\n unknown: Cannot read property 'contexts' of null\\n "}`, options: { url: 'http://127.0.0.1:50551/upload?cli=1&projectpath=%252FUsers%252Fabc%252FPycharmProjects%252Fstudy-app%252Fstudy-project%252Fmini-app%252Fversions%252F..%252Fmini-program%252Fwx7b4db1bd999d314f&version=1.0.544&desc=upload%253A&infooutput=', resolveWithFullResponse: true, callback: [Function], transform: undefined, simple: true, transform2xxOnly: false }, response: IncomingMessage { _readableState: ReadableState { objectMode: false, highWaterMark: 16384, buffer: BufferList { head: null, tail: null, length: 0 }, length: 0, pipes: null, pipesCount: 0, flowing: true, ended: true, endEmitted: true, reading: false, sync: true, needReadable: false, emittedReadable: false, readableListening: false, resumeScheduled: false, paused: false, emitClose: true, autoDestroy: false, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: true, decoder: null, encoding: null }, readable: false, _events: [Object: null prototype] { end: [Array], close: [Array], data: [Function], error: [Function] }, _eventsCount: 4, _maxListeners: undefined, socket: Socket { connecting: false, _hadError: false, _parent: null, _host: null, _readableState: [ReadableState], readable: true, _events: [Object], _eventsCount: 7, _maxListeners: undefined, _writableState: [WritableState], writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: [ClientRequest], [Symbol(asyncId)]: 36, [Symbol(kHandle)]: [TCP], [Symbol(lastWriteQueueSize)]: 0, [Symbol(timeout)]: null, [Symbol(kBytesRead)]: 0, [Symbol(kBytesWritten)]: 0 }, connection: Socket { connecting: false, _hadError: false, _parent: null, _host: null, _readableState: [ReadableState], readable: true, _events: [Object], _eventsCount: 7, _maxListeners: undefined, _writableState: [WritableState], writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: [ClientRequest], [Symbol(asyncId)]: 36, [Symbol(kHandle)]: [TCP], [Symbol(lastWriteQueueSize)]: 0, [Symbol(timeout)]: null, [Symbol(kBytesRead)]: 0, [Symbol(kBytesWritten)]: 0 }, httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, headers: { 'content-type': 'application/json; charset=utf-8', date: 'Thu, 09 May 2019 02:21:01 GMT', connection: 'close', 'transfer-encoding': 'chunked' }, rawHeaders: [ 'Content-Type', 'application/json; charset=utf-8', 'Date', 'Thu, 09 May 2019 02:21:01 GMT', 'Connection', 'close', 'Transfer-Encoding', 'chunked' ], trailers: {}, rawTrailers: [], aborted: false, upgrade: false, url: '', method: null, statusCode: 400, statusMessage: 'Bad Request', client: Socket { connecting: false, _hadError: false, _parent: null, _host: null, _readableState: [ReadableState], readable: true, _events: [Object], _eventsCount: 7, _maxListeners: undefined, _writableState: [WritableState], writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: [ClientRequest], [Symbol(asyncId)]: 36, [Symbol(kHandle)]: [TCP], [Symbol(lastWriteQueueSize)]: 0, [Symbol(timeout)]: null, [Symbol(kBytesRead)]: 0, [Symbol(kBytesWritten)]: 0 }, _consuming: false, _dumped: false, req: ClientRequest { _events: [Object], _eventsCount: 5, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: [Socket], connection: [Socket], _header: 'GET /upload?cli=1&projectpath=%252FUsers%252Fabc%252FPycharmProjects%252Fstudy-app%252Fstudy-project%252Fmini-app%252Fversions%252F..%252Fmini-program%252Fwx7b4db1bd999d314f&version=1.0.544&desc=upload%253A&infooutput= HTTP/1.1\r\nhost: 127.0.0.1:50551\r\nConnection: close\r\n\r\n', _onPendingData: [Function: noopPendingOutput], agent: [Agent], socketPath: undefined, timeout: undefined, method: 'GET', path: '/upload?cli=1&projectpath=%252FUsers%252Fabc%252FPycharmProjects%252Fstudy-app%252Fstudy-project%252Fmini-app%252Fversions%252F..%252Fmini-program%252Fwx7b4db1bd999d314f&version=1.0.544&desc=upload%253A&infooutput=', _ended: true, res: [Circular], aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, [Symbol(isCorked)]: false, [Symbol(outHeadersKey)]: [Object] }, request: H { _events: [Object], _eventsCount: 5, _maxListeners: undefined, resolveWithFullResponse: true, readable: true, writable: true, _qs: [r], _auth: [c], _oauth: [u], _multipart: [s], _redirect: [r], _tunnel: [s], _rp_resolve: [Function], _rp_reject: [Function], _rp_promise: [Promise], _rp_callbackOrig: undefined, callback: [Function], _rp_options: [Object], headers: {}, setHeader: [Function], hasHeader: [Function], getHeader: [Function], removeHeader: [Function], method: 'GET', localAddress: undefined, pool: {}, dests: [], __isRequestRequest: true, _callback: [Function], uri: [Url], proxy: null, tunnel: false, setHost: true, originalCookieHeader: undefined, _disableCookies: true, _jar: undefined, port: '50551', host: '127.0.0.1', path: '/upload?cli=1&projectpath=%252FUsers%252Fabc%252FPycharmProjects%252Fstudy-app%252Fstudy-project%252Fmini-app%252Fversions%252F..%252Fmini-program%252Fwx7b4db1bd999d314f&version=1.0.544&desc=upload%253A&infooutput=', httpModule: [Object], agentClass: [Function], agent: [Agent], _started: true, href: 'http://127.0.0.1:50551/upload?cli=1&projectpath=%252FUsers%252Fabc%252FPycharmProjects%252Fstudy-app%252Fstudy-project%252Fmini-app%252Fversions%252F..%252Fmini-program%252Fwx7b4db1bd999d314f&version=1.0.544&desc=upload%253A&infooutput=', req: [ClientRequest], ntick: true, response: [Circular], originalHost: '127.0.0.1:50551', originalHostHeaderName: 'host', responseContent: [Circular], _destdata: true, _ended: true, _callbackCalled: true }, toJSON: [Function: L], caseless: t { dict: [Object] }, body: `{"code":40000,"error":"错误 Error: file: lib/storage/word-storage.js\\n unknown: Cannot read property 'contexts' of null\\n "}` } } - 预期表现 一次性编译预览通过,但总是不通过,然后多进行几次又莫名通过,在IDE中直接点击预览、上传均出现同样问题。 - 复现路径 - 提供一个最简复现 Demo
2019-05-09可以基于pixelRatio比例放大后再绘制
借助canvas生成的图片模糊不清- 调用此接口通过canvas生成保存到手机相册的图片不如以前的清晰 - js代码 [代码]onLoad: [代码][代码]function[代码][代码](options) {[代码][代码] [代码][代码]var[代码] [代码]ctx = wx.createCanvasContext([代码][代码]"canvas"[代码][代码], [代码][代码]this[代码][代码])[代码][代码] [代码][代码]wx.chooseImage({[代码][代码] [代码][代码]success: [代码][代码]function[代码][代码](res) {[代码][代码] [代码][代码]console.log(res)[代码][代码] [代码][代码]var[代码] [代码]path = res.tempFilePaths[[代码][代码]0[代码][代码]][代码][代码] [代码][代码]ctx.drawImage(path, [代码][代码]0[代码][代码], [代码][代码]0[代码][代码], [代码][代码]375[代码][代码], [代码][代码]667[代码][代码])[代码][代码] [代码][代码]ctx.draw([代码][代码]true[代码][代码], [代码][代码]function[代码][代码](res) {[代码][代码] [代码][代码]wx.canvasToTempFilePath({[代码][代码] [代码][代码]canvasId: [代码][代码]'canvas'[代码][代码],[代码][代码] [代码][代码]width:[代码][代码]375[代码][代码],[代码][代码] [代码][代码]height:[代码][代码]667[代码][代码],[代码][代码] [代码][代码]destWidth: [代码][代码]375[代码][代码]*[代码][代码]4[代码][代码],[代码][代码] [代码][代码]destHeight: [代码][代码]667[代码][代码]*[代码][代码]4[代码][代码],[代码][代码] [代码][代码]success(res) {[代码][代码] [代码][代码]console.log(res.tempFilePath)[代码][代码] [代码][代码]wx.saveImageToPhotosAlbum({[代码][代码] [代码][代码]filePath: res.tempFilePath,[代码][代码] [代码][代码]success(res) {[代码][代码] [代码][代码]console.log(res)[代码][代码] [代码][代码]wx.showToast({[代码][代码] [代码][代码]title: [代码][代码]'保存成功'[代码][代码],[代码][代码] [代码][代码]})[代码][代码] [代码][代码]wx.vibrateLong({})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码] -wxml代码 [代码]<[代码][代码]canvas[代码] [代码]style[代码][代码]=[代码][代码]'width:375px;height:667px;'[代码] [代码]canvas-id[代码][代码]=[代码][代码]"canvas"[代码][代码]></[代码][代码]canvas[代码][代码]>[代码] 图片可能在电脑上区别不明显,但是在手机上一眼就能看出来 -原图: [图片] -生成的图片 [图片]
2019-04-120元付个毛钱啊,业务上需要调整,而不是支付上整0元付,你到超市买东西,告诉收银员,我要付0元,看能付不
微信支付 | 0元支付的问题订单金额如果是0.01元的时候,就流程正常,调起支付弹窗,支付成功。 可是如果订单金额是0.00元的时候,有订单号,但是,支付弹窗就不弹出来了,也没报错,是微信支付不支持0元支付吗?还是别的? 求解答。
2019-02-19https://mp.weixin.qq.com/ 输入正确的帐号密码登录,就跳到登录超时 [图片]
mp后台登录就跳转至登录超时大家是这样吗?
2018-12-24可以主动check
微信公众号支付成功后回调时间在10~20秒这是我数据库记录的,pay_time是回调时微信给我的用户支付时间,notify_time是我在回调接口里获取的当前时间,发现最少相差了10s,最长20秒。 [图片] [图片] 我前端页面展示有两个TAB页(待支付、已支付),在待支付付完钱后刷新当前页面,就会出现可能会没触发回调接口,导致订单还在待支付TAB页里。 [图片] 支付成功后,我已经延迟10秒刷新页面了,但是我怕这个延迟时间不够。 如果延迟20秒会极大的影响用户体验。 我想问微信那边为什么会这么慢,貌似是这两天会这样,以前支付成功不超过2s直接会调回调接口的
2018-12-14可怜的孩子,写代码不git
小程序代码我的小程序上线了,因电脑系统崩溃,小程序代码丢失了,请问怎么才能找回小程序的代码
2018-11-23即时小程序做到代码完全不泄露,也有N种方法拿到你的URL和参数,它和小程序关系真不大。
小程序的源码会不会泄露?微信小程序发布成功之后。 用户有没有可能通过一些特殊的处理方式,来获取到当前微信小程序的源码? 对于这种类似的问题,腾讯官方技术方面,有没有做什么相应的应对措施? 由于一直没有找到,微信小程序的官方技术支持的人工联系方式。所以在这里把问题发布出来,希望各位做技术的同仁、以及小程序的官方技术人员,能够帮忙。 谢谢!
2018-10-23应该是开发工具,远程调试上的bug,非远程调试似乎是独立的
小程序的storage数据,微信切换用户后可以直接调用小程序 是否写入storage的数据,任意用户登录同一手机的微信,都是共享的,可以读写的?
2018-05-20