Giter VIP home page Giter VIP logo

cn-wechat-weather's Issues

腾讯位置服务API调用错误——thirdScriptError

请问一下我在腾讯位置服务申请了key,同时设置开放了微信小程序和WebServiceAPI服务并添加了“qq.com”白名单,但是在小程序中调用的时候遇到了以下报错,应该如何解决?(我尝试了一下教学视频里的APIKey,也遇到了同样的问题。。)
thirdScriptError
Cannot read property 'qqmapsdk' of undefined;at api getLocation success callback function
TypeError: Cannot read property 'qqmapsdk' of undefined
at success (http://127.0.0.1:52166/appservice/pages/index/index.js:119:13)
at function.o.(anonymous function) (WAService.js:1:1125059)
at vC (WAService.js:1:1085159)
at Function.success (WAService.js:1:1086826)
at Object.success (WAService.js:1:102993)
at r (WAService.js:1:421415)
at WAService.js:1:421592
at v (WAService.js:1:421601)
at Function. (WAService.js:1:423009)
at t.function.setTimeout (http://127.0.0.1:52166/appservice/appservice?t=1567929805880:1111:10471)

正式版小程序返会错误

返回错误

image

环境:

  1. 真实版已发布成功的小程序
  2. 手机一加5
  3. 所有代码使用的是源码,只是更改了背景图片

我的疑惑

  1. 我怀疑是腾讯地图请求地理位置超时产生的错误
  2. 微信开发者工具测试是没有问题的
  3. 手册测试4G状态下反应慢一些,但是不报错
  4. 正式版反而有问题,很奇怪

我发现的如何解决

  1. 去微信小程序后台设置服务器域名
    2.修改天气请求API为一个正式的API,比如和风天气或教程中的国外那个

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.