Skip to content
This repository has been archived by the owner on Nov 5, 2022. It is now read-only.

请问可以开发通用的适合原生小程序的 adapter 吗? #12

Open
jswxwxf opened this issue Sep 26, 2018 · 6 comments
Open

请问可以开发通用的适合原生小程序的 adapter 吗? #12

jswxwxf opened this issue Sep 26, 2018 · 6 comments

Comments

@jswxwxf
Copy link

jswxwxf commented Sep 26, 2018

可以在原生小程序里使用 axios 的。谢谢大神。:)

@hjkcai
Copy link
Owner

hjkcai commented Sep 26, 2018

最近暂时没时间开发…但其实是可以拿我现有的 adapter 直接用的,抱歉哈

@superlbr
Copy link

修改axios的源码,只是wepy的需要吗?原生的话可以不修改?

@jswxwxf
Copy link
Author

jswxwxf commented Mar 14, 2019

不是的,原生的也要修改,因为小程序用的是 wx.request 发的请求,没有 Web 上的 XMLHttpRequest 或者 Fetch。

@superlbr
Copy link

@jswxwxf 我说的是wepy-plugin-axios, 在lib/plugin.js里有修改axios的源码,是不是只针对wepy

@jswxwxf
Copy link
Author

jswxwxf commented Mar 15, 2019

噢噢,你可以试着拿出来用啊

@superlbr
Copy link

分享下,把adapter扒出来
https://gist.github.com/superlbr/e3b24c74c8df2e5ca17a05f13ca7ee7f

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants