通过cli的形式创建的项目在vscode中开发,如图所示,所有的Promise API 都一样,是缺少安装什么库么?
运行不报错,也完全能使用,但错误提示看着难受
如何解决?总不能全部回归success的形式吧?
package.json 信息如下
{
"name": "uni-preset-vue",
"version": "0.0.0",
"private": true,
"scripts": {
"dev:app": "uni -p app",
"dev:app-android": "uni -p app-android",
"dev:app-ios": "uni -p app-ios",
"dev:custom": "uni -p",
"dev:h5": "uni",
"dev:h5:ssr": "uni --ssr",
"dev:mp-alipay": "uni -p mp-alipay",
"dev:mp-baidu": "uni -p mp-baidu",
"dev:mp-kuaishou": "uni -p mp-kuaishou",
"dev:mp-lark": "uni -p mp-lark",
"dev:mp-qq": "uni -p mp-qq",
"dev:mp-toutiao": "uni -p mp-toutiao",
"dev:mp-weixin": "uni -p mp-weixin",
"dev:quickapp-webview": "uni -p quickapp-webview",
"dev:quickapp-webview-huawei": "uni -p quickapp-webview-huawei",
"dev:quickapp-webview-union": "uni -p quickapp-webview-union",
"build:app": "uni build -p app",
"build:app-android": "uni build -p app-android",
"build:app-ios": "uni build -p app-ios",
"build:custom": "uni build -p",
"build:h5": "uni build",
"build:h5:ssr": "uni build --ssr",
"build:mp-alipay": "uni build -p mp-alipay",
"build:mp-baidu": "uni build -p mp-baidu",
"build:mp-kuaishou": "uni build -p mp-kuaishou",
"build:mp-lark": "uni build -p mp-lark",
"build:mp-qq": "uni build -p mp-qq",
"build:mp-toutiao": "uni build -p mp-toutiao",
"build:mp-weixin": "uni build -p mp-weixin",
"build:quickapp-webview": "uni build -p quickapp-webview",
"build:quickapp-webview-huawei": "uni build -p quickapp-webview-huawei",
"build:quickapp-webview-union": "uni build -p quickapp-webview-union",
"type-check": "vue-tsc --noEmit"
},
"dependencies": {
"@dcloudio/uni-app": "3.0.0-3061720230112002",
"@dcloudio/uni-app-plus": "3.0.0-3061720230112002",
"@dcloudio/uni-components": "3.0.0-3061720230112002",
"@dcloudio/uni-h5": "3.0.0-3061720230112002",
"@dcloudio/uni-mp-alipay": "3.0.0-3061720230112002",
"@dcloudio/uni-mp-baidu": "3.0.0-3061720230112002",
"@dcloudio/uni-mp-kuaishou": "3.0.0-3061720230112002",
"@dcloudio/uni-mp-lark": "3.0.0-3061720230112002",
"@dcloudio/uni-mp-qq": "3.0.0-3061720230112002",
"@dcloudio/uni-mp-toutiao": "3.0.0-3061720230112002",
"@dcloudio/uni-mp-weixin": "3.0.0-3061720230112002",
"@dcloudio/uni-quickapp-webview": "3.0.0-3061720230112002",
"luch-request": "^3.0.8",
"pinia": "^2.0.28",
"vue": "^3.2.45",
"vue-i18n": "^9.1.9"
},
"devDependencies": {
"@dcloudio/types": "^3.2.7",
"@dcloudio/uni-automator": "3.0.0-3061720230112002",
"@dcloudio/uni-cli-shared": "3.0.0-3061720230112002",
"@dcloudio/uni-stacktracey": "3.0.0-3061720230112002",
"@dcloudio/uni-vue-devtools": "3.0.0-3061720230112002",
"@dcloudio/vite-plugin-uni": "3.0.0-3061720230112002",
"@typescript-eslint/eslint-plugin": "^5.48.1",
"@typescript-eslint/parser": "^5.48.1",
"@vue/tsconfig": "^0.1.3",
"eslint": "^8.31.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue": "^9.9.0",
"prettier": "^2.8.3",
"sass": "^1.57.1",
"sass-loader": "^13.2.0",
"typescript": "^4.9.4",
"vite": "4.0.4",
"vite-plugin-vue-setup-extend": "^0.4.0",
"vue-tsc": "^1.0.24"
}
}
renxing2436 (作者)
登录成功 {errMsg: "login:ok", code: "031Ve6ll21eYBa4ggQll2PjDBg4Ve6lF"}
then中确实能拿得到数据,应该是 ts 的提示有问题
2023-01-16 14:15