From fd46106110123a808864497296328a680f8aa54f Mon Sep 17 00:00:00 2001 From: jonnyshao <443547559@qq.com> Date: Tue, 21 May 2019 11:33:32 +0800 Subject: [PATCH] add assets --- README-zh_CN.md | 4 ++++ README.MD | 5 +++++ assets/alipay.png | Bin 0 -> 1326 bytes assets/baidu.png | Bin 0 -> 1390 bytes assets/dingding.png | Bin 0 -> 1233 bytes assets/mini-program.png | Bin 0 -> 5452 bytes assets/platform_wechat.jpeg | Bin 4686 -> 0 bytes assets/wechat.png | Bin 0 -> 1250 bytes exmaple/api/requst.js | 6 +++--- exmaple/app.js | 2 ++ exmaple/pages/index/index.js | 17 ++++++++++------- 11 files changed, 24 insertions(+), 10 deletions(-) create mode 100644 assets/alipay.png create mode 100644 assets/baidu.png create mode 100644 assets/dingding.png create mode 100644 assets/mini-program.png delete mode 100644 assets/platform_wechat.jpeg create mode 100644 assets/wechat.png diff --git a/README-zh_CN.md b/README-zh_CN.md index 47403e7..1d283c1 100644 --- a/README-zh_CN.md +++ b/README-zh_CN.md @@ -1,5 +1,9 @@ [English](https://github.com/jonnyshao/wefetch) | 简体中文 +## 支持的小程序平台 +![WeChat](https://github.com/jonnyshao/wefetch/blob/master/assets/wechat.png) | ![AliPay](https://github.com/jonnyshao/wefetch/blob/master/assets/alipay.png) | ![DingDing](https://github.com/jonnyshao/wefetch/blob/master/assets/dingding.png) | ![Baidu](https://github.com/jonnyshao/wefetch/blob/master/assets/baidu.png) | +--- | --- | --- | --- | +Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | # wefetch [![platform](https://badgen.net/badge/platform/微信,支付宝,百度?list=1&color=green)](https://github.com/jonnyshao/wefetch) [![install size](https://packagephobia.now.sh/badge?p=wefetch)](https://packagephobia.now.sh/result?p=wefetch) diff --git a/README.MD b/README.MD index 1b8c6ed..8569362 100644 --- a/README.MD +++ b/README.MD @@ -1,4 +1,9 @@ English | [简体中文](https://github.com/jonnyshao/wefetch/blob/master/README-zh_CN.md) +## mini program platform Support + +![WeChat](https://github.com/jonnyshao/wefetch/blob/master/assets/wechat.png) | ![AliPay](https://github.com/jonnyshao/wefetch/blob/master/assets/alipay.png) | ![DingDing](https://github.com/jonnyshao/wefetch/blob/master/assets/dingding.png) | ![Baidu](https://github.com/jonnyshao/wefetch/blob/master/assets/baidu.png) | +--- | --- | --- | --- | +Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | # wefetch diff --git a/assets/alipay.png b/assets/alipay.png new file mode 100644 index 0000000000000000000000000000000000000000..9087577a8d1646a4e5f6f7aaeffb0f279ce20c14 GIT binary patch literal 1326 zcmV+}1=0G6P)eoHp=e{8{@lClCv~d=|beXwFpc4S{m;P1^UJ=o)hFa=1 z?r=#Dk3F7hZ!qOf80rgvMg(;0?8Cqk;BgcMZ|j2b2QcMMyKP>w!H5W*I)Z1{Fyny~ z#_P4Z_66bvAe`%$0Ir%6JP(NMAN7OlsuxoYzz04FwVBqXN>yQ!c|xryP?z|FR<5;9 z0KuFG3g+fmw_YTm(8@r)(0!VffhYwKzS|6m>Be;n#~f$k7tyoUr09%70RIKyca$mt zkqba*6Ofr6^Jabb)~qh`=yV7`6n0}i{b;nMdLVs$&+T0sf!?aL} z%tx1yu5oLf&V$qRygdNnLW@`Z+qIEvoSE;Ueyf+B*IsCLt*bK5z^mvy7$B-q$f#%;^@BY<3Fn*J z;!B_o5q|f%B$+GTnd({}!|Lg#PbETC7pJ!WVZ0`}86t8jSXLYcCPZ+?>)CbMsL$D$ zCS2$V0ne*Lj%Ny0slCu&auRUgy(-Vo3y;IO{#w(4t^`0MF1{*)b)cT41G2|PzK;cP z&&(?ji39q@1ws@*>IZujjJotm&hi4lz&9`^P->EORIx+kE}*+GBtrJGmgRsx4VZ8b z0Q`0x1w*g0hvXJU_lPlIP%nzqNqT)<3z&Xs0U(y-w^Fwayot_(VepPG6q^CSCj?4j z8(VP$Xk|#vDp%Y*;;$mvgpy7(n(#JU=o3}NI| z=xi^cu_9A zIkTUQgh}KiCkwMjEmsJ z7_T>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iL*^$YQm(c8jRfJC0VNm1_sd&I&dd|cLar^bBwjtF#KzbaikPb*MbYsK w)F%gt0;E$a^H8PjjmB82*eX}JkNIZeCx+RXUPOF^c>n+a07*qoM6N<$g2X9*egFUf literal 0 HcmV?d00001 diff --git a/assets/dingding.png b/assets/dingding.png new file mode 100644 index 0000000000000000000000000000000000000000..a2fa9867c5e3464cf361e10a3fc08bdd93ba0dc7 GIT binary patch literal 1233 zcmV;?1TOoDP)=T4Jft?eWY*DIkE?{Yv zX2|cUmMlgHN&kNtJe8_p<1+OB>i7F~_xmlvPyV5w+<*KJAdR3q30^sb9u&8js0C)1 zh)(2p2Cn5V0W$@ffu4Pd-n4Ib5&cI+z#Y#|9N;a3`b2PT9AfY-Ge%e*Tt;W@$YyQU zwiW>QW6&eUI|6!jADpgZMnvGLS{|I$0b&KfeZO#>qt!bA{$m}_uNNQ;K97do4>o%n z0}#3p;WL3+HV?41WnjwpjZ@QT7y)o6-}=P-$(HA~&i_j*p7HYFHxm$A0PcA1IYgi8 zI#YKYvl)m=05NSqS5I~F+j*e}Q3^m3mJU~o|H}C_oq%aL=)5kAWGR5=B)BRolMH;} z`$iu}D~}jH5q_;p6_a&}`7|1KFN$mn0Z7t1;Ll~73qQkQ_vN|^kLMl{c?7&Namdyt zF0so-yC|s(0W>G`g|1wx`$jXrVceNXdIbGp>!jA6>BHUd`Bwkg0$^Ho6zFv{cs?z9 zu;kCK=~WhmEdb5&{3aD)Rj0y?Kf__CuRA%B9S*Y>>m}e9oqg5s3OI`fol&V4az8Fw z4zCub4^hl7qhWVuYX8s>JtF*Wx+ZHU0x%qO+vNZzf$sqCtu|-AP!3&2Z#uDLHu=O9 zJN#P|tWTg9CTmg~MU8e=if>S;IS!^arz0T+b0qfw2DJ#dQOuWiQ3-qk&Q0l+FR6I| zp-tn;b23TZA3d;gK~4mEHZ!@n9FM<^K>XGy61i%$0pNHNu+b(DMn#;oS)bY-kArg% zM5b#$(nP~SXMGP@14ya`uCzPk42mj)?H(q5C*5=B0Aypu?Au;MQin|Y&KdwC3WuF$ z`v0RNklh%B88LkYI8sh>k*}&wbp_+yptJUScL2a&!$CKmLYRJRxUZ*Ba^DS2A6{f< z)7WgArWSx0*jAxDh*+->ofc^%p-Wc$Rmt`0L*&c5LD$>L0r{di39fe`iDi(*3L`k= z5?C})Kg(O&#LWWASG~pFT-3JmhrOTnY`Gj>;pP_N}u3(rt`Q-+gjs4lvoqWKz4Eb!tZe9Ga!?; zS`mp$Bx6)II@cX!WgjqEoZ2Msi>c4@q8m6Vi;VCaz>EpkpvKf>W~B3@b_8@A%a~?u vqc}26O5MIYqmb=`_GQ1f2<*$@{J#GH498MWyyQ&J00000NkvXXu0mjfeKb3b literal 0 HcmV?d00001 diff --git a/assets/mini-program.png b/assets/mini-program.png new file mode 100644 index 0000000000000000000000000000000000000000..0f68242f1317e11199348f2bcb84f0783e0bfb5e GIT binary patch literal 5452 zcmV-S6|?GzP)mzH7VvI(kQFOD$boBsYG_EUMJv@XNrt9oiJu^5mw;tV9)l)Om z{coLn?s@$B-gECg_gq5bH=->-BU<~0@@N2HgoB^~fCd0YxCKVI`i&8w0e}&1ff25L zV+3dbV1!#>gsa~e0U7`p;T9O->NiG!1^`C51xC2~jS-*$fDvwi5w3n?1ZV(Ym|9@j zx-l&u@0dc8G=;zivyDRm-Va1AV2lItI09uH?HODI(`FDhgSiBv_lWQ(*z~rYlHM-O zKIn~MYNcUx9Q+Wc_(r_sYJ4^QasJ@4@CV zw5Nb&>&D0*ch4a33;?HsXpg!Wlz9si9%D}ZyrfNjxGsIh)X9(pK#O61MPhsdz?mTI z7L#p)v1Q)Mz@r4|o}!lhWw1ucp&B{>SjtVA?)FO<{4FA6lVie9N%9s0^Q^tH_YajR zVn_fWqnpNB^HC%1JXQ8&EA%Dc@qtQ7Q;MI0&WMO)NV+AkC`@r_#J@O z0c-(M2QfOzL>nExDds(y&u%%_8BY&HBCC=;-# zICk8Pn7QxPYTDL=HgN!ujl$`GeGh^53TglbEHGAp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L4b-}~+#F_!+OcTMXB@z@`Ij;_jp)L#dPdv3*DT}A8C6(->$uBF}P%2oZ( zY~DgMob0U)BG6au`IqcxXD;NjU|M)et2=QI!EY|M^kEc@UDpiGY}B?WfeY21pO$St zdnZifk>nExDx>(!XojpF7?{+O8Nf>H;2m}g6&-Ou>dbQzwXFV(+Vh;q>dk^1Kz`4a zi;QM?2A~^O+oFX=Zm{j-lhA)Wk#H7V7p2D{Vpax#%lLhcewQ$XR5Rq!I!MGKK-`W$ z= z`!=kWlQj=)PVCa`5*j-iwzI7EzrI^92k^+*U!T>kKxfjZ-xYY*g_o4P0yq{(xZVd! zJz#2;R6Ad{Sq1=)UASdD$fY$+e|NlN#Pmhr6Qa8n{Wre@&lPmV-Pe0Sw(|&QtrrwR zoAvSplJkIWm$>v|ip~+Iv)wZk^fJ=*VlLIl0O_^`40Q7>k zCUG4AvW&HM00{_(Uh7MMWT|;003JQjSXOG>1L^4|j~Vdvi;kNLb9T$~yF+6hcmkmd z-?pdQ@TVICNn~a6B)g_jUJ*d{P<62cq$>j5c`Fu9deh*Tph_EI`mI_hr&$`4D!0Zx zV2X-W+Xc^3bBW0G@SQwDE)#DarxNu|0XT>J+CbfoOo9HA0J3=g12I6Ko2*fvz5oCK M07*qoM6N<$f|My!?f?J) literal 0 HcmV?d00001 diff --git a/exmaple/api/requst.js b/exmaple/api/requst.js index d17ac27..f9f8ee6 100644 --- a/exmaple/api/requst.js +++ b/exmaple/api/requst.js @@ -1,5 +1,4 @@ const wf = require('wefetch'); - class Request { constructor() { this.queue = {}; @@ -13,7 +12,8 @@ class Request { } setInterceptor(instance, url) { instance.before.use(req => { - req.header.Authorization = 'type in your token'; + console.log('request--parmas', req) + req.header.authorization = 'type in your token'; if (Object.keys(this.queue).length === 0) { const type = req.config.eventType if (type) { @@ -39,7 +39,7 @@ class Request { if (Object.keys(this.queue).length === 0) { wx.hideLoading() } - console.log('instance res', res) + console.log('response', res) return res; }) } diff --git a/exmaple/app.js b/exmaple/app.js index b545190..00e7d66 100644 --- a/exmaple/app.js +++ b/exmaple/app.js @@ -15,10 +15,12 @@ App({ // 获取用户信息 wx.getSetting({ success: res => { + console.log(res) if (res.authSetting['scope.userInfo']) { // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框 wx.getUserInfo({ success: res => { + console.log(res) // 可以将 res 发送给后台解码出 unionId this.globalData.userInfo = res.userInfo diff --git a/exmaple/pages/index/index.js b/exmaple/pages/index/index.js index 781c660..f60f7b7 100644 --- a/exmaple/pages/index/index.js +++ b/exmaple/pages/index/index.js @@ -3,10 +3,15 @@ const wf = require('wefetch') wf.defaults.baseUrl = 'http://localhost:3000' wf.before.use(req => { + console.log(req) return req }) +wf.after.use(res => { + console.log(res) + return res +}) wf.postJson('/postJson') -wf.get('/get', { data: { title: '标题' },header:{title: 'this is a title'} }) +wf.get('/get', { data: { title: '标题' },header:{title: 'this is a title'},config:{eventType: 'user'} }) //获取应用实例 const app = getApp() @@ -28,7 +33,9 @@ Page({ // get({title: 'this is a get request'},{eventType:'get'}).then(() =>{ // console.log('get request') // }) - wf.get('/get',{data:{title: 'title'},config:{eventTyep: 'get'}}) + wf.get('/get',{data:{title: 'title'},config:{eventTyep: 'get'},header: { + Authorization: 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MTAyLCJ1c2VybmFtZSI6IjEzOTE2NzM5OTM4IiwiY29tcGFueSI6MTEsImlhdCI6MTU1Nzg0MTUyOSwiZXhwIjoxNTU4NDQ2MzI5fQ.7JcYLazsriB6PXENOpuVQk-dki7cOIdErPPFYIX6y6U' + }}) }, // post 请求 postRequest(){ @@ -63,11 +70,7 @@ Page({ console.log('download request') console.log(res) }) - wf.onProcess('download',res => { - console.log('下载进度', res.progress) - console.log('已经下载的数据长度', res.totalBytesWritten) - console.log('预期需要下载的数据总长度', res.totalBytesExpectedToWrite) - }) + }, // retry 请求 retryRequest(){