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

有个bug,一个商品达到限购数量后其他商品都无法加入购物车了 #57

Open
Argentinaleo opened this issue Apr 11, 2023 · 1 comment

Comments

@Argentinaleo
Copy link

原因是详情页这个加入购物车按钮的disable是由data中dis变量控制的,而datail组件作为缓存路由组件dis变量会沿用之前的,所以一旦一个商品达到限购后dis就永久变成true了,然后导致其他所有商品详情页的加入购物车按钮都失效了,解决方法就是在activated生命周期中重置一下this.dis = false就好了

@wiu-sexy
Copy link

请问如何解决跨域问题?
image

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