报错 HTTP未申明
来源:7-12 分析问题的思维培养与练习

weixin_慕盖茨1194024
2019-06-07
import {
HTTP
} from '…/…/util/http.js’
let HTTP = new HTTP()
HTTP.request({
url: 'classic/latest',
success: (res) => {
console.log(res)
}
})
已经改一样了,报错如下-3:
VM8639:5 file: pages/home/home.js
unknown: Duplicate declaration "HTTP"
3 | HTTP
4 | } from ‘…/…/util/http.js’
5 | const HTTP = new HTTP()
| ^
6 |
7 | Page({
8 | /**
报错如下-2:
VM8384:1 thirdScriptError
sdk uncaught third Error
module “pages/home/home.js” is not defined
Error: module “pages/home/home.js” is not defined
at require (http://127.0.0.1:22113/appservice/dev/WAService.js:1:1076943)
at :1133:7
at HTMLScriptElement.scriptLoaded (http://127.0.0.1:22113/appservice/appservice?t=1559841723813:9846:21)
at HTMLScriptElement.script.onload (http://127.0.0.1:22113/appservice/appservice?t=1559841723813:9858:20)
1回答
-
我觉得这个提示已经很明显了,还是代码写错了。但是我找不出来,因为需要看的文件太多了,只是凭这一小段代码 是看不出来问题的。
052019-07-12
相似问题
回答 2
回答 3