Commit 28b44508 authored by 曹云霄's avatar 曹云霄

优化数组可能越界

parent 67875294
......@@ -7,6 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
293EAD3B1F0E3D1400DB4907 /* NSArray+Objectwithindex.m in Sources */ = {isa = PBXBuildFile; fileRef = 293EAD3A1F0E3D1400DB4907 /* NSArray+Objectwithindex.m */; };
29D226211F0647100053E816 /* AnnouncementContentTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 29D223281F06470F0053E816 /* AnnouncementContentTableViewCell.m */; };
29D226221F0647100053E816 /* AnnouncementListTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 29D2232A1F06470F0053E816 /* AnnouncementListTableViewCell.m */; };
29D226231F0647100053E816 /* AnnouncementTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 29D2232C1F06470F0053E816 /* AnnouncementTableViewCell.m */; };
......@@ -326,6 +327,8 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
293EAD391F0E3D1400DB4907 /* NSArray+Objectwithindex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+Objectwithindex.h"; sourceTree = "<group>"; };
293EAD3A1F0E3D1400DB4907 /* NSArray+Objectwithindex.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+Objectwithindex.m"; sourceTree = "<group>"; };
29D223221F0646870053E816 /* Lighting.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Lighting.app; sourceTree = BUILT_PRODUCTS_DIR; };
29D223271F06470F0053E816 /* AnnouncementContentTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnnouncementContentTableViewCell.h; sourceTree = "<group>"; };
29D223281F06470F0053E816 /* AnnouncementContentTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AnnouncementContentTableViewCell.m; sourceTree = "<group>"; };
......@@ -943,6 +946,15 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
293EAD381F0E3D1400DB4907 /* Category */ = {
isa = PBXGroup;
children = (
293EAD391F0E3D1400DB4907 /* NSArray+Objectwithindex.h */,
293EAD3A1F0E3D1400DB4907 /* NSArray+Objectwithindex.m */,
);
path = Category;
sourceTree = "<group>";
};
29706D981CD082980003C412 = {
isa = PBXGroup;
children = (
......@@ -970,6 +982,7 @@
29D223241F06470F0053E816 /* Class */ = {
isa = PBXGroup;
children = (
293EAD381F0E3D1400DB4907 /* Category */,
29D223251F06470F0053E816 /* Announcement */,
29D2233A1F06470F0053E816 /* Experiencecentre */,
29D223641F06470F0053E816 /* FullScreen */,
......@@ -2979,6 +2992,7 @@
29D227151F0647100053E816 /* WithdrawalViewController.m in Sources */,
29D226601F0647100053E816 /* TriangleIndicatorView.m in Sources */,
29D227491F0647100053E816 /* BaseViewController.m in Sources */,
293EAD3B1F0E3D1400DB4907 /* NSArray+Objectwithindex.m in Sources */,
29D2274C1F0647100053E816 /* CustomWKWebViewController.m in Sources */,
29D226741F0647100053E816 /* OnlineLearningTableViewCell.m in Sources */,
29D227091F0647100053E816 /* BindingTableViewCell.m in Sources */,
......
//
// NSArray+Objectwithindex.h
// Lighting
//
// Created by 曹云霄 on 16/4/28.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSArray (Objectwithindex)
- (id)objectAtIndex_opple:(NSUInteger)index;
@end
//
// NSArray+Objectwithindex.m
// Lighting
//
// Created by 曹云霄 on 16/4/28.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "NSArray+Objectwithindex.h"
@implementation NSArray (Objectwithindex)
- (id)objectAtIndex_opple:(NSUInteger)index;
{
if (index>=self.count) {
return nil;
}
id value = [self objectAtIndex_opple:index];
if (value == [NSNull null]) {
return nil;
}
return value;
}
@end
......@@ -115,7 +115,7 @@
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
sceneScreeningCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"sceneScreeningCollectionViewCell" forIndexPath:indexPath];
SceneListModel *model = [self.sceneDatasArray objectAtIndex:indexPath.item];
SceneListModel *model = [self.sceneDatasArray objectAtIndex_opple:indexPath.item];
[cell.selectedScrenImageView sd_setImageWithURL:[NSURL URLWithString:model.pricure] placeholderImage:REPLACEIMAGE];
cell.selectedScrenImageView.tag = indexPath.item+100;
cell.selectedScrenImageView.userInteractionEnabled = YES;
......@@ -137,7 +137,7 @@
for (SceneListModel *model in self.sceneDatasArray) {
model.isSelectedSate = NO;
}
SceneListModel *model = [self.sceneDatasArray objectAtIndex:indexPath.item];
SceneListModel *model = [self.sceneDatasArray objectAtIndex_opple:indexPath.item];
model.isSelectedSate = YES;
[self.sceneImageView sd_setImageWithURL:[NSURL URLWithString:model.pricure] placeholderImage:REPLACEIMAGE];
[self.sceneScrollview reloadData];
......@@ -156,7 +156,7 @@
ProductScreeningTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ProductScreeningTableViewCell" forIndexPath:indexPath];
cell.backgroundColor = [UIColor clearColor];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
TOGoodsEntityModel *model = [self.productDatasArray objectAtIndex:indexPath.row];
TOGoodsEntityModel *model = [self.productDatasArray objectAtIndex_opple:indexPath.row];
if (model.isSelectedState) {
cell.selectedGoodsImageView.layer.borderWidth = 2.0f;
cell.selectedGoodsImageView.layer.borderColor = kMainBlueColor.CGColor;
......@@ -182,7 +182,7 @@
{
WS(weakSelf);
ProductScreeningTableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
TOGoodsEntityModel *model = [self.productDatasArray objectAtIndex:indexPath.row];
TOGoodsEntityModel *model = [self.productDatasArray objectAtIndex_opple:indexPath.row];
CGRect cellRect = [cell convertRect:cell.bounds toView:self.view];
GoodsImageView *imageView = [[GoodsImageView alloc]initWithFrame:cellRect];
imageView.model = model;
......@@ -479,7 +479,7 @@
//场景
SceneListModel *sceneModel = [(SceneListModel *)model copy];
for (int i=0; i<self.sceneDatasArray.count; i++) {
SceneListModel * model = [self.sceneDatasArray objectAtIndex:i];
SceneListModel * model = [self.sceneDatasArray objectAtIndex_opple:i];
if ([model.fid isEqualToString:sceneModel.fid]) {
isThere(YES);
[self.sceneDatasArray removeObject:model];
......@@ -495,7 +495,7 @@
//产品
TOGoodsEntityModel *goodsModel = [(TOGoodsEntityModel *)model copy];
for (int i=0; i<self.productDatasArray.count; i++) {
TOGoodsEntityModel *model = [self.productDatasArray objectAtIndex:i];
TOGoodsEntityModel *model = [self.productDatasArray objectAtIndex_opple:i];
if ([model.fid isEqualToString:goodsModel.fid]) {
isThere(YES);
[self.productDatasArray removeObject:model];
......@@ -569,8 +569,8 @@
if (![images containsObject:imageView.showImageViewAddress])continue;
NSInteger index = [images indexOfObject:imageView.showImageViewAddress];
if (index < images.count-1) {
[imageView sd_setImageWithURL:[NSURL URLWithString:[images objectAtIndex:index+=1]]];
imageView.showImageViewAddress = [images objectAtIndex:index];
[imageView sd_setImageWithURL:[NSURL URLWithString:[images objectAtIndex_opple:index+=1]]];
imageView.showImageViewAddress = [images objectAtIndex_opple:index];
} else {
[imageView sd_setImageWithURL:[NSURL URLWithString:[images firstObject]]];
imageView.showImageViewAddress = [images firstObject];
......
......@@ -47,7 +47,7 @@
UIImage *helpImage = [TCImage(@"lefttool1") resizableImageWithCapInsets:UIEdgeInsetsMake(30, 30, 30, 30) resizingMode:UIImageResizingModeStretch];
[helpButton setBackgroundImage:helpImage forState:UIControlStateNormal];
[helpButton setTitleColor:kMainBlueColor forState:UIControlStateNormal];
NSString *content = [self.helpTitleArray objectAtIndex:i];
NSString *content = [self.helpTitleArray objectAtIndex_opple:i];
[helpButton setTitle:content forState:UIControlStateNormal];
helpButton.titleLabel.font = [UIFont systemFontOfSize:15];
[self.view addSubview:helpButton];
......
......@@ -99,7 +99,7 @@
{
ShoppingTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Shopping" forIndexPath:indexPath];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.model = [self.datasArray objectAtIndex:indexPath.row];
cell.model = [self.datasArray objectAtIndex_opple:indexPath.row];
cell.delegate = self;
cell.cellindex = indexPath.row;
cell.clinchTextfield.userInteractionEnabled = NO;
......@@ -131,7 +131,7 @@
#pragma mark -选中商品回调
- (void)setSelectedButton:(NSInteger)index;
{
ShopcarModel *model = [self.datasArray objectAtIndex:index];
ShopcarModel *model = [self.datasArray objectAtIndex_opple:index];
model.isSelected = !model.isSelected;
NSInteger goodsNumber = 0;
......@@ -202,7 +202,7 @@
NSMutableArray *indexpathArray = [NSMutableArray array];
NSMutableArray *delectedModelArray = [NSMutableArray array];
for (int i=0; i < self.datasArray.count; i++) {
ShopcarModel *model = [self.datasArray objectAtIndex:i];
ShopcarModel *model = [self.datasArray objectAtIndex_opple:i];
if (model.isSelected) {
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:i inSection:0];
[indexpathArray addObject:indexPath];
......@@ -234,7 +234,7 @@
}
NSMutableArray *array = [NSMutableArray array];
for (int i=0; i<self.datasArray.count; i++) {
ShopcarModel *model = [self.datasArray objectAtIndex:i];
ShopcarModel *model = [self.datasArray objectAtIndex_opple:i];
if (model.isSelected) {
[array addObject:model];
}
......@@ -293,7 +293,7 @@
{
[XBLoadingView showHUDViewWithDefault];
//保存商品数量
ShopcarModel *model = [self.datasArray objectAtIndex:cellindex];
ShopcarModel *model = [self.datasArray objectAtIndex_opple:cellindex];
model.goodsNum = goodsNumber;
//保存成交价格
model.costPrice = [NSNumber numberWithFloat:costprice];
......
......@@ -111,7 +111,7 @@ static NSString * const reuseIdentifier = @"Cell";
- (void)GotoTiYanCenterButtonClick
{
ExperienceCentreViewController *ExperienceCenter = [[BaseViewController getMainStoryboardClass] instantiateViewControllerWithIdentifier:@"ExperienceCentre"];
TOSceneEntity *sceneModel = [self.datasArray objectAtIndex:self.currentIndex];
TOSceneEntity *sceneModel = [self.datasArray objectAtIndex_opple:self.currentIndex];
SceneListModel *model = [[SceneListModel alloc]init];
model.fid = sceneModel.fid;
model.sceneCode = sceneModel.sceneCode;
......@@ -157,10 +157,10 @@ static NSString * const reuseIdentifier = @"Cell";
FullScreenViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:reuseIdentifier forIndexPath:indexPath];
cell.backgroundColor = RGB(251, 248, 241,1);
if (self.isProductLibrary) {
[cell.imageView sd_setImageWithURL:[NSURL URLWithString:[self.datasArray objectAtIndex:indexPath.item]] placeholderImage:REPLACEIMAGE];
[cell.imageView sd_setImageWithURL:[NSURL URLWithString:[self.datasArray objectAtIndex_opple:indexPath.item]] placeholderImage:REPLACEIMAGE];
return cell;
}
TOSceneEntity *model = [self.datasArray objectAtIndex:indexPath.item];
TOSceneEntity *model = [self.datasArray objectAtIndex_opple:indexPath.item];
[cell.imageView sd_setImageWithURL:[NSURL URLWithString:model.pricure] placeholderImage:REPLACEIMAGE];
return cell;
}
......
......@@ -58,7 +58,7 @@
- (id<MWPhoto>)photoBrowser:(MWPhotoBrowser *)photoBrowser photoAtIndex:(NSUInteger)index
{
if (index < self.browserArray.count) {
return [self.browserArray objectAtIndex:index];
return [self.browserArray objectAtIndex_opple:index];
}
return nil;
}
......
......@@ -282,7 +282,7 @@ static NSString *TAGCELL_IDENTIFIER = @"CommentTagTableViewCell";
- (id <MWPhoto>)photoBrowser:(MWPhotoBrowser *)photoBrowser photoAtIndex:(NSUInteger)index {
if (index < self.selecteImageArray.count)
return [self.selecteImageArray objectAtIndex:index];
return [self.selecteImageArray objectAtIndex_opple:index];
return nil;
}
......
......@@ -99,7 +99,7 @@
- (id<MWPhoto>)photoBrowser:(MWPhotoBrowser *)photoBrowser photoAtIndex:(NSUInteger)index
{
if (index < self.browserArray.count) {
return [self.browserArray objectAtIndex:index];
return [self.browserArray objectAtIndex_opple:index];
}
return nil;
}
......
......@@ -86,7 +86,7 @@
- (id<MWPhoto>)photoBrowser:(MWPhotoBrowser *)photoBrowser photoAtIndex:(NSUInteger)index
{
if (index < self.browserArray.count) {
return [self.browserArray objectAtIndex:index];
return [self.browserArray objectAtIndex_opple:index];
}
return nil;
}
......
......@@ -280,19 +280,19 @@
- (id <MWPhoto>)photoBrowser:(MWPhotoBrowser *)photoBrowser photoAtIndex:(NSUInteger)index {
if (index < self.mwPhotoArray.count)
return [self.mwPhotoArray objectAtIndex:index];
return [self.mwPhotoArray objectAtIndex_opple:index];
return nil;
}
- (id <MWPhoto>)photoBrowser:(MWPhotoBrowser *)photoBrowser thumbPhotoAtIndex:(NSUInteger)index {
if (index < self.thumbsArray.count)
return [self.thumbsArray objectAtIndex:index];
return [self.thumbsArray objectAtIndex_opple:index];
return nil;
}
- (BOOL)photoBrowser:(MWPhotoBrowser *)photoBrowser isPhotoSelectedAtIndex:(NSUInteger)index {
if (self.selecedSectionArray.count) {
return [[self.selecedSectionArray objectAtIndex:index] boolValue];
return [[self.selecedSectionArray objectAtIndex_opple:index] boolValue];
}
return NO;
}
......
......@@ -45,7 +45,7 @@
id object = self.subviews[i];
if ([object isKindOfClass:[UIImageView class]]) {
UIImageView *imageView = (UIImageView *)object;
TOAttachmentEntity *entity = [_imageArray objectAtIndex:i];
TOAttachmentEntity *entity = [_imageArray objectAtIndex_opple:i];
imageView.hidden = !entity;
[imageView sd_setImageWithURL:[NSURL URLWithString:entity.fileUrl] placeholderImage:REPLACEIMAGE];
if (i == 2) {
......
......@@ -118,13 +118,13 @@ typedef NS_ENUM(NSInteger, ItemIndex) {
- (id<MWPhoto>)photoBrowser:(MWPhotoBrowser *)photoBrowser photoAtIndex:(NSUInteger)index {
if (index < self.mwPhotoArray.count)
return [self.mwPhotoArray objectAtIndex:index];
return [self.mwPhotoArray objectAtIndex_opple:index];
return nil;
}
- (id<MWPhoto>)photoBrowser:(MWPhotoBrowser *)photoBrowser thumbPhotoAtIndex:(NSUInteger)index {
if (index < self.thumbsArray.count)
return [self.thumbsArray objectAtIndex:index];
return [self.thumbsArray objectAtIndex_opple:index];
return nil;
}
......
......@@ -207,7 +207,7 @@
else if ([Name isEqualToString:@"场景库"])
{
selectedIndex +=1;
SceneLibraryViewController *sceneVC = [SHARED_APPDELEGATE.allControllerArray objectAtIndex:selectedIndex];
SceneLibraryViewController *sceneVC = [SHARED_APPDELEGATE.allControllerArray objectAtIndex_opple:selectedIndex];
sceneVC.conditionModel.styleEquals = nil;
sceneVC.conditionModel.spaceEquals = nil;
[sceneVC.styleButton setTitle:@"风格" forState:UIControlStateNormal];
......@@ -217,7 +217,7 @@
}else if ([Name isEqualToString:@"产品库"])
{
selectedIndex +=2;
ProductLibraryViewController *productVC = [SHARED_APPDELEGATE.allControllerArray objectAtIndex:selectedIndex];
ProductLibraryViewController *productVC = [SHARED_APPDELEGATE.allControllerArray objectAtIndex_opple:selectedIndex];
//默认加载全部数据
productVC.barcode = nil;
productVC.selectedCode = nil;
......@@ -226,14 +226,14 @@
}else if ([Name isEqualToString:@"所有客户"])
{
selectedIndex +=3;
AllCustomerViewController *AllcustomerVC = [SHARED_APPDELEGATE.allControllerArray objectAtIndex:selectedIndex];
AllCustomerViewController *AllcustomerVC = [SHARED_APPDELEGATE.allControllerArray objectAtIndex_opple:selectedIndex];
AllcustomerVC.searchTextfield.text = nil;
AllcustomerVC.conditionModel = nil;
[AllcustomerVC.allCustomerTableview.mj_header beginRefreshing];
}else if ([Name isEqualToString:@"客户订单"])
{
selectedIndex +=4;
CustomerOrderViewController *customerVC = [SHARED_APPDELEGATE.allControllerArray objectAtIndex:selectedIndex];
CustomerOrderViewController *customerVC = [SHARED_APPDELEGATE.allControllerArray objectAtIndex_opple:selectedIndex];
customerVC.searchCustomerOrder.text = nil;
[customerVC.styleButton setTitle:@"全部订单" forState:UIControlStateNormal];
customerVC.model.consumerNameOrMobileEquals = nil;
......
......@@ -209,7 +209,7 @@
}
//刷新后添加选中状态
for (int i=0; i<weakSelf.CustomerresultArray.count; i++) {
MyclientEntityModel *myclientModel = [weakSelf.CustomerresultArray objectAtIndex:i];
MyclientEntityModel *myclientModel = [weakSelf.CustomerresultArray objectAtIndex_opple:i];
if ([[Customermanager manager].model.fid isEqualToString:myclientModel.fid]) {
InformationTableViewCell *cell = [weakSelf.informationTableview cellForRowAtIndexPath:[NSIndexPath indexPathForRow:i inSection:0]];
myclientModel.selectedState = YES;
......@@ -234,7 +234,7 @@
InformationTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"information" forIndexPath:indexPath];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.indexNumber = indexPath.row;
cell.model = [self.CustomerresultArray objectAtIndex:indexPath.row];
cell.model = [self.CustomerresultArray objectAtIndex_opple:indexPath.row];
//清空其他选中状态
WS(weakSelf);
[cell setBlockSeletced:^(NSInteger index) {
......@@ -257,7 +257,7 @@
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
ClientdetailsViewController *clientdetails = [[[self class] getMainStoryboardClass] instantiateViewControllerWithIdentifier:@"clientdetails"];
clientdetails.model = [self.CustomerresultArray objectAtIndex:indexPath.row];
clientdetails.model = [self.CustomerresultArray objectAtIndex_opple:indexPath.row];
clientdetails.cellindex = indexPath.row;
//设置当前客户
WS(weakSelf);
......@@ -314,7 +314,7 @@
for (MyclientEntityModel *model in self.CustomerresultArray) {
model.selectedState = NO;
}
MyclientEntityModel *model = [self.CustomerresultArray objectAtIndex:index];
MyclientEntityModel *model = [self.CustomerresultArray objectAtIndex_opple:index];
//判断省市区是否为空
if ([[self class] isBlankString:model.country]) {
WS(weakSelf);
......@@ -419,7 +419,7 @@
weskSelf.customerHeader.image = Headimage;
[Customermanager manager].model.picture = string;
for (int i=0;i<weskSelf.CustomerresultArray.count;i++) {
MyclientEntityModel *customerModel = (MyclientEntityModel *)[weskSelf.CustomerresultArray objectAtIndex:i];
MyclientEntityModel *customerModel = (MyclientEntityModel *)[weskSelf.CustomerresultArray objectAtIndex_opple:i];
if ([customerModel.fid isEqualToString:[Customermanager manager].model.fid]) {
customerModel.picture = string;
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:i inSection:0];
......
......@@ -119,7 +119,7 @@
{
ClientDetailsTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ClientDetails" forIndexPath:indexPath];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.model = [self.shopResponseArray objectAtIndex:indexPath.row];
cell.model = [self.shopResponseArray objectAtIndex_opple:indexPath.row];
return cell;
}
......@@ -137,7 +137,7 @@
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
ProductDetailsViewController *productDetails = [[[self class] getMainStoryboardClass] instantiateViewControllerWithIdentifier:@"productdetails"];
ShopcarModel *model = [self.shopResponseArray objectAtIndex:indexPath.row];
ShopcarModel *model = [self.shopResponseArray objectAtIndex_opple:indexPath.row];
productDetails.goodsID = model.goods.fid;
[self.navigationController pushViewController:productDetails animated:YES];
}
......
......@@ -105,7 +105,7 @@
{
OrderTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ordercell" forIndexPath:indexPath];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.model = [self.orderRecordArray objectAtIndex:indexPath.row];
cell.model = [self.orderRecordArray objectAtIndex_opple:indexPath.row];
return cell;
}
......@@ -125,7 +125,7 @@
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
OrderdetailsViewController *orderdetails = [[[self class] getMainStoryboardClass] instantiateViewControllerWithIdentifier:@"orderdetails"];
TOOrderEntity *model = (TOOrderEntity *)[[self.orderRecordArray objectAtIndex:indexPath.row] order];
TOOrderEntity *model = (TOOrderEntity *)[[self.orderRecordArray objectAtIndex_opple:indexPath.row] order];
orderdetails.orderCode = model.orderNumber;
if ([model.orderState isEqualToString:@"006"] || [model.orderState isEqualToString:@"002"] || [model.orderState isEqualToString:@"003"]) {
orderdetails.isShowPrintButton = YES;
......@@ -145,7 +145,7 @@
//撤销、支付回调
WS(weakSelf);
[orderdetails setDelecteAndPayButtonBlock:^(NSInteger cellindex, NSString *orderSate) {
OrderBill *model = [weakSelf.orderRecordArray objectAtIndex:cellindex];
OrderBill *model = [weakSelf.orderRecordArray objectAtIndex_opple:cellindex];
model.order.orderState = orderSate;
NSIndexPath *indexapath = [NSIndexPath indexPathForRow:cellindex inSection:0];
[weakSelf.orderRecordTableView reloadRowsAtIndexPaths:@[indexapath] withRowAnimation:UITableViewRowAnimationNone];
......
......@@ -872,7 +872,7 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
{
//单个商品
CommodityListTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"fourthcell" forIndexPath:indexPath];
cell.orderDetailslist = [self.orderDetails.orderdetailList objectAtIndex:indexPath.row];
cell.orderDetailslist = [self.orderDetails.orderdetailList objectAtIndex_opple:indexPath.row];
return cell;
}
}
......@@ -954,7 +954,7 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
OrderDetailsSectionHeaderView *headerView = [tableView dequeueReusableCellWithIdentifier:@"OrderDetailsSectionHeaderView"];
headerView.sectionHeaderTitleLabel.text = [self.sectionTitle objectAtIndex:section];
headerView.sectionHeaderTitleLabel.text = [self.sectionTitle objectAtIndex_opple:section];
return headerView;
}
......
......@@ -189,7 +189,7 @@
cell.contentBackView.layer.masksToBounds = YES;
cell.contentBackView.layer.cornerRadius = kCornerRadius;
cell.backgroundColor = [UIColor clearColor];
cell.model = [self.CustomerresultArray objectAtIndex:indexPath.row];
cell.model = [self.CustomerresultArray objectAtIndex_opple:indexPath.row];
return cell;
}
......@@ -205,14 +205,14 @@
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
ClientdetailsViewController *clientdetails = [[[self class] getMainStoryboardClass] instantiateViewControllerWithIdentifier:@"clientdetails"];
clientdetails.model = [self.CustomerresultArray objectAtIndex:indexPath.row];
clientdetails.model = [self.CustomerresultArray objectAtIndex_opple:indexPath.row];
clientdetails.cellindex = indexPath.row;
//设置当前客户
WS(weakSelf);
[clientdetails setCurrentUserBlock:^(NSInteger index,NSString *title) {
NSString *customerID = [[weakSelf.CustomerresultArray objectAtIndex:indexPath.row] fid];
NSDictionary *dict = @{@"customerid":customerID,@"title":title,@"model":[weakSelf.CustomerresultArray objectAtIndex:indexPath.row]};
NSString *customerID = [[weakSelf.CustomerresultArray objectAtIndex_opple:indexPath.row] fid];
NSDictionary *dict = @{@"customerid":customerID,@"title":title,@"model":[weakSelf.CustomerresultArray objectAtIndex_opple:indexPath.row]};
[Notification postNotificationName:@"SETUPCURRENTCUSTOMER" object:dict];
}];
[self.navigationController pushViewController:clientdetails animated:YES];
......
......@@ -186,7 +186,7 @@
CustomerOrderTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"customerordercell" forIndexPath:indexPath];
cell.backgroundColor = [UIColor clearColor];
cell.cellBackView.layer.masksToBounds = YES;
cell.model = [self.datasArray objectAtIndex:indexPath.row];
cell.model = [self.datasArray objectAtIndex_opple:indexPath.row];
cell.cellBackView.layer.cornerRadius = kCornerRadius;
cell.backgroundColor = [UIColor clearColor];
cell.cellIndex = indexPath.row;
......@@ -207,7 +207,7 @@
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
OrderdetailsViewController *orderdetails = [[[self class] getMainStoryboardClass] instantiateViewControllerWithIdentifier:@"orderdetails"];
TOOrderEntity *model = (TOOrderEntity *)[[self.datasArray objectAtIndex:indexPath.row] order];
TOOrderEntity *model = (TOOrderEntity *)[[self.datasArray objectAtIndex_opple:indexPath.row] order];
orderdetails.orderCode = model.orderNumber;
orderdetails.consumerID = model.consumerId;
if ([model.orderState isEqualToString:@"006"] || [model.orderState isEqualToString:@"002"] || [model.orderState isEqualToString:@"003"]) {
......@@ -227,7 +227,7 @@
}
//撤销、支付回调
[orderdetails setDelecteAndPayButtonBlock:^(NSInteger cellindex, NSString *orderSate) {
OrderBill *model = [self.datasArray objectAtIndex:cellindex];
OrderBill *model = [self.datasArray objectAtIndex_opple:cellindex];
model.order.orderState = orderSate;
NSIndexPath *indexapath = [NSIndexPath indexPathForRow:cellindex inSection:0];
[self.customerOrderTableView reloadRowsAtIndexPaths:@[indexapath] withRowAnimation:UITableViewRowAnimationNone];
......@@ -319,7 +319,7 @@
return;
}
[XBLoadingView showHUDViewWithDefault];
OrderBill *model = [weakSelf.datasArray objectAtIndex:cellindex];
OrderBill *model = [weakSelf.datasArray objectAtIndex_opple:cellindex];
[HTTP networkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@/%@/%@",SERVERREQUESTURL(RESETORDER),model.order.orderNumber,model.order.orderState,@"005"] withRequestType:ONE withParameter:nil withReturnValueBlock:^(id returnValue) {
[XBLoadingView hideHUDViewWithDefault];
......@@ -344,7 +344,7 @@
- (void)TopayButtonClick:(NSInteger)cellindex
{
OrderdetailsViewController *orderdetails = [[[self class] getMainStoryboardClass] instantiateViewControllerWithIdentifier:@"orderdetails"];
TOOrderEntity *model = (TOOrderEntity *)[[self.datasArray objectAtIndex:cellindex] order];
TOOrderEntity *model = (TOOrderEntity *)[[self.datasArray objectAtIndex_opple:cellindex] order];
orderdetails.orderCode = model.orderNumber;
if ([model.orderState isEqualToString:@"006"] || [model.orderState isEqualToString:@"002"] || [model.orderState isEqualToString:@"003"]) {
orderdetails.isShowPrintButton = YES;
......@@ -364,7 +364,7 @@
//撤销、支付回调
[orderdetails setDelecteAndPayButtonBlock:^(NSInteger cellindex, NSString *orderSate) {
OrderBill *model = [self.datasArray objectAtIndex:cellindex];
OrderBill *model = [self.datasArray objectAtIndex_opple:cellindex];
model.order.orderState = orderSate;
NSIndexPath *indexapath = [NSIndexPath indexPathForRow:cellindex inSection:0];
[self.customerOrderTableView reloadRowsAtIndexPaths:@[indexapath] withRowAnimation:UITableViewRowAnimationNone];
......
......@@ -140,7 +140,7 @@
UIImageView *subImageview = [[UIImageView alloc]initWithFrame:CGRectMake(0, i*100, 80, 60)];
subImageview.tag = 100+i;
subImageview.userInteractionEnabled = YES;
[subImageview sd_setImageWithURL:[NSURL URLWithString:[self.imagesArray objectAtIndex:i]] placeholderImage:REPLACEIMAGE];
[subImageview sd_setImageWithURL:[NSURL URLWithString:[self.imagesArray objectAtIndex_opple:i]] placeholderImage:REPLACEIMAGE];
[subImageview addGestureRecognizer:[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(SubimageViewClickAction:)]];
[self.headerView.goodsBrotherScrollview addSubview:subImageview];
}
......@@ -172,7 +172,7 @@
- (void)SubimageViewClickAction:(UITapGestureRecognizer *)tap
{
self.imageIndex = tap.view.tag-100;
[self.headerView.goodsImageview sd_setImageWithURL:[self.imagesArray objectAtIndex:tap.view.tag-100] placeholderImage:REPLACEIMAGE];
[self.headerView.goodsImageview sd_setImageWithURL:[self.imagesArray objectAtIndex_opple:tap.view.tag-100] placeholderImage:REPLACEIMAGE];
}
#pragma mark -图片放大点击
......@@ -196,7 +196,7 @@
}
goodsDetailsTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"goodsdetailscell" forIndexPath:indexPath];
[cell.detailsImageView sd_setImageWithURL:[NSURL URLWithString:[self.goodsDetailsArray objectAtIndex:indexPath.row][@"image"]] placeholderImage:TCImage(@"bg-big")];
[cell.detailsImageView sd_setImageWithURL:[NSURL URLWithString:[self.goodsDetailsArray objectAtIndex_opple:indexPath.row][@"image"]] placeholderImage:TCImage(@"bg-big")];
return cell;
}
......@@ -215,7 +215,7 @@
if (indexPath.section == 0) {
return 182;
}
NSDictionary *dict = [self.goodsDetailsArray objectAtIndex:indexPath.row];
NSDictionary *dict = [self.goodsDetailsArray objectAtIndex_opple:indexPath.row];
return [dict[@"height"] floatValue];
}
......
......@@ -264,8 +264,8 @@
{
//价格字符串切割
NSArray *spacrArray = [weakSelf.selectedCode componentsSeparatedByString:@"到"];
weakSelf.condtionModel.startprice = [NSNumber numberWithInteger:[[spacrArray objectAtIndex:0] integerValue]];
weakSelf.condtionModel.endprice = [NSNumber numberWithInteger:[[spacrArray objectAtIndex:1] integerValue]];
weakSelf.condtionModel.startprice = [NSNumber numberWithInteger:[[spacrArray objectAtIndex_opple:0] integerValue]];
weakSelf.condtionModel.endprice = [NSNumber numberWithInteger:[[spacrArray objectAtIndex_opple:1] integerValue]];
}
break;
default:
......@@ -320,8 +320,8 @@
{
//价格字符串切割
NSArray *spacrArray = [weakSelf.selectedCode componentsSeparatedByString:@"到"];
weakSelf.condtionModel.startprice = (NSDecimalNumber *)[NSDecimalNumber numberWithInteger:[[spacrArray objectAtIndex:0] integerValue]];
weakSelf.condtionModel.endprice = (NSDecimalNumber *)[NSDecimalNumber numberWithInteger:[[spacrArray objectAtIndex:1] integerValue]];
weakSelf.condtionModel.startprice = (NSDecimalNumber *)[NSDecimalNumber numberWithInteger:[[spacrArray objectAtIndex_opple:0] integerValue]];
weakSelf.condtionModel.endprice = (NSDecimalNumber *)[NSDecimalNumber numberWithInteger:[[spacrArray objectAtIndex_opple:1] integerValue]];
}
break;
default:
......@@ -402,7 +402,7 @@
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
ProductCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"productcell" forIndexPath:indexPath];
TOGoodsEntity *model = [self.datasArray objectAtIndex:indexPath.item];
TOGoodsEntity *model = [self.datasArray objectAtIndex_opple:indexPath.item];
cell.model = model;
cell.cellindex = indexPath.row;
//加入购物车
......@@ -419,7 +419,7 @@
[XBLoadingView showHUDViewWithText:@"此商品库存不足"];
return;
}
TOGoodsEntity *model = [weakSelf.datasArray objectAtIndex:cellindex];
TOGoodsEntity *model = [weakSelf.datasArray objectAtIndex_opple:cellindex];
[XBLoadingView showHUDViewWithDefault];
[weakSelf addGoodsShoppingbags:model complate:^{
NSLog(@"加入购物车完成");
......@@ -502,7 +502,7 @@
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
{
ProductDetailsViewController *productDetails = [[[self class] getMainStoryboardClass] instantiateViewControllerWithIdentifier:@"productdetails"];
productDetails.goodsID = [[self.datasArray objectAtIndex:indexPath.item] fid];
productDetails.goodsID = [[self.datasArray objectAtIndex_opple:indexPath.item] fid];
[self.navigationController pushViewController:productDetails animated:YES];
}
......@@ -585,13 +585,13 @@
//分类
if (self.screenView.sortingSegmented.selectedSegmentIndex == 0) {
self.screenFirstView.selectedIndex = buttontag;
self.screenFirstView.datasArray = [self.screeningDatas objectAtIndex:buttontag];
self.screenFirstView.datasArray = [self.screeningDatas objectAtIndex_opple:buttontag];
}
//筛选
else if (self.screenView.sortingSegmented.selectedSegmentIndex == 1)
{
self.screenSecondView.selectedIndex = buttontag;
self.screenSecondView.datasArray = [self.screeningDatas objectAtIndex:buttontag];
self.screenSecondView.datasArray = [self.screeningDatas objectAtIndex_opple:buttontag];
}
}
......@@ -649,8 +649,8 @@
if (![priceTitle isEqualToString:@"全部"]) {
//价格字符串切割
NSArray *spacrArray = [priceTitle componentsSeparatedByString:@"到"];
condition.startprice = (NSDecimalNumber *)[NSDecimalNumber numberWithInteger:[[spacrArray objectAtIndex:0] integerValue]];
condition.endprice = (NSDecimalNumber *)[NSDecimalNumber numberWithInteger:[[spacrArray objectAtIndex:1] integerValue]];
condition.startprice = (NSDecimalNumber *)[NSDecimalNumber numberWithInteger:[[spacrArray objectAtIndex_opple:0] integerValue]];
condition.endprice = (NSDecimalNumber *)[NSDecimalNumber numberWithInteger:[[spacrArray objectAtIndex_opple:1] integerValue]];
}
self.condtionModel.styleEquals = condition.styleEquals;
self.condtionModel.categoryEquals = condition.categoryEquals;
......
......@@ -62,11 +62,11 @@
cell.delegate = self;
if (self.selectedIndex == 1) {
[cell.titleLabe setTitle:[[[[self.datasArray objectAtIndex:indexPath.section] children] objectAtIndex:indexPath.row] name] forState:UIControlStateNormal];
[cell.titleLabe setTitle:[[[[self.datasArray objectAtIndex_opple:indexPath.section] children] objectAtIndex_opple:indexPath.row] name] forState:UIControlStateNormal];
}
else
{
[cell.titleLabe setTitle:[[self.datasArray objectAtIndex:indexPath.row] typeName] forState:UIControlStateNormal];
[cell.titleLabe setTitle:[[self.datasArray objectAtIndex_opple:indexPath.row] typeName] forState:UIControlStateNormal];
}
return cell;
}
......@@ -76,7 +76,7 @@
{
if (self.selectedIndex == 1) {
return [[[self.datasArray objectAtIndex:section] children] count];
return [[[self.datasArray objectAtIndex_opple:section] children] count];
}
return self.datasArray.count;
......@@ -90,11 +90,11 @@
if (self.selectedIndex == 1 ) {
[self.delegate selectedItem:[[[self.datasArray objectAtIndex:indexpath.section] children][indexpath.row] fid] withTitle:nil];
[self.delegate selectedItem:[[[self.datasArray objectAtIndex_opple:indexpath.section] children][indexpath.row] fid] withTitle:nil];
}else
{
[self.delegate selectedItem:[[self.datasArray objectAtIndex:indexpath.row] typecode] withTitle:[[self.datasArray objectAtIndex:indexpath.row] typeName]];
[self.delegate selectedItem:[[self.datasArray objectAtIndex_opple:indexpath.row] typecode] withTitle:[[self.datasArray objectAtIndex_opple:indexpath.row] typeName]];
}
}
......@@ -124,7 +124,7 @@
{
ScreeningCollectionReusableView *sectionView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"Sectioncell" forIndexPath:indexPath];
sectionView.sectionLabe.text = [[self.datasArray objectAtIndex:indexPath.section] name];
sectionView.sectionLabe.text = [[self.datasArray objectAtIndex_opple:indexPath.section] name];
return sectionView;
}
......
......@@ -87,7 +87,7 @@
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
SelectedTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"tableviewcell" forIndexPath:indexPath];
cell.titleLabe.text = [self.defaultDatasArray objectAtIndex:indexPath.row][@"typename"];
cell.titleLabe.text = [self.defaultDatasArray objectAtIndex_opple:indexPath.row][@"typename"];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;
}
......@@ -121,11 +121,11 @@
cell.delegate = self;
if (self.selectedIndex == 1) {
[cell.titleLabe setTitle:[[[[self.datasArray objectAtIndex:indexPath.section] children] objectAtIndex:indexPath.row] name] forState:UIControlStateNormal];
[cell.titleLabe setTitle:[[[[self.datasArray objectAtIndex_opple:indexPath.section] children] objectAtIndex_opple:indexPath.row] name] forState:UIControlStateNormal];
}
else
{
[cell.titleLabe setTitle:[[self.datasArray objectAtIndex:indexPath.row] typeName] forState:UIControlStateNormal];
[cell.titleLabe setTitle:[[self.datasArray objectAtIndex_opple:indexPath.row] typeName] forState:UIControlStateNormal];
}
return cell;
}
......@@ -134,7 +134,7 @@
{
if (self.selectedIndex == 1) {
return [[[self.datasArray objectAtIndex:section] children] count];
return [[[self.datasArray objectAtIndex_opple:section] children] count];
}
return self.datasArray.count;
......@@ -157,7 +157,7 @@
cell.clipsToBounds = YES;
if (self.selectedIndex == 1) {
NSString *subTitle = [[self.datasArray objectAtIndex:indexPath.section] name];
NSString *subTitle = [[self.datasArray objectAtIndex_opple:indexPath.section] name];
[cell.subTitleButton setTitle:subTitle forState:UIControlStateNormal];
if (indexPath.section != 0) {
[cell.alltitleButton setTitle:subTitle forState:UIControlStateNormal];
......@@ -212,13 +212,13 @@
if (self.selectedIndex == 1) {
selectedTitle = [[[[self.datasArray objectAtIndex:indexpath.section] children] objectAtIndex:indexpath.row] name];
selectedTypecode = [[[[self.datasArray objectAtIndex:indexpath.section] children] objectAtIndex:indexpath.row] fid];
selectedTitle = [[[[self.datasArray objectAtIndex_opple:indexpath.section] children] objectAtIndex_opple:indexpath.row] name];
selectedTypecode = [[[[self.datasArray objectAtIndex_opple:indexpath.section] children] objectAtIndex_opple:indexpath.row] fid];
}
else
{
selectedTitle = [[self.datasArray objectAtIndex:indexpath.row] typeName];
selectedTypecode = [[self.datasArray objectAtIndex:indexpath.row] typecode];
selectedTitle = [[self.datasArray objectAtIndex_opple:indexpath.row] typeName];
selectedTypecode = [[self.datasArray objectAtIndex_opple:indexpath.row] typecode];
}
NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:selectedTitle,@"typename",selectedTypecode,@"typecode", nil];
[self.defaultDatasArray replaceObjectAtIndex:self.selectedIndex withObject:dict];
......@@ -250,7 +250,7 @@
if ([self.delegate respondsToSelector:@selector(collectionSelectedindexWithStyleCode:withCategories:withSpace:withMaterial:withPrice:)]) {
//传回选中的所有条件
[self.delegate collectionSelectedindexWithStyleCode:[self.defaultDatasArray objectAtIndex:0][@"typecode"] withCategories:[self.defaultDatasArray objectAtIndex:1][@"typecode"] withSpace:[self.defaultDatasArray objectAtIndex:2][@"typecode"] withMaterial:[self.defaultDatasArray objectAtIndex:3][@"typecode"] withPrice:[self.defaultDatasArray objectAtIndex:4][@"typename"]];
[self.delegate collectionSelectedindexWithStyleCode:[self.defaultDatasArray objectAtIndex_opple:0][@"typecode"] withCategories:[self.defaultDatasArray objectAtIndex_opple:1][@"typecode"] withSpace:[self.defaultDatasArray objectAtIndex_opple:2][@"typecode"] withMaterial:[self.defaultDatasArray objectAtIndex_opple:3][@"typecode"] withPrice:[self.defaultDatasArray objectAtIndex_opple:4][@"typename"]];
}
}
......
......@@ -178,7 +178,7 @@
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
RightControlSectionView *sectionView = [tableView dequeueReusableHeaderFooterViewWithIdentifier:@"RightControlSectionView"];
sectionView.sectionTitle.text = [self.dataArray objectAtIndex:section];
sectionView.sectionTitle.text = [self.dataArray objectAtIndex_opple:section];
sectionView.sectionImageView.image = TCImage(self.imageArray[section]);
sectionView.tag = section;
[sectionView addGestureRecognizer:[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(sectionClickAction:)]];
......
......@@ -193,7 +193,7 @@
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
SeceneLibraryCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"secenelibrary" forIndexPath:indexPath];
cell.model = [self.responseArray objectAtIndex:indexPath.item];
cell.model = [self.responseArray objectAtIndex_opple:indexPath.item];
return cell;
}
......@@ -306,7 +306,7 @@
default:
break;
}
[self.accordingStyle setBackgroundImage:TCImage([self.imageArray objectAtIndex:selectedIndex]) forState:UIControlStateNormal];
[self.accordingStyle setBackgroundImage:TCImage([self.imageArray objectAtIndex_opple:selectedIndex]) forState:UIControlStateNormal];
self.seceneLibraryCollectionLayout.itemSize = CGSizeMake((ScreenWidth-showcellNumber*2)/showcellNumber, (ScreenWidth-showcellNumber*2)/showcellNumber-50);
[self.seceneLibararyCollectionView reloadData];
}
......
......@@ -110,7 +110,7 @@
#pragma mark -获取本地存储搜索历史
- (void)getlocalsaveDatas
{
NSString *homeDictionary = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex: 0];
NSString *homeDictionary = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex_opple: 0];
NSString *homepath = [homeDictionary stringByAppendingPathComponent:SEARCHHISTORY];//添加储存的文件名
self.localSearchArray = [NSKeyedUnarchiver unarchiveObjectWithFile:homepath];
[self.historyCollectionView reloadData];
......@@ -121,7 +121,7 @@
#pragma mark -归档搜索历史
- (void)SaveSearchDatas
{
NSString *homeDictionary = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex: 0];
NSString *homeDictionary = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex_opple: 0];
NSString *homepath = [homeDictionary stringByAppendingPathComponent:SEARCHHISTORY];//添加储存的文件名
BOOL flag = [NSKeyedArchiver archiveRootObject:self.localSearchArray toFile:homepath];//归档一个字符串
if (flag) {
......@@ -175,11 +175,11 @@
if ([collectionView isEqual:self.historyCollectionView]) {
SearchCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"firstcell" forIndexPath:indexPath];
cell.searchLabe.text = [self.localSearchArray objectAtIndex:indexPath.item];
cell.searchLabe.text = [self.localSearchArray objectAtIndex_opple:indexPath.item];
return cell;
}
HotCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"secondcell" forIndexPath:indexPath];
cell.responseDatas = [self.response.list objectAtIndex:indexPath.item];
cell.responseDatas = [self.response.list objectAtIndex_opple:indexPath.item];
return cell;
}
......@@ -198,15 +198,15 @@
{
if ([collectionView isEqual:self.hotCollectionView]) {
NSString *typeName = [[self.response.list objectAtIndex:indexPath.item] typeName];
NSString *typeName = [[self.response.list objectAtIndex_opple:indexPath.item] typeName];
if (![self.localSearchArray containsObject:typeName]) {
[self.localSearchArray addObject:[[self.response.list objectAtIndex:indexPath.item] typeName]];
[self.localSearchArray addObject:[[self.response.list objectAtIndex_opple:indexPath.item] typeName]];
}
[self callProductControl:[[self.response.list objectAtIndex:indexPath.item] typecode]];
[self callProductControl:[[self.response.list objectAtIndex_opple:indexPath.item] typecode]];
}
else if ([collectionView isEqual:self.historyCollectionView])
{
[self callProductControl:[self.localSearchArray objectAtIndex:indexPath.item]];
[self callProductControl:[self.localSearchArray objectAtIndex_opple:indexPath.item]];
}
}
......@@ -228,7 +228,7 @@
- (IBAction)delecteSearchHistoryButtonClick:(UIButton *)sender {
NSString *homeDictionary = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex: 0];
NSString *homeDictionary = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex_opple: 0];
NSString *homepath = [homeDictionary stringByAppendingPathComponent:SEARCHHISTORY];//添加储存的文件名
NSFileManager *manager = [NSFileManager defaultManager];
[manager removeItemAtPath:homepath error:nil];
......
......@@ -50,7 +50,7 @@
AddressModel *model = [[AddressModel alloc]init];
model.name = @"地址占位";
//地址占位
[[_datasArray objectAtIndex:1] addObject:model];
[[_datasArray objectAtIndex_opple:1] addObject:model];
//加入商品信息
[_datasArray replaceObjectAtIndex:2 withObject:_settlementGoodsdatas];
}
......@@ -111,13 +111,13 @@
if (RESULT(returnValue)) {
RsShippingAddrEntity *address = [[RsShippingAddrEntity alloc]initWithDictionary:RESPONSE(returnValue) error:nil];
for (NSInteger i=address.list.count-1; i>=0; i--) {
TOShippingAddrEntity *model = [address.list objectAtIndex:i];
TOShippingAddrEntity *model = [address.list objectAtIndex_opple:i];
//自定义model
AddressModel *newmodel = [[AddressModel alloc]initWithDictionary:[model toDictionary] error:nil];
[[weakSelf.datasArray objectAtIndex:1]insertObject:newmodel atIndex:0];
[[weakSelf.datasArray objectAtIndex_opple:1]insertObject:newmodel atIndex:0];
}
//地址数组
NSArray *addressArray = [weakSelf.datasArray objectAtIndex:1];
NSArray *addressArray = [weakSelf.datasArray objectAtIndex_opple:1];
//增加cell
NSMutableArray *addCellArray = [NSMutableArray array];
for (int i=0; i<addressArray.count-1; i++) {
......@@ -147,7 +147,7 @@
}
else if (indexPath.section == 1)
{
NSArray *Addressarr = [self.datasArray objectAtIndex:indexPath.section];
NSArray *Addressarr = [self.datasArray objectAtIndex_opple:indexPath.section];
if (indexPath.row == Addressarr.count-1) {
GenerateOrdersModifyTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Modifycell" forIndexPath:indexPath];
......@@ -168,27 +168,27 @@
[weakSelf SetCustomerButtonClick:index];
}];
cell.NewModel = [self.datasArray objectAtIndex:indexPath.section][indexPath.row];
cell.NewModel = [self.datasArray objectAtIndex_opple:indexPath.section][indexPath.row];
return cell;
}
NSArray *Addressarr = [self.datasArray objectAtIndex:indexPath.section];
NSArray *Addressarr = [self.datasArray objectAtIndex_opple:indexPath.section];
if (indexPath.row == Addressarr.count-1) {
AllpriceTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"sixthcell" forIndexPath:indexPath];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.goodsAllprice = [self.datasArray objectAtIndex:indexPath.section];
cell.goodsAllprice = [self.datasArray objectAtIndex_opple:indexPath.section];
return cell;
}
CommodityListTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"fourthcell" forIndexPath:indexPath];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.model = [self.datasArray objectAtIndex:indexPath.section][indexPath.row];
cell.model = [self.datasArray objectAtIndex_opple:indexPath.section][indexPath.row];
return cell;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
NSArray *arr = [self.datasArray objectAtIndex:section];
NSArray *arr = [self.datasArray objectAtIndex_opple:section];
return arr.count;
}
......@@ -203,7 +203,7 @@
break;
case 1:
{
NSArray *arr = [self.datasArray objectAtIndex:indexPath.section];
NSArray *arr = [self.datasArray objectAtIndex_opple:indexPath.section];
if (indexPath.row == arr.count-1) {
return 70;
......@@ -213,7 +213,7 @@
break;
case 2:
{
NSArray *arr = [self.datasArray objectAtIndex:indexPath.section];
NSArray *arr = [self.datasArray objectAtIndex_opple:indexPath.section];
if (indexPath.row == arr.count-1) {
return 50;
......@@ -319,14 +319,14 @@
order.datapage = page;
//收货地址
TOOrderEntity *orderReceiver = [[TOOrderEntity alloc]init];
NSArray *Adressarr = [self.datasArray objectAtIndex:1];
NSArray *Adressarr = [self.datasArray objectAtIndex_opple:1];
//总价格
CGFloat allPrice = ZERO;
//总数量
NSInteger allNumber = ZERO;
for (int i=0; i<Adressarr.count; i++) {
if ([[Adressarr objectAtIndex:i] isKindOfClass:[AddressModel class]]) {
AddressModel *model = [Adressarr objectAtIndex:i];
if ([[Adressarr objectAtIndex_opple:i] isKindOfClass:[AddressModel class]]) {
AddressModel *model = [Adressarr objectAtIndex_opple:i];
if (model.isSelected) {
//收货人信息
orderReceiver.receiverName = model.name;
......@@ -341,7 +341,7 @@
NSArray *goodArray = [self.datasArray lastObject];
NSMutableArray *goodidArr = [NSMutableArray array];
for (int i=0; i<goodArray.count-1; i++) {
ShopcarModel *model = [goodArray objectAtIndex:i];
ShopcarModel *model = [goodArray objectAtIndex_opple:i];
TOOrderdetailEntity *orderGoods = [[TOOrderdetailEntity alloc]init];
orderGoods.goodsId = model.goodsId;
orderGoods.goodsCover = model.goods.pictures;
......@@ -427,7 +427,7 @@
Newcell.isSelectedButton.selected = NO;
}
}
for (id objc in [self.datasArray objectAtIndex:1]) {
for (id objc in [self.datasArray objectAtIndex_opple:1]) {
if ([objc isKindOfClass:[AddressModel class]]) {
......@@ -435,7 +435,7 @@
model.isSelected = NO;
}
}
AddressModel *model = [[self.datasArray objectAtIndex:1] objectAtIndex:index];
AddressModel *model = [[self.datasArray objectAtIndex_opple:1] objectAtIndex_opple:index];
model.isSelected = YES;
}
......@@ -444,16 +444,16 @@
#pragma mark -修改地址
- (void)ChangeButtonClick
{
NSArray *arr = [self.datasArray objectAtIndex:1];
NSArray *arr = [self.datasArray objectAtIndex_opple:1];
for (int i=0; i<arr.count; i++) {
AddressModel *model = [arr objectAtIndex:i];
AddressModel *model = [arr objectAtIndex_opple:i];
if ([model isKindOfClass:[AddressModel class]]) {
//判断是否为选中
if (model.isSelected) {
[self CreateModifyShippingView:[arr objectAtIndex:i] Withindex:i];
[self CreateModifyShippingView:[arr objectAtIndex_opple:i] Withindex:i];
break;
}else
{
......@@ -477,7 +477,7 @@
- (void)addAddressCell:(AddressModel *)model
{
[self dismissViewControllerAnimated:YES completion:nil];
[[self.datasArray objectAtIndex:1]insertObject:model atIndex:0];
[[self.datasArray objectAtIndex_opple:1]insertObject:model atIndex:0];
NSIndexPath *indexpath = [NSIndexPath indexPathForRow:0 inSection:1];
[self.generateOrderTableview insertRowsAtIndexPaths:@[indexpath] withRowAnimation:UITableViewRowAnimationLeft];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
......@@ -498,12 +498,12 @@
- (void)delecteCell:(NSString *)addressid
{
[self dismissViewControllerAnimated:YES completion:nil];
NSArray *arr = [self.datasArray objectAtIndex:1];
NSArray *arr = [self.datasArray objectAtIndex_opple:1];
for (int i=0; i<arr.count; i++) {
if ([[arr objectAtIndex:i] isKindOfClass:[AddressModel class]]) {
if ([[arr objectAtIndex_opple:i] isKindOfClass:[AddressModel class]]) {
AddressModel *model = [arr objectAtIndex:i];
AddressModel *model = [arr objectAtIndex_opple:i];
//判断是否为选中
if ([model.fid isEqualToString:addressid]) {
......
......@@ -267,7 +267,7 @@
{
ShoppingTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Shopping" forIndexPath:indexPath];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.model = [self.shopResponseArray objectAtIndex:indexPath.row];
cell.model = [self.shopResponseArray objectAtIndex_opple:indexPath.row];
cell.delegate = self;
cell.cellindex = indexPath.row;
//cell选中回调
......@@ -298,7 +298,7 @@
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
ProductDetailsViewController *productDetails = [[[self class] getMainStoryboardClass] instantiateViewControllerWithIdentifier:@"productdetails"];
productDetails.goodsID = [[self.shopResponseArray objectAtIndex:indexPath.row] goodsId];
productDetails.goodsID = [[self.shopResponseArray objectAtIndex_opple:indexPath.row] goodsId];
[self.navigationController pushViewController:productDetails animated:YES];
}
......@@ -310,7 +310,7 @@
#pragma mark -选中商品回调
- (void)setSelectedButton:(NSInteger)index;
{
ShopcarModel *model = [self.shopResponseArray objectAtIndex:index];
ShopcarModel *model = [self.shopResponseArray objectAtIndex_opple:index];
model.isSelected = !model.isSelected;
NSInteger goodsNumber = 0;
......@@ -364,7 +364,7 @@
NSMutableArray *cellArray = [NSMutableArray array];
//删除商品
for (int i=0; i<weakSelf.shopResponseArray.count; i++) {
ShopcarModel *model = [weakSelf.shopResponseArray objectAtIndex:i];
ShopcarModel *model = [weakSelf.shopResponseArray objectAtIndex_opple:i];
if ([goodsCode containsObject:model.fid]) {
[weakSelf.shopResponseArray removeObject:model];
NSIndexPath *indexpath = [NSIndexPath indexPathForRow:i inSection:0];
......@@ -436,7 +436,7 @@
//模型数组
NSMutableArray *delectemodel = [NSMutableArray array];
for (int i=0; i<self.shopResponseArray.count; i++) {
ShopcarModel *model = [self.shopResponseArray objectAtIndex:i];
ShopcarModel *model = [self.shopResponseArray objectAtIndex_opple:i];
if (model.isSelected) {
[codeArr addObject:model.fid];
[delectemodel addObject:model];
......@@ -521,7 +521,7 @@
{
[XBLoadingView showHUDViewWithDefault];
//保存商品数量
ShopcarModel *model = [self.shopResponseArray objectAtIndex:cellindex];
ShopcarModel *model = [self.shopResponseArray objectAtIndex_opple:cellindex];
model.goodsNum = goodsNumber;
//保存成交价格
model.costPrice = [NSNumber numberWithFloat:costprice];
......
......@@ -266,7 +266,7 @@
QRViewController *qrVC = [[QRViewController alloc] initWithScanCompleteHandler:^(NSString *url) {
[weakSelf dismissViewControllerAnimated:YES
completion:^{
ProductLibraryViewController *product = [SHARED_APPDELEGATE.allControllerArray objectAtIndex:8];
ProductLibraryViewController *product = [SHARED_APPDELEGATE.allControllerArray objectAtIndex_opple:8];
product.barcode = url;
SHARED_APPDELEGATE.lineView.hidden = YES;
weakSelf.selectedIndex = 8;
......@@ -296,7 +296,7 @@
#pragma mark -自定义选中
- (void)setSelectedIndex:(NSUInteger)selectedIndex {
[super setSelectedIndex:selectedIndex];
[self didSelectNavigationController:[SHARED_APPDELEGATE.allControllerArray objectAtIndex:selectedIndex]];
[self didSelectNavigationController:[SHARED_APPDELEGATE.allControllerArray objectAtIndex_opple:selectedIndex]];
}
#pragma mark -返回根视图控制器
......
......@@ -83,10 +83,10 @@
CustomButton *button = [CustomButton buttonWithType:UIButtonTypeCustom];
button.frame = CGRectMake(ScreenWidth-(i*ButtonWIDTH + Buttoninterval*(i-1)), 10, ButtonWIDTH, ButtonRIGHT);
[button setTitleColor:kMainBlueColor forState:UIControlStateNormal];
[button setTitle:[titleArray objectAtIndex:i-1] forState:UIControlStateNormal];
[button setTitle:[titleArray objectAtIndex_opple:i-1] forState:UIControlStateNormal];
button.tag = 100+i-1;
[button addTarget:self action:@selector(buttonClick:) forControlEvents:UIControlEventTouchUpInside];
[button setImage:TCImage([imageArray objectAtIndex:i-1]) forState:UIControlStateNormal];
[button setImage:TCImage([imageArray objectAtIndex_opple:i-1]) forState:UIControlStateNormal];
[self addSubview:button];
if (i == titleArray.count) {
SHARED_APPDELEGATE.shoppingCarPoint = [self convertPoint:CGPointMake(button.center.x, button.center.y) toView:self.window];
......
......@@ -91,11 +91,11 @@ timePerImage = _timePerImage;
- (void)bringNextImage
{
UIImageView *imageViewToHide = [self.imageViews objectAtIndex:currentlyDisplayingImageViewIndex];
UIImageView *imageViewToHide = [self.imageViews objectAtIndex_opple:currentlyDisplayingImageViewIndex];
currentlyDisplayingImageViewIndex = currentlyDisplayingImageViewIndex == 0 ? 1 : 0;
UIImageView *imageViewToShow = [self.imageViews objectAtIndex:currentlyDisplayingImageViewIndex];
UIImageView *imageViewToShow = [self.imageViews objectAtIndex_opple:currentlyDisplayingImageViewIndex];
NSUInteger nextImageToShowIndex = currentlyDisplayingImageIndex;
......
......@@ -50,6 +50,7 @@
#import "ICRPlaceholderTextView.h"
#import "YXAlertController.h"
#import "WZLBadgeImport.h"
#import "NSArray+Objectwithindex.h"
#import <UMSocialCore/UMSocialCore.h>
#import "YXKitHeader.h"
// 引入JPush功能所需头文件
......
......@@ -145,7 +145,7 @@
UIWindow *showWindow = nil;
NSArray *windows = [[UIApplication sharedApplication] windows];
if ([windows count] >= 2) {
showWindow = [windows objectAtIndex:1];
showWindow = [windows objectAtIndex_opple:1];
}
else {
showWindow = [[UIApplication sharedApplication] keyWindow];
......
......@@ -646,7 +646,7 @@ static xmlChar *SplitQNameReverse(const xmlChar *qname, xmlChar **prefix) {
if ([children count] > index) {
return [children objectAtIndex:index];
return [children objectAtIndex_opple:index];
}
return nil;
}
......
......@@ -337,17 +337,17 @@
switch (ordercode) {
case 4://退货
{
return TCImage([imageArray objectAtIndex:2]);
return TCImage([imageArray objectAtIndex_opple:2]);
}
break;
case 5://作废
{
return TCImage([imageArray objectAtIndex:0]);
return TCImage([imageArray objectAtIndex_opple:0]);
}
break;
case 6://完成
{
return TCImage([imageArray objectAtIndex:1]);
return TCImage([imageArray objectAtIndex_opple:1]);
}
break;
......
......@@ -84,7 +84,7 @@
/**
* caches路径
*/
#define kPathCaches [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) objectAtIndex:0]
#define kPathCaches [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) objectAtIndex_opple:0]
/**
* 断网标示
......
......@@ -51,14 +51,14 @@
//显示纯图片
if (self.isPictures) {
cell.imageView.image = TCImage([self.datasArray objectAtIndex:indexPath.row]);
cell.imageView.image = TCImage([self.datasArray objectAtIndex_opple:indexPath.row]);
return cell;
}
if (self.isString) {
cell.textLabel.text = [self.datasArray objectAtIndex:indexPath.row];
cell.textLabel.text = [self.datasArray objectAtIndex_opple:indexPath.row];
}else
{
cell.textLabel.text = [[self.datasArray objectAtIndex:indexPath.row] typeName];
cell.textLabel.text = [[self.datasArray objectAtIndex_opple:indexPath.row] typeName];
}
cell.textLabel.textAlignment = NSTextAlignmentCenter;
cell.textLabel.font = [UIFont systemFontOfSize:14];
......@@ -87,9 +87,9 @@
[self dismissViewControllerAnimated:YES completion:nil];
//判断是为纯字符串选中
if (weakSelf.isString) {
[weakSelf.delegate returnCellindexpathwithrow:[weakSelf.datasArray objectAtIndex:indexPath.row] withCellTitle:[weakSelf.datasArray objectAtIndex:indexPath.row] withSelected:_selectedindex];
[weakSelf.delegate returnCellindexpathwithrow:[weakSelf.datasArray objectAtIndex_opple:indexPath.row] withCellTitle:[weakSelf.datasArray objectAtIndex_opple:indexPath.row] withSelected:_selectedindex];
}else{
[weakSelf.delegate returnCellindexpathwithrow:[[weakSelf.datasArray objectAtIndex:indexPath.row] typecode] withCellTitle:[[weakSelf.datasArray objectAtIndex:indexPath.row] typeName] withSelected:_selectedindex];
[weakSelf.delegate returnCellindexpathwithrow:[[weakSelf.datasArray objectAtIndex_opple:indexPath.row] typecode] withCellTitle:[[weakSelf.datasArray objectAtIndex_opple:indexPath.row] typeName] withSelected:_selectedindex];
}
}
}
......
......@@ -203,7 +203,7 @@
{
//停止扫描
[_session stopRunning];
AVMetadataMachineReadableCodeObject * metadataObject = [metadataObjects objectAtIndex:0];
AVMetadataMachineReadableCodeObject * metadataObject = [metadataObjects objectAtIndex_opple:0];
stringValue = metadataObject.stringValue;
}
......
......@@ -52,12 +52,12 @@ PODS:
- UICountingLabel (1.2.0)
- UITableView+FDTemplateLayoutCell (1.6)
- UMengAnalytics (4.2.4)
- UMengUShare/Core (6.4.4):
- UMengUShare/Core (6.4.5):
- UMengUShare/Network
- UMengUShare/Network (6.4.4)
- UMengUShare/Social/ReducedSina (6.4.4):
- UMengUShare/Network (6.4.5)
- UMengUShare/Social/ReducedSina (6.4.5):
- UMengUShare/Core
- UMengUShare/Social/ReducedWeChat (6.4.4):
- UMengUShare/Social/ReducedWeChat (6.4.5):
- UMengUShare/Core
- WYPopoverController (0.3.9)
- WZLBadge (1.2.6)
......@@ -112,7 +112,7 @@ SPEC CHECKSUMS:
UICountingLabel: 1db4e7d023e1762171eb226d6dff47a7a84f27aa
UITableView+FDTemplateLayoutCell: 5c949b4a5059c404b442926c0e80f81d10a2d66f
UMengAnalytics: ef8d45f94c0e5771dc364cf6a5731d9d3b101da2
UMengUShare: cd54ae52958426b79aa9193a7b02058d6a6d9aa0
UMengUShare: a5711c54e640b04e3048e931d2b88d50f9cfa55c
WYPopoverController: a9db25ac2841a686acdc0f3a99bdb21545db32f4
WZLBadge: 9ec779dcfd94c825518b395e8315fccaabff1bfa
YXAlertController: 68e27c48976fa9ecc0b82e63166b67863be8b70b
......
......@@ -52,12 +52,12 @@ PODS:
- UICountingLabel (1.2.0)
- UITableView+FDTemplateLayoutCell (1.6)
- UMengAnalytics (4.2.4)
- UMengUShare/Core (6.4.4):
- UMengUShare/Core (6.4.5):
- UMengUShare/Network
- UMengUShare/Network (6.4.4)
- UMengUShare/Social/ReducedSina (6.4.4):
- UMengUShare/Network (6.4.5)
- UMengUShare/Social/ReducedSina (6.4.5):
- UMengUShare/Core
- UMengUShare/Social/ReducedWeChat (6.4.4):
- UMengUShare/Social/ReducedWeChat (6.4.5):
- UMengUShare/Core
- WYPopoverController (0.3.9)
- WZLBadge (1.2.6)
......@@ -112,7 +112,7 @@ SPEC CHECKSUMS:
UICountingLabel: 1db4e7d023e1762171eb226d6dff47a7a84f27aa
UITableView+FDTemplateLayoutCell: 5c949b4a5059c404b442926c0e80f81d10a2d66f
UMengAnalytics: ef8d45f94c0e5771dc364cf6a5731d9d3b101da2
UMengUShare: cd54ae52958426b79aa9193a7b02058d6a6d9aa0
UMengUShare: a5711c54e640b04e3048e931d2b88d50f9cfa55c
WYPopoverController: a9db25ac2841a686acdc0f3a99bdb21545db32f4
WZLBadge: 9ec779dcfd94c825518b395e8315fccaabff1bfa
YXAlertController: 68e27c48976fa9ecc0b82e63166b67863be8b70b
......
......@@ -75,6 +75,11 @@ extern NSString *const UMSPlatformNameAlipaySession;
*/
extern NSString *const UMSPlatformNameQQ;
/**
Tencent Tim
*/
extern NSString *const UMSPlatformNameTim;
/**
Facebook
*/
......@@ -334,6 +339,7 @@ typedef NS_ENUM(NSInteger,UMSocialPlatformType)
UMSocialPlatformType_DropBox = 32,//dropbox
UMSocialPlatformType_VKontakte = 33,//vkontakte
UMSocialPlatformType_FaceBookMessenger = 34,//FaceBookMessenger
UMSocialPlatformType_Tim = 35,// Tencent TIM
UMSocialPlatformType_Predefine_end = 999,
......
......@@ -19,6 +19,13 @@
@property (nonatomic, copy) NSString *unionId;
/**
usid 兼容U-Share 4.x/5.x 版本,与4/5版本数值相同
即,对应微信平台:openId,QQ平台openId,其他平台不变
*/
@property (nonatomic, copy) NSString *usid;
@property (nonatomic, assign) UMSocialPlatformType platformType;
/**
* 第三方原始数据
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment