优化 虚拟与现实 反馈bug

This commit is contained in:
java110 2022-02-22 14:20:18 +08:00
parent e63f743c38
commit efb21107aa

View File

@ -19,14 +19,15 @@ import conf from '../../conf/config.js'
*/ */
export function getWAppId(){ export function getWAppId(){
let wAppId = null; let wAppId = null;
// #ifdef H5 //这里 虚拟与现实反馈有bug 注释处理 2022-02-22
//1.0 获取当前页面 // // #ifdef H5
let routes = getCurrentPages(); // //1.0 获取当前页面
//在微信小程序或是app中通过curPage.options如果是H5则需要curPage.$route.queryH5中的curPage.options为undefined所以刚好就不需要条件编译了 // let routes = getCurrentPages();
let curParam = routes[routes.length - 1].options; // //在微信小程序或是app中通过curPage.options如果是H5则需要curPage.$route.queryH5中的curPage.options为undefined所以刚好就不需要条件编译了
//2.0 从当前页面参数中获取 // let curParam = routes[routes.length - 1].options;
wAppId = curParam.wAppId; // //2.0 从当前页面参数中获取
// #endif // wAppId = curParam.wAppId;
// // #endif
//3.0 微信小程序直接调用小程序获取 //3.0 微信小程序直接调用小程序获取
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN