Commit be186d53 authored by lmj_521aiau@163.com's avatar lmj_521aiau@163.com

no message

parent 638d81ba
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
A950F5AF24F4E06E007AB63E /* SHMineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A950F5AE24F4E06E007AB63E /* SHMineViewController.swift */; }; A950F5AF24F4E06E007AB63E /* SHMineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A950F5AE24F4E06E007AB63E /* SHMineViewController.swift */; };
A950F5B124F4E080007AB63E /* Mine.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A950F5B024F4E080007AB63E /* Mine.storyboard */; }; A950F5B124F4E080007AB63E /* Mine.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A950F5B024F4E080007AB63E /* Mine.storyboard */; };
A950F5B624F4E64A007AB63E /* UIView+CornerRadii.m in Sources */ = {isa = PBXBuildFile; fileRef = A950F5B524F4E64A007AB63E /* UIView+CornerRadii.m */; }; A950F5B624F4E64A007AB63E /* UIView+CornerRadii.m in Sources */ = {isa = PBXBuildFile; fileRef = A950F5B524F4E64A007AB63E /* UIView+CornerRadii.m */; };
A959322F25245F4800968A92 /* NSString+Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = A959322E25245F4800968A92 /* NSString+Extensions.m */; };
A95A76872521D70F003B4E1C /* UIView+LayoutMethods.m in Sources */ = {isa = PBXBuildFile; fileRef = A95A76842521D70F003B4E1C /* UIView+LayoutMethods.m */; }; A95A76872521D70F003B4E1C /* UIView+LayoutMethods.m in Sources */ = {isa = PBXBuildFile; fileRef = A95A76842521D70F003B4E1C /* UIView+LayoutMethods.m */; };
A95A76882521D70F003B4E1C /* DDSoundWaveView.m in Sources */ = {isa = PBXBuildFile; fileRef = A95A76852521D70F003B4E1C /* DDSoundWaveView.m */; }; A95A76882521D70F003B4E1C /* DDSoundWaveView.m in Sources */ = {isa = PBXBuildFile; fileRef = A95A76852521D70F003B4E1C /* DDSoundWaveView.m */; };
A95B3FCB24F507A900FABDD1 /* SHDeleteDetailsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A95B3FCA24F507A900FABDD1 /* SHDeleteDetailsViewController.swift */; }; A95B3FCB24F507A900FABDD1 /* SHDeleteDetailsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A95B3FCA24F507A900FABDD1 /* SHDeleteDetailsViewController.swift */; };
...@@ -234,6 +235,8 @@ ...@@ -234,6 +235,8 @@
A950F5B524F4E64A007AB63E /* UIView+CornerRadii.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+CornerRadii.m"; sourceTree = "<group>"; }; A950F5B524F4E64A007AB63E /* UIView+CornerRadii.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+CornerRadii.m"; sourceTree = "<group>"; };
A954DD9125222C4600C2DDB6 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Main.strings"; sourceTree = "<group>"; }; A954DD9125222C4600C2DDB6 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Main.strings"; sourceTree = "<group>"; };
A954DD9225222C4600C2DDB6 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/LaunchScreen.strings"; sourceTree = "<group>"; }; A954DD9225222C4600C2DDB6 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/LaunchScreen.strings"; sourceTree = "<group>"; };
A959322D25245F4800968A92 /* NSString+Extensions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSString+Extensions.h"; sourceTree = "<group>"; };
A959322E25245F4800968A92 /* NSString+Extensions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSString+Extensions.m"; sourceTree = "<group>"; };
A95A76832521D70F003B4E1C /* DDSoundWaveView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDSoundWaveView.h; sourceTree = "<group>"; }; A95A76832521D70F003B4E1C /* DDSoundWaveView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDSoundWaveView.h; sourceTree = "<group>"; };
A95A76842521D70F003B4E1C /* UIView+LayoutMethods.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+LayoutMethods.m"; sourceTree = "<group>"; }; A95A76842521D70F003B4E1C /* UIView+LayoutMethods.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+LayoutMethods.m"; sourceTree = "<group>"; };
A95A76852521D70F003B4E1C /* DDSoundWaveView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDSoundWaveView.m; sourceTree = "<group>"; }; A95A76852521D70F003B4E1C /* DDSoundWaveView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDSoundWaveView.m; sourceTree = "<group>"; };
...@@ -757,8 +760,10 @@ ...@@ -757,8 +760,10 @@
A94DD57F24FE37DF00B1B5A2 /* UITextField+LimitLength.m */, A94DD57F24FE37DF00B1B5A2 /* UITextField+LimitLength.m */,
A950F5B424F4E64A007AB63E /* UIView+CornerRadii.h */, A950F5B424F4E64A007AB63E /* UIView+CornerRadii.h */,
A950F5B524F4E64A007AB63E /* UIView+CornerRadii.m */, A950F5B524F4E64A007AB63E /* UIView+CornerRadii.m */,
A95CE02D24E151340066DAE6 /* UIButton+Category.m */,
A95CE02E24E151340066DAE6 /* UIButton+Category.h */, A95CE02E24E151340066DAE6 /* UIButton+Category.h */,
A95CE02D24E151340066DAE6 /* UIButton+Category.m */,
A959322D25245F4800968A92 /* NSString+Extensions.h */,
A959322E25245F4800968A92 /* NSString+Extensions.m */,
); );
path = OC; path = OC;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1147,6 +1152,7 @@ ...@@ -1147,6 +1152,7 @@
A95CDFE724E0EE7A0066DAE6 /* SHGuideViewController.swift in Sources */, A95CDFE724E0EE7A0066DAE6 /* SHGuideViewController.swift in Sources */,
A950F5AC24F39EC1007AB63E /* SHRecordShowViewController.swift in Sources */, A950F5AC24F39EC1007AB63E /* SHRecordShowViewController.swift in Sources */,
A9A16C6A2519DD6900DE0FEE /* ChineseInclude.m in Sources */, A9A16C6A2519DD6900DE0FEE /* ChineseInclude.m in Sources */,
A959322F25245F4800968A92 /* NSString+Extensions.m in Sources */,
CC29A709251C71AC0059BD5C /* SHSwift.swift in Sources */, CC29A709251C71AC0059BD5C /* SHSwift.swift in Sources */,
A94DD57024FDF29700B1B5A2 /* XBAudioDataBuffer.m in Sources */, A94DD57024FDF29700B1B5A2 /* XBAudioDataBuffer.m in Sources */,
A95CDFC824E0EBF10066DAE6 /* UITabBar+Extension.swift in Sources */, A95CDFC824E0EBF10066DAE6 /* UITabBar+Extension.swift in Sources */,
......
...@@ -20,10 +20,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -20,10 +20,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
SHStoreManager.launchWithSwiftyStoreKit() SHStoreManager.launchWithSwiftyStoreKit()
UMConfigure.initWithAppkey("5f4f1164636b2b13182afc13", channel: "App Store") UMConfigure.initWithAppkey("5f4f1164636b2b13182afc13", channel: "App Store")
SHUserAccountManager.shared.getUserInfo({ (model) in
}, failure: {
})
MobClick.event("app_start") MobClick.event("app_start")
SHUserAccountManager.shared.logCollection(with: .appStart) SHUserAccountManager.shared.logCollection(with: .appStart)
......
//
// NSString+Extensions.h
// ShorthandMaster
//
// Created by 明津李 on 2020/9/30.
// Copyright © 2020 明津李. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface NSString (Extensions)
- (BOOL)isContainEmoji;
@end
NS_ASSUME_NONNULL_END
//
// NSString+Extensions.m
// ShorthandMaster
//
// Created by 明津李 on 2020/9/30.
// Copyright © 2020 明津李. All rights reserved.
//
#import "NSString+Extensions.h"
@implementation NSString (Extensions)
- (BOOL)isContainEmoji {
__block BOOL containsEmoji = NO;
[self enumerateSubstringsInRange:NSMakeRange(0,[self length])
options:NSStringEnumerationByComposedCharacterSequences
usingBlock:^(NSString *substring,
NSRange substringRange,
NSRange enclosingRange,
BOOL *stop) {
const unichar hs = [substring characterAtIndex:0];
// surrogate pair
if (0xd800 <= hs && hs <= 0xdbff) {
if (substring.length > 1) {
const unichar ls = [substring characterAtIndex:1];
const int uc = ((hs - 0xd800) * 0x400) + (ls - 0xdc00) + 0x10000;
if (0x1d000 <= uc && uc <= 0x1fa95) {
containsEmoji = YES;
}
}
}else if (substring.length > 1) {
const unichar ls = [substring characterAtIndex:1];
if (ls == 0x20e3 ||
ls == 0xfe0f ||
ls == 0xd83c) {
containsEmoji = YES;
}
} else {
// non surrogate
if (0x2100 <= hs && hs <= 0x27ff) {
containsEmoji = YES;
}else if (0x2B05 <= hs && hs <= 0x2b07) {
containsEmoji = YES;
} else if (0x2934 <= hs && hs <= 0x2935) {
containsEmoji = YES;
}else if (0x3297 <= hs && hs <= 0x3299) {
containsEmoji = YES;
}else if (hs == 0xa9 ||
hs == 0xae ||
hs == 0x303d ||
hs == 0x3030 ||
hs == 0x2b55 ||
hs == 0x2b1c ||
hs == 0x2b1b ||
hs == 0x2b50) {
containsEmoji = YES;
}
}
if (containsEmoji) {
*stop = YES;
}
}];
return containsEmoji;
}
@end
...@@ -37,12 +37,15 @@ ...@@ -37,12 +37,15 @@
</label> </label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="pga-Oe-RdW"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="pga-Oe-RdW">
<rect key="frame" x="268.5" y="43" width="100" height="36"/> <rect key="frame" x="268.5" y="43" width="100" height="36"/>
<constraints>
<constraint firstAttribute="width" constant="100" id="eGT-PR-dcF"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<state key="normal" title="立即解锁" backgroundImage="mine_goods_btn_bg"> <state key="normal" title="立即解锁" backgroundImage="mine_goods_btn_bg">
<color key="titleColor" red="0.17254901960784313" green="0.17254901960784313" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/> <color key="titleColor" red="0.17254901960784313" green="0.17254901960784313" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
</state> </state>
</button> </button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="解除限制,使用速记大师高级版" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jRc-7Y-1Ab"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="解除限制,使用速记大师高级版" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jRc-7Y-1Ab">
<rect key="frame" x="45.5" y="64.5" width="200" height="17"/> <rect key="frame" x="45.5" y="64.5" width="200" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.70588235294117641" green="0.72549019607843135" blue="0.76078431372549016" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.70588235294117641" green="0.72549019607843135" blue="0.76078431372549016" alpha="1" colorSpace="calibratedRGB"/>
...@@ -57,6 +60,7 @@ ...@@ -57,6 +60,7 @@
<constraint firstItem="pga-Oe-RdW" firstAttribute="centerY" secondItem="Dlc-aa-4II" secondAttribute="centerY" id="XOz-EB-0Yp"/> <constraint firstItem="pga-Oe-RdW" firstAttribute="centerY" secondItem="Dlc-aa-4II" secondAttribute="centerY" id="XOz-EB-0Yp"/>
<constraint firstItem="jRc-7Y-1Ab" firstAttribute="leading" secondItem="OKo-oR-OPp" secondAttribute="leading" id="YBo-cb-F6X"/> <constraint firstItem="jRc-7Y-1Ab" firstAttribute="leading" secondItem="OKo-oR-OPp" secondAttribute="leading" id="YBo-cb-F6X"/>
<constraint firstItem="Dlc-aa-4II" firstAttribute="width" secondItem="q9z-Kj-BbN" secondAttribute="width" multiplier="365:375" id="YxQ-qE-Yby"/> <constraint firstItem="Dlc-aa-4II" firstAttribute="width" secondItem="q9z-Kj-BbN" secondAttribute="width" multiplier="365:375" id="YxQ-qE-Yby"/>
<constraint firstItem="pga-Oe-RdW" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="jRc-7Y-1Ab" secondAttribute="trailing" constant="10" id="f9x-tl-f5t"/>
<constraint firstItem="Dlc-aa-4II" firstAttribute="centerX" secondItem="q9z-Kj-BbN" secondAttribute="centerX" id="hMY-yy-w8p"/> <constraint firstItem="Dlc-aa-4II" firstAttribute="centerX" secondItem="q9z-Kj-BbN" secondAttribute="centerX" id="hMY-yy-w8p"/>
<constraint firstItem="pga-Oe-RdW" firstAttribute="trailing" secondItem="Dlc-aa-4II" secondAttribute="trailing" constant="-40" id="voQ-wo-cl9"/> <constraint firstItem="pga-Oe-RdW" firstAttribute="trailing" secondItem="Dlc-aa-4II" secondAttribute="trailing" constant="-40" id="voQ-wo-cl9"/>
<constraint firstItem="OKo-oR-OPp" firstAttribute="centerY" secondItem="Dlc-aa-4II" secondAttribute="centerY" multiplier="0.66" id="yFN-6A-wS5"/> <constraint firstItem="OKo-oR-OPp" firstAttribute="centerY" secondItem="Dlc-aa-4II" secondAttribute="centerY" multiplier="0.66" id="yFN-6A-wS5"/>
......
...@@ -160,7 +160,6 @@ extension SHMineViewController:UITableViewDelegate, UITableViewDataSource{ ...@@ -160,7 +160,6 @@ extension SHMineViewController:UITableViewDelegate, UITableViewDataSource{
switch indexPath.row { switch indexPath.row {
case 0: case 0:
let webView = SHWebViewController() let webView = SHWebViewController()
print(SHUserAccountManager.shared.h5_urlDic["user"] as? String)
webView.url = SHUserAccountManager.shared.h5_urlDic["user"] as? String webView.url = SHUserAccountManager.shared.h5_urlDic["user"] as? String
webView.title = "用户协议" webView.title = "用户协议"
self.navigationController?.pushViewController(webView, animated: true) self.navigationController?.pushViewController(webView, animated: true)
......
...@@ -128,6 +128,14 @@ class SHRecordDetailsVC: SHBaseViewController { ...@@ -128,6 +128,14 @@ class SHRecordDetailsVC: SHBaseViewController {
self.tableView?.reloadData() self.tableView?.reloadData()
} }
} }
DispatchQueue.main.async {
if self.currentModel.dataSources.count == 0 {
self.navigationItem.rightBarButtonItem?.tintColor = UIColor.init(hexStr: "999999")
}else{
self.navigationItem.rightBarButtonItem?.tintColor = UIColor.init(hexStr: "4183F4")
}
}
} }
@objc func editClick(_ restore:Bool){ @objc func editClick(_ restore:Bool){
......
...@@ -62,6 +62,8 @@ class SHRecordListViewController: SHBaseViewController { ...@@ -62,6 +62,8 @@ class SHRecordListViewController: SHBaseViewController {
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
let s:Bool = "asdasdas🐂aadsasddadas".isContainEmoji()
SHCloudManager.shared.getAllFolderDataSource { (result, models) in SHCloudManager.shared.getAllFolderDataSource { (result, models) in
if result{ if result{
...@@ -284,11 +286,20 @@ class SHRecordListViewController: SHBaseViewController { ...@@ -284,11 +286,20 @@ class SHRecordListViewController: SHBaseViewController {
} }
@objc func preposeMember(){ @objc func preposeMember(){
SHUserAccountManager.shared.getUserInfo({ (model) in
SHUserAccountManager.shared.getNovelInfo { (json) in SHUserAccountManager.shared.getNovelInfo { (json) in
if SHUserAccountManager.shared.isMember == false && SHUserAccountManager.shared.isStartFront == true{ if SHUserAccountManager.shared.isMember == false && SHUserAccountManager.shared.isStartFront == true{
self.goGoods("home_pop") self.goGoods("home_pop")
} }
} }
self.advertBtn?.isHidden = SHUserAccountManager.shared.isMember
self.bottomHeight?.constant = SHUserAccountManager.shared.isMember ? 44 : 84
}, failure: {
})
} }
@IBAction func advertBtnClick(){ @IBAction func advertBtnClick(){
...@@ -318,6 +329,12 @@ extension SHRecordListViewController { ...@@ -318,6 +329,12 @@ extension SHRecordListViewController {
CRUserDefaults.recordList = list CRUserDefaults.recordList = list
} }
if deleteModel.dataSources.count == 0 {
SHCloudManager.shared.deleteFolder(deleteModel) { (result, models) in
}
}
self.dataSources.remove(at: indexPath.row) self.dataSources.remove(at: indexPath.row)
self.tableView?.beginUpdates() self.tableView?.beginUpdates()
self.tableView?.deleteRows(at: [indexPath], with: .left) self.tableView?.deleteRows(at: [indexPath], with: .left)
...@@ -351,12 +368,17 @@ extension SHRecordListViewController { ...@@ -351,12 +368,17 @@ extension SHRecordListViewController {
var subDic = dic var subDic = dic
subDic["name"] = renameStr subDic["name"] = renameStr
list[index] = subDic list[index] = subDic
selectModel.name = renameStr
break break
} }
} }
CRUserDefaults.recordList = list CRUserDefaults.recordList = list
} }
SHCloudManager.shared.modifyFolder(selectModel) { (result, models) in
}
DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(333)) { DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(333)) {
self.prepareDateSource() self.prepareDateSource()
} }
......
...@@ -116,7 +116,7 @@ class SHRecordMoveFileVC: SHBaseViewController { ...@@ -116,7 +116,7 @@ class SHRecordMoveFileVC: SHBaseViewController {
} }
} }
*/ */
if SHUserAccountManager.shared.isMember == false && self.dataSources.count > 0{ if SHUserAccountManager.shared.isMember == false && self.dataSources.count >= 0{
self.goGoods("new_notebook_add") self.goGoods("new_notebook_add")
return return
} }
......
...@@ -85,7 +85,7 @@ class SHCloudManager: NSObject { ...@@ -85,7 +85,7 @@ class SHCloudManager: NSObject {
}else{ }else{
self.folderResults = records ?? [] self.folderResults = records ?? []
self.getAllRecordDataSource(handler) self.getAllRecordDataSource(handler)
// self.cleanAllFolder() // self.cleanAllFolder()
} }
} }
} else { } else {
...@@ -115,7 +115,7 @@ class SHCloudManager: NSObject { ...@@ -115,7 +115,7 @@ class SHCloudManager: NSObject {
self.recordResults = records ?? [] self.recordResults = records ?? []
self.mapDataSource() self.mapDataSource()
self.completionHandler?(true, self.icloudFolderModels) self.completionHandler?(true, self.icloudFolderModels)
// self.cleanAllRecord() // self.cleanAllRecord()
} }
} }
} else { } else {
...@@ -343,6 +343,7 @@ class SHCloudManager: NSObject { ...@@ -343,6 +343,7 @@ class SHCloudManager: NSObject {
let nowDate = Date() let nowDate = Date()
record?["recordPaths"] = recordPaths record?["recordPaths"] = recordPaths
record?["modifyDate"] = nowDate record?["modifyDate"] = nowDate
record?["name"] = folderModel.name
self.dateBase.save(record!) { (saveRecord, saveError) in self.dateBase.save(record!) { (saveRecord, saveError) in
if let error = saveError { if let error = saveError {
......
...@@ -34,7 +34,7 @@ import SwiftyJSON ...@@ -34,7 +34,7 @@ import SwiftyJSON
@objc var isMember: Bool { @objc var isMember: Bool {
return true // return true
let dateFormatter = DateFormatter() let dateFormatter = DateFormatter()
dateFormatter.locale = Locale(identifier: "en_CN") dateFormatter.locale = Locale(identifier: "en_CN")
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#import "MBProgressHUD+MJ.h" #import "MBProgressHUD+MJ.h"
#import "AESCipher.h" #import "AESCipher.h"
#import "UIView+CornerRadii.h" #import "UIView+CornerRadii.h"
#import "NSString+Extensions.h"
#import "SHMp3RecordManager.h" #import "SHMp3RecordManager.h"
#import "SHMemberUpgradeAlertView.h" #import "SHMemberUpgradeAlertView.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment