weapp-cookie icon indicating copy to clipboard operation
weapp-cookie copied to clipboard

一行代码让微信、头条、百度、支付宝小程序支持 cookie,兼容 uni-app 🍪🚀 One line of code allows weapp to support cookie(wx weixin wxapp cookie)

Results 23 weapp-cookie issues
Sort by recently updated
recently updated
newest added

有些请求返回不止一个Set-Cookie

作者你好: 在使用weapp-cookie库中遇到一个问题,已经查询到问题原因并进行兼容处理 是在uniapp项目中使用编译到微信小程序,调用`uploadFile`在ios真机下取到的 `responseCookies`是一个数组,在调用`replace`出错了 ![image](https://github.com/charleslo1/weapp-cookie/assets/79572047/e77e69e4-ae52-4082-8194-83b0b5c21ee7) 经过正常调试发现,接口的`response`确实返回了三个`Set-Cookie`,但是在大部分情机型况下responseCookies都是‘字符串+,’拼接好,但在在ios真机下没有进行字符串处理所以我们这里手动调用一下`toString()`就可以了 ![image](https://github.com/charleslo1/weapp-cookie/assets/79572047/aecb7812-00b7-49e0-b5ce-604d413e6274) ![image](https://github.com/charleslo1/weapp-cookie/assets/79572047/349e183b-a141-4612-b2ba-70df6fb70e51)

miniprogram_npm\weapp-cookie\index.js 这个文件的2412行处,当设备是IOS的时候,responseCookies将是数组,此时responseCookies.replace(/\;([^\s\;]*?(?=\=))/ig, ',$1')将会报错 ![Dingtalk_20210629131231](https://user-images.githubusercontent.com/32809175/123740866-aefa2a80-d8db-11eb-9371-d9330273200d.jpg)

feat:兼容uniapp中luch-request插件,回调函数没有设置success fix:修复uniapp中多次引用本库导致重复定义的报错 fix:修复set-cookie头中Expires|Max-Age|Domain|Path|SameSite正常指令被误杀 #39 fix:修复uniapp中set-cookie会自动包含一个方括号

例如当前实际时间是 2023-05-05 10:00:00 服务器返回的cookie 失效时间5天有效,为2023-05-10 10:00:00 当用户调整他手机的本地时间为 2023-05-30 10:00:00 时,服务器返回的 cookie 永远也存不到 localstorage 里了 是否可以提供一个方法,cookies.setNowTime('Sun, 04 Jun 2023 11:12:09 GMT'),由使用者自己去更新当前时间 当然这个方法也不够好,欢迎大家讨论呀

Bumps [set-value](https://github.com/jonschlinkert/set-value) and [union-value](https://github.com/jonschlinkert/union-value). These dependencies needed to be updated together. Updates `set-value` from 2.0.0 to 2.0.1 Commits bb0f038 2.0.1 cb12f14 ensure only valid keys are used See full diff...

dependencies

Bumps [tar](https://github.com/npm/node-tar) from 4.4.1 to 4.4.19. Commits 9a6faa0 4.4.19 70ef812 drop dirCache for symlink on all platforms 3e35515 4.4.18 52b09e3 fix: prevent path escape using drive-relative paths bb93ba2 fix: reserve...

dependencies

Bumps [chownr](https://github.com/isaacs/chownr) from 1.0.1 to 1.1.4. Commits 814f642 1.1.4 a0d7ae0 push to github before npm 1a3667a ignore stuff 147eac4 Full tests, handle errors properly in many cases 578fb9f update tap,...

dependencies

Bumps [minimist](https://github.com/minimistjs/minimist) to 1.2.8 and updates ancestor dependencies [minimist](https://github.com/minimistjs/minimist), [minimist](https://github.com/minimistjs/minimist), [mkdirp](https://github.com/isaacs/node-mkdirp) and [mocha](https://github.com/mochajs/mocha). These dependencies need to be updated together. Updates `minimist` from 1.2.0 to 1.2.8 Changelog Sourced from minimist's...

dependencies

详见[my.request配置](https://opendocs.alipay.com/mini/api/owycmh)