测试使用ApiTestPage页面,将ApiTestPage.vue里的测试方法和引入 都同步到 ApiTestPage.nvue文件里,会引发报错:
reportJSException >>>> exception function:createInstanceContext, exception:white screen cause create instanceContext failed,check js stack ->Uncaught ReferenceError: require is not defined
at (/pages/misc/ApiTestPage.nvue:1079:1)
at __webpack_require__ (/pages/misc/ApiTestPage.nvue:21:30)
at eval (<anonymous>:13:15)
at eval (<anonymous>:3148:30)
at (/pages/misc/ApiTestPage.nvue:559:1)
at __webpack_require__ (/pages/misc/ApiTestPage.nvue:21:30)
at eval (<anonymous>:8:35)
at eval (<anonymous>:66:30)
at (/pages/misc/ApiTestPage.nvue:447:1)
at __webpack_require__ (/pages/misc/ApiTestPage.nvue:21:30)
注释掉以下四句引入:
// import wfc from "../../wfc/client/wfc";
// import ModifyMyInfoEntry from "../../wfc/model/modifyMyInfoEntry";
// import ModifyMyInfoType from "../../wfc/model/modifyMyInfoType";
// import pttClient from "../../wfc/ptt/pttClient";
即可正常编译,但是无法调用测试方法了。希望老师这边能够提供解决方法。
截图详见: