Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
红
红星美凯龙管理在线APP IOS
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张杰
红星美凯龙管理在线APP IOS
Commits
76ece84e
Commit
76ece84e
authored
9 years ago
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复图片放大问题
parent
540d7b37
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
91 additions
and
83 deletions
+91
-83
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
Url.h
redstar/Classes/Macro/Url.h
+1
-2
PictureStoryViewController.m
...PictureDetail/ViewController/PictureStoryViewController.m
+87
-80
QuestionDescribeCell.m
...ction/Question/QuestionDetail/Cell/QuestionDescribeCell.m
+1
-0
QuestionDetailCell.m
...unction/Question/QuestionDetail/Cell/QuestionDetailCell.m
+1
-1
QuestionUnsolveTableViewCell.m
.../Question/QuestionUnsolved/QuestionUnsolveTableViewCell.m
+1
-0
No files found.
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
76ece84e
No preview for this file type
This diff is collapsed.
Click to expand it.
redstar/Classes/Macro/Url.h
View file @
76ece84e
...
...
@@ -8,10 +8,9 @@
#ifndef Url_h
#define Url_h
// url 测试环境
// #define kRedStarURL @"http://218.244.151.129:7580/"
#define kRedStarURL @"http://219.235.234.225:7580/"
#define kRedStarURL @"http://219.235.234.225:7580/"
// 最新正式环境
// #define kRedStarURL @"http://219.235.234.212:7580/"
...
...
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/Picture/PictureDetail/ViewController/PictureStoryViewController.m
View file @
76ece84e
...
...
@@ -361,29 +361,40 @@
#pragma mark - UITableView DataSource/Delegate
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
{
if
([
self
.
titleStr
isEqualToString
:
CategrayTitle
])
{
return
4
;
}
else
{
return
3
;
}
// if ([self.titleStr isEqualToString:CategrayTitle]) {
// return 4;
// } else {
// return 3;
// }
return
4
;
}
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
// if (section == 0) {
// return 1;
// } else if (section == 1) {
// return _picTextArray.count;
// } else {
// if ([self.titleStr isEqualToString:CategrayTitle]) {
// if (section == 2) {
// return _attachmentArray.count;
// } else {
// return _allCommentArray.count;
// }
// }
// return _allCommentArray.count;
// }
if
(
section
==
0
)
{
return
1
;
}
else
if
(
section
==
1
)
{
return
_picTextArray
.
count
;
}
else
if
(
section
==
2
)
{
return
_attachmentArray
.
count
;
}
else
{
if
([
self
.
titleStr
isEqualToString
:
CategrayTitle
])
{
if
(
section
==
2
)
{
return
_attachmentArray
.
count
;
}
else
{
return
_allCommentArray
.
count
;
}
}
return
_allCommentArray
.
count
;
}
}
// cell显示的内容
...
...
@@ -462,63 +473,59 @@
cell
.
descriptionLabel
.
text
=
picText
.
describeStr
;
return
cell
;
}
}
else
{
// 判断当前页面是否为 口碑巡店
if
([
self
.
titleStr
isEqualToString
:
CategrayTitle
])
{
// 是 口碑巡店
if
(
indexPath
.
section
==
2
)
{
// 显示 附件cell
AttachmentTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kAttachmentTableViwCell
];
if
(
!
cell
)
{
cell
=
[[
AttachmentTableViewCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kAttachmentTableViwCell
];
}
AttachmentModel
*
atta
=
_attachmentArray
[
indexPath
.
row
];
NSString
*
name
=
atta
.
fileName
;
[
cell
.
nameBtn
setTitle
:
name
forState
:
UIControlStateNormal
];
cell
.
nameBtn
.
titleLabel
.
numberOfLines
=
0
;
[
cell
.
nameBtn
addTarget
:
self
action
:
@selector
(
showFile
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
cell
.
downloadBtn
addTarget
:
self
action
:
@selector
(
downloadFile
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
cell
.
downloadBtn
.
tag
=
998473
+
indexPath
.
row
;
cell
.
nameBtn
.
tag
=
998473
+
indexPath
.
row
;
NSArray
*
paths
=
NSSearchPathForDirectoriesInDomains
(
NSDocumentDirectory
,
NSUserDomainMask
,
YES
);
NSString
*
path
=
paths
.
lastObject
;
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@/%@"
,
path
,
atta
.
fileName
];
NSFileManager
*
fileManager
=
[
NSFileManager
defaultManager
];
if
([
fileManager
fileExistsAtPath
:
url
])
{
cell
.
downloadBtn
.
selected
=
YES
;
cell
.
downloadBtn
.
backgroundColor
=
[
UIColor
grayColor
];
}
else
{
cell
.
downloadBtn
.
selected
=
NO
;
cell
.
downloadBtn
.
backgroundColor
=
[
UIColor
colorWithRed
:
47
/
255
.
0
green
:
209
/
255
.
0
blue
:
92
/
255
.
0
alpha
:
1
.
0
];
}
return
cell
;
}
else
{
// 显示 评论cell
PictureCommentTableCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kPictureCommentTableCell
];
if
(
!
cell
)
{
cell
=
[[
PictureCommentTableCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kPictureCommentTableCell
];
}
cell
.
comment
=
_allCommentArray
[
indexPath
.
row
];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
return
cell
;
}
}
else
if
(
indexPath
.
section
==
2
)
{
// 显示 附件cell
AttachmentTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kAttachmentTableViwCell
];
if
(
!
cell
)
{
cell
=
[[
AttachmentTableViewCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kAttachmentTableViwCell
];
}
AttachmentModel
*
atta
=
_attachmentArray
[
indexPath
.
row
];
NSString
*
name
=
atta
.
fileName
;
[
cell
.
nameBtn
setTitle
:
name
forState
:
UIControlStateNormal
];
cell
.
nameBtn
.
titleLabel
.
numberOfLines
=
0
;
[
cell
.
nameBtn
addTarget
:
self
action
:
@selector
(
showFile
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
cell
.
downloadBtn
addTarget
:
self
action
:
@selector
(
downloadFile
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
cell
.
downloadBtn
.
tag
=
998473
+
indexPath
.
row
;
cell
.
nameBtn
.
tag
=
998473
+
indexPath
.
row
;
NSArray
*
paths
=
NSSearchPathForDirectoriesInDomains
(
NSDocumentDirectory
,
NSUserDomainMask
,
YES
);
NSString
*
path
=
paths
.
lastObject
;
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@/%@"
,
path
,
atta
.
fileName
];
NSFileManager
*
fileManager
=
[
NSFileManager
defaultManager
];
if
([
fileManager
fileExistsAtPath
:
url
])
{
cell
.
downloadBtn
.
selected
=
YES
;
cell
.
downloadBtn
.
backgroundColor
=
[
UIColor
grayColor
];
}
else
{
// 评论
PictureCommentTableCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kPictureCommentTableCell
];
if
(
!
cell
)
{
cell
=
[[
PictureCommentTableCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kPictureCommentTableCell
];
}
cell
.
comment
=
_allCommentArray
[
indexPath
.
row
];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
return
cell
;
cell
.
downloadBtn
.
selected
=
NO
;
cell
.
downloadBtn
.
backgroundColor
=
[
UIColor
colorWithRed
:
47
/
255
.
0
green
:
209
/
255
.
0
blue
:
92
/
255
.
0
alpha
:
1
.
0
];
}
return
cell
;
}
else
{
// 显示 评论cell
PictureCommentTableCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kPictureCommentTableCell
];
if
(
!
cell
)
{
cell
=
[[
PictureCommentTableCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kPictureCommentTableCell
];
}
cell
.
comment
=
_allCommentArray
[
indexPath
.
row
];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
return
cell
;
}
// } else {
// // 评论
// PictureCommentTableCell *cell=[tableView dequeueReusableCellWithIdentifier:kPictureCommentTableCell];
// if (!cell) {
// cell = [[PictureCommentTableCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kPictureCommentTableCell];
// }
// cell.comment = _allCommentArray[indexPath.row];
// cell.selectionStyle = UITableViewCellSelectionStyleNone;
// return cell;
// }
// }
}
-
(
void
)
showFile
:
(
UIButton
*
)
sender
...
...
@@ -648,12 +655,12 @@
// 自定义section
-
(
UIView
*
)
tableView
:
(
UITableView
*
)
tableView
viewForHeaderInSection
:
(
NSInteger
)
section
{
NSInteger
num
=
0
;
if
([
self
.
titleStr
isEqualToString
:
CategrayTitle
])
{
num
=
3
;
}
else
{
num
=
2
;
}
NSInteger
num
=
3
;
//
if ([self.titleStr isEqualToString:CategrayTitle]) {
//
num = 3;
//
} else {
//
num = 2;
//
}
if
(
section
==
num
)
{
// 创建sectionView
UIView
*
sectionView
=
[[
UIView
alloc
]
init
];
...
...
@@ -716,19 +723,19 @@
// section高度
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForHeaderInSection
:
(
NSInteger
)
section
{
if
([
self
.
titleStr
isEqualToString
:
CategrayTitle
])
{
//
if ([self.titleStr isEqualToString:CategrayTitle]) {
if
(
section
==
3
)
{
return
50
;
}
else
{
return
CGFLOAT_MIN
;
}
}
else
{
if
(
section
==
2
)
{
return
50
;
}
else
{
return
CGFLOAT_MIN
;
}
}
//
} else {
//
if (section == 2) {
//
return 50;
//
} else {
//
return CGFLOAT_MIN;
//
}
//
}
}
...
...
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/Question/QuestionDetail/Cell/QuestionDescribeCell.m
View file @
76ece84e
...
...
@@ -72,6 +72,7 @@
for
(
int
i
=
0
;
i
<
count
;
i
++
)
{
UIImageView
*
imageView
=
[[
UIImageView
alloc
]
init
];
imageView
.
userInteractionEnabled
=
YES
;
imageView
.
tag
=
1115
+
i
;
imageView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
NSDictionary
*
imageDict
=
questionDetail
.
attachments
[
i
];
...
...
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/Question/QuestionDetail/Cell/QuestionDetailCell.m
View file @
76ece84e
...
...
@@ -32,7 +32,7 @@
{
_questionDetail
=
questionDetail
;
NSString
*
questionNameText
=
[
NSString
stringWithFormat
:
@"
问题名称
:%@"
,
questionDetail
.
title
];
NSString
*
questionNameText
=
[
NSString
stringWithFormat
:
@"
联系方式
:%@"
,
questionDetail
.
title
];
NSMutableAttributedString
*
questionNameAttr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
questionNameText
];
[
questionNameAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kDetailCellDescribeTextColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
15
.
0
f
]}
range
:
NSMakeRange
(
0
,
5
)];
[
questionNameAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kdetailCellTitleColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
15
.
0
f
]}
range
:
NSMakeRange
(
5
,
questionNameText
.
length
-
5
)];
...
...
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/Question/QuestionUnsolved/QuestionUnsolveTableViewCell.m
View file @
76ece84e
...
...
@@ -72,6 +72,7 @@
for
(
int
i
=
0
;
i
<
count
;
i
++
)
{
UIImageView
*
imageView
=
[[
UIImageView
alloc
]
init
];
imageView
.
userInteractionEnabled
=
YES
;
imageView
.
tag
=
1115
+
i
;
imageView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
NSDictionary
*
imageDict
=
questionDetail
.
attachments
[
i
];
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment