Giter Club home page Giter Club logo

uniapp-tools's Issues

Cannot set property 'defaultConfig' of undefined

function MyRequest (defaultConfig) {
    this.defaultConfig = defaultConfig;
    this.interceptors = {
        scoped: {
            request: new Interceptors(),
            response: new Interceptors()
        },
        global: globalInterceptor
    }
}

这里defaultConfig未定义直接引用 this.defaultConfig = defaultConfig;,在微信小程序里报错
image

lazyLoad TypeError: undefined is not iterable!

id = 'scroll'

lazyLoadPlugin.init({id})

error info:

core.get-iterator.js:5 Uncaught (in promise) TypeError: undefined is not iterable!
    at ./node_modules/core-js/library/modules/core.get-iterator.js.module.exports.__webpack_require__.getIterator (core.get-iterator.js:5)
    at Subscribe._callee$ (pages-test-test.js:1085)
    at tryCatch (runtime.js:62)
    at Generator.invoke [as _invoke] (runtime.js:288)
    at Generator.prototype.<computed> [as next] (runtime.js:114)
    at asyncGeneratorStep (asyncToGenerator.js:5)
    at _next (asyncToGenerator.js:27)
    at asyncToGenerator.js:34
    at new Promise (<anonymous>)
    at new F (_export.js:36)

get的url不能在请求拦截器中调整后重新生成

如题。
比如在请求拦截器中,增加params参数,但是请求url还是默认生成的链接:
config.params.channel = "wx";
请求的url中并不会添加这个拦截其中的参数,但是在返回的数据中的config的url却更新了。

在app中仅能发送一次请求

第一个request成功发送并响应之后,后续的所有请求均无响应,一直处于转圈状态

--疑似hbuilderx的运行问题,换了其它3个request连接,都是这结果。

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.