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
b6070a71
Commit
b6070a71
authored
Jun 07, 2016
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加部分 待解决问题界面
parent
2bbcf793
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
7985 additions
and
1623 deletions
+7985
-1623
project.pbxproj
Pods/Pods.xcodeproj/project.pbxproj
+6307
-1584
AFNetworking.xcscheme
...serdata/admin.xcuserdatad/xcschemes/AFNetworking.xcscheme
+1
-1
Pods.xcscheme
...proj/xcuserdata/admin.xcuserdatad/xcschemes/Pods.xcscheme
+1
-1
SDWebImage.xcscheme
...cuserdata/admin.xcuserdatad/xcschemes/SDWebImage.xcscheme
+1
-1
xcschememanagement.plist
...data/admin.xcuserdatad/xcschemes/xcschememanagement.plist
+1
-1
project.pbxproj
redstar.xcodeproj/project.pbxproj
+49
-5
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
Breakpoints_v2.xcbkptlist
...ta/admin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
+12
-0
Url.h
redstar/Classes/Macro/Url.h
+7
-2
PictureDetailModel.h
...Function/Picture/PictureDetail/Model/PictureDetailModel.h
+3
-0
PictureStoryViewController.m
...PictureDetail/ViewController/PictureStoryViewController.m
+180
-13
PictureViewController.m
...icture/PictureList/ViewController/PictureViewController.m
+0
-2
AddQuestionViewController.m
...on/AddQuestion/ViewController/AddQuestionViewController.m
+1
-2
QuestionDescribeCell.m
...ction/Question/QuestionDetail/Cell/QuestionDescribeCell.m
+1
-3
QuestionDetailViewController.m
...stionDetail/ViewController/QuestionDetailViewController.m
+0
-4
QuestionViewController.m
...tion/QuestionList/ViewController/QuestionViewController.m
+12
-2
FeedContentTableCell.h
...Function/Question/QuestionUnsolved/FeedContentTableCell.h
+19
-0
FeedContentTableCell.m
...Function/Question/QuestionUnsolved/FeedContentTableCell.m
+175
-0
QuestionDealWithView.h
...Function/Question/QuestionUnsolved/QuestionDealWithView.h
+24
-0
QuestionDealWithView.m
...Function/Question/QuestionUnsolved/QuestionDealWithView.m
+303
-0
QuestionUnsolveTableViewCell.h
.../Question/QuestionUnsolved/QuestionUnsolveTableViewCell.h
+27
-0
QuestionUnsolveTableViewCell.m
.../Question/QuestionUnsolved/QuestionUnsolveTableViewCell.m
+239
-0
QuestionUnsolvedViewController.h
...uestion/QuestionUnsolved/QuestionUnsolvedViewController.h
+14
-0
QuestionUnsolvedViewController.m
...uestion/QuestionUnsolved/QuestionUnsolvedViewController.m
+375
-0
SelectCategaryViewController.h
.../Question/QuestionUnsolved/SelectCategaryViewController.h
+13
-0
SelectCategaryViewController.m
.../Question/QuestionUnsolved/SelectCategaryViewController.m
+44
-0
SolvedTypeTableViewCell.h
...ction/Question/QuestionUnsolved/SolvedTypeTableViewCell.h
+16
-0
SolvedTypeTableViewCell.m
...ction/Question/QuestionUnsolved/SolvedTypeTableViewCell.m
+159
-0
SOPViewController.m
...n/Standar/SOPCategarys/ViewController/SOPViewController.m
+1
-2
No files found.
Pods/Pods.xcodeproj/project.pbxproj
View file @
b6070a71
This source diff could not be displayed because it is too large. You can
view the blob
instead.
Pods/Pods.xcodeproj/xcuserdata/admin.xcuserdatad/xcschemes/AFNetworking.xcscheme
View file @
b6070a71
...
...
@@ -14,7 +14,7 @@
buildForArchiving =
"YES"
>
<BuildableReference
BuildableIdentifier =
'primary'
BlueprintIdentifier =
'
0C53F649F1A05FD9C8FB8D0
2'
BlueprintIdentifier =
'
F0D6F5254AEB5A5F3FC87E8
2'
BlueprintName =
'AFNetworking'
ReferencedContainer =
'container:Pods.xcodeproj'
BuildableName =
'libAFNetworking.a'
>
...
...
Pods/Pods.xcodeproj/xcuserdata/admin.xcuserdatad/xcschemes/Pods.xcscheme
View file @
b6070a71
...
...
@@ -14,7 +14,7 @@
buildForArchiving =
"YES"
>
<BuildableReference
BuildableIdentifier =
'primary'
BlueprintIdentifier =
'
BD1CEEAD050E1221870570C
6'
BlueprintIdentifier =
'
C7097ABCC054B9A59BFFD0D
6'
BlueprintName =
'Pods'
ReferencedContainer =
'container:Pods.xcodeproj'
BuildableName =
'libPods.a'
>
...
...
Pods/Pods.xcodeproj/xcuserdata/admin.xcuserdatad/xcschemes/SDWebImage.xcscheme
View file @
b6070a71
...
...
@@ -14,7 +14,7 @@
buildForArchiving =
"YES"
>
<BuildableReference
BuildableIdentifier =
'primary'
BlueprintIdentifier =
'
5725883F33B542DF61F62914
'
BlueprintIdentifier =
'
1E0D2B730E9351B0483820F9
'
BlueprintName =
'SDWebImage'
ReferencedContainer =
'container:Pods.xcodeproj'
BuildableName =
'libSDWebImage.a'
>
...
...
Pods/Pods.xcodeproj/xcuserdata/admin.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
b6070a71
...
...
@@ -37,7 +37,7 @@
<
/
d
i
c
t
>
<
k
e
y
>
SuppressBuildableAutocreation
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
410B25DF16EA5C5B3E2698F74F9625FB
<
/k
e
y
>
<
k
e
y
>
2602F3D0DAC534568B6AD7EEA0DD1959
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
primary
<
/k
e
y
>
<
tru
e
/
>
...
...
redstar.xcodeproj/project.pbxproj
View file @
b6070a71
...
...
@@ -131,8 +131,14 @@
84AD4F3D1BF4894D00BFB37C
/* RankDetailView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84AD4F3C1BF4894D00BFB37C
/* RankDetailView.m */
;
};
84AD4F3F1BF498A900BFB37C
/* ranking.plist in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84AD4F3E1BF498A900BFB37C
/* ranking.plist */
;
};
84AD4F461BF4A9E800BFB37C
/* RankHeadView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84AD4F451BF4A9E800BFB37C
/* RankHeadView.m */
;
};
84B151EC1D05189A00CA55F8
/* SolvedTypeTableViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84B151EB1D05189A00CA55F8
/* SolvedTypeTableViewCell.m */
;
};
84B151EF1D05295900CA55F8
/* FeedContentTableCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84B151EE1D05295900CA55F8
/* FeedContentTableCell.m */
;
};
84B151F21D0584DE00CA55F8
/* SelectCategaryViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84B151F11D0584DE00CA55F8
/* SelectCategaryViewController.m */
;
};
84B4765A1C2E4B37006C6488
/* PicCategoryViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84B476591C2E4B37006C6488
/* PicCategoryViewController.m */
;
};
84BB16A21C191A7F00383A64
/* OnLineResultFootView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84BB16A11C191A7F00383A64
/* OnLineResultFootView.m */
;
};
84BF4BB01D02D5D800EFA455
/* QuestionUnsolvedViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84BF4BAF1D02D5D800EFA455
/* QuestionUnsolvedViewController.m */
;
};
84BF4BB31D02DB7C00EFA455
/* QuestionUnsolveTableViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84BF4BB21D02DB7C00EFA455
/* QuestionUnsolveTableViewCell.m */
;
};
84BF4BB61D03CBAF00EFA455
/* QuestionDealWithView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84BF4BB51D03CBAF00EFA455
/* QuestionDealWithView.m */
;
};
84C9574D1BDB344900083584
/* UIBarButtonItem+Create.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84C9574A1BDB344900083584
/* UIBarButtonItem+Create.m */
;
};
84C9574E1BDB344900083584
/* UIView+Frame.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84C9574C1BDB344900083584
/* UIView+Frame.m */
;
};
84C972961C1ABE08003A3276
/* PicScreenView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84C972951C1ABE08003A3276
/* PicScreenView.m */
;
};
...
...
@@ -460,10 +466,22 @@
84AD4F3E1BF498A900BFB37C
/* ranking.plist */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text.plist.xml
;
path
=
ranking.plist
;
sourceTree
=
"<group>"
;
};
84AD4F441BF4A9E800BFB37C
/* RankHeadView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
RankHeadView.h
;
sourceTree
=
"<group>"
;
};
84AD4F451BF4A9E800BFB37C
/* RankHeadView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
RankHeadView.m
;
sourceTree
=
"<group>"
;
};
84B151EA1D05189A00CA55F8
/* SolvedTypeTableViewCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
SolvedTypeTableViewCell.h
;
sourceTree
=
"<group>"
;
};
84B151EB1D05189A00CA55F8
/* SolvedTypeTableViewCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
SolvedTypeTableViewCell.m
;
sourceTree
=
"<group>"
;
};
84B151ED1D05295900CA55F8
/* FeedContentTableCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
FeedContentTableCell.h
;
sourceTree
=
"<group>"
;
};
84B151EE1D05295900CA55F8
/* FeedContentTableCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
FeedContentTableCell.m
;
sourceTree
=
"<group>"
;
};
84B151F01D0584DE00CA55F8
/* SelectCategaryViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
SelectCategaryViewController.h
;
sourceTree
=
"<group>"
;
};
84B151F11D0584DE00CA55F8
/* SelectCategaryViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
SelectCategaryViewController.m
;
sourceTree
=
"<group>"
;
};
84B476581C2E4B37006C6488
/* PicCategoryViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
PicCategoryViewController.h
;
sourceTree
=
"<group>"
;
};
84B476591C2E4B37006C6488
/* PicCategoryViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
PicCategoryViewController.m
;
sourceTree
=
"<group>"
;
};
84BB16A01C191A7F00383A64
/* OnLineResultFootView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
OnLineResultFootView.h
;
sourceTree
=
"<group>"
;
};
84BB16A11C191A7F00383A64
/* OnLineResultFootView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
OnLineResultFootView.m
;
sourceTree
=
"<group>"
;
};
84BF4BAE1D02D5D800EFA455
/* QuestionUnsolvedViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
QuestionUnsolvedViewController.h
;
sourceTree
=
"<group>"
;
};
84BF4BAF1D02D5D800EFA455
/* QuestionUnsolvedViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
QuestionUnsolvedViewController.m
;
sourceTree
=
"<group>"
;
};
84BF4BB11D02DB7C00EFA455
/* QuestionUnsolveTableViewCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
QuestionUnsolveTableViewCell.h
;
sourceTree
=
"<group>"
;
};
84BF4BB21D02DB7C00EFA455
/* QuestionUnsolveTableViewCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
QuestionUnsolveTableViewCell.m
;
sourceTree
=
"<group>"
;
};
84BF4BB41D03CBAF00EFA455
/* QuestionDealWithView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
QuestionDealWithView.h
;
sourceTree
=
"<group>"
;
};
84BF4BB51D03CBAF00EFA455
/* QuestionDealWithView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
QuestionDealWithView.m
;
sourceTree
=
"<group>"
;
};
84C957491BDB344900083584
/* UIBarButtonItem+Create.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
"UIBarButtonItem+Create.h"
;
sourceTree
=
"<group>"
;
};
84C9574A1BDB344900083584
/* UIBarButtonItem+Create.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
"UIBarButtonItem+Create.m"
;
sourceTree
=
"<group>"
;
};
84C9574B1BDB344900083584
/* UIView+Frame.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
"UIView+Frame.h"
;
sourceTree
=
"<group>"
;
};
...
...
@@ -829,6 +847,7 @@
8426A4AA1BDF0CD600E5FDF5
/* Question */
=
{
isa
=
PBXGroup
;
children
=
(
84BF4BAD1D02D5D800EFA455
/* QuestionUnsolved */
,
84F57C471BEC782D00DDEEB1
/* AddQuestion */
,
8474C5861BE78A85007DCF19
/* QuestionDetail */
,
8474C5891BE78A85007DCF19
/* QuestionList */
,
...
...
@@ -1813,6 +1832,25 @@
path
=
ViewController
;
sourceTree
=
"<group>"
;
};
84BF4BAD1D02D5D800EFA455
/* QuestionUnsolved */
=
{
isa
=
PBXGroup
;
children
=
(
84BF4BAE1D02D5D800EFA455
/* QuestionUnsolvedViewController.h */
,
84BF4BAF1D02D5D800EFA455
/* QuestionUnsolvedViewController.m */
,
84BF4BB11D02DB7C00EFA455
/* QuestionUnsolveTableViewCell.h */
,
84BF4BB21D02DB7C00EFA455
/* QuestionUnsolveTableViewCell.m */
,
84BF4BB41D03CBAF00EFA455
/* QuestionDealWithView.h */
,
84BF4BB51D03CBAF00EFA455
/* QuestionDealWithView.m */
,
84B151EA1D05189A00CA55F8
/* SolvedTypeTableViewCell.h */
,
84B151EB1D05189A00CA55F8
/* SolvedTypeTableViewCell.m */
,
84B151ED1D05295900CA55F8
/* FeedContentTableCell.h */
,
84B151EE1D05295900CA55F8
/* FeedContentTableCell.m */
,
84B151F01D0584DE00CA55F8
/* SelectCategaryViewController.h */
,
84B151F11D0584DE00CA55F8
/* SelectCategaryViewController.m */
,
);
path
=
QuestionUnsolved
;
sourceTree
=
"<group>"
;
};
84C582E91BDDFACD00AF838D
/* Cell */
=
{
isa
=
PBXGroup
;
children
=
(
...
...
@@ -2423,7 +2461,7 @@
TargetAttributes
=
{
84970DE91BD8DD8A00C1728A
=
{
CreatedOnToolsVersion
=
7.0.1
;
DevelopmentTeam
=
W54V2VB863
;
DevelopmentTeam
=
SVECB8P766
;
SystemCapabilities
=
{
com.apple.BackgroundModes
=
{
enabled
=
0
;
...
...
@@ -2580,6 +2618,7 @@
84CC34CC1C093C2F002F10E2
/* OnLineTableViewCell.m in Sources */
,
84945F1B1C2A6A6300C1793C
/* AboutMeViewController.m in Sources */
,
84E363D21BFAC5200061547E
/* TaskListModel.m in Sources */
,
84BF4BB31D02DB7C00EFA455
/* QuestionUnsolveTableViewCell.m in Sources */
,
84D2F5351C2D739700651EFB
/* RankScrollTableViewCell.m in Sources */
,
849221681C5A014A00827AAC
/* ReaderThumbRender.m in Sources */
,
84C9574E1BDB344900083584
/* UIView+Frame.m in Sources */
,
...
...
@@ -2594,6 +2633,7 @@
84D2F5361C2D739700651EFB
/* RankSectionTableCell.m in Sources */
,
8474A01C1BE368D700315F30
/* HomeCellItem.m in Sources */
,
8409BDFD1C281ACD00354460
/* TreeView.m in Sources */
,
84BF4BB01D02D5D800EFA455
/* QuestionUnsolvedViewController.m in Sources */
,
8409BDFB1C281ACD00354460
/* TreeNodeModel.m in Sources */
,
84D2F5171C2CD3D400651EFB
/* SOPViewController.m in Sources */
,
84CC34D11C093C5E002F10E2
/* LookOnLineViewController.m in Sources */
,
...
...
@@ -2650,6 +2690,7 @@
84AD4F2F1BF4370E00BFB37C
/* InspectHeaderView.m in Sources */
,
8480BEAC1C143A1600E2F18F
/* CategoryTableView.m in Sources */
,
849221691C5A014A00827AAC
/* ReaderThumbRequest.m in Sources */
,
84B151EC1D05189A00CA55F8
/* SolvedTypeTableViewCell.m in Sources */
,
8473E3881C1BBFF600960257
/* InspectTaskDetailCell.m in Sources */
,
84F57C9C1BECA73800DDEEB1
/* StarBar.m in Sources */
,
84F57C4C1BEC785E00DDEEB1
/* AddQuestionViewController.m in Sources */
,
...
...
@@ -2709,7 +2750,9 @@
8474C5991BE78BBC007DCF19
/* QuestionDetailCell.m in Sources */
,
8474C5911BE78A85007DCF19
/* QuestionListTableCell.m in Sources */
,
8490C4D71BF9DF1D006B6569
/* PictureStoryViewController.m in Sources */
,
84B151F21D0584DE00CA55F8
/* SelectCategaryViewController.m in Sources */
,
84D554EE1C0EDFB8006C9AD0
/* SearchViewController.m in Sources */
,
84BF4BB61D03CBAF00EFA455
/* QuestionDealWithView.m in Sources */
,
849F3F271C438A8300080F91
/* LargePictureViewController.m in Sources */
,
84A673C01C0C7AEB000F828E
/* FuncItem.m in Sources */
,
84F1669B1BE715E40061D350
/* ZanButton.m in Sources */
,
...
...
@@ -2720,6 +2763,7 @@
84A673C11C0C7AEB000F828E
/* AnnounceViewController.m in Sources */
,
8492216A1C5A014A00827AAC
/* ReaderThumbsView.m in Sources */
,
842547FC1BF03977006C79C5
/* QuestionModel.m in Sources */
,
84B151EF1D05295900CA55F8
/* FeedContentTableCell.m in Sources */
,
84E420441BE84A2300689976
/* QuestionCommentCell.m in Sources */
,
84D98D131C210F3300C7C96F
/* RankScreenTableViewCell.m in Sources */
,
);
...
...
@@ -2855,8 +2899,8 @@
baseConfigurationReference
=
6C6D8B0ECF8531E34D0DFF6B
/* Pods.debug.xcconfig */
;
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
CODE_SIGN_IDENTITY
=
"iPhone Developer
: Fanfan Cui (7S27LB84E2)
"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer
: Fanfan Cui (7S27LB84E2)
"
;
CODE_SIGN_IDENTITY
=
"iPhone Developer"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
ENABLE_BITCODE
=
NO
;
GCC_PREFIX_HEADER
=
"$(SRCROOT)/redstar/redstar.pch"
;
INFOPLIST_FILE
=
redstar/Info.plist
;
...
...
@@ -2877,8 +2921,8 @@
baseConfigurationReference
=
13B0DDED3E0E584D79B395CF
/* Pods.release.xcconfig */
;
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
CODE_SIGN_IDENTITY
=
"iPhone D
istribution: Shanghai Gomore Information Technology Co.,Ltd
"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone D
istribution: Shanghai Gomore Information Technology Co.,Ltd
"
;
CODE_SIGN_IDENTITY
=
"iPhone D
eveloper
"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone D
eveloper
"
;
ENABLE_BITCODE
=
NO
;
GCC_PREFIX_HEADER
=
"$(SRCROOT)/redstar/redstar.pch"
;
INFOPLIST_FILE
=
redstar/Info.plist
;
...
...
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
b6070a71
No preview for this file type
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
View file @
b6070a71
...
...
@@ -2,4 +2,16 @@
<Bucket
type =
"0"
version =
"2.0"
>
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.ExceptionBreakpoint"
>
<BreakpointContent
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
scope =
"0"
stopOnStyle =
"0"
>
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
redstar/Classes/Macro/Url.h
View file @
b6070a71
...
...
@@ -10,10 +10,10 @@
#define Url_h
// url 测试环境
//
#define kRedStarURL @"http://218.244.151.129:7580/"
#define kRedStarURL @"http://218.244.151.129:7580/"
// 最新正式环境
#define kRedStarURL @"http://219.235.234.212:7580/"
//
#define kRedStarURL @"http://219.235.234.212:7580/"
// 检查更新
#define kCheckUpdateURL @"redstar-server/rest/ipapk?type=ipa"
...
...
@@ -120,4 +120,9 @@
// 口碑标注附件列表
#define kGetAttachmentsURL @"redstar-server/rest/standardpraise/get_attachments"
// 提交问题处理结果
// redstar-server/rest/question/resolve?time={time}&operId={operId}&operName={operName}
#define kSubmitQuestionResultURL @"redstar-server/rest/question/resolve?time="
#endif
/* Url_h */
redstar/Classes/Module/Function/Picture/PictureDetail/Model/PictureDetailModel.h
View file @
b6070a71
...
...
@@ -35,4 +35,7 @@
@property
(
nonatomic
,
copy
)
NSString
*
title
;
@property
(
nonatomic
,
copy
)
NSString
*
uuid
;
@property
(
nonatomic
,
copy
)
NSString
*
version
;
@property
(
nonatomic
,
copy
)
NSArray
*
referAttachments
;
@end
redstar/Classes/Module/Function/Picture/PictureDetail/ViewController/PictureStoryViewController.m
View file @
b6070a71
...
...
@@ -28,11 +28,16 @@
#import <UIButton+WebCache.h>
#import <SDWebImageDownloader.h>
#import "AttachmentTableViewCell.h"
#import "AttachmentModel.h"
#import "ReaderViewController.h"
#define kPictureDetailTableCell @"PictureDetailTableViewCell"
#define kPictureTextTableCell @"PictureTextTableViewCell"
#define kPictureCommentTableCell @"pictureCommentTableViewCell"
#define kPictureTextTableViewCell @"pictureTextTAbleTableCell"
@interface
PictureStoryViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
UITextViewDelegate
,
SDWebImageManagerDelegate
>
#define kAttachmentTableViwCell @"kattachmentTableViwCell"
@interface
PictureStoryViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
UITextViewDelegate
,
SDWebImageManagerDelegate
,
ReaderViewControllerDelegate
>
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
assign
)
int
clickNumber
;
@property
(
nonatomic
,
strong
)
UIView
*
backGroundView
;
...
...
@@ -47,7 +52,7 @@
@property
(
nonatomic
,
strong
)
NSMutableArray
*
imageNameArray
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
realImageArray
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
attachmentArray
;
@end
@implementation
PictureStoryViewController
...
...
@@ -63,9 +68,11 @@
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
attachmentArray
=
[
NSMutableArray
array
];
self
.
picTextArray
=
[
NSMutableArray
array
];
self
.
realImageArray
=
[
NSMutableArray
array
];
self
.
view
.
backgroundColor
=
[
UIColor
whiteColor
];
self
.
automaticallyAdjustsScrollViewInsets
=
NO
;
self
.
edgesForExtendedLayout
=
UIRectEdgeNone
;
...
...
@@ -94,11 +101,22 @@
[
http
getPicturePraiseDetailWithCompletion
:
^
(
id
response
,
NSError
*
error
)
{
NSDictionary
*
dataDict
=
response
[
@"data"
];
NSLog
(
@"巡店报告 = %@"
,
dataDict
);
PictureDetailModel
*
picDetail
=
[[
PictureDetailModel
alloc
]
init
];
[
picDetail
setValuesForKeysWithDictionary
:
dataDict
];
_pictureDetail
=
picDetail
;
_pictureUuid
=
picDetail
.
uuid
;
NSArray
*
referArray
=
picDetail
.
referAttachments
;
NSMutableArray
*
attaTempArray
=
[
NSMutableArray
array
];
for
(
NSDictionary
*
attaDict
in
referArray
)
{
AttachmentModel
*
atta
=
[[
AttachmentModel
alloc
]
init
];
[
atta
setValuesForKeysWithDictionary
:
attaDict
];
[
attaTempArray
addObject
:
atta
];
}
_attachmentArray
=
attaTempArray
;
NSArray
*
commentArray
=
picDetail
.
comments
;
for
(
NSDictionary
*
dict
in
commentArray
)
{
CommentModel
*
comment
=
[[
CommentModel
alloc
]
init
];
...
...
@@ -288,8 +306,6 @@
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"您没有添加评论的权限!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
[
alert
show
];
}
}
...
...
@@ -344,7 +360,11 @@
#pragma mark - UITableView DataSource/Delegate
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
{
return
3
;
if
([
self
.
titleStr
isEqualToString
:
@"巡店报告"
])
{
return
4
;
}
else
{
return
3
;
}
}
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
...
...
@@ -354,6 +374,13 @@
}
else
if
(
section
==
1
)
{
return
_picTextArray
.
count
;
}
else
{
if
([
self
.
titleStr
isEqualToString
:
@"巡店报告"
])
{
if
(
section
==
2
)
{
return
_attachmentArray
.
count
;
}
else
{
return
_allCommentArray
.
count
;
}
}
return
_allCommentArray
.
count
;
}
}
...
...
@@ -435,14 +462,154 @@
return
cell
;
}
}
else
{
// 评论
PictureCommentTableCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kPictureCommentTableCell
];
if
(
!
cell
)
{
cell
=
[[
PictureCommentTableCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kPictureCommentTableCell
];
// 判断当前页面是否为 巡店报告
if
([
self
.
titleStr
isEqualToString
:
@"巡店报告"
])
{
// 是 巡店报告
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
{
// 评论
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
.
comment
=
_allCommentArray
[
indexPath
.
row
];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
return
cell
;
}
}
-
(
void
)
showFile
:
(
UIButton
*
)
sender
{
NSInteger
row
=
sender
.
tag
-
998473
;
AttachmentModel
*
atta
=
_attachmentArray
[
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
])
{
NSString
*
phrase
=
nil
;
// Document password (for unlocking most encrypted PDF files)
ReaderDocument
*
document
=
[
ReaderDocument
withDocumentFilePath
:
url
password
:
phrase
];
if
(
document
!=
nil
)
// Must have a valid ReaderDocument object in order to proceed with things
{
ReaderViewController
*
readerViewController
=
[[
ReaderViewController
alloc
]
initWithReaderDocument
:
document
];
readerViewController
.
delegate
=
self
;
// Set the ReaderViewController delegate to self
[
self
.
navigationController
pushViewController
:
readerViewController
animated
:
YES
];
}
}
else
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"文件不存在,请先下载在查看!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
[
alert
show
];
}
}
-
(
void
)
downloadFile
:
(
UIButton
*
)
sender
{
NSInteger
row
=
sender
.
tag
-
998473
;
AttachmentModel
*
atta
=
_attachmentArray
[
row
];
NSArray
*
paths
=
NSSearchPathForDirectoriesInDomains
(
NSDocumentDirectory
,
NSUserDomainMask
,
YES
);
NSString
*
path
=
paths
.
lastObject
;
NSString
*
fileName
=
[
NSString
stringWithFormat
:
@"%@"
,
atta
.
fileName
];
[
self
downloadFileURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
atta
.
fileUrl
]
savePath
:
path
fileName
:
fileName
];
}
-
(
void
)
downloadFileURL
:
(
NSString
*
)
aUrl
savePath
:
(
NSString
*
)
aSavePath
fileName
:
(
NSString
*
)
aFileName
{
NSFileManager
*
fileManager
=
[
NSFileManager
defaultManager
];
//检查本地文件是否已存在
NSString
*
fileName
=
[
NSString
stringWithFormat
:
@"%@/%@"
,
aSavePath
,
aFileName
];
//检查附件是否存在
if
([
fileManager
fileExistsAtPath
:
fileName
])
{
}
else
{
//创建附件存储目录
if
(
!
[
fileManager
fileExistsAtPath
:
aSavePath
])
{
[
fileManager
createDirectoryAtPath
:
aSavePath
withIntermediateDirectories
:
YES
attributes
:
nil
error
:
nil
];
}
//下载附件
aUrl
=
[
aUrl
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
];
NSLog
(
@"uri ==%@"
,
aUrl
);
NSURL
*
url
=
[[
NSURL
alloc
]
initWithString
:
aUrl
];
NSURLRequest
*
request
=
[
NSURLRequest
requestWithURL
:
url
];
AFHTTPRequestOperation
*
operation
=
[[
AFHTTPRequestOperation
alloc
]
initWithRequest
:
request
];
operation
.
inputStream
=
[
NSInputStream
inputStreamWithURL
:
url
];
operation
.
outputStream
=
[
NSOutputStream
outputStreamToFileAtPath
:
fileName
append
:
NO
];
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
// 已完成下载
[
operation
setCompletionBlockWithSuccess
:
^
(
AFHTTPRequestOperation
*
operation
,
id
responseObject
)
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"下载成功!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
alert
.
tag
=
66690
;
[
alert
show
];
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
[
self
.
tableView
reloadData
];
}
failure
:
^
(
AFHTTPRequestOperation
*
operation
,
NSError
*
error
)
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"警告"
message
:
@"下载失败!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
[
alert
show
];
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
[
self
.
tableView
reloadData
];
}];
[
operation
start
];
}
}
...
...
redstar/Classes/Module/Function/Picture/PictureList/ViewController/PictureViewController.m
View file @
b6070a71
...
...
@@ -104,10 +104,8 @@
UIButton
*
backBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
backBtn
.
frame
=
CGRectMake
(
0
,
0
,
30
,
44
);
[
backBtn
setImage
:[
UIImage
imageNamed
:
@"back_btn"
]
forState
:
UIControlStateNormal
];
[
backBtn
addTarget
:
self
action
:
@selector
(
doBack
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
UIBarButtonItem
*
backItem
=
[[
UIBarButtonItem
alloc
]
initWithCustomView
:
backBtn
];
self
.
navigationItem
.
leftBarButtonItem
=
backItem
;
}
...
...
redstar/Classes/Module/Function/Question/AddQuestion/ViewController/AddQuestionViewController.m
View file @
b6070a71
...
...
@@ -366,8 +366,7 @@
if
(
range
.
location
>=
500
)
{
return
NO
;
}
else
{
}
else
{
return
YES
;
}
...
...
redstar/Classes/Module/Function/Question/QuestionDetail/Cell/QuestionDescribeCell.m
View file @
b6070a71
...
...
@@ -315,9 +315,7 @@
// 高度
NSLayoutConstraint
*
titleBootom
=
[
NSLayoutConstraint
constraintWithItem
:
_feedbackBackView
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:-
15
];
[
self
.
contentView
addConstraint
:
titleBootom
];
}
return
_feedbackBackView
;
}
...
...
redstar/Classes/Module/Function/Question/QuestionDetail/ViewController/QuestionDetailViewController.m
View file @
b6070a71
...
...
@@ -179,12 +179,8 @@
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"您没有添加评论的权限!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
[
alert
show
];
}
}
// 提交评论
-
(
void
)
submitComment
:
(
UIButton
*
)
sender
{
...
...
redstar/Classes/Module/Function/Question/QuestionList/ViewController/QuestionViewController.m
View file @
b6070a71
...
...
@@ -24,6 +24,8 @@
#import "UIImage+Fit.h"
#import <MJRefresh.h>
#import "QuestionUnsolvedViewController.h"
#define kQuestionListCell @"questionListTableViewCell"
#define kThumbTag 745645
...
...
@@ -594,6 +596,7 @@
}
else
{
[
parameters
setObject
:
@"aborted"
forKey
:
@"state"
];
}
NSArray
*
array
=
@[@{
@"field"
:
@"state"
,
@"direction"
:
@"asc"
}];
[
parameters
setObject
:
array
forKey
:
@"queryOrders"
];
...
...
@@ -643,10 +646,11 @@
@"direction"
:
@"asc"
}];
[
parameters
setObject
:
array
forKey
:
@"queryOrders"
];
}
NSLog
(
@"问题与知识parameters = %@"
,
parameters
);
// 请求问题列表
[
httpClient
getQuestionListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSDictionary
*
dataDict
=
(
NSDictionary
*
)
response
[
@"data"
];
NSLog
(
@"问题与知识 = %@"
,
dataDict
);
NSDictionary
*
recordsDict
=
(
NSDictionary
*
)
dataDict
[
@"records"
];
NSMutableArray
*
tempArray
=
[
NSMutableArray
array
];
for
(
NSDictionary
*
questionDict
in
recordsDict
)
{
...
...
@@ -818,7 +822,13 @@
// cell点击事件
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
QuestionDetailViewController
*
questionDetailVC
=
[[
QuestionDetailViewController
alloc
]
init
];
// QuestionDetailViewController *questionDetailVC = [[QuestionDetailViewController alloc] init];
// QuestionModel *question = (QuestionModel *)_allQuestionArray[indexPath.row];
// questionDetailVC.questionUuid = question.uuid;
// questionDetailVC.row = indexPath.row;
// [self.navigationController pushViewController:questionDetailVC animated:YES];
QuestionUnsolvedViewController
*
questionDetailVC
=
[[
QuestionUnsolvedViewController
alloc
]
init
];
QuestionModel
*
question
=
(
QuestionModel
*
)
_allQuestionArray
[
indexPath
.
row
];
questionDetailVC
.
questionUuid
=
question
.
uuid
;
questionDetailVC
.
row
=
indexPath
.
row
;
...
...
redstar/Classes/Module/Function/Question/QuestionUnsolved/FeedContentTableCell.h
0 → 100644
View file @
b6070a71
//
// FeedContentTableCell.h
// redstar
//
// Created by admin on 16/6/6.
// Copyright © 2016年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
FeedContentTableCell
:
UITableViewCell
@property
(
nonatomic
,
strong
)
UILabel
*
titleLabel
;
@property
(
nonatomic
,
strong
)
UIImageView
*
backImageView1
;
@property
(
nonatomic
,
strong
)
UITextView
*
titleTextView
;
@property
(
nonatomic
,
strong
)
UILabel
*
placeholderLabel1
;
@property
(
nonatomic
,
strong
)
UIButton
*
changeBtn
;
// 修改问题分类
@property
(
nonatomic
,
strong
)
UIButton
*
solveBtn
;
// 解决问题
@end
redstar/Classes/Module/Function/Question/QuestionUnsolved/FeedContentTableCell.m
0 → 100644
View file @
b6070a71
//
// FeedContentTableCell.m
// redstar
//
// Created by admin on 16/6/6.
// Copyright © 2016年 ZWF. All rights reserved.
//
#import "FeedContentTableCell.h"
@implementation
FeedContentTableCell
-
(
UILabel
*
)
titleLabel
{
if
(
!
_titleLabel
)
{
_titleLabel
=
[[
UILabel
alloc
]
init
];
}
_titleLabel
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
17
.
0
];
_titleLabel
.
textColor
=
kdetailCellTitleColor
;
[
self
.
contentView
addSubview
:
_titleLabel
];
// 顶端
NSLayoutConstraint
*
titleTop
=
[
NSLayoutConstraint
constraintWithItem
:
_titleLabel
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
5
];
[
self
.
contentView
addConstraint
:
titleTop
];
// 左边
NSLayoutConstraint
*
titleLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_titleLabel
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
17
];
[
self
.
contentView
addConstraint
:
titleLeft
];
// 右边
NSLayoutConstraint
*
titleWidth
=
[
NSLayoutConstraint
constraintWithItem
:
_titleLabel
attribute
:
NSLayoutAttributeWidth
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
80
];
[
self
.
contentView
addConstraint
:
titleWidth
];
// 高度
NSLayoutConstraint
*
titleHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_titleLabel
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
40
];
[
self
.
contentView
addConstraint
:
titleHeight
];
return
_titleLabel
;
}
-
(
UIImageView
*
)
backImageView1
{
if
(
!
_backImageView1
)
{
_backImageView1
=
[[
UIImageView
alloc
]
init
];
_backImageView1
.
userInteractionEnabled
=
YES
;
_backImageView1
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
.
contentView
addSubview
:
_backImageView1
];
NSLayoutConstraint
*
contentTop
=
[
NSLayoutConstraint
constraintWithItem
:
_backImageView1
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
15
];
[
self
.
contentView
addConstraint
:
contentTop
];
NSLayoutConstraint
*
contentLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_backImageView1
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
titleLabel
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
5
];
[
self
.
contentView
addConstraint
:
contentLeft
];
NSLayoutConstraint
*
contentRight
=
[
NSLayoutConstraint
constraintWithItem
:
_backImageView1
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:-
20
];
[
self
.
contentView
addConstraint
:
contentRight
];
NSLayoutConstraint
*
contentHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_backImageView1
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
120
];
[
self
.
contentView
addConstraint
:
contentHeight
];
}
return
_backImageView1
;
}
-
(
UITextView
*
)
titleTextView
{
if
(
!
_titleTextView
)
{
_titleTextView
=
[[
UITextView
alloc
]
init
];
_titleTextView
.
tag
=
1001
;
_titleTextView
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
_titleTextView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
.
backImageView1
addSubview
:
_titleTextView
];
NSLayoutConstraint
*
contentTop
=
[
NSLayoutConstraint
constraintWithItem
:
_titleTextView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
backImageView1
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
1
];
[
self
.
backImageView1
addConstraint
:
contentTop
];
NSLayoutConstraint
*
contentLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_titleTextView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
backImageView1
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
1
];
[
self
.
backImageView1
addConstraint
:
contentLeft
];
NSLayoutConstraint
*
contentRight
=
[
NSLayoutConstraint
constraintWithItem
:
_titleTextView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
backImageView1
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:-
1
];
[
self
.
backImageView1
addConstraint
:
contentRight
];
NSLayoutConstraint
*
contentHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_titleTextView
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
backImageView1
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:-
1
];
[
self
.
backImageView1
addConstraint
:
contentHeight
];
}
return
_titleTextView
;
}
-
(
UILabel
*
)
placeholderLabel1
{
if
(
!
_placeholderLabel1
)
{
_placeholderLabel1
=
[[
UILabel
alloc
]
init
];
_placeholderLabel1
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_placeholderLabel1
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
_placeholderLabel1
.
textColor
=
kOnLineCellDetailColor
;
[
self
.
titleTextView
addSubview
:
_placeholderLabel1
];
NSLayoutConstraint
*
contentTop
=
[
NSLayoutConstraint
constraintWithItem
:
_placeholderLabel1
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
titleTextView
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
2
];
[
self
.
titleTextView
addConstraint
:
contentTop
];
NSLayoutConstraint
*
contentLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_placeholderLabel1
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
titleTextView
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
5
];
[
self
.
titleTextView
addConstraint
:
contentLeft
];
NSLayoutConstraint
*
contentRight
=
[
NSLayoutConstraint
constraintWithItem
:
_placeholderLabel1
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
titleTextView
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
self
.
titleTextView
addConstraint
:
contentRight
];
NSLayoutConstraint
*
contentHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_placeholderLabel1
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
30
];
[
self
.
titleTextView
addConstraint
:
contentHeight
];
}
return
_placeholderLabel1
;
}
-
(
UIButton
*
)
changeBtn
{
if
(
!
_changeBtn
)
{
_changeBtn
=
[[
UIButton
alloc
]
init
];
}
_changeBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_changeBtn
.
backgroundColor
=
kNavigationBarColor
;
[
_changeBtn
setTitle
:
@"修改问题分类"
forState
:
UIControlStateNormal
];
_changeBtn
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
18
.
0
];
_changeBtn
.
layer
.
cornerRadius
=
3
;
[
self
.
contentView
addSubview
:
_changeBtn
];
// 顶端
NSLayoutConstraint
*
titleTop
=
[
NSLayoutConstraint
constraintWithItem
:
_changeBtn
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
backImageView1
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
18
];
[
self
.
contentView
addConstraint
:
titleTop
];
// 左边
NSLayoutConstraint
*
titleLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_changeBtn
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
20
];
[
self
.
contentView
addConstraint
:
titleLeft
];
// 右边
NSLayoutConstraint
*
titleRight
=
[
NSLayoutConstraint
constraintWithItem
:
_changeBtn
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeCenterX
multiplier
:
1
.
0
constant
:-
15
];
[
self
.
contentView
addConstraint
:
titleRight
];
// 高度
NSLayoutConstraint
*
titleHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_changeBtn
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
45
];
[
self
.
contentView
addConstraint
:
titleHeight
];
return
_changeBtn
;
}
-
(
UIButton
*
)
solveBtn
{
if
(
!
_solveBtn
)
{
_solveBtn
=
[[
UIButton
alloc
]
init
];
}
_solveBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_solveBtn
.
backgroundColor
=
kNavigationBarColor
;
_solveBtn
.
layer
.
cornerRadius
=
3
;
[
_solveBtn
setTitle
:
@"解决问题"
forState
:
UIControlStateNormal
];
_solveBtn
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
18
.
0
];
[
self
.
contentView
addSubview
:
_solveBtn
];
// 顶端
NSLayoutConstraint
*
titleTop
=
[
NSLayoutConstraint
constraintWithItem
:
_solveBtn
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
backImageView1
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
18
];
[
self
.
contentView
addConstraint
:
titleTop
];
// 左边
NSLayoutConstraint
*
titleRight
=
[
NSLayoutConstraint
constraintWithItem
:
_solveBtn
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:-
20
];
[
self
.
contentView
addConstraint
:
titleRight
];
// 右边
NSLayoutConstraint
*
titleLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_solveBtn
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeCenterX
multiplier
:
1
.
0
constant
:
15
];
[
self
.
contentView
addConstraint
:
titleLeft
];
// 高度
NSLayoutConstraint
*
titleHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_solveBtn
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
45
];
[
self
.
contentView
addConstraint
:
titleHeight
];
return
_solveBtn
;
}
@end
redstar/Classes/Module/Function/Question/QuestionUnsolved/QuestionDealWithView.h
0 → 100644
View file @
b6070a71
//
// QuestionDealWithView.h
// redstar
//
// Created by admin on 16/6/5.
// Copyright © 2016年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@protocol
QuestionDealWithDelegate
<
NSObject
>
-
(
void
)
tableDidSelectAtIndexPath
:
(
NSIndexPath
*
)
indexPath
;
@end
@interface
QuestionDealWithView
:
UIView
@property
(
nonatomic
,
strong
)
UILabel
*
titleLabel
;
@property
(
nonatomic
,
strong
)
UIButton
*
quitBtn
;
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
assign
)
id
<
QuestionDealWithDelegate
>
delegate
;
@end
redstar/Classes/Module/Function/Question/QuestionUnsolved/QuestionDealWithView.m
0 → 100644
View file @
b6070a71
//
// QuestionDealWithView.m
// redstar
//
// Created by admin on 16/6/5.
// Copyright © 2016年 ZWF. All rights reserved.
//
#import "QuestionDealWithView.h"
#import "SolvedTypeTableViewCell.h"
#import "FeedContentTableCell.h"
#import "HttpClient.h"
#import <MBProgressHUD.h>
#define kSolvedTypeTableViewCell @"solveTypeTableCell"
#define kFeedContentTableCell @"feedContentTableCell"
@interface
QuestionDealWithView
()
<
UITableViewDelegate
,
UITableViewDataSource
>
@property
(
nonatomic
,
strong
)
UIButton
*
selectButton
;
@end
@implementation
QuestionDealWithView
-
(
instancetype
)
init
{
self
=
[
super
init
];
if
(
self
)
{
[
self
setup
];
}
return
self
;
}
-
(
instancetype
)
initWithFrame
:
(
CGRect
)
frame
{
self
=
[
super
initWithFrame
:
frame
];
if
(
self
)
{
[
self
setup
];
}
return
self
;
}
#pragma mark - Private Methods
-
(
void
)
setup
{
self
.
titleLabel
.
text
=
@"问题处理"
;
self
.
tableView
.
backgroundColor
=
[
UIColor
whiteColor
];
_selectButton
=
[[
UIButton
alloc
]
init
];
_selectButton
.
tag
=
323118
;
// [self requestGroupTitle];
}
// 请求问题专业组
//- (void)requestGroupTitle
//{
// HttpClient *httpClient = [[HttpClient alloc] initWithUrl:[NSString stringWithFormat:@"%@%@", kRedStarURL, kQuestionGroupURL]];
// [MBProgressHUD showHUDAddedTo:self animated:YES];
// [httpClient getQuestionGroupWithCompletion:^(id response, NSError *error) {
// NSDictionary *dataDict = response[@"data"];
// NSArray *dataArray = dataDict[@"records"];
// NSMutableDictionary *dict = [NSMutableDictionary dictionary];
// NSMutableArray *nameArray = [NSMutableArray array];
// for (NSDictionary *groupDict in dataArray) {
// NSString *name = [NSString stringWithFormat:@"%@", groupDict[@"name"]];
// NSString *groupUuid = [NSString stringWithFormat:@"%@", groupDict[@"uuid"]];
// [dict setObject:groupUuid forKey:name];
// [nameArray addObject:name];
// }
// _groupUuidDict = dict;
// _categoryArray = nameArray;
// _isComplete = YES;
//
// if (nameArray.count != 0) {
// NSString *nameStr = [NSString stringWithFormat:@"%@", nameArray[0]];
// [self requestCategoryWithGroupUuid:[dict objectForKey:nameStr]];
// }
// [MBProgressHUD hideAllHUDsForView:self animated:YES];
//
// [self.tableView reloadData];
// }];
//}
//
//- (void)requestCategoryWithGroupUuid:(NSString *)groupUuid
//{
// NSString *url = [NSString stringWithFormat:@"%@%@%@",kRedStarURL, kQuestionCategoryURL, groupUuid];
// url = [url stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
// HttpClient *http = [[HttpClient alloc] initWithUrl:url];
// [MBProgressHUD showHUDAddedTo:self animated:YES];
// [http getQuestionCategoryWithCompletion:^(id response, NSError *error) {
// NSDictionary *dictData = response[@"data"];
// NSArray *array = dictData[@"records"];
// NSMutableArray *categoryArray = [NSMutableArray array];
// for (NSDictionary *dict in array) {
// NSString *category = [NSString stringWithFormat:@"%@", dict[@"name"]];
// [categoryArray addObject:category];
// }
// _questionArray = categoryArray;
// _isLoad = YES;
// [MBProgressHUD hideAllHUDsForView:self animated:YES];
// [self.tableView reloadData];
// }];
//}
#pragma mark - lazy loading
-
(
UILabel
*
)
titleLabel
{
if
(
!
_titleLabel
)
{
_titleLabel
=
[[
UILabel
alloc
]
init
];
_titleLabel
.
userInteractionEnabled
=
YES
;
_titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
18
.
0
];
_titleLabel
.
textColor
=
kLightBlack
;
_titleLabel
.
textAlignment
=
NSTextAlignmentCenter
;
_titleLabel
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_titleLabel
.
backgroundColor
=
kSectionBackGroundColor
;
[
self
addSubview
:
_titleLabel
];
// 顶端
NSLayoutConstraint
*
titleTop
=
[
NSLayoutConstraint
constraintWithItem
:
_titleLabel
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
[
self
addConstraint
:
titleTop
];
// 左边
NSLayoutConstraint
*
titleLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_titleLabel
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
addConstraint
:
titleLeft
];
// 右边
NSLayoutConstraint
*
titleRight
=
[
NSLayoutConstraint
constraintWithItem
:
_titleLabel
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
self
addConstraint
:
titleRight
];
// 右边
NSLayoutConstraint
*
titleHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_titleLabel
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
47
];
[
self
addConstraint
:
titleHeight
];
}
return
_titleLabel
;
}
-
(
UIButton
*
)
quitBtn
{
if
(
!
_quitBtn
)
{
_quitBtn
=
[[
UIButton
alloc
]
init
];
_quitBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
_quitBtn
setImage
:[
UIImage
imageNamed
:
@"close"
]
forState
:
UIControlStateNormal
];
[
self
addSubview
:
_quitBtn
];
[
self
insertSubview
:
_quitBtn
aboveSubview
:
_titleLabel
];
// 顶端
NSLayoutConstraint
*
titleTop
=
[
NSLayoutConstraint
constraintWithItem
:
_quitBtn
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
[
self
addConstraint
:
titleTop
];
// 左边
NSLayoutConstraint
*
titleWidth
=
[
NSLayoutConstraint
constraintWithItem
:
_quitBtn
attribute
:
NSLayoutAttributeWidth
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
47
];
[
self
addConstraint
:
titleWidth
];
// 右边
NSLayoutConstraint
*
titleRight
=
[
NSLayoutConstraint
constraintWithItem
:
_quitBtn
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
self
addConstraint
:
titleRight
];
// 右边
NSLayoutConstraint
*
titleHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_quitBtn
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
47
];
[
self
addConstraint
:
titleHeight
];
}
return
_quitBtn
;
}
-
(
UITableView
*
)
tableView
{
if
(
!
_tableView
)
{
_tableView
=
[[
UITableView
alloc
]
init
];
}
_tableView
.
delegate
=
self
;
_tableView
.
dataSource
=
self
;
_tableView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
addSubview
:
_tableView
];
// 顶端
NSLayoutConstraint
*
titleTop
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
titleLabel
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
[
self
addConstraint
:
titleTop
];
// 左边
NSLayoutConstraint
*
titleLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
addConstraint
:
titleLeft
];
// 右边
NSLayoutConstraint
*
titleRight
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
self
addConstraint
:
titleRight
];
// 右边
NSLayoutConstraint
*
titleBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
[
self
addConstraint
:
titleBottom
];
return
_tableView
;
}
#pragma mark - UITableView Delegate/DataSource
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
return
4
;
}
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
if
(
indexPath
.
row
<
2
)
{
UITableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"groupAndCategaryCell"
];
if
(
!
cell
)
{
cell
=
[[
UITableViewCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
@"groupAndCategaryCell"
];
}
cell
.
accessoryType
=
UITableViewCellAccessoryDisclosureIndicator
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
cell
.
textLabel
.
font
=
[
UIFont
systemFontOfSize
:
17
.
0
];
cell
.
textLabel
.
textColor
=
kdetailCellTitleColor
;
if
(
indexPath
.
row
==
0
)
{
cell
.
textLabel
.
text
=
@"专业组"
;
}
else
{
cell
.
textLabel
.
text
=
@"问题分类"
;
}
return
cell
;
}
else
if
(
indexPath
.
row
==
2
)
{
SolvedTypeTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kSolvedTypeTableViewCell
];
if
(
!
cell
)
{
cell
=
[[
SolvedTypeTableViewCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kSolvedTypeTableViewCell
];
}
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
cell
.
titleLabel
.
text
=
@"解决办法"
;
[
cell
.
quesBtn
addTarget
:
self
action
:
@selector
(
solveQues
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
cell
.
FAQBtn
addTarget
:
self
action
:
@selector
(
solveQues
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
cell
.
SOPBtn
addTarget
:
self
action
:
@selector
(
solveQues
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
return
cell
;
}
else
{
FeedContentTableCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kFeedContentTableCell
];
if
(
!
cell
)
{
cell
=
[[
FeedContentTableCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kFeedContentTableCell
];
}
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
cell
.
titleLabel
.
text
=
@"反馈信息"
;
UIImage
*
image
=
[
UIImage
imageNamed
:
@"textbox"
];
UIImage
*
resizingName
=
[
image
resizableImageWithCapInsets
:
UIEdgeInsetsMake
(
1
,
1
,
24
,
24
)
resizingMode
:
UIImageResizingModeStretch
];
cell
.
backImageView1
.
image
=
resizingName
;
cell
.
titleTextView
.
backgroundColor
=
[
UIColor
clearColor
];
cell
.
placeholderLabel1
.
text
=
@"请输入反馈内容..."
;
[
cell
.
changeBtn
addTarget
:
self
action
:
@selector
(
changeClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
cell
.
solveBtn
addTarget
:
self
action
:
@selector
(
solveClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
return
cell
;
}
}
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
if
([
_delegate
respondsToSelector
:
@selector
(
tableDidSelectAtIndexPath
:)])
{
[
_delegate
tableDidSelectAtIndexPath
:
indexPath
];
}
}
-
(
void
)
solveQues
:
(
UIButton
*
)
sender
{
_selectButton
.
selected
=
NO
;
sender
.
selected
=
YES
;
_selectButton
=
(
UIButton
*
)
sender
;
[
self
.
tableView
reloadData
];
}
-
(
void
)
changeClick
:
(
UIButton
*
)
sender
{
}
-
(
void
)
solveClick
:
(
UIButton
*
)
sender
{
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
if
(
indexPath
.
row
<
2
)
{
return
50
;
}
else
if
(
indexPath
.
row
==
2
)
{
return
88
;
}
else
{
return
218
;
}
}
// section高度
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForHeaderInSection
:
(
NSInteger
)
section
{
return
CGFLOAT_MIN
;
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForFooterInSection
:
(
NSInteger
)
section
{
return
CGFLOAT_MIN
;
}
@end
redstar/Classes/Module/Function/Question/QuestionUnsolved/QuestionUnsolveTableViewCell.h
0 → 100644
View file @
b6070a71
//
// QuestionUnsolveTableViewCell.h
// redstar
//
// Created by admin on 16/6/4.
// Copyright © 2016年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "QuestionDetailModel.h"
@protocol
QuestionUnsolveDelegate
<
NSObject
>
-
(
void
)
showPicture
:
(
UITapGestureRecognizer
*
)
sender
;
@end
@interface
QuestionUnsolveTableViewCell
:
UITableViewCell
@property
(
nonatomic
,
strong
)
UILabel
*
titleLabel
;
// 标题
@property
(
nonatomic
,
strong
)
UILabel
*
describeLabel
;
// 描述
@property
(
nonatomic
,
strong
)
UILabel
*
pictureLabel
;
// 照片
@property
(
nonatomic
,
strong
)
UIView
*
pictureView
;
// 照片
@property
(
nonatomic
,
strong
)
QuestionDetailModel
*
questionDetail
;
@property
(
nonatomic
,
assign
)
id
<
QuestionUnsolveDelegate
>
delegate
;
@end
redstar/Classes/Module/Function/Question/QuestionUnsolved/QuestionUnsolveTableViewCell.m
0 → 100644
View file @
b6070a71
//
// QuestionUnsolveTableViewCell.m
// redstar
//
// Created by admin on 16/6/4.
// Copyright © 2016年 ZWF. All rights reserved.
//
#import "QuestionUnsolveTableViewCell.h"
#import <UIImageView+WebCache.h>
@interface
QuestionUnsolveTableViewCell
()
@property
(
nonatomic
,
strong
)
NSLayoutConstraint
*
picConstraint
;
@end
@implementation
QuestionUnsolveTableViewCell
#pragma mark - System Methods
-
(
instancetype
)
initWithStyle
:(
UITableViewCellStyle
)
style
reuseIdentifier
:(
NSString
*
)
reuseIdentifier
{
self
=
[
super
initWithStyle
:
style
reuseIdentifier
:
reuseIdentifier
];
if
(
self
)
{
[
self
setup
];
}
return
self
;
}
#pragma mark - Private Methods
-
(
void
)
setup
{
self
.
titleLabel
.
textColor
=
kDetailCellDescribeTextColor
;
_titleLabel
.
text
=
@"问题与建议描述"
;
self
.
pictureLabel
.
textColor
=
kDetailCellDescribeTextColor
;
_pictureLabel
.
text
=
@"照片"
;
self
.
pictureView
.
backgroundColor
=
[
UIColor
whiteColor
];
}
-
(
void
)
setQuestionDetail
:
(
QuestionDetailModel
*
)
questionDetail
{
_questionDetail
=
questionDetail
;
// 问题与描述
NSString
*
describeStr
=
[
NSString
stringWithFormat
:
@"%@"
,
questionDetail
.
content
];
NSMutableAttributedString
*
attributedString
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
describeStr
];
NSMutableParagraphStyle
*
paragraphStyle1
=
[[
NSMutableParagraphStyle
alloc
]
init
];
paragraphStyle1
.
alignment
=
NSTextAlignmentLeft
;
paragraphStyle1
.
lineSpacing
=
6
;
//行自定义行高度
[
attributedString
addAttribute
:
NSParagraphStyleAttributeName
value
:
paragraphStyle1
range
:
NSMakeRange
(
0
,
[
describeStr
length
])];
self
.
describeLabel
.
attributedText
=
attributedString
;
self
.
pictureView
.
backgroundColor
=
[
UIColor
whiteColor
];
CGFloat
imageMaginX
=
20
;
CGFloat
imageMaginY
=
10
;
CGFloat
imageW
=
(
kScreenWidth
-
imageMaginX
*
3
)
/
2
;
CGFloat
imageH
=
110
;
int
count
=
(
int
)
questionDetail
.
attachments
.
count
;
int
k
;
if
(
count
%
2
==
0
)
{
k
=
count
/
2
;
}
else
{
k
=
(
count
+
1
)
/
2
;
}
self
.
picConstraint
.
constant
=
imageMaginY
+
(
imageMaginY
+
imageH
)
*
k
;
[
self
.
pictureView
setNeedsUpdateConstraints
];
for
(
int
i
=
0
;
i
<
count
;
i
++
)
{
UIImageView
*
imageView
=
[[
UIImageView
alloc
]
init
];
imageView
.
tag
=
1115
+
i
;
imageView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
NSDictionary
*
imageDict
=
questionDetail
.
attachments
[
i
];
NSURL
*
imageURL
=
[
NSURL
URLWithString
:[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
imageDict
[
@"fileUrl"
]]];
[
imageView
sd_setImageWithURL
:
imageURL
placeholderImage
:[
UIImage
imageNamed
:
@"default_pic"
]];
UITapGestureRecognizer
*
tap
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
bigImageCilck
:
)];
[
imageView
addGestureRecognizer
:
tap
];
[
self
.
pictureView
addSubview
:
imageView
];
int
j
=
0
;
if
((
i
+
1
)
%
2
==
0
)
{
j
=
count
/
2
;
}
else
{
j
=
(
count
+
1
)
/
2
;
}
// 顶端
NSLayoutConstraint
*
titleTop
=
[
NSLayoutConstraint
constraintWithItem
:
imageView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
pictureView
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
imageMaginY
+
(
j
-
1
)
*
(
imageH
+
imageMaginY
)];
[
self
.
pictureView
addConstraint
:
titleTop
];
if
((
i
+
1
)
%
2
==
0
)
{
// 左边
NSLayoutConstraint
*
titleLeft
=
[
NSLayoutConstraint
constraintWithItem
:
imageView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
pictureView
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
imageMaginX
+
imageW
+
imageMaginX
];
[
self
.
pictureView
addConstraint
:
titleLeft
];
}
else
{
// 左边
NSLayoutConstraint
*
titleLeft
=
[
NSLayoutConstraint
constraintWithItem
:
imageView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
pictureView
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
imageMaginX
];
[
self
.
pictureView
addConstraint
:
titleLeft
];
}
// 右边
NSLayoutConstraint
*
titleWidth
=
[
NSLayoutConstraint
constraintWithItem
:
imageView
attribute
:
NSLayoutAttributeWidth
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
imageW
];
[
self
.
pictureView
addConstraint
:
titleWidth
];
// 高度
NSLayoutConstraint
*
titleHeight
=
[
NSLayoutConstraint
constraintWithItem
:
imageView
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
imageH
];
[
self
.
pictureView
addConstraint
:
titleHeight
];
}
}
-
(
void
)
bigImageCilck
:
(
UITapGestureRecognizer
*
)
sender
{
if
(
_delegate
&&
[
_delegate
respondsToSelector
:
@selector
(
showPicture
:)])
{
[
_delegate
showPicture
:
sender
];
}
}
#pragma mark - lazy loading
-
(
UILabel
*
)
titleLabel
{
if
(
!
_titleLabel
)
{
_titleLabel
=
[[
UILabel
alloc
]
init
];
_titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
_titleLabel
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
.
contentView
addSubview
:
_titleLabel
];
// 顶端
NSLayoutConstraint
*
titleTop
=
[
NSLayoutConstraint
constraintWithItem
:
_titleLabel
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
10
];
[
self
.
contentView
addConstraint
:
titleTop
];
// 左边
NSLayoutConstraint
*
titleLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_titleLabel
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
20
];
[
self
.
contentView
addConstraint
:
titleLeft
];
// 右边
NSLayoutConstraint
*
titleRight
=
[
NSLayoutConstraint
constraintWithItem
:
_titleLabel
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:-
20
];
[
self
.
contentView
addConstraint
:
titleRight
];
// 高度
NSLayoutConstraint
*
titleHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_titleLabel
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
25
];
[
self
.
contentView
addConstraint
:
titleHeight
];
}
return
_titleLabel
;
}
-
(
UILabel
*
)
describeLabel
{
if
(
!
_describeLabel
)
{
_describeLabel
=
[[
UILabel
alloc
]
init
];
_describeLabel
.
textColor
=
kdetailCellTitleColor
;
_describeLabel
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
_describeLabel
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_describeLabel
.
numberOfLines
=
0
;
[
_describeLabel
sizeToFit
];
[
self
.
contentView
addSubview
:
_describeLabel
];
// 顶端
NSLayoutConstraint
*
titleTop
=
[
NSLayoutConstraint
constraintWithItem
:
_describeLabel
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
titleLabel
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
5
];
[
self
.
contentView
addConstraint
:
titleTop
];
// 左边
NSLayoutConstraint
*
titleLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_describeLabel
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
20
];
[
self
.
contentView
addConstraint
:
titleLeft
];
// 右边
NSLayoutConstraint
*
titleRight
=
[
NSLayoutConstraint
constraintWithItem
:
_describeLabel
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:-
20
];
[
self
.
contentView
addConstraint
:
titleRight
];
}
return
_describeLabel
;
}
-
(
UILabel
*
)
pictureLabel
{
if
(
!
_pictureLabel
)
{
_pictureLabel
=
[[
UILabel
alloc
]
init
];
_pictureLabel
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
_pictureLabel
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
.
contentView
addSubview
:
_pictureLabel
];
// 顶端
NSLayoutConstraint
*
titleTop
=
[
NSLayoutConstraint
constraintWithItem
:
_pictureLabel
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
describeLabel
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
5
];
[
self
.
contentView
addConstraint
:
titleTop
];
// 左边
NSLayoutConstraint
*
titleLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_pictureLabel
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
20
];
[
self
.
contentView
addConstraint
:
titleLeft
];
// 右边
NSLayoutConstraint
*
titleRight
=
[
NSLayoutConstraint
constraintWithItem
:
_pictureLabel
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:-
20
];
[
self
.
contentView
addConstraint
:
titleRight
];
// 高度
NSLayoutConstraint
*
titleHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_pictureLabel
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
30
];
[
self
.
contentView
addConstraint
:
titleHeight
];
}
return
_pictureLabel
;
}
-
(
UIView
*
)
pictureView
{
if
(
!
_pictureView
)
{
_pictureView
=
[[
UIView
alloc
]
init
];
_pictureView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
.
contentView
addSubview
:
_pictureView
];
// 顶端
NSLayoutConstraint
*
titleTop
=
[
NSLayoutConstraint
constraintWithItem
:
_pictureView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
pictureLabel
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
5
];
[
self
.
contentView
addConstraint
:
titleTop
];
// 左边
NSLayoutConstraint
*
titleLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_pictureView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
.
contentView
addConstraint
:
titleLeft
];
// 右边
NSLayoutConstraint
*
titleRight
=
[
NSLayoutConstraint
constraintWithItem
:
_pictureView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
self
.
contentView
addConstraint
:
titleRight
];
// 高度
self
.
picConstraint
=
[
NSLayoutConstraint
constraintWithItem
:
_pictureView
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
130
];
[
self
.
contentView
addConstraint
:
_picConstraint
];
// 右边
NSLayoutConstraint
*
titleBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_pictureView
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:-
10
];
[
self
.
contentView
addConstraint
:
titleBottom
];
}
return
_pictureView
;
}
@end
redstar/Classes/Module/Function/Question/QuestionUnsolved/QuestionUnsolvedViewController.h
0 → 100644
View file @
b6070a71
//
// QuestionUnsolvedViewController.h
// redstar
//
// Created by admin on 16/6/4.
// Copyright © 2016年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
QuestionUnsolvedViewController
:
UIViewController
@property
(
nonatomic
,
assign
)
NSInteger
row
;
@property
(
nonatomic
,
copy
)
NSString
*
questionUuid
;
@end
redstar/Classes/Module/Function/Question/QuestionUnsolved/QuestionUnsolvedViewController.m
0 → 100644
View file @
b6070a71
//
// QuestionUnsolvedViewController.m
// redstar
//
// Created by admin on 16/6/4.
// Copyright © 2016年 ZWF. All rights reserved.
//
#import "QuestionUnsolvedViewController.h"
#import "QuestionDetailCell.h"
#import "QuestionDescribeCell.h"
#import "LargePictureViewController.h"
#import "QuestionUnsolveTableViewCell.h"
#import "CommentView.h"
#import "HttpClient.h"
#import <MBProgressHUD.h>
#import "QuestionDetailModel.h"
#import "QuestionDealWithView.h"
#import "AddQuestionViewController.h"
#define kQuestionDetailCell @"QuestionDetailCell" // 问题详情
#define kQuestionDescribeCell @"QuestionDescribeCell" // 问题描述
#define kQuestionUnsolveTableViewCell @"QuestionUnsolveTableViewCell" // 问题描述
@interface
QuestionUnsolvedViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
UIAlertViewDelegate
,
UITextViewDelegate
,
QuestionDescribeDelegate
,
QuestionUnsolveDelegate
,
QuestionDealWithDelegate
>
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
UIView
*
backGroundView
;
@property
(
nonatomic
,
strong
)
QuestionDetailModel
*
questionDetailModel
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allCommentArray
;
@property
(
nonatomic
,
assign
)
int
clickNumber
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allImageURL
;
@property
(
nonatomic
,
strong
)
UIView
*
footerView
;
@property
(
nonatomic
,
strong
)
UIView
*
bgView
;
@property
(
nonatomic
,
strong
)
QuestionDealWithView
*
dealWithView
;
@end
@implementation
QuestionUnsolvedViewController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
allImageURL
=
[
NSMutableArray
array
];
if
([[[
UIDevice
currentDevice
]
systemVersion
]
floatValue
]
>=
7
.
0
)
{
self
.
edgesForExtendedLayout
=
UIRectEdgeNone
;
self
.
extendedLayoutIncludesOpaqueBars
=
NO
;
self
.
modalPresentationCapturesStatusBarAppearance
=
NO
;
self
.
navigationController
.
navigationBar
.
translucent
=
NO
;
}
[
self
setupNav
];
// 问题详情
[
self
requestQestionDetail
];
self
.
view
.
backgroundColor
=
kSectionBackGroundColor
;
_clickNumber
=
0
;
}
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
{
[
super
viewWillAppear
:
animated
];
self
.
navigationController
.
navigationBar
.
hidden
=
NO
;
self
.
tabBarController
.
tabBar
.
hidden
=
YES
;
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
}
#pragma mark - Private Methods
-
(
void
)
requestQestionDetail
{
self
.
allCommentArray
=
[
NSMutableArray
array
];
NSString
*
user_uuid
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_uuid"
];
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@%@?userUuid=%@"
,
kRedStarURL
,
kQuestionDetailURL
,
_questionUuid
,
user_uuid
];
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
[
httpClient
getQuestionDetailWithParameters
:
nil
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSDictionary
*
dict
=
response
[
@"data"
];
QuestionDetailModel
*
quesDetail
=
[[
QuestionDetailModel
alloc
]
init
];
[
quesDetail
setValuesForKeysWithDictionary
:
dict
];
_questionDetailModel
=
quesDetail
;
for
(
int
i
=
0
;
i
<
_questionDetailModel
.
attachments
.
count
;
i
++
)
{
UIImageView
*
imageView
=
[[
UIImageView
alloc
]
init
];
imageView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
NSDictionary
*
imageDict
=
_questionDetailModel
.
attachments
[
i
];
NSURL
*
imageURL
=
[
NSURL
URLWithString
:[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
imageDict
[
@"fileUrl"
]]];
[
_allImageURL
addObject
:
imageURL
];
}
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
[
self
.
tableView
reloadData
];
}];
}
-
(
void
)
setupNav
{
UILabel
*
customLab
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
40
,
30
)];
[
customLab
setTextColor
:[
UIColor
whiteColor
]];
[
customLab
setText
:
@"问题详情"
];
customLab
.
font
=
[
UIFont
boldSystemFontOfSize
:
19
];
self
.
navigationItem
.
titleView
=
customLab
;
UIButton
*
backBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
backBtn
.
frame
=
CGRectMake
(
0
,
0
,
30
,
44
);
[
backBtn
setImage
:[
UIImage
imageNamed
:
@"back_btn"
]
forState
:
UIControlStateNormal
];
[
backBtn
addTarget
:
self
action
:
@selector
(
doBack
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
UIBarButtonItem
*
backItem
=
[[
UIBarButtonItem
alloc
]
initWithCustomView
:
backBtn
];
self
.
navigationItem
.
leftBarButtonItem
=
backItem
;
}
// 返回上一页面
-
(
void
)
doBack
:
(
UIBarButtonItem
*
)
sender
{
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
}
-
(
void
)
dealWithProblem
:
(
UIButton
*
)
sender
{
[
self
showRedView
];
}
-
(
void
)
showRedView
{
if
(
!
_bgView
)
{
_bgView
=
[[
UIView
alloc
]
initWithFrame
:
self
.
view
.
bounds
];
UITapGestureRecognizer
*
tapGR
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
closeRedView
)];
[
_bgView
addGestureRecognizer
:
tapGR
];
}
if
(
!
_dealWithView
)
{
_dealWithView
=
[[
QuestionDealWithView
alloc
]
init
];
_dealWithView
.
backgroundColor
=
[
UIColor
whiteColor
];
_dealWithView
.
delegate
=
self
;
}
[
self
.
view
addSubview
:
_bgView
];
[
self
.
view
insertSubview
:
_dealWithView
aboveSubview
:
_bgView
];
_bgView
.
alpha
=
0
;
_bgView
.
backgroundColor
=
[
UIColor
blackColor
];
[
_dealWithView
.
quitBtn
addTarget
:
self
action
:
@selector
(
closeRedView
)
forControlEvents
:
UIControlEventTouchUpInside
];
CGRect
toFrame
=
CGRectMake
(
0
,
150
,
kScreenWidth
,
905
);
CGRect
fromFrame
=
CGRectMake
(
0
,
kScreenHeight
,
kScreenWidth
,
905
);
_dealWithView
.
frame
=
fromFrame
;
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
_bgView
.
alpha
=
0
.
6
;
_dealWithView
.
frame
=
toFrame
;
}];
}
-
(
void
)
tableDidSelectAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
if
(
indexPath
.
row
==
0
)
{
}
}
-
(
void
)
closeRedView
{
CGRect
fromFrame
=
CGRectMake
(
0
,
kScreenHeight
,
kScreenWidth
,
905
);
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
_bgView
.
alpha
=
.
0
f
;
_dealWithView
.
frame
=
fromFrame
;
}
completion
:^
(
BOOL
finished
)
{
[
_bgView
removeFromSuperview
];
[
_dealWithView
removeFromSuperview
];
}];
}
-
(
void
)
addZan
:
(
ZanButton
*
)
sender
{
if
([
_questionDetailModel
.
state
isEqualToString
:
@"created"
])
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"当前问题尚未解决,暂不能点赞!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
[
alert
show
];
return
;
}
_clickNumber
++
;
if
(
_clickNumber
>
4
)
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"您点赞过于频繁,请稍后再试!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
[
alert
show
];
return
;
}
NSArray
*
permissions
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"permissions"
];
if
([
permissions
containsObject
:
@"500505"
])
{
sender
.
selected
=
!
sender
.
selected
;
NSDate
*
date
=
[
NSDate
date
];
NSDateFormatter
*
dateFormatter
=
[[
NSDateFormatter
alloc
]
init
];
[
dateFormatter
setDateFormat
:
@"YYYY-MM-dd+hh:mm:ss"
];
NSString
*
dateString
=
[
dateFormatter
stringFromDate
:
date
];
NSString
*
operId
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_code"
];
NSString
*
operName
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_name"
];
if
(
sender
.
selected
)
{
// 点赞
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@%@?time=%@&operId=%@&operName=%@"
,
kRedStarURL
,
kAddLikeURL
,
_questionUuid
,
dateString
,
operId
,
operName
];
url
=
[
url
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
];
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
[
httpClient
likeCountWithParameters
:
nil
completion
:
^
(
id
response
,
NSError
*
error
)
{
if
([
response
[
@"success"
]
boolValue
])
{
int
likeCount
=
[
sender
.
titleLabel
.
text
intValue
];
[
sender
setTitle
:[
NSString
stringWithFormat
:
@"%d"
,
likeCount
+
1
]
forState
:
UIControlStateNormal
];
}
else
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"警告"
message
:
@"点赞失败!"
delegate
:
self
cancelButtonTitle
:
@"确定"
otherButtonTitles
:
nil
,
nil
];
[
alert
show
];
}
}];
}
else
{
// 取消点赞
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@%@?time=%@&operId=%@&operName=%@"
,
kRedStarURL
,
kCancelLikeURL
,
_questionUuid
,
dateString
,
operId
,
operName
];
url
=
[
url
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
];
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
[
httpClient
likeCountWithParameters
:
nil
completion
:
^
(
id
response
,
NSError
*
error
)
{
if
([
response
[
@"success"
]
boolValue
])
{
int
likeCount
=
[
sender
.
titleLabel
.
text
intValue
];
[
sender
setTitle
:[
NSString
stringWithFormat
:
@"%d"
,
likeCount
-
1
]
forState
:
UIControlStateNormal
];
}
else
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"警告"
message
:
@"取消点赞失败!"
delegate
:
self
cancelButtonTitle
:
@"确定"
otherButtonTitles
:
nil
,
nil
];
[
alert
show
];
}
}];
}
}
else
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"您没有点赞的权限!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
[
alert
show
];
}
}
-
(
void
)
showPicture
:
(
UITapGestureRecognizer
*
)
sender
{
// 获取到点击的显示图片的按钮
UIImageView
*
imageView
=
(
UIImageView
*
)
sender
.
view
;
LargePictureViewController
*
largeVC
=
[[
LargePictureViewController
alloc
]
init
];
largeVC
.
index
=
imageView
.
tag
-
1115
;
largeVC
.
pictureSaveMode
=
PictureNetWorkMode
;
largeVC
.
allImageArray
=
_allImageURL
;
[
self
.
navigationController
pushViewController
:
largeVC
animated
:
YES
];
}
#pragma mark - UITableView Delegate/DataSource
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
{
return
2
;
}
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
return
1
;
}
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
if
(
indexPath
.
section
==
0
)
{
QuestionDetailCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kQuestionDetailCell
];
if
(
!
cell
)
{
cell
=
[[
QuestionDetailCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kQuestionDetailCell
];
}
cell
.
questionDetail
=
self
.
questionDetailModel
;
[
cell
.
thumbBtn
addTarget
:
self
action
:
@selector
(
addZan
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
return
cell
;
}
else
{
QuestionUnsolveTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kQuestionUnsolveTableViewCell
];
if
(
!
cell
)
{
cell
=
[[
QuestionUnsolveTableViewCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kQuestionUnsolveTableViewCell
];
}
cell
.
delegate
=
self
;
cell
.
questionDetail
=
self
.
questionDetailModel
;
return
cell
;
}
}
// section高度
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForHeaderInSection
:
(
NSInteger
)
section
{
return
CGFLOAT_MIN
;
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForFooterInSection
:
(
NSInteger
)
section
{
return
CGFLOAT_MIN
;
}
#pragma mark - lazy loading
-
(
UITableView
*
)
tableView
{
if
(
!
_tableView
)
{
_tableView
=
[[
UITableView
alloc
]
initWithFrame
:
CGRectZero
style
:
UITableViewStyleGrouped
];
_tableView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_tableView
.
showsVerticalScrollIndicator
=
NO
;
_tableView
.
showsHorizontalScrollIndicator
=
NO
;
_tableView
.
delegate
=
self
;
_tableView
.
dataSource
=
self
;
_tableView
.
rowHeight
=
UITableViewAutomaticDimension
;
_tableView
.
estimatedRowHeight
=
400
.
0
;
_tableView
.
tableFooterView
=
self
.
footerView
;
[
_tableView
registerClass
:[
QuestionDetailCell
class
]
forCellReuseIdentifier
:
kQuestionDetailCell
];
[
_tableView
registerClass
:[
QuestionDescribeCell
class
]
forCellReuseIdentifier
:
kQuestionDescribeCell
];
[
self
.
view
addSubview
:
_tableView
];
NSLayoutConstraint
*
tableTop
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
tableTop
];
NSLayoutConstraint
*
tableLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
tableLeft
];
NSLayoutConstraint
*
tableRight
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
tableRight
];
NSLayoutConstraint
*
tableBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
tableBottom
];
}
return
_tableView
;
}
-
(
UIView
*
)
footerView
{
if
(
!
_footerView
)
{
_footerView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
kScreenWidth
,
80
)];
UIButton
*
button
=
[[
UIButton
alloc
]
init
];
button
.
frame
=
CGRectMake
(
20
,
20
,
kScreenWidth
-
40
,
40
);
button
.
layer
.
cornerRadius
=
3
;
button
.
backgroundColor
=
kNavigationBarColor
;
button
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
18
.
0
f
];
[
button
setTitle
:
@"问题处理"
forState
:
UIControlStateNormal
];
[
button
addTarget
:
self
action
:
@selector
(
dealWithProblem
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
_footerView
addSubview
:
button
];
}
return
_footerView
;
}
@end
redstar/Classes/Module/Function/Question/QuestionUnsolved/SelectCategaryViewController.h
0 → 100644
View file @
b6070a71
//
// SelectCategaryViewController.h
// redstar
//
// Created by admin on 16/6/6.
// Copyright © 2016年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
SelectCategaryViewController
:
UIViewController
@end
redstar/Classes/Module/Function/Question/QuestionUnsolved/SelectCategaryViewController.m
0 → 100644
View file @
b6070a71
//
// SelectCategaryViewController.m
// redstar
//
// Created by admin on 16/6/6.
// Copyright © 2016年 ZWF. All rights reserved.
//
#import "SelectCategaryViewController.h"
@interface
SelectCategaryViewController
()
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@end
@implementation
SelectCategaryViewController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
// Do any additional setup after loading the view.
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
}
-
(
UITableView
*
)
tableView
{
if
(
!
_tableView
)
{
_tableView
=
[[
UITableView
alloc
]
init
];
}
return
_tableView
;
}
/*
#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
redstar/Classes/Module/Function/Question/QuestionUnsolved/SolvedTypeTableViewCell.h
0 → 100644
View file @
b6070a71
//
// SolvedTypeTableViewCell.h
// redstar
//
// Created by admin on 16/6/6.
// Copyright © 2016年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
SolvedTypeTableViewCell
:
UITableViewCell
@property
(
nonatomic
,
strong
)
UILabel
*
titleLabel
;
@property
(
nonatomic
,
strong
)
UIButton
*
quesBtn
;
@property
(
nonatomic
,
strong
)
UIButton
*
FAQBtn
;
@property
(
nonatomic
,
strong
)
UIButton
*
SOPBtn
;
@end
redstar/Classes/Module/Function/Question/QuestionUnsolved/SolvedTypeTableViewCell.m
0 → 100644
View file @
b6070a71
//
// SolvedTypeTableViewCell.m
// redstar
//
// Created by admin on 16/6/6.
// Copyright © 2016年 ZWF. All rights reserved.
//
#import "SolvedTypeTableViewCell.h"
@implementation
SolvedTypeTableViewCell
-
(
UILabel
*
)
titleLabel
{
if
(
!
_titleLabel
)
{
_titleLabel
=
[[
UILabel
alloc
]
init
];
}
_titleLabel
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
17
.
0
];
_titleLabel
.
textColor
=
kdetailCellTitleColor
;
[
self
.
contentView
addSubview
:
_titleLabel
];
// 顶端
NSLayoutConstraint
*
titleTop
=
[
NSLayoutConstraint
constraintWithItem
:
_titleLabel
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
5
];
[
self
.
contentView
addConstraint
:
titleTop
];
// 左边
NSLayoutConstraint
*
titleLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_titleLabel
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
17
];
[
self
.
contentView
addConstraint
:
titleLeft
];
// 右边
NSLayoutConstraint
*
titleWidth
=
[
NSLayoutConstraint
constraintWithItem
:
_titleLabel
attribute
:
NSLayoutAttributeWidth
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
80
];
[
self
.
contentView
addConstraint
:
titleWidth
];
// 高度
NSLayoutConstraint
*
titleHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_titleLabel
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
40
];
[
self
.
contentView
addConstraint
:
titleHeight
];
return
_titleLabel
;
}
-
(
UIButton
*
)
quesBtn
{
if
(
!
_quesBtn
)
{
_quesBtn
=
[[
UIButton
alloc
]
init
];
_quesBtn
.
tag
=
323118
;
[
_quesBtn
setTitleColor
:
kOnLineCellTitleColor
forState
:
UIControlStateNormal
];
_quesBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
_quesBtn
setTitle
:
@"纯问题"
forState
:
UIControlStateNormal
];
[
_quesBtn
setImage
:[
UIImage
imageNamed
:
@"select_box"
]
forState
:
UIControlStateNormal
];
[
_quesBtn
setImage
:[
UIImage
imageNamed
:
@"no_select_box"
]
forState
:
UIControlStateSelected
];
_quesBtn
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
17
.
0
f
];
_quesBtn
.
imageEdgeInsets
=
UIEdgeInsetsMake
(
0
,
0
,
0
,
20
);
_quesBtn
.
titleEdgeInsets
=
UIEdgeInsetsMake
(
0
,
-
8
,
0
,
0
);
_quesBtn
.
imageView
.
contentMode
=
UIViewContentModeRight
;
_quesBtn
.
titleLabel
.
contentMode
=
UIViewContentModeLeft
;
[
_quesBtn
setTitleColor
:[
UIColor
colorWithRed
:
151
/
255
.
0
green
:
151
/
255
.
0
blue
:
151
/
255
.
0
alpha
:
1
.
0
f
]
forState
:
UIControlStateNormal
];
[
self
.
contentView
addSubview
:
_quesBtn
];
// 顶端
NSLayoutConstraint
*
selectTop
=
[
NSLayoutConstraint
constraintWithItem
:
_quesBtn
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
5
];
[
self
.
contentView
addConstraint
:
selectTop
];
// 左边
NSLayoutConstraint
*
selectLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_quesBtn
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
titleLabel
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
self
.
contentView
addConstraint
:
selectLeft
];
// 右边
NSLayoutConstraint
*
selectRight
=
[
NSLayoutConstraint
constraintWithItem
:
_quesBtn
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
FAQBtn
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
.
contentView
addConstraint
:
selectRight
];
// 高度
NSLayoutConstraint
*
selectBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_quesBtn
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
40
];
[
self
.
contentView
addConstraint
:
selectBottom
];
// 高度
NSLayoutConstraint
*
selectWidth
=
[
NSLayoutConstraint
constraintWithItem
:
_quesBtn
attribute
:
NSLayoutAttributeWidth
relatedBy
:
NSLayoutRelationEqual
toItem
:
_FAQBtn
attribute
:
NSLayoutAttributeWidth
multiplier
:
1
.
0
constant
:
0
];
[
self
.
contentView
addConstraint
:
selectWidth
];
}
return
_quesBtn
;
}
-
(
UIButton
*
)
FAQBtn
{
if
(
!
_FAQBtn
)
{
_FAQBtn
=
[[
UIButton
alloc
]
init
];
//_quesBtn.tag = 323228;
[
_FAQBtn
setTitleColor
:
kOnLineCellTitleColor
forState
:
UIControlStateNormal
];
_FAQBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
_FAQBtn
setTitle
:
@"形成FAQ"
forState
:
UIControlStateNormal
];
[
_FAQBtn
setImage
:[
UIImage
imageNamed
:
@"select_box"
]
forState
:
UIControlStateNormal
];
[
_FAQBtn
setImage
:[
UIImage
imageNamed
:
@"no_select_box"
]
forState
:
UIControlStateSelected
];
_FAQBtn
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
17
.
0
f
];
_FAQBtn
.
imageEdgeInsets
=
UIEdgeInsetsMake
(
0
,
0
,
0
,
20
);
_FAQBtn
.
titleEdgeInsets
=
UIEdgeInsetsMake
(
0
,
-
8
,
0
,
0
);
_FAQBtn
.
imageView
.
contentMode
=
UIViewContentModeRight
;
_FAQBtn
.
titleLabel
.
contentMode
=
UIViewContentModeLeft
;
[
_FAQBtn
setTitleColor
:[
UIColor
colorWithRed
:
151
/
255
.
0
green
:
151
/
255
.
0
blue
:
151
/
255
.
0
alpha
:
1
.
0
f
]
forState
:
UIControlStateNormal
];
[
self
.
contentView
addSubview
:
_FAQBtn
];
// 顶端
NSLayoutConstraint
*
selectTop
=
[
NSLayoutConstraint
constraintWithItem
:
_FAQBtn
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
5
];
[
self
.
contentView
addConstraint
:
selectTop
];
// 右边
NSLayoutConstraint
*
selectRight
=
[
NSLayoutConstraint
constraintWithItem
:
_FAQBtn
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:-
20
];
[
self
.
contentView
addConstraint
:
selectRight
];
// 高度
NSLayoutConstraint
*
selectBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_FAQBtn
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
40
];
[
self
.
contentView
addConstraint
:
selectBottom
];
}
return
_FAQBtn
;
}
-
(
UIButton
*
)
SOPBtn
{
if
(
!
_SOPBtn
)
{
_SOPBtn
=
[[
UIButton
alloc
]
init
];
//_quesBtn.tag = 323228;
[
_SOPBtn
setTitleColor
:
kOnLineCellTitleColor
forState
:
UIControlStateNormal
];
_SOPBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
_SOPBtn
setTitle
:
@"优化SOP"
forState
:
UIControlStateNormal
];
[
_SOPBtn
setImage
:[
UIImage
imageNamed
:
@"select_box"
]
forState
:
UIControlStateNormal
];
[
_SOPBtn
setImage
:[
UIImage
imageNamed
:
@"no_select_box"
]
forState
:
UIControlStateSelected
];
_SOPBtn
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
17
.
0
f
];
_SOPBtn
.
imageEdgeInsets
=
UIEdgeInsetsMake
(
0
,
0
,
0
,
20
);
_SOPBtn
.
titleEdgeInsets
=
UIEdgeInsetsMake
(
0
,
-
8
,
0
,
0
);
_SOPBtn
.
imageView
.
contentMode
=
UIViewContentModeRight
;
_SOPBtn
.
titleLabel
.
contentMode
=
UIViewContentModeLeft
;
[
_SOPBtn
setTitleColor
:[
UIColor
colorWithRed
:
151
/
255
.
0
green
:
151
/
255
.
0
blue
:
151
/
255
.
0
alpha
:
1
.
0
f
]
forState
:
UIControlStateNormal
];
[
self
.
contentView
addSubview
:
_SOPBtn
];
// 顶端
NSLayoutConstraint
*
selectTop
=
[
NSLayoutConstraint
constraintWithItem
:
_SOPBtn
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
quesBtn
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:-
1
];
[
self
.
contentView
addConstraint
:
selectTop
];
// 右边
NSLayoutConstraint
*
selectLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_SOPBtn
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
titleLabel
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
8
];
[
self
.
contentView
addConstraint
:
selectLeft
];
// 高度
NSLayoutConstraint
*
selectBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_SOPBtn
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
40
];
[
self
.
contentView
addConstraint
:
selectBottom
];
// 高度
NSLayoutConstraint
*
selectWidth
=
[
NSLayoutConstraint
constraintWithItem
:
_SOPBtn
attribute
:
NSLayoutAttributeWidth
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
quesBtn
attribute
:
NSLayoutAttributeWidth
multiplier
:
1
.
0
constant
:
0
];
[
self
.
contentView
addConstraint
:
selectWidth
];
}
return
_SOPBtn
;
}
@end
redstar/Classes/Module/Function/Standar/SOPCategarys/ViewController/SOPViewController.m
View file @
b6070a71
...
...
@@ -170,7 +170,6 @@
NSLog
(
@"paaaaa == %@"
,
parameters
);
[
http
getAttachmentsWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSArray
*
dataArray
=
response
[
@"data"
];
NSLog
(
@"sssss === %@"
,
response
);
NSMutableArray
*
tempArray
=
[
NSMutableArray
array
];
for
(
NSDictionary
*
attaDict
in
dataArray
)
{
AttachmentModel
*
atta
=
[[
AttachmentModel
alloc
]
init
];
...
...
@@ -317,7 +316,7 @@
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
//已完成下载
//
已完成下载
[
operation
setCompletionBlockWithSuccess
:
^
(
AFHTTPRequestOperation
*
operation
,
id
responseObject
)
{
[
self
closeRedView
];
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"下载成功!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
...
...
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