Last active
October 21, 2016 02:59
-
-
Save jackyshan/b1cf481a9a9693665dccb8eea231e779 to your computer and use it in GitHub Desktop.
jspatch阳淘3.0.0tabbar隐藏补丁包
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('YTProductDescViewController') | |
require('YTGetProductInfoParamsModel') | |
require('JKReportHelper') | |
require('YTWishCollectionViewCell') | |
require('YTWishProduct') | |
require('UIViewController+BCMagicTransition') | |
defineClass("YTWishViewController", { | |
//instance method definitions | |
collectionView_didSelectItemAtIndexPath: function(collectionView, indexPath) { | |
console.log("开始补丁"); | |
//model参数提取 | |
var descVC = YTProductDescViewController.alloc().init(); | |
console.log("开始补丁1"); | |
var row = indexPath.row(); | |
var product = self.dataArr().objectAtIndex(row); | |
console.log("开始补丁2"); | |
var model = YTGetProductInfoParamsModel.alloc().init(); | |
console.log("开始补丁3"); | |
var url = product.officialUrl(); | |
console.log("开始补丁4"); | |
model.setUrl(url); | |
console.log("开始补丁5"); | |
model.setProduct_id(product.ID()); | |
model.setKeyword("wish"); | |
descVC.setParamsModel(model); | |
console.log("can shu tiqu wancheng"); | |
//push动画 | |
var cell = collectionView.cellForItemAtIndexPath(indexPath); | |
var urlArr = []; | |
urlArr.push(product.pic()); | |
descVC.bannerView().setUrlArray(urlArr); | |
// self.pushViewController(descVC).fromView(cell.imageView()).toView(descVC.bannerView()).duration(0.35); | |
self.pushViewController_fromView_toView_duration(descVC, cell.imageView(), descVC.bannerView(), 0.35); | |
console.log("push动画wancheng"); | |
//上报数据 | |
JKReportHelper.reportClickProduct(product); | |
//改变tabb | |
self.changeTabBar_animated(false, false); | |
console.log("js补丁完成"); | |
} | |
}, {}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defineClass("YTWishViewController", { | |
//instance method definitions | |
scrollViewDidScroll: function(scrollView) { | |
if (self.navigationController().childViewControllers().count() > 1) { | |
return; | |
} | |
if (scrollView.panGestureRecognizer().translationInView(scrollView).y < 0) { | |
self.changeTabBar_animated(true, true); | |
} else { | |
self.changeTabBar_animated(false, true); | |
} | |
} | |
}, {}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment