已解决。这段代码在iOS端执行的时候,有些字符可能无法识别导致的问题。 decodeHtml(str) { if (typeof str != "string") { return str; } if (str == null || str.length == 0) return ""; str = str.replace(/&nbsp;/g, ' '); str = str.replace(/&iexcl;/g, '¡'); str = str.replace(/&cent;/g, '¢'); str = str.replace(/&pound;/g, '£'); str = str.replace(/&curren;/g, '¤'); str = str.replace(/&yen;/g, '¥'); str = str.replace(/&brvbar;/g, '¦'); str = str.replace(/&sect;/g, '§'); str = str.replace(/&uml;/g, '¨'); str = str.replace(/&copy;/g, '©'); str = str.replace(/&ordf;/g, 'ª'); str = str.replace(/&laquo;/g, '«'); str = str.replace(/&not;/g, '¬'); str = str.replace(/&shy;/g, ''); str = str.replace(/&reg;/g, '®'); str = str.replace(/&macr;/g, '¯'); str = str.replace(/&deg;/g, '°'); str = str.replace(/&plusmn;/g, '±'); str = str.replace(/&sup2;/g, '²'); str = str.replace(/&sup3;/g, '³'); str = str.replace(/&acute;/g, '´'); str = str.replace(/&micro;/g, 'µ'); str = str.replace(/&para;/g, '¶'); str = str.replace(/&middot;/g, '·'); str = str.replace(/&cedil;/g, '¸'); str = str.replace(/&sup1;/g, '¹'); str = str.replace(/&ordm;/g, 'º'); str = str.replace(/&raquo;/g, '»'); str = str.replace(/&frac14;/g, '¼'); str = str.replace(/&frac12;/g, '½'); str = str.replace(/&frac34;/g, '¾'); str = str.replace(/&iquest;/g, '¿'); str = str.replace(/&Agrave;/g, 'À'); str = str.replace(/&Aacute;/g, 'Á'); str = str.replace(/&Acirc;/g, 'Â'); str = str.replace(/&Atilde;/g, 'Ã'); str = str.replace(/&Auml;/g, 'Ä'); str = str.replace(/&Aring;/g, 'Å'); str = str.replace(/&AElig;/g, 'Æ'); str = str.replace(/&Ccedil;/g, 'Ç'); str = str.replace(/&Egrave;/g, 'È'); str = str.replace(/&Eacute;/g, 'É'); str = str.replace(/&Ecirc;/g, 'Ê'); str = str.replace(/&Euml;/g, 'Ë'); str = str.replace(/&Igrave;/g, 'Ì'); str = str.replace(/&Iacute;/g, 'Í'); str = str.replace(/&Icirc;/g, 'Î'); str = str.replace(/&Iuml;/g, 'Ï'); str = str.replace(/&ETH;/g, 'Ð'); str = str.replace(/&Ntilde;/g, 'Ñ'); str = str.replace(/&Ograve;/g, 'Ò'); str = str.replace(/&Oacute;/g, 'Ó'); str = str.replace(/&Ocirc;/g, 'Ô'); str = str.replace(/&Otilde;/g, 'Õ'); str = str.replace(/&Ouml;/g, 'Ö'); str = str.replace(/&times;/g, '×'); str = str.replace(/&Oslash;/g, 'Ø'); str = str.replace(/&Ugrave;/g, 'Ù'); str = str.replace(/&Uacute;/g, 'Ú'); str = str.replace(/&Ucirc;/g, 'Û'); str = str.replace(/&Uuml;/g, 'Ü'); str = str.replace(/&Yacute;/g, 'Ý'); str = str.replace(/&THORN;/g, 'Þ'); str = str.replace(/&szlig;/g, 'ß'); str = str.replace(/&agrave;/g, 'à'); str = str.replace(/&aacute;/g, 'á'); str = str.replace(/&acirc;/g, 'â'); str = str.replace(/&atilde;/g, 'ã'); str = str.replace(/&auml;/g, 'ä'); str = str.replace(/&aring;/g, 'å'); str = str.replace(/&aelig;/g, 'æ'); str = str.replace(/&ccedil;/g, 'ç'); str = str.replace(/&egrave;/g, 'è'); str = str.replace(/&eacute;/g, 'é'); str = str.replace(/&ecirc;/g, 'ê'); str = str.replace(/&euml;/g, 'ë'); str = str.replace(/&igrave;/g, 'ì'); str = str.replace(/&iacute;/g, 'í'); str = str.replace(/&icirc;/g, 'î'); str = str.replace(/&iuml;/g, 'ï'); str = str.replace(/&eth;/g, 'ð'); str = str.replace(/&ntilde;/g, 'ñ'); str = str.replace(/&ograve;/g, 'ò'); str = str.replace(/&oacute;/g, 'ó'); str = str.replace(/&ocirc;/g, 'ô'); str = str.replace(/&otilde;/g, 'õ'); str = str.replace(/&ouml;/g, 'ö'); str = str.replace(/&divide;/g, '÷'); str = str.replace(/&oslash;/g, 'ø'); str = str.replace(/&ugrave;/g, 'ù'); str = str.replace(/&uacute;/g, 'ú'); str = str.replace(/&ucirc;/g, 'û'); str = str.replace(/&uuml;/g, 'ü'); str = str.replace(/&yacute;/g, 'ý'); str = str.replace(/&thorn;/g, 'þ'); str = str.replace(/&yuml;/g, 'ÿ'); str = str.replace(/&fnof;/g, 'ƒ'); str = str.replace(/&Alpha;/g, 'Α'); str = str.replace(/&Beta;/g, 'Β'); str = str.replace(/&Gamma;/g, 'Γ'); str = str.replace(/&Delta;/g, 'Δ'); str = str.replace(/&Epsilon;/g, 'Ε'); str = str.replace(/&Zeta;/g, 'Ζ'); str = str.replace(/&Eta;/g, 'Η'); str = str.replace(/&Theta;/g, 'Θ'); str = str.replace(/&Iota;/g, 'Ι'); str = str.replace(/&Kappa;/g, 'Κ'); str = str.replace(/&Lambda;/g, 'Λ'); str = str.replace(/&Mu;/g, 'Μ'); str = str.replace(/&Nu;/g, 'Ν'); str = str.replace(/&Xi;/g, 'Ξ'); str = str.replace(/&Omicron;/g, 'Ο'); str = str.replace(/&Pi;/g, 'Π'); str = str.replace(/&Rho;/g, 'Ρ'); str = str.replace(/&Sigma;/g, 'Σ'); str = str.replace(/&Tau;/g, 'Τ'); str = str.replace(/&Upsilon;/g, 'Υ'); str = str.replace(/&Phi;/g, 'Φ'); str = str.replace(/&Chi;/g, 'Χ'); str = str.replace(/&Psi;/g, 'Ψ'); str = str.replace(/&Omega;/g, 'Ω'); str = str.replace(/&alpha;/g, 'α'); str = str.replace(/&beta;/g, 'β'); str = str.replace(/&gamma;/g, 'γ'); str = str.replace(/&delta;/g, 'δ'); str = str.replace(/&epsilon;/g, 'ε'); str = str.replace(/&zeta;/g, 'ζ'); str = str.replace(/&eta;/g, 'η'); str = str.replace(/&theta;/g, 'θ'); str = str.replace(/&iota;/g, 'ι'); str = str.replace(/&kappa;/g, 'κ'); str = str.replace(/&lambda;/g, 'λ'); str = str.replace(/&mu;/g, 'μ'); str = str.replace(/&nu;/g, 'ν'); str = str.replace(/&xi;/g, 'ξ'); str = str.replace(/&omicron;/g, 'ο'); str = str.replace(/&pi;/g, 'π'); str = str.replace(/&rho;/g, 'ρ'); str = str.replace(/&sigmaf;/g, 'ς'); str = str.replace(/&sigma;/g, 'σ'); str = str.replace(/&tau;/g, 'τ'); str = str.replace(/&upsilon;/g, 'υ'); str = str.replace(/&phi;/g, 'φ'); str = str.replace(/&chi;/g, 'χ'); str = str.replace(/&psi;/g, 'ψ'); str = str.replace(/&omega;/g, 'ω'); str = str.replace(/&thetasym;/g, 'ϑ'); str = str.replace(/&upsih;/g, 'ϒ'); str = str.replace(/&piv;/g, 'ϖ'); str = str.replace(/&bull;/g, '•'); str = str.replace(/&hellip;/g, '…'); str = str.replace(/&prime;/g, '′'); str = str.replace(/&Prime;/g, '″'); str = str.replace(/&oline;/g, '‾'); str = str.replace(/&frasl;/g, '⁄'); str = str.replace(/&weierp;/g, '℘'); str = str.replace(/&image;/g, 'ℑ'); str = str.replace(/&real;/g, 'ℜ'); str = str.replace(/&trade;/g, '™'); str = str.replace(/&alefsym;/g, 'ℵ'); str = str.replace(/&larr;/g, '←'); str = str.replace(/&uarr;/g, '↑'); str = str.replace(/&rarr;/g, '→'); str = str.replace(/&darr;/g, '↓'); str = str.replace(/&harr;/g, '↔'); str = str.replace(/&crarr;/g, '↵'); str = str.replace(/&lArr;/g, '⇐'); str = str.replace(/&uArr;/g, '⇑'); str = str.replace(/&rArr;/g, '⇒'); str = str.replace(/&dArr;/g, '⇓'); str = str.replace(/&hArr;/g, '⇔'); str = str.replace(/&forall;/g, '∀'); str = str.replace(/&part;/g, '∂'); str = str.replace(/&exist;/g, '∃'); str = str.replace(/&empty;/g, '∅'); str = str.replace(/&nabla;/g, '∇'); str = str.replace(/&isin;/g, '∈'); str = str.replace(/&notin;/g, '∉'); str = str.replace(/&ni;/g, '∋'); str = str.replace(/&prod;/g, '∏'); str = str.replace(/&sum;/g, '∑'); str = str.replace(/&minus;/g, '−'); str = str.replace(/&lowast;/g, '∗'); str = str.replace(/&radic;/g, '√'); str = str.replace(/&prop;/g, '∝'); str = str.replace(/&infin;/g, '∞'); str = str.replace(/&ang;/g, '∠'); str = str.replace(/&and;/g, '∧'); str = str.replace(/&or;/g, '∨'); str = str.replace(/&cap;/g, '∩'); str = str.replace(/&cup;/g, '∪'); str = str.replace(/&int;/g, '∫'); str = str.replace(/&there4;/g, '∴'); str = str.replace(/&sim;/g, '∼'); str = str.replace(/&cong;/g, '≅'); str = str.replace(/&asymp;/g, '≈'); str = str.replace(/&ne;/g, '≠'); str = str.replace(/&equiv;/g, '≡'); str = str.replace(/&le;/g, '≤'); str = str.replace(/&ge;/g, '≥'); str = str.replace(/&sub;/g, '⊂'); str = str.replace(/&sup;/g, '⊃'); str = str.replace(/&nsub;/g, '⊄'); str = str.replace(/&sube;/g, '⊆'); str = str.replace(/&supe;/g, '⊇'); str = str.replace(/&oplus;/g, '⊕'); str = str.replace(/&otimes;/g, '⊗'); str = str.replace(/&perp;/g, '⊥'); str = str.replace(/&sdot;/g, '⋅'); str = str.replace(/&lceil;/g, '⌈'); str = str.replace(/&rceil;/g, '⌉'); str = str.replace(/&lfloor;/g, '⌊'); str = str.replace(/&rfloor;/g, '⌋'); str = str.replace(/&lang;/g, '〈'); str = str.replace(/&rang;/g, '〉'); str = str.replace(/&loz;/g, '◊'); str = str.replace(/&spades;/g, '♠'); str = str.replace(/&clubs;/g, '♣'); str = str.replace(/&hearts;/g, '♥'); str = str.replace(/&diams;/g, '♦'); str = str.replace(/&OElig;/g, 'Œ'); str = str.replace(/&oelig;/g, 'œ'); str = str.replace(/&Scaron;/g, 'Š'); str = str.replace(/&scaron;/g, 'š'); str = str.replace(/&Yuml;/g, 'Ÿ'); str = str.replace(/&circ;/g, 'ˆ'); str = str.replace(/&tilde;/g, '˜'); str = str.replace(/&ensp;/g, ' '); str = str.replace(/&emsp;/g, ' '); str = str.replace(/&thinsp;/g, ' '); str = str.replace(/&zwnj;/g, ''); str = str.replace(/&zwj;/g, ''); str = str.replace(/&lrm;/g, ''); str = str.replace(/&rlm;/g, ''); str = str.replace(/&ndash;/g, '–'); str = str.replace(/&mdash;/g, '—'); str = str.replace(/&lsquo;/g, '‘'); str = str.replace(/&rsquo;/g, '’'); str = str.replace(/&sbquo;/g, '‚'); str = str.replace(/&ldquo;/g, '“'); str = str.replace(/&rdquo;/g, '”'); str = str.replace(/&bdquo;/g, '„'); str = str.replace(/&dagger;/g, '†'); str = str.replace(/&Dagger;/g, '‡'); str = str.replace(/&permil;/g, '‰'); str = str.replace(/&lsaquo;/g, '‹'); str = str.replace(/&rsaquo;/g, '›'); str = str.replace(/&euro;/g, '€'); str = str.replace(/&quot;/g, '"'); str = str.replace(/&lt;/g, '<'); str = str.replace(/&gt;/g, '>'); str = str.replace(/&apos;/g, '\''); str = str.replace(/&#39;/g, '\''); str = str.replace(/&amp;/g, '&'); return str; }
iOS打开小程序白屏微信版本号: 8.0.45 复现情况: 在新版本的iOS微信上正式版、体验版均可以复现,同时在体验版本下,无法打开vConsole。 AppId: wx17f0be6e9154a23f 日志上传时间点: 2024年1月3日 11:00-24:00 微信号: xslai9512 [图片] --- 其他: 使用iOS微信8.0.18版本,可以正常打开。同时,使用开发者工具,推送最新版本的基础库,也能正常打开。
01-03