优化代码

This commit is contained in:
wuxw 2022-06-17 00:37:42 +08:00
parent 74e5e9ce14
commit 291516c334
2 changed files with 3 additions and 1 deletions

View File

@ -19,6 +19,7 @@ export function decodeUrl(_url){
_url = _url.replace("**", "?"); //已经有?了 _url = _url.replace("**", "?"); //已经有?了
} }
_url = _url.replace("!!", "#"); _url = _url.replace("!!", "#");
_url = _url.replace("$$", "#");
_url = _url.replaceAll("@@", "&"); _url = _url.replaceAll("@@", "&");
_url = _url.replaceAll("**", "&"); //已经有?了 _url = _url.replaceAll("**", "&"); //已经有?了

View File

@ -36,7 +36,7 @@
if (_url.indexOf("http") < 0 && _url.indexOf("https") < 0) { if (_url.indexOf("http") < 0 && _url.indexOf("https") < 0) {
_url = conf.mallUrl + '#' + _url; _url = conf.mallUrl + '#' + _url;
} }
_url = decodeUrl(_url)
if(_url.indexOf("?")>0){ if(_url.indexOf("?")>0){
_url = _url +"&hcCommunityId="+getMallCommunityId(); _url = _url +"&hcCommunityId="+getMallCommunityId();
}else{ }else{
@ -48,6 +48,7 @@
// #ifndef H5 // #ifndef H5
_url = _url +"&mallFrom=HC_APP" _url = _url +"&mallFrom=HC_APP"
// #endif // #endif
this.url = _url; this.url = _url;
}, },
methods: { methods: {