Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
T
total
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
张杰
total
Commits
f97a7c29
Commit
f97a7c29
authored
Dec 05, 2017
by
曹云霄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OSS附件上传测试完成
parent
d9083b55
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
86 additions
and
58 deletions
+86
-58
PatrolExamViewController.m
...lOnline(VI巡检)/ViewConstrollers/PatrolExamViewController.m
+5
-5
ICRLoginViewController.m
total/GTOApp/Login/ICRLoginViewController.m
+35
-42
AccountConfigModel.m
total/GTOApp/UserUtil/AccountConfigModel.m
+3
-1
UrlConst.m
total/GTOApp/UserUtil/Network/UrlConst.m
+1
-1
ZJPictureTableViewCell.m
total/GTOApp/UserUtil/PictureCell/ZJPictureTableViewCell.m
+0
-1
UploadManager.m
total/GTOApp/UserUtil/UploadManager/UploadManager.m
+2
-2
IBTLoadingView.m
total/IBTUtilites/IBTUIKit/IBTLoadingView.m
+16
-5
Contents.json
total/Images.xcassets/loading.imageset/Contents.json
+23
-0
loding.png
total/Images.xcassets/loading.imageset/loding.png
+0
-0
loding@2x.png
total/Images.xcassets/loading.imageset/loding@2x.png
+0
-0
loding@3x.png
total/Images.xcassets/loading.imageset/loding@3x.png
+0
-0
Total-Prefix.pch
total/Total-Prefix.pch
+1
-1
No files found.
total/GTOApp/Business/PatrolOnline(VI巡检)/ViewConstrollers/PatrolExamViewController.m
View file @
f97a7c29
...
@@ -82,6 +82,11 @@
...
@@ -82,6 +82,11 @@
self
.
topView
.
viewModel
=
self
.
viewModel
;
self
.
topView
.
viewModel
=
self
.
viewModel
;
//根据当前单据状态显示底部按钮
//根据当前单据状态显示底部按钮
[
self
.
tableView
reloadData
];
[
self
.
tableView
reloadData
];
dispatch_async
(
dispatch_get_main_queue
(),
^
{
NSMutableArray
*
arrIndexs
=
[
self
.
viewModel
closeAll
];
[
self
.
tableView
deleteRowsAtIndexPaths
:
arrIndexs
withRowAnimation
:
UITableViewRowAnimationFade
];
});
//进行中的单据才显示保存按钮
//进行中的单据才显示保存按钮
if
(
self
.
viewModel
.
state
.
type
==
PatrolExamStateProcessing
)
{
if
(
self
.
viewModel
.
state
.
type
==
PatrolExamStateProcessing
)
{
UIBarButtonItem
*
save
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:
@"保存"
style
:
UIBarButtonItemStyleDone
target
:
self
action
:
@selector
(
actionSave
)];
UIBarButtonItem
*
save
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:
@"保存"
style
:
UIBarButtonItemStyleDone
target
:
self
action
:
@selector
(
actionSave
)];
...
@@ -114,11 +119,6 @@
...
@@ -114,11 +119,6 @@
}
failure
:^
(
id
errorValue
)
{
}
failure
:^
(
id
errorValue
)
{
[
IBTLoadingView
showTextOnly
:
errorValue
];
[
IBTLoadingView
showTextOnly
:
errorValue
];
}];
}];
}
else
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
NSMutableArray
*
arrIndexs
=
[
self
.
viewModel
closeAll
];
[
self
.
tableView
deleteRowsAtIndexPaths
:
arrIndexs
withRowAnimation
:
UITableViewRowAnimationFade
];
});
};
};
//统一刷新
//统一刷新
self
.
viewModel
.
blockReloadData
=
^
{
self
.
viewModel
.
blockReloadData
=
^
{
...
...
total/GTOApp/Login/ICRLoginViewController.m
View file @
f97a7c29
...
@@ -141,22 +141,18 @@
...
@@ -141,22 +141,18 @@
NSString
*
nsRegisterCode
=
self
.
m_containerView
.
m_cCodeTextF
.
text
;
NSString
*
nsRegisterCode
=
self
.
m_containerView
.
m_cCodeTextF
.
text
;
NSString
*
nsUserName
=
self
.
m_containerView
.
m_userNameTextF
.
text
;
NSString
*
nsUserName
=
self
.
m_containerView
.
m_userNameTextF
.
text
;
NSString
*
nsPassword
=
self
.
m_containerView
.
m_passwordTextF
.
text
;
NSString
*
nsPassword
=
self
.
m_containerView
.
m_passwordTextF
.
text
;
WS
(
weakSelf
);
void
(
^
succ
)(
id
)
=
^
(
id
data
)
{
void
(
^
succ
)(
id
)
=
^
(
id
data
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
IBTLoadingView
hideHUDWithText
:
nil
];
ICRUserUtil
*
userUtil
=
[
ICRUserUtil
sharedInstance
];
ICRUserUtil
*
userUtil
=
[
ICRUserUtil
sharedInstance
];
userUtil
.
bAutoLogin
=
@
([
_m_containerView
isAutoLogin
]);
userUtil
.
bAutoLogin
=
@
([
_m_containerView
isAutoLogin
]);
[
userUtil
saveArchive
];
[
userUtil
saveArchive
];
ICRAppViewControllerManager
*
mgr
=
[
ICRAppViewControllerManager
getAppViewControllerManager
];
ICRAppViewControllerManager
*
mgr
=
[
ICRAppViewControllerManager
getAppViewControllerManager
];
[
mgr
openMainFrame
];
[
mgr
openMainFrame
];
//极光别名
//极光别名
NSSet
*
setTags
=
[
NSSet
setWithArray
:@[
@""
]];
NSSet
*
setTags
=
[
NSSet
setWithArray
:@[
@""
]];
[
APService
setTags
:
setTags
alias
:
userUtil
.
f_user_uuid
callbackSelector
:
nil
object
:
nil
];
[
APService
setTags
:
setTags
alias
:
userUtil
.
f_user_uuid
callbackSelector
:
nil
object
:
nil
];
[
weakSelf
getAppOption
];
};
};
void
(
^
fail
)(
id
)
=
^
(
NSError
*
data
)
{
void
(
^
fail
)(
id
)
=
^
(
NSError
*
data
)
{
...
@@ -167,42 +163,39 @@
...
@@ -167,42 +163,39 @@
[
httpCtrl
doLoginWithUserName
:
nsUserName
password
:
nsPassword
registerCode
:
nsRegisterCode
success
:
succ
failure
:
fail
];
[
httpCtrl
doLoginWithUserName
:
nsUserName
password
:
nsPassword
registerCode
:
nsRegisterCode
success
:
succ
failure
:
fail
];
}
}
///**
/**
// *在地图View将要启动定位时,会调用此函数
获取App配置项
// *@param mapView 地图View
*/
// */
-
(
void
)
getAppOption
//- (void)willStartLocatingUser
{
//{
// NSLog(@"start locate");
NSString
*
string
=
@"{
\"
accessKey
\"
:
\"
LTAIiRWdyPrLTinG
\"
,
\"
secretKey
\"
:
\"
nWBZDNaGf6CWL8FhQt0eJB8Y0xpUOd
\"
,
\"
endPoint
\"
:
\"
oss-cn-shanghai.aliyuncs.com
\"
,
\"
bucketName
\"
:
\"
total-gomore
\"
,
\"
region
\"
:
\"
oss-cn-shanghai
\"
,
\"
imgEndpoint
\"
:
\"
total-gomore.img-cn-shanghai.aliyuncs.com
\"
,
\"
width
\"
:
\"
200
\"
,
\"
height
\"
:
\"
200
\"
}"
;
//
//}
AccountConfigModel_uploadType
*
uploadType
=
[[
AccountConfigModel_uploadType
alloc
]
initWithString
:
string
error
:
nil
];
//- (void)didUpdateBMKUserLocation:(BMKUserLocation *)userLocation
if
([
uploadType
.
ossType
isEqualToString
:
@"COS"
])
{
//{
uploadType
.
type
=
@"COS"
;
// NSLog(@"didUpdateUserLocation lat %f,long %f",userLocation.location.coordinate.latitude,userLocation.location.coordinate.longitude);
}
else
{
// self.coordinateX = userLocation.location.coordinate.latitude;
uploadType
.
type
=
@"OSS"
;
// self.coordinateY = userLocation.location.coordinate.longitude;
}
// BMKReverseGeoCodeOption *reverseGeocodeSearchOption = [[BMKReverseGeoCodeOption alloc]init];
AccountConfigModel
*
configModel
=
[
AccountConfigModel
new
];
// CLLocationCoordinate2D pt = (CLLocationCoordinate2D){_coordinateX, _coordinateY};
configModel
.
uploadType
=
uploadType
;
// reverseGeocodeSearchOption.reverseGeoPoint = pt;
kUser
.
configModel
=
configModel
;
// BOOL flag = [_geocodesearch reverseGeoCode:reverseGeocodeSearchOption];
// if(flag)
// [RequestManager request_OptionSuccess:^(id returnValue) {
// {
// if ([[self class] verifyData:returnValue]) {
//
// if (![[BaseViewModel formatData:returnValue] isKindOfClass:[NSNull class]]) {
// NSLog(@"反geo检索发送成功");
// AccountConfigModel *configModel = [[AccountConfigModel alloc] initWithDictionary:returnValue error:nil];
// }
// [configModel analysisConfigModel];
// else
// kUser.configModel = configModel;
// {
// }
// NSLog(@"反geo检索发送失败");
// return;
// }
// }
//
// [IBTLoadingView showTextOnly:[BaseViewModel messageData:returnValue]];
// [self.locService stopUserLocationService];
// } failure:^(id errorValue) {
//}
// [IBTLoadingView showTextOnly:errorValue];
//-(void) onGetReverseGeoCodeResult:(BMKGeoCodeSearch *)searcher result:(BMKReverseGeoCodeResult *)result errorCode:(BMKSearchErrorCode)error
// }];
//{
}
// if (error == 0) {
// //CLog(@"%@%@",result.location,result.address);
// }
//}
#pragma mark - TextObserver
#pragma mark - TextObserver
-
(
void
)
inputTextEditChanged
:
(
NSNotification
*
)
obj
-
(
void
)
inputTextEditChanged
:
(
NSNotification
*
)
obj
{
{
...
...
total/GTOApp/UserUtil/AccountConfigModel.m
View file @
f97a7c29
...
@@ -43,7 +43,9 @@
...
@@ -43,7 +43,9 @@
self
.
storeType
=
storeType
;
self
.
storeType
=
storeType
;
//是否启用OSS
//是否启用OSS
}
else
if
([
item
.
optionKey
isEqualToString
:
@"enableoss"
])
{
}
else
if
([
item
.
optionKey
isEqualToString
:
@"enableoss"
])
{
AccountConfigModel_uploadType
*
uploadType
=
[[
AccountConfigModel_uploadType
alloc
]
initWithString
:
item
.
optionValue
error
:
nil
];
NSString
*
string
=
@"{
\"
accessKey
\"
:
\"
LTAIiRWdyPrLTinG
\"
,
\"
secretKey
\"
:
\"
nWBZDNaGf6CWL8FhQt0eJB8Y0xpUOd
\"
,
\"
endPoint
\"
:
\"
oss-cn-shanghai.aliyuncs.com
\"
,
\"
bucketName
\"
:
\"
total-gomore
\"
,
\"
region
\"
:
\"
oss-cn-shanghai
\"
,
\"
imgEndpoint
\"
:
\"
total-gomore.img-cn-shanghai.aliyuncs.com
\"
,
\"
width
\"
:
\"
200
\"
,
\"
height
\"
:
\"
200
\"
}"
;
AccountConfigModel_uploadType
*
uploadType
=
[[
AccountConfigModel_uploadType
alloc
]
initWithString
:
string
error
:
nil
];
if
([
uploadType
.
ossType
isEqualToString
:
@"COS"
])
{
if
([
uploadType
.
ossType
isEqualToString
:
@"COS"
])
{
uploadType
.
type
=
@"COS"
;
uploadType
.
type
=
@"COS"
;
}
else
{
}
else
{
...
...
total/GTOApp/UserUtil/Network/UrlConst.m
View file @
f97a7c29
...
@@ -15,7 +15,7 @@ NSString *const SYSTIME = @"systime/time";
...
@@ -15,7 +15,7 @@ NSString *const SYSTIME = @"systime/time";
//登录
//登录
NSString
*
const
LOGIN
=
@"user/login"
;
NSString
*
const
LOGIN
=
@"user/login"
;
//第三方上传配置信息
//第三方上传配置信息
NSString
*
const
UPLOADCONFIG
=
@"option/getall"
;
NSString
*
const
UPLOADCONFIG
=
@"
vipatrol/plan/
option/getall"
;
//自检匹配门店坐标级别
//自检匹配门店坐标级别
NSString
*
const
STORECOORDLEVEL
=
@"option/get/enableStoreLocationCheck"
;
NSString
*
const
STORECOORDLEVEL
=
@"option/get/enableStoreLocationCheck"
;
//待办(首页)
//待办(首页)
...
...
total/GTOApp/UserUtil/PictureCell/ZJPictureTableViewCell.m
View file @
f97a7c29
...
@@ -117,7 +117,6 @@
...
@@ -117,7 +117,6 @@
[
cameraViewController
restoreFullScreenMode
];
[
cameraViewController
restoreFullScreenMode
];
[
self
.
vc
dismissViewControllerAnimated
:
YES
completion
:
nil
];
[
self
.
vc
dismissViewControllerAnimated
:
YES
completion
:
nil
];
if
(
self
.
viewModel
.
arrPics
.
count
+
1
>
self
.
viewModel
.
maxPictureNumber
)
{
if
(
self
.
viewModel
.
arrPics
.
count
+
1
>
self
.
viewModel
.
maxPictureNumber
)
{
// ShowDefaultErrorView([NSString stringWithFormat:@"最多添加%ld张照片",self.viewModel.maxPictureNumber], nil);
[
IBTLoadingView
showTextOnly
:[
NSString
stringWithFormat
:
@"最多添加%.0f张照片"
,
self
.
viewModel
.
maxPictureNumber
]];
[
IBTLoadingView
showTextOnly
:[
NSString
stringWithFormat
:
@"最多添加%.0f张照片"
,
self
.
viewModel
.
maxPictureNumber
]];
return
;
return
;
}
}
...
...
total/GTOApp/UserUtil/UploadManager/UploadManager.m
View file @
f97a7c29
...
@@ -95,8 +95,8 @@
...
@@ -95,8 +95,8 @@
NSMutableArray
*
attachmentArray
=
[
NSMutableArray
array
];
NSMutableArray
*
attachmentArray
=
[
NSMutableArray
array
];
for
(
int
i
=
0
;
i
<
array
.
count
;
i
++
)
{
for
(
int
i
=
0
;
i
<
array
.
count
;
i
++
)
{
PostAttachmentModel
*
attachmentModel
=
array
[
i
];
PostAttachmentModel
*
attachmentModel
=
array
[
i
];
kUser
.
configModel
.
uploadType
.
imagePath
=
[
NSString
stringWithFormat
:
@"%@/image/%@"
,
kUser
.
f_
enterprise_
code
,
attachmentModel
.
entityType
];
kUser
.
configModel
.
uploadType
.
imagePath
=
[
NSString
stringWithFormat
:
@"%@/image/%@"
,
kUser
.
f_
authenti
code
,
attachmentModel
.
entityType
];
kUser
.
configModel
.
uploadType
.
videoPath
=
[
NSString
stringWithFormat
:
@"%@/video/%@"
,
kUser
.
f_
enterprise_
code
,
attachmentModel
.
entityType
];
kUser
.
configModel
.
uploadType
.
videoPath
=
[
NSString
stringWithFormat
:
@"%@/video/%@"
,
kUser
.
f_
authenti
code
,
attachmentModel
.
entityType
];
switch
(
attachmentModel
.
attachmentType
)
{
switch
(
attachmentModel
.
attachmentType
)
{
case
ATTACHMENT_VIDEO
:
case
ATTACHMENT_VIDEO
:
{
{
...
...
total/IBTUtilites/IBTUIKit/IBTLoadingView.m
View file @
f97a7c29
...
@@ -59,14 +59,25 @@
...
@@ -59,14 +59,25 @@
}
}
+
(
void
)
showProgressLabel
:(
NSString
*
)
text
{
+
(
void
)
showProgressLabel
:(
NSString
*
)
text
{
IBTLoadingView
*
hud
=
[[
self
class
]
showHUDWithText
:
text
inView
:[[
self
class
]
hudShowWindow
]];
if
(
!
[
NSThread
isMainThread
])
{
hud
.
mode
=
MBProgressHUDModeIndeterminate
;
dispatch_async
(
dispatch_get_main_queue
(),
^
{
IBTLoadingView
*
hud
=
[[
self
class
]
showHUDWithText
:
text
inView
:[[
self
class
]
hudShowWindow
]];
hud
.
mode
=
MBProgressHUDModeIndeterminate
;
});
}
else
{
IBTLoadingView
*
hud
=
[[
self
class
]
showHUDWithText
:
text
inView
:[[
self
class
]
hudShowWindow
]];
hud
.
mode
=
MBProgressHUDModeIndeterminate
;
}
}
}
+
(
void
)
hideHUDWithText
:(
NSString
*
)
text
{
+
(
void
)
hideHUDWithText
:(
NSString
*
)
text
{
if
(
!
[
NSThread
isMainThread
])
{
[[
self
class
]
hideHUDForView
:[[
self
class
]
hudShowWindow
]
withText
:
text
];
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[[
self
class
]
hideHUDForView
:[[
self
class
]
hudShowWindow
]
withText
:
text
];
});
}
else
{
[[
self
class
]
hideHUDForView
:[[
self
class
]
hudShowWindow
]
withText
:
text
];
}
}
}
+
(
void
)
showProgressLabel
:(
NSString
*
)
text
+
(
void
)
showProgressLabel
:(
NSString
*
)
text
...
...
total/Images.xcassets/loading.imageset/Contents.json
0 → 100644
View file @
f97a7c29
{
"images"
:
[
{
"idiom"
:
"universal"
,
"filename"
:
"loding.png"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"filename"
:
"loding@2x.png"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"filename"
:
"loding@3x.png"
,
"scale"
:
"3x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
total/Images.xcassets/loading.imageset/loding.png
0 → 100644
View file @
f97a7c29
2.69 KB
total/Images.xcassets/loading.imageset/loding@2x.png
0 → 100644
View file @
f97a7c29
4.47 KB
total/Images.xcassets/loading.imageset/loding@3x.png
0 → 100644
View file @
f97a7c29
9.91 KB
total/Total-Prefix.pch
View file @
f97a7c29
...
@@ -60,7 +60,7 @@ CGSizeMake((ScreenSize.width - 30) / 2.0, (ScreenSize.width - 120) / 2.0)
...
@@ -60,7 +60,7 @@ CGSizeMake((ScreenSize.width - 30) / 2.0, (ScreenSize.width - 120) / 2.0)
/**
/**
* 友好图片
* 友好图片
*/
*/
#define KNODATAIMAGE TCImage(@"
圆角矩形-3-副本
")
#define KNODATAIMAGE TCImage(@"
loading
")
/**
/**
...
...
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