Skip to content

Commit bc068ea

Browse files
committed
- 完善文章访问和图片显示,iPad 图片宽度80%
- 无法解析的页面跳转系统浏览器,显示更加合理 - 更新学习介绍资料和内容 - 细节和体验进一步优化升级
1 parent c56cab4 commit bc068ea

12 files changed

+238
-133
lines changed

CampusOfGLUT.xcodeproj/project.pbxproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -2116,7 +2116,7 @@
21162116
"$(PROJECT_DIR)/CampusOfGLUt/Classes/Vendors/BaiduMTJ_iOS_App_V4.5.0",
21172117
"$(PROJECT_DIR)/CampusOfGLUT/Classes/Vendors/WeiXinSDK1.8.0_NoPay",
21182118
);
2119-
MARKETING_VERSION = 8.1.0;
2119+
MARKETING_VERSION = 8.1.1;
21202120
PRODUCT_BUNDLE_IDENTIFIER = CampusOfGLUT;
21212121
PRODUCT_MODULE_NAME = CampusOfGLUT;
21222122
PRODUCT_NAME = CampusOfGLUT;
@@ -2162,7 +2162,7 @@
21622162
"$(PROJECT_DIR)/CampusOfGLUt/Classes/Vendors/BaiduMTJ_iOS_App_V4.5.0",
21632163
"$(PROJECT_DIR)/CampusOfGLUT/Classes/Vendors/WeiXinSDK1.8.0_NoPay",
21642164
);
2165-
MARKETING_VERSION = 8.1.0;
2165+
MARKETING_VERSION = 8.1.1;
21662166
PRODUCT_BUNDLE_IDENTIFIER = CampusOfGLUT;
21672167
PRODUCT_MODULE_NAME = CampusOfGLUT;
21682168
PRODUCT_NAME = CampusOfGLUT;

CampusOfGLUt/Classes/Controllers/Me/SetingViewController.m

+5-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ - (void)viewDidLoad {
4141
[self initTableView];
4242

4343
self.contentArray = @[@"桂林理工大学",@"觉得不错?",@"应用内评分",@"意见反馈",@"作者微博",@"作者博客",@"推荐应用",@"项目源码",@"感谢开源",@"用户条款"];
44-
self.subTitleArray = @[@"友情链接",@"AppStore评分",@"马上评分",@"建议问题",@"关注动态",@"技术心得",@"Apps",@"GitHub",@"开源组件",@"隐私协议"];
44+
self.subTitleArray = @[@"官网",@"AppStore评分",@"马上评分",@"建议问题",@"关注动态",@"技术心得",@"Apps",@"GitHub",@"开源组件",@"隐私协议"];
4545

4646
}
4747

@@ -92,6 +92,10 @@ -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NS
9292
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
9393
}
9494

95+
if (@available(iOS 13.0, *)) {
96+
cell.backgroundColor = [UIColor secondarySystemGroupedBackgroundColor];
97+
}
98+
9599
cell.textLabel.font = [UIFont systemFontOfSize:18.0f];
96100
cell.textLabel.text = self.contentArray[indexPath.row];
97101
cell.detailTextLabel.text = self.subTitleArray[indexPath.row];

CampusOfGLUt/Classes/Controllers/Me/SupportTableViewController.m

+10
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ - (NSArray *)supportURLArray{
4343
- (void)viewDidLoad {
4444
[super viewDidLoad];
4545
self.title = @"感谢开源";
46+
47+
if (@available(iOS 13.0, *)) {
48+
self.view.backgroundColor = [UIColor secondarySystemGroupedBackgroundColor];
49+
self.tableView.backgroundColor = [UIColor secondarySystemGroupedBackgroundColor];
50+
} else {
51+
self.view.backgroundColor = [UIColor colorWithWhite:0.9 alpha:1.000];
52+
}
4653
}
4754

4855

@@ -62,6 +69,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
6269
cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:studyCellID];
6370
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
6471
}
72+
if (@available(iOS 13.0, *)) {
73+
cell.backgroundColor = [UIColor secondarySystemGroupedBackgroundColor];
74+
}
6575

6676
cell.textLabel.text = self.supportArray[indexPath.row];
6777
if ([[UIDevice currentDevice] userInterfaceIdiom] != UIUserInterfaceIdiomPhone) {

CampusOfGLUt/Classes/Controllers/RootControllers/BaseWebViewController.m

+4-3
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,10 @@ - (void)setHTML
285285
if (imageCounts > 0)
286286
{
287287
for (int i = 0; i < self.newsModel.images.count; i += 2) {
288-
// 可能全文只有一张回复我
288+
// 可能全文只有一张图片
289289
if (imageCounts == 1) {
290290
[imagesHtml appendString:[self getImageHTMLWithImage:self.newsModel.images[i] Title:@"" ImageHight:imageHight]];
291+
break;
291292
}
292293

293294
if (i + 1 == imageCounts) {
@@ -601,8 +602,8 @@ - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)
601602
}
602603
else if([url hasPrefix:@"http"])
603604
{
604-
605-
[self openTOWebViewWithURL:url];
605+
//[self openTOWebViewWithURL:url];
606+
[self.shareInfoTool inSafariOpenWithURL:url];
606607
return NO;
607608

608609
}

CampusOfGLUt/Classes/Controllers/Study/ContentTableViewController.m

+13-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#import "BaseWebViewController.h"
1111
#import "TOWebViewController.h"
1212
#import "JwLoginVCViewController.h"
13+
#import "InformationHandleTool.h"
1314

1415
@interface ContentTableViewController ()
1516

@@ -20,6 +21,12 @@ @implementation ContentTableViewController
2021
- (void)viewDidLoad {
2122
[super viewDidLoad];
2223

24+
if (@available(iOS 13.0, *)) {
25+
self.view.backgroundColor = [UIColor secondarySystemGroupedBackgroundColor];
26+
self.tableView.backgroundColor = [UIColor secondarySystemGroupedBackgroundColor];
27+
} else {
28+
self.view.backgroundColor = [UIColor colorWithWhite:0.9 alpha:1.000];
29+
}
2330
}
2431

2532
- (void)viewWillAppear:(BOOL)animated{
@@ -45,6 +52,10 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
4552
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
4653
}
4754

55+
if (@available(iOS 13.0, *)) {
56+
cell.backgroundColor = [UIColor secondarySystemGroupedBackgroundColor];
57+
}
58+
4859
NSDictionary * dic = self.contentArray[indexPath.row];
4960
cell.textLabel.text = [dic objectForKey:@"title"];
5061
if ([[UIDevice currentDevice] userInterfaceIdiom] != UIUserInterfaceIdiomPhone) {
@@ -61,7 +72,8 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
6172
NSString *url = [dic objectForKey:@"content"];
6273
if ([url hasPrefix:@"http"])
6374
{
64-
[self openTOWebViewWithURL:url];
75+
//[self openTOWebViewWithURL:url];
76+
[InformationHandleTool.sharedInfoTool inSafariOpenWithURL:url];
6577
}
6678
else if([url hasPrefix:@"jw"]){
6779
JwLoginVCViewController * jw = [[JwLoginVCViewController alloc]init];

CampusOfGLUt/Classes/Controllers/Study/Study_RootViewController.m

+5-1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
8080
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
8181
}
8282

83+
if (@available(iOS 13.0, *)) {
84+
cell.backgroundColor = [UIColor secondarySystemGroupedBackgroundColor];
85+
}
86+
8387
cell.textLabel.text = self.studyArray[indexPath.row][0];
8488

8589
if (![self.infoTool isDeviceOfiPhone]) {//iPad字体大些
@@ -99,7 +103,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
99103
ContentTableViewController * contentView = [[ContentTableViewController alloc]init];
100104
contentView.title = self.studyArray[indexPath.row][0];
101105
contentView.contentArray = self.studyArray[indexPath.row][1];
102-
106+
contentView.hidesBottomBarWhenPushed = YES;
103107
[self.navigationController pushViewController:contentView animated:YES];
104108

105109

CampusOfGLUt/Classes/Other/Util/FetchNewsDataTool.m

+3-3
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ - (void)getNewsListDataWithClassName:(NSString *)name page:(int)page success:(vo
250250
// NSArray * numElements = [aElement searchWithXPathQuery:@"//div[@class='con']/h5/font//span"];
251251
// NSString * num = numElements.firstObject ? [(TFHppleElement *)numElements.firstObject text] : @"";
252252

253-
NSArray * subtitleElements = [aElement searchWithXPathQuery:@"//div[@class='con']/p"];
254-
NSString * subtitle = subtitleElements.firstObject ? [(TFHppleElement *)subtitleElements.firstObject text] : @"";
253+
// NSArray * subtitleElements = [aElement searchWithXPathQuery:@"//div[@class='con']/p"];
254+
// NSString * subtitle = subtitleElements.firstObject ? [(TFHppleElement *)subtitleElements.firstObject text] : @"";
255255

256256
NewsModel * news = [[NewsModel alloc]init];
257257
news.title = title;
@@ -670,7 +670,7 @@ - (void)getContentsWithURL:(NSString *)url success:(void (^)(NewsModel *newsCont
670670
NSString * imageurl;
671671
BOOL isExce = NO;
672672
@try {
673-
imageurl = (NSString *) [[[[element.raw componentsSeparatedByString:@"rc=\""] objectAtIndex:1] componentsSeparatedByString:@"\""] objectAtIndex:0];
673+
imageurl = (NSString *) [[[[element.raw componentsSeparatedByString:@" src=\""] objectAtIndex:1] componentsSeparatedByString:@"\""] objectAtIndex:0];
674674
}@catch (NSException *exception) {
675675
isExce = YES;
676676
}@finally {

CampusOfGLUt/Classes/Resources/iPadNews.css

+2
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ a:active{color:#8f001e;}
124124
.content .post_content span.pt_title{text-align:center;clear:both;font-size:48px;}
125125
.content .post_content h1.post_via{text-align:right;color:#379df9;}
126126
/* Custom Setting */
127+
.content .fs1 {text-align:center;}
128+
.content .fs1 img{display: inline-block;}
127129
.content .fs1 p{text-align:center;clear:both;font-size:23px}
128130
.content .fs2 p{font-size:16px;line-height:30px;}
129131
.content .fs3 p{font-size:18px;line-height:34px;}
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,37 @@
11
<html>
22
<head>
33
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4-
<title>桂林理工大学校园通</title>
5-
<link href='iPadNews.css' rel='stylesheet' type="text/css"/>
6-
<script type="text/javascript">
7-
function openIamge(obj)
8-
{
9-
window.location.href = 'openiamge'+obj
10-
11-
}
12-
</script>
4+
<title>桂林理工大学校园通</title>
5+
<link href='iPadNews.css' rel='stylesheet' type="text/css" />
6+
<script type="text/javascript">
7+
function openIamge(obj) {
8+
window.location.href = 'openiamge' + obj
9+
}
10+
</script>
1311
</head>
1412
<body class="wap wide gt800 app">
15-
<div id="con"> <!-- Post -->
13+
<div id="con"> <!-- Post -->
1614
<div class="wrap">
1715
<div class="content fl">
1816
<div class="post_title">
19-
<br/>
17+
<br />
2018
<h1>${webview_title}</h1>
2119
<span class="pt_info pre1">${webview_subtitle}
2220
</span>
23-
</div>
24-
<br/>
25-
21+
</div>
22+
<br />
2623
<div class="post_content" id="paragraph">
27-
<p>${webview_contents}
28-
29-
<p></p><p></p>
24+
<p>${webview_contents}</p>
3025
<div class="fs1">
31-
32-
${webview_images}
33-
34-
<br/>
35-
<br/>
36-
<h1 class="post_via">via 桂林理工大学-校园通</h1>
37-
<br/>
26+
${webview_images}
27+
<br />
28+
<br />
29+
<h1 class="post_via">via 桂林理工大学-校园通</h1>
30+
<br />
31+
</div>
3832
</div>
3933
</div>
4034
</div>
41-
</body>
35+
</div>
36+
</body>
4237
</html>

CampusOfGLUt/Classes/Resources/iPhoneNews.css

+2
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ a:active{color:#8f001e;}
124124
.content .post_content span.pt_title{text-align:center;clear:both;font-size:48px;}
125125
.content .post_content h1.post_via{text-align:right;color:#379df9;}
126126
/* Custom Setting */
127+
.content .fs1 {text-align:center;}
128+
.content .fs1 img{display: inline-block;}
127129
.content .fs1 p{text-align:center;clear:both;font-size:18;font-weight:500;}
128130
.content .fs2 p{font-size:16px;line-height:30px;}
129131
.content .fs3 p{font-size:18px;line-height:34px;}
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,37 @@
11
<html>
22
<head>
33
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4-
<title>桂林理工大学校园通</title>
5-
<link href='iPhoneNews.css' rel='stylesheet' type="text/css"/>
6-
<script type="text/javascript">
7-
function openIamge(obj)
8-
{
9-
window.location.href = 'openiamge'+obj
10-
11-
}
12-
</script>
4+
<title>桂林理工大学校园通</title>
5+
<link href='iPhoneNews.css' rel='stylesheet' type="text/css" />
6+
<script type="text/javascript">
7+
function openIamge(obj) {
8+
window.location.href = 'openiamge' + obj
9+
}
10+
</script>
1311
</head>
1412
<body class="wap wide gt800 app">
15-
<div id="con"> <!-- Post -->
13+
<div id="con"> <!-- Post -->
1614
<div class="wrap">
1715
<div class="content fl">
1816
<div class="post_title">
19-
<br/>
17+
<br />
2018
<h1>${webview_title}</h1>
21-
<span class="pt_info pre1">${webview_subtitle}
19+
<span class="pt_info pre1">${webview_subtitle}
2220
</span>
2321
</div>
24-
<br/>
22+
<br />
2523
<div class="post_content" id="paragraph">
26-
<p>${webview_contents}
27-
28-
<p></p><p></p>
24+
<p>${webview_contents}</p>
2925
<div class="fs1">
30-
3126
${webview_images}
32-
<br/>
33-
<br/>
34-
<h1 class="post_via">via 桂林理工大学-校园通</h1>
35-
<br/>
27+
<br />
28+
<br />
29+
<h1 class="post_via">via 桂林理工大学-校园通</h1>
30+
<br />
31+
</div>
3632
</div>
3733
</div>
3834
</div>
39-
</body>
35+
</div>
36+
</body>
4037
</html>

0 commit comments

Comments
 (0)