diff --git a/.env.dev b/.env.dev index 147a552..68d4684 100644 --- a/.env.dev +++ b/.env.dev @@ -5,4 +5,4 @@ VITE_CORP_ID = "4G7H8J2K9L0M1N3P5Q6R7S8T9U" VITE_NEED_LOGIN = "true" VITE_NEED_IM = "true" VITE_NEED_CA = "true" -VITE_STORE_QRCODE_BASE="https://www.youcan365.com/hn/hnhlw?storeId=" \ No newline at end of file +VITE_STORE_QRCODE_BASE="https://www.youcan365.com/hn/hnhlw?type=store&storeId=" \ No newline at end of file diff --git a/public/hnhlw.html b/public/hnhlw.html index 482bc5f..b96d410 100644 --- a/public/hnhlw.html +++ b/public/hnhlw.html @@ -45,10 +45,23 @@ return null; } + function getPageQuery() { + const type = getQueryParam(location.href, 'type') || ''; + if (type === 'ybAuth') { + const id = getQueryParam(location.href, 'id') || '' + return encodeURIComponent(`pages/consult/self-auth/auth-action?id=${id}`); + } else if (type === 'store') { + const storeId = getQueryParam(location.href, 'storeId') || ''; + return encodeURIComponent(`pages/home/home?storeId=${storeId}`); + } + return '' + + } + + window.onload = function () { - const storeId = getQueryParam(location.href, 'storeId') || ''; - const query = encodeURIComponent(`pages/home/home?storeId=${storeId}`); - const scheme = `alipays://platformapi/startapp?appId=2021004129669493&page=${query}`; + const query = getPageQuery() + const scheme = `alipays://platformapi/startapp?appId=2021004129669493${query ? '&page=' : ''}${query}`; const href = `https://ds.alipay.com/?scheme=${encodeURIComponent(scheme)}`; location.href = href; // console.log(href); diff --git a/src/components/rx-paper-drawer/rx-paper-drawer.vue b/src/components/rx-paper-drawer/rx-paper-drawer.vue index 7f2f23b..c0c1482 100644 --- a/src/components/rx-paper-drawer/rx-paper-drawer.vue +++ b/src/components/rx-paper-drawer/rx-paper-drawer.vue @@ -17,7 +17,7 @@