小程序正式上架了,我扫码总是提示小程序当前体验版本已过期。 这是因为之前在idea上设置的测试项的问题,这个时候你再在idea“预览”打开小程序,扫码打开测试版,点右上角的“。。。”三个点把“打开调试”打开再关闭,把“联调设置”里的“联调扫码版本”打开再关闭,然后再去扫正式版的小程序码就可以了。
起因,在支付宝小程序下开发是有“开发调试”的,但是上传代码成测试版后便没有了,我想在测试版也有“开发调试”我就打算自己安装vconsole包,谁知道安装上以后在支付宝开发工具上有一个错误:af-appx.worker.min.js:6 TypeError: Cannot convert undefined or null to object,有点莫名奇妙,没办法我只好去微信开发工具上测试,微信上错误是:TypeError: Cannot read property 'sendBeacon' of undefined。搜索一番终于找到了问题的答案。
UUID生成器,rc-upload,moment.js,day.js,milliseconds.js,filesize,js-base64,delayjs
downloadAnnex() { const aTag = document.createElement('a') aTag.href = 'http://..........?annexId=' + this.id //文件id aTag.click() },
<script> const promise=new Promise((resolve, reject) =>{ console.log(1) resolve(); console.log(2) } ) promise.then(()=>{ console.log(3) }) console.log(4) console.log(5) </script>
let telInput=document.querySelector("input") telInput.addEventListener('input',noDou(demo,1000)) //防抖封装 function noDou(fn,wait){ let timeOut=null; return args=>{ if(timeOut) clearTimeout(timeOut) timeOut=setTimeout(fn,wait) } }
这是今天发现的一个问题。 如果导入多个js文件用
const fs=require("fs") let p=new Promise((resolve, reject)=>{ fs.readFile('./resource/1.html',(err,data)=>{ if(err) reject(err); resolve(data) }) })