Browse Source

Merge branch '推广版' of http://156.254.127.134:3000/tomy/JD_iOS into 推广版

lintong 3 tuần trước cách đây
mục cha
commit
bf04284551

+ 12 - 19
Koala/Koala.xcodeproj/project.pbxproj

@@ -473,7 +473,6 @@
 		65C829CF2BBA907D000E2837 /* SyntheticalViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65C829CE2BBA907D000E2837 /* SyntheticalViewModel.swift */; };
 		65ECEFD42B56CE38001B2BD9 /* TimerManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65ECEFD32B56CE38001B2BD9 /* TimerManager.swift */; };
 		6C00A877242D8FEA00CE9ADB /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C00A876242D8FEA00CE9ADB /* AppDelegate.swift */; };
-		6C00A87E242D8FEA00CE9ADB /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6C00A87C242D8FEA00CE9ADB /* Main.storyboard */; };
 		6C00A880242D8FEB00CE9ADB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6C00A87F242D8FEB00CE9ADB /* Assets.xcassets */; };
 		6C00A883242D8FEB00CE9ADB /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6C00A881242D8FEB00CE9ADB /* LaunchScreen.storyboard */; };
 		6C00A8B5242D916100CE9ADB /* UserInfoDataModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C00A8B1242D916100CE9ADB /* UserInfoDataModel.swift */; };
@@ -1238,9 +1237,7 @@
 		0409CA052AFE3C2E00103E9B /* CalenderStyle.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CalenderStyle.swift; sourceTree = "<group>"; };
 		0409CA0C2AFE3F3700103E9B /* JDCalendarPopView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JDCalendarPopView.swift; sourceTree = "<group>"; };
 		040C6FD02BB1612F00ADC431 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/LaunchScreen.strings; sourceTree = "<group>"; };
-		040C6FD12BB1615800ADC431 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Main.strings"; sourceTree = "<group>"; };
 		040C6FD22BB1615900ADC431 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/LaunchScreen.strings"; sourceTree = "<group>"; };
-		040C6FD32BB1617900ADC431 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/Main.strings"; sourceTree = "<group>"; };
 		040C6FD42BB1617900ADC431 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/LaunchScreen.strings"; sourceTree = "<group>"; };
 		040C6FD82BB172FF00ADC431 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
 		040C6FDB2BB1730800ADC431 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
@@ -1580,6 +1577,10 @@
 		406673192C1856500090561B /* JDKLineTradingSessionCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JDKLineTradingSessionCell.swift; sourceTree = "<group>"; };
 		4066731A2C1856500090561B /* JDKLineUpsDownsCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JDKLineUpsDownsCell.swift; sourceTree = "<group>"; };
 		4068A2DE2C0A112F005A3530 /* UIButton+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIButton+Extension.swift"; sourceTree = "<group>"; };
+		407779692C7CA9D90088F954 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = "<group>"; };
+		4077796B2C7CABE40088F954 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+		4077796C2C7CABE60088F954 /* th */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = th; path = th.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+		4077796D2C7CABE80088F954 /* vi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = vi; path = vi.lproj/InfoPlist.strings; sourceTree = "<group>"; };
 		407F94822C6110CB00933373 /* AppDelegate+ShortCut.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AppDelegate+ShortCut.swift"; sourceTree = "<group>"; };
 		40E536052C04835200F6EA29 /* BaseTableAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseTableAlertView.swift; sourceTree = "<group>"; };
 		40EA33662C074F3B0062AF9C /* LinkedFramesList.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LinkedFramesList.swift; sourceTree = "<group>"; };
@@ -1665,11 +1666,9 @@
 		679DC283B50509B42172D70F /* Pods-Koala.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Koala.debug.xcconfig"; path = "Target Support Files/Pods-Koala/Pods-Koala.debug.xcconfig"; sourceTree = "<group>"; };
 		6C00A873242D8FEA00CE9ADB /* Koala.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Koala.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		6C00A876242D8FEA00CE9ADB /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
-		6C00A87D242D8FEA00CE9ADB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
 		6C00A87F242D8FEB00CE9ADB /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
 		6C00A882242D8FEB00CE9ADB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
 		6C00A8B1242D916100CE9ADB /* UserInfoDataModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserInfoDataModel.swift; sourceTree = "<group>"; };
-		6C00A8BC242D918C00CE9ADB /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
 		6C00A8BD242D918C00CE9ADB /* ESTabBarItemMoreContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ESTabBarItemMoreContentView.swift; sourceTree = "<group>"; };
 		6C00A8BE242D918C00CE9ADB /* ESTabBarController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ESTabBarController.swift; sourceTree = "<group>"; };
 		6C00A8BF242D918C00CE9ADB /* ESTabBarItemContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ESTabBarItemContentView.swift; sourceTree = "<group>"; };
@@ -3346,7 +3345,6 @@
 				6C00A876242D8FEA00CE9ADB /* AppDelegate.swift */,
 				407F94822C6110CB00933373 /* AppDelegate+ShortCut.swift */,
 				6C00A87F242D8FEB00CE9ADB /* Assets.xcassets */,
-				6C00A87C242D8FEA00CE9ADB /* Main.storyboard */,
 				6C00A881242D8FEB00CE9ADB /* LaunchScreen.storyboard */,
 				6CA713392958781C0047F450 /* CountryCode.json */,
 				040C6FD92BB172FF00ADC431 /* InfoPlist.strings */,
@@ -5235,13 +5233,16 @@
 			};
 			buildConfigurationList = 6C00A86E242D8FEA00CE9ADB /* Build configuration list for PBXProject "Koala" */;
 			compatibilityVersion = "Xcode 9.3";
-			developmentRegion = en;
+			developmentRegion = "zh-Hans";
 			hasScannedForEncodings = 0;
 			knownRegions = (
 				en,
 				Base,
 				"zh-Hans",
 				"zh-Hant",
+				ru,
+				vi,
+				th,
 			);
 			mainGroup = 6C00A86A242D8FEA00CE9ADB;
 			productRefGroup = 6C00A874242D8FEA00CE9ADB /* Products */;
@@ -5498,7 +5499,6 @@
 				6C6B7DAC296B19D400067FA3 /* BaseListCurrencyHeaderView.xib in Resources */,
 				6CC37FBA298957350079FA5C /* DealHintViewController.xib in Resources */,
 				6CCAA1A92AEE918C000510FB /* DealSelectSymbolCell.xib in Resources */,
-				6C00A87E242D8FEA00CE9ADB /* Main.storyboard in Resources */,
 				6C10F0CE29DB08D900B79491 /* updateAPP008.png in Resources */,
 				6C10F0DE29DB08D900B79491 /* updateAPP054.png in Resources */,
 				6C50AB612A07FACC00699557 /* FiatWithdrawalRecordCell.xib in Resources */,
@@ -6505,20 +6505,13 @@
 				040C6FD82BB172FF00ADC431 /* en */,
 				040C6FDB2BB1730800ADC431 /* zh-Hant */,
 				040C6FDD2BB1733900ADC431 /* zh-Hans */,
+				4077796B2C7CABE40088F954 /* ru */,
+				4077796C2C7CABE60088F954 /* th */,
+				4077796D2C7CABE80088F954 /* vi */,
 			);
 			name = InfoPlist.strings;
 			sourceTree = "<group>";
 		};
-		6C00A87C242D8FEA00CE9ADB /* Main.storyboard */ = {
-			isa = PBXVariantGroup;
-			children = (
-				6C00A87D242D8FEA00CE9ADB /* Base */,
-				040C6FD12BB1615800ADC431 /* zh-Hans */,
-				040C6FD32BB1617900ADC431 /* zh-Hant */,
-			);
-			name = Main.storyboard;
-			sourceTree = "<group>";
-		};
 		6C00A881242D8FEB00CE9ADB /* LaunchScreen.storyboard */ = {
 			isa = PBXVariantGroup;
 			children = (
@@ -6533,7 +6526,7 @@
 		6C00A8BB242D918C00CE9ADB /* Localizable.strings */ = {
 			isa = PBXVariantGroup;
 			children = (
-				6C00A8BC242D918C00CE9ADB /* en */,
+				407779692C7CA9D90088F954 /* zh-Hans */,
 			);
 			name = Localizable.strings;
 			sourceTree = "<group>";

+ 0 - 16
Koala/Koala.xcworkspace/xcuserdata/mac.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -1708,21 +1708,5 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "61B66BF2-7DE5-4C3F-9D0D-94C9D67DB563"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "Koala/Modular/Public/VC/WebView/BaseWebViewController.swift"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "288"
-            endingLineNumber = "288"
-            landmarkName = "webView(_:decidePolicyFor:decisionHandler:)"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 3 - 1
Koala/Koala/Modular/Public/VC/WebView/BaseWebViewController.swift

@@ -300,7 +300,9 @@ extension BaseWebViewController: WKNavigationDelegate {
                 }
             } else {
                 print(url.absoluteString)
-                if UIApplication.shared.canOpenURL(url) && (url.absoluteString == "https://www.jdnx2.com/agentoffice") {
+                
+                let urlString = url.absoluteString
+                if UIApplication.shared.canOpenURL(url) && /*(url.absoluteString == "https://www.jdnx2.com/agentoffice")*/ urlString.contains("/agentoffice") {
                     let safariVC: SFSafariViewController = .init(url: url)
                     currentVc()?.navigationController?.present(safariVC, animated: true, completion: nil)
                     decisionHandler(.cancel)

+ 3 - 40
Koala/Koala/Other/AppDelegate+ShortCut.swift

@@ -8,51 +8,14 @@
 
 import Foundation
 
-import UIKit
-
 extension AppDelegate {
-
     func application(_ application: UIApplication, performActionFor shortcutItem: UIApplicationShortcutItem, completionHandler: @escaping (Bool) -> Void) {
-        if shortcutItem.type == "com.monthlycall.shortcut.update" {
-            DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
-//                if let itunesUrl = URL(string: kAppStore), UIApplication.shared.canOpenURL(itunesUrl) {
-//                    UIApplication.shared.open(itunesUrl, options: [:], completionHandler: nil)
-//                }
-            }
-            return
-        }
-
-        guard let vc = UIApplication.shared.windows.first?.rootViewController as? UITabBarController else {
+        guard let vc = currentVc() else {
             return
         }
 
-        if shortcutItem.type == "com.monthlycall.shortcut.charge" {
-//            let walletVC = XKAWalletController()
-//            XKACommonTool.pushToCurrentVc(walletVC, animated: false)
-        } else if shortcutItem.type == "com.monthlycall.shortcut.vip" {
-//            let vipVC = XKAVipController()
-//            XKACommonTool.pushToCurrentVc(vipVC, animated: false)
-        }
-    }
-
-    func handleSiriActivity(_ userActivity: NSUserActivity) -> Bool {
-        guard let vc = UIApplication.shared.windows.first?.rootViewController as? UITabBarController else {
-            return false
-        }
-
-        let tabVc = vc
-
-        if userActivity.activityType == "FriendIntent" {
-//            let friendVC = XKAFriendController(type: .friend)
-//            tabVc.selectedViewController?.navigationController?.pushViewController(friendVC, animated: false)
-        } else if userActivity.activityType == "ChargeIntent" {
-//            let walletVC = XKAWalletController()
-//            tabVc.selectedViewController?.navigationController?.pushViewController(walletVC, animated: false)
-        } else if userActivity.activityType == "VIPIntent" {
-//            let vipVC = XKAVipController()
-//            tabVc.selectedViewController?.navigationController?.pushViewController(vipVC, animated: false)
+        if shortcutItem.type == "jd.trader.shortcut.search" {
+            vc.navigationController?.pushViewController(MarketSearchViewController(), animated: true)
         }
-
-        return true
     }
 }

+ 11 - 0
Koala/Koala/Other/Info.plist

@@ -39,6 +39,17 @@
 	<string>需要写入相册权限,用以保存图片</string>
 	<key>NSPhotoLibraryUsageDescription</key>
 	<string>需要访问相册,以识别二维码,上传照片</string>
+	<key>UIApplicationShortcutItems</key>
+	<array>
+		<dict>
+			<key>UIApplicationShortcutItemIconType</key>
+			<string>UIApplicationShortcutIconTypeSearch</string>
+			<key>UIApplicationShortcutItemTitle</key>
+			<string>Shortcut-Search</string>
+			<key>UIApplicationShortcutItemType</key>
+			<string>jd.trader.shortcut.search</string>
+		</dict>
+	</array>
 	<key>UIBackgroundModes</key>
 	<array>
 		<string>remote-notification</string>

+ 2 - 1
Koala/Koala/Other/en.lproj/InfoPlist.strings

@@ -5,9 +5,10 @@
   Created by mac on 2024/3/25.
   Copyright © 2024 刘千军. All rights reserved.
 */
+
 "CFBundleDisplayName" = "JD Trader";
 "NSCameraUsageDescription" = "Need access to camera to scan QR code, take photos";
 "NSMicrophoneUsageDescription" = "Need access to microphone in order to record video, upload video";
 "NSPhotoLibraryAddUsageDescription" = "Requires write to album permissions to save images";
 "NSPhotoLibraryUsageDescription" = "Need to access album to identify QR code, upload photos";
-
+"Shortcut-Search" = "Search";

+ 6 - 4
Koala/Koala/Other/ru.lproj/InfoPlist.strings

@@ -5,9 +5,11 @@
   Created by mac on 2024/3/25.
   Copyright © 2024 刘千军. All rights reserved.
 */
+
 "CFBundleDisplayName" = "JD Trader";
-"NSCameraUsageDescription" = "Need access to camera to scan QR code, take photos";
-"NSMicrophoneUsageDescription" = "Need access to microphone in order to record video, upload video";
-"NSPhotoLibraryAddUsageDescription" = "Requires write to album permissions to save images";
-"NSPhotoLibraryUsageDescription" = "Need to access album to identify QR code, upload photos";
+"NSCameraUsageDescription" = "Требуется доступ к камере для сканирования QR-кода, фотографирования";
+"NSMicrophoneUsageDescription" = "Требуется доступ к микрофону для записи видео, загрузки видео";
+"NSPhotoLibraryAddUsageDescription" = "Необходимы разрешения на запись в альбом для сохранения изображений";
+"NSPhotoLibraryUsageDescription" = "Требуется доступ к альбому для распознавания QR-кода, загрузки фотографий";
+"Shortcut-Search" = "Поиск";
 

+ 0 - 0
Koala/Koala/Other/Base.lproj/Main.storyboard → Koala/Koala/Other/ru.lproj/Main.storyboard


+ 6 - 4
Koala/Koala/Other/th.lproj/InfoPlist.strings

@@ -5,9 +5,11 @@
   Created by mac on 2024/3/25.
   Copyright © 2024 刘千军. All rights reserved.
 */
+
 "CFBundleDisplayName" = "JD Trader";
-"NSCameraUsageDescription" = "Need access to camera to scan QR code, take photos";
-"NSMicrophoneUsageDescription" = "Need access to microphone in order to record video, upload video";
-"NSPhotoLibraryAddUsageDescription" = "Requires write to album permissions to save images";
-"NSPhotoLibraryUsageDescription" = "Need to access album to identify QR code, upload photos";
+"NSCameraUsageDescription" = "ต้องการเข้าถึงกล้องเพื่อสแกน QR โค้ดและถ่ายภาพ";
+"NSMicrophoneUsageDescription" = "ต้องการเข้าถึงไมโครโฟนเพื่อบันทึกวิดีโอและอัปโหลดวิดีโอ";
+"NSPhotoLibraryAddUsageDescription" = "ต้องการสิทธิ์ในการบันทึกลงอัลบั้มเพื่อบันทึกภาพ";
+"NSPhotoLibraryUsageDescription" = "ต้องการเข้าถึงอัลบั้มเพื่อระบุ QR โค้ดและอัปโหลดรูปภาพ";
+"Shortcut-Search" = "ค้นหา";
 

+ 6 - 4
Koala/Koala/Other/vi.lproj/InfoPlist.strings

@@ -5,9 +5,11 @@
   Created by mac on 2024/3/25.
   Copyright © 2024 刘千军. All rights reserved.
 */
+
 "CFBundleDisplayName" = "JD Trader";
-"NSCameraUsageDescription" = "Need access to camera to scan QR code, take photos";
-"NSMicrophoneUsageDescription" = "Need access to microphone in order to record video, upload video";
-"NSPhotoLibraryAddUsageDescription" = "Requires write to album permissions to save images";
-"NSPhotoLibraryUsageDescription" = "Need to access album to identify QR code, upload photos";
+"NSCameraUsageDescription" = "Cần quyền truy cập vào máy ảnh để quét mã QR và chụp ảnh";
+"NSMicrophoneUsageDescription" = "Cần quyền truy cập vào micro để ghi âm và tải lên video";
+"NSPhotoLibraryAddUsageDescription" = "Cần quyền ghi vào album để lưu hình ảnh";
+"NSPhotoLibraryUsageDescription" = "Cần quyền truy cập vào album để nhận diện mã QR và tải lên hình ảnh";
+"Shortcut-Search" = "Tìm kiếm";
 

+ 2 - 0
Koala/Koala/Other/zh-Hans.lproj/InfoPlist.strings

@@ -5,8 +5,10 @@
   Created by mac on 2024/3/25.
   Copyright © 2024 刘千军. All rights reserved.
 */
+
 "CFBundleDisplayName" = "极度";
 "NSCameraUsageDescription" = "需要访问相机,以扫描二维码,拍照";
 "NSMicrophoneUsageDescription" = "需要访问麦克风,以录制视频,上传视频";
 "NSPhotoLibraryAddUsageDescription" = "需要写入相册权限,用以保存图片";
 "NSPhotoLibraryUsageDescription" = "需要访问相册,以识别二维码,上传照片";
+"Shortcut-Search" = "搜索";

+ 0 - 1
Koala/Koala/Other/zh-Hans.lproj/Main.strings

@@ -1 +0,0 @@
-

+ 2 - 0
Koala/Koala/Other/zh-Hant.lproj/InfoPlist.strings

@@ -5,8 +5,10 @@
   Created by mac on 2024/3/25.
   Copyright © 2024 刘千军. All rights reserved.
 */
+
 "CFBundleDisplayName" = "極度";
 "NSCameraUsageDescription" = "需要訪問相機,以掃描二維碼,拍照";
 "NSMicrophoneUsageDescription" = "需要訪問麥克風,以錄製視頻,上傳視頻";
 "NSPhotoLibraryAddUsageDescription" = "需要寫入相冊權限,用以保存圖片";
 "NSPhotoLibraryUsageDescription" = "需要訪問相冊,以識別二維碼,上傳照片";
+"Shortcut-Search" = "搜索";

+ 0 - 1
Koala/Koala/Other/zh-Hant.lproj/Main.strings

@@ -1 +0,0 @@
-