app.json中已引入:
"plugins": {
"mini-shop-plugin": {
"version": "latest",
"provider": "wx34345ae5855f892d"
},
"wxacommentplugin": {
"version": "latest",
"provider": "wx82e6ae1175f264fa"
}
}
app.js 是这样的:
const miniShopPlugin = requirePlugin('mini-shop-plugin');
App({
onLaunch() {
miniShopPlugin.initApp(this, wx);
},
})
index.js 是这样的:
var plugin = requirePlugin("wxacommentplugin");
Page({
onLoad(options) {
wx.navigateTo({
url: 'plugin-private://wx34345ae5855f892d/pages/home/home',
})
plugin.openComment({
// wx_pay_id: '4200002072202401048230347082', // 交易评价类账号选填
success: (res) => {
console.log('plugin.openComment success', res)
},
fail: (res) => {
console.log('plugin.openComment fail', res)
}
})
}
})
烦请各位大大指点一下
小程序社区发帖咨询:https://developers.weixin.qq.com/community/develop/mixflow