From: liangzhenying <867174124@qq.com>
Date: Wed, 19 Nov 2025 09:55:43 +0000 (+0800)
Subject: 首页增加背景图
X-Git-Tag: 1.0.2~60
X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=736a549d0439c4311c438472d5ccbe2843c3fe9b;p=mirrors%2FShenYin.git
首页增加背景图
---
diff --git a/ShenYin/ShenYin/Assets.xcassets/home/home_bg.imageset/Contents.json b/ShenYin/ShenYin/Assets.xcassets/home/home_bg.imageset/Contents.json
new file mode 100644
index 0000000..59cf37e
--- /dev/null
+++ b/ShenYin/ShenYin/Assets.xcassets/home/home_bg.imageset/Contents.json
@@ -0,0 +1,22 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Rectangle_966@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Rectangle_966@3x.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/ShenYin/ShenYin/Assets.xcassets/home/home_bg.imageset/Rectangle_966@2x.png b/ShenYin/ShenYin/Assets.xcassets/home/home_bg.imageset/Rectangle_966@2x.png
new file mode 100644
index 0000000..590adb4
Binary files /dev/null and b/ShenYin/ShenYin/Assets.xcassets/home/home_bg.imageset/Rectangle_966@2x.png differ
diff --git a/ShenYin/ShenYin/Assets.xcassets/home/home_bg.imageset/Rectangle_966@3x.png b/ShenYin/ShenYin/Assets.xcassets/home/home_bg.imageset/Rectangle_966@3x.png
new file mode 100644
index 0000000..e07c11c
Binary files /dev/null and b/ShenYin/ShenYin/Assets.xcassets/home/home_bg.imageset/Rectangle_966@3x.png differ
diff --git a/ShenYin/ShenYin/Info.plist b/ShenYin/ShenYin/Info.plist
index 2c22161..16b05a5 100644
--- a/ShenYin/ShenYin/Info.plist
+++ b/ShenYin/ShenYin/Info.plist
@@ -55,5 +55,7 @@
å
许APP使ç¨å®ä½æ¹ä¾¿æ¥æ¾è³æº
ITSAppUsesNonExemptEncryption
+ UIUserInterfaceStyle
+ Light
diff --git a/ShenYin/ShenYin/Launch/JoySdkManager.swift b/ShenYin/ShenYin/Launch/JoySdkManager.swift
index 5f7cd03..5d3425e 100644
--- a/ShenYin/ShenYin/Launch/JoySdkManager.swift
+++ b/ShenYin/ShenYin/Launch/JoySdkManager.swift
@@ -101,7 +101,13 @@ extension JoySdkManager : JoyGemChatManagerDelegate {
isTtsPlaying = false
PcmSound.sharedInstance().cleanup()
PcmSound.sharedInstance().setup(16000, withchannels: 1)
- let options: AVAudioSession.CategoryOptions = [.allowBluetooth]
+
+ var options: AVAudioSession.CategoryOptions = [.allowBluetooth]
+// if App.shared.isInBackground{
+// options = [.mixWithOthers]
+// }
+
+
do {
try AVAudioSession.sharedInstance().setCategory(.playback, options: [options])
try AVAudioSession.sharedInstance().setActive(true)
@@ -109,7 +115,6 @@ extension JoySdkManager : JoyGemChatManagerDelegate {
Logger.debug(error)
}
}
- // stateLabel.text = "æ£å¨å½é³"
break
case .stopRecord:
break
diff --git a/ShenYin/ShenYin/SDKBleManager/JLBleAssistManager.m b/ShenYin/ShenYin/SDKBleManager/JLBleAssistManager.m
index 92d2f7d..376d3fc 100644
--- a/ShenYin/ShenYin/SDKBleManager/JLBleAssistManager.m
+++ b/ShenYin/ShenYin/SDKBleManager/JLBleAssistManager.m
@@ -83,7 +83,7 @@ NSString *FLT_BLE_RCSP_R = @"AE02"; //å½ä»¤â读âéé
#pragma mark è®¾å¤æå¼è¿æ¥
- (void)centralManager:(CBCentralManager *)central didDisconnectPeripheral:(CBPeripheral *)peripheral error:(nullable NSError *)error {
- kJLLog(JLLOG_DEBUG, @"BLE Disconnect ---> Device %@ error:%d", peripheral.name, (int)error.code);
+// kJLLog(JLLOG_DEBUG, @"BLE Disconnect ---> Device %@ error:%d", peripheral.name, (int)error.code);
/*--- JLSDK ADD ---*/
[self.mAssist assistDisconnectPeripheral:peripheral];
@@ -99,7 +99,9 @@ NSString *FLT_BLE_RCSP_R = @"AE02"; //å½ä»¤â读âéé
#pragma mark 设å¤ç¹å¾åè°
- (void)peripheral:(CBPeripheral *)peripheral didDiscoverCharacteristicsForService:(CBService *)service error:(nullable NSError *)error {
- if (error) { kJLLog(JLLOG_DEBUG, @"Err: Discovered Characteristics fail."); return; }
+ if (error) {
+// kJLLog(JLLOG_DEBUG, @"Err: Discovered Characteristics fail."); return;
+ }
/*--- JLSDK ADD ---*/
[self.mAssist assistDiscoverCharacteristicsForService:service Peripheral:peripheral];
@@ -140,15 +142,15 @@ NSString *FLT_BLE_RCSP_R = @"AE02"; //å½ä»¤â读âéé
*/
- (void)getDeviceInfo:(GET_DEVICE_CALLBACK _Nonnull)callback {
__weak typeof(self) weakSelf = self;
- kJLLog(JLLOG_DEBUG, @"getDeviceInfo:%d",__LINE__);
+// kJLLog(JLLOG_DEBUG, @"getDeviceInfo:%d",__LINE__);
/*--- è·å设å¤ä¿¡æ¯ ---*/
[self.mAssist.mCmdManager cmdTargetFeatureResult:^(JL_CMDStatus status, uint8_t sn, NSData * _Nullable data) {
- kJLLog(JLLOG_DEBUG, @"getDeviceInfo:%d",__LINE__);
+// kJLLog(JLLOG_DEBUG, @"getDeviceInfo:%d",__LINE__);
if (status == JL_CMDStatusSuccess) {
JLModel_Device *model = [weakSelf.mAssist.mCmdManager outputDeviceModel];
JL_OtaStatus upSt = model.otaStatus;
if (upSt == JL_OtaStatusForce) {
- kJLLog(JLLOG_DEBUG, @"---> è¿å
¥å¼ºå¶å级.");
+// kJLLog(JLLOG_DEBUG, @"---> è¿å
¥å¼ºå¶å级.");
if (weakSelf.selectedOtaFilePath) {
[weakSelf otaFuncWithFilePath:weakSelf.selectedOtaFilePath];
} else {
@@ -157,7 +159,7 @@ NSString *FLT_BLE_RCSP_R = @"AE02"; //å½ä»¤â读âéé
return;
} else {
if (model.otaHeadset == JL_OtaHeadsetYES) {
- kJLLog(JLLOG_DEBUG, @"---> è¿å
¥å¼ºå¶å级: OTAå¦ä¸åªè³æº.");
+// kJLLog(JLLOG_DEBUG, @"---> è¿å
¥å¼ºå¶å级: OTAå¦ä¸åªè³æº.");
if (weakSelf.selectedOtaFilePath) {
[weakSelf otaFuncWithFilePath:weakSelf.selectedOtaFilePath];
} else {
@@ -166,14 +168,14 @@ NSString *FLT_BLE_RCSP_R = @"AE02"; //å½ä»¤â读âéé
return;
}
}
- kJLLog(JLLOG_DEBUG, @"---> è®¾å¤æ£å¸¸ä½¿ç¨...");
+// kJLLog(JLLOG_DEBUG, @"---> è®¾å¤æ£å¸¸ä½¿ç¨...");
[JL_Tools mainTask:^{
/*--- è·åå
Œ
±ä¿¡æ¯ ---*/
[weakSelf.mAssist.mCmdManager cmdGetSystemInfo:JL_FunctionCodeCOMMON Result:nil];
callback(false);
}];
} else {
- kJLLog(JLLOG_DEBUG, @"---> ERRORï¼è®¾å¤ä¿¡æ¯è·åé误!");
+// kJLLog(JLLOG_DEBUG, @"---> ERRORï¼è®¾å¤ä¿¡æ¯è·åé误!");
}
}];
}
@@ -183,7 +185,7 @@ NSString *FLT_BLE_RCSP_R = @"AE02"; //å½ä»¤â读âéé
* @param otaFilePath otaå级æä»¶è·¯å¾
*/
- (void)otaFuncWithFilePath:(NSString *)otaFilePath {
- kJLLog(JLLOG_DEBUG, @"current otaFilePath ---> %@", otaFilePath);
+// kJLLog(JLLOG_DEBUG, @"current otaFilePath ---> %@", otaFilePath);
self.selectedOtaFilePath = otaFilePath;
NSData *otaData = [[NSData alloc] initWithContentsOfFile:otaFilePath];
diff --git a/ShenYin/ShenYin/SDKBleManager/SDKBleHelper.h b/ShenYin/ShenYin/SDKBleManager/SDKBleHelper.h
deleted file mode 100644
index 0c983c3..0000000
--- a/ShenYin/ShenYin/SDKBleManager/SDKBleHelper.h
+++ /dev/null
@@ -1,22 +0,0 @@
-////
-//// SDKBleHelper.h
-//// JL_OTA
-////
-//// Created by EzioChan on 2022/10/12.
-//// Copyright © 2022 Zhuhia Jieli Technology. All rights reserved.
-////
-//
-//#import
-//#import
-//
-//NS_ASSUME_NONNULL_BEGIN
-//
-//@interface SDKBleHelper : NSObject
-//
-//+(NSMutableArray *)fitterHandle:(NSArray*)basicArray;
-//
-//
-//
-//@end
-//
-//NS_ASSUME_NONNULL_END
diff --git a/ShenYin/ShenYin/SDKBleManager/SDKBleHelper.m b/ShenYin/ShenYin/SDKBleManager/SDKBleHelper.m
deleted file mode 100644
index 9b51bf7..0000000
--- a/ShenYin/ShenYin/SDKBleManager/SDKBleHelper.m
+++ /dev/null
@@ -1,35 +0,0 @@
-////
-//// SDKBleHelper.m
-//// JL_OTA
-////
-//// Created by EzioChan on 2022/10/12.
-//// Copyright © 2022 Zhuhia Jieli Technology. All rights reserved.
-////
-//
-//#import "SDKBleHelper.h"
-//#import "FittingView.h"
-//#import
-//
-//@implementation SDKBleHelper
-//
-//+(NSMutableArray *)fitterHandle:(NSArray*)basicArray{
-// NSMutableArray *localArray = [NSMutableArray new];
-// NSString *key = [[FittingView getFitterKey] uppercaseString];
-// for (JL_EntityM *entity in basicArray) {
-// if ([key isEqualToString:@""]) {
-// [localArray addObject:entity];
-// }else{
-// if ([[entity.mItem uppercaseString] rangeOfString:key].location == NSNotFound || !entity.mItem) {
-// //
-// kJLLog(JLLOG_DEBUG, @"è¿æ»¤ ----> NAME:%@ RSSI:%@", entity.mItem,entity.mRSSI);
-// }else{
-// [localArray addObject:entity];
-// }
-// }
-// }
-// return localArray;
-//}
-//
-//
-//
-//@end
diff --git a/ShenYin/ShenYin/SDKBleManager/YLOtaManager.h b/ShenYin/ShenYin/SDKBleManager/YLOtaManager.h
deleted file mode 100644
index 32cd108..0000000
--- a/ShenYin/ShenYin/SDKBleManager/YLOtaManager.h
+++ /dev/null
@@ -1,49 +0,0 @@
-//
-// YLOtaManager.h
-// JL_OTA
-//
-// Created by suhailian on 2025/8/4.
-// Copyright © 2025 Zhuhia Jieli Technology. All rights reserved.
-//
-
-#import
-#import "HandleBroadcastPtl.h"
-#import
-#import
-#import
-#import
-#import
-
-typedef void(^GET_DEVICE_CALLBACK)(BOOL needForcedUpgrade);
-
-typedef void(^CANCEL_CALLBACK)(uint8_t status);
-
-NS_ASSUME_NONNULL_BEGIN
-
-@protocol YLOtaDelegate
-
-@required
-
-- (void)otaNeedSendToble:(NSData *)data;
-
-- (void)otaProgressWithOtaResult:(JL_OTAResult)result withProgress:(float)progress;
-
-- (void)otaCancel;
-
-- (void)pairResult:(BOOL)isSuccess;
-@end
-
-
-@interface YLOtaManager : HandleBroadcastPtl
-@property(nonatomic,weak)id delegate;
-
-
-- (void)startPair;
-
-- (void)otaFuncWithFilePath:(NSString *)otaFilePath;
-
-//æ¶å°ç¡¬ä»¶ä¼ è¿æ¥çæ°æ®
--(void)receiveOtaData:(NSData *)data;
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/ShenYin/ShenYin/SDKBleManager/YLOtaManager.m b/ShenYin/ShenYin/SDKBleManager/YLOtaManager.m
deleted file mode 100644
index 61c8f4a..0000000
--- a/ShenYin/ShenYin/SDKBleManager/YLOtaManager.m
+++ /dev/null
@@ -1,208 +0,0 @@
-//
-// YLOtaManager.m
-// JL_OTA
-//
-// Created by suhailian on 2025/8/4.
-// Copyright © 2025 Zhuhia Jieli Technology. All rights reserved.
-//
-
-#import "YLOtaManager.h"
-#import
-
-@interface YLOtaManager()
-
-@property (strong, nonatomic) JL_OTAManager *otaManager;
-@property (strong, nonatomic) JLHashHandler *pairHash;
-@property (strong, nonatomic) NSString *selectedOtaFilePath;
-@property (strong, nonatomic) GET_DEVICE_CALLBACK getCallback;
-
-/// è¿æ¥èçæ¯å¦éè¦è®¤è¯é
对
-@property (assign, nonatomic) BOOL isPaired;
-@property (assign, nonatomic) BOOL pairStatus;
-/// è¿æ¥è®¾å¤çMTUï¼å次æå¤§åéæ°æ®ï¼
-@property (assign, nonatomic) NSInteger bleMtu;
-@property (assign, nonatomic) NSData *pairKey;
-@end
-
-@implementation YLOtaManager
-
-- (instancetype)init {
- self = [super init];
- if (self) {
-
- _isPaired = YES;
- _pairStatus = NO;
- self.bleMtu = 182;
-
- /*--- JLSDK ADD ---*/
- _otaManager = [JL_OTAManager getOTAManager];
- [JL_OTAManager logSDKVersion];
- [JLHashHandler sdkVersion];
- [_otaManager logSendData:false];
-
- _otaManager.delegate = self;
- // è°è¯ä¸´æ¶æ·»å ç
-// _otaManager.mBLE_NAME = @"EB_002000008";
-// _otaManager.mBLE_UUID = @"C5A56B61-A90A-3869-096D-24B7710D338B";
- self.pairHash = [[JLHashHandler alloc] init];
- self.pairHash.delegate = self;
-
-
- }
- return self;
-}
-
-
-- (void)otaFuncCancel:(CANCEL_CALLBACK _Nonnull)result{
-
- [_otaManager cmdOTACancelResult:^(uint8_t status, uint8_t sn, NSData * _Nullable data) {
- result(status);
- }];
-}
-
-
-
-//MARK: - ota manager delegate callback
--(void)otaCancel{
- //TODO: åæ¶OTAå级åè°
- [self.delegate otaCancel];
-}
--(void)otaUpgradeResult:(JL_OTAResult)result Progress:(float)progress{
- //TODO: 设å¤å级è¿ç¨åè°ï¼å
æ¬è¿åº¦ç¶æ
-// [self.delegate otaProgressWithOtaResult:result withProgress:progress];
-}
-
--(void)otaDataSend:(NSData *)data{
- [self writeDataByCbp:data];
-}
-
--(void)otaFeatureResult:(JL_OTAManager *)manager{
-
- kJLLog(JLLOG_DEBUG, @"getDeviceInfo:%d",__LINE__);
- if (manager.otaStatus == JL_OtaStatusForce) {
- kJLLog(JLLOG_DEBUG, @"---> è¿å
¥å¼ºå¶å级.");
- if (self.selectedOtaFilePath) {
- [self otaFuncWithFilePath:self.selectedOtaFilePath];
- } else {
- _getCallback(true);
- }
- return;
- } else {
- if (manager.otaHeadset == JL_OtaHeadsetYES) {
- kJLLog(JLLOG_DEBUG, @"---> è¿å
¥å¼ºå¶å级: OTAå¦ä¸åªè³æº.");
- if (self.selectedOtaFilePath) {
- [self otaFuncWithFilePath:self.selectedOtaFilePath];
- } else {
- _getCallback(true);
- }
- return;
- }
- }
- kJLLog(JLLOG_DEBUG, @"---> è®¾å¤æ£å¸¸ä½¿ç¨...");
- dispatch_async(dispatch_get_main_queue(), ^{
- /*--- è·åå
Œ
±ä¿¡æ¯ ---*/
- [self->_otaManager cmdSystemFunction];
- self->_getCallback(false);
- });
-
-}
-
-//MARK: - Hash pair delegate callback
-
--(void)hashOnPairOutputData:(NSData *)data{
- [self writeDataByCbp:data];
-}
-
-/// éè¦åå
åé
-/// - Parameter data: æ°æ®
--(void)writeDataByCbp:(NSData *)data{
- NSInteger len = data.length;
- while (len>0) {
- if (len <= _bleMtu) {
- NSData *mtuData = [data subdataWithRange:NSMakeRange(0, data.length)];
- [self selectSendAction:mtuData];
- len -= data.length;
- }else{
- NSData *mtuData = [data subdataWithRange:NSMakeRange(0, _bleMtu)];
- [self selectSendAction:mtuData];
- len -= _bleMtu;
- data = [data subdataWithRange:NSMakeRange(_bleMtu, len)];
- }
- }
-}
-
-//åéç»èç设å¤
--(void)selectSendAction:(NSData *)data{
- [self.delegate otaNeedSendToble:data];
-}
-
-
-- (void)pairAction{
- __weak typeof(self) weakSelf = self;
-
- kJLLog(JLLOG_DEBUG, @"BLE ---> MTU:%lu",(unsigned long)self.bleMtu);
- if (self.isPaired == YES) {
- [_pairHash hashResetPair];
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
- //设å¤è®¤è¯
- [self->_pairHash bluetoothPairingKey:self.pairKey Result:^(BOOL ret) {
- if(ret){
- [weakSelf.otaManager noteEntityConnected];
- weakSelf.pairStatus = YES;
- [weakSelf.delegate pairResult:true];
- }else{
- kJLLog(JLLOG_DEBUG, @"JL_Assist Err: bluetooth pairing fail.");
- [weakSelf.delegate pairResult:false];
- }
- }];
- });
- }else{
- [self.otaManager noteEntityConnected];
- [weakSelf.delegate pairResult:true];
- }
-}
-
-
-- (void)startPair{
- [self pairAction];
-}
-
-- (void)otaFuncWithFilePath:(NSString *)otaFilePath {
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
- [self getDeviceInfo:^(BOOL needForcedUpgrade) {
- NSLog(needForcedUpgrade ? @"éè¦å级===" : @"ä¸éè¦å¼ºå¶å级===");
- [self startOta:otaFilePath];
- }];
- });
-}
-
-- (void)startOta:(NSString *)otaFilePath{
- kJLLog(JLLOG_DEBUG, @"current otaFilePath ---> %@", otaFilePath);
- self.selectedOtaFilePath = otaFilePath;
- NSData *otaData = [[NSData alloc] initWithContentsOfFile:otaFilePath];
- NSLog(@"åºä»¶æä»¶å¤§å°:%@",otaData);
- [_otaManager cmdOTAData:otaData Result:^(JL_OTAResult result, float progress) {
- if([self.delegate respondsToSelector:@selector(otaProgressWithOtaResult:withProgress:)]){
- [self.delegate otaProgressWithOtaResult:result withProgress:progress];
- }
- }];
-}
-
--(void)receiveOtaData:(NSData*)data{
- NSLog(@"ä¼ ç»sdkæ°æ® = %@",data);
-
- if(_isPaired == YES && _pairStatus == NO){
- //æ¶å°è®¾å¤ç认è¯äº¤äºæ°æ®
- [_pairHash inputPairData:data];
- }else{
- //æ¶å°çè®¾å¤æ°æ®ï¼æ£å¸¸éè®¯æ°æ®
- [_otaManager cmdOtaDataReceive:data];
- }
-}
-
-- (void)getDeviceInfo:(GET_DEVICE_CALLBACK _Nonnull)callback {
- /*--- è·å设å¤ä¿¡æ¯ ï¼è¯·æ±è®¾å¤ç¶æ---*/
- _getCallback = callback;
- [_otaManager cmdTargetFeature];
-}
-@end
diff --git a/ShenYin/ShenYin/SDKBleManager/YLOtaManager2.h b/ShenYin/ShenYin/SDKBleManager/YLOtaManager2.h
deleted file mode 100644
index 4451183..0000000
--- a/ShenYin/ShenYin/SDKBleManager/YLOtaManager2.h
+++ /dev/null
@@ -1,39 +0,0 @@
-////
-//// YLOtaManager.h
-//// JL_OTA
-////
-//// Created by liangshi on 2025/8/16.
-//// Copyright © 2025 Zhuhia Jieli Technology. All rights reserved.
-////
-//
-////#import
-////#import "HandleBroadcastPtl.h"
-//#import
-//
-//NS_ASSUME_NONNULL_BEGIN
-//
-//@protocol YLOtaDelegate
-//
-//@required
-//
-//
-//- (void)otaProgressWithOtaResult:(JL_OTAResult)result withProgress:(float)progress;
-//
-//- (void)otaCancel;
-//
-//@end
-//
-//
-//@interface YLOtaManager : NSObject
-//@property(nonatomic,weak)id delegate;
-//@property (strong, nonatomic) JL_BLEMultiple *mBleMultiple;
-//@property (weak, nonatomic) JL_EntityM *__nullable mBleEntityM;
-//
-//+ (instancetype)shared;
-//
-//
-//- (void)otaFuncWithFilePath:(NSString *)otaFilePath;
-//
-//@end
-//
-//NS_ASSUME_NONNULL_END
diff --git a/ShenYin/ShenYin/SDKBleManager/YLOtaManager2.m b/ShenYin/ShenYin/SDKBleManager/YLOtaManager2.m
deleted file mode 100644
index c895538..0000000
--- a/ShenYin/ShenYin/SDKBleManager/YLOtaManager2.m
+++ /dev/null
@@ -1,128 +0,0 @@
-////
-//// YLOtaManager.m
-//// JL_OTA
-////
-//// Created by suhailian on 2025/8/4.
-//// Copyright © 2025 Zhuhia Jieli Technology. All rights reserved.
-////
-//
-//#import "YLOtaManager2.h"
-//#import "JL_RunSDK.h"
-//#import "SDKBleHelper.h"
-//@interface YLOtaManager()
-//
-//@property (strong, nonatomic) NSString *otaFilePath;
-//@property (strong, nonatomic) NSString *connectUUID;
-//
-//@end
-//@implementation YLOtaManager
-//
-//+ (instancetype)shared {
-// static YLOtaManager *singleton = nil;
-// static dispatch_once_t onceToken;
-// dispatch_once(&onceToken, ^{
-// singleton = [[self alloc] init];
-// });
-// return singleton;
-//}
-//
-//
-//- (instancetype)init {
-// self = [super init];
-// if (self) {
-//
-// [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(allNoteListen:) name:nil object:nil];
-// }
-// return self;
-//}
-//
-//- (void)allNoteListen:(NSNotification*)note {
-// NSString *name = note.name;
-//
-// if([name isEqual:kJL_BLE_M_FOUND]){
-// NSArray *itemsArray = [note object];
-//// NSArray *list = [SDKBleHelper fitterHandle:itemsArray];
-// JL_EntityM *entity = [[JL_RunSDK sharedInstance] mBleEntityM];
-// if ( entity.mBLE_IS_PAIRED ) {
-//// [self.btEnityList insertObject:entity atIndex:0];
-// }
-// for (JL_EntityM *model in itemsArray) {
-// NSLog(@"%@",@"åç°è®¾å¤");
-// if ([@"EB_002111108" isEqualToString:model.mPeripheral.name]) {
-// JL_EntityM *selectedItem = model;
-// CBPeripheral *item = selectedItem.mPeripheral;
-//// if (item.state == CBPeripheralStateConnected || item.state == CBPeripheralStateConnecting) {
-//// return;
-//// }
-//// if (item.state == CBPeripheralStateConnected || item.state == CBPeripheralStateConnecting) {
-//// return;
-//// }
-// NSLog(@"%@",@"å¼å§è¿æ¥");
-// [JL_RunSDK sharedInstance].mBleMultiple.BLE_PAIR_ENABLE = true;
-// [[JL_RunSDK sharedInstance].mBleMultiple connectEntity:selectedItem Result:^(JL_EntityM_Status status) {
-// if(status == JL_EntityM_StatusPaired){
-// NSLog(@"%@",@"é
对æå");
-// }
-// }];
-// }
-// }
-// }
-//
-// if ([name isEqual:kJL_BLE_M_ENTITY_CONNECTED]) {
-// NSLog(@"%@",@"å·²è¿æ¥");
-// CBPeripheral *cpb = note.object;
-// NSArray *list = [JL_RunSDK sharedInstance].mBleMultiple.bleConnectedArr;
-// for (JL_EntityM *entity in list) {
-// if([entity.mPeripheral.identifier.UUIDString isEqualToString:cpb.identifier.UUIDString]){
-// [JL_RunSDK sharedInstance].mBleEntityM = entity;
-// break;
-// }
-// }
-// [JL_Tools delay:0.5 Task:^{
-// [[JL_RunSDK sharedInstance] getDeviceInfo:^(BOOL needForcedUpgrade) {
-// [[JL_RunSDK sharedInstance] otaFuncWithFilePath:self.otaFilePath];
-// }];
-// }];
-// }
-//
-// if ([name isEqual:kJL_BLE_M_ENTITY_DISCONNECTED]) {
-// NSLog(@"%@",@"æå¼è¿æ¥");
-// }
-//}
-//
-//- (void)startSearch{
-// NSMutableArray *mConnectArr = self.mBleMultiple.bleConnectedArr;
-// NSLog(@"å·²è¿æ¥==== %@",mConnectArr);
-// [[JL_RunSDK sharedInstance].mBleMultiple scanStart];
-//}
-//
-//- (void)otaFuncWithFilePath:(NSString *)otaFilePath{
-// self.otaFilePath = otaFilePath;
-// [JL_RunSDK sharedInstance].otaDelegate = self;
-// [self startSearch];
-//}
-//
-//- (void)otaProgressWithOtaResult:(JL_OTAResult)result withProgress:(float)progress {
-// if (result == JL_OTAResultUpgrading || result == JL_OTAResultPreparing) {
-// if (result == JL_OTAResultPreparing){
-// NSLog(@"%@",@"æ ¡éªæä»¶ä¸");
-// }
-// if (result == JL_OTAResultUpgrading){
-// NSLog(@"%@",@"æ£å¨å级");
-// }
-// } else if (result == JL_OTAResultPrepared) {
-// NSLog(@"---> æ£éªæä»¶ã宿ã");
-// } else if (result == JL_OTAResultReconnect) {
-// NSLog(@"---> OTAæ£å¨åè¿è®¾å¤... %@", [JL_RunSDK sharedInstance].mBleEntityM.mPeripheral.name);
-// } else if (result == JL_OTAResultReconnectWithMacAddr) {
-// NSLog(@"---> OTAæ£å¨éè¿Mac Addræ¹å¼åè¿è®¾å¤... %@", [JL_RunSDK sharedInstance].mBleEntityM.mPeripheral.name);
-// } else if (result == JL_OTAResultSuccess) {
-// NSLog(@"--->å级æå.");
-// } else if (result == JL_OTAResultReboot) {
-// NSLog(@"--->设å¤éå¯.");
-// } else {
-// // å
¶ä½é误ç è¯¦ç» Command+ç¹å»JL_OTAResult æ¥ç说æ
-// NSLog(@"ota update result: %d", result);
-// }
-//}
-//@end
diff --git a/ShenYin/ShenYin/ShenYin-Bridging-Header.h b/ShenYin/ShenYin/ShenYin-Bridging-Header.h
index e322d7d..3fc4e5b 100644
--- a/ShenYin/ShenYin/ShenYin-Bridging-Header.h
+++ b/ShenYin/ShenYin/ShenYin-Bridging-Header.h
@@ -9,5 +9,4 @@
#import "YLTimerButton.h"
#import "PcmSound.h"
#import
-#import "YLOtaManager.h"
#import "JLBleAssistManager.h"
diff --git a/ShenYin/ShenYin/UI/Home/Device/HomeDeviceVC.swift b/ShenYin/ShenYin/UI/Home/Device/HomeDeviceVC.swift
index 6c62d3c..1c576bb 100644
--- a/ShenYin/ShenYin/UI/Home/Device/HomeDeviceVC.swift
+++ b/ShenYin/ShenYin/UI/Home/Device/HomeDeviceVC.swift
@@ -9,6 +9,7 @@ import UIKit
class HomeDeviceVC:BaseVC{
private var collectionView:UICollectionView!
+ let imgView = UIImageView()
override func viewDidLoad() {
super.viewDidLoad()
@@ -30,7 +31,7 @@ class HomeDeviceVC:BaseVC{
layout.minimumLineSpacing = 18
layout.itemSize = CGSize(width: (kScreenWid-54)/2, height: 128)
collectionView = UICollectionView(frame: CGRect.zero, collectionViewLayout: layout)
- view.addSubview(collectionView)
+ view.addSubviews([imgView,collectionView])
collectionView.do { (v) in
v.dataSource = self
@@ -41,12 +42,19 @@ class HomeDeviceVC:BaseVC{
v.register(HomeDeviceCell.self, forCellWithReuseIdentifier: HomeDeviceCell.reuseID)
v.register(HomeHeadInfoView.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier:HomeHeadInfoView.reuseID )
}
+ imgView.do { v in
+// v.backgroundColor = .red
+ v.image = UIImage(named: "home_bg")
+ }
}
override func setupLayout() {
collectionView.snp.makeConstraints { (m) in
m.top.equalTo(kNavBtm)
m.left.right.bottom.equalToSuperview()
}
+ imgView.snp.makeConstraints { make in
+ make.edges.equalToSuperview()
+ }
}
func reloadData() {
DeviceVM.shared.refresh {[weak self] result in
diff --git a/ShenYin/ShenYin/UI/Sleep/AudioPlayView.swift b/ShenYin/ShenYin/UI/Sleep/AudioPlayView.swift
index 3282160..bd8db62 100644
--- a/ShenYin/ShenYin/UI/Sleep/AudioPlayView.swift
+++ b/ShenYin/ShenYin/UI/Sleep/AudioPlayView.swift
@@ -120,6 +120,7 @@ class AudioPlayView: BaseView {
}
@objc func closeAction(){
AudioPlayerManager.shared.pause()
+ self.isHidden = true
}
func show(){
self.isHidden = false
diff --git a/ShenYin/ShenYin/test.mp3 b/ShenYin/ShenYin/test.mp3
deleted file mode 100644
index 238e70d..0000000
Binary files a/ShenYin/ShenYin/test.mp3 and /dev/null differ