小程序
小游戏
企业微信
微信支付
扫描小程序码分享
微信版本号: 8.0.45
复现情况: 在新版本的iOS微信上正式版、体验版均可以复现,同时在体验版本下,无法打开vConsole。
AppId: wx17f0be6e9154a23f
日志上传时间点: 2024年1月3日 11:00-24:00
微信号: xslai9512
---
其他: 使用iOS微信8.0.18版本,可以正常打开。同时,使用开发者工具,推送最新版本的基础库,也能正常打开。
1 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
已解决。这段代码在iOS端执行的时候,有些字符可能无法识别导致的问题。
decodeHtml(str) {
if (typeof str != "string") {
return str;
}
if (str == null || str.length == 0) return "";
str = str.replace(/ /g, ' ');
str = str.replace(/¡/g, '¡');
str = str.replace(/¢/g, '¢');
str = str.replace(/£/g, '£');
str = str.replace(/¤/g, '¤');
str = str.replace(/¥/g, '¥');
str = str.replace(/¦/g, '¦');
str = str.replace(/§/g, '§');
str = str.replace(/¨/g, '¨');
str = str.replace(/©/g, '©');
str = str.replace(/ª/g, 'ª');
str = str.replace(/«/g, '«');
str = str.replace(/¬/g, '¬');
str = str.replace(/­/g, '');
str = str.replace(/®/g, '®');
str = str.replace(/¯/g, '¯');
str = str.replace(/°/g, '°');
str = str.replace(/±/g, '±');
str = str.replace(/²/g, '²');
str = str.replace(/³/g, '³');
str = str.replace(/´/g, '´');
str = str.replace(/µ/g, 'µ');
str = str.replace(/¶/g, '¶');
str = str.replace(/·/g, '·');
str = str.replace(/¸/g, '¸');
str = str.replace(/¹/g, '¹');
str = str.replace(/º/g, 'º');
str = str.replace(/»/g, '»');
str = str.replace(/¼/g, '¼');
str = str.replace(/½/g, '½');
str = str.replace(/¾/g, '¾');
str = str.replace(/¿/g, '¿');
str = str.replace(/À/g, 'À');
str = str.replace(/Á/g, 'Á');
str = str.replace(/Â/g, 'Â');
str = str.replace(/Ã/g, 'Ã');
str = str.replace(/Ä/g, 'Ä');
str = str.replace(/Å/g, 'Å');
str = str.replace(/Æ/g, 'Æ');
str = str.replace(/Ç/g, 'Ç');
str = str.replace(/È/g, 'È');
str = str.replace(/É/g, 'É');
str = str.replace(/Ê/g, 'Ê');
str = str.replace(/Ë/g, 'Ë');
str = str.replace(/Ì/g, 'Ì');
str = str.replace(/Í/g, 'Í');
str = str.replace(/Î/g, 'Î');
str = str.replace(/Ï/g, 'Ï');
str = str.replace(/Ð/g, 'Ð');
str = str.replace(/Ñ/g, 'Ñ');
str = str.replace(/Ò/g, 'Ò');
str = str.replace(/Ó/g, 'Ó');
str = str.replace(/Ô/g, 'Ô');
str = str.replace(/Õ/g, 'Õ');
str = str.replace(/Ö/g, 'Ö');
str = str.replace(/×/g, '×');
str = str.replace(/Ø/g, 'Ø');
str = str.replace(/Ù/g, 'Ù');
str = str.replace(/Ú/g, 'Ú');
str = str.replace(/Û/g, 'Û');
str = str.replace(/Ü/g, 'Ü');
str = str.replace(/Ý/g, 'Ý');
str = str.replace(/Þ/g, 'Þ');
str = str.replace(/ß/g, 'ß');
str = str.replace(/à/g, 'à');
str = str.replace(/á/g, 'á');
str = str.replace(/â/g, 'â');
str = str.replace(/ã/g, 'ã');
str = str.replace(/ä/g, 'ä');
str = str.replace(/å/g, 'å');
str = str.replace(/æ/g, 'æ');
str = str.replace(/ç/g, 'ç');
str = str.replace(/è/g, 'è');
str = str.replace(/é/g, 'é');
str = str.replace(/ê/g, 'ê');
str = str.replace(/ë/g, 'ë');
str = str.replace(/ì/g, 'ì');
str = str.replace(/í/g, 'í');
str = str.replace(/î/g, 'î');
str = str.replace(/ï/g, 'ï');
str = str.replace(/ð/g, 'ð');
str = str.replace(/ñ/g, 'ñ');
str = str.replace(/ò/g, 'ò');
str = str.replace(/ó/g, 'ó');
str = str.replace(/ô/g, 'ô');
str = str.replace(/õ/g, 'õ');
str = str.replace(/ö/g, 'ö');
str = str.replace(/÷/g, '÷');
str = str.replace(/ø/g, 'ø');
str = str.replace(/ù/g, 'ù');
str = str.replace(/ú/g, 'ú');
str = str.replace(/û/g, 'û');
str = str.replace(/ü/g, 'ü');
str = str.replace(/ý/g, 'ý');
str = str.replace(/þ/g, 'þ');
str = str.replace(/ÿ/g, 'ÿ');
str = str.replace(/ƒ/g, 'ƒ');
str = str.replace(/Α/g, 'Α');
str = str.replace(/Β/g, 'Β');
str = str.replace(/Γ/g, 'Γ');
str = str.replace(/Δ/g, 'Δ');
str = str.replace(/Ε/g, 'Ε');
str = str.replace(/Ζ/g, 'Ζ');
str = str.replace(/Η/g, 'Η');
str = str.replace(/Θ/g, 'Θ');
str = str.replace(/Ι/g, 'Ι');
str = str.replace(/Κ/g, 'Κ');
str = str.replace(/Λ/g, 'Λ');
str = str.replace(/Μ/g, 'Μ');
str = str.replace(/Ν/g, 'Ν');
str = str.replace(/Ξ/g, 'Ξ');
str = str.replace(/Ο/g, 'Ο');
str = str.replace(/Π/g, 'Π');
str = str.replace(/Ρ/g, 'Ρ');
str = str.replace(/Σ/g, 'Σ');
str = str.replace(/Τ/g, 'Τ');
str = str.replace(/Υ/g, 'Υ');
str = str.replace(/Φ/g, 'Φ');
str = str.replace(/Χ/g, 'Χ');
str = str.replace(/Ψ/g, 'Ψ');
str = str.replace(/Ω/g, 'Ω');
str = str.replace(/α/g, 'α');
str = str.replace(/β/g, 'β');
str = str.replace(/γ/g, 'γ');
str = str.replace(/δ/g, 'δ');
str = str.replace(/ε/g, 'ε');
str = str.replace(/ζ/g, 'ζ');
str = str.replace(/η/g, 'η');
str = str.replace(/θ/g, 'θ');
str = str.replace(/ι/g, 'ι');
str = str.replace(/κ/g, 'κ');
str = str.replace(/λ/g, 'λ');
str = str.replace(/μ/g, 'μ');
str = str.replace(/ν/g, 'ν');
str = str.replace(/ξ/g, 'ξ');
str = str.replace(/ο/g, 'ο');
str = str.replace(/π/g, 'π');
str = str.replace(/ρ/g, 'ρ');
str = str.replace(/ς/g, 'ς');
str = str.replace(/σ/g, 'σ');
str = str.replace(/τ/g, 'τ');
str = str.replace(/υ/g, 'υ');
str = str.replace(/φ/g, 'φ');
str = str.replace(/χ/g, 'χ');
str = str.replace(/ψ/g, 'ψ');
str = str.replace(/ω/g, 'ω');
str = str.replace(/ϑ/g, 'ϑ');
str = str.replace(/ϒ/g, 'ϒ');
str = str.replace(/ϖ/g, 'ϖ');
str = str.replace(/•/g, '•');
str = str.replace(/…/g, '…');
str = str.replace(/′/g, '′');
str = str.replace(/″/g, '″');
str = str.replace(/‾/g, '‾');
str = str.replace(/⁄/g, '⁄');
str = str.replace(/℘/g, '℘');
str = str.replace(/ℑ/g, 'ℑ');
str = str.replace(/ℜ/g, 'ℜ');
str = str.replace(/™/g, '™');
str = str.replace(/ℵ/g, 'ℵ');
str = str.replace(/←/g, '←');
str = str.replace(/↑/g, '↑');
str = str.replace(/→/g, '→');
str = str.replace(/↓/g, '↓');
str = str.replace(/↔/g, '↔');
str = str.replace(/↵/g, '↵');
str = str.replace(/⇐/g, '⇐');
str = str.replace(/⇑/g, '⇑');
str = str.replace(/⇒/g, '⇒');
str = str.replace(/⇓/g, '⇓');
str = str.replace(/⇔/g, '⇔');
str = str.replace(/∀/g, '∀');
str = str.replace(/∂/g, '∂');
str = str.replace(/∃/g, '∃');
str = str.replace(/∅/g, '∅');
str = str.replace(/∇/g, '∇');
str = str.replace(/∈/g, '∈');
str = str.replace(/∉/g, '∉');
str = str.replace(/∋/g, '∋');
str = str.replace(/∏/g, '∏');
str = str.replace(/∑/g, '∑');
str = str.replace(/−/g, '−');
str = str.replace(/∗/g, '∗');
str = str.replace(/√/g, '√');
str = str.replace(/∝/g, '∝');
str = str.replace(/∞/g, '∞');
str = str.replace(/∠/g, '∠');
str = str.replace(/∧/g, '∧');
str = str.replace(/∨/g, '∨');
str = str.replace(/∩/g, '∩');
str = str.replace(/∪/g, '∪');
str = str.replace(/∫/g, '∫');
str = str.replace(/∴/g, '∴');
str = str.replace(/∼/g, '∼');
str = str.replace(/≅/g, '≅');
str = str.replace(/≈/g, '≈');
str = str.replace(/≠/g, '≠');
str = str.replace(/≡/g, '≡');
str = str.replace(/≤/g, '≤');
str = str.replace(/≥/g, '≥');
str = str.replace(/⊂/g, '⊂');
str = str.replace(/⊃/g, '⊃');
str = str.replace(/⊄/g, '⊄');
str = str.replace(/⊆/g, '⊆');
str = str.replace(/⊇/g, '⊇');
str = str.replace(/⊕/g, '⊕');
str = str.replace(/⊗/g, '⊗');
str = str.replace(/⊥/g, '⊥');
str = str.replace(/⋅/g, '⋅');
str = str.replace(/⌈/g, '⌈');
str = str.replace(/⌉/g, '⌉');
str = str.replace(/⌊/g, '⌊');
str = str.replace(/⌋/g, '⌋');
str = str.replace(/⟨/g, '〈');
str = str.replace(/⟩/g, '〉');
str = str.replace(/◊/g, '◊');
str = str.replace(/♠/g, '♠');
str = str.replace(/♣/g, '♣');
str = str.replace(/♥/g, '♥');
str = str.replace(/♦/g, '♦');
str = str.replace(/Œ/g, 'Œ');
str = str.replace(/œ/g, 'œ');
str = str.replace(/Š/g, 'Š');
str = str.replace(/š/g, 'š');
str = str.replace(/Ÿ/g, 'Ÿ');
str = str.replace(/ˆ/g, 'ˆ');
str = str.replace(/˜/g, '˜');
str = str.replace(/ /g, ' ');
str = str.replace(/ /g, ' ');
str = str.replace(/ /g, ' ');
str = str.replace(/‌/g, '');
str = str.replace(/‍/g, '');
str = str.replace(/‎/g, '');
str = str.replace(/‏/g, '');
str = str.replace(/–/g, '–');
str = str.replace(/—/g, '—');
str = str.replace(/‘/g, '‘');
str = str.replace(/’/g, '’');
str = str.replace(/‚/g, '‚');
str = str.replace(/“/g, '“');
str = str.replace(/”/g, '”');
str = str.replace(/„/g, '„');
str = str.replace(/†/g, '†');
str = str.replace(/‡/g, '‡');
str = str.replace(/‰/g, '‰');
str = str.replace(/‹/g, '‹');
str = str.replace(/›/g, '›');
str = str.replace(/€/g, '€');
str = str.replace(/"/g, '"');
str = str.replace(/</g, '<');
str = str.replace(/>/g, '>');
str = str.replace(/'/g, '\'');
str = str.replace(/'/g, '\'');
str = str.replace(/&/g, '&');
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
已解决。这段代码在iOS端执行的时候,有些字符可能无法识别导致的问题。
decodeHtml(str) {
if (typeof str != "string") {
return str;
}
if (str == null || str.length == 0) return "";
str = str.replace(/ /g, ' ');
str = str.replace(/¡/g, '¡');
str = str.replace(/¢/g, '¢');
str = str.replace(/£/g, '£');
str = str.replace(/¤/g, '¤');
str = str.replace(/¥/g, '¥');
str = str.replace(/¦/g, '¦');
str = str.replace(/§/g, '§');
str = str.replace(/¨/g, '¨');
str = str.replace(/©/g, '©');
str = str.replace(/ª/g, 'ª');
str = str.replace(/«/g, '«');
str = str.replace(/¬/g, '¬');
str = str.replace(/­/g, '');
str = str.replace(/®/g, '®');
str = str.replace(/¯/g, '¯');
str = str.replace(/°/g, '°');
str = str.replace(/±/g, '±');
str = str.replace(/²/g, '²');
str = str.replace(/³/g, '³');
str = str.replace(/´/g, '´');
str = str.replace(/µ/g, 'µ');
str = str.replace(/¶/g, '¶');
str = str.replace(/·/g, '·');
str = str.replace(/¸/g, '¸');
str = str.replace(/¹/g, '¹');
str = str.replace(/º/g, 'º');
str = str.replace(/»/g, '»');
str = str.replace(/¼/g, '¼');
str = str.replace(/½/g, '½');
str = str.replace(/¾/g, '¾');
str = str.replace(/¿/g, '¿');
str = str.replace(/À/g, 'À');
str = str.replace(/Á/g, 'Á');
str = str.replace(/Â/g, 'Â');
str = str.replace(/Ã/g, 'Ã');
str = str.replace(/Ä/g, 'Ä');
str = str.replace(/Å/g, 'Å');
str = str.replace(/Æ/g, 'Æ');
str = str.replace(/Ç/g, 'Ç');
str = str.replace(/È/g, 'È');
str = str.replace(/É/g, 'É');
str = str.replace(/Ê/g, 'Ê');
str = str.replace(/Ë/g, 'Ë');
str = str.replace(/Ì/g, 'Ì');
str = str.replace(/Í/g, 'Í');
str = str.replace(/Î/g, 'Î');
str = str.replace(/Ï/g, 'Ï');
str = str.replace(/Ð/g, 'Ð');
str = str.replace(/Ñ/g, 'Ñ');
str = str.replace(/Ò/g, 'Ò');
str = str.replace(/Ó/g, 'Ó');
str = str.replace(/Ô/g, 'Ô');
str = str.replace(/Õ/g, 'Õ');
str = str.replace(/Ö/g, 'Ö');
str = str.replace(/×/g, '×');
str = str.replace(/Ø/g, 'Ø');
str = str.replace(/Ù/g, 'Ù');
str = str.replace(/Ú/g, 'Ú');
str = str.replace(/Û/g, 'Û');
str = str.replace(/Ü/g, 'Ü');
str = str.replace(/Ý/g, 'Ý');
str = str.replace(/Þ/g, 'Þ');
str = str.replace(/ß/g, 'ß');
str = str.replace(/à/g, 'à');
str = str.replace(/á/g, 'á');
str = str.replace(/â/g, 'â');
str = str.replace(/ã/g, 'ã');
str = str.replace(/ä/g, 'ä');
str = str.replace(/å/g, 'å');
str = str.replace(/æ/g, 'æ');
str = str.replace(/ç/g, 'ç');
str = str.replace(/è/g, 'è');
str = str.replace(/é/g, 'é');
str = str.replace(/ê/g, 'ê');
str = str.replace(/ë/g, 'ë');
str = str.replace(/ì/g, 'ì');
str = str.replace(/í/g, 'í');
str = str.replace(/î/g, 'î');
str = str.replace(/ï/g, 'ï');
str = str.replace(/ð/g, 'ð');
str = str.replace(/ñ/g, 'ñ');
str = str.replace(/ò/g, 'ò');
str = str.replace(/ó/g, 'ó');
str = str.replace(/ô/g, 'ô');
str = str.replace(/õ/g, 'õ');
str = str.replace(/ö/g, 'ö');
str = str.replace(/÷/g, '÷');
str = str.replace(/ø/g, 'ø');
str = str.replace(/ù/g, 'ù');
str = str.replace(/ú/g, 'ú');
str = str.replace(/û/g, 'û');
str = str.replace(/ü/g, 'ü');
str = str.replace(/ý/g, 'ý');
str = str.replace(/þ/g, 'þ');
str = str.replace(/ÿ/g, 'ÿ');
str = str.replace(/ƒ/g, 'ƒ');
str = str.replace(/Α/g, 'Α');
str = str.replace(/Β/g, 'Β');
str = str.replace(/Γ/g, 'Γ');
str = str.replace(/Δ/g, 'Δ');
str = str.replace(/Ε/g, 'Ε');
str = str.replace(/Ζ/g, 'Ζ');
str = str.replace(/Η/g, 'Η');
str = str.replace(/Θ/g, 'Θ');
str = str.replace(/Ι/g, 'Ι');
str = str.replace(/Κ/g, 'Κ');
str = str.replace(/Λ/g, 'Λ');
str = str.replace(/Μ/g, 'Μ');
str = str.replace(/Ν/g, 'Ν');
str = str.replace(/Ξ/g, 'Ξ');
str = str.replace(/Ο/g, 'Ο');
str = str.replace(/Π/g, 'Π');
str = str.replace(/Ρ/g, 'Ρ');
str = str.replace(/Σ/g, 'Σ');
str = str.replace(/Τ/g, 'Τ');
str = str.replace(/Υ/g, 'Υ');
str = str.replace(/Φ/g, 'Φ');
str = str.replace(/Χ/g, 'Χ');
str = str.replace(/Ψ/g, 'Ψ');
str = str.replace(/Ω/g, 'Ω');
str = str.replace(/α/g, 'α');
str = str.replace(/β/g, 'β');
str = str.replace(/γ/g, 'γ');
str = str.replace(/δ/g, 'δ');
str = str.replace(/ε/g, 'ε');
str = str.replace(/ζ/g, 'ζ');
str = str.replace(/η/g, 'η');
str = str.replace(/θ/g, 'θ');
str = str.replace(/ι/g, 'ι');
str = str.replace(/κ/g, 'κ');
str = str.replace(/λ/g, 'λ');
str = str.replace(/μ/g, 'μ');
str = str.replace(/ν/g, 'ν');
str = str.replace(/ξ/g, 'ξ');
str = str.replace(/ο/g, 'ο');
str = str.replace(/π/g, 'π');
str = str.replace(/ρ/g, 'ρ');
str = str.replace(/ς/g, 'ς');
str = str.replace(/σ/g, 'σ');
str = str.replace(/τ/g, 'τ');
str = str.replace(/υ/g, 'υ');
str = str.replace(/φ/g, 'φ');
str = str.replace(/χ/g, 'χ');
str = str.replace(/ψ/g, 'ψ');
str = str.replace(/ω/g, 'ω');
str = str.replace(/ϑ/g, 'ϑ');
str = str.replace(/ϒ/g, 'ϒ');
str = str.replace(/ϖ/g, 'ϖ');
str = str.replace(/•/g, '•');
str = str.replace(/…/g, '…');
str = str.replace(/′/g, '′');
str = str.replace(/″/g, '″');
str = str.replace(/‾/g, '‾');
str = str.replace(/⁄/g, '⁄');
str = str.replace(/℘/g, '℘');
str = str.replace(/ℑ/g, 'ℑ');
str = str.replace(/ℜ/g, 'ℜ');
str = str.replace(/™/g, '™');
str = str.replace(/ℵ/g, 'ℵ');
str = str.replace(/←/g, '←');
str = str.replace(/↑/g, '↑');
str = str.replace(/→/g, '→');
str = str.replace(/↓/g, '↓');
str = str.replace(/↔/g, '↔');
str = str.replace(/↵/g, '↵');
str = str.replace(/⇐/g, '⇐');
str = str.replace(/⇑/g, '⇑');
str = str.replace(/⇒/g, '⇒');
str = str.replace(/⇓/g, '⇓');
str = str.replace(/⇔/g, '⇔');
str = str.replace(/∀/g, '∀');
str = str.replace(/∂/g, '∂');
str = str.replace(/∃/g, '∃');
str = str.replace(/∅/g, '∅');
str = str.replace(/∇/g, '∇');
str = str.replace(/∈/g, '∈');
str = str.replace(/∉/g, '∉');
str = str.replace(/∋/g, '∋');
str = str.replace(/∏/g, '∏');
str = str.replace(/∑/g, '∑');
str = str.replace(/−/g, '−');
str = str.replace(/∗/g, '∗');
str = str.replace(/√/g, '√');
str = str.replace(/∝/g, '∝');
str = str.replace(/∞/g, '∞');
str = str.replace(/∠/g, '∠');
str = str.replace(/∧/g, '∧');
str = str.replace(/∨/g, '∨');
str = str.replace(/∩/g, '∩');
str = str.replace(/∪/g, '∪');
str = str.replace(/∫/g, '∫');
str = str.replace(/∴/g, '∴');
str = str.replace(/∼/g, '∼');
str = str.replace(/≅/g, '≅');
str = str.replace(/≈/g, '≈');
str = str.replace(/≠/g, '≠');
str = str.replace(/≡/g, '≡');
str = str.replace(/≤/g, '≤');
str = str.replace(/≥/g, '≥');
str = str.replace(/⊂/g, '⊂');
str = str.replace(/⊃/g, '⊃');
str = str.replace(/⊄/g, '⊄');
str = str.replace(/⊆/g, '⊆');
str = str.replace(/⊇/g, '⊇');
str = str.replace(/⊕/g, '⊕');
str = str.replace(/⊗/g, '⊗');
str = str.replace(/⊥/g, '⊥');
str = str.replace(/⋅/g, '⋅');
str = str.replace(/⌈/g, '⌈');
str = str.replace(/⌉/g, '⌉');
str = str.replace(/⌊/g, '⌊');
str = str.replace(/⌋/g, '⌋');
str = str.replace(/⟨/g, '〈');
str = str.replace(/⟩/g, '〉');
str = str.replace(/◊/g, '◊');
str = str.replace(/♠/g, '♠');
str = str.replace(/♣/g, '♣');
str = str.replace(/♥/g, '♥');
str = str.replace(/♦/g, '♦');
str = str.replace(/Œ/g, 'Œ');
str = str.replace(/œ/g, 'œ');
str = str.replace(/Š/g, 'Š');
str = str.replace(/š/g, 'š');
str = str.replace(/Ÿ/g, 'Ÿ');
str = str.replace(/ˆ/g, 'ˆ');
str = str.replace(/˜/g, '˜');
str = str.replace(/ /g, ' ');
str = str.replace(/ /g, ' ');
str = str.replace(/ /g, ' ');
str = str.replace(/‌/g, '');
str = str.replace(/‍/g, '');
str = str.replace(/‎/g, '');
str = str.replace(/‏/g, '');
str = str.replace(/–/g, '–');
str = str.replace(/—/g, '—');
str = str.replace(/‘/g, '‘');
str = str.replace(/’/g, '’');
str = str.replace(/‚/g, '‚');
str = str.replace(/“/g, '“');
str = str.replace(/”/g, '”');
str = str.replace(/„/g, '„');
str = str.replace(/†/g, '†');
str = str.replace(/‡/g, '‡');
str = str.replace(/‰/g, '‰');
str = str.replace(/‹/g, '‹');
str = str.replace(/›/g, '›');
str = str.replace(/€/g, '€');
str = str.replace(/"/g, '"');
str = str.replace(/</g, '<');
str = str.replace(/>/g, '>');
str = str.replace(/'/g, '\'');
str = str.replace(/'/g, '\'');
str = str.replace(/&/g, '&');
return str;
}