Initial commit
This commit is contained in:
Binary file not shown.
+15
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// CoastRecordViewController.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 2017/4/25.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "BaseVIewContorller.h"
|
||||
|
||||
@interface CoastRecordViewController : BaseVIewContorller
|
||||
|
||||
@property (nonatomic) BOOL fromDetailVC;
|
||||
|
||||
@end
|
||||
+263
@@ -0,0 +1,263 @@
|
||||
//
|
||||
// CoastRecordViewController.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 2017/4/25.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "CoastRecordViewController.h"
|
||||
#import "GoldConvertRecordViewCell.h"
|
||||
#import "DiscountCoupon.h"
|
||||
#import "JHRefresh.h"
|
||||
@interface CoastRecordViewController ()<UITableViewDelegate,UITableViewDataSource>
|
||||
@property(nonatomic,strong)UITableView *tableView;
|
||||
@property(nonatomic,strong)NSMutableArray *dataArr;
|
||||
@property(nonatomic)BOOL isLoadMore;
|
||||
@property(nonatomic) CGFloat currentPage;
|
||||
@property(nonatomic,copy) NSString *total;
|
||||
@end
|
||||
const float PageSize = 20.0f;
|
||||
@implementation CoastRecordViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
[self addTitleViewWithTitle:@"兑换记录"];
|
||||
_dataArr = [[NSMutableArray alloc] init];
|
||||
_currentPage = 0;
|
||||
[self creatTab];
|
||||
[self loadDatas];
|
||||
}
|
||||
|
||||
-(void)loadDatas{
|
||||
[self loadDataWith:PageSize firstResult:0];
|
||||
}
|
||||
|
||||
|
||||
-(void)loadDataWith:(NSInteger )pageSize firstResult:(NSInteger)firstResult
|
||||
{
|
||||
__weak typeof (self)weakSelf = self;
|
||||
NSString *userID = [dataContorl dataControlGetUserIdInfo];
|
||||
[AFHttpTool couponRecords:userID pageSize:pageSize firstResult:firstResult success:^(id response) {
|
||||
NSDictionary *reDic=[NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingMutableContainers error:nil];
|
||||
NSString *result=reDic[@"result"];
|
||||
NSLog(@"redic***:%@",reDic);
|
||||
self.total =reDic[@"total"];
|
||||
if ([result isEqualToString:@"100"]){
|
||||
NSArray *dataArr =reDic[@"data"];
|
||||
|
||||
if (dataArr&&![dataArr isKindOfClass:[NSNull class]]){
|
||||
if (dataArr.count!=0) {
|
||||
for (NSDictionary *dic in dataArr) {
|
||||
DiscountCoupon *model = [[DiscountCoupon alloc] initWithDict:dic];
|
||||
[_dataArr addObject:model];
|
||||
}
|
||||
[weakSelf.tableView reloadData];
|
||||
|
||||
}else{
|
||||
|
||||
if (_currentPage==0) {
|
||||
[weakSelf resetNoDataView];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}else{
|
||||
[weakSelf.view makeToast:@"请求异常"];
|
||||
}
|
||||
|
||||
} failure:^(NSError *err) {
|
||||
[weakSelf.view makeToast:@"请求异常"];
|
||||
}];
|
||||
}
|
||||
|
||||
-(void)resetNoDataView{
|
||||
|
||||
[self.tableView removeFromSuperview];
|
||||
self.view.backgroundColor =TABLE_BACKGROUD_COLOR;
|
||||
UIImageView *backImg = [[UIImageView alloc] initWithFrame:CGRectMake(self.view.frame.size.width/2 - 98/2 ,self.view.frame.size.height/4, 108, 98)];
|
||||
backImg.image = [UIImage imageNamed:@"nurse_empty_picture"];
|
||||
[self.view addSubview:backImg];
|
||||
|
||||
UILabel *title=[[UILabel alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(backImg.frame) + 30, self.view.frame.size.width,20)];
|
||||
title.text = @"还里空空如也";
|
||||
title.textAlignment = NSTextAlignmentCenter;
|
||||
title.font =[UIFont systemFontOfSize:15];
|
||||
title.textColor = RGB(51, 51, 51);
|
||||
[self.view addSubview:title];
|
||||
|
||||
UILabel *title2=[[UILabel alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(title.frame) + 7, self.view.frame.size.width,20)];
|
||||
|
||||
title2.text = @"还没有兑换记录~";
|
||||
title2.font =[UIFont systemFontOfSize:12];
|
||||
title2.textAlignment = NSTextAlignmentCenter;
|
||||
title2.textColor = RGB(153, 153, 153);
|
||||
[self.view addSubview:title2];
|
||||
|
||||
}
|
||||
-(void)goBackAction{
|
||||
|
||||
if (_fromDetailVC) {
|
||||
|
||||
[self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:1] animated:YES];
|
||||
|
||||
}else{
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
-(void)creatTab{
|
||||
|
||||
self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0,0,self.view.frame.size.width,self.view.frame.size.height) style:UITableViewStyleGrouped];
|
||||
self.tableView.delegate = self;
|
||||
self.tableView.dataSource = self;
|
||||
self.tableView.scrollEnabled = YES;
|
||||
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
self.tableView.showsVerticalScrollIndicator = NO;
|
||||
self.tableView.backgroundColor = RGB(242, 242, 242);
|
||||
|
||||
[self.view addSubview:self.tableView];
|
||||
[self creatReatRefreshView];
|
||||
}
|
||||
|
||||
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
|
||||
|
||||
return _dataArr.count;
|
||||
|
||||
}
|
||||
|
||||
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
|
||||
|
||||
return 1;
|
||||
|
||||
}
|
||||
|
||||
-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
|
||||
GoldConvertRecordViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"GoldConvertRecordViewCell"];
|
||||
if (!cell) {
|
||||
cell = [[[NSBundle mainBundle]loadNibNamed:@"GoldConvertRecordViewCell" owner:self options:nil]lastObject];
|
||||
|
||||
}
|
||||
DiscountCoupon *model = _dataArr[indexPath.section];
|
||||
[cell loadCellwith:model];
|
||||
[cell.fuzhiBtn addTarget:self action:@selector(fuzhiBtnAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
cell.fuzhiBtn.tag = indexPath.section;
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
|
||||
return cell;
|
||||
|
||||
}
|
||||
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
|
||||
return 170;
|
||||
}
|
||||
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
|
||||
|
||||
return 0.1;
|
||||
}
|
||||
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
|
||||
|
||||
return 10;
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - 复制激活码
|
||||
-(void)fuzhiBtnAction:(UIButton*)btn{
|
||||
|
||||
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
|
||||
DiscountCoupon *model = _dataArr[btn.tag];
|
||||
UserModel *user = [dataContorl getUserInfo];
|
||||
NSString *paste = [NSString stringWithFormat:@"我是爱鱼奇用户:%@,手机号:%@,激活码:%@",user.nickName,user.phoneNumber,model.activationCode];
|
||||
pasteboard.string = paste;
|
||||
[self.view makeToast:@"已成功复制到粘贴板"];
|
||||
}
|
||||
|
||||
#pragma mark UIScrollViewDelegate
|
||||
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
|
||||
{
|
||||
|
||||
|
||||
[self thredshold:0.7f intemPerPage:PageSize currentPage:_currentPage scrollViewDidScroll:scrollView];
|
||||
|
||||
}
|
||||
|
||||
//当前页面已经划过了 70% 的时候,就请求新的资源,加载数据 thredshold 设置为70% 并不是单页 70%
|
||||
//上拉预加载
|
||||
-(void)thredshold:(CGFloat)thredshold intemPerPage:(CGFloat)pageSize currentPage:(CGFloat)currentPage
|
||||
scrollViewDidScroll:(UIScrollView *)scrollView
|
||||
{
|
||||
if (scrollView.contentOffset.y<0) {
|
||||
return;
|
||||
}
|
||||
|
||||
CGFloat current = scrollView.contentOffset.y + scrollView.frame.size.height;
|
||||
CGFloat total = scrollView.contentSize.height;
|
||||
CGFloat ratio = current / total;
|
||||
CGFloat needRead = pageSize * thredshold + currentPage * pageSize;
|
||||
CGFloat totalItem = pageSize * (currentPage + 1);
|
||||
CGFloat newThreshold = needRead / totalItem;
|
||||
|
||||
if (ratio >= newThreshold){
|
||||
|
||||
|
||||
int pagecount =[self.total floatValue]/PageSize + 1;
|
||||
if (_currentPage<pagecount) {
|
||||
_currentPage += 1;
|
||||
NSInteger firstSize = (currentPage +1)*pageSize;
|
||||
[self loadmoredata:firstSize pageSize:pageSize];
|
||||
NSLog(@"*****----*****%f",_currentPage);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark -加载更多
|
||||
-(void)loadmoredata:(NSInteger)firstResult pageSize:(NSInteger)pageSize{
|
||||
|
||||
[self loadDataWith:PageSize firstResult:firstResult];
|
||||
}
|
||||
#pragma mark - 刷新 加载时更多
|
||||
-(void)creatReatRefreshView{
|
||||
__weak typeof (self)weskSelf=self;
|
||||
|
||||
|
||||
//上拉加载更多
|
||||
|
||||
[weskSelf.tableView addRefreshFooterViewWithAniViewClass:[JHRefreshCommonAniView class] beginRefresh:^{
|
||||
|
||||
if (weskSelf.isLoadMore) {
|
||||
return ;
|
||||
}
|
||||
weskSelf.isLoadMore=YES;
|
||||
int pagecount =[self.total floatValue]/PageSize + 1;
|
||||
NSLog(@"page:::::**** %d",pagecount);
|
||||
|
||||
if (_currentPage>=pagecount) {
|
||||
[weskSelf.view makeToast:@"已经全部加载完毕"];
|
||||
[weskSelf endRefreshing];
|
||||
}
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
-(void)endRefreshing{
|
||||
|
||||
|
||||
if (self.isLoadMore) {
|
||||
self.isLoadMore=NO;
|
||||
[self.tableView footerEndRefreshing];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// IfishGoldCoastDetailViewController.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 2017/4/25.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "BaseVIewContorller.h"
|
||||
#import "DiscountCoupon.h"
|
||||
@interface IfishGoldCoastDetailViewController : BaseVIewContorller
|
||||
@property(nonatomic,strong) DiscountCoupon *convert;
|
||||
|
||||
@end
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
//
|
||||
// IfishGoldCoastDetailViewController.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 2017/4/25.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "IfishGoldCoastDetailViewController.h"
|
||||
#import "GoldConvertDetailViewCell.h"
|
||||
#import "CoastRecordViewController.h"
|
||||
@interface IfishGoldCoastDetailViewController ()<UITableViewDelegate,UITableViewDataSource,MBProgressHUDDelegate>
|
||||
@property(nonatomic,strong)UITableView *tableView;
|
||||
@property (nonatomic,strong) MBProgressHUD *hud;
|
||||
|
||||
@end
|
||||
|
||||
@implementation IfishGoldCoastDetailViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
[self addTitleViewWithTitle:@"金币兑换详情"];
|
||||
[self creatTab];
|
||||
}
|
||||
|
||||
-(void)creatTab{
|
||||
|
||||
self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0,0,self.view.frame.size.width,self.view.frame.size.height) style:UITableViewStyleGrouped];
|
||||
self.tableView.delegate = self;
|
||||
self.tableView.dataSource = self;
|
||||
self.tableView.scrollEnabled = YES;
|
||||
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
self.tableView.showsVerticalScrollIndicator = NO;
|
||||
self.tableView.backgroundColor = RGB(242, 242, 242);
|
||||
|
||||
[self.view addSubview:self.tableView];
|
||||
|
||||
UIButton *duiHuanBtn=[UIButton buttonWithType:UIButtonTypeCustom];
|
||||
duiHuanBtn.frame = CGRectMake(0, self.view.frame.size.height -49, self.view.frame.size.width, 49);
|
||||
|
||||
[duiHuanBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
NSMutableAttributedString *title = [[NSMutableAttributedString alloc] initWithString:@"立即兑换"];
|
||||
[title addAttribute:NSFontAttributeName value:[UIFont boldSystemFontOfSize:13] range:NSMakeRange(0, title.length)];
|
||||
[title addAttribute:NSForegroundColorAttributeName value:[UIColor whiteColor] range:NSMakeRange(0, title.length)];
|
||||
|
||||
[duiHuanBtn setAttributedTitle:title forState:UIControlStateNormal];
|
||||
[duiHuanBtn setBackgroundColor:RGB(67, 186, 255)];
|
||||
[duiHuanBtn addTarget:self action:@selector(duihuanBtnClick) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
[self.view addSubview:duiHuanBtn];
|
||||
|
||||
|
||||
|
||||
}
|
||||
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
|
||||
|
||||
return 1;
|
||||
|
||||
}
|
||||
|
||||
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
|
||||
|
||||
return 1;
|
||||
|
||||
}
|
||||
|
||||
-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
|
||||
|
||||
GoldConvertDetailViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"GoldConvertDetailViewCell"];
|
||||
if (!cell) {
|
||||
cell = [[[NSBundle mainBundle]loadNibNamed:@"GoldConvertDetailViewCell" owner:self options:nil]lastObject];
|
||||
|
||||
}
|
||||
[cell loadCellDataWith:self.convert];
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
|
||||
return cell;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
|
||||
return 470;
|
||||
}
|
||||
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
|
||||
|
||||
return 0.1;
|
||||
}
|
||||
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
|
||||
|
||||
return 10;
|
||||
|
||||
}
|
||||
|
||||
#pragma mark -金币兑换
|
||||
-(void)duihuanBtnClick{
|
||||
|
||||
//判断金币是否足够
|
||||
IfishUserAsset *asset =[dataContorl getAllIfishUserAsset];
|
||||
if (asset.goldValue < self.convert.needGold) {
|
||||
[self.view makeToast:@"金币不足"];
|
||||
return;
|
||||
}
|
||||
__weak typeof (self)weakSelf = self;
|
||||
//_hud=[MBProgressHUD showHUDAddedTo:self.view animated:YES];
|
||||
//_hud.delegate=self;
|
||||
|
||||
NSString *couponId = [NSString stringWithFormat:@"%d",self.convert.couponId];
|
||||
NSString *userID =[dataContorl dataControlGetUserIdInfo];
|
||||
[AFHttpTool exchangeCoupon:userID couponId:couponId success:^(id response) {
|
||||
NSDictionary *reDic=[NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingMutableContainers error:nil];
|
||||
NSString *result=reDic[@"result"];
|
||||
|
||||
if ([result isEqualToString:@"100"]){
|
||||
[weakSelf.view makeToast:@"兑换成功"];
|
||||
IfishUserAsset *asset =[dataContorl getAllIfishUserAsset];
|
||||
NSDictionary *dataDic = reDic[@"data"];
|
||||
asset.goldValue = [[dataDic objectForKey:@"goldValue"] integerValue];
|
||||
[dataContorl resetUserAsset:asset];
|
||||
weakSelf.convert.couponNumber = [dataDic objectForKey:@"couponNumber"];
|
||||
weakSelf.convert.exchangeCount = [dataDic objectForKey:@"exchangeCount"];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"quanChange" object:weakSelf.convert];
|
||||
|
||||
[NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(pushJiluView) userInfo:nil repeats:NO];
|
||||
|
||||
}else if ([result isEqualToString:@"215"]){
|
||||
[weakSelf.view makeToast:@"金币不足"];
|
||||
}else{
|
||||
[weakSelf.view makeToast:@"请求出错"];
|
||||
}
|
||||
|
||||
// [_hud hide:YES afterDelay:0.5];
|
||||
|
||||
} failure:^(NSError *err) {
|
||||
// [_hud hide:YES afterDelay:0.5];
|
||||
[weakSelf.view makeToast:@"请求异常"];
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
-(void)pushJiluView{
|
||||
|
||||
CoastRecordViewController *recordV =[[CoastRecordViewController alloc] init];
|
||||
recordV.fromDetailVC = YES;
|
||||
[self.navigationController pushViewController:recordV animated:YES];
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
#pragma mark - Navigation
|
||||
|
||||
// In a storyboard-based application, you will often want to do a little preparation before navigation
|
||||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
|
||||
// Get the new view controller using [segue destinationViewController].
|
||||
// Pass the selected object to the new view controller.
|
||||
}
|
||||
*/
|
||||
|
||||
@end
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// IfishGoldCoastViewController.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 2017/4/25.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "BaseVIewContorller.h"
|
||||
|
||||
@interface IfishGoldCoastViewController : BaseVIewContorller
|
||||
|
||||
@end
|
||||
+166
@@ -0,0 +1,166 @@
|
||||
//
|
||||
// IfishGoldCoastViewController.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 2017/4/25.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "IfishGoldCoastViewController.h"
|
||||
#import "GolaCoastListViewCell.h"
|
||||
#import "CoastRecordViewController.h"
|
||||
#import "IfishGoldCoastDetailViewController.h"
|
||||
#import "DiscountCoupon.h"
|
||||
@interface IfishGoldCoastViewController ()<UITableViewDelegate,UITableViewDataSource>
|
||||
@property(nonatomic,strong)UITableView *tableView;
|
||||
@property(nonatomic,strong)NSMutableArray *dataArr;
|
||||
@property (nonatomic) NSIndexPath *selectIndexPath;
|
||||
@property (nonatomic) BOOL isChage;
|
||||
@end
|
||||
|
||||
@implementation IfishGoldCoastViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
[self addTitleViewWithTitle:@"金币兑换"];
|
||||
_dataArr =[[NSMutableArray alloc] init];
|
||||
_isChage = NO;
|
||||
[self creatTab];
|
||||
UIBarButtonItem*rightItem= [[UIBarButtonItem alloc] initWithTitle:@"兑换记录" style:UIBarButtonItemStyleDone target:self action:@selector(duihuanjiluAction)];
|
||||
|
||||
self.navigationItem.rightBarButtonItem= rightItem;
|
||||
[self.navigationItem.rightBarButtonItem setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIFont systemFontOfSize:14],NSFontAttributeName, [UIColor whiteColor], NSForegroundColorAttributeName, nil] forState:UIControlStateNormal];
|
||||
[self loadDataS];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(quanChangeDidChange:) name:@"quanChange" object:nil];
|
||||
}
|
||||
|
||||
-(void)dealloc{
|
||||
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self name:@"quanChange" object:nil];
|
||||
}
|
||||
|
||||
-(void)quanChangeDidChange:(NSNotification *)noty{
|
||||
DiscountCoupon *model=[noty object];
|
||||
_isChage = YES;
|
||||
[self.dataArr replaceObjectAtIndex:self.selectIndexPath.section withObject:model];
|
||||
|
||||
}
|
||||
|
||||
-(void)viewWillAppear:(BOOL)animated{
|
||||
[super viewWillAppear:animated];
|
||||
if (_isChage ) {
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-(void)creatTab{
|
||||
|
||||
self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0,0,self.view.frame.size.width,self.view.frame.size.height) style:UITableViewStyleGrouped];
|
||||
self.tableView.delegate = self;
|
||||
self.tableView.dataSource = self;
|
||||
self.tableView.scrollEnabled = YES;
|
||||
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
self.tableView.showsVerticalScrollIndicator = NO;
|
||||
self.tableView.backgroundColor = RGB(242, 242, 242);
|
||||
|
||||
[self.view addSubview:self.tableView];
|
||||
|
||||
}
|
||||
|
||||
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
|
||||
return _dataArr.count;
|
||||
}
|
||||
|
||||
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
|
||||
GolaCoastListViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"GolaCoastListViewCell"];
|
||||
if (!cell) {
|
||||
cell = [[[NSBundle mainBundle]loadNibNamed:@"GolaCoastListViewCell" owner:self options:nil]lastObject];
|
||||
|
||||
}
|
||||
DiscountCoupon *model = _dataArr[indexPath.section];
|
||||
[cell loadCellwith:model];
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
return cell;
|
||||
|
||||
}
|
||||
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
|
||||
return 130;
|
||||
}
|
||||
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
|
||||
|
||||
return 0.1;
|
||||
}
|
||||
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
|
||||
|
||||
return 0.1;
|
||||
|
||||
}
|
||||
|
||||
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
_selectIndexPath = indexPath;
|
||||
IfishGoldCoastDetailViewController *detail = [[IfishGoldCoastDetailViewController alloc] init];
|
||||
self.hidesBottomBarWhenPushed = YES;
|
||||
detail.convert = _dataArr[indexPath.section];
|
||||
[self.navigationController pushViewController:detail animated:YES];
|
||||
|
||||
}
|
||||
|
||||
-(void)loadDataS{
|
||||
|
||||
__weak typeof (self)weakSelf = self;
|
||||
[AFHttpTool getValidatingCouponsSuccess:^(id response) {
|
||||
NSDictionary *reDic=[NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingMutableContainers error:nil];
|
||||
NSString *result=reDic[@"result"];
|
||||
NSLog(@"redic***:%@",reDic);
|
||||
if ([result isEqualToString:@"100"]){
|
||||
NSArray *dataArr =reDic[@"data"];
|
||||
for (NSDictionary *dic in dataArr) {
|
||||
DiscountCoupon *model = [[DiscountCoupon alloc] initWithDict:dic];
|
||||
[_dataArr addObject:model];
|
||||
}
|
||||
[weakSelf.tableView reloadData];
|
||||
}else{
|
||||
[weakSelf.view makeToast:@"请求异常"];
|
||||
}
|
||||
} failure:^(NSError *err) {
|
||||
[weakSelf.view makeToast:@"请求异常"];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
#pragma mark - 兑换记录
|
||||
-(void)duihuanjiluAction
|
||||
{
|
||||
CoastRecordViewController *recordVC= [[CoastRecordViewController alloc] init];
|
||||
self.hidesBottomBarWhenPushed = YES;
|
||||
recordVC.fromDetailVC = NO;
|
||||
[self.navigationController pushViewController:recordVC animated:YES];
|
||||
|
||||
}
|
||||
/*
|
||||
#pragma mark - Navigation
|
||||
|
||||
// In a storyboard-based application, you will often want to do a little preparation before navigation
|
||||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
|
||||
// Get the new view controller using [segue destinationViewController].
|
||||
// Pass the selected object to the new view controller.
|
||||
}
|
||||
*/
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,45 @@
|
||||
//
|
||||
// DiscountCoupon.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 2017/4/26.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
//优惠券
|
||||
@interface DiscountCoupon : NSObject
|
||||
|
||||
@property(nonatomic) int couponId;
|
||||
//RBM价值
|
||||
@property(nonatomic) int moneyValue;
|
||||
//兑换需要消耗金币值
|
||||
@property(nonatomic) NSInteger needGold;
|
||||
//订单金额满多少可以使用
|
||||
@property(nonatomic) NSNumber *useNeedMoney;
|
||||
//兑换上限
|
||||
@property(nonatomic) NSNumber * upperLimit;
|
||||
//文字标签
|
||||
@property(nonatomic,copy) NSString *tagText;
|
||||
//有效开始日期
|
||||
@property(nonatomic,copy) NSString *validStartDate;
|
||||
//有效结束日期
|
||||
@property(nonatomic,copy) NSString *validEndDate;
|
||||
|
||||
//该优惠券被兑换总量
|
||||
@property(nonatomic) NSNumber *exchangeCount;
|
||||
|
||||
//优惠券剩余数量
|
||||
@property(nonatomic) NSNumber *couponNumber;
|
||||
|
||||
//激活码
|
||||
@property(nonatomic,copy)NSString *activationCode;
|
||||
//是否使用过
|
||||
@property(nonatomic) BOOL isUsed;
|
||||
|
||||
@property(nonatomic,copy) NSString *createTime;
|
||||
|
||||
|
||||
-(instancetype)initWithDict:(NSDictionary *)dict;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// DiscountCoupon.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 2017/4/26.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "DiscountCoupon.h"
|
||||
@implementation DiscountCoupon
|
||||
-(instancetype)initWithDict:(NSDictionary *)dict
|
||||
{
|
||||
if (self=[super init]) {
|
||||
|
||||
_couponId = [[dict objectForKey:@"couponId"] intValue];
|
||||
_moneyValue = [[dict objectForKey:@"moneyValue"] intValue];
|
||||
_needGold = [[dict valueForKey:@"needGold"] integerValue];
|
||||
_useNeedMoney = [dict objectForKey:@"useNeedMoney"] ;
|
||||
_upperLimit = [dict objectForKey:@"upperLimit"] ;
|
||||
_tagText = [dict objectForKey:@"tagText"];
|
||||
_validStartDate = [dict objectForKey:@"validStartDate"];
|
||||
_validEndDate = [dict objectForKey:@"validEndDate"];
|
||||
_exchangeCount = [dict objectForKey:@"exchangeCount"];
|
||||
_couponNumber = [dict objectForKey:@"couponNumber"];
|
||||
_activationCode = [dict objectForKey:@"activationCode"];
|
||||
_isUsed = [[dict valueForKey:@"isUsed"] boolValue];
|
||||
_createTime = [dict objectForKey:@"createTime"];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
@end
|
||||
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// GolaCoastListViewCell.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 2017/4/25.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "DiscountCoupon.h"
|
||||
|
||||
@interface GolaCoastListViewCell : UITableViewCell
|
||||
@property (weak, nonatomic) IBOutlet UILabel *coastYuan;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *duiHuanCiShu;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *canUserGold;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *useConditionfrist;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *useConditionSec;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *useConditionThr;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIView *goldLineView;
|
||||
|
||||
-(void)loadCellwith:(DiscountCoupon *)model;
|
||||
@end
|
||||
@@ -0,0 +1,89 @@
|
||||
//
|
||||
// GolaCoastListViewCell.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 2017/4/25.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "GolaCoastListViewCell.h"
|
||||
|
||||
@implementation GolaCoastListViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
-(void)loadCellwith:(DiscountCoupon *)model
|
||||
{
|
||||
NSString *coastYuanT = [NSString stringWithFormat:@"¥%d",model.moneyValue];
|
||||
NSMutableAttributedString *coastYuanStr =[[NSMutableAttributedString alloc] initWithString:coastYuanT];
|
||||
[coastYuanStr addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:16] range:NSMakeRange(0, 1)];
|
||||
self.coastYuan.attributedText = coastYuanStr;
|
||||
|
||||
|
||||
|
||||
NSString *duihuancishu = nil;
|
||||
if ([model.exchangeCount isKindOfClass:[NSNull class]]) {
|
||||
duihuancishu = [NSString stringWithFormat:@"已兑换0次"];
|
||||
}else{
|
||||
duihuancishu = [NSString stringWithFormat:@"已兑换%@次",model.exchangeCount];
|
||||
}
|
||||
NSString *exCount = [NSString stringWithFormat:@"%@",model.exchangeCount];
|
||||
NSRange cishuNumberRange = [duihuancishu rangeOfString:exCount];
|
||||
NSMutableAttributedString *cishuStr =[[NSMutableAttributedString alloc] initWithString:duihuancishu];
|
||||
[cishuStr addAttribute:NSForegroundColorAttributeName value:RGB(254, 121, 63) range:cishuNumberRange];
|
||||
|
||||
self.duiHuanCiShu.attributedText = cishuStr;
|
||||
|
||||
|
||||
NSString *canusegold = [NSString stringWithFormat:@"%ld金币可兑换",(long)model.needGold];
|
||||
NSString *canusegoldNum = [NSString stringWithFormat:@"%ld",(long)model.needGold];
|
||||
NSRange canusegoldRange = [canusegold rangeOfString:canusegoldNum];
|
||||
NSMutableAttributedString *canusegoldStr =[[NSMutableAttributedString alloc] initWithString:canusegold];
|
||||
[canusegoldStr addAttribute:NSForegroundColorAttributeName value:RGB(254, 121, 63) range:canusegoldRange];
|
||||
[canusegoldStr addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:18] range:canusegoldRange];
|
||||
|
||||
self.canUserGold.attributedText = canusegoldStr;
|
||||
|
||||
self.useConditionfrist.text = [NSString stringWithFormat:@"1.%@",model.tagText];
|
||||
if (!model.useNeedMoney||[model.useNeedMoney isKindOfClass:[NSNull class]]) {
|
||||
self.useConditionSec.text = [NSString stringWithFormat:@"2.无使用门槛"];
|
||||
}else{
|
||||
self.useConditionSec.text = [NSString stringWithFormat:@"2.满%@元可用",model.useNeedMoney];
|
||||
}
|
||||
if (!model.validEndDate||[model.validEndDate isKindOfClass:[NSNull class]]) {
|
||||
self.useConditionThr.text = [NSString stringWithFormat:@"3.永久有效"];
|
||||
}else{
|
||||
if ([model.validStartDate isKindOfClass:[NSNull class]]) {
|
||||
model.validStartDate = @"";
|
||||
}
|
||||
self.useConditionThr.text = [NSString stringWithFormat:@"3.%@致%@",model.validStartDate,model.validEndDate];
|
||||
}
|
||||
|
||||
|
||||
if (model.moneyValue <=1) {
|
||||
self.coastYuan.textColor = RGB(78, 210, 254);
|
||||
self.goldLineView.backgroundColor = RGB(78, 210, 254);
|
||||
}else if (model.moneyValue >=10&&model.moneyValue <20){
|
||||
self.coastYuan.textColor = RGB(78, 157, 254);
|
||||
self.goldLineView.backgroundColor = RGB(78, 157, 254);
|
||||
}else if (model.moneyValue >=20&&model.moneyValue <50){
|
||||
self.coastYuan.textColor = RGB(254, 127, 78);
|
||||
self.goldLineView.backgroundColor = RGB(254, 127, 78);
|
||||
}else if (model.moneyValue >=50){
|
||||
self.coastYuan.textColor = RGB(254, 181, 78);
|
||||
self.goldLineView.backgroundColor = RGB(254, 181, 78);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,180 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="GolaCoastListViewCell" id="KGk-i7-Jjw" customClass="GolaCoastListViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="130"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="129.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9zx-az-uHa">
|
||||
<rect key="frame" x="15" y="5" width="290" height="120"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="E0i-NJ-YWn">
|
||||
<rect key="frame" x="0.0" y="0.0" width="3" height="120"/>
|
||||
<color key="backgroundColor" red="0.30588235289999999" green="0.82352941180000006" blue="0.99607843139999996" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="3" id="uH9-RR-kSZ"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qzs-Ca-NyK">
|
||||
<rect key="frame" x="8" y="31" width="87" height="21"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="21" id="ITt-Hk-qSo"/>
|
||||
<constraint firstAttribute="width" constant="87" id="YwM-vj-4zT"/>
|
||||
</constraints>
|
||||
<attributedString key="attributedText">
|
||||
<fragment content="¥元">
|
||||
<attributes>
|
||||
<color key="NSColor" red="0.30588235294117649" green="0.82352941176470584" blue="0.99607843137254903" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<font key="NSFont" size="23" name=".PingFangSC-Regular"/>
|
||||
<paragraphStyle key="NSParagraphStyle" alignment="center" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
|
||||
</attributes>
|
||||
</fragment>
|
||||
</attributedString>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="— 抵用券 —" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QrJ-S5-NQa">
|
||||
<rect key="frame" x="18" y="60" width="77" height="21"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="21" id="9pv-WG-oTb"/>
|
||||
<constraint firstAttribute="width" constant="77" id="Yzy-hP-DW9"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="13"/>
|
||||
<color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="以兑换次数" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CE1-o0-x4W">
|
||||
<rect key="frame" x="18" y="91" width="77" height="21"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="21" id="2Mi-ak-s3n"/>
|
||||
<constraint firstAttribute="width" constant="77" id="UM5-8Y-qHM"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="exploregold_backline.png" translatesAutoresizingMaskIntoConstraints="NO" id="Qh3-Ge-dXX">
|
||||
<rect key="frame" x="101" y="0.0" width="15" height="120"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="15" id="PT5-r1-OXq"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="E6D-w9-65O">
|
||||
<rect key="frame" x="129" y="76" width="161" height="15"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="15" id="kLV-pX-Bdp"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5HZ-8g-B4f">
|
||||
<rect key="frame" x="129" y="94" width="161" height="15"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="15" id="DPV-nk-cye"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="p5Y-CA-pmP">
|
||||
<rect key="frame" x="129" y="25" width="146" height="21"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="21" id="ZcC-xG-huA"/>
|
||||
</constraints>
|
||||
<attributedString key="attributedText">
|
||||
<fragment content="n金币可兑换">
|
||||
<attributes>
|
||||
<color key="NSColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<font key="NSFont" metaFont="system" size="15"/>
|
||||
<paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
|
||||
</attributes>
|
||||
</fragment>
|
||||
</attributedString>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="exploregold_coast.png" translatesAutoresizingMaskIntoConstraints="NO" id="3Dm-1c-3tY">
|
||||
<rect key="frame" x="238" y="78" width="52" height="42"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="52" id="Cmc-fs-nLf"/>
|
||||
<constraint firstAttribute="height" constant="42" id="zlw-Ev-xPh"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="a0B-KU-Bf4">
|
||||
<rect key="frame" x="129" y="58" width="161" height="15"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="15" id="kbO-We-m6I"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="E0i-NJ-YWn" firstAttribute="leading" secondItem="9zx-az-uHa" secondAttribute="leading" id="00i-Kn-DiK"/>
|
||||
<constraint firstAttribute="trailing" secondItem="5HZ-8g-B4f" secondAttribute="trailing" id="0fa-BR-BqT"/>
|
||||
<constraint firstAttribute="trailing" secondItem="p5Y-CA-pmP" secondAttribute="trailing" constant="15" id="769-qw-iP4"/>
|
||||
<constraint firstAttribute="trailing" secondItem="a0B-KU-Bf4" secondAttribute="trailing" id="8gb-Fw-Vw1"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Qh3-Ge-dXX" secondAttribute="bottom" id="9cJ-2X-1xa"/>
|
||||
<constraint firstItem="p5Y-CA-pmP" firstAttribute="leading" secondItem="Qh3-Ge-dXX" secondAttribute="trailing" constant="13" id="B9c-zS-WEO"/>
|
||||
<constraint firstItem="5HZ-8g-B4f" firstAttribute="leading" secondItem="Qh3-Ge-dXX" secondAttribute="trailing" constant="13" id="CdJ-2L-eXB"/>
|
||||
<constraint firstItem="E6D-w9-65O" firstAttribute="top" secondItem="a0B-KU-Bf4" secondAttribute="bottom" constant="3" id="HIs-2j-1kR"/>
|
||||
<constraint firstItem="qzs-Ca-NyK" firstAttribute="leading" secondItem="E0i-NJ-YWn" secondAttribute="trailing" constant="5" id="KmX-eu-Vns"/>
|
||||
<constraint firstAttribute="trailing" secondItem="E6D-w9-65O" secondAttribute="trailing" id="LpH-al-ICk"/>
|
||||
<constraint firstItem="p5Y-CA-pmP" firstAttribute="top" secondItem="9zx-az-uHa" secondAttribute="top" constant="25" id="Pd4-xd-YVt"/>
|
||||
<constraint firstItem="a0B-KU-Bf4" firstAttribute="leading" secondItem="Qh3-Ge-dXX" secondAttribute="trailing" constant="13" id="VA4-CR-fec"/>
|
||||
<constraint firstItem="QrJ-S5-NQa" firstAttribute="leading" secondItem="9zx-az-uHa" secondAttribute="leading" constant="18" id="VAy-AT-bGf"/>
|
||||
<constraint firstItem="CE1-o0-x4W" firstAttribute="leading" secondItem="9zx-az-uHa" secondAttribute="leading" constant="18" id="WUW-lk-48q"/>
|
||||
<constraint firstAttribute="trailing" secondItem="3Dm-1c-3tY" secondAttribute="trailing" id="Yvr-51-6mF"/>
|
||||
<constraint firstItem="Qh3-Ge-dXX" firstAttribute="leading" secondItem="CE1-o0-x4W" secondAttribute="trailing" constant="6" id="apO-kv-HMu"/>
|
||||
<constraint firstAttribute="bottom" secondItem="5HZ-8g-B4f" secondAttribute="bottom" constant="11" id="dSr-Ta-nC4"/>
|
||||
<constraint firstAttribute="bottom" secondItem="CE1-o0-x4W" secondAttribute="bottom" constant="8" id="eEv-q7-nvD"/>
|
||||
<constraint firstItem="QrJ-S5-NQa" firstAttribute="top" secondItem="qzs-Ca-NyK" secondAttribute="bottom" constant="8" id="gE9-s9-NN6"/>
|
||||
<constraint firstItem="E6D-w9-65O" firstAttribute="leading" secondItem="Qh3-Ge-dXX" secondAttribute="trailing" constant="13" id="hVp-1B-Gvh"/>
|
||||
<constraint firstItem="Qh3-Ge-dXX" firstAttribute="top" secondItem="9zx-az-uHa" secondAttribute="top" id="iqu-Ul-IqN"/>
|
||||
<constraint firstItem="5HZ-8g-B4f" firstAttribute="top" secondItem="E6D-w9-65O" secondAttribute="bottom" constant="3" id="mfv-OG-sR5"/>
|
||||
<constraint firstItem="E0i-NJ-YWn" firstAttribute="top" secondItem="9zx-az-uHa" secondAttribute="top" id="t3y-hg-8Bo"/>
|
||||
<constraint firstItem="qzs-Ca-NyK" firstAttribute="top" secondItem="9zx-az-uHa" secondAttribute="top" constant="31" id="tNU-7V-bov"/>
|
||||
<constraint firstAttribute="bottom" secondItem="E0i-NJ-YWn" secondAttribute="bottom" id="vR6-cv-1I7"/>
|
||||
<constraint firstAttribute="bottom" secondItem="3Dm-1c-3tY" secondAttribute="bottom" id="vUb-W4-zQz"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="9zx-az-uHa" secondAttribute="bottom" constant="5" id="KBt-2e-SNP"/>
|
||||
<constraint firstItem="9zx-az-uHa" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="WZh-lf-nk2"/>
|
||||
<constraint firstAttribute="trailing" secondItem="9zx-az-uHa" secondAttribute="trailing" constant="15" id="i3Y-sA-85T"/>
|
||||
<constraint firstItem="9zx-az-uHa" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="5" id="k3S-IZ-pLE"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<color key="backgroundColor" red="0.94901960784313721" green="0.94901960784313721" blue="0.94901960784313721" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<connections>
|
||||
<outlet property="canUserGold" destination="p5Y-CA-pmP" id="FMg-bt-FJd"/>
|
||||
<outlet property="coastYuan" destination="qzs-Ca-NyK" id="jIK-JJ-uSI"/>
|
||||
<outlet property="duiHuanCiShu" destination="CE1-o0-x4W" id="br3-RL-PHs"/>
|
||||
<outlet property="goldLineView" destination="E0i-NJ-YWn" id="QeP-a8-qQL"/>
|
||||
<outlet property="useConditionSec" destination="E6D-w9-65O" id="ZMS-5n-sIh"/>
|
||||
<outlet property="useConditionThr" destination="5HZ-8g-B4f" id="ypC-pn-b3U"/>
|
||||
<outlet property="useConditionfrist" destination="a0B-KU-Bf4" id="uNy-1i-Lme"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="-142.5" y="-32"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="exploregold_backline.png" width="14" height="129"/>
|
||||
<image name="exploregold_coast.png" width="52" height="42"/>
|
||||
</resources>
|
||||
</document>
|
||||
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// GoldConvertDetailViewCell.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 2017/4/26.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "DiscountCoupon.h"
|
||||
@interface GoldConvertDetailViewCell : UITableViewCell
|
||||
@property (weak, nonatomic) IBOutlet UILabel *diyongQuanLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *jinBiLabel;
|
||||
@property (weak, nonatomic) IBOutlet UITextView *detailTextView;
|
||||
-(void)loadCellDataWith:(DiscountCoupon*)model;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,85 @@
|
||||
//
|
||||
// GoldConvertDetailViewCell.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 2017/4/26.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "GoldConvertDetailViewCell.h"
|
||||
|
||||
@implementation GoldConvertDetailViewCell
|
||||
|
||||
- (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
|
||||
}
|
||||
-(void)loadCellDataWith:(DiscountCoupon*)model;
|
||||
{
|
||||
NSString *rmbPre = [NSString stringWithFormat:@"%d",model.moneyValue];
|
||||
NSString *title = [NSString stringWithFormat:@"¥%@抵用券",rmbPre];
|
||||
NSRange rmbRange = [title rangeOfString:rmbPre];
|
||||
NSMutableAttributedString *diyongquan = [[NSMutableAttributedString alloc] initWithString:title];
|
||||
[diyongquan addAttribute:NSFontAttributeName value:[UIFont boldSystemFontOfSize:23] range:NSMakeRange(0, 1)];
|
||||
[diyongquan addAttribute:NSFontAttributeName value:[UIFont boldSystemFontOfSize:32] range:rmbRange];
|
||||
|
||||
[diyongquan addAttribute:NSForegroundColorAttributeName value:[UIColor whiteColor] range:NSMakeRange(0, title.length)];
|
||||
self.diyongQuanLabel.attributedText = diyongquan;
|
||||
|
||||
|
||||
NSString *jinbiCount = [NSString stringWithFormat:@"%ld",(long)model.needGold];
|
||||
NSString *jinbiStr =[NSString stringWithFormat:@"—— %@金币可兑换 ——",jinbiCount];
|
||||
NSMutableAttributedString *jinbiText = [[NSMutableAttributedString alloc] initWithString:jinbiStr];
|
||||
NSRange jinbiCountRange = [jinbiStr rangeOfString:jinbiCount];
|
||||
[jinbiText addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:20] range:jinbiCountRange];
|
||||
[jinbiText addAttribute:NSForegroundColorAttributeName value:RGB(254, 121, 63) range:jinbiCountRange];
|
||||
NSRange pre = [jinbiStr rangeOfString:@"—— "];
|
||||
NSRange hex = [jinbiStr rangeOfString:@" ——"];
|
||||
[jinbiText addAttribute:NSForegroundColorAttributeName value:RGB(153, 153, 153) range:pre];
|
||||
[jinbiText addAttribute:NSForegroundColorAttributeName value:RGB(153, 153, 153) range:hex];
|
||||
self.jinBiLabel.attributedText = jinbiText;
|
||||
|
||||
NSString *tiaojian = nil;
|
||||
if (!model.useNeedMoney||[model.useNeedMoney isKindOfClass:[NSNull class]]) {
|
||||
tiaojian = [NSString stringWithFormat:@"无使用门槛"];
|
||||
}else{
|
||||
tiaojian = [NSString stringWithFormat:@"单笔订单满%@元可使用",model.useNeedMoney];
|
||||
}
|
||||
|
||||
NSString *fanwei = [NSString stringWithFormat:@"%@",model.tagText];
|
||||
|
||||
NSString *qixian = nil;
|
||||
if (!model.validEndDate||[model.validEndDate isKindOfClass:[NSNull class]]) {
|
||||
qixian = [NSString stringWithFormat:@"永久有效"];
|
||||
}else{
|
||||
if ([model.validStartDate isKindOfClass:[NSNull class]]) {
|
||||
model.validStartDate = @"";
|
||||
}
|
||||
qixian = [NSString stringWithFormat:@"3.%@致%@",model.validStartDate,model.validEndDate];
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//NSString *str = @" 【使用范围】单笔订单满100元可使用 \n 【适用范围】爱鱼奇官方淘宝店全店通用 \n 【使用期限】永久有效\n 【使用方式】兑换成功后,会获得一个激活码,将该激活码复制到淘宝订单的备注信息内,或发给旺旺客服。客服确认之后,修改订单价格,抵用券使用完毕。也可以将激活码赠予朋友。\n 【使用申明】抵用券只能使用一次,一旦使用,无法退还,即使发生退还货也不做退还处理,其最终解释权归爱鱼奇所有。";
|
||||
NSString *str = nil;
|
||||
|
||||
str = [NSString stringWithFormat:@" 【使用范围】%@\n 【适用范围】%@\n 【使用期限】%@\n 【使用方式】兑换成功后,会获得一个激活码,将该激活码复制到淘宝订单的备注信息内,或发给旺旺客服。客服确认之后,修改订单价格,抵用券使用完毕。也可以将激活码赠予朋友。\n 【使用申明】抵用券只能使用一次,且每笔订单只能使用一张抵用券,一旦使用,无法退还,即使发生退换货也不做退还处理,其最终解释权归爱鱼奇所有。",tiaojian,fanwei,qixian];
|
||||
NSMutableAttributedString *textviewText = [[NSMutableAttributedString alloc] initWithString:str];
|
||||
NSMutableParagraphStyle * paragraphStyle = [[NSMutableParagraphStyle alloc] init];
|
||||
[paragraphStyle setLineSpacing:4];
|
||||
[textviewText addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, [str length])];
|
||||
[textviewText addAttribute:NSForegroundColorAttributeName value:RGB(153, 153, 153) range:NSMakeRange(0, [str length])];
|
||||
|
||||
self.detailTextView.attributedText =textviewText ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
|
||||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="GoldConvertDetailViewCell" id="KGk-i7-Jjw" customClass="GoldConvertDetailViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="470"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="469.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="particulars_backgroud_ten.png" translatesAutoresizingMaskIntoConstraints="NO" id="jeq-ns-n25">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="469.5"/>
|
||||
</imageView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="particulars_teb_ten.png" translatesAutoresizingMaskIntoConstraints="NO" id="tmu-ZY-IeT">
|
||||
<rect key="frame" x="64.5" y="48" width="191" height="60"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="60" id="Mui-8w-KUY"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ost-Y3-XxV">
|
||||
<rect key="frame" x="8" y="116" width="304" height="21"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="21" id="tGc-qc-zRn"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<textView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" usesAttributedText="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Opq-Fa-XbP">
|
||||
<rect key="frame" x="32" y="151" width="256" height="274"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="274" id="4zz-y0-0fd"/>
|
||||
</constraints>
|
||||
<attributedString key="attributedText">
|
||||
<fragment>
|
||||
<string key="content">【使用范围】单笔订单满100元可使用 【适用范围】爱鱼奇官方淘宝店全店通用 【使用期限】永久有效 【使用方式】兑换成功后,会获得一个激活码,将该激活码复制到淘宝订单的备注信息内,或发给旺旺客服。客服确认之后,修改订单价格,抵用券使用完毕。也可以将激活码赠予朋友。【使用申明】抵用券只能使用一次,一旦使用,无法退还,即使发生退还货也不做退还处理,其最终解释权归爱鱼奇所有。</string>
|
||||
<attributes>
|
||||
<color key="NSColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<font key="NSFont" size="13" name="PingFangSC-Regular"/>
|
||||
<integer key="NSLigature" value="0"/>
|
||||
<paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural" lineSpacing="4" defaultTabInterval="44.5" tighteningFactorForTruncation="0.0" allowsDefaultTighteningForTruncation="NO">
|
||||
<tabStops>
|
||||
<textTab alignment="left" location="44.5">
|
||||
<options/>
|
||||
</textTab>
|
||||
</tabStops>
|
||||
</paragraphStyle>
|
||||
</attributes>
|
||||
</fragment>
|
||||
</attributedString>
|
||||
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
|
||||
</textView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="¥元抵用券" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="far-yG-LXg">
|
||||
<rect key="frame" x="102" y="66" width="116.5" height="25"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="25" id="jdH-rd-cXh"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="23"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="jeq-ns-n25" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="5Tb-Pa-nP6"/>
|
||||
<constraint firstItem="ost-Y3-XxV" firstAttribute="top" secondItem="tmu-ZY-IeT" secondAttribute="bottom" constant="8" id="AoW-VW-FQ7"/>
|
||||
<constraint firstItem="Opq-Fa-XbP" firstAttribute="top" secondItem="ost-Y3-XxV" secondAttribute="bottom" constant="14" id="Cv0-T0-3gC"/>
|
||||
<constraint firstItem="far-yG-LXg" firstAttribute="centerX" secondItem="tmu-ZY-IeT" secondAttribute="centerX" id="H8A-Mp-LnL"/>
|
||||
<constraint firstItem="jeq-ns-n25" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="Nti-y9-uAy"/>
|
||||
<constraint firstAttribute="trailing" secondItem="jeq-ns-n25" secondAttribute="trailing" id="Wen-vk-JM9"/>
|
||||
<constraint firstItem="jeq-ns-n25" firstAttribute="top" secondItem="tmu-ZY-IeT" secondAttribute="bottom" constant="-108" id="cnu-rw-cNc"/>
|
||||
<constraint firstItem="ost-Y3-XxV" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leadingMargin" id="dZb-wk-x3e"/>
|
||||
<constraint firstItem="tmu-ZY-IeT" firstAttribute="centerX" secondItem="jeq-ns-n25" secondAttribute="centerX" id="dyt-a3-LB4"/>
|
||||
<constraint firstItem="ost-Y3-XxV" firstAttribute="trailing" secondItem="H2p-sc-9uM" secondAttribute="trailingMargin" id="elE-mW-qQm"/>
|
||||
<constraint firstItem="far-yG-LXg" firstAttribute="top" secondItem="tmu-ZY-IeT" secondAttribute="bottom" constant="-42" id="grR-hL-jYt"/>
|
||||
<constraint firstItem="Opq-Fa-XbP" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leadingMargin" constant="24" id="rtD-Ez-4cV"/>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="Opq-Fa-XbP" secondAttribute="trailing" constant="24" id="ufe-VJ-KsO"/>
|
||||
<constraint firstAttribute="bottom" secondItem="jeq-ns-n25" secondAttribute="bottom" id="zkz-8U-8hy"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<color key="backgroundColor" red="0.94901960784313721" green="0.94901960784313721" blue="0.94901960784313721" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<connections>
|
||||
<outlet property="detailTextView" destination="Opq-Fa-XbP" id="pAN-Mc-DWc"/>
|
||||
<outlet property="diyongQuanLabel" destination="far-yG-LXg" id="S61-Ht-4HY"/>
|
||||
<outlet property="jinBiLabel" destination="ost-Y3-XxV" id="dBQ-dS-faJ"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="15" y="48"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="particulars_backgroud_ten.png" width="375" height="469"/>
|
||||
<image name="particulars_teb_ten.png" width="191" height="60"/>
|
||||
</resources>
|
||||
</document>
|
||||
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// GoldConvertRecordViewCell.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 2017/4/25.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "DiscountCoupon.h"
|
||||
@interface GoldConvertRecordViewCell : UITableViewCell
|
||||
@property (weak, nonatomic) IBOutlet UILabel *yuanLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *dateLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *goldLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *rulefLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *ruleSLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *ruleTlabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *jihuomaLabel;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *fuzhiBtn;
|
||||
-(void)loadCellwith:(DiscountCoupon *)model;
|
||||
@property (weak, nonatomic) IBOutlet UIView *blueVIew;
|
||||
@property (weak, nonatomic) IBOutlet UIView *origeView;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *jihuiMaView;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *shiyongImg;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,83 @@
|
||||
//
|
||||
// GoldConvertRecordViewCell.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 2017/4/25.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "GoldConvertRecordViewCell.h"
|
||||
|
||||
@implementation GoldConvertRecordViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
-(void)loadCellwith:(DiscountCoupon *)model{
|
||||
NSString *coastYuanT = [NSString stringWithFormat:@"¥%d",model.moneyValue];
|
||||
NSMutableAttributedString *coastYuanStr =[[NSMutableAttributedString alloc] initWithString:coastYuanT];
|
||||
[coastYuanStr addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:16] range:NSMakeRange(0, 1)];
|
||||
self.yuanLabel.attributedText = coastYuanStr;
|
||||
|
||||
NSString *dateStr = [NSString stringWithFormat:@"%@",model.createTime];
|
||||
NSDate *date = [dataContorl formatDateTime:dateStr];
|
||||
NSLog(@"date***%@****",date);
|
||||
NSString *riqi =[dataContorl getYearmonthaddDayWithDate:date];
|
||||
NSString *time = [dataContorl getHmWithDate:date];
|
||||
self.dateLabel.text = riqi;
|
||||
self.timeLabel.text = time;
|
||||
|
||||
NSString *canusegold = [NSString stringWithFormat:@"%ld金币可兑换",(long)model.needGold];
|
||||
NSString *canusegoldNum = [NSString stringWithFormat:@"%ld",(long)model.needGold];
|
||||
NSRange goldRange = [canusegold rangeOfString:canusegoldNum];
|
||||
NSMutableAttributedString *canusegoldStr =[[NSMutableAttributedString alloc] initWithString:canusegold];
|
||||
[canusegoldStr addAttribute:NSForegroundColorAttributeName value:RGB(254, 121, 63) range:goldRange];
|
||||
[canusegoldStr addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:18] range:goldRange];
|
||||
self.goldLabel.attributedText = canusegoldStr;
|
||||
self.rulefLabel.text = [NSString stringWithFormat:@"1.%@",model.tagText];
|
||||
|
||||
if (!model.useNeedMoney||[model.useNeedMoney isKindOfClass:[NSNull class]]) {
|
||||
self.ruleSLabel.text = [NSString stringWithFormat:@"2.无使用门槛"];
|
||||
}else{
|
||||
self.ruleSLabel.text = [NSString stringWithFormat:@"2.满%@元可用",model.useNeedMoney];
|
||||
}
|
||||
if (!model.validEndDate||[model.validEndDate isKindOfClass:[NSNull class]]) {
|
||||
self.ruleTlabel.text = [NSString stringWithFormat:@"3.永久有效"];
|
||||
}else{
|
||||
if ([model.validStartDate isKindOfClass:[NSNull class]]) {
|
||||
model.validStartDate = @"";
|
||||
}
|
||||
self.ruleTlabel.text = [NSString stringWithFormat:@"3.%@致%@",model.validStartDate,model.validEndDate];
|
||||
}
|
||||
|
||||
self.jihuomaLabel.text = model.activationCode;
|
||||
if (model.isUsed) {
|
||||
self.blueVIew.backgroundColor = RGB(221, 221, 221);
|
||||
self.origeView.backgroundColor = RGB(234, 234, 234);
|
||||
self.jihuiMaView.textColor = RGB(221, 221, 221);
|
||||
self.jihuomaLabel.textColor = RGB(221, 221, 221);
|
||||
self.shiyongImg.image = [UIImage imageNamed:@"record_label_disabled"];
|
||||
self.fuzhiBtn.userInteractionEnabled = NO;
|
||||
self.fuzhiBtn.backgroundColor =RGB(221, 221, 221);
|
||||
}else{
|
||||
|
||||
self.blueVIew.backgroundColor = RGB(78, 157, 254);
|
||||
self.origeView.backgroundColor = RGB(254, 121, 63);
|
||||
self.jihuiMaView.textColor = RGB(102, 102, 102);
|
||||
self.jihuomaLabel.textColor = RGB(51, 51, 51);
|
||||
self.shiyongImg.image = [UIImage imageNamed:@"record_label_default"];
|
||||
self.fuzhiBtn.userInteractionEnabled = YES;
|
||||
self.fuzhiBtn.backgroundColor =RGB(254, 121, 63);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
+248
@@ -0,0 +1,248 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="GoldConvertRecordViewCell" id="KGk-i7-Jjw" customClass="GoldConvertRecordViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="170"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="169.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1Ga-vk-Z5O">
|
||||
<rect key="frame" x="15" y="0.0" width="290" height="130"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="record_label_default.png" translatesAutoresizingMaskIntoConstraints="NO" id="5SW-bO-jU9">
|
||||
<rect key="frame" x="215" y="0.0" width="75" height="72"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="72" id="8qr-aM-Pxv"/>
|
||||
<constraint firstAttribute="width" constant="75" id="zsp-TY-8yT"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ceq-Pd-nYf">
|
||||
<rect key="frame" x="0.0" y="0.0" width="4" height="130"/>
|
||||
<color key="backgroundColor" red="0.30588235294117649" green="0.61568627450980395" blue="0.99607843137254903" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="4" id="wSB-vz-21P"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="¥元" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jN2-UA-Agg">
|
||||
<rect key="frame" x="12" y="26" width="80" height="21"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="21" id="Skk-TE-zDo"/>
|
||||
<constraint firstAttribute="width" constant="80" id="kqs-N1-aR9"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="23"/>
|
||||
<color key="textColor" red="0.30588235289999999" green="0.61568627450000002" blue="0.99607843139999996" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="— 抵用券 —" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QXG-5c-TJa">
|
||||
<rect key="frame" x="12" y="61" width="80" height="21"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="80" id="I8O-JR-MfU"/>
|
||||
<constraint firstAttribute="height" constant="21" id="KRw-t1-vhM"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="13"/>
|
||||
<color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PtZ-Gu-lVz">
|
||||
<rect key="frame" x="12" y="90" width="80" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="16" id="7M3-Xu-xC3"/>
|
||||
<constraint firstAttribute="width" constant="80" id="Cu5-YT-mQr"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ovz-uU-nsd">
|
||||
<rect key="frame" x="12" y="107" width="80" height="15"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="80" id="lN1-by-ufF"/>
|
||||
<constraint firstAttribute="height" constant="15" id="oaO-v4-0mO"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="goldconvert_recordline.png" translatesAutoresizingMaskIntoConstraints="NO" id="wdp-Uw-kuW">
|
||||
<rect key="frame" x="93" y="5" width="2" height="120"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="120" id="sp6-UB-3lE"/>
|
||||
<constraint firstAttribute="width" constant="2" id="uFS-t3-flA"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jGk-Pz-2zb">
|
||||
<rect key="frame" x="120" y="16" width="163" height="21"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="21" id="fah-iG-uch"/>
|
||||
</constraints>
|
||||
<attributedString key="attributedText">
|
||||
<fragment content="100金币可兑换">
|
||||
<attributes>
|
||||
<color key="NSColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<font key="NSFont" metaFont="system" size="15"/>
|
||||
</attributes>
|
||||
</fragment>
|
||||
</attributedString>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="i0a-Rz-4cq">
|
||||
<rect key="frame" x="120" y="45" width="163" height="21"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="21" id="j5q-Lg-YtM"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hd7-iL-mY3">
|
||||
<rect key="frame" x="120" y="89" width="163" height="21"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="21" id="ujQ-hj-9wb"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Wt8-z5-r3A">
|
||||
<rect key="frame" x="120" y="68" width="163" height="21"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="21" id="hot-gs-MHi"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="wdp-Uw-kuW" firstAttribute="leading" secondItem="Ovz-uU-nsd" secondAttribute="trailing" constant="1" id="0UP-nf-e02"/>
|
||||
<constraint firstItem="Ovz-uU-nsd" firstAttribute="top" secondItem="PtZ-Gu-lVz" secondAttribute="bottom" constant="1" id="4Rc-5S-7u7"/>
|
||||
<constraint firstItem="5SW-bO-jU9" firstAttribute="top" secondItem="1Ga-vk-Z5O" secondAttribute="top" id="6K1-Wc-Kgj"/>
|
||||
<constraint firstItem="Ceq-Pd-nYf" firstAttribute="top" secondItem="1Ga-vk-Z5O" secondAttribute="top" id="6hc-Ba-1lb"/>
|
||||
<constraint firstAttribute="height" constant="130" id="8Mb-fA-r7Z"/>
|
||||
<constraint firstItem="wdp-Uw-kuW" firstAttribute="centerY" secondItem="Ceq-Pd-nYf" secondAttribute="centerY" id="CLo-Q9-MBk"/>
|
||||
<constraint firstItem="hd7-iL-mY3" firstAttribute="top" secondItem="Wt8-z5-r3A" secondAttribute="bottom" id="Cuv-AI-CX6"/>
|
||||
<constraint firstAttribute="trailing" secondItem="i0a-Rz-4cq" secondAttribute="trailing" constant="7" id="DUU-gf-R9t"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Ovz-uU-nsd" secondAttribute="bottom" constant="8" id="Dwg-jU-Ev7"/>
|
||||
<constraint firstItem="jGk-Pz-2zb" firstAttribute="top" secondItem="1Ga-vk-Z5O" secondAttribute="top" constant="16" id="FM3-0V-Osh"/>
|
||||
<constraint firstAttribute="trailing" secondItem="jGk-Pz-2zb" secondAttribute="trailing" constant="7" id="Jr0-sR-9Qf"/>
|
||||
<constraint firstItem="QXG-5c-TJa" firstAttribute="leading" secondItem="Ceq-Pd-nYf" secondAttribute="trailing" constant="8" id="Kuq-7g-aqu"/>
|
||||
<constraint firstItem="i0a-Rz-4cq" firstAttribute="top" secondItem="jGk-Pz-2zb" secondAttribute="bottom" constant="8" id="SfA-LY-zTb"/>
|
||||
<constraint firstItem="i0a-Rz-4cq" firstAttribute="leading" secondItem="1Ga-vk-Z5O" secondAttribute="leading" constant="120" id="St1-Pk-5wD"/>
|
||||
<constraint firstAttribute="trailing" secondItem="hd7-iL-mY3" secondAttribute="trailing" constant="7" id="SyI-0p-1DJ"/>
|
||||
<constraint firstItem="hd7-iL-mY3" firstAttribute="leading" secondItem="wdp-Uw-kuW" secondAttribute="trailing" constant="25" id="TDE-dw-AmR"/>
|
||||
<constraint firstItem="Ceq-Pd-nYf" firstAttribute="leading" secondItem="1Ga-vk-Z5O" secondAttribute="leading" id="TiR-u0-jOD"/>
|
||||
<constraint firstItem="Wt8-z5-r3A" firstAttribute="top" secondItem="i0a-Rz-4cq" secondAttribute="bottom" constant="2" id="VkL-Ag-7L2"/>
|
||||
<constraint firstItem="jN2-UA-Agg" firstAttribute="top" secondItem="1Ga-vk-Z5O" secondAttribute="top" constant="26" id="dD9-u9-xTl"/>
|
||||
<constraint firstItem="QXG-5c-TJa" firstAttribute="top" secondItem="jN2-UA-Agg" secondAttribute="bottom" constant="14" id="dOz-Vo-RRB"/>
|
||||
<constraint firstAttribute="trailing" secondItem="5SW-bO-jU9" secondAttribute="trailing" id="gET-s3-Ckv"/>
|
||||
<constraint firstItem="jN2-UA-Agg" firstAttribute="leading" secondItem="Ceq-Pd-nYf" secondAttribute="trailing" constant="8" id="giQ-JU-smy"/>
|
||||
<constraint firstItem="jGk-Pz-2zb" firstAttribute="leading" secondItem="wdp-Uw-kuW" secondAttribute="trailing" constant="25" id="h65-Qc-M8r"/>
|
||||
<constraint firstItem="Ovz-uU-nsd" firstAttribute="leading" secondItem="Ceq-Pd-nYf" secondAttribute="trailing" constant="8" id="hQJ-Gl-fMY"/>
|
||||
<constraint firstItem="PtZ-Gu-lVz" firstAttribute="leading" secondItem="Ceq-Pd-nYf" secondAttribute="trailing" constant="8" id="iJT-ka-06m"/>
|
||||
<constraint firstItem="Wt8-z5-r3A" firstAttribute="leading" secondItem="wdp-Uw-kuW" secondAttribute="trailing" constant="25" id="jD3-ll-EBs"/>
|
||||
<constraint firstItem="Ovz-uU-nsd" firstAttribute="top" secondItem="PtZ-Gu-lVz" secondAttribute="bottom" constant="1" id="kvb-63-CbF"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Ceq-Pd-nYf" secondAttribute="bottom" id="r8K-aW-pQf"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Wt8-z5-r3A" secondAttribute="trailing" constant="7" id="t92-F7-TYm"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8QD-o7-WcW">
|
||||
<rect key="frame" x="15" y="130" width="290" height="40"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="goh-rc-CEy">
|
||||
<rect key="frame" x="0.0" y="0.0" width="4" height="40"/>
|
||||
<color key="backgroundColor" red="0.99607843137254903" green="0.47450980392156861" blue="0.24705882352941178" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="4" id="93M-sx-B41"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="激活码:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="422-3m-RoV">
|
||||
<rect key="frame" x="12" y="10" width="57" height="21"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="21" id="GAC-Pb-OtW"/>
|
||||
<constraint firstAttribute="width" constant="57" id="HB9-Yk-GF5"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="13"/>
|
||||
<color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XhG-6U-iiZ">
|
||||
<rect key="frame" x="68" y="10" width="33" height="21"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="21" id="gn9-5C-0IW"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="13"/>
|
||||
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="U1o-LV-PX7">
|
||||
<rect key="frame" x="222" y="9" width="53" height="22"/>
|
||||
<color key="backgroundColor" red="0.99607843137254903" green="0.47450980392156861" blue="0.24705882352941178" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="22" id="IHy-S7-cw0"/>
|
||||
<constraint firstAttribute="width" constant="53" id="Lvl-IK-J7h"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="13"/>
|
||||
<state key="normal" title="复制"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.97254901960784312" green="0.97254901960784312" blue="0.97254901960784312" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="U1o-LV-PX7" secondAttribute="trailing" constant="15" id="3N6-aa-K3A"/>
|
||||
<constraint firstItem="goh-rc-CEy" firstAttribute="top" secondItem="8QD-o7-WcW" secondAttribute="top" id="8oL-cA-TqS"/>
|
||||
<constraint firstItem="422-3m-RoV" firstAttribute="centerY" secondItem="8QD-o7-WcW" secondAttribute="centerY" id="DKN-GU-SbP"/>
|
||||
<constraint firstItem="goh-rc-CEy" firstAttribute="leading" secondItem="8QD-o7-WcW" secondAttribute="leading" id="Ph0-Lc-Mhr"/>
|
||||
<constraint firstItem="XhG-6U-iiZ" firstAttribute="centerY" secondItem="8QD-o7-WcW" secondAttribute="centerY" id="Wje-RH-E9P"/>
|
||||
<constraint firstAttribute="height" constant="40" id="XLh-OZ-FU9"/>
|
||||
<constraint firstItem="U1o-LV-PX7" firstAttribute="centerY" secondItem="8QD-o7-WcW" secondAttribute="centerY" id="bA7-8q-f8i"/>
|
||||
<constraint firstItem="XhG-6U-iiZ" firstAttribute="leading" secondItem="422-3m-RoV" secondAttribute="trailing" constant="-1" id="bWj-DH-LXy"/>
|
||||
<constraint firstItem="422-3m-RoV" firstAttribute="leading" secondItem="goh-rc-CEy" secondAttribute="trailing" constant="8" id="cXz-Aw-i3m"/>
|
||||
<constraint firstAttribute="bottom" secondItem="goh-rc-CEy" secondAttribute="bottom" id="tni-5A-DS0"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="8QD-o7-WcW" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="CIv-Rt-PcY"/>
|
||||
<constraint firstItem="1Ga-vk-Z5O" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="DjF-hK-5h3"/>
|
||||
<constraint firstAttribute="trailing" secondItem="1Ga-vk-Z5O" secondAttribute="trailing" constant="15" id="vGp-Bi-7am"/>
|
||||
<constraint firstAttribute="bottom" secondItem="8QD-o7-WcW" secondAttribute="bottom" id="vW9-bD-Ra8"/>
|
||||
<constraint firstItem="1Ga-vk-Z5O" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="w39-Pd-tP1"/>
|
||||
<constraint firstAttribute="trailing" secondItem="8QD-o7-WcW" secondAttribute="trailing" constant="15" id="yPq-Wp-TVv"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<color key="backgroundColor" red="0.94901960784313721" green="0.94901960784313721" blue="0.94901960784313721" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<connections>
|
||||
<outlet property="blueVIew" destination="Ceq-Pd-nYf" id="s33-QX-fLw"/>
|
||||
<outlet property="dateLabel" destination="Ovz-uU-nsd" id="L24-s1-dlJ"/>
|
||||
<outlet property="fuzhiBtn" destination="U1o-LV-PX7" id="zZp-Q9-Hst"/>
|
||||
<outlet property="goldLabel" destination="jGk-Pz-2zb" id="l5m-Mh-ajL"/>
|
||||
<outlet property="jihuiMaView" destination="422-3m-RoV" id="dWc-ER-mwH"/>
|
||||
<outlet property="jihuomaLabel" destination="XhG-6U-iiZ" id="a4b-Yb-T5N"/>
|
||||
<outlet property="origeView" destination="goh-rc-CEy" id="8HC-6m-BXQ"/>
|
||||
<outlet property="ruleSLabel" destination="Wt8-z5-r3A" id="PTb-CB-SmQ"/>
|
||||
<outlet property="ruleTlabel" destination="hd7-iL-mY3" id="lLN-yg-f1T"/>
|
||||
<outlet property="rulefLabel" destination="i0a-Rz-4cq" id="jir-u2-hAg"/>
|
||||
<outlet property="shiyongImg" destination="5SW-bO-jU9" id="8uV-iV-83r"/>
|
||||
<outlet property="timeLabel" destination="PtZ-Gu-lVz" id="Hpn-8V-dse"/>
|
||||
<outlet property="yuanLabel" destination="jN2-UA-Agg" id="Ghr-ak-dFG"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="25" y="51"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="goldconvert_recordline.png" width="1" height="114"/>
|
||||
<image name="record_label_default.png" width="74" height="72"/>
|
||||
</resources>
|
||||
</document>
|
||||
Reference in New Issue
Block a user