From 79930429d825af7620ec963e0e21e7b64a721cfe Mon Sep 17 00:00:00 2001 From: xuwenbo <717567226@qq.com> Date: Mon, 14 Sep 2020 10:11:26 +0800 Subject: [PATCH] =?UTF-8?q?h5=E6=B5=B7=E6=8A=A5=E4=B8=8D=E8=83=BD=E7=94=9F?= =?UTF-8?q?=E6=88=90=E5=88=86=E9=94=80=E5=85=B3=E7=B3=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/Loading/index.vue | 7 +++++-- utils/index.js | 13 ++++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/pages/Loading/index.vue b/pages/Loading/index.vue index 0959adc..43cd7fe 100644 --- a/pages/Loading/index.vue +++ b/pages/Loading/index.vue @@ -18,7 +18,7 @@ import { mapState, mapMutations, mapActions } from "vuex"; import { wxappAuth, getUser } from "@/api/user"; import dayjs from "dayjs"; import cookie from "@/utils/store/cookie"; -import { parseQuery, login, handleQrCode } from "@/utils"; +import { parseQuery, login, handleQrCode ,getCurrentPageUrl,handleUrlParam} from "@/utils"; export default { name: "Loading", @@ -26,8 +26,11 @@ export default { return {}; }, onShow() { - + var url = handleQrCode(); + if(!url){ + url = handleUrlParam(getCurrentPageUrl()) + } // 判断是否是分销 if (url) { var spread = cookie.get("spread"); diff --git a/utils/index.js b/utils/index.js index eaf884b..802a37f 100644 --- a/utils/index.js +++ b/utils/index.js @@ -821,7 +821,7 @@ export const handleLoginFailure = () => { let path = '/' + getCurrentPageUrlWithArgs() console.log("getCurrentPageUrl",getCurrentPageUrl()); //判断小程序转发分享商品详情进来的 - if (getCurrentPageUrl() == 'pages/shop/GoodsCon/index' && handleUrlParam(path) && !handleQrCode()) { + if (getCurrentPageUrl() == 'pages/shop/GoodsCon/index' && handleUrlParam(path) ) { debugger; console.log('————————') console.log('判断小程序转发分享商品详情进来的') @@ -846,7 +846,7 @@ export const handleLoginFailure = () => { } // 是分享转发拼团进来的 - if (getCurrentPageUrl() == 'pages/activity/GroupDetails/index' && handleUrlParam(path) && !handleQrCode()) { + if (getCurrentPageUrl() == 'pages/activity/GroupDetails/index' && handleUrlParam(path)) { console.log('————————') console.log('是分享转发拼团进来的') console.log('————————') @@ -870,7 +870,7 @@ export const handleLoginFailure = () => { } // 是分享转发秒杀进来的 - if (getCurrentPageUrl() == 'pages/activity/SeckillDetails/index' && handleUrlParam(path) && !handleQrCode()) { + if (getCurrentPageUrl() == 'pages/activity/SeckillDetails/index' && handleUrlParam(path)) { console.log('————————') console.log('是分享转发秒杀进来的') console.log('————————') @@ -894,7 +894,7 @@ export const handleLoginFailure = () => { } // 判断是不是转发分享的砍价海报进来的 - if (getCurrentPageUrl() == 'pages/activity/DargainDetails/index' && handleUrlParam(path) && !handleQrCode()) { + if (getCurrentPageUrl() == 'pages/activity/DargainDetails/index' && handleUrlParam(path)) { console.log('————————') console.log('判断是不是转发分享的砍价海报进来的') console.log('————————') @@ -918,12 +918,15 @@ export const handleLoginFailure = () => { } } // 判断是不是拼团进来的 - if (getCurrentPageUrl() == 'pages/activity/GroupRule/index' && handleQrCode()) { + if (getCurrentPageUrl() == 'pages/activity/GroupRule/index' ) { console.log('————————') console.log('是拼团进来的') console.log('————————') let url = handleQrCode(); + if(!url){ + url = handleUrlParam(path); + } console.log(url) if (url) { path = parseUrl({