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
edfaf8dc
Commit
edfaf8dc
authored
Dec 02, 2015
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改部分bug
parent
761ba49d
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
250 additions
and
80 deletions
+250
-80
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
Contents.json
redstar/Assets.xcassets/home/task_001.imageset/Contents.json
+2
-2
口碑巡检_功能一览@2x.png
...r/Assets.xcassets/home/task_001.imageset/口碑巡检_功能一览@2x.png
+0
-0
口碑巡检_功能一览@3x.png
...r/Assets.xcassets/home/task_001.imageset/口碑巡检_功能一览@3x.png
+0
-0
Contents.json
redstar/Assets.xcassets/home/task_005.imageset/Contents.json
+2
-2
praise_report@2x.png
...sets.xcassets/home/task_005.imageset/praise_report@2x.png
+0
-0
praise_report@3x.png
...sets.xcassets/home/task_005.imageset/praise_report@3x.png
+0
-0
Contents.json
redstar/Assets.xcassets/home/task_01.imageset/Contents.json
+2
-2
口碑巡检_首页@2x.png
redstar/Assets.xcassets/home/task_01.imageset/口碑巡检_首页@2x.png
+0
-0
口碑巡检_首页@3x.png
redstar/Assets.xcassets/home/task_01.imageset/口碑巡检_首页@3x.png
+0
-0
Contents.json
redstar/Assets.xcassets/home/task_05.imageset/Contents.json
+2
-2
task_01@2x.png
redstar/Assets.xcassets/home/task_05.imageset/task_01@2x.png
+0
-0
task_01@3x.png
redstar/Assets.xcassets/home/task_05.imageset/task_01@3x.png
+0
-0
PictureTableCell.m
...dule/Function/Picture/PictureList/Cell/PictureTableCell.m
+1
-1
AddQuestionViewController.m
...on/AddQuestion/ViewController/AddQuestionViewController.m
+9
-5
QuestionDescribeCell.m
...ction/Question/QuestionDetail/Cell/QuestionDescribeCell.m
+24
-9
QuestionDetailCell.m
...unction/Question/QuestionDetail/Cell/QuestionDetailCell.m
+12
-7
QuestionListTableCell.m
...nction/Question/QuestionList/Cell/QuestionListTableCell.m
+1
-1
InspectNotUpLoadCell.m
...OfMouth/Inspect/InspectDetail/Cell/InspectNotUpLoadCell.m
+4
-0
InspectNotUploadViewController.m
...ectDetail/ViewController/InspectNotUploadViewController.m
+31
-4
InspectUploadedViewController.m
...pectDetail/ViewController/InspectUploadedViewController.m
+3
-0
TaskListModel.h
...ion/WordOfMouth/Inspect/InspectList/Model/TaskListModel.h
+3
-1
InspectListViewController.m
...ct/InspectList/ViewController/InspectListViewController.m
+49
-0
TaskDetailModel.h
...n/WordOfMouth/Inspect/InspectTask/Model/TaskDetailModel.h
+2
-1
InspectTaskViewController.m
...ct/InspectTask/ViewController/InspectTaskViewController.m
+36
-1
RankListHeaderView.m
...WordOfMouth/Ranking/RankingList/View/RankListHeaderView.m
+24
-8
LoginViewController.m
...Classes/Module/Login/ViewController/LoginViewController.m
+40
-31
ZanButton.m
redstar/Classes/Tools/ZanButton/ZanButton.m
+3
-3
No files found.
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
edfaf8dc
No preview for this file type
redstar/Assets.xcassets/home/task_001.imageset/Contents.json
View file @
edfaf8dc
...
...
@@ -6,12 +6,12 @@
},
{
"idiom"
:
"universal"
,
"filename"
:
"
praise_report
@2x.png"
,
"filename"
:
"
口碑巡检_功能一览
@2x.png"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"filename"
:
"
praise_report
@3x.png"
,
"filename"
:
"
口碑巡检_功能一览
@3x.png"
,
"scale"
:
"3x"
}
],
...
...
redstar/Assets.xcassets/home/task_00
5
.imageset/口碑巡检_功能一览@2x.png
→
redstar/Assets.xcassets/home/task_00
1
.imageset/口碑巡检_功能一览@2x.png
View file @
edfaf8dc
File moved
redstar/Assets.xcassets/home/task_00
5
.imageset/口碑巡检_功能一览@3x.png
→
redstar/Assets.xcassets/home/task_00
1
.imageset/口碑巡检_功能一览@3x.png
View file @
edfaf8dc
File moved
redstar/Assets.xcassets/home/task_005.imageset/Contents.json
View file @
edfaf8dc
...
...
@@ -6,12 +6,12 @@
},
{
"idiom"
:
"universal"
,
"filename"
:
"
口碑巡检_功能一览
@2x.png"
,
"filename"
:
"
praise_report
@2x.png"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"filename"
:
"
口碑巡检_功能一览
@3x.png"
,
"filename"
:
"
praise_report
@3x.png"
,
"scale"
:
"3x"
}
],
...
...
redstar/Assets.xcassets/home/task_00
1
.imageset/praise_report@2x.png
→
redstar/Assets.xcassets/home/task_00
5
.imageset/praise_report@2x.png
View file @
edfaf8dc
File moved
redstar/Assets.xcassets/home/task_00
1
.imageset/praise_report@3x.png
→
redstar/Assets.xcassets/home/task_00
5
.imageset/praise_report@3x.png
View file @
edfaf8dc
File moved
redstar/Assets.xcassets/home/task_01.imageset/Contents.json
View file @
edfaf8dc
...
...
@@ -6,12 +6,12 @@
},
{
"idiom"
:
"universal"
,
"filename"
:
"
task_01
@2x.png"
,
"filename"
:
"
口碑巡检_首页
@2x.png"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"filename"
:
"
task_01
@3x.png"
,
"filename"
:
"
口碑巡检_首页
@3x.png"
,
"scale"
:
"3x"
}
],
...
...
redstar/Assets.xcassets/home/task_0
5
.imageset/口碑巡检_首页@2x.png
→
redstar/Assets.xcassets/home/task_0
1
.imageset/口碑巡检_首页@2x.png
View file @
edfaf8dc
File moved
redstar/Assets.xcassets/home/task_0
5
.imageset/口碑巡检_首页@3x.png
→
redstar/Assets.xcassets/home/task_0
1
.imageset/口碑巡检_首页@3x.png
View file @
edfaf8dc
File moved
redstar/Assets.xcassets/home/task_05.imageset/Contents.json
View file @
edfaf8dc
...
...
@@ -6,12 +6,12 @@
},
{
"idiom"
:
"universal"
,
"filename"
:
"
口碑巡检_首页
@2x.png"
,
"filename"
:
"
task_01
@2x.png"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"filename"
:
"
口碑巡检_首页
@3x.png"
,
"filename"
:
"
task_01
@3x.png"
,
"scale"
:
"3x"
}
],
...
...
redstar/Assets.xcassets/home/task_0
1
.imageset/task_01@2x.png
→
redstar/Assets.xcassets/home/task_0
5
.imageset/task_01@2x.png
View file @
edfaf8dc
File moved
redstar/Assets.xcassets/home/task_0
1
.imageset/task_01@3x.png
→
redstar/Assets.xcassets/home/task_0
5
.imageset/task_01@3x.png
View file @
edfaf8dc
File moved
redstar/Classes/Module/Function/Picture/PictureList/Cell/PictureTableCell.m
View file @
edfaf8dc
...
...
@@ -194,7 +194,7 @@
NSLayoutConstraint
*
titleImageTop
=
[
NSLayoutConstraint
constraintWithItem
:
_commentBtn
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
titleImageView
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
12
];
[
self
.
contentView
addConstraint
:
titleImageTop
];
NSLayoutConstraint
*
titleImageWidth
=
[
NSLayoutConstraint
constraintWithItem
:
_commentBtn
attribute
:
NSLayoutAttributeWidth
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
6
0
];
NSLayoutConstraint
*
titleImageWidth
=
[
NSLayoutConstraint
constraintWithItem
:
_commentBtn
attribute
:
NSLayoutAttributeWidth
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
7
0
];
[
self
.
contentView
addConstraint
:
titleImageWidth
];
NSLayoutConstraint
*
titleRight
=
[
NSLayoutConstraint
constraintWithItem
:
_commentBtn
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:-
15
];
...
...
redstar/Classes/Module/Function/Question/AddQuestion/ViewController/AddQuestionViewController.m
View file @
edfaf8dc
...
...
@@ -119,9 +119,9 @@
[
imageArray
addObject
:
dict
];
}
parameters
=
@{
@"category"
:
@"环境物业"
,
@"group"
:
@"基础环境"
,
@"title"
:
@"测试数据"
,
parameters
=
@{
@"category"
:
_selectLabel
.
text
,
@"group"
:
_selectLabel1
.
text
,
@"title"
:
self
.
footerView
.
contentTextView
.
text
,
@"content"
:
self
.
footerView
.
titleTextView
.
text
,
@"attachments"
:
imageArray
};
}
...
...
@@ -144,10 +144,14 @@
HttpClient
*
client
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
[
client
uploadNewQuestionWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"上传 response= %@, error = %@"
,
response
,
error
);
NSLog
(
@"上传
新问题
response= %@, error = %@"
,
response
,
error
);
if
(
response
[
@"success"
])
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"新问题提报成功!"
delegate
:
self
cancelButtonTitle
:
@"确定"
otherButtonTitles
:
nil
,
nil
];
[
alert
show
];
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
}
else
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"警告"
message
:
@"新问题提报失败!"
delegate
:
self
cancelButtonTitle
:
@"确定"
otherButtonTitles
:
nil
,
nil
];
[
alert
show
];
}
}];
...
...
redstar/Classes/Module/Function/Question/QuestionDetail/Cell/QuestionDescribeCell.m
View file @
edfaf8dc
...
...
@@ -109,17 +109,32 @@
}
// 反馈
NSString
*
answerStr
=
[
NSString
stringWithFormat
:
@"%@"
,
questionDetail
.
feedback
];
NSMutableAttributedString
*
answerAttrStr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
answerStr
];
NSMutableParagraphStyle
*
paragraphStyle2
=
[[
NSMutableParagraphStyle
alloc
]
init
];
paragraphStyle2
.
alignment
=
NSTextAlignmentLeft
;
paragraphStyle2
.
lineSpacing
=
6
;
//行自定义行高度
[
answerAttrStr
addAttribute
:
NSParagraphStyleAttributeName
value
:
paragraphStyle2
range
:
NSMakeRange
(
0
,
answerStr
.
length
)];
self
.
answerLabel
.
attributedText
=
answerAttrStr
;
if
(
questionDetail
.
feedback
==
nil
||
questionDetail
.
feedback
==
NULL
||
[
questionDetail
.
feedback
isEqual
:[
NSNull
null
]])
{
self
.
answerLabel
.
text
=
@""
;
}
else
{
NSString
*
answerStr
=
[
NSString
stringWithFormat
:
@"%@"
,
questionDetail
.
feedback
];
NSMutableAttributedString
*
answerAttrStr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
answerStr
];
NSMutableParagraphStyle
*
paragraphStyle2
=
[[
NSMutableParagraphStyle
alloc
]
init
];
paragraphStyle2
.
alignment
=
NSTextAlignmentLeft
;
paragraphStyle2
.
lineSpacing
=
6
;
//行自定义行高度
[
answerAttrStr
addAttribute
:
NSParagraphStyleAttributeName
value
:
paragraphStyle2
range
:
NSMakeRange
(
0
,
answerStr
.
length
)];
self
.
answerLabel
.
attributedText
=
answerAttrStr
;
}
// 解决人
self
.
peopleLabel
.
text
=
[
NSString
stringWithFormat
:
@"问题解决负责人:%@"
,
questionDetail
.
resolveUser_name
];
self
.
dateLabel
.
text
=
[
NSString
stringWithFormat
:
@"反馈时间:%@"
,
questionDetail
.
lastModify_time
];
if
(
questionDetail
.
resolveUser_name
==
nil
||
questionDetail
.
resolveUser_name
==
NULL
||
[
questionDetail
.
resolveUser_name
isEqual
:[
NSNull
null
]])
{
self
.
peopleLabel
.
text
=
[
NSString
stringWithFormat
:
@"问题解决负责人:"
];
}
else
{
self
.
peopleLabel
.
text
=
[
NSString
stringWithFormat
:
@"问题解决负责人:%@"
,
questionDetail
.
resolveUser_name
];
}
if
(
questionDetail
.
resolveTime
==
nil
||
questionDetail
.
resolveTime
==
NULL
||
[
questionDetail
.
resolveTime
isEqual
:[
NSNull
null
]])
{
self
.
dateLabel
.
text
=
[
NSString
stringWithFormat
:
@"反馈时间:"
];
}
else
{
self
.
dateLabel
.
text
=
[
NSString
stringWithFormat
:
@"反馈时间:%@"
,
questionDetail
.
resolveTime
];
}
}
#pragma mark - lazy loading
...
...
redstar/Classes/Module/Function/Question/QuestionDetail/Cell/QuestionDetailCell.m
View file @
edfaf8dc
...
...
@@ -64,12 +64,16 @@
[
self
.
sortLabel
setAttributedText
:
sortAttr
];
// 商场
NSString
*
shopText
=
[
NSString
stringWithFormat
:
@"商场:%@"
,
questionDetail
.
storePath
];
NSMutableAttributedString
*
shopAttr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
shopText
];
[
shopAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kDetailCellDescribeTextColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
15
.
0
f
]}
range
:
NSMakeRange
(
0
,
3
)];
[
shopAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kdetailCellTitleColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
15
.
0
f
]}
range
:
NSMakeRange
(
3
,
shopText
.
length
-
3
)];
[
self
.
shopLabel
setAttributedText
:
shopAttr
];
if
(
questionDetail
.
storePath
==
nil
||
questionDetail
.
storePath
==
NULL
||
[
questionDetail
.
storePath
isEqual
:[
NSNull
null
]])
{
self
.
shopLabel
.
text
=
@"商场:"
;
self
.
shopLabel
.
textColor
=
kDetailCellDescribeTextColor
;
}
else
{
NSString
*
shopText
=
[
NSString
stringWithFormat
:
@"商场:%@"
,
questionDetail
.
storePath
];
NSMutableAttributedString
*
shopAttr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
shopText
];
[
shopAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kDetailCellDescribeTextColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
15
.
0
f
]}
range
:
NSMakeRange
(
0
,
3
)];
[
shopAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kdetailCellTitleColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
15
.
0
f
]}
range
:
NSMakeRange
(
3
,
shopText
.
length
-
3
)];
[
self
.
shopLabel
setAttributedText
:
shopAttr
];
}
// 问题提报人
NSString
*
peopleText
=
[
NSString
stringWithFormat
:
@"问题提报人:%@"
,
questionDetail
.
submitUser_name
];
NSMutableAttributedString
*
peopleAttr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
peopleText
];
...
...
@@ -129,7 +133,7 @@
[
self
.
contentView
addConstraint
:
thumbTop
];
// 左边
NSLayoutConstraint
*
thumbWidth
=
[
NSLayoutConstraint
constraintWithItem
:
_thumbBtn
attribute
:
NSLayoutAttributeWidth
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
6
0
];
NSLayoutConstraint
*
thumbWidth
=
[
NSLayoutConstraint
constraintWithItem
:
_thumbBtn
attribute
:
NSLayoutAttributeWidth
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
8
0
];
[
self
.
contentView
addConstraint
:
thumbWidth
];
// 右边
...
...
@@ -174,6 +178,7 @@
{
if
(
!
_shopLabel
)
{
_shopLabel
=
[[
UILabel
alloc
]
init
];
_shopLabel
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
_shopLabel
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
.
contentView
addSubview
:
_shopLabel
];
...
...
redstar/Classes/Module/Function/Question/QuestionList/Cell/QuestionListTableCell.m
View file @
edfaf8dc
...
...
@@ -218,7 +218,7 @@
[
self
.
contentView
addConstraint
:
stateTop
];
// 左边
NSLayoutConstraint
*
stateWidth
=
[
NSLayoutConstraint
constraintWithItem
:
_thumbBtn
attribute
:
NSLayoutAttributeWidth
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
55
];
NSLayoutConstraint
*
stateWidth
=
[
NSLayoutConstraint
constraintWithItem
:
_thumbBtn
attribute
:
NSLayoutAttributeWidth
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
80
];
[
self
.
contentView
addConstraint
:
stateWidth
];
// 右边
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectDetail/Cell/InspectNotUpLoadCell.m
View file @
edfaf8dc
...
...
@@ -121,6 +121,10 @@
NSLayoutConstraint
*
overDateBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_introDetailLabel
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:-
20
];
[
self
.
contentView
addConstraint
:
overDateBottom
];
//
// NSLayoutConstraint *overDateh = [NSLayoutConstraint constraintWithItem:_introDetailLabel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:100];
// [self.contentView addConstraint:overDateh];
}
return
_introDetailLabel
;
}
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectDetail/ViewController/InspectNotUploadViewController.m
View file @
edfaf8dc
...
...
@@ -13,9 +13,12 @@
#import <MBProgressHUD.h>
#import "CommonFunc.h"
#import "HttpClient.h"
#import "InspectTaskViewController.h"
#define kInspectNotUploadCell @"InspectNotUploadCell"
@interface
InspectNotUploadViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
UINavigationControllerDelegate
,
UIImagePickerControllerDelegate
,
TakePhotoViewDelegate
,
UIScrollViewDelegate
>
@interface
InspectNotUploadViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
UINavigationControllerDelegate
,
UIImagePickerControllerDelegate
,
TakePhotoViewDelegate
,
UIScrollViewDelegate
,
UIAlertViewDelegate
>
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
InspectDetailFooterView
*
footerView
;
...
...
@@ -66,6 +69,13 @@
-
(
void
)
uploadTaskInfo
:
(
UIButton
*
)
sender
{
int
impose
=
_taskModel
.
attachmentNumber
;
if
((
int
)
_imageNameArray
.
count
<
impose
)
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:[
NSString
stringWithFormat
:
@"要求图片%d张才能上传!"
,
impose
]
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
[
alert
show
];
return
;
}
NSMutableArray
*
imageArray
=
[
NSMutableArray
array
];
for
(
int
i
=
0
;
i
<
_imageNameArray
.
count
;
i
++
)
{
NSString
*
imageName
=
_imageNameArray
[
i
];
...
...
@@ -87,7 +97,6 @@
NSString
*
operId
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_code"
];
NSString
*
operName
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_name"
];
NSLog
(
@"self = %@, 1= %@, 2 = %@"
,
self
.
praiseUuid
,
self
.
store_uuid
,
self
.
questionUuid
);
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@%@?time=%@&operId=%@&operName=%@"
,
kRedStarURL
,
kUpLoadInspectResult
,
self
.
praiseUuid
,
dateString
,
operId
,
operName
];
url
=
[
url
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
];
...
...
@@ -103,8 +112,13 @@
NSLog
(
@"上传检查点parameters = %@"
,
parameters
);
[
httpClient
uploadInspectResultWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"ressssss =%@ errorrrrr = %@"
,
response
,
error
);
NSLog
(
@"上传检查点 respose =%@ error = %@"
,
response
,
error
);
if
(
response
[
@"success"
])
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"检查点上报成功!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
alert
.
delegate
=
self
;
alert
.
tag
=
39429234
;
[
alert
show
];
}
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
}];
...
...
@@ -244,6 +258,8 @@
cell
.
titleDetailLabel
.
text
=
[
NSString
stringWithFormat
:
@"要求图片%d张"
,
_taskModel
.
attachmentNumber
];
cell
.
introLabel
.
text
=
@"参考说明"
;
cell
.
introDetailLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
_taskModel
.
reference
];
// cell.introDetailLabel.backgroundColor = [UIColor greenColor];
// [cell.introDetailLabel loadHTMLString:[NSString stringWithFormat:@"%@", _taskModel.reference] baseURL:nil];
return
cell
;
}
...
...
@@ -266,6 +282,17 @@
return
CGFLOAT_MIN
;
}
#pragma mark - UIAlertViewDelegate
-
(
void
)
alertView
:
(
UIAlertView
*
)
alertView
clickedButtonAtIndex
:
(
NSInteger
)
buttonIndex
{
if
(
buttonIndex
==
0
&&
alertView
.
tag
==
39429234
)
{
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
NSNotificationCenter
*
notification
=
[
NSNotificationCenter
defaultCenter
];
[
notification
postNotificationName
:
@"kReloadTableView"
object
:
self
];
}
}
#pragma mark - lazy loading
-
(
UITableView
*
)
tableView
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectDetail/ViewController/InspectUploadedViewController.m
View file @
edfaf8dc
...
...
@@ -77,6 +77,9 @@
cell
.
titleDetailLabel
.
text
=
[
NSString
stringWithFormat
:
@"要求图片%d张"
,
_taskModel
.
attachmentNumber
];
cell
.
introLabel
.
text
=
@"参考说明"
;
cell
.
introDetailLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
_taskModel
.
reference
];
// cell.introDetailLabel.backgroundColor = [UIColor greenColor];
// [cell.introDetailLabel loadHTMLString:[NSString stringWithFormat:@"%@", _taskModel.reference] baseURL:nil];
return
cell
;
}
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectList/Model/TaskListModel.h
View file @
edfaf8dc
...
...
@@ -10,7 +10,7 @@
@interface
TaskListModel
:
NSObject
@property
(
nonatomic
,
copy
)
NSString
*
beginDate
;
@property
(
nonatomic
,
copy
)
NSArray
*
categories
;
@property
(
nonatomic
,
strong
)
NSArray
*
categories
;
@property
(
nonatomic
,
copy
)
NSString
*
commentId
;
@property
(
nonatomic
,
copy
)
NSString
*
create_id
;
@property
(
nonatomic
,
copy
)
NSString
*
create_operName
;
...
...
@@ -35,4 +35,6 @@
@property
(
nonatomic
,
copy
)
NSString
*
uuid
;
@property
(
nonatomic
,
copy
)
NSString
*
version
;
@property
(
nonatomic
,
copy
)
NSString
*
storePath
;
@property
(
nonatomic
,
copy
)
NSString
*
gradeCount
;
@property
(
nonatomic
,
strong
)
NSArray
*
published
;
@end
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectList/ViewController/InspectListViewController.m
View file @
edfaf8dc
...
...
@@ -81,6 +81,11 @@
[
self
requestInspectList
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
requestCurrentList
)
name
:
@"kReloadTableView"
object
:
nil
];
}
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
...
...
@@ -105,6 +110,50 @@
}
#pragma mark - Private
-
(
void
)
requestCurrentList
{
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kInspectListURL
];
HttpClient
*
httpCilent
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
NSDictionary
*
parameters
=
@{
@"queryOrders"
:
@[@{
@"field"
:
@"lastModifyInfo"
}],
@"pageNumber"
:
@
(
0
),
@"pageSize"
:
@
(
20
)
};
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
[
httpCilent
getInspectListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"巡检列表%@"
,
response
);
NSDictionary
*
dataDict
=
response
[
@"data"
];
NSArray
*
dataArray
=
dataDict
[
@"records"
];
NSMutableArray
*
taskArray
=
[
NSMutableArray
array
];
for
(
NSDictionary
*
dict
in
dataArray
)
{
TaskListModel
*
taskList
=
[[
TaskListModel
alloc
]
init
];
[
taskList
setValuesForKeysWithDictionary
:
dict
];
[
taskArray
addObject
:
taskList
];
}
_taskListDataArray
=
taskArray
;
if
(
_taskListDataArray
.
count
==
0
)
{
self
.
noDataView
.
backgroundColor
=
[
UIColor
whiteColor
];
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
}
else
{
self
.
tableView
.
delegate
=
self
;
self
.
tableView
.
dataSource
=
self
;
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
}
[
self
.
tableView
reloadData
];
}];
}
-
(
void
)
taxisBtnCilck
:
(
UIButton
*
)
sender
{
NSLog
(
@"拍讯"
);
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectTask/Model/TaskDetailModel.h
View file @
edfaf8dc
...
...
@@ -37,7 +37,8 @@
@property
(
nonatomic
,
copy
)
NSString
*
version
;
@property
(
nonatomic
,
copy
)
NSString
*
storePath
;
@property
(
nonatomic
,
copy
)
NSString
*
gradeCount
;
@property
(
nonatomic
,
strong
)
NSArray
*
published
;
+
(
instancetype
)
taskDetailModelWithDict
:(
NSDictionary
*
)
dict
;
-
(
instancetype
)
initWithDict
:(
NSDictionary
*
)
dict
;
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectTask/ViewController/InspectTaskViewController.m
View file @
edfaf8dc
...
...
@@ -75,6 +75,11 @@
// 口碑巡检明细
[
self
requestRankingDetail
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
requestCurrentList
)
name
:
@"kReloadTableView"
object
:
nil
];
}
-
(
void
)
didReceiveMemoryWarning
{
...
...
@@ -86,6 +91,36 @@
#pragma mark - Private Methods
-
(
void
)
requestCurrentList
{
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@%@/%@"
,
kRedStarURL
,
kInspectDetailURL
,
self
.
uuid
,
self
.
store_uuid
];
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
__block
InspectTaskViewController
*
weakSelf
=
self
;
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
[
httpClient
getPraiseDetailWithParameters
:
nil
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"口碑巡检明细PraiseDetail = %@"
,
response
);
NSDictionary
*
dataDict
=
response
[
@"data"
];
TaskDetailModel
*
taskDetail
=
[
TaskDetailModel
taskDetailModelWithDict
:
dataDict
];
weakSelf
.
detailHeaderView
.
taskDetail
=
taskDetail
;
_taskDetail
=
taskDetail
;
NSArray
*
dataArray
=
dataDict
[
@"categories"
];
NSMutableArray
*
tgArray
=
[
NSMutableArray
array
];
for
(
NSDictionary
*
dict
in
dataArray
)
{
TaskGroup
*
taskGroup
=
[
TaskGroup
taskGroupWithDict
:
dict
];
[
tgArray
addObject
:
taskGroup
];
}
_taskData
=
tgArray
;
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
[
self
.
tableView
reloadData
];
}];
}
// 返回上一页面
-
(
void
)
doBack
:
(
UIBarButtonItem
*
)
sender
{
...
...
@@ -155,7 +190,7 @@
TaskModel
*
task
=
taskGroup
.
answers
[
indexPath
.
row
];
cell
.
task
=
task
;
cell
.
titleLabel
.
text
=
[
NSString
stringWithFormat
:
@"%
@、%@"
,
task
.
lineNo
,
task
.
title
];
cell
.
titleLabel
.
text
=
[
NSString
stringWithFormat
:
@"%
d、%@"
,
(
int
)
indexPath
.
row
+
1
,
task
.
title
];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
cell
.
accessoryType
=
UITableViewCellAccessoryDisclosureIndicator
;
...
...
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankingList/View/RankListHeaderView.m
View file @
edfaf8dc
...
...
@@ -20,6 +20,8 @@
NSInteger
_section
;
UILabel
*
_gradeLabel
;
UIImageView
*
_gradeImageView
;
UIView
*
_lineView
;
}
@end
...
...
@@ -50,9 +52,9 @@
UIButton
*
bgButton
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
bgButton
.
contentHorizontalAlignment
=
UIControlContentHorizontalAlignmentLeft
;
bgButton
.
contentEdgeInsets
=
UIEdgeInsetsMake
(
0
,
0
,
0
,
10
);
bgButton
.
titleEdgeInsets
=
UIEdgeInsetsMake
(
0
,
30
,
0
,
0
);
bgButton
.
titleEdgeInsets
=
UIEdgeInsetsMake
(
0
,
5
,
0
,
0
);
[
bgButton
setTitleColor
:
kLightBlack
forState
:
UIControlStateNormal
];
bgButton
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
1
8
.
0
];
bgButton
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
1
7
.
0
];
[
bgButton
addTarget
:
self
action
:
@selector
(
headBtnClick
)
forControlEvents
:
UIControlEventTouchUpInside
];
bgButton
.
backgroundColor
=
[
UIColor
whiteColor
];
[
self
addSubview
:
bgButton
];
...
...
@@ -79,10 +81,15 @@
}
else
{
UILabel
*
gradeLabel
=
[[
UILabel
alloc
]
init
];
gradeLabel
.
textAlignment
=
NSTextAlignmentCenter
;
gradeLabel
.
textColor
=
kLightBlack
;
gradeLabel
.
font
=
[
UIFont
systemFontOfSize
:
16
.
0
];
[
self
addSubview
:
gradeLabel
];
gradeLabel
.
text
=
[
NSString
stringWithFormat
:
@"第%d名"
,
(
int
)
section
+
1
];
NSString
*
rankStr
=
[
NSString
stringWithFormat
:
@"第 %d 名"
,
(
int
)
section
+
1
];
NSMutableAttributedString
*
rankAttr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
rankStr
];
[
rankAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kRankHeadTitleTextColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
14
.
0
f
]}
range
:
NSMakeRange
(
0
,
1
)];
[
rankAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kGradeNumberTextColor
}
range
:
NSMakeRange
(
1
,
rankStr
.
length
-
2
)];
[
rankAttr
addAttribute
:
NSFontAttributeName
value
:[
UIFont
fontWithName
:
@"Arial-BoldMT"
size
:
18
.
0
]
range
:
NSMakeRange
(
1
,
rankStr
.
length
-
2
)];
[
rankAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kRankHeadTitleTextColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
14
.
0
f
]}
range
:
NSMakeRange
(
rankStr
.
length
-
1
,
1
)];
[
gradeLabel
setAttributedText
:
rankAttr
];
_gradeLabel
=
gradeLabel
;
}
_section
=
section
;
...
...
@@ -92,6 +99,11 @@
[
_bgView
addSubview
:
pushButton
];
_pushButton
=
pushButton
;
UIView
*
lineView
=
[[
UIView
alloc
]
init
];
[
self
addSubview
:
lineView
];
lineView
.
backgroundColor
=
kSeparateLineColor
;
_lineView
=
lineView
;
}
return
self
;
...
...
@@ -109,7 +121,11 @@
{
_rankListModel
=
rankListModel
;
[
_bgButton
setTitle
:
rankListModel
.
store_name
forState
:
UIControlStateNormal
];
_scoreLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@ 分"
,
rankListModel
.
score
];
if
(
rankListModel
.
score
==
nil
||
rankListModel
.
score
==
NULL
||
[
rankListModel
.
score
isEqual
:[
NSNull
null
]])
{
_scoreLabel
.
text
=
[
NSString
stringWithFormat
:
@"0"
];
}
else
{
_scoreLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
rankListModel
.
score
];
}
}
...
...
@@ -136,14 +152,14 @@
_bgView
.
frame
=
self
.
bounds
;
_bgButton
.
frame
=
CGRectMake
(
30
,
0
,
0
.
3
*
kScreenWidth
,
self
.
bounds
.
size
.
height
);
_arrowImageView
.
frame
=
CGRectMake
(
20
,
(
self
.
frame
.
size
.
height
-
11
)
/
2
,
9
,
10
);
_scoreLabel
.
frame
=
CGRectMake
(
0
.
4
*
kScreenWidth
,
0
,
0
.
3
*
kScreenWidth
,
50
);
_scoreLabel
.
frame
=
CGRectMake
(
0
.
4
*
kScreenWidth
,
0
,
0
.
25
*
kScreenWidth
,
50
);
if
(
_section
<
3
)
{
_gradeImageView
.
frame
=
CGRectMake
(
0
.
8
*
kScreenWidth
,
9
,
36
,
33
);
}
else
{
_gradeLabel
.
frame
=
CGRectMake
(
0
.
7
*
kScreenWidth
,
0
,
0
.
3
*
kScreenWidth
,
50
);
}
_pushButton
.
frame
=
CGRectMake
(
30
+
0
.
3
*
kScreenWidth
,
0
,
0
.
7
*
kScreenWidth
-
30
,
self
.
bounds
.
size
.
height
);;
_lineView
.
frame
=
CGRectMake
(
0
,
self
.
bounds
.
size
.
height
-
0
.
5
,
kScreenWidth
,
0
.
5
);
}
...
...
redstar/Classes/Module/Login/ViewController/LoginViewController.m
View file @
edfaf8dc
...
...
@@ -116,38 +116,47 @@
NSString
*
username
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"username"
];
NSString
*
password
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"password"
];
self
.
loginView
.
usernameTextFiled
.
text
=
username
;
self
.
loginView
.
passwordTextFiled
.
text
=
password
;
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithLogin
];
UIWindow
*
window
=
[[
UIApplication
sharedApplication
].
windows
lastObject
];
[
MBProgressHUD
showHUDAddedTo
:
window
animated
:
YES
];
[
httpClient
loginWithUsername
:
username
password
:
password
completion
:^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"登陆 respo = %@"
,
response
);
NSLog
(
@"error = %@"
,
error
);
if
([
response
[
@"message"
]
isEqualToString
:
@"ok"
])
{
// 保存登陆信息
NSUserDefaults
*
userDefault
=
[
NSUserDefaults
standardUserDefaults
];
[
userDefault
setObject
:
username
forKey
:
@"username"
];
[
userDefault
setObject
:
password
forKey
:
@"password"
];
[
userDefault
setObject
:
response
[
@"message"
]
forKey
:
@"loginMessage"
];
NSDictionary
*
dict
=
response
[
@"data"
];
NSString
*
user_code
=
dict
[
@"user_code"
];
NSString
*
user_name
=
dict
[
@"user_name"
];
NSString
*
user_uuid
=
dict
[
@"user_uuid"
];
[
userDefault
setObject
:
user_code
forKey
:
@"user_code"
];
[
userDefault
setObject
:
user_name
forKey
:
@"user_name"
];
[
userDefault
setObject
:
user_uuid
forKey
:
@"user_uuid"
];
self
.
rootTBC
=
[[
RootTabBarController
alloc
]
init
];
[
MBProgressHUD
hideHUDForView
:
window
animated
:
YES
];
[
self
presentViewController
:
_rootTBC
animated
:
YES
completion
:
nil
];
}
else
{
UIAlertView
*
alertView
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:[
NSString
stringWithFormat
:
@"%@"
,
response
[
@"message"
]]
delegate
:
nil
cancelButtonTitle
:
@"确定"
otherButtonTitles
:
nil
,
nil
];
[
MBProgressHUD
hideHUDForView
:
window
animated
:
YES
];
[
alertView
show
];
}
}];
if
(
self
.
loginView
.
usernameTextFiled
.
text
.
length
==
0
||
self
.
loginView
.
passwordTextFiled
.
text
.
length
==
0
)
{
UIAlertView
*
alertView
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"账号、密码不能为空"
delegate
:
nil
cancelButtonTitle
:
@"确定"
otherButtonTitles
:
nil
,
nil
];
[
alertView
show
];
return
;
}
else
{
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithLogin
];
UIWindow
*
window
=
[[
UIApplication
sharedApplication
].
windows
lastObject
];
[
MBProgressHUD
showHUDAddedTo
:
window
animated
:
YES
];
[
httpClient
loginWithUsername
:
username
password
:
password
completion
:^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"登陆 respo = %@"
,
response
);
NSLog
(
@"error = %@"
,
error
);
if
([
response
[
@"message"
]
isEqualToString
:
@"ok"
])
{
// 保存登陆信息
NSUserDefaults
*
userDefault
=
[
NSUserDefaults
standardUserDefaults
];
[
userDefault
setObject
:
username
forKey
:
@"username"
];
[
userDefault
setObject
:
password
forKey
:
@"password"
];
[
userDefault
setObject
:
response
[
@"message"
]
forKey
:
@"loginMessage"
];
NSDictionary
*
dict
=
response
[
@"data"
];
NSString
*
user_code
=
dict
[
@"user_code"
];
NSString
*
user_name
=
dict
[
@"user_name"
];
NSString
*
user_uuid
=
dict
[
@"user_uuid"
];
[
userDefault
setObject
:
user_code
forKey
:
@"user_code"
];
[
userDefault
setObject
:
user_name
forKey
:
@"user_name"
];
[
userDefault
setObject
:
user_uuid
forKey
:
@"user_uuid"
];
self
.
rootTBC
=
[[
RootTabBarController
alloc
]
init
];
[
MBProgressHUD
hideHUDForView
:
window
animated
:
YES
];
[
self
presentViewController
:
_rootTBC
animated
:
YES
completion
:
nil
];
}
else
{
UIAlertView
*
alertView
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:[
NSString
stringWithFormat
:
@"%@"
,
response
[
@"message"
]]
delegate
:
nil
cancelButtonTitle
:
@"确定"
otherButtonTitles
:
nil
,
nil
];
[
MBProgressHUD
hideHUDForView
:
window
animated
:
YES
];
[
alertView
show
];
}
}];
}
}
}
...
...
redstar/Classes/Tools/ZanButton/ZanButton.m
View file @
edfaf8dc
...
...
@@ -25,11 +25,11 @@
// 2.title
CGFloat
titleX
=
self
.
bounds
.
size
.
width
/
2
;
CGFloat
titleX
=
imageW
+
imageX
+
4
;
CGFloat
titleY
=
1
;
CGFloat
titleW
=
self
.
bounds
.
size
.
width
/
2
;
CGFloat
titleW
=
self
.
bounds
.
size
.
width
-
(
imageW
+
imageX
+
4
)
;
CGFloat
titleH
=
self
.
bounds
.
size
.
height
-
titleY
;
self
.
titleLabel
.
frame
=
CGRectMake
(
titleX
,
titleY
,
titleW
,
titleH
);
self
.
titleLabel
.
frame
=
CGRectMake
(
titleX
,
titleY
,
titleW
,
titleH
);
}
...
...
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