Authored by TaoHuang

fix

const getAppPath = () => {
let appPath = document.getElementById('main-wrap').dataset.apppath || 'yohobuy://yohobuy.com/goapp?openby:yohobuy={"action":"go.home","params":{"gender":"1","channel":"2"}}';
let appPath = decodeURI(document.getElementById('main-wrap').dataset.apppath) || 'yohobuy://yohobuy.com/goapp?openby:yohobuy={"action":"go.home","params":{"gender":"1","channel":"2"}}';
return appPath;
};
... ...
... ... @@ -3,7 +3,7 @@
<span class="avatar-block">
<div class="avatar"></div>
</span>
打开有货App
在App中查看
<i class="iconfont mg">&#xe7b0;</i>
</a>
</template>
... ...
... ... @@ -42,7 +42,7 @@ export default {
elem.removeChild(miniElem);
}
elem.addEventListener('click', async function(e) {
elem.addEventListener('click', function(e) {
let target = e.target;
switch (target.className.toLowerCase()) {
... ...
... ... @@ -83,7 +83,7 @@ function getAppPath(req) {
'"params":{"url":"http://m.yohobuy.com' + appPathUrl +
'","param":' + JSON.stringify(req.query) + '}}';
return appPath;
return encodeURI(appPath);
}
const handlerError = (err = {}, req, res, next) => {
... ...
... ... @@ -28,13 +28,14 @@
(function (d) {function vtn(e){var t,a=0,n=e.split(".").map(e=>Number(e));for(t=0;t<3;t++)a+=(n[t]||0)*Math.pow(100,2-t);return a}function gav(e,t){var a=e.match(new RegExp("(^|)app_version=([^"+t+"]*)("+t+"|$)"));return a&&a.length?a[2]:""}var appv=gav(d.cookie,";")||gav(location.href,"&");if(/YohoBuy/i.test(navigator.userAgent||"")&&/\(i[^;]+;( U;)? CPU.+Mac OS X/i.test(navigator.userAgent||"")&&appv&&vtn(appv)>=vtn("6.9.2")){var e=d.documentElement,n=e.clientHeight/e.clientWidth>2.1?"-high":"";d.getElementsByTagName("body")[0].className="immerse-body"+n}})(document);
</script>
{{{html}}}
<div id="degrade-app"></div>
<div id="main-wrap" data-apppath="{{{appPath}}}">
{{#unless download}}
<div id="no-download"></div>
{{/unless}}
</div>
<div id="main-wrap" data-apppath='{{{appPath}}}'>
{{#unless download}}
<div id="no-download"></div>
{{/unless}}
</div>
{{{states}}}
... ...