为的是实现简单的打开图片,然后裁剪,返回
关于微信小程序 canvas 2d 的问题,下面这段码,苹果系统可,安卓不行,谁知道问题所在?onClickConfirm() { const { dpr, imageSrc, x, y, initialScale, scale, clipWidth, clipHeight, } = this.data const totalScale = scale * initialScale const sx = -x / totalScale const sy = -y / totalScale const canvasWidth = clipWidth / totalScale const canvasHeight = clipHeight / totalScale this.setData({ canvasWidth, canvasHeight }) const query = wx.createSelectorQuery() query .select('.canvas') .fields({ node: true, size: true }) .exec((res) => { const canvas = res[0].node const context = canvas.getContext('2d') canvas.width = res[0].width * dpr canvas.height = res[0].height * dpr context.scale(dpr, dpr) const canvasImg = canvas.createImage() canvasImg.src = imageSrc canvasImg.onload = () => { context.drawImage( canvasImg, sx, sy, canvasWidth, canvasHeight, 0, 0, canvasWidth, canvasHeight ) wx.canvasToTempFilePath({ fileType: 'jpg', canvas, success: (res) => { // TODO: 这里在实际项目中应该是调用 wx.uploadFile 来上传采集后图片 const app = getApp() app.globalData.avatar = res.tempFilePath var pages = getCurrentPages(); // 获取页面栈 var currPage = pages[pages.length - 1]; // 当前页面 var prevPage = pages[pages.length - 2]; // 上一个页面 var index3=this.data.index3; prevPage.data.fielddata[index3].img_arr=prevPage.data.fielddata[index3].img_arr.concat(res.tempFilePath) prevPage.setData({ fielddata:prevPage.data.fielddata// 假数据 }) wx.navigateBack() }, })} // }) }) },
2021-11-28同样问题
JSAPI调起支付后,输入密码确认支付,重复加载几次微信支付框,最后提示系统繁忙JSAPI调起支付后,输入密码确认支付,重复加载几次微信支付框,最后提示系统繁忙 在微信支付后台中,可以查到待支付的订单
2021-03-26{"code":"PARAM_ERROR","detail":{"location":null,"value":""},"message":"输入源“/appid”映射到字段“公众号ID”必填性规则校验失败,此字段为必填项"},谁能告诉我这个问题怎么解决?
微信支付API v3小程序支付及分账相关接口有v3版本的吗, 还是说就分账的通知是v3规范?
2021-03-25解决了吗,我也碰到同样问题
调用微信支付v3小程序统一下单接口报PARAM_ERROR?{ "code": "PARAM_ERROR", "detail": { "location": "body", "value": "" }, "message": "输入源“/body/appid”映射到字段“公众号ID”必填性规则校验失败,此字段为必填项" } 如何解决呢
2021-03-25解决了吗,我也碰到同样问题了
输入源“/appid”映射到字段“公众号ID”必填性规则校验失败,此字段为必填项?native 统一下单接口,返回{ "code":"PARAM_ERROR", "detail":{ "location":null, "value":"" }, "message":"输入源“/appid”映射到字段“公众号ID”必填性规则校验失败,此字段为必填项" } 请求实体{"amount":{"total":"0.1","currency":"CNY"},"mchid":"1601085035","out_trade_no":"12177525012014_07033233368012","appid":"wxf6be053b7d935422","description":"paytest","attach":"desc","notify_url":"https://ddclfpabxapi.jdcgl.com/wxPayBack"}
2021-03-24