- 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: '小程序的原始ID,微信公众平台设置里有', //
- type: 0, //小程序版本 0-正式版; 1-测试版; 2-体验版。
- path: 'pages/index/index?id=' + 1 //小程序的页面,用传的参数在小程序接值判断跳转指定页面
- });
- }
- }
- );
- 用小程序的api: