- msgSecCheck 报错 43104 ?
接口报错,https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/sec-center/sec-check/msgSecCheck.html appid是对的,openid也是通过APPID新获取的。之前能用,今天突然发现不行了。 43104 The openid does not match the appid 与 openid 不匹配 appid: wx648e486610e64d77 请求地址:https://api.weixin.qq.com/wxa/msg_sec_check?access_token=${access_token} 请求参数 { openid: 'oOwai6f5Bv9sz_tsgshICtVjZD_M', scene: 1, content: 'xueyang', vsrsion: 2 } 报错 { errcode: 43104, errmsg: 'The openid does not match the appid rid: 66853f4e-71afc608-5362da2f' }
07-03 - 部分安卓用户访问的时候空白,其他用户可以正常使用。
部分安卓用户访问的时候空白。有谁遇到过,给我点提示啊? 项目用的是 `@vue/cli 4.2.3`打包的在线地址:http://h5.chicken.yunqian.info/其次问下安卓访问公众号网页的缓存怎么清除?页面删了几小时都还能访问那种。 # package.json { "dependencies": { "axios": "^0.19.2", "core-js": "^3.6.4", "less": "^3.11.1", "less-loader": "^5.0.0", "store2": "^2.11.0", "vant": "^2.4.7", "vue": "^2.6.11", "vue-router": "^3.1.5", "vue-wechat-title": "^2.0.5", "vuex": "^3.1.2" }, "devDependencies": { "@vue/cli-plugin-babel": "~4.2.0", "@vue/cli-plugin-eslint": "~4.2.0", "@vue/cli-service": "~4.2.0", "babel-eslint": "^10.0.3", "babel-plugin-import": "^1.13.0", "eslint": "^6.7.2", "vconsole": "^3.3.4", "eslint-plugin-vue": "^6.1.2", "vue-template-compiler": "^2.6.11" }, "eslintConfig": { "root": true, "env": { "node": true }, "extends": [ "plugin:vue/essential", "eslint:recommended" ], "parserOptions": { "parser": "babel-eslint" }, "rules": {} }, "browserslist": [ "> 1%", "last 5 versions" ] } # main.js # 导航守卫 router.beforeEach((to, from, next) => { const { token } = to.query const { token: id } = store.state.user if (token) { fetchUserInfo(token).then(res => { store.commit('setUser', res) next() }) } else if (!id) { const { query: { params }, fullPath } = to window.sessionStorage.setItem('fullPath', fullPath) const query = params ? `?params=${encodeURI(params)}` : '' const url = `https://api.domain.info/wechat/authorize${query}` window.location.replace(url) /*const debug = process.env.NODE_ENV === 'development' if (debug) { throw new Error('获取用户信息失败') } else { window.location.replace(url) }*/ } else { next() } })
2020-03-28 - 什么情况才会出现 canvas 画图不在画布上?
写了这个,但是有一定几率会出现下面的情况,很是无解。想问下,什么情况才会出现 canvas 画图不在画布上? 一定概率 = 刷新页面10次可能出现一次。 [图片] [代码]datas.forEach((e, index) => {[代码][代码] [代码][代码]_this.drawCircle(e.a * 1 / e.b * 1, [代码][代码]'canvas'[代码] [代码]+ index, e.color)[代码][代码]})[代码][代码]//---------------------[代码] [代码] [代码][代码]drawCircle: [代码][代码]function[代码] [代码](step, id, color) {[代码] [代码] [代码][代码]var[代码] [代码]dpi = [代码][代码]this[代码][代码].format_rpx()[代码][代码] [代码][代码]console.log([代码][代码]'px'[代码][代码], dpi)[代码][代码] [代码] [代码] [代码][代码]var[代码] [代码]ctx = wx.createCanvasContext(id);[代码] [代码] [代码][代码]// 参数step 为绘制的圆环周长,从0到2为一周 。 -Math.PI / 2 将起始角设在12点钟位置 ,结束角 通过改变 step 的值确定[代码] [代码] [代码][代码]// let bengen = (step * 2 - 0.5) * Math.PI;[代码][代码] [代码][代码]if[代码][代码](isNaN(step)){[代码][代码] [代码][代码]step = 1[代码][代码] [代码][代码]}[代码][代码] [代码][代码]let bengen = (step * 2) * Math.PI - Math.PI / 2[代码] [代码] [代码][代码]console.log(step, id, step * 2 - 0.5)[代码][代码] [代码][代码]ctx.beginPath();[代码][代码] [代码][代码]ctx.setLineWidth(dpi.border);[代码][代码] [代码][代码]ctx.setStrokeStyle(color);[代码] [代码] [代码][代码]ctx.arc(dpi.px, dpi.px, dpi.dot, -Math.PI / 2, bengen);[代码] [代码] [代码][代码]ctx.stroke();[代码][代码] [代码][代码]// ctx.draw();[代码] [代码] [代码][代码]ctx.beginPath();[代码][代码] [代码][代码]ctx.setStrokeStyle([代码][代码]'#f0f0f0'[代码][代码]);[代码] [代码] [代码][代码]ctx.arc(dpi.px, dpi.px, dpi.dot, bengen, 1.5 * Math.PI);[代码] [代码] [代码][代码]ctx.stroke();[代码] [代码] [代码][代码]ctx.setFontSize(20)[代码][代码] [代码][代码]ctx.setStrokeStyle([代码][代码]'#666'[代码][代码])[代码][代码] [代码][代码]ctx.setTextBaseline([代码][代码]'middle'[代码][代码])[代码][代码] [代码][代码]ctx.setTextAlign([代码][代码]'center'[代码][代码])[代码][代码] [代码][代码]// 转换百分比[代码][代码] [代码][代码]let num = Math.floor(step * 100) + [代码][代码]'%'[代码][代码] [代码][代码]ctx.fillText(num, dpi.px, dpi.px)[代码][代码] [代码][代码]ctx.draw();[代码][代码] [代码][代码]},[代码]
2019-03-29