profile
viewpoint
Frank Fang FrankFang @jirengu-inc Hangzhou, China https://fangyinghang.com/ Former Tencent Employee & Working at Alibaba.

FrankFang/best-chinese-front-end-blogs 3194

收集优质的中文前端博客

FrankFang/163-music-2018 8

仿网易云音乐,包含管理端(admin 页面)

FrankFang/animating-resume 5

预览地址:

FrankFang/calendar 5

A calendar

FrankFang/chrome-app-rssly 5

yet another rss reader

FrankFang/2018-react-demo-1 2

预览地址:

issue commentdocker/machine

scp: Host does not exist: "C"

If you want to cope files from container to local (in Windows), you can

  1. share /d with vm
  2. docker-machine ssh; then copy files to /d/xxx
  3. exit; then you can see files in Windows /d/xxx
robvelor

comment created time in 2 days

startedmthomps4/next-now-test

started time in 3 days

startedHermanMartinus/bearblog

started time in 3 days

push eventFrankFang/cv-2020

Frank Fang

commit sha 28b0ac241a0551177af7c51ab723c53ee7bb4b8b

Update README.md

view details

push time in 5 days

push eventFrankFang/cv-2020

frankfang

commit sha e6f55a7f777e95998b1ef5261ce9b3d3c86cab4d

在print时隐藏雷达图

view details

frankfang

commit sha 259168af7c043a0b99bf147c01627d828c5ee545

update dist

view details

push time in 5 days

push eventFrankFang/cv-2020

frankfang

commit sha 5f9b5f528f3407a44ef87f9cf6050b49d0a675a2

update

view details

push time in 5 days

push eventFrankFang/cv-2020

frankfang

commit sha c6bc269e10890f5c103232c6dd5b1240a16dfa3a

update dist

view details

frankfang

commit sha 4663495aa2577bcd76a7e1d9ccb6263ed841c6b3

Merge branch 'master' of github.com:FrankFang/cv-2020

view details

push time in 5 days

push eventFrankFang/cv-2020

Frank Fang

commit sha 7519c6a2c88780b950d397249641e56951026652

Update README.md

view details

push time in 5 days

startedpveyes/use-less

started time in 7 days

push eventFrankFang/morney-13-website

frankfang

commit sha 6e4d864a9103ef7e26915ab7b0899adb4a5a1ccc

deploy

view details

push time in 9 days

push eventFrankFang/nextjs-demo-2

frankfang

commit sha 85cd7ba25869da0df1dc4669e08b5760b9edc32b

更新

view details

push time in 10 days

PR opened li123147/daima

Update webpack.config.js
+7 -7

0 comment

1 changed file

pr created time in 10 days

push eventFrankFang/daima

Frank Fang

commit sha e915c6315856abe6c2f731405ac8f5f812fb096c

Update webpack.config.js

view details

push time in 10 days

create barnchFrankFang/nextjs-demo-2

branch : master

created branch time in 11 days

created repositoryFrankFang/nextjs-demo-2

created time in 11 days

create barnchFrankFang/nextjs-demo-1

branch : master

created branch time in 13 days

created repositoryFrankFang/nextjs-demo-1

created time in 13 days

startedblitz-js/blitz

started time in 14 days

create barnchFrankFang/echarts-demo-1

branch : master

created branch time in 14 days

created repositoryFrankFang/echarts-demo-1

created time in 14 days

fork FrankFang/Recoil

Recoil is an experimental state management library for React apps. It provides several capabilities that are difficult to achieve with React alone, while being compatible with the newest features of React.

fork in 14 days

startedpiskelapp/piskel

started time in 15 days

startedmicrosoft/reverse-proxy

started time in 15 days

push eventFrankFang/morney-react-42

Frank Fang

commit sha 84e098700c4c12f5909ab36fe3b099dc72d14136

Update README.md

view details

push time in 15 days

push eventFrankFang/jrg-rails-demo-1

frankfang

commit sha ae6bf5113b9f04d3ed10ce4aba90f14a31eb37d4

tests done

view details

frankfang

commit sha 2c63311f7abcd2cd6c3622e2ae12460541dd08a5

优化1

view details

frankfang

commit sha 402ea6519f8a49fd8c7d2dafaf87482a449ba554

优化2

view details

push time in 16 days

push eventFrankFang/morney-react-42

frankfang

commit sha d22d4ae1ea87449b317ecf69cb9967dbe9c6b1b3

优化展示效果

view details

push time in 17 days

create barnchFrankFang/morney-react-42

branch : master

created branch time in 17 days

created repositoryFrankFang/morney-react-42

created time in 17 days

push eventFrankFang/jrg-rails-demo-1

frankfang

commit sha 4fb17001e14de3cca410408eef912899f7f641f5

udpate

view details

push time in 17 days

create barnchFrankFang/jrg-rails-demo-1

branch : master

created branch time in 17 days

created repositoryFrankFang/jrg-rails-demo-1

created time in 17 days

create barnchFrankFang/morney-react-deploy

branch : master

created branch time in 18 days

created repositoryFrankFang/morney-react-deploy

created time in 18 days

push eventFrankFang/morney-13-website

frankfang

commit sha 509c74ada5595f56cffdd2eaf1ba9a31f434a22f

deploy

view details

push time in 18 days

push eventFrankFang/morney-13-website

frankfang

commit sha 3e8d755c64489a4feed89e3a85d4b2a9f0b0e8e9

deploy

view details

push time in 18 days

push eventFrankFang/morney-13-website

frankfang

commit sha e6f3f35e4e7e10768c069b39b4a2e4ea9e519b14

deploy

view details

push time in 18 days

push eventFrankFang/morney-13-website

frankfang

commit sha e419bb8a43843fc5ae029d9a85d0f4923d2acaca

init

view details

push time in 18 days

create barnchFrankFang/morney-13-website

branch : master

created branch time in 18 days

created repositoryFrankFang/morney-13-website

created time in 18 days

create barnchFrankFang/morney-react-data

branch : master

created branch time in 18 days

created repositoryFrankFang/morney-react-data

created time in 18 days

push eventFrankFang/Surf_the_Internet

Frank Fang

commit sha 670dfc514197c7f4d330a2d80fc6c299dee10895

Update 入门篇.md

view details

push time in 20 days

create barnchFrankFang/morney-react-tag

branch : master

created branch time in 21 days

created repositoryFrankFang/morney-react-tag

created time in 21 days

push eventFrankFang/morney-react-tags

push time in 21 days

push eventFrankFang/morney-react-tags

frankfang

commit sha 0e565e48c63a74913377d370116379d6fba8dc82

创建单独的 Button 组件

view details

frankfang

commit sha 1f7dd7a2493e1f50b022f9d774f69f32558c0de0

创建单独的 Input

view details

frankfang

commit sha e68bce1722a54aeb41e790452617a398d96e9b0a

Tag.tsx 的样式完成

view details

frankfang

commit sha 11340481c2293d9f6e44617da6836af7eb57ccd0

编辑 tag 名

view details

frankfang

commit sha 567610651e1c9a9de758846326a6209a0ff5da66

删除 tag

view details

push time in 21 days

pull request commentvuejs/vite

remove configPath in false condition branches

it makes sence

dsonet

comment created time in 21 days

PR opened vuejs/vite

Fix #111. An empty target dir is ok
+9 -8

0 comment

1 changed file

pr created time in 21 days

push eventFrankFang/vite

frankfang

commit sha 315b3ae3cf2a1448a15f4c89c549dcd76acc953e

Fix #111. An empty target dir is ok

view details

push time in 21 days

push eventFrankFang/vite

frankfang

commit sha 5d6a046f230e7d0f6823be2adb4094ccea4348fb

An empty target dir is ok

view details

push time in 21 days

fork FrankFang/vite

Make Web Dev Fast Again

fork in 21 days

issue openedvuejs/vite

Create vite app in an empty dir

Is your feature request related to a problem? Please describe.

$ mkdir vite-demo-1
$ cd vite-demo-1
$ yarn create vite-app .
Scaffolding project in D:\Fang\Jirengu\vite-demo-1...
Error: target directory already exists.

I believe it's better to create vite app in an empty dir.

created time in 21 days

push eventFrankFang/westore-react-1

frankfang

commit sha 494e7a218467c9815eaf4fd9fcd020090ac4a007

update

view details

frankfang

commit sha ede29f4c2a3bb8bd593062a10f86332abae6b4cf

错误处理

view details

frankfang

commit sha 161e966fc63fd4410403db8ed734b2b1c6fa3694

core-js

view details

frankfang

commit sha 57a69222bd89371bfd13258191e4e35145b801d6

order 页面

view details

frankfang

commit sha 88d8b9603d6d6c4570669c0e6cad751a82a50b1f

结算功能

view details

frankfang

commit sha a1950605dc8e9d076982b001aa0f3c5c63aaefa5

add pay view

view details

frankfang

commit sha 330a43b8ec983a786237903b3fe1df8146657a5c

更新订单

view details

frankfang

commit sha be5a257feeffb75a18619b501920bbcae98ac272

orders

view details

frankfang

commit sha c4d05296a76eb86f7f562718b6a9f5d424dcc67b

fake pay button

view details

frankfang

commit sha d8781c4e7d84ab756cedaae41880c6a97a001c2c

my orders

view details

frankfang

commit sha 941b099805725749cb5cc6b4879b6c2be1a47e0a

fake pay

view details

frankfang

commit sha 0821d877074f676568aa4e2ad8d04eca8a056beb

update

view details

frankfang

commit sha 5918f9ab58637b152e2bf4b1daed27ad7e672d48

删除商品

view details

frankfang

commit sha 8db34dc1e42cff2423e3accdb643923e26cb35a9

添加导航

view details

push time in 23 days

issue openedhcsp/wxshop

[bug] 删除 goods 报错

curl 'http://localhost:8010/api/v1/goods/88' \
  -X 'DELETE' \
  -H 'Connection: keep-alive' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36' \
  -H 'DNT: 1' \
  -H 'Origin: http://localhost:3000' \
  -H 'Sec-Fetch-Site: same-site' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Referer: http://localhost:3000/' \
  -H 'Accept-Language: zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7' \
  --compressed
{"message":"无权访问!","data":null}

我确定我有权访问这个goods

created time in 23 days

issue commenthcsp/wxshop

[bug] 更新 order 报错

curl 'http://localhost:8010/api/v1/order/3' \
  -X 'PATCH' \
  -H 'Connection: keep-alive' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'DNT: 1' \
  -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36' \
  -H 'Content-Type: application/json;charset=UTF-8' \
  -H 'Origin: http://localhost:3000' \
  -H 'Sec-Fetch-Site: same-site' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Referer: http://localhost:3000/' \
  -H 'Accept-Language: zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7' \
  --data-binary '{"expressCompany":"111","expressId":"222"}' \
  --compressed
FrankFang

comment created time in 23 days

issue openedhcsp/wxshop

[bug] 更新 order 报错

curl 'http://localhost:8010/api/v1/order/3' \
  -X 'PATCH' \
  -H 'Connection: keep-alive' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'DNT: 1' \
  -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36' \
  -H 'Content-Type: application/json;charset=UTF-8' \
  -H 'Origin: http://localhost:3000' \
  -H 'Sec-Fetch-Site: same-site' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Referer: http://localhost:3000/' \
  -H 'Accept-Language: zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7' \
  --data-binary '{"status":"paid"}' \
  --compressed
{"timestamp":"2020-05-07T18:51:50.843+0000","status":500,"error":"Internal Server Error","message":"No message available","path":"/api/v1/order/3"}

created time in 23 days

issue openedhcsp/wxshop

[API request] shop's orders

我需要获取某个 shop 下的所有 orders。 因为 shop 的主人需要查看这些 orders,并且更新物流信息。

created time in 23 days

issue openedhcsp/wxshop

[API request] get specific order

需要「获取指定 id 的 order」接口

created time in 23 days

issue closedhcsp/wxshop

[bug] 中文变成了问号

1 创建 shop 成功,得到响应

{"message":null,"data":{"id":1,"name":"小明的店铺1","description":"专门卖前端书籍","imgUrl":"","ownerUserId":9,"status":"ok","createdAt":"2020-05-04T15:12:15.121+0000","updatedAt":"2020-05-04T15:12:15.121+0000"}}

2 请求 shop,发现 name 是问号

{"pageNum":1,"pageSize":10,"totalPage":1,"data":[{"id":7,"name":"?????1","description":"111","imgUrl":"","ownerUserId":2,"status":"ok","createdAt":"2020-05-04T15:11:16.000+0000","updatedAt":"2020-05-04T15:11:16.000+0000"}]}

closed time in 23 days

FrankFang

issue closedhcsp/wxshop

[bug] /api/v1/goods 总是返回所有店铺的商品,没有读取 shopId

GET /api/v1/goods?pageNum=1&pageSize=10&shopId=10 HTTP/1.1
Host: localhost:8010
Proxy-Connection: keep-alive
Accept: application/json, text/plain, */*
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36
Origin: http://localhost:3000
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: http://localhost:3000/
Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN,zh;q=0.9
Cookie: JSESSIONID=f4d22136-d6ac-4419-9fa7-28e6af4748e9; rememberMe=c5vwHxirLb/sOBz3O5nVWTSrtmbRhtuHEGZNT3V7+ip1tHZjSNBaZQqMVm/05F10kVvug9iB3ihQD9QR6OSc7nZrR2JFxtguLu+kbomYHmAL3srSaDm5BNkuV4dYepIplDxKj+IKCbQ7yXtyeuALZvFvLVL/jqWngMARwAWK8rs07upDTqGHybab5g/qojog9db+JRfWYpvs0E6q1BEVXKf6Xn3YgNdEDgtCm4VB6R5zgBNObMC/m51DWQKyhH3YI87s+1kk2+dQRJGmvRqcQKFMCJrrSAHwPFappT8qKwuMNJj4nc0GrmdmebsNbDRTtsUUTP2rxuCJeLLp8b683SN+ejGTuxh70wyFpTwvWNAbWSxOSE8fme7iKMYZyPchPEw9xsrF5ycVJOmHlQfzoTTI8XD4yIi+RCzyGrLovY/LYgky9LtSfSM0fw/UkZMF2K8x1U21t7tMDHM/gz/IjGCpsuiKfwb1irihJAx4DizXw1Yd8SFImXGksD5pGXMBUjO4g4iK9exPjYCjm5M2T7kXmVxUwelp3SrXppwxGneeBL8=
{"pageNum":1,"pageSize":10,"totalPage":0,"data":[{"id":1,"shopId":1,"name":"goods1","description":"desc1","imgUrl":"url1","price":100,"stock":5,"status":"ok","createdAt":"2020-05-04T16:00:00.000+0000","updatedAt":"2020-05-04T16:00:00.000+0000","details":null},{"id":2,"shopId":1,"name":"goods2","description":"desc2","imgUrl":"url2","price":100,"stock":5,"status":"ok","createdAt":"2020-05-04T16:00:00.000+0000","updatedAt":"2020-05-04T16:00:00.000+0000","details":null},{"id":3,"shopId":2,"name":"goods3","description":"desc2","imgUrl":"url3","price":100,"stock":5,"status":"ok","createdAt":"2020-05-04T16:00:00.000+0000","updatedAt":"2020-05-04T16:00:00.000+0000","details":null},{"id":4,"shopId":2,"name":"goods4","description":"desc2","imgUrl":"url4","price":100,"stock":5,"status":"ok","createdAt":"2020-05-04T16:00:00.000+0000","updatedAt":"2020-05-04T16:00:00.000+0000","details":null},{"id":5,"shopId":2,"name":"goods5","description":"desc2","imgUrl":"url5","price":200,"stock":5,"status":"ok","createdAt":"2020-05-04T16:00:00.000+0000","updatedAt":"2020-05-04T16:00:00.000+0000","details":null}]}

closed time in 23 days

FrankFang

push eventFrankFang/westore-react-1

frankfang

commit sha 8a4d4a6a7199d362cd272d695a080875430a51be

更新域名

view details

push time in 25 days

push eventFrankFang/westore-react-1

frankfang

commit sha 786f20b33b9ce5096f1397269a6ecee2a92f3fe9

remove cypress

view details

push time in 25 days

push eventFrankFang/westore-react-1

frankfang

commit sha f2b1981edf7e0014a11eb0a6d46e74c4c1cf6890

update api endport

view details

push time in 25 days

push eventFrankFang/westore-react-1

frankfang

commit sha 0ed4ec331e896ee698203890e5e92c0a579a7de5

remove cypress

view details

push time in 25 days

issue commentyarnpkg/yarn

Add package without saving to package.json

I have to yarn install xxx then yarn remove xxx.

whitecolor

comment created time in 25 days

create barnchFrankFang/westore-react-1

branch : master

created branch time in 25 days

created repositoryFrankFang/westore-react-1

created time in 25 days

issue commentwebpack/webpack-dev-server

Add ability to completely disable auto reload

@janakaud But, this method just stops the compiling job.

pawelpabich

comment created time in 25 days

issue openedhcsp/wxshop

[bug] /api/v1/code return 401

因为失效的cookie

created time in a month

issue openedhcsp/wxshop

[bug] /api/v1/goods 总是返回所有店铺的商品,没有读取 shopId

GET /api/v1/goods?pageNum=1&pageSize=10&shopId=10 HTTP/1.1
Host: localhost:8010
Proxy-Connection: keep-alive
Accept: application/json, text/plain, */*
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36
Origin: http://localhost:3000
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: http://localhost:3000/
Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN,zh;q=0.9
Cookie: JSESSIONID=f4d22136-d6ac-4419-9fa7-28e6af4748e9; rememberMe=c5vwHxirLb/sOBz3O5nVWTSrtmbRhtuHEGZNT3V7+ip1tHZjSNBaZQqMVm/05F10kVvug9iB3ihQD9QR6OSc7nZrR2JFxtguLu+kbomYHmAL3srSaDm5BNkuV4dYepIplDxKj+IKCbQ7yXtyeuALZvFvLVL/jqWngMARwAWK8rs07upDTqGHybab5g/qojog9db+JRfWYpvs0E6q1BEVXKf6Xn3YgNdEDgtCm4VB6R5zgBNObMC/m51DWQKyhH3YI87s+1kk2+dQRJGmvRqcQKFMCJrrSAHwPFappT8qKwuMNJj4nc0GrmdmebsNbDRTtsUUTP2rxuCJeLLp8b683SN+ejGTuxh70wyFpTwvWNAbWSxOSE8fme7iKMYZyPchPEw9xsrF5ycVJOmHlQfzoTTI8XD4yIi+RCzyGrLovY/LYgky9LtSfSM0fw/UkZMF2K8x1U21t7tMDHM/gz/IjGCpsuiKfwb1irihJAx4DizXw1Yd8SFImXGksD5pGXMBUjO4g4iK9exPjYCjm5M2T7kXmVxUwelp3SrXppwxGneeBL8=
{"pageNum":1,"pageSize":10,"totalPage":0,"data":[{"id":1,"shopId":1,"name":"goods1","description":"desc1","imgUrl":"url1","price":100,"stock":5,"status":"ok","createdAt":"2020-05-04T16:00:00.000+0000","updatedAt":"2020-05-04T16:00:00.000+0000","details":null},{"id":2,"shopId":1,"name":"goods2","description":"desc2","imgUrl":"url2","price":100,"stock":5,"status":"ok","createdAt":"2020-05-04T16:00:00.000+0000","updatedAt":"2020-05-04T16:00:00.000+0000","details":null},{"id":3,"shopId":2,"name":"goods3","description":"desc2","imgUrl":"url3","price":100,"stock":5,"status":"ok","createdAt":"2020-05-04T16:00:00.000+0000","updatedAt":"2020-05-04T16:00:00.000+0000","details":null},{"id":4,"shopId":2,"name":"goods4","description":"desc2","imgUrl":"url4","price":100,"stock":5,"status":"ok","createdAt":"2020-05-04T16:00:00.000+0000","updatedAt":"2020-05-04T16:00:00.000+0000","details":null},{"id":5,"shopId":2,"name":"goods5","description":"desc2","imgUrl":"url5","price":200,"stock":5,"status":"ok","createdAt":"2020-05-04T16:00:00.000+0000","updatedAt":"2020-05-04T16:00:00.000+0000","details":null}]}

created time in a month

issue openedhcsp/wxshop

[bug] 中文变成了问号

1 创建 shop 成功,得到响应

{"message":null,"data":{"id":1,"name":"小明的店铺1","description":"专门卖前端书籍","imgUrl":"","ownerUserId":9,"status":"ok","createdAt":"2020-05-04T15:12:15.121+0000","updatedAt":"2020-05-04T15:12:15.121+0000"}}

2 请求 shop,发现问号

{"pageNum":1,"pageSize":10,"totalPage":1,"data":[{"id":7,"name":"?????1","description":"111","imgUrl":"","ownerUserId":2,"status":"ok","createdAt":"2020-05-04T15:11:16.000+0000","updatedAt":"2020-05-04T15:11:16.000+0000"}]}

created time in a month

issue openedhcsp/wxshop

[bug] 登出报错

2020-05-04 05:05:13.785 [http-nio-8080-exec-10] ERROR org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool] with root cause
java.net.SocketTimeoutException: connect timed out
        at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
        at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
        at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
        at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
        at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
        at java.net.PlainSocketImpl.connect(Unknown Source)
        at java.net.SocksSocketImpl.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at redis.clients.jedis.Connection.connect(Connection.java:181)
        at redis.clients.jedis.BinaryClient.connect(BinaryClient.java:100)
        at redis.clients.jedis.BinaryJedis.connect(BinaryJedis.java:1866)
        at redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:117)
        at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:889)
        at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:424)
        at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:349)
        at redis.clients.jedis.util.Pool.getResource(Pool.java:50)
        at redis.clients.jedis.JedisPool.getResource(JedisPool.java:234)
        at org.crazycake.shiro.RedisManager.getJedis(RedisManager.java:35)
        at org.crazycake.shiro.WorkAloneRedisManager.get(WorkAloneRedisManager.java:50)
        at org.crazycake.shiro.RedisCache.remove(RedisCache.java:114)
        at org.apache.shiro.realm.AuthorizingRealm.clearCachedAuthorizationInfo(AuthorizingRealm.java:387)
        at org.apache.shiro.realm.AuthorizingRealm.doClearCache(AuthorizingRealm.java:666)
        at org.apache.shiro.realm.CachingRealm.clearCache(CachingRealm.java:170)
        at org.apache.shiro.realm.CachingRealm.onLogout(CachingRealm.java:152)
        at org.apache.shiro.authc.pam.ModularRealmAuthenticator.onLogout(ModularRealmAuthenticator.java:296)
        at org.apache.shiro.mgt.DefaultSecurityManager.logout(DefaultSecurityManager.java:563)
        at org.apache.shiro.subject.support.DelegatingSubject.logout(DelegatingSubject.java:367)
        at com.hcsp.wxshop.controller.AuthController.logout(AuthController.java:131)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)
        at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
        at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:879)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793)
        at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
        at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
        at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
        at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
        at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:387)
        at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
        at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:367)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1639)
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Unknown Source)

created time in a month

issue closedhcsp/wxshop

[improve] /api/v1/status 响应改进

如果用户未登录,会返回状态码 401。 如果用户已登录,那么响应中的 login: true 就是多余的。

不如在用户已登录的时候,把响应改成这样,还能跟其他接口保持命名一致:

HTTP/1.1 200 OK
{
  "data": {
      "id": 123,
      "name": "张三",
      "tel": "13812345678",
      "avatarUrl": "https://url",
      "address": "北京市 西城区 100号",
  }
}

closed time in a month

FrankFang

issue commenthcsp/wxshop

[improve] /api/v1/status 响应改进

文档与实际不符

FrankFang

comment created time in a month

issue openedhcsp/wxshop

[improve] /api/v1/status 响应不合理

如果用户未登录,会返回状态码 401。 如果用户已登录,那么响应中的 login: true 就是多余的。

不如在用户已登录的时候,把响应改成这样,还能跟其他接口保持命名一致:

HTTP/1.1 200 OK
{
  "data": {
      "id": 123,
      "name": "张三",
      "tel": "13812345678",
      "avatarUrl": "https://url",
      "address": "北京市 西城区 100号",
  }
}

created time in a month

startedpikapkg/snowpack

started time in a month

pull request commentzeit/swr

Proof-of-concept mutateMany implementation

I like this api.

kelleyvanevert

comment created time in a month

issue commentcnpm/cnpmjs.org

cypress二进制包路径与淘宝源的不符

把 cypress.io 加入 proxifier 的翻墙白名单吧。

zenml

comment created time in a month

issue commenthcsp/wxshop

[bug] shoppingCart is empty

另一个 bug 是,如果多次将一个 goods 加入购物车,得到的 shoppingCart 会包含多个相同的 goods 对象

FrankFang

comment created time in a month

issue openedhcsp/wxshop

[bug] shoppingCart is empty

1 add goods to shoppingCart

curl 'http://localhost:8010/api/v1/shoppingCart' \
  -H 'Connection: keep-alive' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'DNT: 1' \
  -H 'User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1' \
  -H 'Content-Type: application/json;charset=UTF-8' \
  -H 'Origin: http://localhost:3000' \
  -H 'Sec-Fetch-Site: same-site' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Referer: http://localhost:3000/' \
  -H 'Accept-Language: zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7' \
  -H 'Cookie: JSESSIONID=9c3282a5-c749-4ef9-b169-782234dfb800; rememberMe=IkA457CEDCE8JZABDnVZDmFs3jQztS5tc+RGhrOsBibd2J/iQvTN9ZnBE1lGijKmQj0b0PXosCVY637bB9dnI3KEVMAm+kpiKe7ZRRgAOCygATDRfBMtYuwIzJ1FQTrpTYwxL16uX6gAZ8UduCG3PaFITBvwazcuWoDGrIoP5taXbt4A2fz2tSdgD14uiz5SUMysQbhsLfL1d488jcpl2AkUYrdKwMg8gg4rbOUR6cp+dq2YQPJ3c5Rx8+zS/nPwHeTkv+TU3VBuX57kg/ah+hMqEWjc8Uqb2Fh44c/PUcF8T/g9os1nEIkx41sOod+CWA4LHFKMRw0Pc8wvAN/RMtYGaNSTRBI+tA7yQEWjrBVwwkQESgRCDr4+OlYtKD8SxF+4BPgjj3/6pfdvgBtuJCIEmNVj9g+ul2MG740C9/+r+fYmQ9DQwO787poYqTU7njNoD2D+HvO6eKzwAHUtr0YVPC3aI7BGZ/us1a05e+HFldA+PZ+YPufoC9y5PYxpG15apTvkknOfcnoXdSdVXOLU9S5KywRxP7bxxVlB1qTRcTY=' \
  --data-binary '{"goods":[{"id":"1","number":1}]}' \
  --compressed

with response

{"message":null,"data":{"shop":{"id":1,"name":"shop1","description":"desc1","imgUrl":"url1","ownerUserId":1,"status":null,"createdAt":"2020-04-21T16:12:12.000+0000","updatedAt":"2020-04-21T16:12:12.000+0000"},"goods":[{"id":1,"shopId":1,"name":"goods1","description":"desc1","imgUrl":"url1","price":100,"stock":null,"status":"ok","createdAt":"2020-04-21T16:12:12.000+0000","updatedAt":"2020-04-21T16:12:12.000+0000","details":"desc1","number":1},{"id":1,"shopId":1,"name":"goods1","description":"desc1","imgUrl":"url1","price":100,"stock":null,"status":"ok","createdAt":"2020-04-21T16:12:12.000+0000","updatedAt":"2020-04-21T16:12:12.000+0000","details":"desc1","number":1},{"id":1,"shopId":1,"name":"goods1","description":"desc1","imgUrl":"url1","price":100,"stock":null,"status":"ok","createdAt":"2020-04-21T16:12:12.000+0000","updatedAt":"2020-04-21T16:12:12.000+0000","details":"desc1","number":1}]}}

2 get shoppingCart

curl 'http://localhost:8010/api/v1/shoppingCart?pageSize=100&pageNum=1' \
  -H 'Connection: keep-alive' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1' \
  -H 'DNT: 1' \
  -H 'Origin: http://localhost:3000' \
  -H 'Sec-Fetch-Site: same-site' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Referer: http://localhost:3000/' \
  -H 'Accept-Language: zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7' \
  -H 'Cookie: JSESSIONID=9c3282a5-c749-4ef9-b169-782234dfb800; rememberMe=IkA457CEDCE8JZABDnVZDmFs3jQztS5tc+RGhrOsBibd2J/iQvTN9ZnBE1lGijKmQj0b0PXosCVY637bB9dnI3KEVMAm+kpiKe7ZRRgAOCygATDRfBMtYuwIzJ1FQTrpTYwxL16uX6gAZ8UduCG3PaFITBvwazcuWoDGrIoP5taXbt4A2fz2tSdgD14uiz5SUMysQbhsLfL1d488jcpl2AkUYrdKwMg8gg4rbOUR6cp+dq2YQPJ3c5Rx8+zS/nPwHeTkv+TU3VBuX57kg/ah+hMqEWjc8Uqb2Fh44c/PUcF8T/g9os1nEIkx41sOod+CWA4LHFKMRw0Pc8wvAN/RMtYGaNSTRBI+tA7yQEWjrBVwwkQESgRCDr4+OlYtKD8SxF+4BPgjj3/6pfdvgBtuJCIEmNVj9g+ul2MG740C9/+r+fYmQ9DQwO787poYqTU7njNoD2D+HvO6eKzwAHUtr0YVPC3aI7BGZ/us1a05e+HFldA+PZ+YPufoC9y5PYxpG15apTvkknOfcnoXdSdVXOLU9S5KywRxP7bxxVlB1qTRcTY=' \
  --compressed

with empty response

{"pageNum":1,"pageSize":100,"totalPage":1,"data":[]}

created time in a month

issue closedhcsp/wxshop

[BUG] return 200 for CORS preflight requests

根据 CORS 的要求,当请求的 method 是 POST / PUT / PATCH 时,浏览器 会先发一个 OPTIONS 预请求,询问服务器是否支持这些 method,因此 wxshop server 需要做到对 OPTIONS 请求一律返回 200 状态码(即使没有登录),消息体应该为空,目前的情况是会返回 401。

$ curl -v 'http://localhost:8080/api/v1/shops' -X OPTIONS
* Uses proxy env variable no_proxy == '192.168.99.102'
*   Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 8080 (#0)
> OPTIONS /api/v1/shops HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.61.1
> Accept: */*
>
< HTTP/1.1 401
< Vary: Origin
< Vary: Access-Control-Request-Method
< Vary: Access-Control-Request-Headers
< Access-Control-Allow-Origin: http://localhost:3000
< Access-Control-Allow-Methods: GET, POST, PUT, PATCH, POST, DELETE, OPTIONS
< Access-Control-Allow-Headers: Content-Type
< Access-Control-Allow-Credentials: true
< Allow: GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, PATCH
< Content-Length: 0
< Date: Mon, 27 Apr 2020 13:02:12 GMT
<
* Connection #0 to host localhost left intact

closed time in a month

FrankFang

issue openedhcsp/wxshop

[API request] get shop/:id

created time in a month

issue openedhcsp/wxshop

[feature request] Sort Shop and Goods

created time in a month

issue commentzeit/swr

Pagination example fails in CRA with "'useSWR' cannot be called inside a callback" error

Is there a plan to fix this?

pushred

comment created time in a month

issue commentgarmeeh/local-cors-proxy

thank you.

agreed.

ramzahn

comment created time in a month

issue commentgarmeeh/local-cors-proxy

thank you and empty proxyPartial

--proxyPartial '' this helps.

GabrielDelepine

comment created time in a month

issue openedhcsp/wxshop

[BUG] return 200 for CORS preflight requests

根据 CORS 的要求,当请求的 method 是 POST / PUT / PATCH 时,浏览器 会先发一个 OPTIONS 预请求,询问服务器是否支持这些 method,因此 wxshop server 需要做到对 OPTIONS 请求一律返回 200 状态码(即使没有登录),目前的情况是会返回 401。

$ curl -v 'http://localhost:8080/api/v1/shops' -X OPTIONS
* Uses proxy env variable no_proxy == '192.168.99.102'
*   Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 8080 (#0)
> OPTIONS /api/v1/shops HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.61.1
> Accept: */*
>
< HTTP/1.1 401
< Vary: Origin
< Vary: Access-Control-Request-Method
< Vary: Access-Control-Request-Headers
< Access-Control-Allow-Origin: http://localhost:3000
< Access-Control-Allow-Methods: GET, POST, PUT, PATCH, POST, DELETE, OPTIONS
< Access-Control-Allow-Headers: Content-Type
< Access-Control-Allow-Credentials: true
< Allow: GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, PATCH
< Content-Length: 0
< Date: Mon, 27 Apr 2020 13:02:12 GMT
<
* Connection #0 to host localhost left intact

created time in a month

issue openedhcsp/wxshop

[improve] return 403 instead of 5xx

/api/v1/login 接入遇到 code 不匹配时,不应该返回 5xx。

created time in a month

issue openedhcsp/wxshop

[BUG] Duplicated CORS headers.

当我请求 /api/v1/code 时,得到的响应头里面有两个 CORS headers(重复了)

curl -v 'http://localhost:8080/api/v1/code' \
  -H 'Connection: keep-alive' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'DNT: 1' \
  -H 'User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1' \
  -H 'Content-Type: application/json;charset=UTF-8' \
  -H 'Origin: http://localhost:3000' \
  -H 'Sec-Fetch-Site: same-site' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Referer: http://localhost:3000/' \
  -H 'Accept-Language: zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7' \
  --data-binary '{"tel":"18012341234"}' \
  --compressed

Response

< HTTP/1.1 401
< Access-Control-Allow-Origin: http://localhost:3000
< Access-Control-Allow-Methods: GET, POST, PUT, PATCH, POST, DELETE, OPTIONS
< Access-Control-Allow-Headers: Content-Type
< Access-Control-Allow-Origin: http://localhost:3000
< Access-Control-Allow-Methods: GET, POST, PUT, PATCH, POST, DELETE, OPTIONS
< Access-Control-Allow-Headers: Content-Type
< Content-Length: 0
< Date: Sat, 25 Apr 2020 19:55:06 GMT
< Keep-Alive: timeout=60
< Connection: keep-alive
<
* Connection #0 to host localhost left intact

created time in a month

startedphilostler/rspec-sidekiq

started time in a month

issue commenthcsp/wxshop

[feature request] 开发环境需要 CORS header

纠正,应该是 Access-Control-Allow-Origin: http://localhost:3000 https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin#Examples

FrankFang

comment created time in a month

delete branch hcsp/wxshop

delete branch : update-cors

delete time in a month

push eventhcsp/wxshop

frankfang

commit sha 5e3dd2c3e6c25bf5a6c11f784aa36666f8e23a9d

update README

view details

frankfang

commit sha ea33ae202f9fb6d3c90605faa744f36188bacd4e

Merge branch 'master' of https://github.com/hcsp/wxshop

view details

frankfang

commit sha f4540e098a10b0d07f2c7cb41e4b350f2340d90b

update cors headers

view details

Frank Fang

commit sha 4a73f3d543add0cb2680fe740717a55d0e0f4cf4

Merge pull request #4 from hcsp/update-cors Update cors

view details

push time in a month

PR merged hcsp/wxshop

Update cors
+3 -2

0 comment

2 changed files

FrankFang

pr closed time in a month

PR opened hcsp/wxshop

Update cors
+3 -2

0 comment

2 changed files

pr created time in a month

create barnchhcsp/wxshop

branch : update-cors

created branch time in a month

issue openedhcsp/wxshop

[feature request] 开发环境需要 CORS header

在 dev 环境开启 server 时,如果所有请求都能带上一个 Access-Control-Allow-Origin: localhost:3000 那么前端开发就会更方便了。

created time in a month

more