多谢耐心解答
但是目前问题如下:
page直接用Component声明,
报错:Component({
behaviors: [myBehavior],
properties: {
myProperty: {
type: String
}
},
data: {
myData: {}
},
attached:
function
(){},
methods: {
myMethod:
function
(){}
}
})
pages/fenxiao/stores/index.js 出现脚本错误或者未正确调用 Page()
(anonymous) @ appservice:15026
WAService.js:3 jsEnginScriptError
n is not a function
TypeError: n is not a function
at _ (http://127.0.0.1:9973/appservice/__dev__/WAService.js:12:14247)
at Function.y [as create] (http://127.0.0.1:9973/appservice/__dev__/WAService.js:12:14400)
at Function.p.prepare (http://127.0.0.1:9973/appservice/__dev__/WAService.js:11:12109)
at F (http://127.0.0.1:9973/appservice/__dev__/WAService.js:13:14230)
at W (http://127.0.0.1:9973/appservice/__dev__/WAService.js:13:14261)
at U (http://127.0.0.1:9973/appservice/__dev__/WAService.js:13:14641)
at Function.<anonymous> (http://127.0.0.1:9973/appservice/__dev__/WAService.js:13:17012)
at http://127.0.0.1:9973/appservice/__dev__/WAService.js:13:22046
at http://127.0.0.1:9973/appservice/__dev__/WAService.js:5:22487
at Array.forEach (<anonymous>)
- 还是上述写法,在 json文件里写 : usingComponent: true, 这次没这么多异常了,但是提示:
Page[pages/fenxiao/stores/index] not found. May be caused by: 1. Forgot to add page route in app.json. 2. Invoking Page() in async task.