uniapp中App端跳轉微信小程序指定頁面並攜帶參數。


 

 

// APP端 調起微信小程序
                plus.share.getServices(
                    res => {
                        let sweixin = null;
                        for (let i in res) {
                            if (res[i].id == 'weixin') {
                                sweixin = res[i];
                            }
                        }
                        //喚醒微信小程序
                        if (sweixin) {
                            sweixin.launchMiniProgram({
                                id: 'gh_開頭', //微信開放平台 --- 綁定的微信小程序的 --- 原始id
                                type: 0, //小程序版本  0-正式版; 1-測試版; 2-體驗版。
                                path: '/pages/...?query傳參' //小程序的頁面,用傳的參數在小程序接值判斷跳轉指定頁面
                            });
                        }else{
                            console.log("未安裝微信邏輯")
                        }
                    }
                );

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM