微信云开发官网
用云开发创建项目后删除自带文件夹为什么老显示编译错误? 请高手指点一下 谢谢了
https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-sdk-api/database/aggregate/Aggregate.lookup.html#%E7%A4%BA%E4%BE%8B [图片]
[图片]
已正确绑定云开放平台 最简单的原始云函数调用 UnionID可以正常获取 [图片] 而且 鼠标放到 wxContext上还有提示 [图片] 但是,调用另一个云函数,死活显示不了 (依赖、所有文件均已上传) const UNIONID = wxContext.UNIONID [图片]
在小程序的webview的静态页面中调用wx.config({,显示成功,但是返回的jsApiList是空的[图片],我用的是云开发,webview的网页直接放到云开发的静态网页里了,这样就免鉴权了。但调用还是startRecord:fail, the permission value is offline verifying
能否帮我撤销这个小程序的ID续费,这个之前绑定了这个ID一直忘记解绑了。 今天弹出来,我以为是我自己的小程序,没想到是绑定的另外一个小程序,没看清楚,能否退回来[图片]
wx8762dd8a7daef55b[图片]
[图片]
FetchError: request to http://api.weixin.qq.com/_/cos/getauth failed, reason: socket hang up at ClientRequest.<anonymous> (file:///app/node_modules/node-fetch/src/index.js:108:11) at ClientRequest.emit (node:events:519:28) at Socket.socketOnEnd (node:_http_client:524:9) at Socket.emit (node:events:531:35) at endReadableNT (node:internal/streams/readable:1696:12) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { type: 'system', errno: 'ECONNRESET', code: 'ECONNRESET', erroredSysCall: undefined } 环境是微信云开发,配置了本地vscode 的 weixin cloudbase containers的vpc 开发语言是nodejs。 [图片] 目的是为了在本地访问http://api.weixin.qq.com/_/cos/getauth 这个接口 但目前出现报错的i情况不知道是哪个环节没有调通还是理解上都出了问题。 [图片] 这个是docker上关于这个vpc服务的内容。 或者说有其他方式可以直接访问腾讯云对象储存实现服务端上传
在微信支付成功的回调函数里调用云数报错,报错显示云函数未初始化,当然我是初始化过了。为什么会出现这种问题呢? [图片] 初始化过程 [图片] 云数据库可以正常调用,云函数会报错。 [图片]
// updat_volume(){ // let that = this // db.collection('goods').where({ // name:that.data.product.goods_name // }).update({ // data:{ // volume:$.subtract(['$that.data.product.goods_volume','$that.data.product.goods_num']) // } // }) // .then(res=>{ // console.log(res) // }) // }, 返回的object类型就是that.data.product.goods_volume和that.data.product.goods_num [图片]
数据库中的时间用db.serverdate()获取的时间,当wxml中使用{{util.timeFormt(weibo.create_tiem)}},模拟器中显示NaN,如果wxml中使用{{util.timeFormt(create_tiem)}},js中var crate_time = weibo[0].create_time.toString();进行转换,那么所有信息显示的时间都是一样的。下图第一张图,直接格式化数据库时间,显示NaN,第二张图,在JS中把date对象转换成字符串,显示的时间是一样的。这个时间格式化如何解决? [图片][图片] 云函数代码: return await db.collection("weibo").add({ data: { create_time:db.serverDate(), // create_time:new Date(db.serverDate()).toLocaleDateString(), device:device } }) } wxml代码: <view class="detail-info"> <view class="time">{{util.timeFormat(weibo.create_time)}}</view> // 模拟器得到的时间是NaN <view class="time">{{util.timeFormat(create_time)}}</view> // 模拟器得到是时间如图二,显示的时间是一样的。 <view class="from">来自{{weibo.device}}</view> </view> JS代码: loadWeibos(){ const that = this; db.collection("weibo").limit(10).get().then(res => { // console.log(res); const weibo = res.data; console.log(weibo); var create_time = weibo[0].create_time.toString(); // 把对象转换成字符串 console.log(create_time); that.setData({ weibo:weibo, create_time:create_time }) }) }, 代码片段:https://developers.weixin.qq.com/s/XruBZhmh7CRC
上午还好好的,刚刚打开就出问题了,重启了依旧如此。 CMS里修改后内容依旧照常调用,就是这个开发者工具里的这个页面打不开。 [图片]
[图片] APP ID wxc2319ac0bb5a240d 最近的操作:手动修改 数据库创建时间字段的值
刚建云空间数据库有很多默认表,现在突然没了,云后台模板库里的商品管理模板怎么也突然没了?还有云后台加了好几个模板为什么现在只显示一个了? 云开发问题好多啊。。 [图片][图片]
https://developers.weixin.qq.com/miniprogram/dev/devtools/npm.htmlhttps://developers.weixin.qq.com/miniprogram/dev/wxcloud/template-guide/basic/wx_message/docs/api_wx_message_create_activity_id.htmlhttps://developers.weixin.qq.com/miniprogram/dev/wxcloud/template-guide/basic/user_center/
上传失败 Error: errCode: -503002 storage permission denied | errMsg: Have no access right to the storage 环境代码: App({ onLaunch: function () { wx.cloud.init({ env: 'cloud1-7gnxcazqca056a4a', traceUser: true, }); }, globalData: { } }) 调度代码: uploadImg(imgUrl, buttonItem) { let that = this var timestamp = (new Date()).valueOf(); console.log('ocr/' + timestamp + '.png') console.log(imgUrl) wx.cloud.uploadFile({ cloudPath: timestamp + '.png', filePath: imgUrl, // 文件路径 success: res => { console.log("上传成功", res.fileID) that.getImgUrl(res.fileID, buttonItem) }, fail: err => { console.log("上传失败", err) } }) },
[图片][图片] 轮播图显示不了,点击放大预览就可以。
[图片] [图片]
签名算法和参数没有问题,已用微信官方提供的签名验证工具验证过,并且用postman也测试过没问题。问题就是 在小程序云函数里 用request-promise调用api https://api.mch.weixin.qq.com/v3/transfer/batches ,传Authorization参数出问题,客服那边 反应服务器那边收到的签名参数里有好多\\\转义符导致签名失败!但是我把Authorization 的参数调试打印出来,再把参数放在postman里调用就成功!现在不知道怎么解决? 跟客服聊天: [图片] 云函数代码: [图片] 大佬们帮我分析一下
小程序示例
小程序官方示例Demo,包含云开发示例。
小程序示例
扫码体验
[图片]