Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

秒杀输入手机号问题 #9

Closed
chenziqiang666 opened this issue May 9, 2019 · 8 comments
Closed

秒杀输入手机号问题 #9

chenziqiang666 opened this issue May 9, 2019 · 8 comments

Comments

@chenziqiang666
Copy link

大佬你好,我在github上看到了你的秒杀项目,想问一下:
1.第一次启动项目时可以输入手机号,后来启动就再也没有输入手机号这个功能了是什么原因?
2.这个项目可以用测试工具测试吗?

@bootsrc
Copy link
Owner

bootsrc commented May 9, 2019

  1. 回答问题1

原因是手机号被js存入浏览器端端cookie中了。在seckill.js的131行左右
//电话写入cookie $.cookie('killPhone', inputPhone, {expires: 7, path: '/seckill'});

  1. 回答问题2
    压力测试,推荐用jmeter进行压力测试

@chenziqiang666
Copy link
Author

谢谢大佬,我去试试

@chenziqiang666
Copy link
Author

大佬,又来打扰你了,我现在还在尝试Jmeter测试,但是传参中还是有问题,例如
http://localhost:27000/seckill/detail/1000?phone=12312312312
这么传不行,那这个phone应该怎么传啊,是只把他作为cookie传吗,cookie的话应该都传什么值呢

@chenziqiang666
Copy link
Author

QQ截图20190610232114
我试了一下postman

@chenziqiang666
Copy link
Author

http://localhost:27000/seckill/execution/1000/12345678912/c2097fe5d7ddf03207e4c3126b3d57b8
我试了一下这个也不行

@chenziqiang666
Copy link
Author

这个路径只能是排队中,怎么能让他进行秒杀活动呢

@bootsrc
Copy link
Owner

bootsrc commented Jun 12, 2019

http://localhost:27000/seckill/execution/1000/12345678912/c2097fe5d7ddf03207e4c3126b3d57b8
这里的md5值,应该取浏览器里cookie里保存的那个值, 而不是自己随便写的一个值。
cookie在浏览器F12的有的请求里,可以找的的。

@bootsrc bootsrc closed this as completed Oct 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants