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
0b955368
Commit
0b955368
authored
Jun 11, 2016
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成添加权限 处理问题详情
parent
b6070a71
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
813 additions
and
353 deletions
+813
-353
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
Contents.json
redstar/Assets.xcassets/home/口碑现场.imageset/Contents.json
+0
-0
task_03@2x.png
redstar/Assets.xcassets/home/口碑现场.imageset/task_03@2x.png
+0
-0
task_03@3x.png
redstar/Assets.xcassets/home/口碑现场.imageset/task_03@3x.png
+0
-0
Contents.json
redstar/Assets.xcassets/home/口碑随手拍.imageset/Contents.json
+0
-0
store_icon@2x.png
...tar/Assets.xcassets/home/口碑随手拍.imageset/store_icon@2x.png
+0
-0
store_icon@3x.png
...tar/Assets.xcassets/home/口碑随手拍.imageset/store_icon@3x.png
+0
-0
Url.h
redstar/Classes/Macro/Url.h
+6
-6
FunctionViewController.h
redstar/Classes/Module/Function/FunctionViewController.h
+1
-1
FunctionViewController.m
redstar/Classes/Module/Function/FunctionViewController.m
+5
-5
OnLineFooterView.h
.../Module/Function/OnLine/AddOnLine/View/OnLineFooterView.h
+2
-1
OnLineFooterView.m
.../Module/Function/OnLine/AddOnLine/View/OnLineFooterView.m
+2
-34
OnLineViewController.m
...on/OnLine/AddOnLine/ViewController/OnLineViewController.m
+57
-5
AddPictureViewController.m
...ture/AddPicture/ViewController/AddPictureViewController.m
+25
-5
PicCategoryViewController.m
...ictureCategory/ViewController/PicCategoryViewController.m
+4
-4
PictureStoryViewController.m
...PictureDetail/ViewController/PictureStoryViewController.m
+26
-10
PictureViewController.m
...icture/PictureList/ViewController/PictureViewController.m
+2
-2
QuestionViewController.m
...tion/QuestionList/ViewController/QuestionViewController.m
+12
-11
FeedContentTableCell.h
...Function/Question/QuestionUnsolved/FeedContentTableCell.h
+2
-2
FeedContentTableCell.m
...Function/Question/QuestionUnsolved/FeedContentTableCell.m
+49
-49
QuestionDealWithView.h
...Function/Question/QuestionUnsolved/QuestionDealWithView.h
+10
-3
QuestionDealWithView.m
...Function/Question/QuestionUnsolved/QuestionDealWithView.m
+257
-59
QuestionUnsolvedViewController.m
...uestion/QuestionUnsolved/QuestionUnsolvedViewController.m
+125
-13
SelectCategaryViewController.h
.../Question/QuestionUnsolved/SelectCategaryViewController.h
+11
-0
SelectCategaryViewController.m
.../Question/QuestionUnsolved/SelectCategaryViewController.m
+74
-15
SolvedTypeTableViewCell.m
...ction/Question/QuestionUnsolved/SolvedTypeTableViewCell.m
+38
-36
RankDetailViewController.m
...king/RankDetail/ViewController/RankDetailViewController.m
+1
-1
HomeViewController.m
...r/Classes/Module/Home/ViewController/HomeViewController.m
+44
-43
SearchViewController.m
...Classes/Module/Home/ViewController/SearchViewController.m
+38
-38
HttpClient.h
redstar/Classes/Tools/HttpClient/HttpClient.h
+8
-5
HttpClient.m
redstar/Classes/Tools/HttpClient/HttpClient.m
+14
-5
No files found.
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
0b955368
No preview for this file type
redstar/Assets.xcassets/home/
图说口碑
.imageset/Contents.json
→
redstar/Assets.xcassets/home/
口碑现场
.imageset/Contents.json
View file @
0b955368
File moved
redstar/Assets.xcassets/home/
图说口碑
.imageset/task_03@2x.png
→
redstar/Assets.xcassets/home/
口碑现场
.imageset/task_03@2x.png
View file @
0b955368
File moved
redstar/Assets.xcassets/home/
图说口碑
.imageset/task_03@3x.png
→
redstar/Assets.xcassets/home/
口碑现场
.imageset/task_03@3x.png
View file @
0b955368
File moved
redstar/Assets.xcassets/home/
商场风采
.imageset/Contents.json
→
redstar/Assets.xcassets/home/
口碑随手拍
.imageset/Contents.json
View file @
0b955368
File moved
redstar/Assets.xcassets/home/
商场风采
.imageset/store_icon@2x.png
→
redstar/Assets.xcassets/home/
口碑随手拍
.imageset/store_icon@2x.png
View file @
0b955368
File moved
redstar/Assets.xcassets/home/
商场风采
.imageset/store_icon@3x.png
→
redstar/Assets.xcassets/home/
口碑随手拍
.imageset/store_icon@3x.png
View file @
0b955368
File moved
redstar/Classes/Macro/Url.h
View file @
0b955368
...
@@ -83,22 +83,22 @@
...
@@ -83,22 +83,22 @@
#define kQuestionCategoryURL @"redstar-server/rest/question/queryCategory?groupUuid="
#define kQuestionCategoryURL @"redstar-server/rest/question/queryCategory?groupUuid="
/**
/**
*
图说口碑
相关URL
*
口碑现场
相关URL
*/
*/
// 保存
图说口碑
// 保存
口碑现场
#define kSavePicturePraiseURL @"redstar-server/rest/legendpraise/save?time="
#define kSavePicturePraiseURL @"redstar-server/rest/legendpraise/save?time="
// 上传口碑图片
// 上传口碑图片
#define kUpLoadPictureURL @"redstar-server/rest/legendpraise/"
#define kUpLoadPictureURL @"redstar-server/rest/legendpraise/"
// 提交
图说口碑
// 提交
口碑现场
#define kSubmitPicturePraiseURL @"redstar-server/rest/legendpraise/"
#define kSubmitPicturePraiseURL @"redstar-server/rest/legendpraise/"
// 查询
图说口碑
// 查询
口碑现场
#define kQueryPicturePraiseURL @"redstar-server/rest/legendpraise/query"
#define kQueryPicturePraiseURL @"redstar-server/rest/legendpraise/query"
//
图说口碑
明细
//
口碑现场
明细
#define kPicturePraiseDetailURL @"redstar-server/rest/legendpraise/get/"
#define kPicturePraiseDetailURL @"redstar-server/rest/legendpraise/get/"
// 口碑点赞
// 口碑点赞
...
@@ -123,6 +123,6 @@
...
@@ -123,6 +123,6 @@
// 提交问题处理结果
// 提交问题处理结果
// redstar-server/rest/question/resolve?time={time}&operId={operId}&operName={operName}
// redstar-server/rest/question/resolve?time={time}&operId={operId}&operName={operName}
#define kSubmitQuestionResultURL @"redstar-server/rest/question/resolve?time="
#define kSubmitQuestionResultURL @"redstar-server/rest/question/resolve
_update
?time="
#endif
/* Url_h */
#endif
/* Url_h */
redstar/Classes/Module/Function/FunctionViewController.h
View file @
0b955368
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
@property
(
nonatomic
,
strong
)
FuncItem
*
onLineSamplingBtn
;
// 在线抽查按钮
@property
(
nonatomic
,
strong
)
FuncItem
*
onLineSamplingBtn
;
// 在线抽查按钮
@property
(
nonatomic
,
strong
)
FuncItem
*
wordOfMouthBtn
;
// 口碑按钮
@property
(
nonatomic
,
strong
)
FuncItem
*
wordOfMouthBtn
;
// 口碑按钮
@property
(
nonatomic
,
strong
)
FuncItem
*
standardBtn
;
// 口碑标准按钮
@property
(
nonatomic
,
strong
)
FuncItem
*
standardBtn
;
// 口碑标准按钮
@property
(
nonatomic
,
strong
)
FuncItem
*
pictureBtn
;
//
图说口碑按钮
@property
(
nonatomic
,
strong
)
FuncItem
*
pictureBtn
;
//
@property
(
nonatomic
,
strong
)
FuncItem
*
questionBtn
;
// 问题与知识按钮
@property
(
nonatomic
,
strong
)
FuncItem
*
questionBtn
;
// 问题与知识按钮
@property
(
nonatomic
,
strong
)
FuncItem
*
rankBtn
;
// 口碑排名按钮
@property
(
nonatomic
,
strong
)
FuncItem
*
rankBtn
;
// 口碑排名按钮
@property
(
nonatomic
,
strong
)
FuncItem
*
spotBtn
;
// 口碑排名按钮
@property
(
nonatomic
,
strong
)
FuncItem
*
spotBtn
;
// 口碑排名按钮
...
...
redstar/Classes/Module/Function/FunctionViewController.m
View file @
0b955368
...
@@ -55,8 +55,8 @@
...
@@ -55,8 +55,8 @@
-
(
void
)
setup
-
(
void
)
setup
{
{
[
self
.
onLineSamplingBtn
setTitle
:
@"口碑报告"
forState
:
UIControlStateNormal
];
[
self
.
onLineSamplingBtn
setTitle
:
@"口碑报告"
forState
:
UIControlStateNormal
];
[
self
.
wordOfMouthBtn
setTitle
:
@"
商场风采
"
forState
:
UIControlStateNormal
];
[
self
.
wordOfMouthBtn
setTitle
:
@"
口碑随手拍
"
forState
:
UIControlStateNormal
];
[
self
.
standardBtn
setTitle
:
@"
图说口碑
"
forState
:
UIControlStateNormal
];
[
self
.
standardBtn
setTitle
:
@"
口碑现场
"
forState
:
UIControlStateNormal
];
[
self
.
pictureBtn
setTitle
:
@"口碑标准"
forState
:
UIControlStateNormal
];
[
self
.
pictureBtn
setTitle
:
@"口碑标准"
forState
:
UIControlStateNormal
];
[
self
.
questionBtn
setTitle
:
@"问题知识"
forState
:
UIControlStateNormal
];
[
self
.
questionBtn
setTitle
:
@"问题知识"
forState
:
UIControlStateNormal
];
[
self
.
rankBtn
setTitle
:
@"口碑巡检"
forState
:
UIControlStateNormal
];
[
self
.
rankBtn
setTitle
:
@"口碑巡检"
forState
:
UIControlStateNormal
];
...
@@ -85,7 +85,7 @@
...
@@ -85,7 +85,7 @@
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"口碑标准"
])
{
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"口碑标准"
])
{
StandardViewController
*
standardVC
=
[[
StandardViewController
alloc
]
init
];
StandardViewController
*
standardVC
=
[[
StandardViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
standardVC
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
standardVC
];
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"
图说口碑
"
])
{
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"
口碑现场
"
])
{
PicCategoryViewController
*
pictureVC
=
[[
PicCategoryViewController
alloc
]
init
];
PicCategoryViewController
*
pictureVC
=
[[
PicCategoryViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
pictureVC
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
pictureVC
];
...
@@ -95,11 +95,11 @@
...
@@ -95,11 +95,11 @@
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"口碑报告"
])
{
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"口碑报告"
])
{
RankingListViewController
*
rankingListVC
=
[[
RankingListViewController
alloc
]
init
];
RankingListViewController
*
rankingListVC
=
[[
RankingListViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
rankingListVC
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
rankingListVC
];
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"
商场风采
"
])
{
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"
口碑随手拍
"
])
{
PictureViewController
*
pic
=
[[
PictureViewController
alloc
]
init
];
PictureViewController
*
pic
=
[[
PictureViewController
alloc
]
init
];
pic
.
come
=
@"首页"
;
pic
.
come
=
@"首页"
;
pic
.
category
=
@"store"
;
pic
.
category
=
@"store"
;
pic
.
titleStr
=
@"
商场风采
"
;
pic
.
titleStr
=
@"
口碑随手拍
"
;
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
pic
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
pic
];
}
else
{
}
else
{
return
;
return
;
...
...
redstar/Classes/Module/Function/OnLine/AddOnLine/View/OnLineFooterView.h
View file @
0b955368
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
@property
(
nonatomic
,
strong
)
UITextView
*
titleTextView
;
@property
(
nonatomic
,
strong
)
UITextView
*
titleTextView
;
@property
(
nonatomic
,
strong
)
UITextView
*
contentTextView
;
@property
(
nonatomic
,
strong
)
UITextView
*
contentTextView
;
@property
(
nonatomic
,
strong
)
UIButton
*
saveButton
;
@property
(
nonatomic
,
strong
)
UIButton
*
saveButton
;
@property
(
nonatomic
,
strong
)
UILabel
*
placeholderLabel1
;
@property
(
nonatomic
,
strong
)
UILabel
*
placeholderLabel2
;
@end
@end
redstar/Classes/Module/Function/OnLine/AddOnLine/View/OnLineFooterView.m
View file @
0b955368
...
@@ -8,12 +8,11 @@
...
@@ -8,12 +8,11 @@
#import "OnLineFooterView.h"
#import "OnLineFooterView.h"
@interface
OnLineFooterView
()
<
UITextViewDelegate
>
@interface
OnLineFooterView
()
@property
(
nonatomic
,
strong
)
UIImageView
*
backImageView1
;
@property
(
nonatomic
,
strong
)
UIImageView
*
backImageView1
;
@property
(
nonatomic
,
strong
)
UIImageView
*
backImageView2
;
@property
(
nonatomic
,
strong
)
UIImageView
*
backImageView2
;
@property
(
nonatomic
,
strong
)
UILabel
*
placeholderLabel1
;
@property
(
nonatomic
,
strong
)
UILabel
*
placeholderLabel2
;
@end
@end
...
@@ -94,35 +93,6 @@
...
@@ -94,35 +93,6 @@
}
}
#pragma mark - UITextView Delegate
-
(
BOOL
)
textView
:
(
UITextView
*
)
textView
shouldChangeTextInRange
:
(
NSRange
)
range
replacementText
:
(
NSString
*
)
text
{
if
(
!
[
text
isEqualToString
:
@""
])
{
if
(
textView
.
tag
==
1001
)
{
_placeholderLabel1
.
hidden
=
YES
;
}
else
{
_placeholderLabel2
.
hidden
=
YES
;
}
}
if
([
text
isEqualToString
:
@""
]
&&
range
.
location
==
0
&&
range
.
length
==
1
)
{
if
(
textView
.
tag
==
1001
)
{
_placeholderLabel1
.
hidden
=
NO
;
}
else
{
_placeholderLabel2
.
hidden
=
NO
;
}
}
if
([
text
isEqualToString
:
@"
\n
"
])
{
[
self
.
titleTextView
resignFirstResponder
];
[
self
.
contentTextView
resignFirstResponder
];
return
NO
;
}
return
YES
;
}
#pragma mark - lazy loading
#pragma mark - lazy loading
-
(
UIImageView
*
)
backImageView1
-
(
UIImageView
*
)
backImageView1
...
@@ -176,7 +146,6 @@
...
@@ -176,7 +146,6 @@
if
(
!
_titleTextView
)
{
if
(
!
_titleTextView
)
{
_titleTextView
=
[[
UITextView
alloc
]
init
];
_titleTextView
=
[[
UITextView
alloc
]
init
];
_titleTextView
.
tag
=
1001
;
_titleTextView
.
tag
=
1001
;
_titleTextView
.
delegate
=
self
;
_titleTextView
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
_titleTextView
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
_titleTextView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_titleTextView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
.
backImageView1
addSubview
:
_titleTextView
];
[
self
.
backImageView1
addSubview
:
_titleTextView
];
...
@@ -202,7 +171,6 @@
...
@@ -202,7 +171,6 @@
_contentTextView
=
[[
UITextView
alloc
]
init
];
_contentTextView
=
[[
UITextView
alloc
]
init
];
_contentTextView
.
tag
=
1002
;
_contentTextView
.
tag
=
1002
;
_contentTextView
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
_contentTextView
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
_contentTextView
.
delegate
=
self
;
_contentTextView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_contentTextView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
.
backImageView2
addSubview
:
_contentTextView
];
[
self
.
backImageView2
addSubview
:
_contentTextView
];
...
...
redstar/Classes/Module/Function/OnLine/AddOnLine/ViewController/OnLineViewController.m
View file @
0b955368
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
#define kOnLineTableViewCell @"onlineTableViewCell"
#define kOnLineTableViewCell @"onlineTableViewCell"
@interface
OnLineViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
UIAlertViewDelegate
,
SelectStoreDelegate
>
@interface
OnLineViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
UIAlertViewDelegate
,
SelectStoreDelegate
,
UITextViewDelegate
>
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
NSArray
*
titleArray
;
@property
(
nonatomic
,
strong
)
NSArray
*
titleArray
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
uuidArray
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
uuidArray
;
...
@@ -27,6 +27,9 @@
...
@@ -27,6 +27,9 @@
@property
(
nonatomic
,
strong
)
UIView
*
backGroundView
;
@property
(
nonatomic
,
strong
)
UIView
*
backGroundView
;
@property
(
nonatomic
,
strong
)
UIView
*
pickBackView
;
@property
(
nonatomic
,
strong
)
UIView
*
pickBackView
;
@property
(
nonatomic
,
strong
)
UIDatePicker
*
datePicker
;
@property
(
nonatomic
,
strong
)
UIDatePicker
*
datePicker
;
@property
(
nonatomic
,
strong
)
NSLayoutConstraint
*
tableBottom
;
@property
(
nonatomic
,
strong
)
NSLayoutConstraint
*
tableTop
;
@end
@end
@implementation
OnLineViewController
@implementation
OnLineViewController
...
@@ -313,8 +316,8 @@
...
@@ -313,8 +316,8 @@
_tableView
.
showsHorizontalScrollIndicator
=
NO
;
_tableView
.
showsHorizontalScrollIndicator
=
NO
;
[
self
.
view
addSubview
:
_tableView
];
[
self
.
view
addSubview
:
_tableView
];
NSLayoutConstraint
*
tableTop
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
self
.
tableTop
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
tableTop
];
[
self
.
view
addConstraint
:
_
tableTop
];
NSLayoutConstraint
*
tableLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
NSLayoutConstraint
*
tableLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
tableLeft
];
[
self
.
view
addConstraint
:
tableLeft
];
...
@@ -322,8 +325,8 @@
...
@@ -322,8 +325,8 @@
NSLayoutConstraint
*
tableRight
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
NSLayoutConstraint
*
tableRight
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
tableRight
];
[
self
.
view
addConstraint
:
tableRight
];
NSLayoutConstraint
*
tableBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
self
.
tableBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
tableBottom
];
[
self
.
view
addConstraint
:
_
tableBottom
];
}
}
return
_tableView
;
return
_tableView
;
}
}
...
@@ -336,11 +339,60 @@
...
@@ -336,11 +339,60 @@
}
else
{
}
else
{
_footView
=
[[
OnLineFooterView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
kScreenWidth
,
(
kScreenHeight
-
100
-
64
))];
_footView
=
[[
OnLineFooterView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
kScreenWidth
,
(
kScreenHeight
-
100
-
64
))];
}
}
_footView
.
titleTextView
.
delegate
=
self
;
_footView
.
contentTextView
.
delegate
=
self
;
[
_footView
.
saveButton
addTarget
:
self
action
:
@selector
(
saveClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
_footView
.
saveButton
addTarget
:
self
action
:
@selector
(
saveClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
}
}
return
_footView
;
return
_footView
;
}
}
#pragma mark - UITextView Delegate
-
(
void
)
textViewDidBeginEditing
:
(
UITextView
*
)
textView
{
self
.
tableTop
.
constant
=
-
216
;
self
.
tableBottom
.
constant
=
-
216
;
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
[
self
.
tableView
layoutIfNeeded
];
}];
}
-
(
void
)
textViewDidEndEditing
:
(
UITextView
*
)
textView
{
self
.
tableTop
.
constant
=
0
;
self
.
tableBottom
.
constant
=
0
;
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
[
self
.
tableView
layoutIfNeeded
];
}];
}
-
(
BOOL
)
textView
:
(
UITextView
*
)
textView
shouldChangeTextInRange
:
(
NSRange
)
range
replacementText
:
(
NSString
*
)
text
{
if
(
!
[
text
isEqualToString
:
@""
])
{
if
(
textView
.
tag
==
1001
)
{
self
.
footView
.
placeholderLabel1
.
hidden
=
YES
;
}
else
{
self
.
footView
.
placeholderLabel2
.
hidden
=
YES
;
}
}
if
([
text
isEqualToString
:
@""
]
&&
range
.
location
==
0
&&
range
.
length
==
1
)
{
if
(
textView
.
tag
==
1001
)
{
self
.
footView
.
placeholderLabel1
.
hidden
=
NO
;
}
else
{
self
.
footView
.
placeholderLabel2
.
hidden
=
NO
;
}
}
if
([
text
isEqualToString
:
@"
\n
"
])
{
[
self
.
footView
.
titleTextView
resignFirstResponder
];
[
self
.
footView
.
contentTextView
resignFirstResponder
];
return
NO
;
}
return
YES
;
}
/*
/*
#pragma mark - Navigation
#pragma mark - Navigation
...
...
redstar/Classes/Module/Function/Picture/AddPicture/ViewController/AddPictureViewController.m
View file @
0b955368
...
@@ -35,6 +35,8 @@
...
@@ -35,6 +35,8 @@
@property
(
nonatomic
,
strong
)
UIActionSheet
*
selectActionSheet
;
@property
(
nonatomic
,
strong
)
UIActionSheet
*
selectActionSheet
;
@property
(
nonatomic
,
copy
)
NSString
*
praiseUuid
;
@property
(
nonatomic
,
copy
)
NSString
*
praiseUuid
;
@property
(
nonatomic
,
strong
)
NSLayoutConstraint
*
tableTop
;
@property
(
nonatomic
,
strong
)
NSLayoutConstraint
*
tableBottom
;
@end
@end
...
@@ -90,7 +92,7 @@
...
@@ -90,7 +92,7 @@
-
(
void
)
doBack
:
(
id
)
sender
-
(
void
)
doBack
:
(
id
)
sender
{
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"您确定要放弃编辑当前
图说口碑
吗?"
delegate
:
self
cancelButtonTitle
:
@"取消"
otherButtonTitles
:
@"确定"
,
nil
];
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"您确定要放弃编辑当前
口碑现场
吗?"
delegate
:
self
cancelButtonTitle
:
@"取消"
otherButtonTitles
:
@"确定"
,
nil
];
alert
.
tag
=
9211232
;
alert
.
tag
=
9211232
;
[
alert
show
];
[
alert
show
];
...
@@ -224,6 +226,24 @@
...
@@ -224,6 +226,24 @@
}
}
#pragma mark - UItextView
#pragma mark - UItextView
-
(
void
)
textViewDidBeginEditing
:
(
UITextView
*
)
textView
{
self
.
tableTop
.
constant
=
-
100
;
self
.
tableBottom
.
constant
=
-
100
;
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
[
self
.
tableView
layoutIfNeeded
];
}];
}
-
(
void
)
textViewDidEndEditing
:
(
UITextView
*
)
textView
{
self
.
tableTop
.
constant
=
0
;
self
.
tableBottom
.
constant
=
0
;
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
[
self
.
tableView
layoutIfNeeded
];
}];
}
-
(
BOOL
)
textView
:
(
UITextView
*
)
textView
shouldChangeTextInRange
:
(
NSRange
)
range
replacementText
:
(
NSString
*
)
text
-
(
BOOL
)
textView
:
(
UITextView
*
)
textView
shouldChangeTextInRange
:
(
NSRange
)
range
replacementText
:
(
NSString
*
)
text
{
{
AddPictureTableCell
*
cell
=
[
_tableView
cellForRowAtIndexPath
:[
NSIndexPath
indexPathForRow
:
0
inSection
:
0
]];
AddPictureTableCell
*
cell
=
[
_tableView
cellForRowAtIndexPath
:[
NSIndexPath
indexPathForRow
:
0
inSection
:
0
]];
...
@@ -484,8 +504,8 @@
...
@@ -484,8 +504,8 @@
[
_tableView
registerClass
:[
AddButtonTableViewCell
class
]
forCellReuseIdentifier
:
kAddButtonCell
];
[
_tableView
registerClass
:[
AddButtonTableViewCell
class
]
forCellReuseIdentifier
:
kAddButtonCell
];
[
self
.
view
addSubview
:
_tableView
];
[
self
.
view
addSubview
:
_tableView
];
NSLayoutConstraint
*
tableTop
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
self
.
tableTop
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
tableTop
];
[
self
.
view
addConstraint
:
_
tableTop
];
NSLayoutConstraint
*
tableLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
NSLayoutConstraint
*
tableLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
tableLeft
];
[
self
.
view
addConstraint
:
tableLeft
];
...
@@ -493,8 +513,8 @@
...
@@ -493,8 +513,8 @@
NSLayoutConstraint
*
tableRight
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
NSLayoutConstraint
*
tableRight
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
tableRight
];
[
self
.
view
addConstraint
:
tableRight
];
NSLayoutConstraint
*
tableBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
self
.
tableBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
tableBottom
];
[
self
.
view
addConstraint
:
_
tableBottom
];
}
}
return
_tableView
;
return
_tableView
;
}
}
...
...
redstar/Classes/Module/Function/Picture/PictureCategory/ViewController/PicCategoryViewController.m
View file @
0b955368
...
@@ -23,11 +23,11 @@
...
@@ -23,11 +23,11 @@
-
(
void
)
viewWillAppear
:(
BOOL
)
animated
{
-
(
void
)
viewWillAppear
:(
BOOL
)
animated
{
[
super
viewWillAppear
:
animated
];
[
super
viewWillAppear
:
animated
];
[
MobClick
beginLogPageView
:
@"
图说口碑
"
];
[
MobClick
beginLogPageView
:
@"
口碑现场
"
];
}
}
-
(
void
)
viewWillDisappear
:(
BOOL
)
animated
{
-
(
void
)
viewWillDisappear
:(
BOOL
)
animated
{
[
super
viewWillDisappear
:
animated
];
[
super
viewWillDisappear
:
animated
];
[
MobClick
endLogPageView
:
@"
图说口碑
"
];
[
MobClick
endLogPageView
:
@"
口碑现场
"
];
}
}
-
(
void
)
viewDidLoad
{
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
[
super
viewDidLoad
];
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
[
self
setupNav
];
[
self
setupNav
];
self
.
titleArray
=
[
NSArray
arrayWithObjects
:
@"
商场风采"
,
@"优秀案例"
,
@"巡店报告
"
,
nil
];
self
.
titleArray
=
[
NSArray
arrayWithObjects
:
@"
口碑随手拍"
,
@"口碑报道"
,
@"口碑巡店
"
,
nil
];
//self.detailTitleArray = [NSArray arrayWithObjects:@"SOP:标准作业程序",@"内部精品培训课程讲义资料...",@"专家讲师精品课程视频分享...", nil];
//self.detailTitleArray = [NSArray arrayWithObjects:@"SOP:标准作业程序",@"内部精品培训课程讲义资料...",@"专家讲师精品课程视频分享...", nil];
self
.
tableView
.
delegate
=
self
;
self
.
tableView
.
delegate
=
self
;
self
.
tableView
.
dataSource
=
self
;
self
.
tableView
.
dataSource
=
self
;
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
{
{
UILabel
*
customLab
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
40
,
30
)];
UILabel
*
customLab
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
40
,
30
)];
[
customLab
setTextColor
:[
UIColor
whiteColor
]];
[
customLab
setTextColor
:[
UIColor
whiteColor
]];
[
customLab
setText
:
@"
图说口碑
"
];
[
customLab
setText
:
@"
口碑现场
"
];
customLab
.
font
=
[
UIFont
boldSystemFontOfSize
:
19
];
customLab
.
font
=
[
UIFont
boldSystemFontOfSize
:
19
];
self
.
navigationItem
.
titleView
=
customLab
;
self
.
navigationItem
.
titleView
=
customLab
;
...
...
redstar/Classes/Module/Function/Picture/PictureDetail/ViewController/PictureStoryViewController.m
View file @
0b955368
...
@@ -32,6 +32,8 @@
...
@@ -32,6 +32,8 @@
#import "AttachmentModel.h"
#import "AttachmentModel.h"
#import "ReaderViewController.h"
#import "ReaderViewController.h"
#define CategrayTitle @"口碑报道"
#define kPictureDetailTableCell @"PictureDetailTableViewCell"
#define kPictureDetailTableCell @"PictureDetailTableViewCell"
#define kPictureTextTableCell @"PictureTextTableViewCell"
#define kPictureTextTableCell @"PictureTextTableViewCell"
#define kPictureCommentTableCell @"pictureCommentTableViewCell"
#define kPictureCommentTableCell @"pictureCommentTableViewCell"
...
@@ -102,7 +104,6 @@
...
@@ -102,7 +104,6 @@
NSDictionary
*
dataDict
=
response
[
@"data"
];
NSDictionary
*
dataDict
=
response
[
@"data"
];
NSLog
(
@"巡店报告 = %@"
,
dataDict
);
PictureDetailModel
*
picDetail
=
[[
PictureDetailModel
alloc
]
init
];
PictureDetailModel
*
picDetail
=
[[
PictureDetailModel
alloc
]
init
];
[
picDetail
setValuesForKeysWithDictionary
:
dataDict
];
[
picDetail
setValuesForKeysWithDictionary
:
dataDict
];
_pictureDetail
=
picDetail
;
_pictureDetail
=
picDetail
;
...
@@ -360,7 +361,7 @@
...
@@ -360,7 +361,7 @@
#pragma mark - UITableView DataSource/Delegate
#pragma mark - UITableView DataSource/Delegate
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
{
{
if
([
self
.
titleStr
isEqualToString
:
@"巡店报告"
])
{
if
([
self
.
titleStr
isEqualToString
:
CategrayTitle
])
{
return
4
;
return
4
;
}
else
{
}
else
{
return
3
;
return
3
;
...
@@ -374,7 +375,7 @@
...
@@ -374,7 +375,7 @@
}
else
if
(
section
==
1
)
{
}
else
if
(
section
==
1
)
{
return
_picTextArray
.
count
;
return
_picTextArray
.
count
;
}
else
{
}
else
{
if
([
self
.
titleStr
isEqualToString
:
@"巡店报告"
])
{
if
([
self
.
titleStr
isEqualToString
:
CategrayTitle
])
{
if
(
section
==
2
)
{
if
(
section
==
2
)
{
return
_attachmentArray
.
count
;
return
_attachmentArray
.
count
;
}
else
{
}
else
{
...
@@ -462,9 +463,9 @@
...
@@ -462,9 +463,9 @@
return
cell
;
return
cell
;
}
}
}
else
{
}
else
{
// 判断当前页面是否为
巡店报告
// 判断当前页面是否为
口碑巡店
if
([
self
.
titleStr
isEqualToString
:
@"巡店报告"
])
{
if
([
self
.
titleStr
isEqualToString
:
CategrayTitle
])
{
// 是
巡店报告
// 是
口碑巡店
if
(
indexPath
.
section
==
2
)
{
if
(
indexPath
.
section
==
2
)
{
// 显示 附件cell
// 显示 附件cell
...
@@ -641,7 +642,13 @@
...
@@ -641,7 +642,13 @@
// 自定义section
// 自定义section
-
(
UIView
*
)
tableView
:
(
UITableView
*
)
tableView
viewForHeaderInSection
:
(
NSInteger
)
section
-
(
UIView
*
)
tableView
:
(
UITableView
*
)
tableView
viewForHeaderInSection
:
(
NSInteger
)
section
{
{
if
(
section
==
2
)
{
NSInteger
num
=
0
;
if
([
self
.
titleStr
isEqualToString
:
CategrayTitle
])
{
num
=
3
;
}
else
{
num
=
2
;
}
if
(
section
==
num
)
{
// 创建sectionView
// 创建sectionView
UIView
*
sectionView
=
[[
UIView
alloc
]
init
];
UIView
*
sectionView
=
[[
UIView
alloc
]
init
];
sectionView
.
userInteractionEnabled
=
YES
;
sectionView
.
userInteractionEnabled
=
YES
;
...
@@ -703,12 +710,21 @@
...
@@ -703,12 +710,21 @@
// section高度
// section高度
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForHeaderInSection
:
(
NSInteger
)
section
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForHeaderInSection
:
(
NSInteger
)
section
{
{
if
(
section
==
2
)
{
if
([
self
.
titleStr
isEqualToString
:
CategrayTitle
])
{
return
50
;
if
(
section
==
3
)
{
return
50
;
}
else
{
return
CGFLOAT_MIN
;
}
}
else
{
}
else
{
return
CGFLOAT_MIN
;
if
(
section
==
2
)
{
return
50
;
}
else
{
return
CGFLOAT_MIN
;
}
}
}
}
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForFooterInSection
:
(
NSInteger
)
section
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForFooterInSection
:
(
NSInteger
)
section
...
...
redstar/Classes/Module/Function/Picture/PictureList/ViewController/PictureViewController.m
View file @
0b955368
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
@implementation
PictureViewController
@implementation
PictureViewController
-
(
void
)
viewWillAppear
:(
BOOL
)
animated
{
-
(
void
)
viewWillAppear
:(
BOOL
)
animated
{
[
super
viewWillAppear
:
animated
];
[
super
viewWillAppear
:
animated
];
[
MobClick
beginLogPageView
:
@"
商场风采
"
];
[
MobClick
beginLogPageView
:
@"
口碑随手拍
"
];
}
}
-
(
void
)
viewWillDisappear
:(
BOOL
)
animated
{
-
(
void
)
viewWillDisappear
:(
BOOL
)
animated
{
...
@@ -133,7 +133,7 @@
...
@@ -133,7 +133,7 @@
[
self
.
navigationController
pushViewController
:
addPic
animated
:
YES
];
[
self
.
navigationController
pushViewController
:
addPic
animated
:
YES
];
}
else
{
}
else
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"您没有新增
图说口碑
的权限!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"您没有新增
口碑现场
的权限!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
[
alert
show
];
[
alert
show
];
}
}
}
}
...
...
redstar/Classes/Module/Function/Question/QuestionList/ViewController/QuestionViewController.m
View file @
0b955368
...
@@ -646,7 +646,6 @@
...
@@ -646,7 +646,6 @@
@"direction"
:
@"asc"
}];
@"direction"
:
@"asc"
}];
[
parameters
setObject
:
array
forKey
:
@"queryOrders"
];
[
parameters
setObject
:
array
forKey
:
@"queryOrders"
];
}
}
NSLog
(
@"问题与知识parameters = %@"
,
parameters
);
// 请求问题列表
// 请求问题列表
[
httpClient
getQuestionListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
[
httpClient
getQuestionListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSDictionary
*
dataDict
=
(
NSDictionary
*
)
response
[
@"data"
];
NSDictionary
*
dataDict
=
(
NSDictionary
*
)
response
[
@"data"
];
...
@@ -822,17 +821,19 @@
...
@@ -822,17 +821,19 @@
// cell点击事件
// cell点击事件
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
{
// 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
];
QuestionModel
*
question
=
(
QuestionModel
*
)
_allQuestionArray
[
indexPath
.
row
];
questionDetailVC
.
questionUuid
=
question
.
uuid
;
if
([
question
.
state
isEqualToString
:
@"created"
])
{
questionDetailVC
.
row
=
indexPath
.
row
;
QuestionUnsolvedViewController
*
questionDetailVC
=
[[
QuestionUnsolvedViewController
alloc
]
init
];
[
self
.
navigationController
pushViewController
:
questionDetailVC
animated
:
YES
];
questionDetailVC
.
questionUuid
=
question
.
uuid
;
questionDetailVC
.
row
=
indexPath
.
row
;
[
self
.
navigationController
pushViewController
:
questionDetailVC
animated
:
YES
];
}
else
{
QuestionDetailViewController
*
questionDetailVC
=
[[
QuestionDetailViewController
alloc
]
init
];
questionDetailVC
.
questionUuid
=
question
.
uuid
;
questionDetailVC
.
row
=
indexPath
.
row
;
[
self
.
navigationController
pushViewController
:
questionDetailVC
animated
:
YES
];
}
}
}
// cell的高度
// cell的高度
...
...
redstar/Classes/Module/Function/Question/QuestionUnsolved/FeedContentTableCell.h
View file @
0b955368
...
@@ -11,8 +11,8 @@
...
@@ -11,8 +11,8 @@
@interface
FeedContentTableCell
:
UITableViewCell
@interface
FeedContentTableCell
:
UITableViewCell
@property
(
nonatomic
,
strong
)
UILabel
*
titleLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
titleLabel
;
@property
(
nonatomic
,
strong
)
UIImageView
*
backImageView1
;
@property
(
nonatomic
,
strong
)
UIImageView
*
backImageView1
;
@property
(
nonatomic
,
strong
)
UITextView
*
titleTextView
;
//
@property (nonatomic, strong) UITextView *titleTextView;
@property
(
nonatomic
,
strong
)
UILabel
*
placeholderLabel1
;
//
@property (nonatomic, strong) UILabel *placeholderLabel1;
@property
(
nonatomic
,
strong
)
UIButton
*
changeBtn
;
// 修改问题分类
@property
(
nonatomic
,
strong
)
UIButton
*
changeBtn
;
// 修改问题分类
@property
(
nonatomic
,
strong
)
UIButton
*
solveBtn
;
// 解决问题
@property
(
nonatomic
,
strong
)
UIButton
*
solveBtn
;
// 解决问题
...
...
redstar/Classes/Module/Function/Question/QuestionUnsolved/FeedContentTableCell.m
View file @
0b955368
...
@@ -61,55 +61,55 @@
...
@@ -61,55 +61,55 @@
return
_backImageView1
;
return
_backImageView1
;
}
}
-
(
UITextView
*
)
titleTextView
//
- (UITextView *)titleTextView
{
//
{
if
(
!
_titleTextView
)
{
//
if (!_titleTextView) {
_titleTextView
=
[[
UITextView
alloc
]
init
];
//
_titleTextView = [[UITextView alloc] init];
_titleTextView
.
tag
=
1001
;
//
_titleTextView.tag = 1001;
_titleTextView
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
//
_titleTextView.font = [UIFont systemFontOfSize:15.0];
_titleTextView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
//
_titleTextView.translatesAutoresizingMaskIntoConstraints = NO;
[
self
.
backImageView1
addSubview
:
_titleTextView
];
//
[self.backImageView1 addSubview:_titleTextView];
//
NSLayoutConstraint
*
contentTop
=
[
NSLayoutConstraint
constraintWithItem
:
_titleTextView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
backImageView1
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
1
];
//
NSLayoutConstraint *contentTop = [NSLayoutConstraint constraintWithItem:_titleTextView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.backImageView1 attribute:NSLayoutAttributeTop multiplier:1.0 constant:1];
[
self
.
backImageView1
addConstraint
:
contentTop
];
//
[self.backImageView1 addConstraint:contentTop];
//
NSLayoutConstraint
*
contentLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_titleTextView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
backImageView1
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
1
];
//
NSLayoutConstraint *contentLeft = [NSLayoutConstraint constraintWithItem:_titleTextView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.backImageView1 attribute:NSLayoutAttributeLeft multiplier:1.0 constant:1];
[
self
.
backImageView1
addConstraint
:
contentLeft
];
//
[self.backImageView1 addConstraint:contentLeft];
//
NSLayoutConstraint
*
contentRight
=
[
NSLayoutConstraint
constraintWithItem
:
_titleTextView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
backImageView1
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:-
1
];
//
NSLayoutConstraint *contentRight = [NSLayoutConstraint constraintWithItem:_titleTextView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.backImageView1 attribute:NSLayoutAttributeRight multiplier:1.0 constant:-1];
[
self
.
backImageView1
addConstraint
:
contentRight
];
//
[self.backImageView1 addConstraint:contentRight];
//
NSLayoutConstraint
*
contentHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_titleTextView
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
backImageView1
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:-
1
];
//
NSLayoutConstraint *contentHeight = [NSLayoutConstraint constraintWithItem:_titleTextView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.backImageView1 attribute:NSLayoutAttributeBottom multiplier:1.0 constant:-1];
[
self
.
backImageView1
addConstraint
:
contentHeight
];
//
[self.backImageView1 addConstraint:contentHeight];
}
//
}
return
_titleTextView
;
//
return _titleTextView;
}
//
}
//
//
//
-
(
UILabel
*
)
placeholderLabel1
//
- (UILabel *)placeholderLabel1
{
//
{
if
(
!
_placeholderLabel1
)
{
//
if (!_placeholderLabel1) {
_placeholderLabel1
=
[[
UILabel
alloc
]
init
];
//
_placeholderLabel1 = [[UILabel alloc] init];
_placeholderLabel1
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
//
_placeholderLabel1.translatesAutoresizingMaskIntoConstraints = NO;
_placeholderLabel1
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
//
_placeholderLabel1.font = [UIFont systemFontOfSize:15.0];
_placeholderLabel1
.
textColor
=
kOnLineCellDetailColor
;
//
_placeholderLabel1.textColor = kOnLineCellDetailColor;
[
self
.
titleTextView
addSubview
:
_placeholderLabel1
];
//
[self.titleTextView addSubview:_placeholderLabel1];
//
NSLayoutConstraint
*
contentTop
=
[
NSLayoutConstraint
constraintWithItem
:
_placeholderLabel1
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
titleTextView
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
2
];
//
NSLayoutConstraint *contentTop = [NSLayoutConstraint constraintWithItem:_placeholderLabel1 attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.titleTextView attribute:NSLayoutAttributeTop multiplier:1.0 constant:2];
[
self
.
titleTextView
addConstraint
:
contentTop
];
//
[self.titleTextView addConstraint:contentTop];
//
NSLayoutConstraint
*
contentLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_placeholderLabel1
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
titleTextView
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
5
];
//
NSLayoutConstraint *contentLeft = [NSLayoutConstraint constraintWithItem:_placeholderLabel1 attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.titleTextView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:5];
[
self
.
titleTextView
addConstraint
:
contentLeft
];
//
[self.titleTextView addConstraint:contentLeft];
//
NSLayoutConstraint
*
contentRight
=
[
NSLayoutConstraint
constraintWithItem
:
_placeholderLabel1
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
titleTextView
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
//
NSLayoutConstraint *contentRight = [NSLayoutConstraint constraintWithItem:_placeholderLabel1 attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.titleTextView attribute:NSLayoutAttributeRight multiplier:1.0 constant:0];
[
self
.
titleTextView
addConstraint
:
contentRight
];
//
[self.titleTextView addConstraint:contentRight];
//
NSLayoutConstraint
*
contentHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_placeholderLabel1
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
30
];
//
NSLayoutConstraint *contentHeight = [NSLayoutConstraint constraintWithItem:_placeholderLabel1 attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:30];
[
self
.
titleTextView
addConstraint
:
contentHeight
];
//
[self.titleTextView addConstraint:contentHeight];
}
//
}
return
_placeholderLabel1
;
//
return _placeholderLabel1;
}
//
}
-
(
UIButton
*
)
changeBtn
{
-
(
UIButton
*
)
changeBtn
{
if
(
!
_changeBtn
)
{
if
(
!
_changeBtn
)
{
...
...
redstar/Classes/Module/Function/Question/QuestionUnsolved/QuestionDealWithView.h
View file @
0b955368
...
@@ -8,17 +8,24 @@
...
@@ -8,17 +8,24 @@
#import <UIKit/UIKit.h>
#import <UIKit/UIKit.h>
#import "SelectCategaryViewController.h"
@protocol
QuestionDealWithDelegate
<
NSObject
>
@protocol
QuestionDealWithDelegate
<
NSObject
>
-
(
void
)
tableDidSelectAtIndexPath
:
(
NSIndexPath
*
)
indexPath
;
-
(
void
)
tableDidSelectAtIndexPath
:
(
NSIndexPath
*
)
indexPath
nameArray
:
(
NSArray
*
)
nameArray
;
// 按钮点击事件
-
(
void
)
requestProlemDealWithResultWithGroupText
:(
NSString
*
)
groupText
categoryText
:(
NSString
*
)
categoryText
solutionType
:(
NSString
*
)
solutionType
optionType
:(
NSString
*
)
optionType
;
@end
@end
@interface
QuestionDealWithView
:
UIView
@interface
QuestionDealWithView
:
UIView
<
SelectCategaryDelegate
>
@property
(
nonatomic
,
strong
)
UILabel
*
titleLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
titleLabel
;
@property
(
nonatomic
,
strong
)
UIButton
*
quitBtn
;
@property
(
nonatomic
,
strong
)
UIButton
*
quitBtn
;
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
UILabel
*
groupTitle
;
@property
(
nonatomic
,
strong
)
UILabel
*
categoryTitle
;
@property
(
nonatomic
,
assign
)
id
<
QuestionDealWithDelegate
>
delegate
;
@property
(
nonatomic
,
assign
)
id
<
QuestionDealWithDelegate
>
delegate
;
@property
(
nonatomic
,
strong
)
UITextView
*
titleTextView
;
@property
(
nonatomic
,
strong
)
UILabel
*
placeholderLabel1
;
@end
@end
redstar/Classes/Module/Function/Question/QuestionUnsolved/QuestionDealWithView.m
View file @
0b955368
...
@@ -13,14 +13,29 @@
...
@@ -13,14 +13,29 @@
#import "HttpClient.h"
#import "HttpClient.h"
#import <MBProgressHUD.h>
#import <MBProgressHUD.h>
#import "SelectCategaryViewController.h"
#define kSolvedTypeTableViewCell @"solveTypeTableCell"
#define kSolvedTypeTableViewCell @"solveTypeTableCell"
#define kFeedContentTableCell @"feedContentTableCell"
#define kFeedContentTableCell @"feedContentTableCell"
@interface
QuestionDealWithView
()
<
UITableViewDelegate
,
UITableViewDataSource
>
@interface
QuestionDealWithView
()
<
UITableViewDelegate
,
UITableViewDataSource
>
@property
(
nonatomic
,
strong
)
UIButton
*
selectButton
;
@property
(
nonatomic
,
strong
)
UIButton
*
selectButton
;
@property
(
nonatomic
,
assign
)
BOOL
isComplete
;
@property
(
nonatomic
,
assign
)
BOOL
isLoad
;
@property
(
nonatomic
,
strong
)
NSMutableDictionary
*
groupUuidDict
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
categoryArray
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
questionArray
;
@property
(
nonatomic
,
assign
)
NSInteger
groupNum
;
@property
(
nonatomic
,
assign
)
NSInteger
categoryNum
;
@end
@end
@implementation
QuestionDealWithView
@implementation
QuestionDealWithView
-
(
instancetype
)
init
-
(
instancetype
)
init
{
{
self
=
[
super
init
];
self
=
[
super
init
];
...
@@ -49,60 +64,85 @@
...
@@ -49,60 +64,85 @@
_selectButton
=
[[
UIButton
alloc
]
init
];
_selectButton
=
[[
UIButton
alloc
]
init
];
_selectButton
.
tag
=
323118
;
_selectButton
.
tag
=
323118
;
// [self requestGroupTitle];
_isComplete
=
NO
;
_isLoad
=
NO
;
_groupNum
=
0
;
_categoryNum
=
0
;
self
.
groupUuidDict
=
[
NSMutableDictionary
dictionary
];
self
.
categoryArray
=
[
NSMutableArray
array
];
self
.
questionArray
=
[
NSMutableArray
array
];
[
self
requestGroupTitle
];
}
}
-
(
void
)
selectCategaryWithIndexPath
:
(
NSIndexPath
*
)
indexPath
rowNum
:
(
NSInteger
)
rowNum
{
if
(
rowNum
==
0
)
{
_groupNum
=
indexPath
.
row
;
_categoryNum
=
0
;
if
(
_categoryArray
.
count
!=
0
)
{
NSString
*
nameStr
=
[
NSString
stringWithFormat
:
@"%@"
,
_categoryArray
[
_groupNum
]];
[
self
requestCategoryWithGroupUuid
:[
_groupUuidDict
objectForKey
:
nameStr
]];
}
}
else
{
_categoryNum
=
indexPath
.
row
;
[
self
.
tableView
reloadData
];
}
}
// 请求问题专业组
// 请求问题专业组
//- (void)requestGroupTitle
-
(
void
)
requestGroupTitle
//{
{
// HttpClient *httpClient = [[HttpClient alloc] initWithUrl:[NSString stringWithFormat:@"%@%@", kRedStarURL, kQuestionGroupURL]];
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kQuestionGroupURL
]];
// [MBProgressHUD showHUDAddedTo:self animated:YES];
[
httpClient
getQuestionGroupWithCompletion
:
^
(
id
response
,
NSError
*
error
)
{
// [httpClient getQuestionGroupWithCompletion:^(id response, NSError *error) {
NSDictionary
*
dataDict
=
response
[
@"data"
];
// NSDictionary *dataDict = response[@"data"];
NSArray
*
dataArray
=
dataDict
[
@"records"
];
// NSArray *dataArray = dataDict[@"records"];
NSMutableDictionary
*
dict
=
[
NSMutableDictionary
dictionary
];
// NSMutableDictionary *dict = [NSMutableDictionary dictionary];
NSMutableArray
*
nameArray
=
[
NSMutableArray
array
];
// NSMutableArray *nameArray = [NSMutableArray array];
for
(
NSDictionary
*
groupDict
in
dataArray
)
{
// for (NSDictionary *groupDict in dataArray) {
NSString
*
name
=
[
NSString
stringWithFormat
:
@"%@"
,
groupDict
[
@"name"
]];
// NSString *name = [NSString stringWithFormat:@"%@", groupDict[@"name"]];
NSString
*
groupUuid
=
[
NSString
stringWithFormat
:
@"%@"
,
groupDict
[
@"uuid"
]];
// NSString *groupUuid = [NSString stringWithFormat:@"%@", groupDict[@"uuid"]];
[
dict
setObject
:
groupUuid
forKey
:
name
];
// [dict setObject:groupUuid forKey:name];
[
nameArray
addObject
:
name
];
// [nameArray addObject:name];
}
// }
_groupUuidDict
=
dict
;
// _groupUuidDict = dict;
_categoryArray
=
nameArray
;
// _categoryArray = nameArray;
_isComplete
=
YES
;
// _isComplete = YES;
//
if
(
nameArray
.
count
!=
0
)
{
// if (nameArray.count != 0) {
NSString
*
nameStr
=
[
NSString
stringWithFormat
:
@"%@"
,
nameArray
[
0
]];
// NSString *nameStr = [NSString stringWithFormat:@"%@", nameArray[0]];
[
self
requestCategoryWithGroupUuid
:[
dict
objectForKey
:
nameStr
]];
// [self requestCategoryWithGroupUuid:[dict objectForKey:nameStr]];
}
// }
// [MBProgressHUD hideAllHUDsForView:self animated:YES];
[
self
.
tableView
reloadData
];
//
}];
// [self.tableView reloadData];
}
// }];
//}
-
(
void
)
requestCategoryWithGroupUuid
:
(
NSString
*
)
groupUuid
//
{
//- (void)requestCategoryWithGroupUuid:(NSString *)groupUuid
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@%@"
,
kRedStarURL
,
kQuestionCategoryURL
,
groupUuid
];
//{
url
=
[
url
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
];
// NSString *url = [NSString stringWithFormat:@"%@%@%@",kRedStarURL, kQuestionCategoryURL, groupUuid];
HttpClient
*
http
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
// url = [url stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
[
http
getQuestionCategoryWithCompletion
:
^
(
id
response
,
NSError
*
error
)
{
// HttpClient *http = [[HttpClient alloc] initWithUrl:url];
NSDictionary
*
dictData
=
response
[
@"data"
];
// [MBProgressHUD showHUDAddedTo:self animated:YES];
NSArray
*
array
=
dictData
[
@"records"
];
// [http getQuestionCategoryWithCompletion:^(id response, NSError *error) {
NSMutableArray
*
categoryArray
=
[
NSMutableArray
array
];
// NSDictionary *dictData = response[@"data"];
for
(
NSDictionary
*
dict
in
array
)
{
// NSArray *array = dictData[@"records"];
NSString
*
category
=
[
NSString
stringWithFormat
:
@"%@"
,
dict
[
@"name"
]];
// NSMutableArray *categoryArray = [NSMutableArray array];
[
categoryArray
addObject
:
category
];
// for (NSDictionary *dict in array) {
}
// NSString *category = [NSString stringWithFormat:@"%@", dict[@"name"]];
_questionArray
=
categoryArray
;
// [categoryArray addObject:category];
_isLoad
=
YES
;
// }
[
self
.
tableView
reloadData
];
// _questionArray = categoryArray;
}];
// _isLoad = YES;
}
// [MBProgressHUD hideAllHUDsForView:self animated:YES];
// [self.tableView reloadData];
// }];
//}
#pragma mark - lazy loading
#pragma mark - lazy loading
...
@@ -216,8 +256,73 @@
...
@@ -216,8 +256,73 @@
cell
.
textLabel
.
textColor
=
kdetailCellTitleColor
;
cell
.
textLabel
.
textColor
=
kdetailCellTitleColor
;
if
(
indexPath
.
row
==
0
)
{
if
(
indexPath
.
row
==
0
)
{
cell
.
textLabel
.
text
=
@"专业组"
;
cell
.
textLabel
.
text
=
@"专业组"
;
if
(
!
self
.
groupTitle
)
{
self
.
groupTitle
=
[[
UILabel
alloc
]
init
];
}
_groupTitle
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_groupTitle
.
font
=
[
UIFont
systemFontOfSize
:
17
.
0
];
_groupTitle
.
textColor
=
[
UIColor
colorWithRed
:
136
/
255
.
0
green
:
137
/
255
.
0
blue
:
138
/
255
.
0
alpha
:
1
.
0
];;
if
(
_categoryArray
.
count
==
0
)
{
_groupTitle
.
text
=
@""
;
}
else
{
if
(
_isComplete
)
{
_groupTitle
.
text
=
_categoryArray
[
_groupNum
];
}
else
{
_groupTitle
.
text
=
@""
;
}
}
[
cell
.
contentView
addSubview
:
_groupTitle
];
// 顶端
NSLayoutConstraint
*
titleTop
=
[
NSLayoutConstraint
constraintWithItem
:
_groupTitle
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
cell
.
contentView
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
5
];
[
cell
.
contentView
addConstraint
:
titleTop
];
// 左边
NSLayoutConstraint
*
titleLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_groupTitle
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
cell
.
contentView
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
110
];
[
cell
.
contentView
addConstraint
:
titleLeft
];
// 右边
NSLayoutConstraint
*
titleWidth
=
[
NSLayoutConstraint
constraintWithItem
:
_groupTitle
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
cell
.
contentView
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
cell
.
contentView
addConstraint
:
titleWidth
];
// 高度
NSLayoutConstraint
*
titleHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_groupTitle
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
40
];
[
cell
.
contentView
addConstraint
:
titleHeight
];
}
else
{
}
else
{
cell
.
textLabel
.
text
=
@"问题分类"
;
cell
.
textLabel
.
text
=
@"问题分类"
;
if
(
!
self
.
categoryTitle
)
{
self
.
categoryTitle
=
[[
UILabel
alloc
]
init
];
}
_categoryTitle
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_categoryTitle
.
font
=
[
UIFont
systemFontOfSize
:
17
.
0
];
_categoryTitle
.
textColor
=
[
UIColor
colorWithRed
:
136
/
255
.
0
green
:
137
/
255
.
0
blue
:
138
/
255
.
0
alpha
:
1
.
0
];
if
(
_questionArray
.
count
==
0
)
{
_categoryTitle
.
text
=
@""
;
}
else
{
if
(
_isLoad
)
{
_categoryTitle
.
text
=
_questionArray
[
_categoryNum
];
}
else
{
_categoryTitle
.
text
=
@""
;
}
}
[
cell
.
contentView
addSubview
:
_categoryTitle
];
// 顶端
NSLayoutConstraint
*
titleTop
=
[
NSLayoutConstraint
constraintWithItem
:
_categoryTitle
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
cell
.
contentView
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
5
];
[
cell
.
contentView
addConstraint
:
titleTop
];
// 左边
NSLayoutConstraint
*
titleLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_categoryTitle
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
cell
.
contentView
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
110
];
[
cell
.
contentView
addConstraint
:
titleLeft
];
// 右边
NSLayoutConstraint
*
titleWidth
=
[
NSLayoutConstraint
constraintWithItem
:
_categoryTitle
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
cell
.
contentView
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
cell
.
contentView
addConstraint
:
titleWidth
];
// 高度
NSLayoutConstraint
*
titleHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_categoryTitle
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
40
];
[
cell
.
contentView
addConstraint
:
titleHeight
];
}
}
return
cell
;
return
cell
;
...
@@ -242,8 +347,53 @@
...
@@ -242,8 +347,53 @@
UIImage
*
image
=
[
UIImage
imageNamed
:
@"textbox"
];
UIImage
*
image
=
[
UIImage
imageNamed
:
@"textbox"
];
UIImage
*
resizingName
=
[
image
resizableImageWithCapInsets
:
UIEdgeInsetsMake
(
1
,
1
,
24
,
24
)
resizingMode
:
UIImageResizingModeStretch
];
UIImage
*
resizingName
=
[
image
resizableImageWithCapInsets
:
UIEdgeInsetsMake
(
1
,
1
,
24
,
24
)
resizingMode
:
UIImageResizingModeStretch
];
cell
.
backImageView1
.
image
=
resizingName
;
cell
.
backImageView1
.
image
=
resizingName
;
cell
.
titleTextView
.
backgroundColor
=
[
UIColor
clearColor
];
cell
.
placeholderLabel1
.
text
=
@"请输入反馈内容..."
;
self
.
titleTextView
.
tag
=
1001
;
_titleTextView
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
_titleTextView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_titleTextView
.
backgroundColor
=
[
UIColor
clearColor
];
[
cell
.
backImageView1
addSubview
:
_titleTextView
];
NSLayoutConstraint
*
contentTop
=
[
NSLayoutConstraint
constraintWithItem
:
_titleTextView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
cell
.
backImageView1
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
1
];
[
cell
.
backImageView1
addConstraint
:
contentTop
];
NSLayoutConstraint
*
contentLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_titleTextView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
cell
.
backImageView1
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
1
];
[
cell
.
backImageView1
addConstraint
:
contentLeft
];
NSLayoutConstraint
*
contentRight
=
[
NSLayoutConstraint
constraintWithItem
:
_titleTextView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
cell
.
backImageView1
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:-
1
];
[
cell
.
backImageView1
addConstraint
:
contentRight
];
NSLayoutConstraint
*
contentHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_titleTextView
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
cell
.
backImageView1
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:-
1
];
[
cell
.
backImageView1
addConstraint
:
contentHeight
];
if
(
!
_placeholderLabel1
)
{
_placeholderLabel1
=
[[
UILabel
alloc
]
init
];
}
_placeholderLabel1
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_placeholderLabel1
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
_placeholderLabel1
.
textColor
=
kOnLineCellDetailColor
;
_placeholderLabel1
.
text
=
@"请输入反馈内容..."
;
[
self
.
titleTextView
addSubview
:
_placeholderLabel1
];
NSLayoutConstraint
*
placeholderTop
=
[
NSLayoutConstraint
constraintWithItem
:
_placeholderLabel1
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
titleTextView
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
2
];
[
self
.
titleTextView
addConstraint
:
placeholderTop
];
NSLayoutConstraint
*
placeholderLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_placeholderLabel1
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
titleTextView
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
5
];
[
self
.
titleTextView
addConstraint
:
placeholderLeft
];
NSLayoutConstraint
*
placeholderRight
=
[
NSLayoutConstraint
constraintWithItem
:
_placeholderLabel1
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
titleTextView
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
self
.
titleTextView
addConstraint
:
placeholderRight
];
NSLayoutConstraint
*
placeholderHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_placeholderLabel1
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
30
];
[
self
.
titleTextView
addConstraint
:
placeholderHeight
];
[
cell
.
changeBtn
addTarget
:
self
action
:
@selector
(
changeClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
cell
.
changeBtn
addTarget
:
self
action
:
@selector
(
changeClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
cell
.
solveBtn
addTarget
:
self
action
:
@selector
(
solveClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
cell
.
solveBtn
addTarget
:
self
action
:
@selector
(
solveClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
...
@@ -255,26 +405,69 @@
...
@@ -255,26 +405,69 @@
}
}
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
if
([
_delegate
respondsToSelector
:
@selector
(
tableDidSelectAtIndexPath
:)])
{
NSArray
*
tempArray
=
[
NSArray
array
];
[
_delegate
tableDidSelectAtIndexPath
:
indexPath
];
if
(
indexPath
.
row
==
0
)
{
tempArray
=
_categoryArray
;
if
([
_delegate
respondsToSelector
:
@selector
(
tableDidSelectAtIndexPath
:
nameArray
:
)])
{
[
_delegate
tableDidSelectAtIndexPath
:
indexPath
nameArray
:
tempArray
];
}
}
else
if
(
indexPath
.
row
==
1
){
tempArray
=
_questionArray
;
if
([
_delegate
respondsToSelector
:
@selector
(
tableDidSelectAtIndexPath
:
nameArray
:
)])
{
[
_delegate
tableDidSelectAtIndexPath
:
indexPath
nameArray
:
tempArray
];
}
}
else
{
}
}
}
}
-
(
void
)
solveQues
:
(
UIButton
*
)
sender
{
-
(
void
)
solveQues
:
(
UIButton
*
)
sender
{
_selectButton
.
selected
=
NO
;
sender
.
selected
=
YES
;
_selectButton
=
(
UIButton
*
)
sender
;
NSIndexPath
*
indexPath
=
[
NSIndexPath
indexPathForRow
:
2
inSection
:
0
];
SolvedTypeTableViewCell
*
cell
=
(
SolvedTypeTableViewCell
*
)[
self
.
tableView
cellForRowAtIndexPath
:
indexPath
];
if
(
sender
.
tag
-
323118
==
0
)
{
sender
.
selected
=
YES
;
cell
.
FAQBtn
.
selected
=
NO
;
cell
.
SOPBtn
.
selected
=
NO
;
}
else
if
(
sender
.
tag
-
323118
==
1
)
{
sender
.
selected
=
YES
;
cell
.
quesBtn
.
selected
=
NO
;
cell
.
SOPBtn
.
selected
=
NO
;
}
else
{
sender
.
selected
=
YES
;
cell
.
quesBtn
.
selected
=
NO
;
cell
.
FAQBtn
.
selected
=
NO
;
}
_selectButton
=
sender
;
[
self
.
tableView
reloadData
];
[
self
.
tableView
reloadData
];
}
}
-
(
void
)
changeClick
:
(
UIButton
*
)
sender
{
-
(
void
)
changeClick
:
(
UIButton
*
)
sender
{
NSString
*
solutionType
=
nil
;
if
(
_selectButton
.
tag
-
323118
==
0
)
{
solutionType
=
@"question"
;
}
else
if
(
_selectButton
.
tag
-
323118
==
1
){
solutionType
=
@"faq"
;
}
else
{
solutionType
=
@"sop"
;
}
if
(
_delegate
&&
[
_delegate
respondsToSelector
:
@selector
(
requestProlemDealWithResultWithGroupText
:
categoryText
:
solutionType
:
optionType
:
)])
{
[
_delegate
requestProlemDealWithResultWithGroupText
:
_groupTitle
.
text
categoryText
:
_categoryTitle
.
text
solutionType
:
solutionType
optionType
:
@"update"
];
}
}
}
-
(
void
)
solveClick
:
(
UIButton
*
)
sender
{
-
(
void
)
solveClick
:
(
UIButton
*
)
sender
{
if
(
_delegate
&&
[
_delegate
respondsToSelector
:
@selector
(
requestProlemDealWithResultWithGroupText
:
categoryText
:
solutionType
:
optionType
:
)])
{
[
_delegate
requestProlemDealWithResultWithGroupText
:
_groupTitle
.
text
categoryText
:
_categoryTitle
.
text
solutionType
:
@"question"
optionType
:
@"resolve"
];
}
}
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
...
@@ -298,6 +491,11 @@
...
@@ -298,6 +491,11 @@
return
CGFLOAT_MIN
;
return
CGFLOAT_MIN
;
}
}
-
(
UITextView
*
)
titleTextView
{
if
(
!
_titleTextView
)
{
_titleTextView
=
[[
UITextView
alloc
]
init
];
}
return
_titleTextView
;
}
@end
@end
redstar/Classes/Module/Function/Question/QuestionUnsolved/QuestionUnsolvedViewController.m
View file @
0b955368
...
@@ -20,7 +20,10 @@
...
@@ -20,7 +20,10 @@
#import "QuestionDetailModel.h"
#import "QuestionDetailModel.h"
#import "QuestionDealWithView.h"
#import "QuestionDealWithView.h"
#import "AddQuestionViewController.h"
#import "SolvedTypeTableViewCell.h"
#import "SelectCategaryViewController.h"
#import "HttpClient.h"
#define kQuestionDetailCell @"QuestionDetailCell" // 问题详情
#define kQuestionDetailCell @"QuestionDetailCell" // 问题详情
#define kQuestionDescribeCell @"QuestionDescribeCell" // 问题描述
#define kQuestionDescribeCell @"QuestionDescribeCell" // 问题描述
...
@@ -70,6 +73,11 @@
...
@@ -70,6 +73,11 @@
_clickNumber
=
0
;
_clickNumber
=
0
;
NSIndexPath
*
indexPath
=
[
NSIndexPath
indexPathForRow
:
0
inSection
:
2
];
}
}
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
...
@@ -136,11 +144,16 @@
...
@@ -136,11 +144,16 @@
-
(
void
)
doBack
:
(
UIBarButtonItem
*
)
sender
-
(
void
)
doBack
:
(
UIBarButtonItem
*
)
sender
{
{
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
}
}
-
(
void
)
dealWithProblem
:
(
UIButton
*
)
sender
{
-
(
void
)
dealWithProblem
:
(
UIButton
*
)
sender
{
[
self
showRedView
];
NSArray
*
permissions
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"permissions"
];
if
([
permissions
containsObject
:
@"500506"
])
{
[
self
showRedView
];
}
else
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"您没有处理问题的权限!"
delegate
:
self
cancelButtonTitle
:
@"确定"
otherButtonTitles
:
nil
,
nil
];
[
alert
show
];
}
}
}
-
(
void
)
showRedView
-
(
void
)
showRedView
...
@@ -150,11 +163,7 @@
...
@@ -150,11 +163,7 @@
UITapGestureRecognizer
*
tapGR
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
closeRedView
)];
UITapGestureRecognizer
*
tapGR
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
closeRedView
)];
[
_bgView
addGestureRecognizer
:
tapGR
];
[
_bgView
addGestureRecognizer
:
tapGR
];
}
}
if
(
!
_dealWithView
)
{
self
.
dealWithView
.
backgroundColor
=
[
UIColor
whiteColor
];
_dealWithView
=
[[
QuestionDealWithView
alloc
]
init
];
_dealWithView
.
backgroundColor
=
[
UIColor
whiteColor
];
_dealWithView
.
delegate
=
self
;
}
[
self
.
view
addSubview
:
_bgView
];
[
self
.
view
addSubview
:
_bgView
];
[
self
.
view
insertSubview
:
_dealWithView
aboveSubview
:
_bgView
];
[
self
.
view
insertSubview
:
_dealWithView
aboveSubview
:
_bgView
];
...
@@ -164,8 +173,8 @@
...
@@ -164,8 +173,8 @@
[
_dealWithView
.
quitBtn
addTarget
:
self
action
:
@selector
(
closeRedView
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
_dealWithView
.
quitBtn
addTarget
:
self
action
:
@selector
(
closeRedView
)
forControlEvents
:
UIControlEventTouchUpInside
];
CGRect
toFrame
=
CGRectMake
(
0
,
150
,
kScreenWidth
,
90
5
);
CGRect
toFrame
=
CGRectMake
(
0
,
kScreenHeight
-
515
,
kScreenWidth
,
51
5
);
CGRect
fromFrame
=
CGRectMake
(
0
,
kScreenHeight
,
kScreenWidth
,
90
5
);
CGRect
fromFrame
=
CGRectMake
(
0
,
kScreenHeight
,
kScreenWidth
,
51
5
);
_dealWithView
.
frame
=
fromFrame
;
_dealWithView
.
frame
=
fromFrame
;
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
...
@@ -175,15 +184,70 @@
...
@@ -175,15 +184,70 @@
}
}
-
(
void
)
tableDidSelectAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
-
(
void
)
tableDidSelectAtIndexPath
:
(
NSIndexPath
*
)
indexPath
nameArray
:
(
NSArray
*
)
nameArray
{
SelectCategaryViewController
*
selectCVC
=
[[
SelectCategaryViewController
alloc
]
init
];
selectCVC
.
delegate
=
self
.
dealWithView
;
selectCVC
.
rowNum
=
indexPath
.
row
;
if
(
indexPath
.
row
==
0
)
{
if
(
indexPath
.
row
==
0
)
{
selectCVC
.
titleStr
=
@"专业组"
;
selectCVC
.
titleArray
=
nameArray
;
}
else
{
selectCVC
.
titleStr
=
@"问题分类"
;
selectCVC
.
titleArray
=
nameArray
;
}
}
[
self
.
navigationController
pushViewController
:
selectCVC
animated
:
YES
];
}
}
-
(
void
)
requestProlemDealWithResultWithGroupText
:
(
NSString
*
)
groupText
categoryText
:
(
NSString
*
)
categoryText
solutionType
:
(
NSString
*
)
solutionType
optionType
:
(
NSString
*
)
optionType
{
[
self
closeRedView
];
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"
];
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@%@&operId=%@&operName=%@"
,
kRedStarURL
,
kSubmitQuestionResultURL
,
dateString
,
operId
,
operName
];
url
=
[
url
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
];
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
NSDictionary
*
parameters
=
@{
@"questionUuid"
:
self
.
questionUuid
,
@"group"
:
groupText
,
@"category"
:
categoryText
,
@"solutionType"
:
solutionType
,
@"optionType"
:
optionType
,
@"feedback"
:
self
.
dealWithView
.
titleTextView
.
text
};
[
httpClient
submitQuestionResultWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
if
([
response
[
@"success"
]
boolValue
])
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"问题处理成功!"
delegate
:
self
cancelButtonTitle
:
@"确定"
otherButtonTitles
:
nil
,
nil
];
alert
.
tag
=
122837
;
[
alert
show
];
}
else
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"问题处理失败!"
delegate
:
self
cancelButtonTitle
:
@"确定"
otherButtonTitles
:
nil
,
nil
];
[
alert
show
];
}
}];
}
#pragma mark - UIAlertViewDelegte
-
(
void
)
alertView
:
(
UIAlertView
*
)
alertView
clickedButtonAtIndex
:
(
NSInteger
)
buttonIndex
{
if
(
alertView
.
tag
==
122837
)
{
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
}
}
-
(
void
)
closeRedView
-
(
void
)
closeRedView
{
{
CGRect
fromFrame
=
CGRectMake
(
0
,
kScreenHeight
,
kScreenWidth
,
90
5
);
CGRect
fromFrame
=
CGRectMake
(
0
,
kScreenHeight
,
kScreenWidth
,
51
5
);
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
_bgView
.
alpha
=
.
0
f
;
_bgView
.
alpha
=
.
0
f
;
_dealWithView
.
frame
=
fromFrame
;
_dealWithView
.
frame
=
fromFrame
;
...
@@ -370,6 +434,54 @@
...
@@ -370,6 +434,54 @@
return
_footerView
;
return
_footerView
;
}
}
-
(
void
)
textViewDidBeginEditing
:
(
UITextView
*
)
textView
{
CGRect
fromFrame
=
CGRectMake
(
0
,
kScreenHeight
-
750
,
kScreenWidth
,
515
);
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
self
.
dealWithView
.
frame
=
fromFrame
;
}
completion
:
nil
];
}
-
(
void
)
textViewDidEndEditing
:
(
UITextView
*
)
textView
{
CGRect
fromFrame
=
CGRectMake
(
0
,
kScreenHeight
-
515
,
kScreenWidth
,
515
);
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
self
.
dealWithView
.
frame
=
fromFrame
;
}
completion
:
nil
];
}
-
(
BOOL
)
textView
:
(
UITextView
*
)
textView
shouldChangeTextInRange
:
(
NSRange
)
range
replacementText
:
(
NSString
*
)
text
{
if
(
!
[
text
isEqualToString
:
@""
])
{
self
.
dealWithView
.
placeholderLabel1
.
hidden
=
YES
;
}
if
([
text
isEqualToString
:
@""
]
&&
range
.
location
==
0
&&
range
.
length
==
1
)
{
self
.
dealWithView
.
placeholderLabel1
.
hidden
=
NO
;
}
if
([
text
isEqualToString
:
@"
\n
"
])
{
[
self
.
dealWithView
.
titleTextView
resignFirstResponder
];
return
NO
;
}
if
(
range
.
location
>=
200
)
{
return
NO
;
}
else
{
return
YES
;
}
return
YES
;
}
-
(
QuestionDealWithView
*
)
dealWithView
{
if
(
!
_dealWithView
)
{
_dealWithView
=
[[
QuestionDealWithView
alloc
]
init
];
_dealWithView
.
delegate
=
self
;
_dealWithView
.
titleTextView
.
delegate
=
self
;
}
return
_dealWithView
;
}
@end
@end
redstar/Classes/Module/Function/Question/QuestionUnsolved/SelectCategaryViewController.h
View file @
0b955368
...
@@ -8,6 +8,17 @@
...
@@ -8,6 +8,17 @@
#import <UIKit/UIKit.h>
#import <UIKit/UIKit.h>
@protocol
SelectCategaryDelegate
<
NSObject
>
-
(
void
)
selectCategaryWithIndexPath
:
(
NSIndexPath
*
)
indexPath
rowNum
:
(
NSInteger
)
rowNum
;
@end
@interface
SelectCategaryViewController
:
UIViewController
@interface
SelectCategaryViewController
:
UIViewController
@property
(
nonatomic
,
strong
)
NSArray
*
titleArray
;
@property
(
nonatomic
,
strong
)
NSString
*
titleStr
;
@property
(
nonatomic
,
assign
)
NSInteger
rowNum
;
@property
(
nonatomic
,
assign
)
id
<
SelectCategaryDelegate
>
delegate
;
@end
@end
redstar/Classes/Module/Function/Question/QuestionUnsolved/SelectCategaryViewController.m
View file @
0b955368
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
#import "SelectCategaryViewController.h"
#import "SelectCategaryViewController.h"
@interface
SelectCategaryViewController
()
@interface
SelectCategaryViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
>
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@end
@end
...
@@ -17,28 +17,87 @@
...
@@ -17,28 +17,87 @@
-
(
void
)
viewDidLoad
{
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
[
super
viewDidLoad
];
// Do any additional setup after loading the view.
// Do any additional setup after loading the view.
[
self
setupNav
];
self
.
tableView
.
backgroundColor
=
[
UIColor
whiteColor
];
self
.
view
.
backgroundColor
=
[
UIColor
whiteColor
];
}
}
-
(
void
)
didReceiveMemoryWarning
{
-
(
void
)
setupNav
[
super
didReceiveMemoryWarning
];
{
// Dispose of any resources that can be recreated.
UILabel
*
customLab
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
40
,
30
)];
[
customLab
setTextColor
:[
UIColor
whiteColor
]];
[
customLab
setText
:[
NSString
stringWithFormat
:
@"选择%@"
,
self
.
titleStr
]];
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
;
}
}
-
(
UITableView
*
)
tableView
{
-
(
void
)
doBack
:
(
id
)
sender
if
(
!
_tableView
)
{
{
_tableView
=
[[
UITableView
alloc
]
init
];
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
}
#pragma mark - UItableView Delegate/DataSource
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
return
_titleArray
.
count
;
}
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
UITableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"selectCategoryCell"
];
if
(
!
cell
)
{
cell
=
[[
UITableViewCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
@"selectCategoryCell"
];
}
}
return
_tableView
;
cell
.
textLabel
.
text
=
_titleArray
[
indexPath
.
row
];
return
cell
;
}
// cell点击事件
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
if
([
_delegate
respondsToSelector
:
@selector
(
selectCategaryWithIndexPath
:
rowNum
:
)])
{
[
_delegate
selectCategaryWithIndexPath
:
indexPath
rowNum
:
self
.
rowNum
];
}
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
}
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
-
(
UITableView
*
)
tableView
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
{
// Get the new view controller using [segue destinationViewController].
if
(
!
_tableView
)
{
// Pass the selected object to the new view controller.
_tableView
=
[[
UITableView
alloc
]
initWithFrame
:
CGRectZero
];
_tableView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_tableView
.
delegate
=
self
;
_tableView
.
dataSource
=
self
;
_tableView
.
showsVerticalScrollIndicator
=
NO
;
_tableView
.
showsHorizontalScrollIndicator
=
NO
;
_tableView
.
tableFooterView
=
[[
UIView
alloc
]
init
];
[
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
;
}
}
*/
@end
@end
redstar/Classes/Module/Function/Question/QuestionUnsolved/SolvedTypeTableViewCell.m
View file @
0b955368
...
@@ -42,41 +42,43 @@
...
@@ -42,41 +42,43 @@
{
{
if
(
!
_quesBtn
)
{
if
(
!
_quesBtn
)
{
_quesBtn
=
[[
UIButton
alloc
]
init
];
_quesBtn
=
[[
UIButton
alloc
]
init
];
_quesBtn
.
tag
=
323118
;
_quesBtn
.
selected
=
YES
;
[
_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
];
}
}
_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
;
return
_quesBtn
;
}
}
...
@@ -84,7 +86,7 @@
...
@@ -84,7 +86,7 @@
{
{
if
(
!
_FAQBtn
)
{
if
(
!
_FAQBtn
)
{
_FAQBtn
=
[[
UIButton
alloc
]
init
];
_FAQBtn
=
[[
UIButton
alloc
]
init
];
//_quesBtn.tag = 323228
;
_FAQBtn
.
tag
=
323119
;
[
_FAQBtn
setTitleColor
:
kOnLineCellTitleColor
forState
:
UIControlStateNormal
];
[
_FAQBtn
setTitleColor
:
kOnLineCellTitleColor
forState
:
UIControlStateNormal
];
_FAQBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_FAQBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
_FAQBtn
setTitle
:
@"形成FAQ"
forState
:
UIControlStateNormal
];
[
_FAQBtn
setTitle
:
@"形成FAQ"
forState
:
UIControlStateNormal
];
...
@@ -120,7 +122,7 @@
...
@@ -120,7 +122,7 @@
{
{
if
(
!
_SOPBtn
)
{
if
(
!
_SOPBtn
)
{
_SOPBtn
=
[[
UIButton
alloc
]
init
];
_SOPBtn
=
[[
UIButton
alloc
]
init
];
//_quesBtn.tag = 323228
;
_SOPBtn
.
tag
=
323120
;
[
_SOPBtn
setTitleColor
:
kOnLineCellTitleColor
forState
:
UIControlStateNormal
];
[
_SOPBtn
setTitleColor
:
kOnLineCellTitleColor
forState
:
UIControlStateNormal
];
_SOPBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_SOPBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
_SOPBtn
setTitle
:
@"优化SOP"
forState
:
UIControlStateNormal
];
[
_SOPBtn
setTitle
:
@"优化SOP"
forState
:
UIControlStateNormal
];
...
...
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankDetail/ViewController/RankDetailViewController.m
View file @
0b955368
...
@@ -188,7 +188,7 @@
...
@@ -188,7 +188,7 @@
{
{
NSArray
*
permissions
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"permissions"
];
NSArray
*
permissions
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"permissions"
];
// 口碑报告
商场风采 图说口碑
口碑标准 问题知识 口碑巡检
// 口碑报告
口碑随手拍 口碑现场
口碑标准 问题知识 口碑巡检
if
([
permissions
containsObject
:
@"500202"
])
{
if
([
permissions
containsObject
:
@"500202"
])
{
...
...
redstar/Classes/Module/Home/ViewController/HomeViewController.m
View file @
0b955368
...
@@ -89,7 +89,7 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -89,7 +89,7 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
@property
(
nonatomic
,
strong
)
NSMutableArray
*
taskListDataArray
;
// 问题与知识
@property
(
nonatomic
,
strong
)
NSMutableArray
*
taskListDataArray
;
// 问题与知识
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allRankListArray
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allRankListArray
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allPraiseListArray
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allPraiseListArray
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allExcellentCaseArray
;
//
优秀案例
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allExcellentCaseArray
;
//
口碑报道
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allPatrolReportArray
;
// 巡店报告
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allPatrolReportArray
;
// 巡店报告
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allLookOnLineList
;
//
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allLookOnLineList
;
//
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allSpotCheckList
;
//
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allSpotCheckList
;
//
...
@@ -111,8 +111,9 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -111,8 +111,9 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
self
.
navigationItem
.
titleView
=
customLab
;
self
.
navigationItem
.
titleView
=
customLab
;
self
.
titleArray
=
[
NSMutableArray
array
];
self
.
titleArray
=
[
NSMutableArray
array
];
// self.sectionArray = [NSMutableArray arrayWithObjects:@"口碑报告",@"商场风采",@"优秀案例",@"巡店报告", @"问题知识",@"口碑巡检",@"在线抽查",nil];
// self.sectionArray = [NSMutableArray arrayWithObjects:@"口碑报告",@"口碑随手拍",@"口碑报道",@"口碑巡店", @"问题知识",@"口碑巡检",nil];
self
.
sectionArray
=
[
NSMutableArray
arrayWithObjects
:
@"口碑报告"
,
@"商场风采"
,
@"优秀案例"
,
@"巡店报告"
,
@"问题知识"
,
@"口碑巡检"
,
nil
];
self
.
sectionArray
=
[
NSMutableArray
arrayWithObjects
:
@"口碑报告"
,
@"口碑报道"
,
@"口碑巡店"
,
@"问题知识"
,
@"口碑巡检"
,
nil
];
self
.
allRankListArray
=
[
NSMutableArray
array
];
self
.
allRankListArray
=
[
NSMutableArray
array
];
self
.
taskListDataArray
=
[
NSMutableArray
array
];
self
.
taskListDataArray
=
[
NSMutableArray
array
];
...
@@ -126,7 +127,7 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -126,7 +127,7 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
NSArray
*
permissions
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"permissions"
];
NSArray
*
permissions
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"permissions"
];
// 口碑报告
商场风采 图说口碑
口碑标准 问题知识 口碑巡检
// 口碑报告
口碑随手拍 口碑现场
口碑标准 问题知识 口碑巡检
if
([
permissions
containsObject
:
@"500201"
])
{
if
([
permissions
containsObject
:
@"500201"
])
{
[
self
.
titleArray
addObject
:
@"口碑报告"
];
[
self
.
titleArray
addObject
:
@"口碑报告"
];
...
@@ -135,22 +136,22 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -135,22 +136,22 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
[
_sectionArray
removeObject
:
@"口碑报告"
];
[
_sectionArray
removeObject
:
@"口碑报告"
];
}
}
[
self
.
titleArray
addObject
:
@"商场风采
"
];
// [self.titleArray addObject:@"口碑随手拍
"];
NSArray
*
typeArray
=
[
NSArray
arrayWithObjects
:
@"store"
,
@"casus"
,
@"report"
,
nil
];
NSArray
*
typeArray
=
[
NSArray
arrayWithObjects
:
@"store"
,
@"casus"
,
@"report"
,
nil
];
//
商场风采
//
口碑随手拍
[
self
requestPicturePraiseWithType
:
typeArray
[
0
]];
[
self
requestPicturePraiseWithType
:
typeArray
[
0
]];
//
优秀案例
//
口碑报道
[
self
requestPicturePraiseWithType
:
typeArray
[
1
]];
[
self
requestPicturePraiseWithType
:
typeArray
[
1
]];
// 巡店报告
// 巡店报告
[
self
requestPicturePraiseWithType
:
typeArray
[
2
]];
[
self
requestPicturePraiseWithType
:
typeArray
[
2
]];
if
([
permissions
containsObject
:
@"500301"
]
||
[
permissions
containsObject
:
@"500302"
])
{
if
([
permissions
containsObject
:
@"500301"
]
||
[
permissions
containsObject
:
@"500302"
])
{
[
self
.
titleArray
addObject
:
@"
图说口碑
"
];
[
self
.
titleArray
addObject
:
@"
口碑现场
"
];
}
else
{
}
else
{
[
_sectionArray
removeObject
:
@"
图说口碑
"
];
[
_sectionArray
removeObject
:
@"
口碑现场
"
];
}
}
if
([
permissions
containsObject
:
@"500401"
]
||
[
permissions
containsObject
:
@"500402"
])
{
if
([
permissions
containsObject
:
@"500401"
]
||
[
permissions
containsObject
:
@"500402"
])
{
...
@@ -586,17 +587,17 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -586,17 +587,17 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
if
([
type
isEqualToString
:
@"store"
])
{
if
([
type
isEqualToString
:
@"store"
])
{
_allPraiseListArray
=
[
NSMutableArray
arrayWithArray
:
tempArray
];
_allPraiseListArray
=
[
NSMutableArray
arrayWithArray
:
tempArray
];
if
(
_allPraiseListArray
.
count
==
0
)
{
if
(
_allPraiseListArray
.
count
==
0
)
{
[
_sectionArray
removeObject
:
@"
商场风采
"
];
[
_sectionArray
removeObject
:
@"
口碑随手拍
"
];
}
}
}
else
if
([
type
isEqualToString
:
@"casus"
])
{
}
else
if
([
type
isEqualToString
:
@"casus"
])
{
_allExcellentCaseArray
=
[
NSMutableArray
arrayWithArray
:
tempArray
];
_allExcellentCaseArray
=
[
NSMutableArray
arrayWithArray
:
tempArray
];
if
(
_allExcellentCaseArray
.
count
==
0
)
{
if
(
_allExcellentCaseArray
.
count
==
0
)
{
[
_sectionArray
removeObject
:
@"
优秀案例
"
];
[
_sectionArray
removeObject
:
@"
口碑报道
"
];
}
}
}
else
{
}
else
{
_allPatrolReportArray
=
[
NSMutableArray
arrayWithArray
:
tempArray
];
_allPatrolReportArray
=
[
NSMutableArray
arrayWithArray
:
tempArray
];
if
(
_allPatrolReportArray
.
count
==
0
)
{
if
(
_allPatrolReportArray
.
count
==
0
)
{
[
_sectionArray
removeObject
:
@"
巡店报告
"
];
[
_sectionArray
removeObject
:
@"
口碑巡店
"
];
}
}
}
}
...
@@ -749,7 +750,7 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -749,7 +750,7 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"口碑标准"
])
{
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"口碑标准"
])
{
StandardViewController
*
standardVC
=
[[
StandardViewController
alloc
]
init
];
StandardViewController
*
standardVC
=
[[
StandardViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
standardVC
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
standardVC
];
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"
图说口碑
"
])
{
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"
口碑现场
"
])
{
PicCategoryViewController
*
pictureVC
=
[[
PicCategoryViewController
alloc
]
init
];
PicCategoryViewController
*
pictureVC
=
[[
PicCategoryViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
pictureVC
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
pictureVC
];
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"问题知识"
])
{
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"问题知识"
])
{
...
@@ -758,22 +759,22 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -758,22 +759,22 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"口碑报告"
]){
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"口碑报告"
]){
RankingListViewController
*
rankingListVC
=
[[
RankingListViewController
alloc
]
init
];
RankingListViewController
*
rankingListVC
=
[[
RankingListViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
rankingListVC
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
rankingListVC
];
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"
商场风采
"
])
{
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"
口碑随手拍
"
])
{
PictureViewController
*
pic
=
[[
PictureViewController
alloc
]
init
];
PictureViewController
*
pic
=
[[
PictureViewController
alloc
]
init
];
pic
.
come
=
@"首页"
;
pic
.
come
=
@"首页"
;
pic
.
titleStr
=
@"
商场风采
"
;
pic
.
titleStr
=
@"
口碑随手拍
"
;
pic
.
category
=
@"store"
;
pic
.
category
=
@"store"
;
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
pic
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
pic
];
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"
优秀案例
"
])
{
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"
口碑报道
"
])
{
PictureViewController
*
pic
=
[[
PictureViewController
alloc
]
init
];
PictureViewController
*
pic
=
[[
PictureViewController
alloc
]
init
];
pic
.
come
=
@"首页"
;
pic
.
come
=
@"首页"
;
pic
.
titleStr
=
@"
优秀案例
"
;
pic
.
titleStr
=
@"
口碑报道
"
;
pic
.
category
=
@"casus"
;
pic
.
category
=
@"casus"
;
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
pic
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
pic
];
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"
巡店报告
"
])
{
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"
口碑巡店
"
])
{
PictureViewController
*
pic
=
[[
PictureViewController
alloc
]
init
];
PictureViewController
*
pic
=
[[
PictureViewController
alloc
]
init
];
pic
.
come
=
@"首页"
;
pic
.
come
=
@"首页"
;
pic
.
titleStr
=
@"
巡店报告
"
;
pic
.
titleStr
=
@"
口碑巡店
"
;
pic
.
category
=
@"report"
;
pic
.
category
=
@"report"
;
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
pic
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
pic
];
}
}
...
@@ -808,7 +809,7 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -808,7 +809,7 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"口碑标准"
])
{
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"口碑标准"
])
{
StandardViewController
*
standardVC
=
[[
StandardViewController
alloc
]
init
];
StandardViewController
*
standardVC
=
[[
StandardViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
standardVC
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
standardVC
];
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"
图说口碑
"
])
{
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"
口碑现场
"
])
{
PicCategoryViewController
*
pictureVC
=
[[
PicCategoryViewController
alloc
]
init
];
PicCategoryViewController
*
pictureVC
=
[[
PicCategoryViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
pictureVC
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
pictureVC
];
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"问题知识"
])
{
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"问题知识"
])
{
...
@@ -817,11 +818,11 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -817,11 +818,11 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"口碑报告"
]){
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"口碑报告"
]){
RankingListViewController
*
rankingListVC
=
[[
RankingListViewController
alloc
]
init
];
RankingListViewController
*
rankingListVC
=
[[
RankingListViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
rankingListVC
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
rankingListVC
];
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"
商场风采
"
])
{
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"
口碑随手拍
"
])
{
PictureViewController
*
pic
=
[[
PictureViewController
alloc
]
init
];
PictureViewController
*
pic
=
[[
PictureViewController
alloc
]
init
];
pic
.
come
=
@"首页"
;
pic
.
come
=
@"首页"
;
pic
.
category
=
@"store"
;
pic
.
category
=
@"store"
;
pic
.
titleStr
=
@"
商场风采
"
;
pic
.
titleStr
=
@"
口碑随手拍
"
;
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
pic
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
pic
];
}
}
...
@@ -846,11 +847,11 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -846,11 +847,11 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
NSUInteger
s2
=
[
_sectionArray
indexOfObject
:
@"口碑报告"
];
NSUInteger
s2
=
[
_sectionArray
indexOfObject
:
@"口碑报告"
];
NSUInteger
s4
=
[
_sectionArray
indexOfObject
:
@"
商场风采
"
];
NSUInteger
s4
=
[
_sectionArray
indexOfObject
:
@"
口碑随手拍
"
];
NSUInteger
s3
=
[
_sectionArray
indexOfObject
:
@"问题知识"
];
NSUInteger
s3
=
[
_sectionArray
indexOfObject
:
@"问题知识"
];
NSUInteger
s1
=
[
_sectionArray
indexOfObject
:
@"口碑巡检"
];
NSUInteger
s1
=
[
_sectionArray
indexOfObject
:
@"口碑巡检"
];
NSUInteger
s5
=
[
_sectionArray
indexOfObject
:
@"
优秀案例
"
];
NSUInteger
s5
=
[
_sectionArray
indexOfObject
:
@"
口碑报道
"
];
NSUInteger
s6
=
[
_sectionArray
indexOfObject
:
@"
巡店报告
"
];
NSUInteger
s6
=
[
_sectionArray
indexOfObject
:
@"
口碑巡店
"
];
NSUInteger
s7
=
[
_sectionArray
indexOfObject
:
@"在线抽查"
];
NSUInteger
s7
=
[
_sectionArray
indexOfObject
:
@"在线抽查"
];
//NSUInteger s8 = [_sectionArray indexOfObject:@"在线抽查"];
//NSUInteger s8 = [_sectionArray indexOfObject:@"在线抽查"];
...
@@ -860,11 +861,11 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -860,11 +861,11 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
return
_allRankListArray
.
count
+
1
;
return
_allRankListArray
.
count
+
1
;
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"问题知识"
]
&&
section
==
s3
)
{
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"问题知识"
]
&&
section
==
s3
)
{
return
_allQuestionArray
.
count
;
return
_allQuestionArray
.
count
;
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"
商场风采
"
]
&&
section
==
s4
)
{
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"
口碑随手拍
"
]
&&
section
==
s4
)
{
return
_allPraiseListArray
.
count
;
return
_allPraiseListArray
.
count
;
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"
优秀案例
"
]
&&
section
==
s5
)
{
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"
口碑报道
"
]
&&
section
==
s5
)
{
return
_allExcellentCaseArray
.
count
;
return
_allExcellentCaseArray
.
count
;
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"
巡店报告
"
]
&&
section
==
s6
)
{
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"
口碑巡店
"
]
&&
section
==
s6
)
{
return
_allPatrolReportArray
.
count
;
return
_allPatrolReportArray
.
count
;
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"在线抽查"
]
&&
section
==
s7
)
{
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"在线抽查"
]
&&
section
==
s7
)
{
if
([
permissions
containsObject
:
@"500701"
])
{
if
([
permissions
containsObject
:
@"500701"
])
{
...
@@ -888,11 +889,11 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -888,11 +889,11 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
NSUInteger
s2
=
[
_sectionArray
indexOfObject
:
@"口碑报告"
];
NSUInteger
s2
=
[
_sectionArray
indexOfObject
:
@"口碑报告"
];
NSUInteger
s4
=
[
_sectionArray
indexOfObject
:
@"
商场风采
"
];
NSUInteger
s4
=
[
_sectionArray
indexOfObject
:
@"
口碑随手拍
"
];
NSUInteger
s3
=
[
_sectionArray
indexOfObject
:
@"问题知识"
];
NSUInteger
s3
=
[
_sectionArray
indexOfObject
:
@"问题知识"
];
NSUInteger
s1
=
[
_sectionArray
indexOfObject
:
@"口碑巡检"
];
NSUInteger
s1
=
[
_sectionArray
indexOfObject
:
@"口碑巡检"
];
NSUInteger
s5
=
[
_sectionArray
indexOfObject
:
@"
优秀案例
"
];
NSUInteger
s5
=
[
_sectionArray
indexOfObject
:
@"
口碑报道
"
];
NSUInteger
s6
=
[
_sectionArray
indexOfObject
:
@"
巡店报告
"
];
NSUInteger
s6
=
[
_sectionArray
indexOfObject
:
@"
口碑巡店
"
];
NSUInteger
s7
=
[
_sectionArray
indexOfObject
:
@"在线抽查"
];
NSUInteger
s7
=
[
_sectionArray
indexOfObject
:
@"在线抽查"
];
//NSUInteger s8 = [_sectionArray indexOfObject:@"在线抽查"];
//NSUInteger s8 = [_sectionArray indexOfObject:@"在线抽查"];
...
@@ -947,21 +948,21 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -947,21 +948,21 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
QuestionModel
*
question
=
_allQuestionArray
[
indexPath
.
row
];
QuestionModel
*
question
=
_allQuestionArray
[
indexPath
.
row
];
cell
.
question
=
question
;
cell
.
question
=
question
;
return
cell
;
return
cell
;
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"
商场风采
"
]
&&
indexPath
.
section
==
s4
)
{
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"
口碑随手拍
"
]
&&
indexPath
.
section
==
s4
)
{
PictureTableCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
KHomePicTableCell
];
PictureTableCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
KHomePicTableCell
];
if
(
!
cell
)
{
if
(
!
cell
)
{
cell
=
[[
PictureTableCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
KHomePicTableCell
];
cell
=
[[
PictureTableCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
KHomePicTableCell
];
}
}
cell
.
pictureList
=
_allPraiseListArray
[
indexPath
.
row
];
cell
.
pictureList
=
_allPraiseListArray
[
indexPath
.
row
];
return
cell
;
return
cell
;
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"
优秀案例
"
]
&&
indexPath
.
section
==
s5
)
{
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"
口碑报道
"
]
&&
indexPath
.
section
==
s5
)
{
PictureTableCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
KHomePicTableCell
];
PictureTableCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
KHomePicTableCell
];
if
(
!
cell
)
{
if
(
!
cell
)
{
cell
=
[[
PictureTableCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
KHomePicTableCell
];
cell
=
[[
PictureTableCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
KHomePicTableCell
];
}
}
cell
.
pictureList
=
_allExcellentCaseArray
[
indexPath
.
row
];
cell
.
pictureList
=
_allExcellentCaseArray
[
indexPath
.
row
];
return
cell
;
return
cell
;
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"
巡店报告
"
]
&&
indexPath
.
section
==
s6
)
{
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"
口碑巡店
"
]
&&
indexPath
.
section
==
s6
)
{
PictureTableCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
KHomePicTableCell
];
PictureTableCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
KHomePicTableCell
];
if
(
!
cell
)
{
if
(
!
cell
)
{
cell
=
[[
PictureTableCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
KHomePicTableCell
];
cell
=
[[
PictureTableCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
KHomePicTableCell
];
...
@@ -1000,11 +1001,11 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -1000,11 +1001,11 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
NSArray
*
permissions
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"permissions"
];
NSArray
*
permissions
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"permissions"
];
NSUInteger
s2
=
[
_sectionArray
indexOfObject
:
@"口碑报告"
];
NSUInteger
s2
=
[
_sectionArray
indexOfObject
:
@"口碑报告"
];
NSUInteger
s4
=
[
_sectionArray
indexOfObject
:
@"
商场风采
"
];
NSUInteger
s4
=
[
_sectionArray
indexOfObject
:
@"
口碑随手拍
"
];
NSUInteger
s3
=
[
_sectionArray
indexOfObject
:
@"问题知识"
];
NSUInteger
s3
=
[
_sectionArray
indexOfObject
:
@"问题知识"
];
NSUInteger
s1
=
[
_sectionArray
indexOfObject
:
@"口碑巡检"
];
NSUInteger
s1
=
[
_sectionArray
indexOfObject
:
@"口碑巡检"
];
NSUInteger
s5
=
[
_sectionArray
indexOfObject
:
@"
优秀案例
"
];
NSUInteger
s5
=
[
_sectionArray
indexOfObject
:
@"
口碑报道
"
];
NSUInteger
s6
=
[
_sectionArray
indexOfObject
:
@"
巡店报告
"
];
NSUInteger
s6
=
[
_sectionArray
indexOfObject
:
@"
口碑巡店
"
];
NSUInteger
s7
=
[
_sectionArray
indexOfObject
:
@"在线抽查"
];
NSUInteger
s7
=
[
_sectionArray
indexOfObject
:
@"在线抽查"
];
//NSUInteger s8 = [_sectionArray indexOfObject:@"在线抽查"];
//NSUInteger s8 = [_sectionArray indexOfObject:@"在线抽查"];
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"口碑巡检"
]
&&
indexPath
.
section
==
s1
)
{
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"口碑巡检"
]
&&
indexPath
.
section
==
s1
)
{
...
@@ -1035,25 +1036,25 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -1035,25 +1036,25 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
questionDetailVC
.
questionUuid
=
question
.
uuid
;
questionDetailVC
.
questionUuid
=
question
.
uuid
;
self
.
hidesBottomBarWhenPushed
=
YES
;
self
.
hidesBottomBarWhenPushed
=
YES
;
[
self
.
navigationController
pushViewController
:
questionDetailVC
animated
:
YES
];
[
self
.
navigationController
pushViewController
:
questionDetailVC
animated
:
YES
];
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"
商场风采
"
]
&&
indexPath
.
section
==
s4
)
{
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"
口碑随手拍
"
]
&&
indexPath
.
section
==
s4
)
{
PictureListModel
*
picList
=
_allPraiseListArray
[
indexPath
.
row
];
PictureListModel
*
picList
=
_allPraiseListArray
[
indexPath
.
row
];
PictureStoryViewController
*
storyVC
=
[[
PictureStoryViewController
alloc
]
init
];
PictureStoryViewController
*
storyVC
=
[[
PictureStoryViewController
alloc
]
init
];
storyVC
.
uuid
=
picList
.
uuid
;
storyVC
.
uuid
=
picList
.
uuid
;
storyVC
.
titleStr
=
@"
商场风采
"
;
storyVC
.
titleStr
=
@"
口碑随手拍
"
;
self
.
hidesBottomBarWhenPushed
=
YES
;
self
.
hidesBottomBarWhenPushed
=
YES
;
[
self
.
navigationController
pushViewController
:
storyVC
animated
:
YES
];
[
self
.
navigationController
pushViewController
:
storyVC
animated
:
YES
];
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"
优秀案例
"
]
&&
indexPath
.
section
==
s5
)
{
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"
口碑报道
"
]
&&
indexPath
.
section
==
s5
)
{
PictureListModel
*
picList
=
_allExcellentCaseArray
[
indexPath
.
row
];
PictureListModel
*
picList
=
_allExcellentCaseArray
[
indexPath
.
row
];
PictureStoryViewController
*
storyVC
=
[[
PictureStoryViewController
alloc
]
init
];
PictureStoryViewController
*
storyVC
=
[[
PictureStoryViewController
alloc
]
init
];
storyVC
.
uuid
=
picList
.
uuid
;
storyVC
.
uuid
=
picList
.
uuid
;
storyVC
.
titleStr
=
@"
优秀案例
"
;
storyVC
.
titleStr
=
@"
口碑报道
"
;
self
.
hidesBottomBarWhenPushed
=
YES
;
self
.
hidesBottomBarWhenPushed
=
YES
;
[
self
.
navigationController
pushViewController
:
storyVC
animated
:
YES
];
[
self
.
navigationController
pushViewController
:
storyVC
animated
:
YES
];
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"
巡店报告
"
]
&&
indexPath
.
section
==
s6
)
{
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"
口碑巡店
"
]
&&
indexPath
.
section
==
s6
)
{
PictureListModel
*
picList
=
_allPatrolReportArray
[
indexPath
.
row
];
PictureListModel
*
picList
=
_allPatrolReportArray
[
indexPath
.
row
];
PictureStoryViewController
*
storyVC
=
[[
PictureStoryViewController
alloc
]
init
];
PictureStoryViewController
*
storyVC
=
[[
PictureStoryViewController
alloc
]
init
];
storyVC
.
uuid
=
picList
.
uuid
;
storyVC
.
uuid
=
picList
.
uuid
;
storyVC
.
titleStr
=
@"
巡店报告
"
;
storyVC
.
titleStr
=
@"
口碑巡店
"
;
self
.
hidesBottomBarWhenPushed
=
YES
;
self
.
hidesBottomBarWhenPushed
=
YES
;
[
self
.
navigationController
pushViewController
:
storyVC
animated
:
YES
];
[
self
.
navigationController
pushViewController
:
storyVC
animated
:
YES
];
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"在线抽查"
]
&&
indexPath
.
section
==
s7
)
{
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"在线抽查"
]
&&
indexPath
.
section
==
s7
)
{
...
...
redstar/Classes/Module/Home/ViewController/SearchViewController.m
View file @
0b955368
...
@@ -73,7 +73,7 @@
...
@@ -73,7 +73,7 @@
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allRankListArray
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allRankListArray
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allPraiseListArray
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allPraiseListArray
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allExcellentCaseArray
;
//
优秀案例
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allExcellentCaseArray
;
//
口碑报道
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allPatrolReportArray
;
// 巡店报告
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allPatrolReportArray
;
// 巡店报告
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allLookOnLineList
;
//
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allLookOnLineList
;
//
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allSpotCheckList
;
//
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allSpotCheckList
;
//
...
@@ -88,7 +88,7 @@
...
@@ -88,7 +88,7 @@
self
.
view
.
backgroundColor
=
[
UIColor
whiteColor
];
self
.
view
.
backgroundColor
=
[
UIColor
whiteColor
];
self
.
sectionArray
=
[
NSMutableArray
arrayWithObjects
:
@"口碑报告"
,
@"
商场风采"
,
@"优秀案例"
,
@"巡店报告
"
,
@"问题知识"
,
@"口碑巡检"
,
@"在线抽查"
,
@"查看抽查"
,
nil
];
self
.
sectionArray
=
[
NSMutableArray
arrayWithObjects
:
@"口碑报告"
,
@"
口碑随手拍"
,
@"口碑报道"
,
@"口碑巡店
"
,
@"问题知识"
,
@"口碑巡检"
,
@"在线抽查"
,
@"查看抽查"
,
nil
];
UILabel
*
customLab
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
100
,
30
)];
UILabel
*
customLab
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
100
,
30
)];
[
customLab
setTextColor
:[
UIColor
whiteColor
]];
[
customLab
setTextColor
:[
UIColor
whiteColor
]];
...
@@ -117,7 +117,7 @@
...
@@ -117,7 +117,7 @@
NSArray
*
permissions
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"permissions"
];
NSArray
*
permissions
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"permissions"
];
// 口碑报告
商场风采 图说口碑
口碑标准 问题知识 口碑巡检
// 口碑报告
口碑随手拍 口碑现场
口碑标准 问题知识 口碑巡检
if
([
permissions
containsObject
:
@"500201"
])
{
if
([
permissions
containsObject
:
@"500201"
])
{
[
self
requestRankingList
];
[
self
requestRankingList
];
...
@@ -127,7 +127,7 @@
...
@@ -127,7 +127,7 @@
NSArray
*
typeArray
=
[
NSArray
arrayWithObjects
:
@"store"
,
@"casus"
,
@"report"
,
nil
];
NSArray
*
typeArray
=
[
NSArray
arrayWithObjects
:
@"store"
,
@"casus"
,
@"report"
,
nil
];
//
商场风采
//
口碑随手拍
[
self
requestPicturePraiseWithType
:
typeArray
[
0
]];
[
self
requestPicturePraiseWithType
:
typeArray
[
0
]];
// 优秀案例
// 优秀案例
[
self
requestPicturePraiseWithType
:
typeArray
[
1
]];
[
self
requestPicturePraiseWithType
:
typeArray
[
1
]];
...
@@ -163,10 +163,10 @@
...
@@ -163,10 +163,10 @@
self
.
taskListDataArray
=
[
NSMutableArray
array
];
self
.
taskListDataArray
=
[
NSMutableArray
array
];
self
.
allQuestionArray
=
[
NSMutableArray
array
];
self
.
allQuestionArray
=
[
NSMutableArray
array
];
self
.
allPraiseListArray
=
[
NSMutableArray
array
];
self
.
allPraiseListArray
=
[
NSMutableArray
array
];
self
.
allExcellentCaseArray
=
[
NSMutableArray
array
];
// 优秀案例
self
.
allExcellentCaseArray
=
[
NSMutableArray
array
];
self
.
allPatrolReportArray
=
[
NSMutableArray
array
];
// 优秀案例
self
.
allPatrolReportArray
=
[
NSMutableArray
array
];
self
.
allLookOnLineList
=
[
NSMutableArray
array
];
// 优秀案例
self
.
allLookOnLineList
=
[
NSMutableArray
array
];
self
.
allSpotCheckList
=
[
NSMutableArray
array
];
// 优秀案例
self
.
allSpotCheckList
=
[
NSMutableArray
array
];
}
}
-
(
void
)
didReceiveMemoryWarning
{
-
(
void
)
didReceiveMemoryWarning
{
...
@@ -198,7 +198,7 @@
...
@@ -198,7 +198,7 @@
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"口碑标准"
])
{
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"口碑标准"
])
{
StandardViewController
*
standardVC
=
[[
StandardViewController
alloc
]
init
];
StandardViewController
*
standardVC
=
[[
StandardViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
standardVC
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
standardVC
];
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"
图说口碑
"
])
{
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"
口碑现场
"
])
{
PicCategoryViewController
*
pictureVC
=
[[
PicCategoryViewController
alloc
]
init
];
PicCategoryViewController
*
pictureVC
=
[[
PicCategoryViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
pictureVC
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
pictureVC
];
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"问题知识"
])
{
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"问题知识"
])
{
...
@@ -210,7 +210,7 @@
...
@@ -210,7 +210,7 @@
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"查看抽查"
]){
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"查看抽查"
]){
LookOnLineViewController
*
lookOnLine
=
[[
LookOnLineViewController
alloc
]
init
];
LookOnLineViewController
*
lookOnLine
=
[[
LookOnLineViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
lookOnLine
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
lookOnLine
];
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"
商场风采
"
])
{
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"
口碑随手拍
"
])
{
PictureViewController
*
pic
=
[[
PictureViewController
alloc
]
init
];
PictureViewController
*
pic
=
[[
PictureViewController
alloc
]
init
];
pic
.
come
=
@"首页"
;
pic
.
come
=
@"首页"
;
pic
.
category
=
@"store"
;
pic
.
category
=
@"store"
;
...
@@ -379,7 +379,7 @@
...
@@ -379,7 +379,7 @@
//
//
// // 请求问题列表
// // 请求问题列表
// [httpClient queryPicturePraiseWithParameters:parameters completion:^(id response, NSError *error) {
// [httpClient queryPicturePraiseWithParameters:parameters completion:^(id response, NSError *error) {
// NSLog(@"
图说口碑
response = %@ error = %@" , response, error);
// NSLog(@"
口碑现场
response = %@ error = %@" , response, error);
// NSDictionary *dataDict = response[@"data"];
// NSDictionary *dataDict = response[@"data"];
// NSArray *dataArray = dataDict[@"records"];
// NSArray *dataArray = dataDict[@"records"];
// NSMutableArray *tempArray = [NSMutableArray array];
// NSMutableArray *tempArray = [NSMutableArray array];
...
@@ -390,7 +390,7 @@
...
@@ -390,7 +390,7 @@
// }
// }
// _allPraiseListArray = tempArray;
// _allPraiseListArray = tempArray;
// if (_allPraiseListArray.count != 0) {
// if (_allPraiseListArray.count != 0) {
// [_sectionArray addObject:@"
商场风采
"];
// [_sectionArray addObject:@"
口碑随手拍
"];
// }
// }
// [self.tableView reloadData];
// [self.tableView reloadData];
// [MBProgressHUD hideHUDForView:self.view animated:YES];
// [MBProgressHUD hideHUDForView:self.view animated:YES];
...
@@ -605,17 +605,17 @@
...
@@ -605,17 +605,17 @@
if
([
type
isEqualToString
:
@"store"
])
{
if
([
type
isEqualToString
:
@"store"
])
{
_allPraiseListArray
=
[
NSMutableArray
arrayWithArray
:
tempArray
];
_allPraiseListArray
=
[
NSMutableArray
arrayWithArray
:
tempArray
];
if
(
_allPraiseListArray
.
count
==
0
)
{
if
(
_allPraiseListArray
.
count
==
0
)
{
[
_sectionArray
removeObject
:
@"
商场风采
"
];
[
_sectionArray
removeObject
:
@"
口碑随手拍
"
];
}
}
}
else
if
([
type
isEqualToString
:
@"casus"
])
{
}
else
if
([
type
isEqualToString
:
@"casus"
])
{
_allExcellentCaseArray
=
[
NSMutableArray
arrayWithArray
:
tempArray
];
_allExcellentCaseArray
=
[
NSMutableArray
arrayWithArray
:
tempArray
];
if
(
_allExcellentCaseArray
.
count
==
0
)
{
if
(
_allExcellentCaseArray
.
count
==
0
)
{
[
_sectionArray
removeObject
:
@"
优秀案例
"
];
[
_sectionArray
removeObject
:
@"
口碑报道
"
];
}
}
}
else
{
}
else
{
_allPatrolReportArray
=
[
NSMutableArray
arrayWithArray
:
tempArray
];
_allPatrolReportArray
=
[
NSMutableArray
arrayWithArray
:
tempArray
];
if
(
_allPatrolReportArray
.
count
==
0
)
{
if
(
_allPatrolReportArray
.
count
==
0
)
{
[
_sectionArray
removeObject
:
@"
巡店报告
"
];
[
_sectionArray
removeObject
:
@"
口碑巡店
"
];
}
}
}
}
...
@@ -756,7 +756,7 @@
...
@@ -756,7 +756,7 @@
//- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
//- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
//{
//{
// NSUInteger s2 = [_sectionArray indexOfObject:@"口碑报告"];
// NSUInteger s2 = [_sectionArray indexOfObject:@"口碑报告"];
// NSUInteger s4 = [_sectionArray indexOfObject:@"
商场风采
"];
// NSUInteger s4 = [_sectionArray indexOfObject:@"
口碑随手拍
"];
// NSUInteger s3 = [_sectionArray indexOfObject:@"问题知识"];
// NSUInteger s3 = [_sectionArray indexOfObject:@"问题知识"];
// NSUInteger s1 = [_sectionArray indexOfObject:@"口碑巡检"];
// NSUInteger s1 = [_sectionArray indexOfObject:@"口碑巡检"];
//
//
...
@@ -766,7 +766,7 @@
...
@@ -766,7 +766,7 @@
// return _allRankListArray.count + 1;
// return _allRankListArray.count + 1;
// } else if ([_sectionArray[section] isEqualToString:@"问题知识"] && section == s3) {
// } else if ([_sectionArray[section] isEqualToString:@"问题知识"] && section == s3) {
// return _allQuestionArray.count;
// return _allQuestionArray.count;
// } else if ([_sectionArray[section] isEqualToString:@"
商场风采
"] && section == s4) {
// } else if ([_sectionArray[section] isEqualToString:@"
口碑随手拍
"] && section == s4) {
// return _allPraiseListArray.count;
// return _allPraiseListArray.count;
// } else {
// } else {
// return 0;
// return 0;
...
@@ -888,11 +888,11 @@
...
@@ -888,11 +888,11 @@
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
{
NSUInteger
s2
=
[
_sectionArray
indexOfObject
:
@"口碑报告"
];
NSUInteger
s2
=
[
_sectionArray
indexOfObject
:
@"口碑报告"
];
NSUInteger
s4
=
[
_sectionArray
indexOfObject
:
@"
商场风采
"
];
NSUInteger
s4
=
[
_sectionArray
indexOfObject
:
@"
口碑随手拍
"
];
NSUInteger
s3
=
[
_sectionArray
indexOfObject
:
@"问题知识"
];
NSUInteger
s3
=
[
_sectionArray
indexOfObject
:
@"问题知识"
];
NSUInteger
s1
=
[
_sectionArray
indexOfObject
:
@"口碑巡检"
];
NSUInteger
s1
=
[
_sectionArray
indexOfObject
:
@"口碑巡检"
];
NSUInteger
s5
=
[
_sectionArray
indexOfObject
:
@"
优秀案例
"
];
NSUInteger
s5
=
[
_sectionArray
indexOfObject
:
@"
口碑报道
"
];
NSUInteger
s6
=
[
_sectionArray
indexOfObject
:
@"
巡店报告
"
];
NSUInteger
s6
=
[
_sectionArray
indexOfObject
:
@"
口碑巡店
"
];
NSUInteger
s7
=
[
_sectionArray
indexOfObject
:
@"在线抽查"
];
NSUInteger
s7
=
[
_sectionArray
indexOfObject
:
@"在线抽查"
];
NSUInteger
s8
=
[
_sectionArray
indexOfObject
:
@"查看抽查"
];
NSUInteger
s8
=
[
_sectionArray
indexOfObject
:
@"查看抽查"
];
...
@@ -902,11 +902,11 @@
...
@@ -902,11 +902,11 @@
return
_allRankListArray
.
count
+
1
;
return
_allRankListArray
.
count
+
1
;
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"问题知识"
]
&&
section
==
s3
)
{
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"问题知识"
]
&&
section
==
s3
)
{
return
_allQuestionArray
.
count
;
return
_allQuestionArray
.
count
;
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"
商场风采
"
]
&&
section
==
s4
)
{
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"
口碑随手拍
"
]
&&
section
==
s4
)
{
return
_allPraiseListArray
.
count
;
return
_allPraiseListArray
.
count
;
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"
优秀案例
"
]
&&
section
==
s5
)
{
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"
口碑报道
"
]
&&
section
==
s5
)
{
return
_allExcellentCaseArray
.
count
;
return
_allExcellentCaseArray
.
count
;
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"
巡店报告
"
]
&&
section
==
s6
)
{
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"
口碑巡店
"
]
&&
section
==
s6
)
{
return
_allPatrolReportArray
.
count
;
return
_allPatrolReportArray
.
count
;
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"在线抽查"
]
&&
section
==
s7
)
{
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"在线抽查"
]
&&
section
==
s7
)
{
return
_allSpotCheckList
.
count
;
return
_allSpotCheckList
.
count
;
...
@@ -922,11 +922,11 @@
...
@@ -922,11 +922,11 @@
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
{
NSUInteger
s2
=
[
_sectionArray
indexOfObject
:
@"口碑报告"
];
NSUInteger
s2
=
[
_sectionArray
indexOfObject
:
@"口碑报告"
];
NSUInteger
s4
=
[
_sectionArray
indexOfObject
:
@"
商场风采
"
];
NSUInteger
s4
=
[
_sectionArray
indexOfObject
:
@"
口碑随手拍
"
];
NSUInteger
s3
=
[
_sectionArray
indexOfObject
:
@"问题知识"
];
NSUInteger
s3
=
[
_sectionArray
indexOfObject
:
@"问题知识"
];
NSUInteger
s1
=
[
_sectionArray
indexOfObject
:
@"口碑巡检"
];
NSUInteger
s1
=
[
_sectionArray
indexOfObject
:
@"口碑巡检"
];
NSUInteger
s5
=
[
_sectionArray
indexOfObject
:
@"
优秀案例
"
];
NSUInteger
s5
=
[
_sectionArray
indexOfObject
:
@"
口碑报道
"
];
NSUInteger
s6
=
[
_sectionArray
indexOfObject
:
@"
巡店报告
"
];
NSUInteger
s6
=
[
_sectionArray
indexOfObject
:
@"
口碑巡店
"
];
NSUInteger
s7
=
[
_sectionArray
indexOfObject
:
@"在线抽查"
];
NSUInteger
s7
=
[
_sectionArray
indexOfObject
:
@"在线抽查"
];
NSUInteger
s8
=
[
_sectionArray
indexOfObject
:
@"查看抽查"
];
NSUInteger
s8
=
[
_sectionArray
indexOfObject
:
@"查看抽查"
];
...
@@ -981,21 +981,21 @@
...
@@ -981,21 +981,21 @@
QuestionModel
*
question
=
_allQuestionArray
[
indexPath
.
row
];
QuestionModel
*
question
=
_allQuestionArray
[
indexPath
.
row
];
cell
.
question
=
question
;
cell
.
question
=
question
;
return
cell
;
return
cell
;
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"
商场风采
"
]
&&
indexPath
.
section
==
s4
)
{
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"
口碑随手拍
"
]
&&
indexPath
.
section
==
s4
)
{
PictureTableCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kHomePictureListCell
];
PictureTableCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kHomePictureListCell
];
if
(
!
cell
)
{
if
(
!
cell
)
{
cell
=
[[
PictureTableCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kHomePictureListCell
];
cell
=
[[
PictureTableCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kHomePictureListCell
];
}
}
cell
.
pictureList
=
_allPraiseListArray
[
indexPath
.
row
];
cell
.
pictureList
=
_allPraiseListArray
[
indexPath
.
row
];
return
cell
;
return
cell
;
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"
优秀案例
"
]
&&
indexPath
.
section
==
s5
)
{
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"
口碑报道
"
]
&&
indexPath
.
section
==
s5
)
{
PictureTableCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kHomePictureListCell
];
PictureTableCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kHomePictureListCell
];
if
(
!
cell
)
{
if
(
!
cell
)
{
cell
=
[[
PictureTableCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kHomePictureListCell
];
cell
=
[[
PictureTableCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kHomePictureListCell
];
}
}
cell
.
pictureList
=
_allExcellentCaseArray
[
indexPath
.
row
];
cell
.
pictureList
=
_allExcellentCaseArray
[
indexPath
.
row
];
return
cell
;
return
cell
;
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"
巡店报告
"
]
&&
indexPath
.
section
==
s6
)
{
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"
口碑巡店
"
]
&&
indexPath
.
section
==
s6
)
{
PictureTableCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kHomePictureListCell
];
PictureTableCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kHomePictureListCell
];
if
(
!
cell
)
{
if
(
!
cell
)
{
cell
=
[[
PictureTableCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kHomePictureListCell
];
cell
=
[[
PictureTableCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kHomePictureListCell
];
...
@@ -1033,11 +1033,11 @@
...
@@ -1033,11 +1033,11 @@
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
{
NSUInteger
s2
=
[
_sectionArray
indexOfObject
:
@"口碑报告"
];
NSUInteger
s2
=
[
_sectionArray
indexOfObject
:
@"口碑报告"
];
NSUInteger
s4
=
[
_sectionArray
indexOfObject
:
@"
商场风采
"
];
NSUInteger
s4
=
[
_sectionArray
indexOfObject
:
@"
口碑随手拍
"
];
NSUInteger
s3
=
[
_sectionArray
indexOfObject
:
@"问题知识"
];
NSUInteger
s3
=
[
_sectionArray
indexOfObject
:
@"问题知识"
];
NSUInteger
s1
=
[
_sectionArray
indexOfObject
:
@"口碑巡检"
];
NSUInteger
s1
=
[
_sectionArray
indexOfObject
:
@"口碑巡检"
];
NSUInteger
s5
=
[
_sectionArray
indexOfObject
:
@"
优秀案例
"
];
NSUInteger
s5
=
[
_sectionArray
indexOfObject
:
@"
口碑报道
"
];
NSUInteger
s6
=
[
_sectionArray
indexOfObject
:
@"
巡店报告
"
];
NSUInteger
s6
=
[
_sectionArray
indexOfObject
:
@"
口碑巡店
"
];
NSUInteger
s7
=
[
_sectionArray
indexOfObject
:
@"在线抽查"
];
NSUInteger
s7
=
[
_sectionArray
indexOfObject
:
@"在线抽查"
];
NSUInteger
s8
=
[
_sectionArray
indexOfObject
:
@"查看抽查"
];
NSUInteger
s8
=
[
_sectionArray
indexOfObject
:
@"查看抽查"
];
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"口碑巡检"
]
&&
indexPath
.
section
==
s1
)
{
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"口碑巡检"
]
&&
indexPath
.
section
==
s1
)
{
...
@@ -1068,25 +1068,25 @@
...
@@ -1068,25 +1068,25 @@
questionDetailVC
.
questionUuid
=
question
.
uuid
;
questionDetailVC
.
questionUuid
=
question
.
uuid
;
self
.
hidesBottomBarWhenPushed
=
YES
;
self
.
hidesBottomBarWhenPushed
=
YES
;
[
self
.
navigationController
pushViewController
:
questionDetailVC
animated
:
YES
];
[
self
.
navigationController
pushViewController
:
questionDetailVC
animated
:
YES
];
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"
商场风采
"
]
&&
indexPath
.
section
==
s4
)
{
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"
口碑随手拍
"
]
&&
indexPath
.
section
==
s4
)
{
PictureListModel
*
picList
=
_allPraiseListArray
[
indexPath
.
row
];
PictureListModel
*
picList
=
_allPraiseListArray
[
indexPath
.
row
];
PictureStoryViewController
*
storyVC
=
[[
PictureStoryViewController
alloc
]
init
];
PictureStoryViewController
*
storyVC
=
[[
PictureStoryViewController
alloc
]
init
];
storyVC
.
uuid
=
picList
.
uuid
;
storyVC
.
uuid
=
picList
.
uuid
;
storyVC
.
titleStr
=
@"
商场风采
"
;
storyVC
.
titleStr
=
@"
口碑随手拍
"
;
self
.
hidesBottomBarWhenPushed
=
YES
;
self
.
hidesBottomBarWhenPushed
=
YES
;
[
self
.
navigationController
pushViewController
:
storyVC
animated
:
YES
];
[
self
.
navigationController
pushViewController
:
storyVC
animated
:
YES
];
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"
优秀案例
"
]
&&
indexPath
.
section
==
s5
)
{
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"
口碑报道
"
]
&&
indexPath
.
section
==
s5
)
{
PictureListModel
*
picList
=
_allExcellentCaseArray
[
indexPath
.
row
];
PictureListModel
*
picList
=
_allExcellentCaseArray
[
indexPath
.
row
];
PictureStoryViewController
*
storyVC
=
[[
PictureStoryViewController
alloc
]
init
];
PictureStoryViewController
*
storyVC
=
[[
PictureStoryViewController
alloc
]
init
];
storyVC
.
uuid
=
picList
.
uuid
;
storyVC
.
uuid
=
picList
.
uuid
;
storyVC
.
titleStr
=
@"
优秀案例
"
;
storyVC
.
titleStr
=
@"
口碑报道
"
;
self
.
hidesBottomBarWhenPushed
=
YES
;
self
.
hidesBottomBarWhenPushed
=
YES
;
[
self
.
navigationController
pushViewController
:
storyVC
animated
:
YES
];
[
self
.
navigationController
pushViewController
:
storyVC
animated
:
YES
];
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"
巡店报告
"
]
&&
indexPath
.
section
==
s6
)
{
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"
口碑巡店
"
]
&&
indexPath
.
section
==
s6
)
{
PictureListModel
*
picList
=
_allPatrolReportArray
[
indexPath
.
row
];
PictureListModel
*
picList
=
_allPatrolReportArray
[
indexPath
.
row
];
PictureStoryViewController
*
storyVC
=
[[
PictureStoryViewController
alloc
]
init
];
PictureStoryViewController
*
storyVC
=
[[
PictureStoryViewController
alloc
]
init
];
storyVC
.
uuid
=
picList
.
uuid
;
storyVC
.
uuid
=
picList
.
uuid
;
storyVC
.
titleStr
=
@"
巡店报告
"
;
storyVC
.
titleStr
=
@"
口碑巡店
"
;
self
.
hidesBottomBarWhenPushed
=
YES
;
self
.
hidesBottomBarWhenPushed
=
YES
;
[
self
.
navigationController
pushViewController
:
storyVC
animated
:
YES
];
[
self
.
navigationController
pushViewController
:
storyVC
animated
:
YES
];
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"在线抽查"
]
&&
indexPath
.
section
==
s7
)
{
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"在线抽查"
]
&&
indexPath
.
section
==
s7
)
{
...
...
redstar/Classes/Tools/HttpClient/HttpClient.h
View file @
0b955368
...
@@ -90,22 +90,22 @@ typedef void (^completionBlock) (id response, NSError *error);
...
@@ -90,22 +90,22 @@ typedef void (^completionBlock) (id response, NSError *error);
-
(
void
)
getQuestionCategoryWithCompletion
:(
completionBlock
)
completion
;
-
(
void
)
getQuestionCategoryWithCompletion
:(
completionBlock
)
completion
;
/**
/**
*
图说口碑
相关URL
*
口碑现场
相关URL
*/
*/
// 保存
图说口碑
// 保存
口碑现场
-
(
void
)
savePicturePraiseWithParameters
:(
id
)
parameters
completion
:(
completionBlock
)
completion
;
-
(
void
)
savePicturePraiseWithParameters
:(
id
)
parameters
completion
:(
completionBlock
)
completion
;
// 上传口碑图片
// 上传口碑图片
-
(
void
)
upLoadPraisePictureWithParameters
:(
id
)
parameters
completion
:(
completionBlock
)
completion
;
-
(
void
)
upLoadPraisePictureWithParameters
:(
id
)
parameters
completion
:(
completionBlock
)
completion
;
// 提交
图说口碑
// 提交
口碑现场
-
(
void
)
submitPicturePraiseWithCompletion
:(
completionBlock
)
completion
;
-
(
void
)
submitPicturePraiseWithCompletion
:(
completionBlock
)
completion
;
// 查询
图说口碑
// 查询
口碑现场
-
(
void
)
queryPicturePraiseWithParameters
:(
id
)
parameters
completion
:(
completionBlock
)
completion
;
-
(
void
)
queryPicturePraiseWithParameters
:(
id
)
parameters
completion
:(
completionBlock
)
completion
;
//
图说口碑
明细
//
口碑现场
明细
-
(
void
)
getPicturePraiseDetailWithCompletion
:(
completionBlock
)
completion
;
-
(
void
)
getPicturePraiseDetailWithCompletion
:(
completionBlock
)
completion
;
// 口碑点赞
// 口碑点赞
...
@@ -125,4 +125,7 @@ typedef void (^completionBlock) (id response, NSError *error);
...
@@ -125,4 +125,7 @@ typedef void (^completionBlock) (id response, NSError *error);
// 获取口碑标准的附件列表
// 获取口碑标准的附件列表
-
(
void
)
getAttachmentsWithParameters
:(
id
)
parameters
completion
:(
completionBlock
)
completion
;
-
(
void
)
getAttachmentsWithParameters
:(
id
)
parameters
completion
:(
completionBlock
)
completion
;
// 提交问题处理结果
-
(
void
)
submitQuestionResultWithParameters
:(
id
)
parameters
completion
:(
completionBlock
)
completion
;
@end
@end
redstar/Classes/Tools/HttpClient/HttpClient.m
View file @
0b955368
...
@@ -327,10 +327,10 @@
...
@@ -327,10 +327,10 @@
}
}
/**
/**
*
图说口碑
相关URL
*
口碑现场
相关URL
*/
*/
// 保存
图说口碑
// 保存
口碑现场
-
(
void
)
savePicturePraiseWithParameters
:
(
id
)
parameters
completion
:
(
completionBlock
)
completion
-
(
void
)
savePicturePraiseWithParameters
:
(
id
)
parameters
completion
:
(
completionBlock
)
completion
{
{
[
self
postParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
[
self
postParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
...
@@ -350,7 +350,7 @@
...
@@ -350,7 +350,7 @@
}];
}];
}
}
// 提交
图说口碑
// 提交
口碑现场
-
(
void
)
submitPicturePraiseWithCompletion
:
(
completionBlock
)
completion
-
(
void
)
submitPicturePraiseWithCompletion
:
(
completionBlock
)
completion
{
{
[
self
postParameters
:
nil
completion
:
^
(
id
response
,
NSError
*
error
)
{
[
self
postParameters
:
nil
completion
:
^
(
id
response
,
NSError
*
error
)
{
...
@@ -360,7 +360,7 @@
...
@@ -360,7 +360,7 @@
}];
}];
}
}
// 查询
图说口碑
// 查询
口碑现场
-
(
void
)
queryPicturePraiseWithParameters
:
(
id
)
parameters
completion
:
(
completionBlock
)
completion
-
(
void
)
queryPicturePraiseWithParameters
:
(
id
)
parameters
completion
:
(
completionBlock
)
completion
{
{
[
self
postParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
[
self
postParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
...
@@ -370,7 +370,7 @@
...
@@ -370,7 +370,7 @@
}];
}];
}
}
//
图说口碑
明细
//
口碑现场
明细
-
(
void
)
getPicturePraiseDetailWithCompletion
:
(
completionBlock
)
completion
-
(
void
)
getPicturePraiseDetailWithCompletion
:
(
completionBlock
)
completion
{
{
[
self
getParameters
:
nil
completion
:
^
(
id
response
,
NSError
*
error
)
{
[
self
getParameters
:
nil
completion
:
^
(
id
response
,
NSError
*
error
)
{
...
@@ -431,4 +431,13 @@
...
@@ -431,4 +431,13 @@
}];
}];
}
}
-
(
void
)
submitQuestionResultWithParameters
:
(
id
)
parameters
completion
:
(
completionBlock
)
completion
{
[
self
postParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
if
(
completion
)
{
completion
(
response
,
error
);
}
}];
}
@end
@end
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