diff --git a/lib/components/extraFile/gallery/index.js b/lib/components/extraFile/gallery/index.js index 14da94912..1a643b27a 100644 --- a/lib/components/extraFile/gallery/index.js +++ b/lib/components/extraFile/gallery/index.js @@ -135,6 +135,10 @@ exports.default = OakComponent({ type: Boolean, value: false, }, + disabled: { // web独有 + type: Boolean, + value: false, + }, type: String, origin: String, tag1: String, diff --git a/lib/context/BackendRuntimeContext.js b/lib/context/BackendRuntimeContext.js index f6c0842e6..5ca814e93 100644 --- a/lib/context/BackendRuntimeContext.js +++ b/lib/context/BackendRuntimeContext.js @@ -51,7 +51,7 @@ var BackendRuntimeContext = /** @class */ (function (_super) { if (!(_g < _e.length)) return [3 /*break*/, 6]; id = _e[_g]; wechatQrCodeData = wechatQrCodeListObj[id]; - if (!(wechatQrCodeData.type === 'wechatMpWxaCode')) return [3 /*break*/, 5]; + if (!(wechatQrCodeData.hasOwnProperty('buffer') && wechatQrCodeData.type === 'wechatMpWxaCode')) return [3 /*break*/, 5]; return [4 /*yield*/, (0, wechatQrCode_1.getMpUnlimitWxaCode)(id, this)]; case 4: buffer = _j.sent(); diff --git a/src/components/extraFile/gallery/index.ts b/src/components/extraFile/gallery/index.ts index 30c0bd4e6..49339f390 100644 --- a/src/components/extraFile/gallery/index.ts +++ b/src/components/extraFile/gallery/index.ts @@ -135,6 +135,10 @@ export default OakComponent({ type: Boolean, value: false, }, + disabled: { // web独有 + type: Boolean, + value: false, + }, type: String, origin: String, tag1: String, @@ -469,7 +473,7 @@ export default OakComponent({ wx.hideLoading(); that.setMessage({ type: 'error', - content: '下载文件失败' + content: '下载文件失败', }); }, complete: function (res) {}, diff --git a/src/context/BackendRuntimeContext.ts b/src/context/BackendRuntimeContext.ts index 71692ed58..41081e9f5 100644 --- a/src/context/BackendRuntimeContext.ts +++ b/src/context/BackendRuntimeContext.ts @@ -32,7 +32,7 @@ export class BackendRuntimeContext extends AsyncContext; - if (wechatQrCodeData.type === 'wechatMpWxaCode') { + if (wechatQrCodeData.hasOwnProperty('buffer') && wechatQrCodeData.type === 'wechatMpWxaCode') { const buffer = await getMpUnlimitWxaCode>( id, this,