| | |
| | | }, wait); |
| | | }; |
| | | }; |
| | | |
| | | const getBaseUrl = () => { |
| | | const serveUrl = window.location.origin + window.location.pathname; |
| | | const shareSuffix = window.globalConfig.WebApiUrl.ShareUrl; |
| | | return serveUrl.replace(shareSuffix, ''); |
| | | }; |
| | | const urlParams = getSearchParams(window.location.search); |
| | | const id = urlParams.id; |
| | | |
| | | let pcShareUrl; |
| | | let mobileShareUrl; |
| | | const pcBaseUrl = getBaseUrl(); |
| | | |
| | | if (isTest) { |
| | | pcShareUrl = `https://wi.beng35.com/web/test/#/share?id=${id}`; |
| | | pcShareUrl = `${pcBaseUrl}/#/share?id=${id}`; |
| | | mobileShareUrl = `https://wi.beng35.com/mobile/test/#/share?id=${id}`; |
| | | } else { |
| | | pcShareUrl = `https://wi.beng35.com/#/share?id=${id}`; |
| | | pcShareUrl = `${pcBaseUrl}/#/share?id=${id}`; |
| | | mobileShareUrl = `https://wi.beng35.com/mobile/prod/#/share?id=${id}`; |
| | | } |
| | | window.location.href = isMobile() ? mobileShareUrl : pcShareUrl; |