Commit 16b9503b authored by 曹云霄's avatar 曹云霄

Merge branch 'master' into learningCenter

# Conflicts:
#	Class/CardDetailsViewController.m
#	Lighting/OppleMain.storyboard
修复WkWebview不能播放视频,完成公告开发
parents 06f6352e 912fec60
......@@ -78,7 +78,7 @@
self.annountcementTitleLabel.text = entity.title;
self.annountcementTimeLabel.text = entity.createDate;
self.annountcementTypeLabel.customText = entity.afficheType;
self.annountcementReadCountLabel.text = @"1000";
self.annountcementReadCountLabel.text = [NSString stringWithFormat:@"%ld",entity.attachmentUrls.count];
}
#pragma mark - WKWebView
......@@ -90,6 +90,8 @@
webView.view.frame = CGRectMake(0, 0, ScreenWidth, contentHeight);
[weakSelf.announcementDetailsTableView reloadData];
}];
self.annountcementContentHeigt = 44;//默认值
webView.view.frame = CGRectMake(0, 0, ScreenWidth, self.annountcementContentHeigt);
[self addChildViewController:webView];
}
......
......@@ -8,6 +8,7 @@
#import "BaseViewController.h"
typedef void(^returnContentHeight)(CGFloat height);
@interface WkWebViewViewController : BaseViewController
......
......@@ -23,18 +23,16 @@
if (self = [super init]) {
self.contentWebView = [[UIWebView alloc]initWithFrame:CGRectMake(27, 10, ScreenWidth-27*2, 0.01)];
self.contentWebView.delegate = self;
self.contentWebView.backgroundColor = [UIColor whiteColor];
self.contentWebView.scrollView.scrollEnabled = NO;
self.contentHeight = block;
[self.view addSubview:self.contentWebView];
//下划线
UIView *lineView = [[UIView alloc]init];
lineView.backgroundColor = RGB(237, 238, 239, 1);
[self.view addSubview:lineView];
[lineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(self.view);
make.top.equalTo(self.view.mas_bottom).mas_offset(1);
make.size.mas_equalTo(CGSizeMake(ScreenWidth-27*2, 1));
make.left.right.bottom.equalTo(self.view);
make.size.mas_equalTo(CGSizeMake(ScreenWidth, 1));
}];
}
return self;
......@@ -54,16 +52,18 @@
- (void)webViewDidFinishLoad:(UIWebView *)webView
{
[self RemoveMBProgressHUDLoding];
webView.height = webView.scrollView.contentSize.height-10;
webView.height = webView.scrollView.contentSize.height;
if (self.contentHeight) {
self.contentHeight(webView.scrollView.contentSize.height);
self.contentHeight(webView.scrollView.contentSize.height+20);
}
}
- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error
{
[self RemoveMBProgressHUDLoding];
[self ErrorMBProgressView:@"加载失败"];
}
@end
......@@ -211,6 +211,9 @@
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
{
if ([self.cardState isEqualToString:CHECK]) {
return;
}
CardAmplificationViewController *cardVC = [[CardAmplificationViewController alloc]init];
self.settingsPopoverController = [[WYPopoverController alloc] initWithContentViewController:cardVC];
self.settingsPopoverController.theme.fillBottomColor = [UIColor clearColor];
......
......@@ -26,6 +26,10 @@
*/
@property (weak, nonatomic) IBOutlet UIButton *isUsedButton;
/**
审核中
*/
@property (weak, nonatomic) IBOutlet UIButton *examinationButton;
/**
* 指示线
......
......@@ -35,6 +35,11 @@
[self addChildViewController:dontUseVc];
/// 已领取
CardBeenUseViewController *beenUseVc = [[[self class] getMainStoryboardClass] instantiateViewControllerWithIdentifier:@"CardBeenUseViewController"];
// 审批中
CardBeenUseViewController *examineUseVc = [[[self class] getMainStoryboardClass]instantiateViewControllerWithIdentifier:@"CardBeenUseViewController"];
examineUseVc.cardState = CHECK;
[self addChildViewController:examineUseVc];
beenUseVc.cardState = ACTIVED;
[self addChildViewController:beenUseVc];
/// 已使用
......@@ -43,6 +48,7 @@
[self addChildViewController:usedVc];
dontUseVc.view.frame = CGRectMake(0, 0, self.cardBackgroundView.mj_w, self.cardBackgroundView.mj_h);
beenUseVc.view.frame = CGRectMake(0, 0, self.cardBackgroundView.mj_w, self.cardBackgroundView.mj_h);
examineUseVc.view.frame = CGRectMake(0, 0, self.cardBackgroundView.mj_w, self.cardBackgroundView.mj_h);
usedVc.view.frame = CGRectMake(0, 0, self.cardBackgroundView.mj_w, self.cardBackgroundView.mj_h);
[self.cardBackgroundView addSubview:dontUseVc.view];
self.currentVC = dontUseVc;
......@@ -68,19 +74,28 @@
{
self.beenUseButton.selected = NO;
self.isUsedButton.selected = NO;
self.examinationButton.selected = NO;
}
break;
case 101:
{
self.dontUseButton.selected = NO;
self.isUsedButton.selected = NO;
self.beenUseButton.selected = NO;
}
break;
case 102:
{
self.dontUseButton.selected = NO;
self.beenUseButton.selected = NO;
self.examinationButton.selected = NO;
}
break;
case 103:
{
self.dontUseButton.selected = NO;
self.beenUseButton.selected = NO;
self.examinationButton.selected = NO;
}
break;
......
......@@ -54,13 +54,6 @@
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}
......
......@@ -8,7 +8,7 @@
#import "LearningCenterMainViewController.h"
#import "OnlineLearningViewController.h"
#import "ForumViewController.h"
@interface LearningCenterMainViewController ()
......@@ -43,7 +43,7 @@
if ([returnValue[@"code"] isEqualToNumber:@0]) {
RsScoreDetails *integralDatas = [[RsScoreDetails alloc]initWithDictionary:returnValue[@"data"] error:nil];
[weakSelf setUpIntegral:integralDatas];
}else {
[weakSelf ErrorMBProgressView:returnValue[@"message"]];
......@@ -58,11 +58,19 @@
}];
}
#pragma mark - 积分信息
- (void)setUpIntegral:(RsScoreDetails *)entity
{
self.currentScoreLabel.text = [NSString stringWithFormat:@"%.0lf",entity.currentScore];
self.yearRankingLabel.text = [NSString stringWithFormat:@"%ld",entity.annualRanking];
self.quarterRankingLabel.text = [NSString stringWithFormat:@"%ld",entity.quarterlyRanking];
}
#pragma mark - 综合讨论
- (void)comprehensiveDiscussionViewClickAction:(UITapGestureRecognizer *)sender
{
ForumViewController *forum = [[[self class] getMainStoryboardClass]instantiateViewControllerWithIdentifier:@"ForumViewController"];
[self.navigationController pushViewController:forum animated:YES];
}
#pragma mark - 在线学习
......
......@@ -11,6 +11,12 @@
@interface OnlineLearningViewController ()<UICollectionViewDelegate,UICollectionViewDataSource>
/**
学习类别
*/
@property (nonatomic,strong) NSMutableArray *studyTypeArray;
@end
@implementation OnlineLearningViewController
......@@ -19,6 +25,7 @@
[super viewDidLoad];
[self setUpCollectionView];
[self getLearningModuleData];
}
#pragma mark - UICollectionView
......@@ -33,13 +40,30 @@
#pragma mark - 学习模块数据
- (void)getLearningModuleData
{
WS(weakSelf);
[self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:SERVERREQUESTURL(STUDYTYPES) WithCallClass:weakSelf WithRequestType:ONE WithParameter:nil WithReturnValueBlock:^(id returnValue) {
if ([returnValue[@"code"] isEqualToNumber:@0]) {
[weakSelf.studyTypeArray addObjectsFromArray:returnValue[@"data"]];
}else {
[weakSelf ErrorMBProgressView:returnValue[@"message"]];
}
[weakSelf.onlineLearningCollectionView reloadData];
} WithErrorCodeBlock:^(id errorCodeValue) {
[weakSelf RemoveMBProgressHUDLoding];
[weakSelf ErrorMBProgressView:NETWORK];
} WithFailureBlock:^(NSError *error) {
[weakSelf RemoveMBProgressHUDLoding];
[weakSelf ErrorMBProgressView:error.localizedDescription];
}];
}
#pragma mark - <UICollectionViewDelegate,UICollectionViewDataSource>
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{
return 10;
return self.studyTypeArray.count;
}
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
......@@ -48,19 +72,15 @@
return learningCell;
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}
/*
#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.
#pragma mark - lazy
- (NSMutableArray *)studyTypeArray
{
if (!_studyTypeArray) {
_studyTypeArray = [NSMutableArray array];
}
return _studyTypeArray;
}
*/
@end
......@@ -211,14 +211,11 @@
RsAwardDraw *drawEntity = self.datasArray[sender.tag];
[self showLuckyDrawControl:drawEntity.draw.lotteryId andOrderNumber:drawEntity.draw.orderNumber andDrawid:drawEntity.draw.fid luckyDrawFinish:^(NSDictionary *dict) {
id json = [NSJSONSerialization JSONObjectWithData:[dict[@"body"] dataUsingEncoding:NSUTF8StringEncoding] options:NSJSONReadingMutableContainers error:nil];
if (json) {
if ([json isKindOfClass:[NSDictionary class]]) {
if ([BaseViewController isBlankString:json[@"awardId"]]) {
[weakSelf SHOWPrompttext:@"未中奖"];
}else {
[weakSelf SHOWPrompttext:[NSString stringWithFormat:@"恭喜你获得了 %@",json[@"description"]]];
}
if ([dict isKindOfClass:[NSDictionary class]]) {
if ([BaseViewController isBlankString:dict[@"awardId"]]) {
[weakSelf SHOWPrompttext:@"未中奖"];
}else {
[weakSelf SHOWPrompttext:[NSString stringWithFormat:@"恭喜你获得了 %@",dict[@"description"]]];
}
}
}];
......
......@@ -101,7 +101,7 @@
{
if (_imageArray == nil) {
_imageArray = [NSArray arrayWithObjects:@"tiyan",@"changjing",@"chanping",@"kehu",@"guanyu",@"guanyu", nil];
_imageArray = [NSArray arrayWithObjects:@"tiyan",@"changjing",@"chanping",@"kehu",@"Learningcenter",@"guanyu", nil];
}
return _imageArray;
}
......
......@@ -474,7 +474,7 @@
}
[self CreateMBProgressHUDLoding];
WS(weakSelf);
NSSLog(@"%@",[order toDictionary]);
NSLog(@"%@",[order toDictionary]);
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(CONFIRMPAY) WithCallClass:weakSelf WithRequestType:0 WithParameter:order WithReturnValueBlock:^(id returnValue) {
[weakSelf RemoveMBProgressHUDLoding];
......
......@@ -18,18 +18,18 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" id="ehM-sk-qnE">
<frame key="frameInset" minX="0.99%" minY="41.03%" width="69" height="70.5"/>
<frame key="frameInset" minX="0.94%" minY="41.03%" width="69" height="70.5"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="当前积分" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="W9n-sx-VVL">
<frame key="frameInset" minX="10.75%" minY="30.07%" width="9.78%" height="18.5"/>
<frame key="frameInset" minX="10.70%" minY="30.07%" width="9.78%" height="18.5"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" red="0.66666666669999997" green="0.66666666669999997" blue="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="12233300" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="luv-aV-HGH">
<frame key="frameInset" minX="10.75%" minY="64.71%" width="14.03%" height="22"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="luv-aV-HGH">
<frame key="frameInset" minX="10.70%" minY="64.71%" width="14.08%" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.98039215690000003" green="0.32156862749999998" blue="0.050980392159999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
......@@ -61,27 +61,27 @@
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.87058823529999996" green="0.87058823529999996" blue="0.87058823529999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="13" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="YJy-KV-6XP">
<frame key="frameInset" minX="45.93%" minY="64.71%" width="14.03%" height="22"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="YJy-KV-6XP">
<frame key="frameInset" minX="45.88%" minY="64.71%" width="14.08%" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="35" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="0Eh-Eu-GWV">
<frame key="frameInset" minX="28.57%" minY="64.71%" width="14.03%" height="22"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="0Eh-Eu-GWV">
<frame key="frameInset" minX="28.52%" minY="64.71%" width="14.03%" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="季度积分排行" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="zzy-VB-gpq">
<frame key="frameInset" minX="28.57%" minY="30.07%" width="9.32%" height="18.5"/>
<frame key="frameInset" minX="28.52%" minY="30.07%" width="9.32%" height="18.5"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" red="0.66666666669999997" green="0.66666666669999997" blue="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="年度积分排行" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Xbh-34-JR3">
<frame key="frameInset" minX="45.93%" minY="30.07%" width="9.88%" height="18.5"/>
<frame key="frameInset" minX="45.88%" minY="30.07%" width="9.93%" height="18.5"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" red="0.66666666669999997" green="0.66666666669999997" blue="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
......@@ -464,7 +464,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" misplaced="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="60" sectionHeaderHeight="28" sectionFooterHeight="28" id="qbR-St-FxM">
<frame key="frameInset" minX="-1.5" minY="-1.5" maxX="1" maxY="1.5"/>
<frame key="frameInset" minX="-2.5" minY="-1.5" maxX="2" maxY="1.5"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
......
......@@ -15,7 +15,7 @@
<key>CFBundleName</key>
<string>欧立方</string>
<key>CFBundleShortVersionString</key>
<string>1.2.6</string>
<string>1.2.7</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
......
This diff is collapsed.
This diff is collapsed.
......@@ -322,6 +322,11 @@ extern NSString *const AFFICHELIST;
* 公告详情
*/
extern NSString *const AFFICHEdETAILS;
/**
* 学习类型
*/
extern NSString *const STUDYTYPES;
/*****************************************接口地址*****************************************/
......@@ -350,6 +355,11 @@ extern NSString *const ACTIVED;
*/
extern NSString *const USED;
/**
* 京东卡状态<审批中>
*/
extern NSString *const CHECK;
/**
* 更新购物车商品
*/
......
......@@ -316,6 +316,11 @@ NSString *const AFFICHELIST = @"/affiche/query";
* 公告详情
*/
NSString *const AFFICHEdETAILS = @"/affiche/get/%@";
/**
* 学习类型
*/
NSString *const STUDYTYPES = @"/study/getTypes";
/*****************************************接口地址*****************************************/
......@@ -339,6 +344,11 @@ NSString *const DISPENSED = @"dispensed";
*/
NSString *const ACTIVED = @"actived";
/**
* 京东卡状态<审批中>
*/
NSString *const CHECK = @"checking";
/**
* 京东卡状态<查看>
*/
......
......@@ -118,11 +118,9 @@
[self RemoveMBProgressHUDLoding];
}
- (void)webView:(WKWebView *)webView didFailNavigation:(WKNavigation *)navigation withError:(NSError *)error
{
[self ErrorMBProgressView:@"加载失败"];
[self dismissViewControllerAnimated:YES completion:nil];
[self RemoveMBProgressHUDLoding];
}
......
......@@ -58,11 +58,11 @@
#ifdef DEBUG
#define NSSLog(FORMAT, ...) fprintf(stderr,"%s:%d\t%s\n",[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]);
#define NSLog(FORMAT, ...) fprintf(stderr,"%s:%d\t%s\n",[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]);
#else
#define NSSLog(...)
#define NSLog(...)
#endif
......
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