之前一直没遇到,换了一台开发电脑,搭建环境后导入之前没问题的代码后,报错了:
"plugin://wx82e6ae1175f264fa/test" has been used as another component or page. Please do not register multiple components or pages with the same alias.(env: Windows,mp,1.06.2403142; lib: 2.24.1)
"plugin://wx82e6ae1175f264fa/index" has been used as another component or page. Please do not register multiple components or pages with the same alias.(env: Windows,mp,1.06.2403142; lib: 2.24.1)
不清楚什么原因导致的,node版本,npm版本都正常,nrm设置的taobao,重新构建无解。
插件配置JSON很干净:
"plugins": {
"wxacommentplugin": {
"version": "latest",
"provider": "wx82e6ae1175f264fa"
}
}
先拿掉这个功能了,ε=(´ο`*)))唉
var plugin = requirePlugin("wxacommentplugin");
plugin.openComment({
success: (res) => {
console.log('plugin.openComment success', res)
wx.showToast({
title: '感谢您的评价',
})
},
fail: (res) => {
console.log('plugin.openComment fail', res)
wx.showModal({
confirmText: '这就去',
content: '因微信评价插件功能异常,需要麻烦您手动点击界面右上角的三个点,在弹出的界面中点击"共x条评分",就可以评价啦',
showCancel: false,
title: '感谢您的好评',
success: (result) => {},
fail: (res) => {},
complete: (res) => {},
})
}
})
先人肉忽略这个提示,然后在评价失败的回调下增加modal弹框,让用户手动评价去,只能这样了