两个字符串完全一样,判断却不相等
console.log("==========================onShow()");
var sectionText = that.data.sectionText;
var sectionText2 = that.data.sectionText2;
console.log(sectionText.constructor); console.log(sectionText2.constructor);
console.log(“that.data.sectionText=” + that.data.sectionText);
console.log(“that.data.sectionText2=” + that.data.sectionText2);
console.log(“that.data.sectionText.length=” + that.data.sectionText.length);
console.log(“that.data.sectionText2.length=” + that.data.sectionText2.length);
console.log(“that.data.sectionText != that.data.sectionText2=” + that.data.sectionText.trim() != that.data.sectionText2.trim());
console.log(“that.data.sectionText == that.data.sectionText2=” + that.data.sectionText == that.data.sectionText2);
console.log(“sectionText != sectionText2=” + sectionText != sectionText2);
console.log(“encodeURIComponent(sectionText)=” + encodeURIComponent(sectionText));
console.log(“encodeURIComponent(sectionText2)=” + encodeURIComponent(sectionText2));
console.log(“encodeURIComponent(sectionText) == encodeURIComponent(sectionText2)=” + encodeURIComponent(sectionText) == encodeURIComponent(sectionText2));
house.js? [sm]:113 ==========================onShow()
house.js? [sm]:116 ƒ String() { [native code] }
house.js? [sm]:116 ƒ String() { [native code] }
house.js? [sm]:117 that.data.sectionText=碧桂园
house.js? [sm]:118 that.data.sectionText2=碧桂园
house.js? [sm]:119 that.data.sectionText.length=3
house.js? [sm]:120 that.data.sectionText2.length=3
house.js? [sm]:121 true
house.js? [sm]:122 false
house.js? [sm]:123 true
house.js? [sm]:124 encodeURIComponent(sectionText)=%E7%A2%A7%E6%A1%82%E5%9B%AD
house.js? [sm]:125 encodeURIComponent(sectionText2)=%E7%A2%A7%E6%A1%82%E5%9B%AD
house.js? [sm]:126 false
house.js? [sm]:130 true