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
e09ea85b
Commit
e09ea85b
authored
Jan 20, 2016
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复response[@"succeed"]
parent
ea82248d
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
30 additions
and
23 deletions
+30
-23
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
Url.h
redstar/Classes/Macro/Url.h
+2
-2
AnnounceViewController.m
...unce/AnnounceList/ViewController/AnnounceViewController.m
+2
-2
AddPictureViewController.m
...ture/AddPicture/ViewController/AddPictureViewController.m
+1
-1
PictureStoryViewController.m
...PictureDetail/ViewController/PictureStoryViewController.m
+2
-2
AddQuestionViewController.m
...on/AddQuestion/ViewController/AddQuestionViewController.m
+15
-12
QuestionDetailViewController.m
...stionDetail/ViewController/QuestionDetailViewController.m
+2
-2
CategoryTableView.m
...n/Question/QuestionList/View/SubViews/CategoryTableView.m
+5
-1
InspectNotUploadViewController.m
...ectDetail/ViewController/InspectNotUploadViewController.m
+1
-1
No files found.
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
e09ea85b
No preview for this file type
redstar/Classes/Macro/Url.h
View file @
e09ea85b
...
...
@@ -10,13 +10,13 @@
#define Url_h
// url 测试环境
//
#define kRedStarURL @"http://218.244.151.129:7580/"
#define kRedStarURL @"http://218.244.151.129:7580/"
// 正式环境
// #define kRedStarURL @"http://219.235.234.225:7580/"
// 最新正式环境
#define kRedStarURL @"http://219.235.234.212:7580/"
//
#define kRedStarURL @"http://219.235.234.212:7580/"
// 检查更新
#define kCheckUpdateURL @"redstar-server/rest/ipapk?type=ipa"
...
...
redstar/Classes/Module/Announce/AnnounceList/ViewController/AnnounceViewController.m
View file @
e09ea85b
...
...
@@ -78,7 +78,7 @@
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
[
httpClient
getAnnounceListWithCompletion
:
^
(
id
response
,
NSError
*
error
)
{
if
(
response
[
@"success"
])
{
if
(
[
response
[
@"success"
]
boolValue
])
{
NSDictionary
*
dict
=
response
[
@"data"
];
NSArray
*
array
=
dict
[
@"records"
];
for
(
NSDictionary
*
annoDict
in
array
)
{
...
...
@@ -151,7 +151,7 @@
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
[
httpClient
getAnnounceListWithCompletion
:
^
(
id
response
,
NSError
*
error
)
{
if
(
response
[
@"success"
])
{
if
(
[
response
[
@"success"
]
boolValue
])
{
NSDictionary
*
dict
=
response
[
@"data"
];
NSArray
*
array
=
dict
[
@"records"
];
NSMutableArray
*
annoArray
=
[
NSMutableArray
array
];
...
...
redstar/Classes/Module/Function/Picture/AddPicture/ViewController/AddPictureViewController.m
View file @
e09ea85b
...
...
@@ -314,7 +314,7 @@
url
=
[
url
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
];
HttpClient
*
http1
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
[
http1
submitPicturePraiseWithCompletion
:
^
(
id
response
,
NSError
*
error
)
{
if
(
response
[
@"success"
])
{
if
(
[
response
[
@"success"
]
boolValue
])
{
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
}
}];
...
...
redstar/Classes/Module/Function/Picture/PictureDetail/ViewController/PictureStoryViewController.m
View file @
e09ea85b
...
...
@@ -226,7 +226,7 @@
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
[
httpClient
getLikePicturePraiseWithCompletion
:
^
(
id
response
,
NSError
*
error
)
{
if
(
response
[
@"success"
])
{
if
(
[
response
[
@"success"
]
boolValue
])
{
int
likeCount
=
[
sender
.
titleLabel
.
text
intValue
];
[
sender
setTitle
:[
NSString
stringWithFormat
:
@"%d"
,
likeCount
+
1
]
forState
:
UIControlStateNormal
];
}
else
{
...
...
@@ -242,7 +242,7 @@
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
[
httpClient
cancelLikePicturePraiseWithCompletion
:
^
(
id
response
,
NSError
*
error
)
{
if
(
response
[
@"success"
])
{
if
(
[
response
[
@"success"
]
boolValue
])
{
int
likeCount
=
[
sender
.
titleLabel
.
text
intValue
];
[
sender
setTitle
:[
NSString
stringWithFormat
:
@"%d"
,
likeCount
-
1
]
forState
:
UIControlStateNormal
];
}
else
{
...
...
redstar/Classes/Module/Function/Question/AddQuestion/ViewController/AddQuestionViewController.m
View file @
e09ea85b
...
...
@@ -106,6 +106,7 @@
-
(
void
)
requestGroupTitle
{
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kQuestionGroupURL
]];
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
[
httpClient
getQuestionGroupWithCompletion
:
^
(
id
response
,
NSError
*
error
)
{
NSDictionary
*
dataDict
=
response
[
@"data"
];
NSArray
*
dataArray
=
dataDict
[
@"records"
];
...
...
@@ -125,6 +126,7 @@
NSString
*
nameStr
=
[
NSString
stringWithFormat
:
@"%@"
,
nameArray
[
0
]];
[
self
requestCategoryWithGroupUuid
:[
dict
objectForKey
:
nameStr
]];
}
[
MBProgressHUD
hideAllHUDsForView
:
self
.
view
animated
:
YES
];
[
self
.
tableView
reloadData
];
}];
...
...
@@ -135,19 +137,19 @@
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@%@"
,
kRedStarURL
,
kQuestionCategoryURL
,
groupUuid
];
url
=
[
url
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
];
HttpClient
*
http
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
[
http
getQuestionCategoryWithCompletion
:
^
(
id
response
,
NSError
*
error
)
{
if
(
response
[
@"success"
])
{
NSDictionary
*
dictData
=
response
[
@"data"
];
NSArray
*
array
=
dictData
[
@"records"
];
NSMutableArray
*
categoryArray
=
[
NSMutableArray
array
];
for
(
NSDictionary
*
dict
in
array
)
{
NSString
*
category
=
[
NSString
stringWithFormat
:
@"%@"
,
dict
[
@"name"
]];
[
categoryArray
addObject
:
category
];
}
_questionArray
=
categoryArray
;
_isLoad
=
YES
;
[
self
.
tableView
reloadData
];
NSDictionary
*
dictData
=
response
[
@"data"
];
NSArray
*
array
=
dictData
[
@"records"
];
NSMutableArray
*
categoryArray
=
[
NSMutableArray
array
];
for
(
NSDictionary
*
dict
in
array
)
{
NSString
*
category
=
[
NSString
stringWithFormat
:
@"%@"
,
dict
[
@"name"
]];
[
categoryArray
addObject
:
category
];
}
_questionArray
=
categoryArray
;
_isLoad
=
YES
;
[
MBProgressHUD
hideAllHUDsForView
:
self
.
view
animated
:
YES
];
[
self
.
tableView
reloadData
];
}];
}
...
...
@@ -367,7 +369,8 @@
HttpClient
*
client
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
[
client
uploadNewQuestionWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
if
(
response
[
@"success"
])
{
if
([
response
[
@"success"
]
boolValue
])
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"新问题提报成功!"
delegate
:
self
cancelButtonTitle
:
@"确定"
otherButtonTitles
:
nil
,
nil
];
alert
.
tag
=
90393
;
[
alert
show
];
...
...
redstar/Classes/Module/Function/Question/QuestionDetail/ViewController/QuestionDetailViewController.m
View file @
e09ea85b
...
...
@@ -242,7 +242,7 @@
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
[
httpClient
likeCountWithParameters
:
nil
completion
:
^
(
id
response
,
NSError
*
error
)
{
if
(
response
[
@"success"
])
{
if
(
[
response
[
@"success"
]
boolValue
])
{
int
likeCount
=
[
sender
.
titleLabel
.
text
intValue
];
[
sender
setTitle
:[
NSString
stringWithFormat
:
@"%d"
,
likeCount
+
1
]
forState
:
UIControlStateNormal
];
}
else
{
...
...
@@ -257,7 +257,7 @@
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
[
httpClient
likeCountWithParameters
:
nil
completion
:
^
(
id
response
,
NSError
*
error
)
{
if
(
response
[
@"success"
])
{
if
(
[
response
[
@"success"
]
boolValue
])
{
int
likeCount
=
[
sender
.
titleLabel
.
text
intValue
];
[
sender
setTitle
:[
NSString
stringWithFormat
:
@"%d"
,
likeCount
-
1
]
forState
:
UIControlStateNormal
];
}
else
{
...
...
redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/CategoryTableView.m
View file @
e09ea85b
...
...
@@ -8,6 +8,7 @@
#import "CategoryTableView.h"
#import "HttpClient.h"
#import <MBProgressHUD.h>
@interface
CategoryTableView
()
<
UITableViewDelegate
,
UITableViewDataSource
>
@property
(
nonatomic
,
strong
)
NSMutableArray
*
titleArray
;
...
...
@@ -68,8 +69,9 @@
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@%@"
,
kRedStarURL
,
kQuestionCategoryURL
,
groupUuid
];
url
=
[
url
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
];
HttpClient
*
http
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
[
MBProgressHUD
showHUDAddedTo
:
self
animated
:
YES
];
[
http
getQuestionCategoryWithCompletion
:
^
(
id
response
,
NSError
*
error
)
{
if
(
response
[
@"success"
])
{
if
(
[
response
[
@"success"
]
boolValue
])
{
NSDictionary
*
dictData
=
response
[
@"data"
];
NSArray
*
array
=
dictData
[
@"records"
];
NSMutableArray
*
groupArray
=
[
NSMutableArray
array
];
...
...
@@ -83,6 +85,8 @@
}
_titleArray
=
categoryArray
;
_categoryArray
=
categoryArray
;
[
MBProgressHUD
hideAllHUDsForView
:
self
animated
:
YES
];
[
self
reloadData
];
}
}];
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectDetail/ViewController/InspectNotUploadViewController.m
View file @
e09ea85b
...
...
@@ -320,7 +320,7 @@
};
[
httpClient
uploadInspectResultWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
if
(
response
[
@"success"
])
{
if
(
[
response
[
@"success"
]
boolValue
])
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"检查点上报成功!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
alert
.
delegate
=
self
;
alert
.
tag
=
39429234
;
...
...
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