个人案例
- 请问小程序码path路径可以设置成动态的吗?
请问小程序码path路径可以设置成动态的吗?在后台可以自由切换。 我有个思路不知道对不对? 我生成小程序码时设置的路径为空页面,然后我在空页面onLoad(options)里设置不同参数,然后跳转到不同页面,这样可行吗?
2021-02-21 - canvas 同层渲染,开发工具不正常,手机正常?
请问如何实现同层渲染,控制原生组件层级 开发工具canvas覆盖了 cover-view,但是手机显示是正常的 [图片] <scroll-view scroll-x="true" scroll-y="true" class="canvas-box"> <canvas type="2d" id="canvas" class="canvas canvas-in" style="height: 630rpx;width: 630rpx;"></canvas> </scroll-view> <cover-view class="imgs"> <cover-view class="imgs-box"> <cover-image class="img" wx:for-items="{{basics.imgUrl}}" wx:key="item" src="{{item.FiledID}}" style='{{maxHeight}}'></cover-image> </cover-view> </cover-view> .canvas-box { width: 100%; height: 100%; overflow: scroll; -webkit-overflow-scrolling: touch; position: relative; } .canvas { min-width: 100%; height: 100%; position: absolute; top: 0; } .canvas-in { z-index: -1; } .canvas-out { z-index: 99; background-color: #fff; } .imgs { background-color: #F7F9FC; } .imgs-box { width: 100%; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; /* padding: 8rpx; */ box-sizing: border-box; } .img { flex-shrink: 0; width: 33.3%; padding: 5rpx; box-sizing: border-box; }
2021-02-13 - canvas 2D 开发工具正常,体验版不显示?
代码片段:https://developers.weixin.qq.com/s/MfkkFTmS7bng wx.chooseImage this.uploadImg(tempImg) 开发工具正常,体验版以上函数不执行 [图片]
2021-02-05 - canvas 开发工具正常,手机预览失败?
iphone7、ios 14.4 [图片][图片] 代码片段:https://developers.weixin.qq.com/s/Zh3LyTm97Xnn
2021-02-05 - 企业付款到零钱报错Error: NO_AUTH?
请问小程序云开发企业付款到零钱功能报错(此 IP 地址不允许调用接口)。我用了社区官方给的 IP 地址也同样报错。请问该如何获取正确的IP [图片]
2021-01-21 - 云开发微信支付回调函数报错(user code exception caught)?
错误信息 返回结果 {"errorCode":1,"errorMessage":"user code exception caught","stackTrace":"ReferenceError: enent is not defined\n at Runtime.exports.main [as handler] (/var/user/index.js:16:21)\n at Runtime.handleOnce (/var/runtime/node10/Runtime.engine.js:214:23)\n at Timeout.setTimeout [as _onTimeout] (/var/runtime/node10/Runtime.engine.js:54:12)\n at ontimeout (timers.js:436:11)\n at tryOnTimeout (timers.js:300:5)\n at listOnTimeout (timers.js:263:5)\n at Timer.processTimers (timers.js:223:10)","statusCode":430} ERROR RequestId:024fa213-5ac4-11eb-8d8d-52540036d55c Result:{"errorCode":1,"errorMessage":"user code exception caught","stackTrace":"ReferenceError: enent is not defined\n at Runtime.exports.main [as handler] (/var/user/index.js:16:21)\n at Runtime.handleOnce (/var/runtime/node10/Runtime.engine.js:214:23)\n at Timeout.setTimeout [as _onTimeout] (/var/runtime/node10/Runtime.engine.js:54:12)\n at ontimeout (timers.js:436:11)\n at tryOnTimeout (timers.js:300:5)\n at listOnTimeout (timers.js:263:5)\n at Timer.processTimers (timers.js:223:10)","statusCode":430} END RequestId:024fa213-5ac4-11eb-8d8d-52540036d55c Report RequestId:024fa213-5ac4-11eb-8d8d-52540036d55c Duration:6ms Memory:256MB MemUsage:26.394531MB 回调函数 exports.main = async (event, context) => { const wxContext = cloud.getWXContext() const db = cloud.database() console.log('支付回调:', event) const orderId = event.outTradeNo const subMchId = event.subMchId const returnCode = event.returnCode const orderType = enent.attach if (returnCode == 'SUCCESS') { if (orderType == 'Vip') { const result = await db.collection('VipOrder') .where({ _id: orderId }) .update({ data: { outTradeNo: orderId, } }) const res = { errcode: 0, errmsg: '', result: result, } return res } else { const result = await db.collection('SaleOrder') .where({ _id: orderId }) .update({ data: { status: 1, subMchId: subMchId, outTradeNo: orderId, } }) const res = { errcode: 0, errmsg: '', result: result, } return res } } }
2021-01-20 - 云函数突破数据库每次只返回20条数据的限制,上滑刷新?
我的方法成功处理了每次只返回20条数据的限制,但是上滑加载更多的时候,为什么加载出来的数据是重复第一次的,而不是新数据啊? 云函数 async function getGoods() { const MAX_LIMIT = 100 const countResult = await db.collection('Goods').count() const total = countResult.total const batchTimes = Math.ceil(total / 100) const list = [] for (let i = 0; i < batchTimes; i++) { const promise = db.collection('Goods').aggregate() .lookup({ from: 'User', localField: 'adminId', foreignField: '_id', as: 'adminInfo', }) .skip(i * MAX_LIMIT).limit(MAX_LIMIT).end() list.push(promise) } return ( await Promise.all(list)).reduce((acc, cur) => ({ data: acc.data.concat(cur.data), errMsg: acc.errMsg, })) } index.js _fecthGoods: function () { wx.cloud.callFunction({ name: 'goodsMgt', data: { req_type: 'Selection' } }).then(res => { console.log(res) let goodsList = res.result.list this.setData({ goodsList: goodsList }) wx.lin.renderWaterFlow(goodsList);//瀑布流组件 console.log("商品列表:", this.data.goodsList) }) }, onReachBottom: function () { this._fecthGoods() wx.stopPullDownRefresh({ success: (res) => { console.log(res) }, }) },
2021-01-17 - 如何重置场景值?
分享小程序到指定群时的场景值(1044),在群聊里打开小程序,并点击返回按钮(自定义的导航返回)wx.reLaunch到首页,此时的场景值还是1044,请问如何重置场景值?
2021-01-13 - 开放社区,下滑刷新,能不能改成分页浏览?
拉到下面想点客服中心都点不了。 [图片]
2020-12-30 - 小程序认证需要固定电话?
请问,现在企业认证小程序一定要固定电话吗? 一开始说是要企业税务官网截图,现在又说不行,这是微信官方的规定还是审核公司(世纪恒通科技股份有限公司”)的规定啊。 现在哪还有固定电话用啊。 [图片][图片][图片]
2020-12-30