微信小程序兼容TextDecoder
(function(global) {
/**
* 兼容TextDecoder
*/
if (typeof global.TextDecoder !== 'function') {
function _TextDecoder() {}
_TextDecoder.prototype.decode = function(arrayBuffer) {
// @ts-ignore
return decodeURIComponent(escape(String.fromCharCode.apply(null, new Uint8Array(arrayBuffer))));
};
// @ts-ignore
global.TextDecoder = _TextDecoder;
}
})(this || window || globalThis);
错误600001
描述电脑可以访问,体验版接口报错,排查原因是https协议到期解决

本文介绍了如何在微信小程序中实现TextDecoder的兼容,以及处理遇到的错误600001,特别关注于当电脑访问体验版接口时因https协议过期导致的报错问题及其解决方法。
2222





