Commit a03062f0 authored by 曹云霄's avatar 曹云霄

修改项说明:积分功能开发

parent e171a48c
...@@ -7,19 +7,40 @@ ...@@ -7,19 +7,40 @@
// //
#import "BaseViewController.h" #import "BaseViewController.h"
#import "PrizeListModel.h"
@interface ApplyPrizeViewController : BaseViewController @interface ApplyPrizeViewController : BaseViewController
/**
兑换奖品
*/
@property (weak, nonatomic) IBOutlet UIScrollView *exchangeScrollView; @property (weak, nonatomic) IBOutlet UIScrollView *exchangeScrollView;
/**
收货人地址
*/
@property (weak, nonatomic) IBOutlet UITextField *consigneeTextField; @property (weak, nonatomic) IBOutlet UITextField *consigneeTextField;
/**
电话号码
*/
@property (weak, nonatomic) IBOutlet UITextField *mobileTextField; @property (weak, nonatomic) IBOutlet UITextField *mobileTextField;
@property (weak, nonatomic) IBOutlet UITextField *addressTextField; /**
地址
*/
@property (weak, nonatomic) IBOutlet UIButton *addressButton;
/**
详细地址
*/
@property (weak, nonatomic) IBOutlet UITextField *addressDetailsTextField; @property (weak, nonatomic) IBOutlet UITextField *addressDetailsTextField;
/**
兑换奖品
*/
@property (nonatomic,strong) NSArray<PrizeListModel *>*selectArray;
@end @end
...@@ -15,6 +15,11 @@ ...@@ -15,6 +15,11 @@
*/ */
@property (nonatomic,strong) ModifyShippingAddressView *citySelecteview; @property (nonatomic,strong) ModifyShippingAddressView *citySelecteview;
/**
保存兑奖单
*/
@property (nonatomic,strong) RsPrizeBill *prizeBill;
@end @end
@implementation ApplyPrizeViewController @implementation ApplyPrizeViewController
...@@ -26,10 +31,8 @@ ...@@ -26,10 +31,8 @@
self.view.superview.layer.cornerRadius = 0; self.view.superview.layer.cornerRadius = 0;
} }
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
[self setUpTextFieldAction]; [self setUpTextFieldAction];
} }
...@@ -44,33 +47,28 @@ ...@@ -44,33 +47,28 @@
leftView2.frame = CGRectMake(0, 0, 10, 1); leftView2.frame = CGRectMake(0, 0, 10, 1);
self.mobileTextField.leftView = leftView2; self.mobileTextField.leftView = leftView2;
self.mobileTextField.leftViewMode = UITextFieldViewModeAlways; self.mobileTextField.leftViewMode = UITextFieldViewModeAlways;
UIView *leftView3 = [[UIView alloc]init];
leftView3.frame = CGRectMake(0, 0, 10, 1);
self.addressTextField.leftView = leftView3;
self.addressTextField.leftViewMode = UITextFieldViewModeAlways;
UIView *rightView = [[UIView alloc]initWithFrame:CGRectMake(self.addressDetailsTextField.width-20, 0, 20, self.addressDetailsTextField.height)];
UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 10, 15, 10)];
imageView.image = TCImage(@"down_arr");
[rightView addSubview:imageView];
self.addressTextField.rightView = rightView;
self.addressTextField.rightViewMode = UITextFieldViewModeAlways;
UIView *leftView4 = [[UIView alloc]init]; UIView *leftView4 = [[UIView alloc]init];
leftView4.frame = CGRectMake(0, 0, 10, 1); leftView4.frame = CGRectMake(0, 0, 10, 1);
self.addressDetailsTextField.leftView = leftView4; self.addressDetailsTextField.leftView = leftView4;
self.addressDetailsTextField.leftViewMode = UITextFieldViewModeAlways; self.addressDetailsTextField.leftViewMode = UITextFieldViewModeAlways;
[self.addressButton addTarget:self action:@selector(selectedCityClickAction) forControlEvents:UIControlEventTouchUpInside];
} }
#pragma mark - <UITextFieldDelegate> #pragma mark - 选中礼品
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField - (void)setSelectArray:(NSArray<PrizeListModel *> *)selectArray
{ {
if ([textField isEqual:self.addressTextField]) { _selectArray = selectArray;
[self selectedCityClickAction]; CGFloat width = 70;//宽度
return NO; CGFloat interval = 10;//间隔
for (int i=0; i<_selectArray.count; i++) {
PrizeListModel *model = _selectArray[i];
UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake(i*width+i*interval, 0, width, width)];
[imageView sd_setImageWithURL:[NSURL URLWithString:model.picture] placeholderImage:REPLACEIMAGE];
[self.exchangeScrollView addSubview:imageView];
} }
return YES; self.exchangeScrollView.contentSize = CGSizeMake(width*_selectArray.count+interval*_selectArray.count-1, 0);
} }
#pragma mark -城市选择器 #pragma mark -城市选择器
- (void)selectedCityClickAction - (void)selectedCityClickAction
{ {
...@@ -81,6 +79,7 @@ ...@@ -81,6 +79,7 @@
[UIView animateWithDuration:0.2 animations:^{ [UIView animateWithDuration:0.2 animations:^{
self.citySelecteview.frame = CGRectMake(0, self.view.frame.size.height-160, self.view.frame.size.width, 160); self.citySelecteview.frame = CGRectMake(0, self.view.frame.size.height-160, self.view.frame.size.width, 160);
}completion:^(BOOL finished) { }completion:^(BOOL finished) {
self.addressButton.enabled = NO;
}]; }];
} }
...@@ -88,15 +87,19 @@ ...@@ -88,15 +87,19 @@
- (void)completeButton - (void)completeButton
{ {
[UIView animateWithDuration:0.2 animations:^{ [UIView animateWithDuration:0.2 animations:^{
self.citySelecteview.frame = CGRectMake(0, ScreenHeight, self.view.frame.size.width, 160); self.citySelecteview.frame = CGRectMake(0, ScreenHeight, self.view.frame.size.width, 160);
}completion:^(BOOL finished) { }completion:^(BOOL finished) {
[self.citySelecteview removeFromSuperview]; [self.citySelecteview removeFromSuperview];
self.citySelecteview = nil; self.citySelecteview = nil;
self.addressButton.enabled = YES;
}]; }];
} }
#pragma mark - 选择城市后回调
- (void)citySelected:(NSString *)cityString WithprovincesString:(NSString *)provincesString
{
[self.addressButton setTitle:cityString forState:UIControlStateNormal];
}
#pragma mark - 取消 #pragma mark - 取消
- (IBAction)cancelButtonClickAction:(UIButton *)sender { - (IBAction)cancelButtonClickAction:(UIButton *)sender {
...@@ -106,6 +109,42 @@ ...@@ -106,6 +109,42 @@
#pragma mark - 提交 #pragma mark - 提交
- (IBAction)submitButtonClickAction:(UIButton *)sender { - (IBAction)submitButtonClickAction:(UIButton *)sender {
if ([[self class] isBlankString:self.consigneeTextField.text]) {
[self ErrorMBProgressView:@"收货人不能为空"];return;
}
if ([[self class] isBlankString:self.mobileTextField.text]) {
[self ErrorMBProgressView:@"联系电话不能为空"];return;
}
if ([[self class] isBlankString:self.addressButton.currentTitle]) {
[self ErrorMBProgressView:@"地址不能为空"];return;
}
if ([[self class] isBlankString:self.addressDetailsTextField.text]) {
[self ErrorMBProgressView:@"详细地址不能为空"];return;
}
[self savePrizeRecord];
}
#pragma mark - 保存兑奖单
- (void)savePrizeRecord
{
WS(weakSelf);
[self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(SAVEPRIZEBILL) WithCallClass:weakSelf WithRequestType:ZERO WithParameter:self.prizeBill WithReturnValueBlock:^(id returnValue) {
[weakSelf RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) {
[weakSelf SuccessMBProgressView:@"申请成功"];
[weakSelf dismissViewControllerAnimated:YES completion:nil];
}else {
[weakSelf ErrorMBProgressView:returnValue[@"message"]];
}
} WithErrorCodeBlock:^(id errorCodeValue) {
[weakSelf RemoveMBProgressHUDLoding];
[weakSelf ErrorMBProgressView:NETWORK];
} WithFailureBlock:^(NSError *error) {
[weakSelf RemoveMBProgressHUDLoding];
[weakSelf ErrorMBProgressView:error.localizedDescription];
}];
} }
...@@ -125,4 +164,27 @@ ...@@ -125,4 +164,27 @@
return _citySelecteview; return _citySelecteview;
} }
- (RsPrizeBill *)prizeBill
{
if (!_prizeBill) {
_prizeBill = [[RsPrizeBill alloc]init];
//收货人
TOPrizeBillEntity *consignee = [[TOPrizeBillEntity alloc]init];
consignee.employee = [Shoppersmanager manager].Shoppers.employee.fid;
consignee.receiver = self.consigneeTextField.text;
consignee.mobilephone = self.mobileTextField.text;
consignee.receiveAddress = [NSString stringWithFormat:@"%@%@",self.addressButton.currentTitle,self.addressDetailsTextField.text];
_prizeBill.bill = consignee;
//兑换礼品
NSMutableArray *array = [NSMutableArray array];
for (PrizeListModel *model in self.selectArray) {
TOPrizeBillDetailsEntity *entity = [[TOPrizeBillDetailsEntity alloc]init];
entity.prize = model.fid;
[array addObject:entity];
}
_prizeBill.details = (NSArray<TOPrizeBillDetailsEntity> *)array;
}
return _prizeBill;
}
@end @end
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
<objects> <objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ApplyPrizeViewController"> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ApplyPrizeViewController">
<connections> <connections>
<outlet property="addressButton" destination="DcO-2w-RMM" id="IGk-ar-9kU"/>
<outlet property="addressDetailsTextField" destination="8m1-Qu-OSF" id="oZO-r9-yVx"/> <outlet property="addressDetailsTextField" destination="8m1-Qu-OSF" id="oZO-r9-yVx"/>
<outlet property="addressTextField" destination="vKD-Yw-bIN" id="XnD-o0-iQa"/>
<outlet property="consigneeTextField" destination="K2I-Hc-a9L" id="xIj-Nm-g8u"/> <outlet property="consigneeTextField" destination="K2I-Hc-a9L" id="xIj-Nm-g8u"/>
<outlet property="exchangeScrollView" destination="KzL-Tc-cv5" id="vQV-jA-LBS"/> <outlet property="exchangeScrollView" destination="KzL-Tc-cv5" id="vQV-jA-LBS"/>
<outlet property="mobileTextField" destination="Skz-R9-9h7" id="dHE-IW-uhS"/> <outlet property="mobileTextField" destination="Skz-R9-9h7" id="dHE-IW-uhS"/>
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<view contentMode="scaleToFill" id="QwZ-C7-zlx"> <view contentMode="scaleToFill" id="QwZ-C7-zlx">
<frame key="frameInset" height="44"/> <frame key="frameInset" height="44"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.34901960780000002" green="0.67450980390000004" blue="0.86274509799999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="0.95294117647058818" green="0.95686274509803915" blue="0.96078431372549022" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view> </view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="兑换礼品:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="DEM-JV-bdq"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="兑换礼品:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="DEM-JV-bdq">
<frame key="frameInset" minX="19" minY="77" width="66" height="21"/> <frame key="frameInset" minX="19" minY="77" width="66" height="21"/>
...@@ -46,8 +46,8 @@ ...@@ -46,8 +46,8 @@
<nil key="textColor"/> <nil key="textColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="KzL-Tc-cv5"> <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" misplaced="YES" id="KzL-Tc-cv5">
<frame key="frameInset" minX="87" minY="52" height="71" maxX="24"/> <frame key="frameInset" minX="87" minY="53" height="70" maxX="24"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
</scrollView> </scrollView>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" id="K2I-Hc-a9L"> <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" id="K2I-Hc-a9L">
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
</userDefinedRuntimeAttribute> </userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes> </userDefinedRuntimeAttributes>
<connections> <connections>
<outlet property="delegate" destination="-1" id="pAJ-Xh-GtR"/> <outlet property="delegate" destination="-1" id="adG-pb-ffE"/>
</connections> </connections>
</textField> </textField>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="手机号:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="yiU-pj-dA2"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="手机号:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="yiU-pj-dA2">
...@@ -86,32 +86,16 @@ ...@@ -86,32 +86,16 @@
</userDefinedRuntimeAttribute> </userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes> </userDefinedRuntimeAttributes>
<connections> <connections>
<outlet property="delegate" destination="-1" id="Gw6-GV-rXo"/> <outlet property="delegate" destination="-1" id="QkA-0b-y1k"/>
</connections> </connections>
</textField> </textField>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="地址选:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="olb-Md-I9g"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="地址选:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="olb-Md-I9g">
<frame key="frameInset" minX="19" minY="233" width="66" height="21"/> <frame key="frameInset" minX="19" minY="233" width="66" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<nil key="textColor"/> <nil key="textColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" id="vKD-Yw-bIN">
<frame key="frameInset" minX="93" minY="228" height="30" maxX="113"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.92941176470588238" green="0.93333333333333335" blue="0.93725490196078431" alpha="1" colorSpace="calibratedRGB"/>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="2"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<outlet property="delegate" destination="-1" id="CAh-ZE-xbT"/>
</connections>
</textField>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="详细地址:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="NP3-Lz-Htq"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="详细地址:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="NP3-Lz-Htq">
<frame key="frameInset" minX="19" minY="278" width="66" height="21"/> <frame key="frameInset" minX="19" minY="278" width="66" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
...@@ -132,7 +116,7 @@ ...@@ -132,7 +116,7 @@
</userDefinedRuntimeAttribute> </userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes> </userDefinedRuntimeAttributes>
<connections> <connections>
<outlet property="delegate" destination="-1" id="a1T-85-GwQ"/> <outlet property="delegate" destination="-1" id="1SU-tZ-dvP"/>
</connections> </connections>
</textField> </textField>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="76b-hj-DSH"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="76b-hj-DSH">
...@@ -169,12 +153,26 @@ ...@@ -169,12 +153,26 @@
<action selector="submitButtonClickAction:" destination="-1" eventType="touchUpInside" id="d1g-Eb-x2b"/> <action selector="submitButtonClickAction:" destination="-1" eventType="touchUpInside" id="d1g-Eb-x2b"/>
</connections> </connections>
</button> </button>
<button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="DcO-2w-RMM">
<frame key="frameInset" minX="93" minY="228" width="170" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.92941176470588238" green="0.93333333333333335" blue="0.93725490196078431" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<inset key="titleEdgeInsets" minX="-60" minY="0.0" maxX="0.0" maxY="0.0"/>
<inset key="imageEdgeInsets" minX="140" minY="0.0" maxX="0.0" maxY="0.0"/>
<state key="normal" image="down_arr">
<color key="titleColor" red="0.34901960780000002" green="0.67450980390000004" blue="0.86274509799999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
</button>
</subviews> </subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/> <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="-201" y="-177.5"/> <point key="canvasLocation" x="-201" y="-177.5"/>
</view> </view>
</objects> </objects>
<resources>
<image name="down_arr" width="16" height="9"/>
</resources>
<simulatedMetricsContainer key="defaultSimulatedMetrics"> <simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/> <simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation" orientation="landscapeRight"/> <simulatedOrientationMetrics key="orientation" orientation="landscapeRight"/>
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
- (void)addChildViewController - (void)addChildViewController
{ {
IntegralDetailsViewController *integralDetails = [[[self class] getGuideIntegralStoryboardClass] instantiateViewControllerWithIdentifier:@"IntegralDetailsViewController"]; IntegralDetailsViewController *integralDetails = [[[self class] getGuideIntegralStoryboardClass] instantiateViewControllerWithIdentifier:@"IntegralDetailsViewController"];
integralDetails.cellType = intrgralTableView; integralDetails.cellType = IntrgralTableView;
[self addChildViewController:integralDetails]; [self addChildViewController:integralDetails];
integralDetails.view.frame = CGRectMake(0, 50, self.integralDetailsView.mj_w, self.integralDetailsView.mj_h-50); integralDetails.view.frame = CGRectMake(0, 50, self.integralDetailsView.mj_w, self.integralDetailsView.mj_h-50);
[self.integralDetailsView addSubview:integralDetails.view]; [self.integralDetailsView addSubview:integralDetails.view];
......
...@@ -26,4 +26,9 @@ ...@@ -26,4 +26,9 @@
*/ */
@property (weak, nonatomic) IBOutlet UILabel *integralNumberLabel; @property (weak, nonatomic) IBOutlet UILabel *integralNumberLabel;
/**
积分数据
*/
@property (nonatomic,strong) TOScoreRecordEntity *integralEntity;
@end @end
...@@ -15,10 +15,18 @@ ...@@ -15,10 +15,18 @@
// Initialization code // Initialization code
} }
- (void)setSelected:(BOOL)selected animated:(BOOL)animated { - (void)setIntegralEntity:(TOScoreRecordEntity *)integralEntity
[super setSelected:selected animated:animated]; {
_integralEntity = integralEntity;
// Configure the view for the selected state self.integralTypeLabel.text = _integralEntity.sourceReason;
self.integralTimeLabel.text = _integralEntity.createDate;
NSString *string = nil;
if (_integralEntity.score < 0) {
string = [NSString stringWithFormat:@"%-.2lf",_integralEntity.score];
}else {
string = [NSString stringWithFormat:@"%+.2lf",_integralEntity.score];
}
self.integralNumberLabel.text = string;
} }
@end @end
...@@ -15,10 +15,10 @@ ...@@ -15,10 +15,10 @@
- intrgralTableView: 积分明细 - intrgralTableView: 积分明细
- prizeTableView: 兑奖记录 - prizeTableView: 兑奖记录
*/ */
typedef NS_ENUM(NSInteger,tableViewType){ typedef NS_ENUM(NSInteger,TableViewType){
intrgralTableView = 1, IntrgralTableView = 0,
prizeTableView PrizeTableView
}; };
...@@ -33,7 +33,7 @@ typedef NS_ENUM(NSInteger,tableViewType){ ...@@ -33,7 +33,7 @@ typedef NS_ENUM(NSInteger,tableViewType){
/** /**
type:1表示积分详情,2表示兑奖记录 type:1表示积分详情,2表示兑奖记录
*/ */
@property (nonatomic,assign) tableViewType cellType; @property (nonatomic,assign) TableViewType cellType;
/** /**
返回积分详情数据 返回积分详情数据
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
{ {
self.integralDetailsTableView.rowHeight = 70; self.integralDetailsTableView.rowHeight = 70;
self.integralDetailsTableView.tableFooterView = [UIView new]; self.integralDetailsTableView.tableFooterView = [UIView new];
if (self.cellType == prizeTableView) { if (self.cellType == PrizeTableView) {
self.integralDetailsTableView.frame = CGRectMake(0, 64, ScreenWidth, ScreenHeight-64); self.integralDetailsTableView.frame = CGRectMake(0, 64, ScreenWidth, ScreenHeight-64);
} }
} }
...@@ -49,12 +49,13 @@ ...@@ -49,12 +49,13 @@
MjRefreshHeaderCustom *headerRefresh = [MjRefreshHeaderCustom headerWithRefreshingBlock:^{ MjRefreshHeaderCustom *headerRefresh = [MjRefreshHeaderCustom headerWithRefreshingBlock:^{
[weakSelf.integralDetailsTableView.mj_footer resetNoMoreData]; [weakSelf.integralDetailsTableView.mj_footer resetNoMoreData];
switch (weakSelf.cellType) { switch (weakSelf.cellType) {
case intrgralTableView: case IntrgralTableView:
{ {
[weakSelf.integralDetailsTableView.mj_footer resetNoMoreData];
[weakSelf queryIntegralDetails:YES]; [weakSelf queryIntegralDetails:YES];
} }
break; break;
case prizeTableView: case PrizeTableView:
{ {
[weakSelf queryPrizeDetails:YES]; [weakSelf queryPrizeDetails:YES];
} }
...@@ -69,12 +70,12 @@ ...@@ -69,12 +70,12 @@
self.integralDetailsTableView.mj_header = headerRefresh; self.integralDetailsTableView.mj_header = headerRefresh;
MJRefreshAutoNormalFooter *footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{ MJRefreshAutoNormalFooter *footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
switch (weakSelf.cellType) { switch (weakSelf.cellType) {
case intrgralTableView: case IntrgralTableView:
{ {
[weakSelf queryIntegralDetails:NO]; [weakSelf.integralDetailsTableView.mj_footer endRefreshingWithNoMoreData];
} }
break; break;
case prizeTableView: case PrizeTableView:
{ {
// if (++ weakSelf.drawModel.page.page > weakSelf.totalPage) { // if (++ weakSelf.drawModel.page.page > weakSelf.totalPage) {
// [weakSelf.integralDetailsTableView.mj_footer endRefreshingWithNoMoreData]; // [weakSelf.integralDetailsTableView.mj_footer endRefreshingWithNoMoreData];
...@@ -88,8 +89,6 @@ ...@@ -88,8 +89,6 @@
default: default:
break; break;
} }
}]; }];
footer.automaticallyHidden = YES; footer.automaticallyHidden = YES;
self.integralDetailsTableView.mj_footer = footer; self.integralDetailsTableView.mj_footer = footer;
...@@ -107,6 +106,9 @@ ...@@ -107,6 +106,9 @@
weakSelf.integralDetailsTableView.emptyDataSetSource = weakSelf; weakSelf.integralDetailsTableView.emptyDataSetSource = weakSelf;
weakSelf.integralDetailsTableView.emptyDataSetDelegate = weakSelf; weakSelf.integralDetailsTableView.emptyDataSetDelegate = weakSelf;
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
if (isRemove) {
[weakSelf.datasArray removeAllObjects];
}
RsScoreDetails *integralDatas = [[RsScoreDetails alloc]initWithDictionary:returnValue[@"data"] error:nil]; RsScoreDetails *integralDatas = [[RsScoreDetails alloc]initWithDictionary:returnValue[@"data"] error:nil];
[weakSelf.datasArray addObjectsFromArray:integralDatas.recoreds]; [weakSelf.datasArray addObjectsFromArray:integralDatas.recoreds];
if (weakSelf.returnIntegralDetailsBlock) { if (weakSelf.returnIntegralDetailsBlock) {
...@@ -165,9 +167,26 @@ ...@@ -165,9 +167,26 @@
#pragma mark - <UITableViewDataSource,UITableViewDelegate> #pragma mark - <UITableViewDataSource,UITableViewDelegate>
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{ {
IntegralDetailsTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"IntegralDetailsTableViewCell" forIndexPath:indexPath]; switch (self.cellType) {
case IntrgralTableView:
return cell; {
IntegralDetailsTableViewCell *integralCell = [tableView dequeueReusableCellWithIdentifier:@"IntegralDetailsTableViewCell" forIndexPath:indexPath];
integralCell.integralEntity = self.datasArray[indexPath.row];
integralCell.selectionStyle = UITableViewCellSelectionStyleNone;
return integralCell;
}
break;
case PrizeTableView:
{
prizeDetailsTableViewCell *prizeCell = [tableView dequeueReusableCellWithIdentifier:@"prizeDetailsTableViewCell" forIndexPath:indexPath];
return prizeCell;
}
break;
default:
break;
}
return nil;
} }
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
......
//
// PrizeExchangeBillTableViewCell.h
// Lighting
//
// Created by 曹云霄 on 2016/11/22.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface PrizeExchangeBillTableViewCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UILabel *exchangeBillNumberLabel;
@property (weak, nonatomic) IBOutlet UILabel *exchangeTimeLabel;
@property (weak, nonatomic) IBOutlet UILabel *exchangeStateLabel;
@end
//
// PrizeExchangeBillTableViewCell.m
// Lighting
//
// Created by 曹云霄 on 2016/11/22.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "PrizeExchangeBillTableViewCell.h"
@implementation PrizeExchangeBillTableViewCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
//
// PrizeExchangeConsigneeTableViewCell.h
// Lighting
//
// Created by 曹云霄 on 2016/11/22.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface PrizeExchangeConsigneeTableViewCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UILabel *consigneeLabel;
@property (weak, nonatomic) IBOutlet UILabel *addressLabel;
@property (weak, nonatomic) IBOutlet UILabel *phoneNumberLabel;
@end
//
// PrizeExchangeConsigneeTableViewCell.m
// Lighting
//
// Created by 曹云霄 on 2016/11/22.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "PrizeExchangeConsigneeTableViewCell.h"
@implementation PrizeExchangeConsigneeTableViewCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
//
// PrizeExchangeDetailsViewController.h
// Lighting
//
// Created by 曹云霄 on 2016/11/22.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "BaseViewController.h"
/**
cellType
- ExchangeBillInformation: 兑换单信息
- ReceivingInformation: 收货信息
- RewardInformation: 奖励信息
*/
typedef NS_ENUM(NSInteger,CellType){
ExchangeBillInformation = 0,
ReceivingInformation,
RewardInformation
};
@interface PrizeExchangeDetailsViewController : BaseViewController
@property (weak, nonatomic) IBOutlet UITableView *prizeExchangeDetailsTableView;
@end
//
// PrizeExchangeDetailsViewController.m
// Lighting
//
// Created by 曹云霄 on 2016/11/22.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "PrizeExchangeDetailsViewController.h"
#import "PrizeExchangeBillTableViewCell.h"
#import "PrizeExchangeSectionTableViewCell.h"
#import "PrizeExchangeInformationTableViewCell.h"
#import "PrizeExchangeConsigneeTableViewCell.h"
@interface PrizeExchangeDetailsViewController ()<UITableViewDelegate,UITableViewDataSource>
@end
@implementation PrizeExchangeDetailsViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self setUpTableView];
[self getPrizeDetailsDataAction];
}
#pragma mark - UITableView
- (void)setUpTableView
{
self.prizeExchangeDetailsTableView.tableFooterView = [UIView new];
}
#pragma mark - 兑奖记录详情
- (void)getPrizeDetailsDataAction
{
WS(weakSelf);
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:SERVERREQUESTURL(PRIZEBILLDETAILS) WithCallClass:weakSelf WithRequestType:ONE WithParameter:nil WithReturnValueBlock:^(id returnValue) {
NSSLog(@"%@",returnValue);
} WithErrorCodeBlock:^(id errorCodeValue) {
} WithFailureBlock:^(NSError *error) {
}];
}
#pragma mark - <UITableViewDelegate,UITableViewDataSource>
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
switch (indexPath.row) {
case ExchangeBillInformation:
{
PrizeExchangeBillTableViewCell *billCell = [tableView dequeueReusableCellWithIdentifier:@"PrizeExchangeBillTableViewCell" forIndexPath:indexPath];
return billCell;
}
break;
case ReceivingInformation:
{
PrizeExchangeConsigneeTableViewCell *consigneeCell = [tableView dequeueReusableCellWithIdentifier:@"PrizeExchangeConsigneeTableViewCell" forIndexPath:indexPath];
return consigneeCell;
}
break;
case RewardInformation:
{
PrizeExchangeInformationTableViewCell *rewardCell = [tableView dequeueReusableCellWithIdentifier:@"PrizeExchangeInformationTableViewCell" forIndexPath:indexPath];
return rewardCell;
}
break;
default:
break;
}
return nil;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 3;
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 3;
}
@end
//
// PrizeExchangeInformationTableViewCell.h
// Lighting
//
// Created by 曹云霄 on 2016/11/22.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface PrizeExchangeInformationTableViewCell : UITableViewCell
@end
//
// PrizeExchangeInformationTableViewCell.m
// Lighting
//
// Created by 曹云霄 on 2016/11/22.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "PrizeExchangeInformationTableViewCell.h"
@implementation PrizeExchangeInformationTableViewCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
//
// PrizeExchangeSectionTableViewCell.h
// Lighting
//
// Created by 曹云霄 on 2016/11/22.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface PrizeExchangeSectionTableViewCell : UITableViewCell
/**
section title
*/
@property (weak, nonatomic) IBOutlet UILabel *sectionTitleLabel;
@end
//
// PrizeExchangeSectionTableViewCell.m
// Lighting
//
// Created by 曹云霄 on 2016/11/22.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "PrizeExchangeSectionTableViewCell.h"
@implementation PrizeExchangeSectionTableViewCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
// //
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import "PrizeListModel.h"
@interface PrizeListCollectionViewCell : UICollectionViewCell @interface PrizeListCollectionViewCell : UICollectionViewCell
...@@ -29,5 +29,5 @@ ...@@ -29,5 +29,5 @@
/** /**
奖品数据 奖品数据
*/ */
@property (nonatomic,strong) TOPrizeEntity *prizeModel; @property (nonatomic,strong) PrizeListModel *prizeModel;
@end @end
...@@ -10,11 +10,18 @@ ...@@ -10,11 +10,18 @@
@implementation PrizeListCollectionViewCell @implementation PrizeListCollectionViewCell
- (void)setPrizeModel:(TOPrizeEntity *)prizeModel - (void)setPrizeModel:(PrizeListModel *)prizeModel
{ {
_prizeModel = prizeModel; _prizeModel = prizeModel;
[self.prizeImageView sd_setImageWithURL:[NSURL URLWithString:_prizeModel.picture] placeholderImage:REPLACEIMAGE]; [self.prizeImageView sd_setImageWithURL:[NSURL URLWithString:_prizeModel.picture] placeholderImage:REPLACEIMAGE];
self.prizeDescribeLabel.text = _prizeModel.name; self.prizeDescribeLabel.text = _prizeModel.name;
self.isSelectButton.selected = _prizeModel.isSelect;
}
#pragma mark - 选中
- (IBAction)isSelectButton:(UIButton *)sender {
sender.selected = !sender.selected;
_prizeModel.isSelect = sender.selected;
} }
@end @end
...@@ -23,6 +23,11 @@ ...@@ -23,6 +23,11 @@
奖品数据源 奖品数据源
*/ */
@property (nonatomic,strong) NSMutableArray *prizeDatasArray; @property (nonatomic,strong) NSMutableArray *prizeDatasArray;
/**
总页数
*/
@property (nonatomic,assign) NSInteger totalPage;
@end @end
@implementation PrizeMainViewController @implementation PrizeMainViewController
...@@ -40,7 +45,7 @@ ...@@ -40,7 +45,7 @@
{ {
self.prizeCollectionViewFlowLayout.itemSize = CGSizeMake((ScreenWidth-100)/4, (ScreenWidth-100)/4); self.prizeCollectionViewFlowLayout.itemSize = CGSizeMake((ScreenWidth-100)/4, (ScreenWidth-100)/4);
self.prizeCollectionViewFlowLayout.minimumLineSpacing = 20; self.prizeCollectionViewFlowLayout.minimumLineSpacing = 20;
self.prizeCollectionViewFlowLayout.minimumInteritemSpacing = 20; self.prizeCollectionViewFlowLayout.minimumInteritemSpacing = 10;
self.prizeCollectionViewFlowLayout.sectionInset = UIEdgeInsetsMake(20, 20, 20, 20); self.prizeCollectionViewFlowLayout.sectionInset = UIEdgeInsetsMake(20, 20, 20, 20);
} }
...@@ -57,8 +62,12 @@ ...@@ -57,8 +62,12 @@
headerRefresh.lastUpdatedTimeLabel.hidden = YES; headerRefresh.lastUpdatedTimeLabel.hidden = YES;
[headerRefresh beginRefreshing]; [headerRefresh beginRefreshing];
self.prizeListCollectionView.mj_header = headerRefresh; self.prizeListCollectionView.mj_header = headerRefresh;
MJRefreshAutoNormalFooter *footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{ MJRefreshAutoNormalFooter *footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
if (++ weakSelf.queryPrizeModel.page.page >= weakSelf.totalPage) {
[weakSelf.prizeListCollectionView.mj_footer endRefreshingWithNoMoreData];
}else{
[weakSelf getPrizeListDatasAction:NO];
}
}]; }];
footer.automaticallyHidden = YES; footer.automaticallyHidden = YES;
...@@ -77,7 +86,11 @@ ...@@ -77,7 +86,11 @@
weakSelf.prizeListCollectionView.emptyDataSetSource = weakSelf; weakSelf.prizeListCollectionView.emptyDataSetSource = weakSelf;
weakSelf.prizeListCollectionView.emptyDataSetDelegate = weakSelf; weakSelf.prizeListCollectionView.emptyDataSetDelegate = weakSelf;
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
if (isRemove) {
[weakSelf.prizeDatasArray removeAllObjects];
}
PrizeResponse *prizeResult = [[PrizeResponse alloc]initWithDictionary:returnValue[@"data"] error:nil]; PrizeResponse *prizeResult = [[PrizeResponse alloc]initWithDictionary:returnValue[@"data"] error:nil];
weakSelf.totalPage = prizeResult.totalpages;
for (TOPrizeEntity *prize in prizeResult.prizes) { for (TOPrizeEntity *prize in prizeResult.prizes) {
PrizeListModel *model = [[PrizeListModel alloc]initWithSuper:prize]; PrizeListModel *model = [[PrizeListModel alloc]initWithSuper:prize];
[weakSelf.prizeDatasArray addObject:model]; [weakSelf.prizeDatasArray addObject:model];
...@@ -123,15 +136,33 @@ ...@@ -123,15 +136,33 @@
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{ {
PrizeListCollectionViewCell *prizeListCell = [collectionView dequeueReusableCellWithReuseIdentifier:@"PrizeListCollectionViewCell" forIndexPath:indexPath]; PrizeListCollectionViewCell *prizeListCell = [collectionView dequeueReusableCellWithReuseIdentifier:@"PrizeListCollectionViewCell" forIndexPath:indexPath];
prizeListCell.prizeModel = self.prizeDatasArray[indexPath.row]; prizeListCell.prizeModel = self.prizeDatasArray[indexPath.item];
return prizeListCell; return prizeListCell;
} }
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
{
PrizeListCollectionViewCell *cell = (PrizeListCollectionViewCell *)[collectionView cellForItemAtIndexPath:indexPath];
cell.isSelectButton.selected = !cell.isSelectButton.selected;
PrizeListModel *model = self.prizeDatasArray[indexPath.item];
model.isSelect = cell.isSelectButton.selected;
}
#pragma mark - 申请兑奖 #pragma mark - 申请兑奖
- (IBAction)applyExchangeButton:(UIButton *)sender { - (IBAction)applyExchangeButton:(UIButton *)sender {
NSMutableArray *selectArray = [NSMutableArray array];
for (PrizeListModel *model in self.prizeDatasArray) {
if (model.isSelect) {
[selectArray addObject:model];
}
}
if (!selectArray.count) {
[self ErrorMBProgressView:@"未选中任何礼品"];return;
}
ApplyPrizeViewController *applyPrizeVC = [[ApplyPrizeViewController alloc]init]; ApplyPrizeViewController *applyPrizeVC = [[ApplyPrizeViewController alloc]init];
applyPrizeVC.preferredContentSize = applyPrizeVC.view.mj_size; applyPrizeVC.preferredContentSize = applyPrizeVC.view.mj_size;
applyPrizeVC.selectArray = selectArray;
applyPrizeVC.modalPresentationStyle = UIModalPresentationFormSheet; applyPrizeVC.modalPresentationStyle = UIModalPresentationFormSheet;
UIPopoverPresentationController *pop = applyPrizeVC.popoverPresentationController; UIPopoverPresentationController *pop = applyPrizeVC.popoverPresentationController;
pop.permittedArrowDirections = UIPopoverArrowDirectionAny; pop.permittedArrowDirections = UIPopoverArrowDirectionAny;
...@@ -143,7 +174,7 @@ ...@@ -143,7 +174,7 @@
- (IBAction)exchangeRecordButton:(UIButton *)sender { - (IBAction)exchangeRecordButton:(UIButton *)sender {
IntegralDetailsViewController *prizeDetails = [[[self class] getGuideIntegralStoryboardClass] instantiateViewControllerWithIdentifier:@"IntegralDetailsViewController"]; IntegralDetailsViewController *prizeDetails = [[[self class] getGuideIntegralStoryboardClass] instantiateViewControllerWithIdentifier:@"IntegralDetailsViewController"];
prizeDetails.cellType = prizeTableView; prizeDetails.cellType = PrizeTableView;
[self.navigationController pushViewController:prizeDetails animated:YES]; [self.navigationController pushViewController:prizeDetails animated:YES];
} }
......
...@@ -102,10 +102,8 @@ ...@@ -102,10 +102,8 @@
self.citySelecteview.delegate = self; self.citySelecteview.delegate = self;
[self.citySelecteview.selectedCityButton addTarget:self action:@selector(CompleteButton) forControlEvents:UIControlEventTouchUpInside]; [self.citySelecteview.selectedCityButton addTarget:self action:@selector(CompleteButton) forControlEvents:UIControlEventTouchUpInside];
[UIView animateWithDuration:0.2 animations:^{ [UIView animateWithDuration:0.2 animations:^{
self.citySelecteview.frame = CGRectMake(0, self.view.frame.size.height-160, self.view.frame.size.width, 160); self.citySelecteview.frame = CGRectMake(0, self.view.frame.size.height-160, self.view.frame.size.width, 160);
}completion:^(BOOL finished) { }completion:^(BOOL finished) {
self.citySelected.enabled = NO; self.citySelected.enabled = NO;
}]; }];
} }
......
...@@ -181,7 +181,7 @@ ...@@ -181,7 +181,7 @@
#pragma mark -按钮事件响应 #pragma mark -按钮事件响应
- (void)ButtonClick:(UIButton *)button - (void)ButtonClick:(UIButton *)button
{ {
if (button.tag == 101 || button.tag == 103 || button.tag == 104) { if (button.tag != 100) {
if (!(button.tag == 104 && ![Shoppersmanager manager].currentCustomer)) { if (!(button.tag == 104 && ![Shoppersmanager manager].currentCustomer)) {
self.underlineView.hidden = NO; self.underlineView.hidden = NO;
//下划线动画 //下划线动画
......
...@@ -193,6 +193,11 @@ ...@@ -193,6 +193,11 @@
29E9444D1DE40D5F007CD26C /* PrizeListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 29E9444C1DE40D5F007CD26C /* PrizeListModel.m */; }; 29E9444D1DE40D5F007CD26C /* PrizeListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 29E9444C1DE40D5F007CD26C /* PrizeListModel.m */; };
29E944521DE413D6007CD26C /* ApplyPrizeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29E944501DE413D6007CD26C /* ApplyPrizeViewController.m */; }; 29E944521DE413D6007CD26C /* ApplyPrizeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29E944501DE413D6007CD26C /* ApplyPrizeViewController.m */; };
29E944531DE413D6007CD26C /* ApplyPrizeViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 29E944511DE413D6007CD26C /* ApplyPrizeViewController.xib */; }; 29E944531DE413D6007CD26C /* ApplyPrizeViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 29E944511DE413D6007CD26C /* ApplyPrizeViewController.xib */; };
29E944561DE45529007CD26C /* PrizeExchangeBillTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 29E944551DE45529007CD26C /* PrizeExchangeBillTableViewCell.m */; };
29E944591DE45558007CD26C /* PrizeExchangeConsigneeTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 29E944581DE45558007CD26C /* PrizeExchangeConsigneeTableViewCell.m */; };
29E9445C1DE45583007CD26C /* PrizeExchangeSectionTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 29E9445B1DE45583007CD26C /* PrizeExchangeSectionTableViewCell.m */; };
29E9445F1DE455AC007CD26C /* PrizeExchangeInformationTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 29E9445E1DE455AC007CD26C /* PrizeExchangeInformationTableViewCell.m */; };
29E944621DE45654007CD26C /* PrizeExchangeDetailsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29E944611DE45654007CD26C /* PrizeExchangeDetailsViewController.m */; };
29EAAE8E1CDC3E8E00C4DBA2 /* BillingInfoView.m in Sources */ = {isa = PBXBuildFile; fileRef = 29EAAE8D1CDC3E8E00C4DBA2 /* BillingInfoView.m */; }; 29EAAE8E1CDC3E8E00C4DBA2 /* BillingInfoView.m in Sources */ = {isa = PBXBuildFile; fileRef = 29EAAE8D1CDC3E8E00C4DBA2 /* BillingInfoView.m */; };
29EAAE901CDC3E9700C4DBA2 /* BillingInfoView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 29EAAE8F1CDC3E9700C4DBA2 /* BillingInfoView.xib */; }; 29EAAE901CDC3E9700C4DBA2 /* BillingInfoView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 29EAAE8F1CDC3E9700C4DBA2 /* BillingInfoView.xib */; };
29EAAE951CDC414C00C4DBA2 /* SeceneLibraryCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 29EAAE941CDC414C00C4DBA2 /* SeceneLibraryCollectionViewCell.m */; }; 29EAAE951CDC414C00C4DBA2 /* SeceneLibraryCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 29EAAE941CDC414C00C4DBA2 /* SeceneLibraryCollectionViewCell.m */; };
...@@ -563,6 +568,16 @@ ...@@ -563,6 +568,16 @@
29E9444F1DE413D6007CD26C /* ApplyPrizeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApplyPrizeViewController.h; sourceTree = "<group>"; }; 29E9444F1DE413D6007CD26C /* ApplyPrizeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApplyPrizeViewController.h; sourceTree = "<group>"; };
29E944501DE413D6007CD26C /* ApplyPrizeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ApplyPrizeViewController.m; sourceTree = "<group>"; }; 29E944501DE413D6007CD26C /* ApplyPrizeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ApplyPrizeViewController.m; sourceTree = "<group>"; };
29E944511DE413D6007CD26C /* ApplyPrizeViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ApplyPrizeViewController.xib; sourceTree = "<group>"; }; 29E944511DE413D6007CD26C /* ApplyPrizeViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ApplyPrizeViewController.xib; sourceTree = "<group>"; };
29E944541DE45529007CD26C /* PrizeExchangeBillTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrizeExchangeBillTableViewCell.h; sourceTree = "<group>"; };
29E944551DE45529007CD26C /* PrizeExchangeBillTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PrizeExchangeBillTableViewCell.m; sourceTree = "<group>"; };
29E944571DE45558007CD26C /* PrizeExchangeConsigneeTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrizeExchangeConsigneeTableViewCell.h; sourceTree = "<group>"; };
29E944581DE45558007CD26C /* PrizeExchangeConsigneeTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PrizeExchangeConsigneeTableViewCell.m; sourceTree = "<group>"; };
29E9445A1DE45583007CD26C /* PrizeExchangeSectionTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrizeExchangeSectionTableViewCell.h; sourceTree = "<group>"; };
29E9445B1DE45583007CD26C /* PrizeExchangeSectionTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PrizeExchangeSectionTableViewCell.m; sourceTree = "<group>"; };
29E9445D1DE455AC007CD26C /* PrizeExchangeInformationTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrizeExchangeInformationTableViewCell.h; sourceTree = "<group>"; };
29E9445E1DE455AC007CD26C /* PrizeExchangeInformationTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PrizeExchangeInformationTableViewCell.m; sourceTree = "<group>"; };
29E944601DE45654007CD26C /* PrizeExchangeDetailsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrizeExchangeDetailsViewController.h; sourceTree = "<group>"; };
29E944611DE45654007CD26C /* PrizeExchangeDetailsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PrizeExchangeDetailsViewController.m; sourceTree = "<group>"; };
29EAAE8C1CDC3E8E00C4DBA2 /* BillingInfoView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BillingInfoView.h; sourceTree = "<group>"; }; 29EAAE8C1CDC3E8E00C4DBA2 /* BillingInfoView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BillingInfoView.h; sourceTree = "<group>"; };
29EAAE8D1CDC3E8E00C4DBA2 /* BillingInfoView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BillingInfoView.m; sourceTree = "<group>"; }; 29EAAE8D1CDC3E8E00C4DBA2 /* BillingInfoView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BillingInfoView.m; sourceTree = "<group>"; };
29EAAE8F1CDC3E9700C4DBA2 /* BillingInfoView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = BillingInfoView.xib; sourceTree = "<group>"; }; 29EAAE8F1CDC3E9700C4DBA2 /* BillingInfoView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = BillingInfoView.xib; sourceTree = "<group>"; };
...@@ -1773,6 +1788,14 @@ ...@@ -1773,6 +1788,14 @@
children = ( children = (
29E944441DE3EFFE007CD26C /* PrizeListCollectionViewCell.h */, 29E944441DE3EFFE007CD26C /* PrizeListCollectionViewCell.h */,
29E944451DE3EFFE007CD26C /* PrizeListCollectionViewCell.m */, 29E944451DE3EFFE007CD26C /* PrizeListCollectionViewCell.m */,
29E944541DE45529007CD26C /* PrizeExchangeBillTableViewCell.h */,
29E944551DE45529007CD26C /* PrizeExchangeBillTableViewCell.m */,
29E944571DE45558007CD26C /* PrizeExchangeConsigneeTableViewCell.h */,
29E944581DE45558007CD26C /* PrizeExchangeConsigneeTableViewCell.m */,
29E9445A1DE45583007CD26C /* PrizeExchangeSectionTableViewCell.h */,
29E9445B1DE45583007CD26C /* PrizeExchangeSectionTableViewCell.m */,
29E9445D1DE455AC007CD26C /* PrizeExchangeInformationTableViewCell.h */,
29E9445E1DE455AC007CD26C /* PrizeExchangeInformationTableViewCell.m */,
); );
name = Cells; name = Cells;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1794,6 +1817,8 @@ ...@@ -1794,6 +1817,8 @@
29E9444F1DE413D6007CD26C /* ApplyPrizeViewController.h */, 29E9444F1DE413D6007CD26C /* ApplyPrizeViewController.h */,
29E944501DE413D6007CD26C /* ApplyPrizeViewController.m */, 29E944501DE413D6007CD26C /* ApplyPrizeViewController.m */,
29E944511DE413D6007CD26C /* ApplyPrizeViewController.xib */, 29E944511DE413D6007CD26C /* ApplyPrizeViewController.xib */,
29E944601DE45654007CD26C /* PrizeExchangeDetailsViewController.h */,
29E944611DE45654007CD26C /* PrizeExchangeDetailsViewController.m */,
); );
name = Controllers; name = Controllers;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -2121,8 +2146,10 @@ ...@@ -2121,8 +2146,10 @@
299C7F5A1CE21FA800E7D7CB /* AddressViewController.m in Sources */, 299C7F5A1CE21FA800E7D7CB /* AddressViewController.m in Sources */,
2916A7411D70362000644C8C /* PaymentsViewController.m in Sources */, 2916A7411D70362000644C8C /* PaymentsViewController.m in Sources */,
291D6A651D0002AF007891AE /* TOGoodsEntityModel.m in Sources */, 291D6A651D0002AF007891AE /* TOGoodsEntityModel.m in Sources */,
29E944591DE45558007CD26C /* PrizeExchangeConsigneeTableViewCell.m in Sources */,
2928F8381CD09E730036D761 /* CustomButton.m in Sources */, 2928F8381CD09E730036D761 /* CustomButton.m in Sources */,
293393551CD3379E000D997B /* ShoppingTableViewCell.m in Sources */, 293393551CD3379E000D997B /* ShoppingTableViewCell.m in Sources */,
29E944621DE45654007CD26C /* PrizeExchangeDetailsViewController.m in Sources */,
2916A73E1D70232700644C8C /* RebateViewController.m in Sources */, 2916A73E1D70232700644C8C /* RebateViewController.m in Sources */,
29D260F51CEEAE2800A9787D /* FullScreenViewController.m in Sources */, 29D260F51CEEAE2800A9787D /* FullScreenViewController.m in Sources */,
292AD2041DE30A5F003EC56E /* IntegralDetailsTableViewCell.m in Sources */, 292AD2041DE30A5F003EC56E /* IntegralDetailsTableViewCell.m in Sources */,
...@@ -2240,6 +2267,7 @@ ...@@ -2240,6 +2267,7 @@
29C584ED1CDA429500C6F677 /* ProductDetailsViewController.m in Sources */, 29C584ED1CDA429500C6F677 /* ProductDetailsViewController.m in Sources */,
291D6A6E1D0012AB007891AE /* GoodsCategoryModel.m in Sources */, 291D6A6E1D0012AB007891AE /* GoodsCategoryModel.m in Sources */,
0447085E1CD7C06B00555827 /* LoginViewController.m in Sources */, 0447085E1CD7C06B00555827 /* LoginViewController.m in Sources */,
29E9445C1DE45583007CD26C /* PrizeExchangeSectionTableViewCell.m in Sources */,
298534601DD4B0290023BBAE /* AirPrintManager.m in Sources */, 298534601DD4B0290023BBAE /* AirPrintManager.m in Sources */,
2928F83B1CD0A0CE0036D761 /* CustomTabbarController.m in Sources */, 2928F83B1CD0A0CE0036D761 /* CustomTabbarController.m in Sources */,
295DEA9C1DB70FB9006ED4A6 /* RightControlTableViewCell.m in Sources */, 295DEA9C1DB70FB9006ED4A6 /* RightControlTableViewCell.m in Sources */,
...@@ -2252,9 +2280,11 @@ ...@@ -2252,9 +2280,11 @@
295DEAC21DB786B8006ED4A6 /* CardDontUseViewController.m in Sources */, 295DEAC21DB786B8006ED4A6 /* CardDontUseViewController.m in Sources */,
29E944521DE413D6007CD26C /* ApplyPrizeViewController.m in Sources */, 29E944521DE413D6007CD26C /* ApplyPrizeViewController.m in Sources */,
292AD2001DE309C1003EC56E /* IntegralDetailsViewController.m in Sources */, 292AD2001DE309C1003EC56E /* IntegralDetailsViewController.m in Sources */,
29E944561DE45529007CD26C /* PrizeExchangeBillTableViewCell.m in Sources */,
044708611CD7C1E800555827 /* MainSetViewController.m in Sources */, 044708611CD7C1E800555827 /* MainSetViewController.m in Sources */,
29E28CE81CE0B91B00812A55 /* HENLENSONG.m in Sources */, 29E28CE81CE0B91B00812A55 /* HENLENSONG.m in Sources */,
299249441CDB51B100786B1E /* ModifyShippingAddressView.m in Sources */, 299249441CDB51B100786B1E /* ModifyShippingAddressView.m in Sources */,
29E9445F1DE455AC007CD26C /* PrizeExchangeInformationTableViewCell.m in Sources */,
295DE56C1DDC5DFA00E27725 /* GuideIntegralViewController.m in Sources */, 295DE56C1DDC5DFA00E27725 /* GuideIntegralViewController.m in Sources */,
2906B5D71CD89246000849B4 /* ClientDetailsTableViewCell.m in Sources */, 2906B5D71CD89246000849B4 /* ClientDetailsTableViewCell.m in Sources */,
29BB27801CD9DFD7009A0813 /* AboutViewController.m in Sources */, 29BB27801CD9DFD7009A0813 /* AboutViewController.m in Sources */,
......
...@@ -30,12 +30,10 @@ ...@@ -30,12 +30,10 @@
return YES; return YES;
} }
#pragma mark - 设置bugly和pgy #pragma mark - 设置bugly
- (void)setUpBuglyAndPgy - (void)setUpBuglyAndPgy
{ {
[Bugly startWithAppId:@"900033734"]; [Bugly startWithAppId:@"900033734"];
[[PgyUpdateManager sharedPgyManager] startManagerWithAppId:@"95fcb4e47cf3d6c7309a2760ccccde66"];
[[PgyUpdateManager sharedPgyManager] checkUpdate];
} }
- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(nullable UIWindow *)window - (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(nullable UIWindow *)window
......
This diff is collapsed.
...@@ -302,6 +302,16 @@ extern NSString *const ALLEXCHANGERECORD; ...@@ -302,6 +302,16 @@ extern NSString *const ALLEXCHANGERECORD;
* 是否有兑奖资格 * 是否有兑奖资格
*/ */
extern NSString *const EXCHANGEQUALIFICATION; extern NSString *const EXCHANGEQUALIFICATION;
/**
* 保存兑奖单
*/
extern NSString *const SAVEPRIZEBILL;
/**
* 兑奖单详情
*/
extern NSString *const PRIZEBILLDETAILS;
/*****************************************接口地址*****************************************/ /*****************************************接口地址*****************************************/
......
...@@ -296,6 +296,16 @@ NSString *const ALLEXCHANGERECORD = @"/prizebill/all?employee=%@"; ...@@ -296,6 +296,16 @@ NSString *const ALLEXCHANGERECORD = @"/prizebill/all?employee=%@";
* 是否有兑奖资格 * 是否有兑奖资格
*/ */
NSString *const EXCHANGEQUALIFICATION = @"/prizequalification?employee=%@"; NSString *const EXCHANGEQUALIFICATION = @"/prizequalification?employee=%@";
/**
* 保存兑奖单
*/
NSString *const SAVEPRIZEBILL = @"/prizebill";
/**
* 兑奖单详情
*/
NSString *const PRIZEBILLDETAILS = @"/prizebill/%@";
/*****************************************接口地址*****************************************/ /*****************************************接口地址*****************************************/
......
...@@ -13,5 +13,4 @@ pod 'JSONModel', '~> 1.2.0' ...@@ -13,5 +13,4 @@ pod 'JSONModel', '~> 1.2.0'
pod 'UMengSocial' pod 'UMengSocial'
pod 'DZNEmptyDataSet' pod 'DZNEmptyDataSet'
pod 'Bugly' pod 'Bugly'
pod 'PgyUpdate'
pod 'UMengAnalytics', '~> 4.1.2' pod 'UMengAnalytics', '~> 4.1.2'
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