个人案例
小云名片
超简单的多重身份名片生成工具
小云名片扫码体验
Teem
Teem,真的可以见到陌生人
社交破冰扫码体验
问题已经用循环变相解决了。有没有更优雅的方案?
微信云开发,数据库 add 18000条报错?[error] 函数执行失败(耗时 5656ms) Error: collection.add:fail -501001 resource system error. 413 Payload Too Large | [http://tcb-api.tencentcloudapi.com/admin?&eventId=17c071f7a71_3&seqId=17c071f7a71_3] at toSDKError (/xxx/cloudfunctions/ordercollect/node_modules/wx-server-sdk/index.js:8089:19) at Object.returnAsFinalCloudSDKError (/xxx/cloudfunctions/ordercollect/node_modules/wx-server-sdk/index.js:8060:12) at /xxx/cloudfunctions/ordercollect/node_modules/wx-server-sdk/index.js:1225:32 at processTicksAndRejections (internal/process/task_queues.js:97:5) 意思是一次请求数据量太大吗?之前用add提交20000+条数据,没报这个错啊。是新加了限制吗? 如果数据量太大怎么add呢? 代码: console.log('读取数据[记录数=' + recordsLength + '][耗时=' + readMS + '秒]') // return await db.collection('xxx').add({ data: data }).then(res => { if (res.errMsg == 'collection.add:ok') { let after = new Date() let costMS = (after.getTime() - read.getTime()) / 1000 console.log('统计成功: [统计月份=' + lastMonthYm + '][记录生成时间=' + nowStr + '][生成记录数量=' + recordsLength + '][耗时=' + costMS + '秒]') } else { console.log('统计失败:', res) } })
2021-09-21应该没问题,看到好多公众号迁移主体,名称没变的。
已有同名公众号和小游戏,转移小游戏主体问题!急,求教!因之前有看到平台规定,同一个主体小程序和公众号可以同名,不同主体是不行的。 现因业务需求,A公司已上线名称叫【abc】的公众号和小游戏,计划要将[abc]的小游戏转移到B公司,请问是否可以正常转移吗? 烦请运营大大们回复,万分感谢
2021-09-15要在真机上操作,模拟器好像不支持
show-menu-by-longpress无效show-menu-by-longpress 弹起弹框后转发、保存图片、收藏点击均无效[图片] 代码:[图片]
2021-09-14可能在灰度测试吧。我iPhone是有的
置顶聊天折叠功能消失置顶聊天折叠功能键不再出现了
2021-09-14https://developers.weixin.qq.com/miniprogram/dev/component/button.html [图片]
如何设置按钮失效和生效?如何设置按钮失效和生效?
2021-09-13看看这个api,分享 success 方法里统计:https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/JS-SDK.html#10
这个分享数据,是从哪了看到的,有知道的吗?[图片] 这个分享数据,是从哪了看到的,有知道的吗?
2021-09-13服务器端要排队发送啊。等待就行了。
微信公众号群发文章一直显示等候发送该怎么办?已经半个小时了。微信公众号群发文章一直显示等候发送该怎么办?已经半个小时了。
2021-09-09把转义符全部替换后,格式还是不对,插入不进去,报错:{"errcode":-605101,"errmsg":"SyntaxError: Line 2, column 14: Unexpected token 'identifier' TcbCode: [DATABASE_QUERY_PARSE_FAILED] rid: 61361370-26523dcb-079ce242"} db.collection('ordercollect').add({ data: ["{"_id":{"sid":{"$numberDouble":"1007.0"},"mobile":"00000000000"},"totalCount":{"$numberInt":"284"},"created":"{"$date":{"offset":0}}","createdMS":{"$numberLong":"1630933871535"},"createdStr":"2021-09-06 21:11:11","createdDayStr":"2021-09-06"}"] })
云开发,数据库返回的JSON数据如何再插入数据库?通过 WEB API 请求返回的数据,data里的数据有 \ " 等等,这个格式怎么插入数据库呢? 想要通过这个接口,把下面data里的数据插入数据库:https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/database/databaseAdd.html // 这个是查询数据库返回的数据 { "errcode": 0, "errmsg": "ok", "data": [ "{\"_id\":{\"sid\":{\"$numberDouble\":\"1003.0\"},\"mobile\":\"00000000000\"},\"totalCount\":{\"$numberInt\":\"12\"},\"created\":\"{\\\"$date\\\":{\\\"offset\\\":0}}\",\"createdMS\":{\"$numberLong\":\"1630921631001\"},\"createdStr\":\"2021-09-06 17:47:11\",\"createdDayStr\":\"2021-09-06\"}", "{\"_id\":{\"sid\":{\"$numberDouble\":\"1003.0\"},\"mobile\":\"11111111111\"},\"totalCount\":{\"$numberInt\":\"62\"},\"created\":\"{\\\"$date\\\":{\\\"offset\\\":0}}\",\"createdMS\":{\"$numberLong\":\"1630921631001\"},\"createdStr\":\"2021-09-06 17:47:11\",\"createdDayStr\":\"2021-09-06\"}", "{\"_id\":{\"sid\":{\"$numberDouble\":\"1003.0\"},\"mobile\":\"22222222222\"},\"totalCount\":{\"$numberInt\":\"63\"},\"created\":\"{\\\"$date\\\":{\\\"offset\\\":0}}\",\"createdMS\":{\"$numberLong\":\"1630921631001\"},\"createdStr\":\"2021-09-06 17:47:11\",\"createdDayStr\":\"2021-09-06\"}", "{\"_id\":{\"sid\":{\"$numberDouble\":\"1004.0\"},\"mobile\":\"33333333333\"},\"totalCount\":{\"$numberInt\":\"34\"},\"created\":\"{\\\"$date\\\":{\\\"offset\\\":0}}\",\"createdMS\":{\"$numberLong\":\"1630921631001\"},\"createdStr\":\"2021-09-06 17:47:11\",\"createdDayStr\":\"2021-09-06\"}", "{\"_id\":{\"sid\":{\"$numberDouble\":\"1005.0\"},\"mobile\":\"44444444444\"},\"totalCount\":{\"$numberInt\":\"84\"},\"created\":\"{\\\"$date\\\":{\\\"offset\\\":0}}\",\"createdMS\":{\"$numberLong\":\"1630921631001\"},\"createdStr\":\"2021-09-06 17:47:11\",\"createdDayStr\":\"2021-09-06\"}", "{\"_id\":{\"sid\":{\"$numberDouble\":\"1007.0\"},\"mobile\":\"55555555555\"},\"totalCount\":{\"$numberInt\":\"28\"},\"created\":\"{\\\"$date\\\":{\\\"offset\\\":0}}\",\"createdMS\":{\"$numberLong\":\"1630921631001\"},\"createdStr\":\"2021-09-06 17:47:11\",\"createdDayStr\":\"2021-09-06\"}", "{\"_id\":{\"sid\":{\"$numberDouble\":\"1006.0\"},\"mobile\":\"66666666666\"},\"totalCount\":{\"$numberInt\":\"30\"},\"created\":\"{\\\"$date\\\":{\\\"offset\\\":0}}\",\"createdMS\":{\"$numberLong\":\"1630921631001\"},\"createdStr\":\"2021-09-06 17:47:11\",\"createdDayStr\":\"2021-09-06\"}" ] } // 我想通过这段代码把上面的data里的数据加到数据库里 JSONArray data = res.getJSONArray("data"); // 发送请求 http api String querystr = "db.collection('ordercollect').add({\n" + " data: " + data + "\n" + "})"; JSONObject body = new JSONObject(); body.put("env", env); body.put("query", querystr); 文档里的data格式: [图片]
2021-09-06自问自答:页面上接收的格式是[{url:'xxxxxx'},{url:'xxxxx'}],所以保存进数据库也要这样存储,或者页面onload时处理数据成这样的格式
weui 扩展组件 mp-uploader 无法显示 云存储中的cloudID图片?组件:https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/extended/weui/uploader.html WXML 代码: <view class="page"> <view class="page__bd"> <mp-cells> <mp-cell> <mp-uploader bindfail="uploadError" bindsuccess="uploadSuccess" select="{{selectFile}}" upload="{{uplaodFile}}" files="{{files}}" max-count="5" title="真实照片上传" tips="非真实照片将受到警告" delete="{{true}}"></mp-uploader> </mp-cell> </mp-cells> </view> </view> JS 代码: //... /** * 页面的初始数据 */ data: { files: ['cloud://cloud1-3g0985ox05f41f2d.636c-cloud1-3g0985ox05f41f2d-1307053970/cuser/od1W_5Wuu0W12WuS0-0gD4jchsew/1630378121140.jpg', 'cloud://cloud1-3g0985ox05f41f2d.636c-cloud1-3g0985ox05f41f2d-1307053970/cuser/od1W_5Wuu0W12WuS0-0gD4jchsew/1630378121141.jpg'] }, 结果: [图片]
2021-08-31代码好像显示不全,这里贴一下: // 获取手机号 getPhoneNumber: function (event) { var _this = this let cloudID = event.detail.cloudID //开放数据ID console.log("cloudID = " + cloudID) const db = wx.cloud.database() if (!cloudID) { wx.showModal({ showCancel: false, title: '提示', content: '为避免支付纠纷,请授权手机号' }) } else { wx.showLoading({ title: '正在加载', }) //获取手机号 wx.cloud.callFunction({ name: 'getphone', data: { cloudID: cloudID } }).then(res => { wx.hideLoading({ success: (res) => { }, }) var openid = res.result.OPENID var phone = res.result.phone console.log("phone : " + phone + ", openid : " + openid) if (phone) { var openidExist = _this.data.openidExist const db = wx.cloud.database() // 有 user 对象,则 update if(openidExist) { db.collection('user').where({ openid : openid }).update({ data: { phone: phone }, success: function (res) { console.log('user object add phone fieid success') }, fail: function(err) { console.error('error : ', err) } }) } else { // 没有 user 对象,则 add db.collection('user').add({ data: { openid: openid, phone: phone }, success: function (res) { console.log('user object add success') }, fail: function(err) { console.error('error : ', err) } }) } console.log("绑定手机号成功") _this.setData({ showModal: false, openid: openid, mobile: phone }) wx.hideLoading({ success: (res) => { }, }) } }).catch(error => { console.error('出错了', error) wx.hideLoading({ success: (res) => { }, }) }) } },
button 绑定获取手机号,如何模拟出发送验证码的场景进行测试?如题,因为获取手机号后的js逻辑里有弹窗逻辑,客户反馈获取验证码后弹窗关不掉。我测试获取手机号从来没有要发短信验证的,没办法模拟这个场景进行测试,怎么弄呢?
2021-08-20