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
f362f21d
Commit
f362f21d
authored
Nov 23, 2015
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复首页bug
parent
24cda19e
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
194 additions
and
9 deletions
+194
-9
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
Contents.json
...tar/Assets.xcassets/Picture/Img/00.imageset/Contents.json
+21
-0
img_05.png
redstar/Assets.xcassets/Picture/Img/00.imageset/img_05.png
+0
-0
Contents.json
...tar/Assets.xcassets/Picture/Img/01.imageset/Contents.json
+21
-0
img_01.png
redstar/Assets.xcassets/Picture/Img/01.imageset/img_01.png
+0
-0
Contents.json
...tar/Assets.xcassets/Picture/Img/02.imageset/Contents.json
+21
-0
img_02.png
redstar/Assets.xcassets/Picture/Img/02.imageset/img_02.png
+0
-0
Contents.json
...tar/Assets.xcassets/Picture/Img/03.imageset/Contents.json
+21
-0
img_03.png
redstar/Assets.xcassets/Picture/Img/03.imageset/img_03.png
+0
-0
Contents.json
...tar/Assets.xcassets/Picture/Img/04.imageset/Contents.json
+21
-0
img_04.png
redstar/Assets.xcassets/Picture/Img/04.imageset/img_04.png
+0
-0
Contents.json
redstar/Assets.xcassets/Picture/Img/Contents.json
+6
-0
QuestionDetailViewController.m
...stionDetail/ViewController/QuestionDetailViewController.m
+36
-5
InspectDetailFooterView.m
...outh/Inspect/InspectDetail/View/InspectDetailFooterView.m
+42
-2
HomeViewController.m
...r/Classes/Module/Home/ViewController/HomeViewController.m
+5
-2
No files found.
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
f362f21d
No preview for this file type
redstar/Assets.xcassets/Picture/Img/00.imageset/Contents.json
0 → 100644
View file @
f362f21d
{
"images"
:
[
{
"idiom"
:
"universal"
,
"filename"
:
"img_05.png"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
redstar/Assets.xcassets/Picture/Img/00.imageset/img_05.png
0 → 100644
View file @
f362f21d
83.1 KB
redstar/Assets.xcassets/Picture/Img/01.imageset/Contents.json
0 → 100644
View file @
f362f21d
{
"images"
:
[
{
"idiom"
:
"universal"
,
"filename"
:
"img_01.png"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
redstar/Assets.xcassets/Picture/Img/01.imageset/img_01.png
0 → 100644
View file @
f362f21d
102 KB
redstar/Assets.xcassets/Picture/Img/02.imageset/Contents.json
0 → 100644
View file @
f362f21d
{
"images"
:
[
{
"idiom"
:
"universal"
,
"filename"
:
"img_02.png"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
redstar/Assets.xcassets/Picture/Img/02.imageset/img_02.png
0 → 100644
View file @
f362f21d
49.5 KB
redstar/Assets.xcassets/Picture/Img/03.imageset/Contents.json
0 → 100644
View file @
f362f21d
{
"images"
:
[
{
"idiom"
:
"universal"
,
"filename"
:
"img_03.png"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
redstar/Assets.xcassets/Picture/Img/03.imageset/img_03.png
0 → 100644
View file @
f362f21d
92 KB
redstar/Assets.xcassets/Picture/Img/04.imageset/Contents.json
0 → 100644
View file @
f362f21d
{
"images"
:
[
{
"idiom"
:
"universal"
,
"filename"
:
"img_04.png"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
redstar/Assets.xcassets/Picture/Img/04.imageset/img_04.png
0 → 100644
View file @
f362f21d
34 KB
redstar/Assets.xcassets/Picture/Img/Contents.json
0 → 100644
View file @
f362f21d
{
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
redstar/Classes/Module/Function/Question/QuestionDetail/ViewController/QuestionDetailViewController.m
View file @
f362f21d
...
...
@@ -22,7 +22,7 @@
#define kQuestionDetailCell @"QuestionDetailCell" // 问题详情
#define kQuestionCommentCell @"QuestionCommentCell" // 评论
#define kQuestionDescribeCell @"QuestionDescribeCell" // 问题描述
@interface
QuestionDetailViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
>
@interface
QuestionDetailViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
UIAlertViewDelegate
>
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
QuestionDetailFooterView
*
footerView
;
...
...
@@ -80,6 +80,7 @@
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@%@?userUuid=%@"
,
kRedStarURL
,
kQuestionDetailURL
,
_questionUuid
,
user_uuid
];
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
[
httpClient
getQuestionDetailWithParameters
:
nil
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSDictionary
*
dict
=
response
[
@"data"
];
NSLog
(
@"问题详情 = %@"
,
dict
);
...
...
@@ -93,7 +94,7 @@
[
comment
setValuesForKeysWithDictionary
:
dict
];
[
_allCommentArray
addObject
:
comment
];
}
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
self
.
tableView
.
tableFooterView
=
self
.
footerView
;
}];
...
...
@@ -169,9 +170,8 @@
NSString
*
dateString
=
[
dateFormatter
stringFromDate
:
localeDate
];
NSDictionary
*
dict
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"loginData"
];
NSString
*
operId
=
dict
[
@"user_code"
];
NSString
*
operName
=
dict
[
@"user_name"
];
NSString
*
operId
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_code"
];
NSString
*
operName
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_name"
];
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@?time=%@&operId=%@&operName=%@"
,
kRedStarURL
,
kAddCommentURL
,
dateString
,
operId
,
operName
];
url
=
[
url
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
];
...
...
@@ -188,6 +188,7 @@
NSLog
(
@"respo = %@, error = %@"
,
response
,
error
);
if
([
response
[
@"message"
]
isEqualToString
:
@"ok"
])
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"添加评论成功"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
alert
.
delegate
=
self
;
[
alert
show
];
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
}
else
{
...
...
@@ -392,7 +393,37 @@
}
}
#pragma mark - UIAlertViewDelegate
-
(
void
)
alertView
:
(
UIAlertView
*
)
alertView
clickedButtonAtIndex
:
(
NSInteger
)
buttonIndex
{
if
(
buttonIndex
==
0
)
{
NSString
*
user_uuid
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_uuid"
];
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@%@?userUuid=%@"
,
kRedStarURL
,
kQuestionDetailURL
,
_questionUuid
,
user_uuid
];
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
[
httpClient
getQuestionDetailWithParameters
:
nil
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSDictionary
*
dict
=
response
[
@"data"
];
NSLog
(
@"问题详情 = %@"
,
dict
);
QuestionDetailModel
*
quesDetail
=
[[
QuestionDetailModel
alloc
]
init
];
[
quesDetail
setValuesForKeysWithDictionary
:
dict
];
_questionDetailModel
=
quesDetail
;
NSArray
*
commentArray
=
_questionDetailModel
.
comments
;
NSMutableArray
*
tempArray
=
[
NSMutableArray
array
];
for
(
NSDictionary
*
dict
in
commentArray
)
{
CommentModel
*
comment
=
[[
CommentModel
alloc
]
init
];
[
comment
setValuesForKeysWithDictionary
:
dict
];
[
tempArray
addObject
:
comment
];
}
_allCommentArray
=
tempArray
;
[
self
.
tableView
reloadData
];
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
}];
}
}
#pragma mark - lazy loading
-
(
UITableView
*
)
tableView
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectDetail/View/InspectDetailFooterView.m
View file @
f362f21d
...
...
@@ -115,10 +115,24 @@
-
(
UILabel
*
)
introLabel
{
if
(
!
_introLabel
)
{
_introLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
kIntroX
,
kIntroY
,
kIntroWidth
,
kIntroHeight
)];
_introLabel
=
[[
UILabel
alloc
]
init
];
_introLabel
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_introLabel
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
_introLabel
.
textColor
=
kLightBlack
;
[
self
addSubview
:
_introLabel
];
NSLayoutConstraint
*
someoneTop
=
[
NSLayoutConstraint
constraintWithItem
:
_introLabel
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
takePhotoView
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
[
self
addConstraint
:
someoneTop
];
NSLayoutConstraint
*
someoneLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_introLabel
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
20
];
[
self
addConstraint
:
someoneLeft
];
NSLayoutConstraint
*
someoneRight
=
[
NSLayoutConstraint
constraintWithItem
:
_introLabel
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:-
20
];
[
self
addConstraint
:
someoneRight
];
NSLayoutConstraint
*
someoneHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_introLabel
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
40
];
[
self
addConstraint
:
someoneHeight
];
}
return
_introLabel
;
}
...
...
@@ -128,7 +142,20 @@
if
(
!
_backImageView2
)
{
_backImageView2
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(
kBackImageX
,
kBackImageY
,
kBackImageWidth
,
kBackImageHeight
)];
_backImageView2
.
userInteractionEnabled
=
YES
;
_backImageView2
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
addSubview
:
_backImageView2
];
NSLayoutConstraint
*
someoneTop
=
[
NSLayoutConstraint
constraintWithItem
:
_backImageView2
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
introLabel
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
[
self
addConstraint
:
someoneTop
];
NSLayoutConstraint
*
someoneLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_backImageView2
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
20
];
[
self
addConstraint
:
someoneLeft
];
NSLayoutConstraint
*
someoneRight
=
[
NSLayoutConstraint
constraintWithItem
:
_backImageView2
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:-
20
];
[
self
addConstraint
:
someoneRight
];
NSLayoutConstraint
*
someoneHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_backImageView2
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
75
];
[
self
addConstraint
:
someoneHeight
];
}
return
_backImageView2
;
}
...
...
@@ -186,12 +213,25 @@
{
if
(
!
_reportBtn
)
{
_reportBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
_reportBtn
.
frame
=
CGRectMake
(
kReportX
,
kReportY
,
kReportWidth
,
kReportHeight
)
;
_reportBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_reportBtn
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
20
.
0
];
_reportBtn
.
backgroundColor
=
kNavigationBarColor
;
_reportBtn
.
layer
.
cornerRadius
=
5
.
0
;
[
_reportBtn
setTitleColor
:[
UIColor
whiteColor
]
forState
:
UIControlStateNormal
];
[
self
addSubview
:
_reportBtn
];
NSLayoutConstraint
*
someoneTop
=
[
NSLayoutConstraint
constraintWithItem
:
_reportBtn
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
backImageView2
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
10
];
[
self
addConstraint
:
someoneTop
];
NSLayoutConstraint
*
someoneLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_reportBtn
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
20
];
[
self
addConstraint
:
someoneLeft
];
NSLayoutConstraint
*
someoneRight
=
[
NSLayoutConstraint
constraintWithItem
:
_reportBtn
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:-
20
];
[
self
addConstraint
:
someoneRight
];
NSLayoutConstraint
*
someoneHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_reportBtn
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
40
];
[
self
addConstraint
:
someoneHeight
];
}
return
_reportBtn
;
}
...
...
redstar/Classes/Module/Home/ViewController/HomeViewController.m
View file @
f362f21d
...
...
@@ -608,19 +608,22 @@
}
else
if
(
indexPath
.
section
==
1
)
{
if
(
indexPath
.
row
!=
0
)
{
RankDetailViewController
*
rankDetailVC
=
[[
RankDetailViewController
alloc
]
init
];
RankListModel
*
rankModel
=
_allRankListArray
[
indexPath
.
row
-
1
];
rankDetailVC
.
indexRow
=
indexPath
.
row
-
1
;
rankDetailVC
.
uuid
=
rankModel
.
uuid
;
rankDetailVC
.
store_uuid
=
rankModel
.
store_uuid
;
[
self
.
navigationController
pushViewController
:
rankDetailVC
animated
:
YES
];
}
}
else
if
(
indexPath
.
section
==
2
)
{
QuestionDetailViewController
*
questionDetailVC
=
[[
QuestionDetailViewController
alloc
]
init
];
QuestionModel
*
question
=
_
allQuestionArray
[
indexPath
.
row
];
QuestionModel
*
question
=
self
.
allQuestionArray
[
indexPath
.
row
];
questionDetailVC
.
questionUuid
=
question
.
uuid
;
[
self
.
navigationController
pushViewController
:
questionDetailVC
animated
:
YES
];
}
else
{
InspectTaskViewController
*
inspectTaskVC
=
[[
InspectTaskViewController
alloc
]
init
];
TaskListModel
*
taskList
=
_
taskListDataArray
[
indexPath
.
row
];
TaskListModel
*
taskList
=
self
.
taskListDataArray
[
indexPath
.
row
];
inspectTaskVC
.
uuid
=
taskList
.
uuid
;
inspectTaskVC
.
store_uuid
=
taskList
.
store_uuid
;
inspectTaskVC
.
multiplier
=
(
CGFloat
)
taskList
.
reportCount
/
taskList
.
questionCount
;
...
...
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