Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QQ小程序授权出现global[key] is not a function #10462

Closed
Licoy opened this issue Oct 20, 2021 · 0 comments
Closed

QQ小程序授权出现global[key] is not a function #10462

Licoy opened this issue Oct 20, 2021 · 0 comments
Labels
F-vue3 Framework - Vue 3 T-qq Target - 编译到 QQ 小程序 V-3 Version - 3.x

Comments

@Licoy
Copy link

Licoy commented Oct 20, 2021

相关平台

QQ 小程序

小程序基础库: 1.40.0
使用框架: Vue 3

复现步骤

使用

async getUserInfo() {
      await Taro.getUserProfile({
        desc: "您的信息将会用于完善用户资料",
      }).then(async (res) => {})
}

就会出现

VM101:254 Unhandled promise rejection TypeError: global[key] is not a function
    at taro.js? [sm]:8141
    at new T (QLogic.js:formatted:5626)
    at Object.taro.(:58345/appservice/anonymous function) [as getUserProfile] (http://127.0.0.1:58345/appservice/taro.js:9276:21)
    at _callee3$ (index.js? [sm]:74)
    at tryCatch (vendors.js? [sm]:11747)
    at Generator.invoke [as _invoke] (vendors.js? [sm]:11981)
    at Generator.prototype.(:58345/appservice/anonymous function) [as next] (http://127.0.0.1:58345/appservice/vendors.js:1409:138)
    at asyncGeneratorStep (vendors.js? [sm]:91)
    at _next (vendors.js? [sm]:113)
    at vendors.js? [sm]:120

期望结果

正确授权

实际结果

如上错误

环境信息

Taro CLI 3.3.10 environment info:
    System:
      OS: Windows 10
    Binaries:
      Node: 16.0.0 - C:\Program Files\nodejs\node.EXE
      Yarn: 1.22.17 - C:\Program Files\nodejs\yarn.CMD
      npm: 7.10.0 - C:\Program Files\nodejs\npm.CMD
@taro-bot2 taro-bot2 bot added F-vue3 Framework - Vue 3 T-qq Target - 编译到 QQ 小程序 V-3 Version - 3.x labels Oct 20, 2021
@Licoy Licoy changed the title QQ小程序出现global[key] is not a function QQ小程序授权出现global[key] is not a function Oct 20, 2021
@Licoy Licoy closed this as completed Oct 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-vue3 Framework - Vue 3 T-qq Target - 编译到 QQ 小程序 V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

1 participant