跳转到腾讯文档
在微信小程序中跳转到腾讯文档,可以使用以下方法:
<template>
<view class="box">
<button @click="openNotes()">打开全屏文档</button>
<button @click="openNotesHalf()">打开半屏文档</button>
</view>
</template>
<script>
export default {
data() {
return {};
},
methods: {
// 打开腾讯文档小程序
openNotes() {
wx.navigateToMiniProgram({
appId: "wxd45c635d754dbf59",
path:
"pages/detail/detail?url=" +
encodeURIComponent("https://docs.qq.com/doc/DVmtlZUVtVGxQZFp3"),
});
},
openNotesHalf() {
wx.openEmbeddedMiniProgram({
appId: "wxd45c635d754dbf59",
path:
"pages/detail/detail?url=" +
encodeURIComponent("https://docs.qq.com/doc/DVmtlZUVtVGxQZFp3"),
});
},
},
};
</script>