const plugin = requirePlugin('hello-plugin') Page({ data: { items: [], currentItem: 0 }, onLoad() { const world = plugin.answer }, onShow() { plugin.getOcrResult({ success: (res) => { console.log(res) wx.showLoading({ title: '0980890890', }) }, failed: (error) => { console.log(error) } }) }, goPluginPage(){ wx.navigateTo({ url: 'plugin://hello-plugin/bank-card?token=123', events: { someEvent: (data) => { console.log(data) } } }) }, addItem() { this.data.items.push(this.data.currentItem++) this.setData({ items: this.data.items, currentItem: this.data.currentItem }) } })