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
04cebd92
Commit
04cebd92
authored
Dec 06, 2015
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
5:问题加条件现在,如果非已解决,不能点赞和添加评论
parent
30be1a46
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
440 additions
and
294 deletions
+440
-294
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
Breakpoints_v2.xcbkptlist
...ta/admin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
+0
-32
AnnounceViewController.m
...unce/AnnounceList/ViewController/AnnounceViewController.m
+9
-4
FunctionViewController.m
redstar/Classes/Module/Function/FunctionViewController.m
+10
-10
SpotCheckOnLineViewController.m
...heckOnLine/ViewController/SpotCheckOnLineViewController.m
+4
-2
PictureViewController.m
...icture/PictureList/ViewController/PictureViewController.m
+5
-2
AddQuestionTableCell.m
...Function/Question/AddQuestion/Cell/AddQuestionTableCell.m
+2
-42
AddQuestionViewController.m
...on/AddQuestion/ViewController/AddQuestionViewController.m
+199
-72
QuestionDetailViewController.m
...stionDetail/ViewController/QuestionDetailViewController.m
+102
-68
StandardViewController.m
.../Function/Standar/ViewController/StandardViewController.m
+8
-4
InspectNotUploadViewController.m
...ectDetail/ViewController/InspectNotUploadViewController.m
+65
-49
InspectDetailHeaderView.m
...fMouth/Inspect/InspectTask/View/InspectDetailHeaderView.m
+1
-4
RankDetailViewController.m
...king/RankDetail/ViewController/RankDetailViewController.m
+10
-0
RankingListViewController.m
...ng/RankingList/ViewController/RankingListViewController.m
+2
-0
MineViewController.m
...r/Classes/Module/Mine/ViewController/MineViewController.m
+23
-5
No files found.
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
04cebd92
No preview for this file type
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
View file @
04cebd92
...
...
@@ -13,37 +13,5 @@
stopOnStyle =
"0"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"redstar/Classes/Module/Function/Question/AddQuestion/Cell/AddQuestionTableCell.m"
timestampString =
"470919794.364077"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"114"
endingLineNumber =
"114"
landmarkName =
"-contentTextView"
landmarkType =
"5"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"redstar/Classes/Module/Function/Question/AddQuestion/Cell/AddQuestionTableCell.m"
timestampString =
"470919794.364077"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"190"
endingLineNumber =
"190"
landmarkName =
"-titleTextView"
landmarkType =
"5"
>
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
redstar/Classes/Module/Announce/AnnounceList/ViewController/AnnounceViewController.m
View file @
04cebd92
...
...
@@ -43,7 +43,7 @@
self
.
allAnnoArray
=
[
NSMutableArray
array
];
self
.
isRead
=
NO
;
self
.
stateStr
=
@"
false
"
;
self
.
stateStr
=
@"
0
"
;
[
self
setNav
];
...
...
@@ -70,6 +70,9 @@
int
page_number
=
0
;
int
page_size
=
10
;
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@%@?read=%@&page_number=%d&page_size=%d"
,
kRedStarURL
,
kAnnounceListURL
,
user_uuid
,
_stateStr
,
page_number
,
page_size
];
//NSString *url = [NSString stringWithFormat:@"%@%@%@?page_number=%d&page_size=%d", kRedStarURL, kAnnounceListURL ,user_uuid, page_number, page_size];
NSLog
(
@"urlll = %@"
,
url
);
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
[
httpClient
getAnnounceListWithCompletion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"公告response = %@"
,
response
);
...
...
@@ -125,10 +128,10 @@
int
page_number
=
0
;
int
page_size
=
10
;
if
(
sender
.
selectedSegmentIndex
==
0
)
{
self
.
stateStr
=
@"
false
"
;
self
.
stateStr
=
@"
0
"
;
url
=
[
NSString
stringWithFormat
:
@"%@%@%@?read=%@&page_number=%d&page_size=%d"
,
kRedStarURL
,
kAnnounceListURL
,
user_uuid
,
_stateStr
,
page_number
,
page_size
];
}
else
if
(
sender
.
selectedSegmentIndex
==
1
)
{
self
.
stateStr
=
@"
true
"
;
self
.
stateStr
=
@"
1
"
;
url
=
[
NSString
stringWithFormat
:
@"%@%@%@?read=%@&page_number=%d&page_size=%d"
,
kRedStarURL
,
kAnnounceListURL
,
user_uuid
,
_stateStr
,
page_number
,
page_size
];
}
else
{
self
.
stateStr
=
@""
;
...
...
@@ -150,8 +153,9 @@
[
annoArray
addObject
:
anno
];
}
_allAnnoArray
=
annoArray
;
[
self
.
tableView
reloadData
];
}
[
self
.
tableView
reloadData
];
}];
...
...
@@ -160,6 +164,7 @@
#pragma mark - UITableView Delegate/DataSource
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
NSLog
(
@"cooount = %d"
,
(
int
)
_allAnnoArray
.
count
);
return
_allAnnoArray
.
count
;
}
...
...
redstar/Classes/Module/Function/FunctionViewController.m
View file @
04cebd92
...
...
@@ -50,12 +50,12 @@
#pragma mark - Private Methods
-
(
void
)
setup
{
[
self
.
onLineSamplingBtn
setTitle
:
@"
在线抽查
"
forState
:
UIControlStateNormal
];
[
self
.
wordOfMouthBtn
setTitle
:
@"口碑
巡检
"
forState
:
UIControlStateNormal
];
[
self
.
standardBtn
setTitle
:
@"
口碑标准
"
forState
:
UIControlStateNormal
];
[
self
.
onLineSamplingBtn
setTitle
:
@"
口碑巡检
"
forState
:
UIControlStateNormal
];
[
self
.
wordOfMouthBtn
setTitle
:
@"口碑
排名
"
forState
:
UIControlStateNormal
];
[
self
.
standardBtn
setTitle
:
@"
问题与知识
"
forState
:
UIControlStateNormal
];
[
self
.
pictureBtn
setTitle
:
@"图说口碑"
forState
:
UIControlStateNormal
];
[
self
.
questionBtn
setTitle
:
@"
问题与知识
"
forState
:
UIControlStateNormal
];
[
self
.
rankBtn
setTitle
:
@"
口碑排名
"
forState
:
UIControlStateNormal
];
[
self
.
questionBtn
setTitle
:
@"
口碑标准
"
forState
:
UIControlStateNormal
];
[
self
.
rankBtn
setTitle
:
@"
在线抽查
"
forState
:
UIControlStateNormal
];
//self.lineView.backgroundColor = kSeparateLineViewColor;
...
...
@@ -98,7 +98,7 @@
_onLineSamplingBtn
=
[[
FuncItem
alloc
]
init
];
_onLineSamplingBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
_onLineSamplingBtn
addTarget
:
self
action
:
@selector
(
itemClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
_onLineSamplingBtn
setImage
:[
UIImage
imageNamed
:
@"task_00
0
"
]
forState
:
UIControlStateNormal
];
[
_onLineSamplingBtn
setImage
:[
UIImage
imageNamed
:
@"task_00
1
"
]
forState
:
UIControlStateNormal
];
[
self
.
view
addSubview
:
_onLineSamplingBtn
];
NSLayoutConstraint
*
onLineSamplingTop
=
[
NSLayoutConstraint
constraintWithItem
:
_onLineSamplingBtn
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
...
...
@@ -128,7 +128,7 @@
_wordOfMouthBtn
=
[[
FuncItem
alloc
]
init
];
[
_wordOfMouthBtn
addTarget
:
self
action
:
@selector
(
itemClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
_wordOfMouthBtn
setImage
:[
UIImage
imageNamed
:
@"task_00
1
"
]
forState
:
UIControlStateNormal
];
[
_wordOfMouthBtn
setImage
:[
UIImage
imageNamed
:
@"task_00
5
"
]
forState
:
UIControlStateNormal
];
_wordOfMouthBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
.
view
addSubview
:
_wordOfMouthBtn
];
...
...
@@ -153,7 +153,7 @@
{
if
(
!
_standardBtn
)
{
_standardBtn
=
[[
FuncItem
alloc
]
init
];
[
_standardBtn
setImage
:[
UIImage
imageNamed
:
@"task_00
2
"
]
forState
:
UIControlStateNormal
];
[
_standardBtn
setImage
:[
UIImage
imageNamed
:
@"task_00
4
"
]
forState
:
UIControlStateNormal
];
_standardBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
_standardBtn
addTarget
:
self
action
:
@selector
(
itemClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
...
...
@@ -208,7 +208,7 @@
{
if
(
!
_questionBtn
)
{
_questionBtn
=
[[
FuncItem
alloc
]
init
];
[
_questionBtn
setImage
:[
UIImage
imageNamed
:
@"task_00
4
"
]
forState
:
UIControlStateNormal
];
[
_questionBtn
setImage
:[
UIImage
imageNamed
:
@"task_00
2
"
]
forState
:
UIControlStateNormal
];
_questionBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
_questionBtn
addTarget
:
self
action
:
@selector
(
itemClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
...
...
@@ -233,7 +233,7 @@
{
if
(
!
_rankBtn
)
{
_rankBtn
=
[[
FuncItem
alloc
]
init
];
[
_rankBtn
setImage
:[
UIImage
imageNamed
:
@"task_00
5
"
]
forState
:
UIControlStateNormal
];
[
_rankBtn
setImage
:[
UIImage
imageNamed
:
@"task_00
0
"
]
forState
:
UIControlStateNormal
];
_rankBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
_rankBtn
addTarget
:
self
action
:
@selector
(
itemClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
...
...
redstar/Classes/Module/Function/OnLine/SpotCheckOnLine/ViewController/SpotCheckOnLineViewController.m
View file @
04cebd92
...
...
@@ -344,8 +344,10 @@
// cell的点击事件
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
OnLineCompleteViewController
*
completeVC
=
[[
OnLineCompleteViewController
alloc
]
init
];
[
self
.
navigationController
pushViewController
:
completeVC
animated
:
YES
];
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"该功能正在努力开发中!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
[
alert
show
];
// OnLineCompleteViewController *completeVC = [[OnLineCompleteViewController alloc] init];
// [self.navigationController pushViewController:completeVC animated:YES];
}
...
...
redstar/Classes/Module/Function/Picture/PictureList/ViewController/PictureViewController.m
View file @
04cebd92
...
...
@@ -122,8 +122,11 @@
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
PictureStoryViewController
*
storyVC
=
[[
PictureStoryViewController
alloc
]
init
];
[
self
.
navigationController
pushViewController
:
storyVC
animated
:
YES
];
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"该功能正在努力开发中!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
[
alert
show
];
// PictureStoryViewController *storyVC = [[PictureStoryViewController alloc] init];
// [self.navigationController pushViewController:storyVC animated:YES];
}
// 自定义section
...
...
redstar/Classes/Module/Function/Question/AddQuestion/Cell/AddQuestionTableCell.m
View file @
04cebd92
...
...
@@ -8,10 +8,8 @@
#import "AddQuestionTableCell.h"
@interface
AddQuestionTableCell
()
<
UITextViewDelegate
>
{
UITextView
*
_titleTextView
;
UITextView
*
_contentTextView
;
}
@interface
AddQuestionTableCell
()
@property
(
nonatomic
,
strong
)
UIImageView
*
backImageView1
;
@property
(
nonatomic
,
strong
)
UIImageView
*
backImageView2
;
@end
...
...
@@ -114,7 +112,6 @@
if
(
!
_contentTextView
)
{
_contentTextView
=
[[
UITextView
alloc
]
init
];
_contentTextView
.
tag
=
1002
;
_contentTextView
.
delegate
=
self
;
_contentTextView
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
_contentTextView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
.
backImageView2
addSubview
:
_contentTextView
];
...
...
@@ -190,7 +187,6 @@
if
(
!
_titleTextView
)
{
_titleTextView
=
[[
UITextView
alloc
]
init
];
_titleTextView
.
tag
=
1001
;
_titleTextView
.
delegate
=
self
;
_titleTextView
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
_titleTextView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
.
backImageView1
addSubview
:
_titleTextView
];
...
...
@@ -236,42 +232,6 @@
return
_placeholderLabel1
;
}
#pragma mark - UITextView Delegate
-
(
BOOL
)
textView
:
(
UITextView
*
)
textView
shouldChangeTextInRange
:
(
NSRange
)
range
replacementText
:
(
NSString
*
)
text
{
if
(
!
[
text
isEqualToString
:
@""
])
{
if
(
textView
.
tag
==
1001
)
{
self
.
placeholderLabel1
.
hidden
=
YES
;
}
else
{
self
.
placeholderLabel2
.
hidden
=
YES
;
}
}
if
([
text
isEqualToString
:
@""
]
&&
range
.
location
==
0
&&
range
.
length
==
1
)
{
if
(
textView
.
tag
==
1001
)
{
self
.
placeholderLabel1
.
hidden
=
NO
;
}
else
{
self
.
placeholderLabel2
.
hidden
=
NO
;
}
}
if
([
text
isEqualToString
:
@"
\n
"
])
{
[
self
.
titleTextView
resignFirstResponder
];
[
self
.
contentTextView
resignFirstResponder
];
if
(
textView
.
text
.
length
!=
0
)
{
self
.
placeholderLabel1
.
hidden
=
YES
;
self
.
placeholderLabel2
.
hidden
=
YES
;
}
else
{
self
.
placeholderLabel1
.
hidden
=
NO
;
self
.
placeholderLabel2
.
hidden
=
NO
;
}
return
NO
;
}
return
YES
;
}
-
(
void
)
touchesEnded
:
(
NSSet
*
)
touches
withEvent
:
(
UIEvent
*
)
event
{
[
self
.
contentView
endEditing
:
YES
];
}
...
...
redstar/Classes/Module/Function/Question/AddQuestion/ViewController/AddQuestionViewController.m
View file @
04cebd92
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/Question/QuestionDetail/ViewController/QuestionDetailViewController.m
View file @
04cebd92
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/Standar/ViewController/StandardViewController.m
View file @
04cebd92
...
...
@@ -102,10 +102,14 @@
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
if
(
indexPath
.
section
==
1
)
{
HandOutViewController
*
hoandOutVC
=
[[
HandOutViewController
alloc
]
init
];
[
self
.
navigationController
pushViewController
:
hoandOutVC
animated
:
YES
];
}
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"该功能正在努力开发中!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
[
alert
show
];
// if (indexPath.section == 1) {
// HandOutViewController *hoandOutVC = [[HandOutViewController alloc] init];
// [self.navigationController pushViewController:hoandOutVC animated:YES];
// }
}
#pragma mark - lazy laoding
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectDetail/ViewController/InspectNotUploadViewController.m
View file @
04cebd92
...
...
@@ -78,51 +78,9 @@
return
;
}
NSMutableArray
*
imageArray
=
[
NSMutableArray
array
];
for
(
int
i
=
0
;
i
<
_imageNameArray
.
count
;
i
++
)
{
NSString
*
imageName
=
_imageNameArray
[
i
];
NSString
*
fullPath
=
[[
NSHomeDirectory
()
stringByAppendingPathComponent
:
@"Documents"
]
stringByAppendingPathComponent
:
imageName
];
UIImage
*
image
=
[
UIImage
imageWithContentsOfFile
:
fullPath
];
NSData
*
imageData
=
UIImageJPEGRepresentation
(
image
,
0
.
5
);
NSString
*
imageBase64
=
[
imageData
base64EncodedStringWithOptions
:
0
];
NSMutableDictionary
*
dict
=
[
NSMutableDictionary
dictionary
];
[
dict
setObject
:
imageBase64
forKey
:
@"fileContent"
];
[
dict
setObject
:
imageName
forKey
:
@"fileName"
];
[
dict
setObject
:
@
(
i
)
forKey
:
@"index"
];
[
imageArray
addObject
:
dict
];
}
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
:
@"%@%@%@?time=%@&operId=%@&operName=%@"
,
kRedStarURL
,
kUpLoadInspectResult
,
self
.
praiseUuid
,
dateString
,
operId
,
operName
];
url
=
[
url
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
];
NSLog
(
@"上传检查点url = %@"
,
url
);
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
NSDictionary
*
parameters
=
@{
@"questionUuid"
:
self
.
questionUuid
,
@"storeUuid"
:
self
.
store_uuid
,
@"remark"
:
self
.
footerView
.
contentTextView
.
text
,
@"attachments"
:
imageArray
};
[
httpClient
uploadInspectResultWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
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
];
}];
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:[
NSString
stringWithFormat
:
@"你确定要上传检查点的相关信息吗?"
]
delegate
:
self
cancelButtonTitle
:
@"取消"
otherButtonTitles
:
@"确定"
,
nil
];
alert
.
tag
=
533292
;
[
alert
show
];
}
// 返回上一页面
...
...
@@ -283,10 +241,62 @@
#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
:
kRefreshInspectPointNotification
object
:
self
];
if
(
alertView
.
tag
==
39429234
)
{
if
(
buttonIndex
==
0
)
{
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
NSNotificationCenter
*
notification
=
[
NSNotificationCenter
defaultCenter
];
[
notification
postNotificationName
:
kRefreshInspectPointNotification
object
:
self
];
}
}
else
if
(
alertView
.
tag
==
533292
)
{
if
(
buttonIndex
==
0
)
{
return
;
}
else
{
NSMutableArray
*
imageArray
=
[
NSMutableArray
array
];
for
(
int
i
=
0
;
i
<
_imageNameArray
.
count
;
i
++
)
{
NSString
*
imageName
=
_imageNameArray
[
i
];
NSString
*
fullPath
=
[[
NSHomeDirectory
()
stringByAppendingPathComponent
:
@"Documents"
]
stringByAppendingPathComponent
:
imageName
];
UIImage
*
image
=
[
UIImage
imageWithContentsOfFile
:
fullPath
];
NSData
*
imageData
=
UIImageJPEGRepresentation
(
image
,
0
.
5
);
NSString
*
imageBase64
=
[
imageData
base64EncodedStringWithOptions
:
0
];
NSMutableDictionary
*
dict
=
[
NSMutableDictionary
dictionary
];
[
dict
setObject
:
imageBase64
forKey
:
@"fileContent"
];
[
dict
setObject
:
imageName
forKey
:
@"fileName"
];
[
dict
setObject
:
@
(
i
)
forKey
:
@"index"
];
[
imageArray
addObject
:
dict
];
}
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
:
@"%@%@%@?time=%@&operId=%@&operName=%@"
,
kRedStarURL
,
kUpLoadInspectResult
,
self
.
praiseUuid
,
dateString
,
operId
,
operName
];
url
=
[
url
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
];
NSLog
(
@"上传检查点url = %@"
,
url
);
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
NSDictionary
*
parameters
=
@{
@"questionUuid"
:
self
.
questionUuid
,
@"storeUuid"
:
self
.
store_uuid
,
@"remark"
:
self
.
footerView
.
contentTextView
.
text
,
@"attachments"
:
imageArray
};
[
httpClient
uploadInspectResultWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
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
];
}];
}
}
}
...
...
@@ -369,6 +379,12 @@
return
NO
;
}
if
(
range
.
location
>=
200
)
{
return
NO
;
}
else
{
return
YES
;
}
return
YES
;
}
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectTask/View/InspectDetailHeaderView.m
View file @
04cebd92
...
...
@@ -93,10 +93,7 @@
[
dateFormatter
setDateFormat
:
@"yyyy-MM-dd"
];
// 当前时间
NSDate
*
date
=
[
NSDate
date
];
NSTimeZone
*
zone
=
[
NSTimeZone
systemTimeZone
];
NSInteger
interval
=
[
zone
secondsFromGMTForDate
:
date
];
NSDate
*
localeDate
=
[
date
dateByAddingTimeInterval
:
interval
];
NSString
*
strDate
=
[
dateFormatter
stringFromDate
:
localeDate
];
NSString
*
strDate
=
[
dateFormatter
stringFromDate
:
date
];
NSDate
*
today
=
[
dateFormatter
dateFromString
:
strDate
];
NSLog
(
@"today = %@"
,
today
);
// endTime
...
...
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankDetail/ViewController/RankDetailViewController.m
View file @
04cebd92
...
...
@@ -177,6 +177,16 @@
}];
}
-
(
BOOL
)
textView
:
(
UITextView
*
)
textView
shouldChangeTextInRange
:
(
NSRange
)
range
replacementText
:
(
NSString
*
)
text
{
if
(
range
.
location
>=
200
)
{
return
NO
;
}
else
{
return
YES
;
}
}
// 提交评论
-
(
void
)
submitComment
:
(
UIButton
*
)
sender
...
...
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankingList/ViewController/RankingListViewController.m
View file @
04cebd92
...
...
@@ -45,6 +45,8 @@
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
view
.
backgroundColor
=
[
UIColor
whiteColor
];
UILabel
*
customLab
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
40
,
30
)];
[
customLab
setTextColor
:[
UIColor
whiteColor
]];
[
customLab
setText
:
@"口碑排名"
];
...
...
redstar/Classes/Module/Mine/ViewController/MineViewController.m
View file @
04cebd92
...
...
@@ -91,12 +91,30 @@
-
(
void
)
quitLoginClick
:
(
UIButton
*
)
sender
{
NSUserDefaults
*
userDefault
=
[
NSUserDefaults
standardUserDefaults
];
[
userDefault
removeObjectForKey
:
@"loginMessage"
];
[
userDefault
removeObjectForKey
:
@"username"
];
[
userDefault
removeObjectForKey
:
@"password"
];
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"您确定要退出登录吗?"
delegate
:
self
cancelButtonTitle
:
@"取消"
otherButtonTitles
:
@"确定"
,
nil
];
alert
.
tag
=
7838347
;
[
alert
show
];
}
[
self
.
tabBarController
dismissViewControllerAnimated
:
YES
completion
:
nil
];
#pragma mark - UIAlertViewDelegate
-
(
void
)
alertView
:
(
UIAlertView
*
)
alertView
clickedButtonAtIndex
:
(
NSInteger
)
buttonIndex
{
if
(
alertView
.
tag
==
7838347
)
{
if
(
buttonIndex
==
0
)
{
return
;
}
else
{
NSUserDefaults
*
userDefault
=
[
NSUserDefaults
standardUserDefaults
];
[
userDefault
removeObjectForKey
:
@"loginMessage"
];
[
userDefault
removeObjectForKey
:
@"username"
];
[
userDefault
removeObjectForKey
:
@"password"
];
[
self
.
tabBarController
dismissViewControllerAnimated
:
YES
completion
:
nil
];
}
}
}
#pragma mark - Private Methods
...
...
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