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
78eb2f59
Commit
78eb2f59
authored
Jan 27, 2016
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传图片压缩更多
parent
54200797
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
9 deletions
+16
-9
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
LookOnLineDetailViewController.m
...ineDetail/ViewController/LookOnLineDetailViewController.m
+2
-2
AddPictureViewController.m
...ture/AddPicture/ViewController/AddPictureViewController.m
+3
-3
AddQuestionViewController.m
...on/AddQuestion/ViewController/AddQuestionViewController.m
+2
-2
InspectNotUploadViewController.m
...ectDetail/ViewController/InspectNotUploadViewController.m
+9
-2
No files found.
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
78eb2f59
No preview for this file type
redstar/Classes/Module/Function/OnLine/LookOnLineDetail/ViewController/LookOnLineDetailViewController.m
View file @
78eb2f59
...
@@ -144,7 +144,7 @@
...
@@ -144,7 +144,7 @@
-
(
void
)
saveImage
:
(
UIImage
*
)
currentImage
{
-
(
void
)
saveImage
:
(
UIImage
*
)
currentImage
{
NSData
*
imageData
=
UIImageJPEGRepresentation
(
currentImage
,
0
.
5
);
NSData
*
imageData
=
UIImageJPEGRepresentation
(
currentImage
,
0
.
01
);
// NSString *imageName = [NSString stringWithFormat:@"%d", (int)_imageNameArray.count];
// NSString *imageName = [NSString stringWithFormat:@"%d", (int)_imageNameArray.count];
NSString
*
imageName
=
[
CommonFunc
md5Data
:
imageData
];
NSString
*
imageName
=
[
CommonFunc
md5Data
:
imageData
];
...
@@ -226,7 +226,7 @@
...
@@ -226,7 +226,7 @@
NSString
*
imageName
=
_imageNameArray
[
i
];
NSString
*
imageName
=
_imageNameArray
[
i
];
NSString
*
fullPath
=
[[
NSHomeDirectory
()
stringByAppendingPathComponent
:
@"Documents"
]
stringByAppendingPathComponent
:
imageName
];
NSString
*
fullPath
=
[[
NSHomeDirectory
()
stringByAppendingPathComponent
:
@"Documents"
]
stringByAppendingPathComponent
:
imageName
];
UIImage
*
image
=
[
UIImage
imageWithContentsOfFile
:
fullPath
];
UIImage
*
image
=
[
UIImage
imageWithContentsOfFile
:
fullPath
];
NSData
*
imageData
=
UIImageJPEGRepresentation
(
image
,
0
.
5
);
NSData
*
imageData
=
UIImageJPEGRepresentation
(
image
,
0
.
01
);
NSString
*
imageBase64
=
[
imageData
base64EncodedStringWithOptions
:
0
];
NSString
*
imageBase64
=
[
imageData
base64EncodedStringWithOptions
:
0
];
NSMutableDictionary
*
dict
=
[
NSMutableDictionary
dictionary
];
NSMutableDictionary
*
dict
=
[
NSMutableDictionary
dictionary
];
[
dict
setObject
:
imageBase64
forKey
:
@"fileContent"
];
[
dict
setObject
:
imageBase64
forKey
:
@"fileContent"
];
...
...
redstar/Classes/Module/Function/Picture/AddPicture/ViewController/AddPictureViewController.m
View file @
78eb2f59
...
@@ -164,7 +164,7 @@
...
@@ -164,7 +164,7 @@
NSString
*
imageName
=
_imageNameArray
[
_rowNumber
-
3
];
NSString
*
imageName
=
_imageNameArray
[
_rowNumber
-
3
];
NSString
*
fullPath
=
[[
NSHomeDirectory
()
stringByAppendingPathComponent
:
@"Documents"
]
stringByAppendingPathComponent
:
imageName
];
NSString
*
fullPath
=
[[
NSHomeDirectory
()
stringByAppendingPathComponent
:
@"Documents"
]
stringByAppendingPathComponent
:
imageName
];
UIImage
*
image
=
[
UIImage
imageWithContentsOfFile
:
fullPath
];
UIImage
*
image
=
[
UIImage
imageWithContentsOfFile
:
fullPath
];
NSData
*
imageData
=
UIImageJPEGRepresentation
(
image
,
0
.
5
);
NSData
*
imageData
=
UIImageJPEGRepresentation
(
image
,
0
.
01
);
NSString
*
imageBase64
=
[
imageData
base64EncodedStringWithOptions
:
0
];
NSString
*
imageBase64
=
[
imageData
base64EncodedStringWithOptions
:
0
];
NSDictionary
*
parameters
=
@{
NSDictionary
*
parameters
=
@{
@"description"
:
cell
.
titleTextView
.
text
,
@"description"
:
cell
.
titleTextView
.
text
,
...
@@ -196,7 +196,7 @@
...
@@ -196,7 +196,7 @@
}
}
-
(
void
)
saveImage
:
(
UIImage
*
)
currentImage
{
-
(
void
)
saveImage
:
(
UIImage
*
)
currentImage
{
NSData
*
imageData
=
UIImageJPEGRepresentation
(
currentImage
,
0
.
5
);
NSData
*
imageData
=
UIImageJPEGRepresentation
(
currentImage
,
0
.
01
);
NSString
*
imageName
=
[
CommonFunc
md5Data
:
imageData
];
NSString
*
imageName
=
[
CommonFunc
md5Data
:
imageData
];
[
_imageNameArray
addObject
:
imageName
];
[
_imageNameArray
addObject
:
imageName
];
...
@@ -336,7 +336,7 @@
...
@@ -336,7 +336,7 @@
NSString
*
imageName
=
_imageNameArray
[
_rowNumber
-
3
];
NSString
*
imageName
=
_imageNameArray
[
_rowNumber
-
3
];
NSString
*
fullPath
=
[[
NSHomeDirectory
()
stringByAppendingPathComponent
:
@"Documents"
]
stringByAppendingPathComponent
:
imageName
];
NSString
*
fullPath
=
[[
NSHomeDirectory
()
stringByAppendingPathComponent
:
@"Documents"
]
stringByAppendingPathComponent
:
imageName
];
UIImage
*
image
=
[
UIImage
imageWithContentsOfFile
:
fullPath
];
UIImage
*
image
=
[
UIImage
imageWithContentsOfFile
:
fullPath
];
NSData
*
imageData
=
UIImageJPEGRepresentation
(
image
,
0
.
5
);
NSData
*
imageData
=
UIImageJPEGRepresentation
(
image
,
0
.
01
);
NSString
*
imageBase64
=
[
imageData
base64EncodedStringWithOptions
:
0
];
NSString
*
imageBase64
=
[
imageData
base64EncodedStringWithOptions
:
0
];
NSDictionary
*
parameters
=
@{
NSDictionary
*
parameters
=
@{
@"description"
:
cell
.
titleTextView
.
text
,
@"description"
:
cell
.
titleTextView
.
text
,
...
...
redstar/Classes/Module/Function/Question/AddQuestion/ViewController/AddQuestionViewController.m
View file @
78eb2f59
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
-
(
void
)
saveImage
:
(
UIImage
*
)
currentImage
{
-
(
void
)
saveImage
:
(
UIImage
*
)
currentImage
{
NSData
*
imageData
=
UIImageJPEGRepresentation
(
currentImage
,
0
.
5
);
NSData
*
imageData
=
UIImageJPEGRepresentation
(
currentImage
,
0
.
01
);
NSString
*
imageName
=
[
CommonFunc
md5Data
:
imageData
];
NSString
*
imageName
=
[
CommonFunc
md5Data
:
imageData
];
[
_imageNameArray
addObject
:
imageName
];
[
_imageNameArray
addObject
:
imageName
];
...
@@ -392,7 +392,7 @@
...
@@ -392,7 +392,7 @@
NSString
*
imageName
=
_imageNameArray
[
i
];
NSString
*
imageName
=
_imageNameArray
[
i
];
NSString
*
fullPath
=
[[
NSHomeDirectory
()
stringByAppendingPathComponent
:
@"Documents"
]
stringByAppendingPathComponent
:
imageName
];
NSString
*
fullPath
=
[[
NSHomeDirectory
()
stringByAppendingPathComponent
:
@"Documents"
]
stringByAppendingPathComponent
:
imageName
];
UIImage
*
image
=
[
UIImage
imageWithContentsOfFile
:
fullPath
];
UIImage
*
image
=
[
UIImage
imageWithContentsOfFile
:
fullPath
];
NSData
*
imageData
=
UIImageJPEGRepresentation
(
image
,
0
.
5
);
NSData
*
imageData
=
UIImageJPEGRepresentation
(
image
,
0
.
01
);
NSString
*
imageBase64
=
[
imageData
base64EncodedStringWithOptions
:
0
];
NSString
*
imageBase64
=
[
imageData
base64EncodedStringWithOptions
:
0
];
NSMutableDictionary
*
dict
=
[
NSMutableDictionary
dictionary
];
NSMutableDictionary
*
dict
=
[
NSMutableDictionary
dictionary
];
[
dict
setObject
:
imageBase64
forKey
:
@"fileContent"
];
[
dict
setObject
:
imageBase64
forKey
:
@"fileContent"
];
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectDetail/ViewController/InspectNotUploadViewController.m
View file @
78eb2f59
...
@@ -117,6 +117,13 @@
...
@@ -117,6 +117,13 @@
-
(
void
)
createImagePicker
:
(
UIButton
*
)
sender
-
(
void
)
createImagePicker
:
(
UIButton
*
)
sender
{
{
if
(
_imageNameArray
.
count
>
9
)
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"最多上传10张图片!"
delegate
:
self
cancelButtonTitle
:
@"确定"
otherButtonTitles
:
nil
,
nil
];
[
alert
show
];
return
;
}
if
(
sender
.
tag
==
2201
)
{
if
(
sender
.
tag
==
2201
)
{
_rowNumber
++
;
_rowNumber
++
;
}
}
...
@@ -154,7 +161,7 @@
...
@@ -154,7 +161,7 @@
#pragma mark - 保存图片至沙盒
#pragma mark - 保存图片至沙盒
-
(
void
)
saveImage
:
(
UIImage
*
)
currentImage
{
-
(
void
)
saveImage
:
(
UIImage
*
)
currentImage
{
NSData
*
imageData
=
UIImageJPEGRepresentation
(
currentImage
,
0
.
5
);
NSData
*
imageData
=
UIImageJPEGRepresentation
(
currentImage
,
0
.
01
);
NSString
*
imageName
=
[
CommonFunc
md5Data
:
imageData
];
NSString
*
imageName
=
[
CommonFunc
md5Data
:
imageData
];
...
@@ -350,7 +357,7 @@
...
@@ -350,7 +357,7 @@
NSString
*
imageName
=
_imageNameArray
[
i
];
NSString
*
imageName
=
_imageNameArray
[
i
];
NSString
*
fullPath
=
[[
NSHomeDirectory
()
stringByAppendingPathComponent
:
@"Documents"
]
stringByAppendingPathComponent
:
imageName
];
NSString
*
fullPath
=
[[
NSHomeDirectory
()
stringByAppendingPathComponent
:
@"Documents"
]
stringByAppendingPathComponent
:
imageName
];
UIImage
*
image
=
[
UIImage
imageWithContentsOfFile
:
fullPath
];
UIImage
*
image
=
[
UIImage
imageWithContentsOfFile
:
fullPath
];
NSData
*
imageData
=
UIImageJPEGRepresentation
(
image
,
0
.
5
);
NSData
*
imageData
=
UIImageJPEGRepresentation
(
image
,
0
.
01
);
NSString
*
imageBase64
=
[
imageData
base64EncodedStringWithOptions
:
0
];
NSString
*
imageBase64
=
[
imageData
base64EncodedStringWithOptions
:
0
];
NSMutableDictionary
*
dict
=
[
NSMutableDictionary
dictionary
];
NSMutableDictionary
*
dict
=
[
NSMutableDictionary
dictionary
];
[
dict
setObject
:
imageBase64
forKey
:
@"fileContent"
];
[
dict
setObject
:
imageBase64
forKey
:
@"fileContent"
];
...
...
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