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
17f1e76c
Commit
17f1e76c
authored
Dec 27, 2015
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复请求条数bug
parent
58a079fc
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
184 additions
and
46 deletions
+184
-46
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
AppDelegate.m
redstar/Classes/AppDelegate/AppDelegate.m
+2
-0
FunctionViewController.m
redstar/Classes/Module/Function/FunctionViewController.m
+10
-7
LookOnLineViewController.m
...Line/LookOnLine/ViewController/LookOnLineViewController.m
+12
-4
SpotCheckOnLineViewController.m
...heckOnLine/ViewController/SpotCheckOnLineViewController.m
+11
-5
AddPictureViewController.h
...ture/AddPicture/ViewController/AddPictureViewController.h
+1
-1
AddPictureViewController.m
...ture/AddPicture/ViewController/AddPictureViewController.m
+1
-1
PictureTextTableCell.h
...unction/Picture/PictureDetail/Cell/PictureTextTableCell.h
+3
-0
PictureTextTableCell.m
...unction/Picture/PictureDetail/Cell/PictureTextTableCell.m
+31
-0
PictureStoryViewController.m
...PictureDetail/ViewController/PictureStoryViewController.m
+24
-4
PictureTableCell.m
...dule/Function/Picture/PictureList/Cell/PictureTableCell.m
+26
-0
PictureViewController.m
...icture/PictureList/ViewController/PictureViewController.m
+11
-6
QuestionViewController.m
...tion/QuestionList/ViewController/QuestionViewController.m
+4
-4
InspectListViewController.m
...ct/InspectList/ViewController/InspectListViewController.m
+12
-7
SearchViewController.m
...Classes/Module/Home/ViewController/SearchViewController.m
+10
-6
MineViewController.m
...r/Classes/Module/Mine/ViewController/MineViewController.m
+26
-1
No files found.
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
17f1e76c
No preview for this file type
redstar/Classes/AppDelegate/AppDelegate.m
View file @
17f1e76c
...
...
@@ -21,6 +21,8 @@
self
.
window
=
[[
UIWindow
alloc
]
initWithFrame
:[
UIScreen
mainScreen
].
bounds
];
_window
.
backgroundColor
=
[
UIColor
whiteColor
];
[
_window
makeKeyAndVisible
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
@
(
10
)
forKey
:
@"requestNumber"
];
// 设置根控制器
LoginViewController
*
loginVC
=
[[
LoginViewController
alloc
]
init
];
...
...
redstar/Classes/Module/Function/FunctionViewController.m
View file @
17f1e76c
...
...
@@ -12,6 +12,7 @@
#import "PictureViewController.h"
#import "QuestionViewController.h"
#import "PicCategoryViewController.h"
#import "StandardViewController.h"
@interface
FunctionViewController
()
@property
(
nonatomic
,
strong
)
UIView
*
lineView
;
...
...
@@ -72,21 +73,23 @@
InspectListViewController
*
inspectListVC
=
[[
InspectListViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
inspectListVC
];
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"口碑标准"
])
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"当前功能正在开发!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
[
alert
show
];
return
;
StandardViewController
*
standardVC
=
[[
StandardViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
standardVC
];
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"图说口碑"
])
{
Pic
tureViewController
*
pictureVC
=
[[
Picture
ViewController
alloc
]
init
];
Pic
CategoryViewController
*
pictureVC
=
[[
PicCategory
ViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
pictureVC
];
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"问题与知识"
])
{
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"问题知识"
])
{
QuestionViewController
*
questionVC
=
[[
QuestionViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
questionVC
];
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"口碑报告"
])
{
RankingListViewController
*
rankingListVC
=
[[
RankingListViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
rankingListVC
];
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"商场风采"
])
{
InspectListViewController
*
inspectListVC
=
[[
InspectListViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
inspectListVC
];
PictureViewController
*
pic
=
[[
PictureViewController
alloc
]
init
];
pic
.
come
=
@"首页"
;
pic
.
category
=
@"store"
;
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
pic
];
}
else
{
return
;
}
...
...
redstar/Classes/Module/Function/OnLine/LookOnLine/ViewController/LookOnLineViewController.m
View file @
17f1e76c
...
...
@@ -105,9 +105,11 @@
HttpClient
*
http
=
[[
HttpClient
alloc
]
initWithUrl
:[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kStoreSportcheckURL
]];
// 相关参数
NSString
*
user_uuid
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_uuid"
];
NSNumber
*
pageSize
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"requestNumber"
];
NSDictionary
*
parameters
=
@{
@"userUuid"
:
user_uuid
,
@"pageNumber"
:
@
(
0
),
@"pageSize"
:
@
(
10
)
@"pageSize"
:
pageSize
};
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
[
http
getStoreSportCheckListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
...
...
@@ -155,9 +157,11 @@
HttpClient
*
http
=
[[
HttpClient
alloc
]
initWithUrl
:[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kStoreSportcheckURL
]];
// 相关参数
NSString
*
user_uuid
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_uuid"
];
NSNumber
*
pageSize
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"requestNumber"
];
NSDictionary
*
parameters
=
@{
@"userUuid"
:
user_uuid
,
@"pageNumber"
:
@
(
_page
),
@"pageSize"
:
@
(
10
)
@"pageSize"
:
pageSize
};
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
[
http
getStoreSportCheckListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
...
...
@@ -352,11 +356,13 @@
-
(
void
)
submitClick
:
(
UIButton
*
)
sender
{
HttpClient
*
http
=
[[
HttpClient
alloc
]
initWithUrl
:[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kStoreSportcheckURL
]];
NSNumber
*
pageSize
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"requestNumber"
];
NSMutableDictionary
*
parameters
=
[
NSMutableDictionary
dictionaryWithObjectsAndKeys
:
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_uuid"
],
@"userUuid"
,
@[],
@"queryOrders"
,
@
(
0
),
@"pageNumber"
,
@
(
10
)
,
@"pageSize"
,
nil
];
pageSize
,
@"pageSize"
,
nil
];
if
(
_screenView
.
groupTabBar
.
selectNumber
==
0
)
{
...
...
@@ -541,9 +547,11 @@
// 相关参数
NSString
*
user_uuid
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_uuid"
];
NSNumber
*
pageSize
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"requestNumber"
];
NSDictionary
*
parameters
=
@{
@"userUuid"
:
user_uuid
,
@"pageNumber"
:
@
(
0
),
@"pageSize"
:
@
(
10
)
,
@"pageSize"
:
pageSize
,
@"queryOrders"
:
queryOrders
};
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
...
...
redstar/Classes/Module/Function/OnLine/SpotCheckOnLine/ViewController/SpotCheckOnLineViewController.m
View file @
17f1e76c
...
...
@@ -108,11 +108,13 @@
-
(
void
)
requestSpotCheckList
{
HttpClient
*
http
=
[[
HttpClient
alloc
]
initWithUrl
:[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kManageSportcheckURL
]];
NSNumber
*
pageSize
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"requestNumber"
];
// 相关参数
NSString
*
user_uuid
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_uuid"
];
NSDictionary
*
parameters
=
@{
@"userUuid"
:
user_uuid
,
@"pageNumber"
:
@
(
0
),
@"pageSize"
:
@
(
10
)
@"pageSize"
:
pageSize
};
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
[
http
getManageSportCheckListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
...
...
@@ -161,9 +163,11 @@
HttpClient
*
http
=
[[
HttpClient
alloc
]
initWithUrl
:[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kManageSportcheckURL
]];
// 相关参数
NSString
*
user_uuid
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_uuid"
];
NSNumber
*
pageSize
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"requestNumber"
];
NSDictionary
*
parameters
=
@{
@"userUuid"
:
user_uuid
,
@"pageNumber"
:
@
(
_page
),
@"pageSize"
:
@
(
10
)
@"pageSize"
:
pageSize
};
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
[
http
getManageSportCheckListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
...
...
@@ -366,11 +370,13 @@
{
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kManageSportcheckURL
];
HttpClient
*
httpCilent
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
NSNumber
*
pageSize
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"requestNumber"
];
NSMutableDictionary
*
parameters
=
[
NSMutableDictionary
dictionaryWithObjectsAndKeys
:
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_uuid"
],
@"userUuid"
,
@[],
@"queryOrders"
,
@
(
0
),
@"pageNumber"
,
@
(
10
)
,
@"pageSize"
,
nil
];
pageSize
,
@"pageSize"
,
nil
];
if
(
_screenView
.
groupTabBar
.
selectNumber
==
0
)
{
...
...
@@ -519,12 +525,12 @@
@"direction"
:
@"asc"
}];
}
NSNumber
*
pageSize
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"requestNumber"
];
// 相关参数
NSString
*
user_uuid
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_uuid"
];
NSDictionary
*
parameters
=
@{
@"userUuid"
:
user_uuid
,
@"pageNumber"
:
@
(
_page
),
@"pageSize"
:
@
(
10
)
,
@"pageSize"
:
pageSize
,
@"queryOrders"
:
queryOrders
};
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
...
...
redstar/Classes/Module/Function/Picture/AddPicture/ViewController/AddPictureViewController.h
View file @
17f1e76c
...
...
@@ -9,5 +9,5 @@
#import <UIKit/UIKit.h>
@interface
AddPictureViewController
:
UIViewController
@property
(
nonatomic
,
copy
)
NSString
*
category
;
@end
redstar/Classes/Module/Function/Picture/AddPicture/ViewController/AddPictureViewController.m
View file @
17f1e76c
...
...
@@ -127,7 +127,7 @@
NSDictionary
*
parameters
=
@{
@"title"
:
cell
.
contentTextView
.
text
,
@"content"
:
cell
.
titleTextView
.
text
,
@"type"
:
@"store"
@"type"
:
self
.
category
};
[
http1
savePicturePraiseWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"6.1保存图说口碑 resp = %@, error = %@"
,
response
,
error
);
...
...
redstar/Classes/Module/Function/Picture/PictureDetail/Cell/PictureTextTableCell.h
View file @
17f1e76c
...
...
@@ -10,6 +10,9 @@
@interface
PictureTextTableCell
:
UITableViewCell
@property
(
nonatomic
,
strong
)
UIImageView
*
bigImageView
;
//@property (nonatomic, strong) UIButton *bigImageView;
@property
(
nonatomic
,
strong
)
UILabel
*
descriptionLabel
;
@end
redstar/Classes/Module/Function/Picture/PictureDetail/Cell/PictureTextTableCell.m
View file @
17f1e76c
...
...
@@ -14,6 +14,7 @@
if
(
!
_bigImageView
)
{
_bigImageView
=
[[
UIImageView
alloc
]
init
];
_bigImageView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_bigImageView
.
userInteractionEnabled
=
YES
;
[
self
.
contentView
addSubview
:
_bigImageView
];
// 顶端
...
...
@@ -35,11 +36,41 @@
return
_bigImageView
;
}
//- (UIButton *)bigImageView
//{
// if (!_bigImageView) {
// _bigImageView = [[UIButton alloc] init];
// _bigImageView.translatesAutoresizingMaskIntoConstraints = NO;
// [self.contentView addSubview:_bigImageView];
//
// // 顶端
// NSLayoutConstraint *titleTop = [NSLayoutConstraint constraintWithItem:_bigImageView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeTop multiplier:1.0 constant:5];
// [self.contentView addConstraint:titleTop];
//
// // 左边
// NSLayoutConstraint *titleLeft = [NSLayoutConstraint constraintWithItem:_bigImageView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20];
// [self.contentView addConstraint:titleLeft];
//
// // 右边
// NSLayoutConstraint *titleRight = [NSLayoutConstraint constraintWithItem:_bigImageView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
// [self.contentView addConstraint:titleRight];
//
// // 高度
// NSLayoutConstraint *titleHeight = [NSLayoutConstraint constraintWithItem:_bigImageView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:170];
// [self.contentView addConstraint:titleHeight];
// }
// return _bigImageView;
//}
-
(
UILabel
*
)
descriptionLabel
{
if
(
!
_descriptionLabel
)
{
_descriptionLabel
=
[[
UILabel
alloc
]
init
];
_descriptionLabel
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_descriptionLabel
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
_descriptionLabel
.
textColor
=
kLightBlack
;
[
self
.
contentView
addSubview
:
_descriptionLabel
];
// 顶端
...
...
redstar/Classes/Module/Function/Picture/PictureDetail/ViewController/PictureStoryViewController.m
View file @
17f1e76c
...
...
@@ -13,12 +13,15 @@
#import "PictureTextTableCell.h"
#import "PictureCommentTableCell.h"
#import "CheckPicViewController.h"
#import "HttpClient.h"
#import "CommentView.h"
#import <MBProgressHUD.h>
#import "CommentModel.h"
#import <UIImageView+WebCache.h>
#import <UIButton+WebCache.h>
#define kPictureDetailTableCell @"PictureDetailTableViewCell"
#define kPictureTextTableCell @"PictureTextTableViewCell"
...
...
@@ -243,6 +246,14 @@
}];
}
-
(
void
)
tapClick
:
(
UIGestureRecognizer
*
)
sender
{
UIImageView
*
showImageView
=
(
UIImageView
*
)
sender
.
view
;
CheckPicViewController
*
checkVC
=
[[
CheckPicViewController
alloc
]
init
];
checkVC
.
checkImage
=
showImageView
.
image
;
[
self
.
navigationController
pushViewController
:
checkVC
animated
:
YES
];
}
#pragma mark - UITableView DataSource/Delegate
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
{
...
...
@@ -305,13 +316,22 @@
}
PicTextModel
*
picText
=
_picTextArray
[
indexPath
.
row
];
NSURL
*
imageUrl
=
[
NSURL
URLWithString
:[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
picText
.
fileUrl
]];
// UIImageView *imageView = [[UIImageView alloc] init];
// [imageView sd_setImageWithURL:imageUrl placeholderImage:[UIImage imageNamed:@"default_pic"]];
UIImageView
*
imageView
=
[[
UIImageView
alloc
]
init
];
[
imageView
sd_setImageWithURL
:
imageUrl
placeholderImage
:[
UIImage
imageNamed
:
@"default_pic"
]];
cell
.
bigImageView
.
contentMode
=
UIViewContentModeScaleAspectFit
;
// [cell.bigImageView sd_setImageWithURL:imageUrl forState:UIControlStateNormal placeholderImage:[UIImage imageNamed:@"default_pic"]];
[
cell
.
bigImageView
sd_setImageWithURL
:
imageUrl
placeholderImage
:[
UIImage
imageNamed
:
@"default_pic"
]];
UITapGestureRecognizer
*
tap
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
tapClick
:
)];
[
cell
.
bigImageView
addGestureRecognizer
:
tap
];
NSString
*
str
=
[
NSString
stringWithFormat
:
@"%@"
,
picText
.
descriptionText
];
if
(
picText
.
descriptionText
==
nil
||
picText
.
descriptionText
==
NULL
||
[
picText
.
descriptionText
isEqual
:[
NSNull
null
]])
{
cell
.
descriptionLabel
.
text
=
@""
;
}
else
{
cell
.
descriptionLabel
.
text
=
str
;
}
[
cell
.
bigImageView
sd_setImageWithURL
:
imageUrl
placeholderImage
:[
UIImage
imageNamed
:
@"default_pic"
]];
cell
.
descriptionLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
picText
.
descriptionText
];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
return
cell
;
}
else
{
...
...
redstar/Classes/Module/Function/Picture/PictureList/Cell/PictureTableCell.m
View file @
17f1e76c
...
...
@@ -54,6 +54,32 @@
[
self
.
commentBtn
setTitle
:[
NSString
stringWithFormat
:
@"%d"
,
pictureList
.
commentCount
]
forState
:
UIControlStateNormal
];
}
//裁剪图片
-
(
UIImage
*
)
cutImage
:(
UIImage
*
)
image
{
//压缩图片
CGSize
newSize
;
CGImageRef
imageRef
=
nil
;
if
((
image
.
size
.
width
/
image
.
size
.
height
)
<
(((
kScreenWidth
-
20
*
3
)
/
2
)
/
90
))
{
newSize
.
width
=
image
.
size
.
width
;
newSize
.
height
=
image
.
size
.
width
*
90
/
((
kScreenWidth
-
20
*
3
)
/
2
);
imageRef
=
CGImageCreateWithImageInRect
([
image
CGImage
],
CGRectMake
(
0
,
fabs
(
image
.
size
.
height
-
newSize
.
height
)
/
2
,
newSize
.
width
,
newSize
.
height
));
}
else
{
newSize
.
height
=
image
.
size
.
height
;
newSize
.
width
=
image
.
size
.
height
*
((
kScreenWidth
-
20
*
3
)
/
2
)
/
90
;
imageRef
=
CGImageCreateWithImageInRect
([
image
CGImage
],
CGRectMake
(
fabs
(
image
.
size
.
width
-
newSize
.
width
)
/
2
,
0
,
newSize
.
width
,
newSize
.
height
));
}
return
[
UIImage
imageWithCGImage
:
imageRef
];
}
#pragma mark - Lazy loading
-
(
UIImageView
*
)
titleImageView
{
...
...
redstar/Classes/Module/Function/Picture/PictureList/ViewController/PictureViewController.m
View file @
17f1e76c
...
...
@@ -125,6 +125,7 @@
// [alert show];
AddPictureViewController
*
addPic
=
[[
AddPictureViewController
alloc
]
init
];
addPic
.
category
=
self
.
category
;
[
self
.
navigationController
pushViewController
:
addPic
animated
:
YES
];
}
...
...
@@ -135,12 +136,14 @@
// 请求地址
NSString
*
urlStr
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kQueryPicturePraiseURL
];
NSString
*
user_uuid
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_uuid"
];
NSNumber
*
pageSize
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"requestNumber"
];
NSDictionary
*
parameters
=
@{
@"scope"
:
@"all"
,
@"user"
:
user_uuid
,
@"type"
:
self
.
category
,
@"pageNumber"
:
@
(
0
),
@"pageSize"
:
@
(
10
)
@"pageSize"
:
pageSize
};
// 发起请求
...
...
@@ -184,12 +187,14 @@
NSString
*
urlStr
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kQueryPicturePraiseURL
];
NSString
*
user_uuid
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_uuid"
];
NSNumber
*
pageSize
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"requestNumber"
];
NSDictionary
*
parameters
=
@{
@"scope"
:
@"all"
,
@"user"
:
user_uuid
,
@"type"
:
self
.
category
,
@"pageNumber"
:
@
(
_page
),
@"pageSize"
:
@
(
10
)
@"pageSize"
:
pageSize
};
// 发起请求
...
...
@@ -389,12 +394,12 @@
// 请求地址
NSString
*
urlStr
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kQueryPicturePraiseURL
];
NSString
*
user_uuid
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_uuid"
];
NSNumber
*
pageSize
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"requestNumber"
];
NSMutableDictionary
*
parameters
=
[
NSMutableDictionary
dictionaryWithObjectsAndKeys
:
user_uuid
,
@"user"
,
@
(
0
),
@"pageNumber"
,
@
(
10
)
,
@"pageSize"
,
pageSize
,
@"pageSize"
,
self
.
category
,
@"type"
,
@"all"
,
@"scope"
,
nil
];
...
...
@@ -564,10 +569,10 @@
queryOrders
=
@[@{
@"field"
:
@"likeCount"
,
@"direction"
:
@"asc"
}];
}
NSNumber
*
pageSize
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"requestNumber"
];
NSDictionary
*
parameters
=
@{
@"user"
:
user_uuid
,
@"pageNumber"
:
@
(
_page
),
@"pageSize"
:
@
(
10
)
,
@"pageSize"
:
pageSize
,
@"queryOrders"
:
queryOrders
,
@"type"
:
self
.
category
,
@"scope"
:
@"all"
...
...
redstar/Classes/Module/Function/Question/QuestionList/ViewController/QuestionViewController.m
View file @
17f1e76c
...
...
@@ -156,12 +156,12 @@
// 请求地址
NSString
*
urlStr
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kQuestionListURL
];
NSString
*
user_uuid
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_uuid"
];
NSNumber
*
pageSize
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"requestNumber"
];
// 请求参数
NSDictionary
*
parameters
=
@{
@"user"
:
user_uuid
,
@"scope"
:
@"all"
,
@"pageNumber"
:
@
(
_page
),
@"pageSize"
:
@
(
10
)
@"pageSize"
:
pageSize
};
// 发起请求
...
...
@@ -444,11 +444,11 @@
NSString
*
urlStr
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kQuestionListURL
];
NSString
*
user_uuid
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_uuid"
];
NSNumber
*
pageSize
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"requestNumber"
];
NSMutableDictionary
*
parameters
=
[
NSMutableDictionary
dictionaryWithObjectsAndKeys
:
user_uuid
,
@"user"
,
@
(
0
),
@"pageNumber"
,
@
(
10
)
,
@"pageSize"
,
nil
];
pageSize
,
@"pageSize"
,
nil
];
// 发起请求
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:
urlStr
];
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectList/ViewController/InspectListViewController.m
View file @
17f1e76c
...
...
@@ -118,11 +118,12 @@
_page
++
;
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kInspectListURL
];
HttpClient
*
httpCilent
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
NSNumber
*
pageSize
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"requestNumber"
];
NSDictionary
*
parameters
=
@{
@"userUuid"
:
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_uuid"
],
@"queryOrders"
:
@[@{
@"field"
:
@"lastModifyInfo"
,
@"direction"
:
@"desc"
}],
@"pageNumber"
:
@
(
_page
),
@"pageSize"
:
@
(
10
)
@"pageSize"
:
pageSize
};
[
httpCilent
getInspectListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
...
...
@@ -154,11 +155,13 @@
{
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kInspectListURL
];
HttpClient
*
httpCilent
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
NSNumber
*
pageSize
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"requestNumber"
];
NSDictionary
*
parameters
=
@{
@"userUuid"
:
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_uuid"
],
@"queryOrders"
:
@[@{
@"field"
:
@"lastModifyInfo"
,
@"direction"
:
@"desc"
}],
@"pageNumber"
:
@
(
0
),
@"pageSize"
:
@
(
10
)
@"pageSize"
:
pageSize
};
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
...
...
@@ -210,11 +213,13 @@
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kInspectListURL
];
HttpClient
*
httpCilent
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
NSNumber
*
pageSize
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"requestNumber"
];
NSDictionary
*
parameters
=
@{
@"userUuid"
:
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_uuid"
],
@"queryOrders"
:
@[@{
@"field"
:
@"lastModifyInfo"
,
@"direction"
:
@"desc"
}],
@"pageNumber"
:
@
(
0
),
@"pageSize"
:
@
(
10
)
@"pageSize"
:
pageSize
};
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
...
...
@@ -421,12 +426,12 @@
{
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kInspectListURL
];
HttpClient
*
httpCilent
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
NSNumber
*
pageSize
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"requestNumber"
];
NSMutableDictionary
*
parameters
=
[
NSMutableDictionary
dictionaryWithObjectsAndKeys
:
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_uuid"
],
@"userUuid"
,
@[],
@"queryOrders"
,
@
(
0
),
@"pageNumber"
,
@
(
10
)
,
@"pageSize"
,
nil
];
pageSize
,
@"pageSize"
,
nil
];
if
(
_screenView
.
groupTabBar
.
selectNumber
==
0
)
{
...
...
@@ -606,11 +611,11 @@
queryOrders
=
@[@{
@"field"
:
@"lastModifyInfo"
,
@"direction"
:
@"asc"
}];
}
NSNumber
*
pageSize
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"requestNumber"
];
NSDictionary
*
parameters
=
@{
@"userUuid"
:
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_uuid"
],
@"queryOrders"
:
queryOrders
,
@"pageNumber"
:
@
(
0
),
@"pageSize"
:
@
(
10
)
@"pageSize"
:
pageSize
};
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
[
httpCilent
getInspectListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
...
...
redstar/Classes/Module/Home/ViewController/SearchViewController.m
View file @
17f1e76c
...
...
@@ -181,11 +181,13 @@
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kRankingListURL
];
HttpClient
*
httpCilent
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
NSNumber
*
pageSize
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"requestNumber"
];
NSDictionary
*
parameters
=
@{
@"keyword"
:
self
.
customStr
,
@"praiseUuid"
:
@""
,
@"statisMode"
:
@
(
0
),
@"pageNumber"
:
@
(
0
),
@"pageSize"
:
@
(
10
)
@"pageSize"
:
pageSize
};
[
httpCilent
getRankingListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
...
...
@@ -239,13 +241,13 @@
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kInspectListURL
];
NSLog
(
@"uuuurl = %@"
,
url
);
HttpClient
*
httpCilent
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
NSNumber
*
pageSize
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"requestNumber"
];
NSDictionary
*
parameters
=
@{
@"keyword"
:
self
.
customStr
,
@"userUuid"
:
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_uuid"
],
@"queryOrders"
:
@[@{
@"field"
:
@"lastModifyInfo"
,
@"direction"
:
@"desc"
}],
@"pageNumber"
:
@
(
0
),
@"pageSize"
:
@
(
10
)
@"pageSize"
:
pageSize
};
NSLog
(
@"parrrrr = %@"
,
parameters
);
[
httpCilent
getInspectListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
...
...
@@ -275,12 +277,12 @@
// 请求地址
NSString
*
urlStr
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kQuestionListURL
];
NSString
*
user_uuid
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_uuid"
];
// 请求参数
NSNumber
*
pageSize
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"requestNumber"
];
NSDictionary
*
parameters
=
@{
@"keyword"
:
self
.
customStr
,
@"user"
:
user_uuid
,
@"scope"
:
@"all"
,
@"pageNumber"
:
@
(
0
),
@"pageSize"
:
@
(
10
)
@"pageSize"
:
pageSize
};
// 发起请求
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:
urlStr
];
...
...
@@ -312,13 +314,15 @@
// 请求地址
NSString
*
urlStr
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kQueryPicturePraiseURL
];
NSString
*
user_uuid
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_uuid"
];
NSNumber
*
pageSize
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"requestNumber"
];
NSDictionary
*
parameters
=
@{
@"keyword"
:
self
.
customStr
,
@"scope"
:
@"all"
,
@"user"
:
user_uuid
,
@"type"
:
@"store"
,
@"pageNumber"
:
@
(
0
),
@"pageSize"
:
@
(
10
)
@"pageSize"
:
pageSize
};
// 发起请求
...
...
redstar/Classes/Module/Mine/ViewController/MineViewController.m
View file @
17f1e76c
...
...
@@ -15,7 +15,7 @@
#import "HttpClient.h"
@interface
MineViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
UIAlertViewDelegate
>
@interface
MineViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
UIAlertViewDelegate
,
UIActionSheetDelegate
>
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
titleArray
;
...
...
@@ -26,6 +26,9 @@
@property
(
nonatomic
,
strong
)
MineTableFooterView
*
footView
;
@property
(
nonatomic
,
copy
)
NSString
*
jumpURL
;
@property
(
nonatomic
,
strong
)
UIActionSheet
*
numberActionSheet
;
@end
@implementation
MineViewController
...
...
@@ -194,6 +197,10 @@
}
else
if
(
indexPath
.
row
==
1
)
{
AboutMeViewController
*
about
=
[[
AboutMeViewController
alloc
]
init
];
[
self
.
navigationController
pushViewController
:
about
animated
:
YES
];
}
else
{
self
.
numberActionSheet
=
[[
UIActionSheet
alloc
]
initWithTitle
:
@"请求数量"
delegate
:
self
cancelButtonTitle
:
@"取消"
destructiveButtonTitle
:
nil
otherButtonTitles
:
@"10"
,
@"20"
,
@"30"
,
@"40"
,
@"50"
,
nil
];
[
_numberActionSheet
showInView
:
self
.
view
];
}
}
...
...
@@ -209,6 +216,24 @@
return
20
;
}
#pragma mark - UIActionSheetDelegate
-
(
void
)
actionSheet
:
(
UIActionSheet
*
)
actionSheet
didDismissWithButtonIndex
:
(
NSInteger
)
buttonIndex
{
if
(
buttonIndex
==
0
)
{
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
@
(
10
)
forKey
:
@"requestNumber"
];
}
else
if
(
buttonIndex
==
1
){
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
@
(
20
)
forKey
:
@"requestNumber"
];
}
else
if
(
buttonIndex
==
2
){
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
@
(
30
)
forKey
:
@"requestNumber"
];
}
else
if
(
buttonIndex
==
3
){
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
@
(
40
)
forKey
:
@"requestNumber"
];
}
else
if
(
buttonIndex
==
4
){
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
@
(
50
)
forKey
:
@"requestNumber"
];
}
}
#pragma mark - lazy loading
-
(
UITableView
*
)
tableView
{
...
...
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