KO
|
EN
gitlite — search
Search
#javascript
#python
#hacktoberfest
#react
#ai
#typescript
#llm
#go
#golang
#android
#machine-learning
#rust
#deep-learning
#linux
CzyShoppingCar
★ 8
Open GitHub ↗
仿淘宝购物订单逻辑
Download README (.md)
Explore Similar Repositories
tracking
:
Compare Compressive Tracker and KCF Tracker
okhttp-android-tests
:
Set of Android instrumentation tests for OkHttp.
stalker_pyramid2
:
A Pyramid Web Application Build On Top of Stalker
rails-api-template
:
Rails API Only Template
slide_thesis_ioslides
:
The slide for my thesis defence using ioslides in Rstudio.
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
CzyShoppingCar
?
Download (.md)
仿淘宝购物订单逻辑 设计模式MVC 控制器450行代码 cell 280行代码 实现类似淘宝购物车的选择,编辑,删除等功能 ### 选择: 关键逻辑代码: 1, 点击全选按钮,更新其他按钮状态: // >!更新商里每个商品选择状态 - (void)updateGoodsSelectedState { for (GoodsModel * model in self.czyGoodsList) { model.isGoodsSelected = self.isShopSelected; } } 2,点击商店更新商品状态: - (void)updateTotalBtnSelectedState:(BOOL)state { self.isShopSelected = state; for (GoodsModel * model in self.czyGoodsList) { model.isGoodsSelected = state; } } 3, 点击商品更改商店和全选按钮状态: - (void)updateShopSeletedState { // 数量为0 if (self.czyGoodsList.count == 0) { self.isShopSelected = NO; return; } for (GoodsModel * model in self.czyGoodsList) { // 一个未选中 则为未选中 if (model.isGoodsSelected == NO) { self.isShopSelected = NO; return; } } self.isShopSelected = YES; } 效果图:  ### 编辑: // >!更新商店内每个商品编辑状态: - (void)updateGoodsEditState:(CzyCellStyle)style { for (GoodsModel * model in self.czyGoodsList) { model.goodEditStyle = style; } } 效果图: 