微信小程序
RubyCat-Max
这个作者很懒,什么都没留下…
展开
-
微信小程序网络字体安卓实机无法加载解决方案
使用uni.loadFontFace加载网络字体,小程序开发工具正常,但安卓手机实机无法正常加载。且success和error的回调没有。经摸索,是网络字体的跨域问题。在宝塔的配置文件里,注意在443下添加,因为小程序要https。<FilesMatch "\.(ttf|otf|eot|woff|woff2)$"> <IfModule mod_headers.c> Header set Access-Control-Allow-Origi原创 2021-04-23 14:46:48 · 2605 阅读 · 1 评论 -
uniapp-微信小程序-ios音乐播放没声音
const innerAudioContext = uni.createInnerAudioContext();innerAudioContext.autoplay = true;innerAudioContext.src = 'https://img-cdn-qiniu.dcloud.net.cn/uniapp/audio/music.mp3';innerAudioContext.onPlay(() => { console.log('开始播放');});上述代码在APP,H5,小程原创 2020-07-18 15:43:21 · 2132 阅读 · 0 评论 -
微信小程序--长按事件bindlongtap与点击事件bindtap的冲突
对于同一控件同时设置bindtap和bindlongtap,会发现长按时先出现bindlongtap的事件,然后触发点击事件。通过测试,我们发现,小程序中事件执行的顺序是 点击:touchstart → touchend → tap 长按 touchstart → longtap → touchend → tap处理方法:// wxml<view bindtouchstart="bindTo原创 2017-08-02 17:51:48 · 17623 阅读 · 5 评论 -
微信小程序--使用微信官方demo解密userinfo加密数据
环境:thinkphp3.2 把微信官方文档下载的解密demo,放在vendor文件夹下 通过code获取session_key和微信端login获取到encryptedData和iv。$appid='小程序的appid';$sessionKey = $loginData['session_key'];$encryptedData=$userinfo['encryptedData'];$i原创 2017-08-03 17:17:52 · 1442 阅读 · 0 评论