拉取小程序分享 赋值app跳转小程序
// 拉取小程序分享
getPlus() {
//获取当前显示的webview
var pages = getCurrentPages()
var page = pages[pages.length - 1];
// #ifdef APP-PLUS
var currentWebview = page.$getAppWebview();
//调用H5+APP的扩展API
var shares = null;
let that = this
var pusher = plus.share.getServices(function(s) {
shares = {};
for (var i in s) {
var t = s[i];
shares[t.id] = t;
}
that.sweixin = shares['weixin'];
}, function(e) {
console.log("获取分享服务列表失败:" + e.message);
});
//放入当前的webview
currentWebview.append(pusher);
// #endif
},
this.sweixin.launchMiniProgram({
id: 'gh_c4050fc50d11', //要跳转小程序的原始ID
path: `pages/index/goLive?roomId=${item.roomId}`,
type: 0 // 微信小程序版本类型可取值: 0-正式版; 1-测试版; 2-体验版。 默认值为0。
})