Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
colorfulSchoolReconsitution
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
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
刘卓鑫
colorfulSchoolReconsitution
Commits
075c5a33
Commit
075c5a33
authored
Sep 27, 2019
by
刘卓鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
64eb0052
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
98 additions
and
20 deletions
+98
-20
project.pbxproj
ColorfulSchool/ColorfulSchool.xcodeproj/project.pbxproj
+14
-0
UserInterfaceState.xcuserstate
...ata/liuzhuoxin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
AppDelegate.m
ColorfulSchool/ColorfulSchool/AppDelegate.m
+1
-1
ZXAdViewService.m
.../ColorfulSchool/Classes/AD(广告)/ADViewAd/ZXAdViewService.m
+3
-3
ZXHomePageViewController.m
...ge(首页)/0801HomePage/Controller/ZXHomePageViewController.m
+9
-9
ZXBathViewController.m
...ePage(首页)/Operation(自助服务)/bath(洗浴)/ZXBathViewController.m
+19
-7
ZXAlimamaViewController.h
...ool/ColorfulSchool/Classes/demo/ZXAlimamaViewController.h
+17
-0
ZXAlimamaViewController.m
...ool/ColorfulSchool/Classes/demo/ZXAlimamaViewController.m
+35
-0
No files found.
ColorfulSchool/ColorfulSchool.xcodeproj/project.pbxproj
View file @
075c5a33
...
...
@@ -108,6 +108,7 @@
1CA7E88B229E8E310014E95F
/* JDSDK.bundle in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
1CA7E889229E8E310014E95F
/* JDSDK.bundle */
;
};
1CA7E88C229E8E310014E95F
/* JDSDK.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
1CA7E88A229E8E310014E95F
/* JDSDK.framework */
;
};
1CB10F1C233C63C900F94688
/* ZXAdViewService.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
1CB10F1B233C63C900F94688
/* ZXAdViewService.m */
;
};
1CB10F3C233D9C0B00F94688
/* ZXAlimamaViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
1CB10F3B233D9C0B00F94688
/* ZXAlimamaViewController.m */
;
};
1CB3AC062304E195006F1724
/* ZXMePageCollectionViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
1CB3AC052304E195006F1724
/* ZXMePageCollectionViewCell.m */
;
};
1CB3AC092304E369006F1724
/* ZXMePageMenuModel.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
1CB3AC082304E369006F1724
/* ZXMePageMenuModel.m */
;
};
1CB3AC0C2305321D006F1724
/* ZXBindTelViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
1CB3AC0B2305321D006F1724
/* ZXBindTelViewController.m */
;
};
...
...
@@ -901,6 +902,8 @@
1CA7E88A229E8E310014E95F
/* JDSDK.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
path
=
JDSDK.framework
;
sourceTree
=
"<group>"
;
};
1CB10F1A233C63C900F94688
/* ZXAdViewService.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ZXAdViewService.h
;
sourceTree
=
"<group>"
;
};
1CB10F1B233C63C900F94688
/* ZXAdViewService.m */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ZXAdViewService.m
;
sourceTree
=
"<group>"
;
};
1CB10F3A233D9C0B00F94688
/* ZXAlimamaViewController.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ZXAlimamaViewController.h
;
sourceTree
=
"<group>"
;
};
1CB10F3B233D9C0B00F94688
/* ZXAlimamaViewController.m */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ZXAlimamaViewController.m
;
sourceTree
=
"<group>"
;
};
1CB3AC042304E195006F1724
/* ZXMePageCollectionViewCell.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ZXMePageCollectionViewCell.h
;
sourceTree
=
"<group>"
;
};
1CB3AC052304E195006F1724
/* ZXMePageCollectionViewCell.m */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ZXMePageCollectionViewCell.m
;
sourceTree
=
"<group>"
;
};
1CB3AC072304E369006F1724
/* ZXMePageMenuModel.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ZXMePageMenuModel.h
;
sourceTree
=
"<group>"
;
};
...
...
@@ -2433,6 +2436,15 @@
path
=
customViews
;
sourceTree
=
"<group>"
;
};
1CB10F39233D9BF600F94688
/* demo */
=
{
isa
=
PBXGroup
;
children
=
(
1CB10F3A233D9C0B00F94688
/* ZXAlimamaViewController.h */
,
1CB10F3B233D9C0B00F94688
/* ZXAlimamaViewController.m */
,
);
path
=
demo
;
sourceTree
=
"<group>"
;
};
1CB3AC1023053BE0006F1724
/* CropImage */
=
{
isa
=
PBXGroup
;
children
=
(
...
...
@@ -4014,6 +4026,7 @@
A7DECC542079F0E20039EC22
/* Classes */
=
{
isa
=
PBXGroup
;
children
=
(
1CB10F39233D9BF600F94688
/* demo */
,
1C39412F230BD0FD005048EB
/* HomePage(首页) */
,
1C3940FB230BC9D5005048EB
/* Found(发现) */
,
917B7EC31F3C663100390AE5
/* MineView(个人中心) */
,
...
...
@@ -5267,6 +5280,7 @@
22E36CAA1F558D9800073AC2
/* EquipmentModel.m in Sources */
,
1C3AE7F822F18B4C0045C969
/* ZXHomePageSingleCell.m in Sources */
,
A7DECC9E2079F0E30039EC22
/* ZXWebLoadingView.m in Sources */
,
1CB10F3C233D9C0B00F94688
/* ZXAlimamaViewController.m in Sources */
,
1C3AE7C622F0482D0045C969
/* SGQRCodeScanView.m in Sources */
,
A7F3E16521B5330F00010E23
/* GCDAsyncSocket.m in Sources */
,
1CC15429230D5B7400582EC1
/* ZXAimiWalletAlertView.m in Sources */
,
...
...
ColorfulSchool/ColorfulSchool.xcworkspace/xcuserdata/liuzhuoxin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
075c5a33
No preview for this file type
ColorfulSchool/ColorfulSchool/AppDelegate.m
View file @
075c5a33
...
...
@@ -85,7 +85,7 @@
// [kAppWindow addSubview:fps];
//默认配置
[
self
defaultLauchConfigAndIsOpenPreventCrashManager
:
NO
];
[
self
defaultLauchConfigAndIsOpenPreventCrashManager
:
YES
];
//防止蓝牙洗浴后台运行被系统中断
...
...
ColorfulSchool/ColorfulSchool/Classes/AD(广告)/ADViewAd/ZXAdViewService.m
View file @
075c5a33
//
//
...
...
@@ -61,7 +61,7 @@
}
for
(
NSArray
*
arr
in
[
dic
allValues
])
{
for
(
NSString
*
url
in
arr
)
{
[[
self
sharedManager
]
GET
:
url
parameters
:
nil
success
:^
(
NSURLSessionDataTask
*
_Nonnull
task
,
id
_Nonnull
responseObject
)
{
[[
self
sharedManager
]
GET
:
[
url
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
]
parameters
:
nil
success
:^
(
NSURLSessionDataTask
*
_Nonnull
task
,
id
_Nonnull
responseObject
)
{
NSLog
(
@"xx"
);
}
failure
:^
(
NSURLSessionDataTask
*
_Nullable
task
,
NSError
*
_Nonnull
error
)
{
NSLog
(
@"xx"
);
...
...
@@ -75,7 +75,7 @@
return
;
}
for
(
NSString
*
url
in
arr
)
{
[[
self
sharedManager
]
GET
:
url
parameters
:
nil
success
:^
(
NSURLSessionDataTask
*
_Nonnull
task
,
id
_Nonnull
responseObject
)
{}
failure
:^
(
NSURLSessionDataTask
*
_Nullable
task
,
NSError
*
_Nonnull
error
)
{}];
[[
self
sharedManager
]
GET
:
[
url
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
]
parameters
:
nil
success
:^
(
NSURLSessionDataTask
*
_Nonnull
task
,
id
_Nonnull
responseObject
)
{}
failure
:^
(
NSURLSessionDataTask
*
_Nullable
task
,
NSError
*
_Nonnull
error
)
{}];
}
}
+
(
AFHTTPSessionManager
*
)
sharedManager
...
...
ColorfulSchool/ColorfulSchool/Classes/HomePage(首页)/0801HomePage/Controller/ZXHomePageViewController.m
View file @
075c5a33
//
//
...
...
@@ -92,14 +92,14 @@
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
changeUserNameAction
:
)
name
:
@"changeUserNameNotification"
object
:
nil
];
//测试按钮
//
UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(100, kScreenHeight - 150, 80, 80)];
//
[self.view addSubview:btn];
//
btn.backgroundColor = [UIColor orangeColor];
//
[[btn rac_signalForControlEvents:UIControlEventTouchDown] subscribeNext:^(id x) {
// UIViewController *vc = [[NSClassFromString(@"DC_ZXWashTabbar
ViewController") alloc] init];
//
vc.hidesBottomBarWhenPushed = YES;
//
[self.navigationController pushViewController:vc animated:YES];
//
}];
UIButton
*
btn
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
100
,
kScreenHeight
-
150
,
80
,
80
)];
[
self
.
view
addSubview
:
btn
];
btn
.
backgroundColor
=
[
UIColor
orangeColor
];
[[
btn
rac_signalForControlEvents
:
UIControlEventTouchDown
]
subscribeNext
:
^
(
id
x
)
{
UIViewController
*
vc
=
[[
NSClassFromString
(
@"ZXAlimama
ViewController"
)
alloc
]
init
];
vc
.
hidesBottomBarWhenPushed
=
YES
;
[
self
.
navigationController
pushViewController
:
vc
animated
:
YES
];
}];
}
-
(
void
)
viewWillLayoutSubviews
{
[
super
viewWillLayoutSubviews
];
...
...
ColorfulSchool/ColorfulSchool/Classes/HomePage(首页)/Operation(自助服务)/bath(洗浴)/ZXBathViewController.m
View file @
075c5a33
//
//
...
...
@@ -92,8 +92,8 @@
//初始化socket
self
.
clientSocket
=
[[
GCDAsyncSocket
alloc
]
initWithDelegate
:
self
delegateQueue
:
dispatch_get_main_queue
()];
//开始建立连接
[
self
.
clientSocket
connectToHost
:[
kUserDefaults
objectForKey
:
@"BATHSocketUrl"
]
onPort
:[[
kUserDefaults
objectForKey
:
@"BATHSocketPort"
]
integerValue
]
viaInterface
:
nil
withTimeout
:-
1
error
:
nil
];
NSLog
(
@"😇😇😇😇😇😇 socket开始连接---%@"
,
[
ZXTool
getTimeNow
]);
//
[self.clientSocket connectToHost:[kUserDefaults objectForKey:@"BATHSocketUrl"] onPort:[[kUserDefaults objectForKey:@"BATHSocketPort"] integerValue] viaInterface:nil withTimeout:-1 error:nil];
//
NSLog(@"😇😇😇😇😇😇 socket开始连接---%@", [ZXTool getTimeNow]);
@weakify
(
self
);
[[[
NSNotificationCenter
defaultCenter
]
rac_addObserverForName
:
kSelf_help_start_timer
object
:
nil
]
subscribeNext
:^
(
id
x
)
{
...
...
@@ -385,7 +385,14 @@
self
.
startDrink
.
enabled
=
NO
;
//按钮不可点击
[
self
reConnect
];
//重连操作
//开始搜索设备的时候触发
[
self
checkBluetoothConectStatus
];
if
(
self
.
clientSocket
.
isConnected
==
NO
)
{
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
0
.
5
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
[
self
checkBluetoothConectStatus
];
});
}
else
{
[
self
checkBluetoothConectStatus
];
}
[
SVProgressHUD
showWithStatus
:
@"蓝牙连接中..."
];
}
...
...
@@ -393,9 +400,12 @@
-
(
void
)
checkBluetoothConectStatus
{
// [ZXTool showLoadingAnimation];
NSInteger
times
=
5
;
NSInteger
times
=
0
.
1
;
if
(
!
self
.
clientSocket
.
isConnected
)
{
times
+=
0
.
5
;
}
if
(
self
.
currentBluetooth
.
isOnlyBluetooth
)
{
times
=
10
;
times
=
5
;
}
//5s之后查询蓝牙连接状态
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
times
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
...
...
@@ -484,6 +494,8 @@
dispatch_async
(
dispatch_get_main_queue
(),
^
{
ZXBluetoothModel
*
m
=
[
ZXBluetoothModel
mj_objectWithKeyValues
:
common
.
data
];
[
ZXBluetoothModel
clearTable
];
self
.
currentPeripheralName
=
m
.
code
;
[
self
sendDeviceInfoToSocketByTimes
:
3
];
[
m
save
];
self
.
numberLabel
.
text
=
[
NSString
stringWithFormat
:
@"设备名称:%@"
,
m
.
code
];
self
.
addressLabel
.
text
=
[
NSString
stringWithFormat
:
@"设备地址:%@"
,
m
.
position
];
...
...
@@ -768,7 +780,7 @@
//初始化socket
self
.
clientSocket
=
[[
GCDAsyncSocket
alloc
]
initWithDelegate
:
self
delegateQueue
:
dispatch_get_main_queue
()];
}
if
(
self
.
isSocketConnected
==
NO
)
{
if
(
self
.
isSocketConnected
==
NO
||
self
.
clientSocket
.
isConnected
==
NO
)
{
//开始建立连接
[
self
.
clientSocket
connectToHost
:[
kUserDefaults
objectForKey
:
@"BATHSocketUrl"
]
onPort
:[[
kUserDefaults
objectForKey
:
@"BATHSocketPort"
]
integerValue
]
viaInterface
:
nil
withTimeout
:-
1
error
:
nil
];
}
...
...
ColorfulSchool/ColorfulSchool/Classes/demo/ZXAlimamaViewController.h
0 → 100644
View file @
075c5a33
//
// ZXAlimamaViewController.h
// ColorfulSchool
//
// Created by 刘卓鑫 on 2019/9/27.
// Copyright © 2019 Colorful Any Door. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface
ZXAlimamaViewController
:
UIViewController
@end
NS_ASSUME_NONNULL_END
ColorfulSchool/ColorfulSchool/Classes/demo/ZXAlimamaViewController.m
0 → 100644
View file @
075c5a33
//
// ZXAlimamaViewController.m
// ColorfulSchool
//
// Created by 刘卓鑫 on 2019/9/27.
// Copyright © 2019 Colorful Any Door. All rights reserved.
//
#import "ZXAlimamaViewController.h"
@interface
ZXAlimamaViewController
()
@end
@implementation
ZXAlimamaViewController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
//
// 27963012
// f924dd754677f4651edcf03a938619b3
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
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