- 微信小程序因安装node module包导致文件过大14M+,会影响上传发布吗?
请教各位前辈:本人开发的微信小程序原来不大,还不到1M, 因需要需要上传excel表格进云数据库和下载云数据库成excel至本地,这样需要再开发工具里安装npm install node-excel依赖,这样安装完了后单个依赖就14M多。如何处理?会影响后面的上传和发布吗?
2020-07-08 - 云函数安装 npm install node-xlsx依赖一直不成功?
由于想用excel文件导入和导出微信小程序数据库内容,按照百度高人的指点,需要再云函数里先安装npm install node-xlsx但一致未成功,根本就卡住不动,然后提示如下: PS D:\Private Files\微信小程序\拓领预约系统\拓领仓库预约系统1.1(+logs)\cloud> npm install node-xlsx npm ERR! code ETIMEDOUT npm ERR! errno ETIMEDOUT npm ERR! network request to https://registry.npmjs.org/node-xlsx failed, reason: connect ETIMEDOUT 104.16.25.35:443 npm ERR! network This is a problem related to network connectivity. npm ERR! network In most cases you are behind a proxy or have bad network settings. npm ERR! network npm ERR! network If you are behind a proxy, please make sure that the npm ERR! network 'proxy' config is set properly. See: 'npm help config' npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\jazhang\AppData\Roaming\npm-cache\_logs\2020-07-01T14_48_07_145Z-debug.log 我的问题是: 以上原因是什么?我看大意是网络不好?按照此类xlsx依赖包,除了针对某一特定云函数安装依赖,还可以在哪里统一一次性安装依赖,如何操作?请高人指定!感谢!
2020-07-01 - 数据库条件查询问题?
各位前辈,小弟开发新人,请教一个数据条件查询问题。 使用云函数进行数据库条件查询,wxml 界面用时间picker获取时间,JS 部分定义date并获取picker选定后的值。并把这个值,传到云函数,传值成功。 就是不确定传的值的类型。云开发数据库中记录里,定义的date为string类型。用where进行条件查询。 如:picker 确定2020-05-20,传值到云函数为2020-05-20,数据库集合里有记录中含有date 为2020-05-20的数据,但是一直查询不到数据,请大神们指点一二。 关键代码:WXML就不写了,比较简单的picker组件。 JS: getResource(res){ console.log("点击有效") wx.cloud.callFunction({ name:"getVolumebanlance", data:{ date:this.data.date } }) .then(res=>{ console.log(res) }).catch(res=>{ console.log("查询数据失败") }) } 云函数: exports.main = async (event) => { // return event.date var date=event.date return await DB.collection("Volume_Balance").where({ date: date }).get() }
2020-05-24