From efb21107aa4eeb56aca5df42e4bf71b9df71fc5f Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Tue, 22 Feb 2022 14:20:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E8=99=9A=E6=8B=9F?= =?UTF-8?q?=E4=B8=8E=E7=8E=B0=E5=AE=9E=20=E5=8F=8D=E9=A6=88bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/init/initApi.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/api/init/initApi.js b/api/init/initApi.js index 5642f82..b723793 100755 --- a/api/init/initApi.js +++ b/api/init/initApi.js @@ -19,14 +19,15 @@ import conf from '../../conf/config.js' */ export function getWAppId(){ let wAppId = null; - // #ifdef H5 - //1.0 获取当前页面 - let routes = getCurrentPages(); - //在微信小程序或是app中,通过curPage.options;如果是H5,则需要curPage.$route.query(H5中的curPage.options为undefined,所以刚好就不需要条件编译了) - let curParam = routes[routes.length - 1].options; - //2.0 从当前页面参数中获取 - wAppId = curParam.wAppId; - // #endif + //这里 虚拟与现实反馈有bug 注释处理 2022-02-22 + // // #ifdef H5 + // //1.0 获取当前页面 + // let routes = getCurrentPages(); + // //在微信小程序或是app中,通过curPage.options;如果是H5,则需要curPage.$route.query(H5中的curPage.options为undefined,所以刚好就不需要条件编译了) + // let curParam = routes[routes.length - 1].options; + // //2.0 从当前页面参数中获取 + // wAppId = curParam.wAppId; + // // #endif //3.0 微信小程序直接调用小程序获取 // #ifdef MP-WEIXIN