包名需要用到:
点击跳转的app代码:
<template>
<view class="content">
<button @click="Jump">跳转</button>
</view>
</template>
<script>
export default {
methods: {
Jump() {
plus.runtime.launchApplication(
{
//跳转app
pname: 'com.grqt.onemap', //跳转的包名
extra: {
//要传递过去的参数
nurseid: '参数1',
phone: '参数2'
}
},
function (e) {
//打开失败时
uni.showToast({
title: '未安装trtc应用',
icon: 'none'
});
}
);
}
}
};
</script>
目标跳转app接受参数:
const d = plus.runtime.arguments;
// d是接收到的参数