guren-cloud / v-request Goto Github PK
View Code? Open in Web Editor NEW突破小程序网络请求限制黑科技,让你更自由地请求网站数据
Home Page: https://mssnn.cn
License: MIT License
突破小程序网络请求限制黑科技,让你更自由地请求网站数据
Home Page: https://mssnn.cn
License: MIT License
Uncaught (in promise) Error: errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail requestID 3e7eda4e-847b-11ea-b397-5254004f3f4d, cloud function service error code -504002, error message connect ECONNREFUSED 127.0.0.1:8080
Error: connect ECONNREFUSED 127.0.0.1:8080
在云函数里找不到对应的选项了
小程序需要通过基础库版本判断可以给哪些用户使用。版本低的用户是不能使用依赖高版本库的小程序的。希望作者注明一下。
谢谢~(≧▽≦)/~啦啦啦
Uncaught (in promise) Error: errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail requestID 1cb63f35-794c-11e9-b01f-525400e8849e, cloud function service error code -504002, error message wx is not defined; at cloud.callFunction api;
Cannot read property 'callFunction' of undefined
这里的代码
wx.cloud.callFunction({
name: 'v-request',。。。。
header: {date: "Fri, 10 Jul 2020 21:29:48 GMT", content-type: "application/json", content-length: "87", connection: "close", server: "NWS_TCloud_static_mid_TCB", …}
statusCode: 200
proto: Object
作者,这个返回字符串乱码是为什么?z怎么解决?
我将responseType设置为arrayBuffer后,返回的res.body仍然是字符串(设置的目的是获取图片的arrayBuffer -> 在本地js文件中调用'wx.arrayBufferToBase64()'来显示图片)
仔细研究之后,发现这与我所请求的地址是"HTTP"有关,不知该用什么方法规避呢?
{data: undefined, errMsg: "request:ok", statusCode: undefined, header: undefined}
data
:
undefined
errMsg
:
"request:ok"
header
:
undefined
statusCode
:
undefined
proto
:
Object
官方的wx.request
data: {
x: '',
y: ''
}
可以成功传参
wx.vrequest
只有当
data: 'key=value' 才能成功传参
如果要像wx.request POST多个key:value 该怎么办?
新手刚接触小程序,有些东西还自己配不了
使用vrequest,在返回的body中,中文乱码。但是通过postman测试,没有乱码。
你好,使用中有这样的提示,请教如何处理,在每个 wx.vrequest 之前加 cloud.init() ?还是?
remote-helper.js:44 [process] unhandledRejection Error: errCode: -1 | errMsg: Cloud API isn't enabled, please call wx.cloud.init first
请先调用 wx.cloud.init() 完成初始化后再调用其他云 API。init 方法可传入一个对象用于设置默认配置,详见文档。
at new e ([publib]:1:220760)
at Object.exportAPI.(anonymous function) [as callFunction] ([publib]:1:131763)
at weapp:///v-request.js:61:14
at new Promise ()
at Object.wx.vrequest (weapp:///v-request.js:60:10)
你好,小程序报错,如下:
请先调用 wx.cloud.init() 完成初始化后再调用其他云 API。init 方法可传入一个对象用于设置默认配置,详见文档。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.