![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
微信小程序
rich@cai
这个作者很懒,什么都没留下…
展开
-
微信小程序message: “request:fail net::ERR_CERT_DATE_INVALID“
message: "request:fail net::ERR_CERT_DATE_INVALID"message: “request:fail 对应的服务器证书无效。”需要替换有效证书原创 2021-12-03 09:27:26 · 3877 阅读 · 0 评论 -
微信小程序 getPhoneNumber:fail no permission
errMsg: “getPhoneNumber:fail no permission”原因是:微信认证:未认证微信官方:小程序微信认证认证审核问题汇总官方原创 2021-11-19 11:10:23 · 3056 阅读 · 1 评论 -
微信开发工具小程序获取手机号失败
由于微信上更换手机号导致微信开发工具上获取手机号失败,需要通过手机客户端访问一下,会发送一个短信验证码到手机上,输入验证码后,验证成功就可以了原创 2021-07-30 15:53:07 · 7185 阅读 · 3 评论 -
微信小程序IOS的date的坑
在安卓手机上new Date(“2021-3-28 00:00:00”).getTime(); 是ok,在ios不行需要处理一下:new Date(“2021-3-28 00:00:00”.replace(/-/g, “/”)).getTime();try {var wxRes = wx.getSystemInfoSync();if( (wxRes.platform != “devtools”)&& (wxRes.platform == “ios” || wxRes.system.原创 2021-04-27 16:29:26 · 171 阅读 · 0 评论 -
微信小程序允许上传的文件后缀
允许上传的文件在项目目录中,以下文件会经过编译,因此上传之后无法直接访问到:.js、app.json、.wxml、*.wxss(其中 wxml 和 wxss 文件仅针对在 app.json 中配置了的页面)。除此之外,只有后缀名在白名单内的文件可以被上传,不在白名单列表内文件在开发工具能被访问到,但无法被上传。具体白名单列表如下:wxspngjpgjpeggifsvgjsoncermp3aacm4amp4wavoggsilkwasmbr参考:https://develo原创 2021-04-27 14:30:20 · 1400 阅读 · 0 评论 -
小程序canvas 2d 自定义字体
开发工具:微信开发者工具 Stable 1.05.21020210注意:目前canvas 2d 开发工具看不到效果,需要真机预览才可以看到效果效果图:下面是动态加载网络字体的api:写的是一个全局加载的// app.jsApp({ onLaunch() { //加载全局字体 for(let i =0;i<this.globalData.array.length;i++){ console.log(i) let obj = this原创 2021-03-11 11:08:23 · 3333 阅读 · 0 评论 -
小程序更新
onLaunch () { if (wx.canIUse('getUpdateManager')) { const updateManager = wx.getUpdateManager() updateManager.onCheckForUpdate(function (res) { if (res.hasUpdate) { updateManager.onUpdateReady(function () { w..原创 2021-03-09 16:53:37 · 72 阅读 · 0 评论 -
微信小程序:VM24:1 EISDIR: illegal operation on a directory
VM24:1 EISDIR: illegal operation on a directory, watch 'F:/dist'Error: EISDIR: illegal operation on a directory, watch 'F:/dist' at FSWatcher.start (internal/fs/watchers.js:165:26) at Object.watch (fs.js:1270:11) at new FileUtils (C:\Program F原创 2020-08-21 16:53:17 · 961 阅读 · 1 评论 -
微信小程序not been declared in app.json.
pages/index/main has not been declared in app.json.Uncaught Error: APP-SERVICE-Engine:pages/index/main has not been declared in app.json. at new t (VM24 WAService.js:18) at Object.t.pageHolder [as Page] (VM24 WAService.js:17) at Et._initMP .原创 2020-08-21 16:51:55 · 3096 阅读 · 1 评论 -
ubuntu npm
npm ERR! code EACCESnpm ERR! syscall mkdirnpm ERR! path /home/doublejian/.npm/_cacache/content-v2/sha512/0b/9anpm ERR! errno -13npm ERR!npm ERR! Your cache folder contains root-owned files, due to a bug innpm ERR! previous versions of npm which has s原创 2020-08-21 16:50:10 · 686 阅读 · 0 评论 -
微信小程序引入组件(useExtendedLib)
使用之前扩展组件库基于小程序自定义组件构建,在使用扩展组件库之前,建议先阅读熟悉小程序自定义组件。引入组件通过 useExtendedLib 扩展库 的方式引入,这种方式引入的组件将不会计入代码包大小。可以通过npm方式下载构建,npm包名为weui-miniprogram1.useExtendedLibstyle基础库 2.8.0 开始支持,低版本需做兼容处理。微信客户端 7.0 开始,UI 界面进行了大改版。小程序也进行了基础组件的样式升级。app.json 中配置 “style”: "原创 2020-06-05 10:33:27 · 12985 阅读 · 7 评论 -
Canvas2D
<canvas id="canvas" type="2d" style="margin:5px;border:1px solid #d3d3d3" @touchstart="start" @touchmove="move" @touchend="end" ></canvas>需要标记id如果用select...原创 2020-05-20 17:09:33 · 226 阅读 · 0 评论 -
mpvue图片应该使用image
mpvue如果使用img标签会编译报错,应该用微信小程序自己的image <img src="../../static/images/10.jpg" alt="" @click="draw"/> 换为 <image src="../../static/images/10.jpg" alt="" @click="draw"/> WAIT Compiling...原创 2020-05-20 15:57:13 · 465 阅读 · 0 评论 -
mpvue (文件名错误)报错This relative module was not found:
小程序开发工具报:最后发现文件名写错了,太大意了,记录一下原创 2020-05-19 11:03:05 · 285 阅读 · 1 评论 -
微信小程序在手机上启用屏幕旋转支持
响应显示区域变化显示区域尺寸显示区域指小程序界面中可以自由布局展示的区域。在默认情况下,小程序显示区域的尺寸自页面初始化起就不会发生变化。但以下两种方式都可以改变这一默认行为。在手机上启用屏幕旋转支持从小程序基础库版本 2.4.0 开始,小程序在手机上支持屏幕旋转。使小程序中的页面支持屏幕旋转的方法是:在 app.json 的 window 段中设置 “pageOrientation”: “auto” ,或在页面 json 文件中配置 “pageOrientation”: “auto” 。以下是在原创 2020-05-12 14:47:42 · 1752 阅读 · 0 评论 -
微信小程序canvas 中的触摸事件不可冒泡
特殊事件: canvas 中的触摸事件不可冒泡,所以没有 currentTarget。原创 2020-05-11 18:10:15 · 1490 阅读 · 0 评论