调试小商店装修和营销组件时系统报错,miniShopPlugin对象不对?
系统:MacOS 11.1 开发者工具版本号:1.05.2101181 基础库版本:2.14.4 按照文档(https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/Mini_Programs/value_added_services/decoration.html)的方法,调试小商店的装修组件时,系统报错:TypeError: miniShopPlugin.initPluginDevMode is not a function 并且同时有提示:无效的 app.json plugins.mini-shop-plugin["genericsImplementation"] [图片] 打印出来的miniShopPlugin对象如下: [图片] 并没有initPluginDevMode方法和isDecorationPlugin方法。 miniprogram文件夹下的app.js如下: // app.js
const miniShopPlugin = requirePlugin('mini-shop-plugin');
miniShopPlugin.initPluginDevMode(true);
miniShopPlugin.isDecorationPlugin(true);
App({
onLaunch() {
}
})
miniprogram文件夹下的app.json配置如下: {
"pages": [
"pages/index/index"
],
"plugins": {
"mini-shop-plugin": {
"version": "dev",
"provider": "wx158b03cfa9a96354",
"genericsImplementation": {
"home": {
"home-decoration": "comp/home/index",
"category-decoration": "comp/category/index"
}
}
}
},
"sitemapLocation": "sitemap.json"
}
同时我的插件确实是小商店插件: [图片] 挺急的,希望有人帮助,谢谢!