提交 f069b58c authored 作者: 逄仁秀's avatar 逄仁秀

no message

上级 81ece978
...@@ -32,6 +32,10 @@ ...@@ -32,6 +32,10 @@
88B5B91C2B35804500871A63 /* KJChooseBankTVCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 88B5B91A2B35804500871A63 /* KJChooseBankTVCell.xib */; }; 88B5B91C2B35804500871A63 /* KJChooseBankTVCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 88B5B91A2B35804500871A63 /* KJChooseBankTVCell.xib */; };
88B5B91E2B43BCEB00871A63 /* KJBannerCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88B5B91D2B43BCEB00871A63 /* KJBannerCollectionViewCell.swift */; }; 88B5B91E2B43BCEB00871A63 /* KJBannerCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88B5B91D2B43BCEB00871A63 /* KJBannerCollectionViewCell.swift */; };
88B5B9212B454C2D00871A63 /* KJBannerModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88B5B9202B454C2D00871A63 /* KJBannerModel.swift */; }; 88B5B9212B454C2D00871A63 /* KJBannerModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88B5B9202B454C2D00871A63 /* KJBannerModel.swift */; };
88B5B9232B4648C700871A63 /* MainWebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88B5B9222B4648C700871A63 /* MainWebViewController.swift */; };
88B5B9262B464F7300871A63 /* KJCardManagerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88B5B9242B464F7300871A63 /* KJCardManagerViewController.swift */; };
88B5B9272B464F7300871A63 /* KJCardManagerViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 88B5B9252B464F7300871A63 /* KJCardManagerViewController.xib */; };
88B5B9292B468ACA00871A63 /* KJGotoPayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88B5B9282B468ACA00871A63 /* KJGotoPayView.swift */; };
88BE37D82AFCC15400D04877 /* KJHomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88BE37D62AFCC15400D04877 /* KJHomeViewController.swift */; }; 88BE37D82AFCC15400D04877 /* KJHomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88BE37D62AFCC15400D04877 /* KJHomeViewController.swift */; };
88BE37D92AFCC15400D04877 /* KJHomeViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 88BE37D72AFCC15400D04877 /* KJHomeViewController.xib */; }; 88BE37D92AFCC15400D04877 /* KJHomeViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 88BE37D72AFCC15400D04877 /* KJHomeViewController.xib */; };
88BE37DE2AFCC19F00D04877 /* KJChargeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88BE37DC2AFCC19F00D04877 /* KJChargeViewController.swift */; }; 88BE37DE2AFCC19F00D04877 /* KJChargeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88BE37DC2AFCC19F00D04877 /* KJChargeViewController.swift */; };
...@@ -121,6 +125,10 @@ ...@@ -121,6 +125,10 @@
88B5B91A2B35804500871A63 /* KJChooseBankTVCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KJChooseBankTVCell.xib; sourceTree = "<group>"; }; 88B5B91A2B35804500871A63 /* KJChooseBankTVCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KJChooseBankTVCell.xib; sourceTree = "<group>"; };
88B5B91D2B43BCEB00871A63 /* KJBannerCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KJBannerCollectionViewCell.swift; sourceTree = "<group>"; }; 88B5B91D2B43BCEB00871A63 /* KJBannerCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KJBannerCollectionViewCell.swift; sourceTree = "<group>"; };
88B5B9202B454C2D00871A63 /* KJBannerModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KJBannerModel.swift; sourceTree = "<group>"; }; 88B5B9202B454C2D00871A63 /* KJBannerModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KJBannerModel.swift; sourceTree = "<group>"; };
88B5B9222B4648C700871A63 /* MainWebViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainWebViewController.swift; sourceTree = "<group>"; };
88B5B9242B464F7300871A63 /* KJCardManagerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KJCardManagerViewController.swift; sourceTree = "<group>"; };
88B5B9252B464F7300871A63 /* KJCardManagerViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KJCardManagerViewController.xib; sourceTree = "<group>"; };
88B5B9282B468ACA00871A63 /* KJGotoPayView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KJGotoPayView.swift; sourceTree = "<group>"; };
88BE37D62AFCC15400D04877 /* KJHomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KJHomeViewController.swift; sourceTree = "<group>"; }; 88BE37D62AFCC15400D04877 /* KJHomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KJHomeViewController.swift; sourceTree = "<group>"; };
88BE37D72AFCC15400D04877 /* KJHomeViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KJHomeViewController.xib; sourceTree = "<group>"; }; 88BE37D72AFCC15400D04877 /* KJHomeViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KJHomeViewController.xib; sourceTree = "<group>"; };
88BE37DC2AFCC19F00D04877 /* KJChargeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KJChargeViewController.swift; sourceTree = "<group>"; }; 88BE37DC2AFCC19F00D04877 /* KJChargeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KJChargeViewController.swift; sourceTree = "<group>"; };
...@@ -313,6 +321,8 @@ ...@@ -313,6 +321,8 @@
88BE37DD2AFCC19F00D04877 /* KJChargeViewController.xib */, 88BE37DD2AFCC19F00D04877 /* KJChargeViewController.xib */,
88B5B9112B328F2400871A63 /* KJToRechargeViewController.swift */, 88B5B9112B328F2400871A63 /* KJToRechargeViewController.swift */,
88B5B9122B328F2400871A63 /* KJToRechargeViewController.xib */, 88B5B9122B328F2400871A63 /* KJToRechargeViewController.xib */,
88B5B9242B464F7300871A63 /* KJCardManagerViewController.swift */,
88B5B9252B464F7300871A63 /* KJCardManagerViewController.xib */,
88BE38212B0F307C00D04877 /* KJBigViewController.swift */, 88BE38212B0F307C00D04877 /* KJBigViewController.swift */,
88BE38222B0F307C00D04877 /* KJBigViewController.xib */, 88BE38222B0F307C00D04877 /* KJBigViewController.xib */,
88BE37E42AFCC21300D04877 /* KJTransferViewController.swift */, 88BE37E42AFCC21300D04877 /* KJTransferViewController.swift */,
...@@ -362,6 +372,7 @@ ...@@ -362,6 +372,7 @@
88B5B9192B35804500871A63 /* KJChooseBankTVCell.swift */, 88B5B9192B35804500871A63 /* KJChooseBankTVCell.swift */,
88B5B91A2B35804500871A63 /* KJChooseBankTVCell.xib */, 88B5B91A2B35804500871A63 /* KJChooseBankTVCell.xib */,
88B5B91D2B43BCEB00871A63 /* KJBannerCollectionViewCell.swift */, 88B5B91D2B43BCEB00871A63 /* KJBannerCollectionViewCell.swift */,
88B5B9282B468ACA00871A63 /* KJGotoPayView.swift */,
); );
path = view; path = view;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -378,6 +389,7 @@ ...@@ -378,6 +389,7 @@
88CCD5302AD15B6900639473 /* base */ = { 88CCD5302AD15B6900639473 /* base */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
88B5B9222B4648C700871A63 /* MainWebViewController.swift */,
88CCD5312AD15BD600639473 /* KJBaseViewController.swift */, 88CCD5312AD15BD600639473 /* KJBaseViewController.swift */,
88CCD53C2AD6720D00639473 /* KJHeaderObject.swift */, 88CCD53C2AD6720D00639473 /* KJHeaderObject.swift */,
); );
...@@ -497,6 +509,7 @@ ...@@ -497,6 +509,7 @@
883B01F02AC16CFD00C3ABBF /* LaunchScreen.storyboard in Resources */, 883B01F02AC16CFD00C3ABBF /* LaunchScreen.storyboard in Resources */,
88BE38102B0B3EA300D04877 /* KJHomeCollectionViewCell.xib in Resources */, 88BE38102B0B3EA300D04877 /* KJHomeCollectionViewCell.xib in Resources */,
88BE37D92AFCC15400D04877 /* KJHomeViewController.xib in Resources */, 88BE37D92AFCC15400D04877 /* KJHomeViewController.xib in Resources */,
88B5B9272B464F7300871A63 /* KJCardManagerViewController.xib in Resources */,
88BE37F32AFCC26100D04877 /* KJPDAMViewController.xib in Resources */, 88BE37F32AFCC26100D04877 /* KJPDAMViewController.xib in Resources */,
883B01ED2AC16CFD00C3ABBF /* Assets.xcassets in Resources */, 883B01ED2AC16CFD00C3ABBF /* Assets.xcassets in Resources */,
88BE38242B0F307C00D04877 /* KJBigViewController.xib in Resources */, 88BE38242B0F307C00D04877 /* KJBigViewController.xib in Resources */,
...@@ -615,11 +628,13 @@ ...@@ -615,11 +628,13 @@
88BE380F2B0B3EA300D04877 /* KJHomeCollectionViewCell.swift in Sources */, 88BE380F2B0B3EA300D04877 /* KJHomeCollectionViewCell.swift in Sources */,
88B5B9102B317CCF00871A63 /* KJAddBankCodeAlert.swift in Sources */, 88B5B9102B317CCF00871A63 /* KJAddBankCodeAlert.swift in Sources */,
88B5B90D2B304DF800871A63 /* KJChooseTableViewCell.swift in Sources */, 88B5B90D2B304DF800871A63 /* KJChooseTableViewCell.swift in Sources */,
88B5B9262B464F7300871A63 /* KJCardManagerViewController.swift in Sources */,
88BE381B2B0DCC3000D04877 /* KJAccountTableViewCell.swift in Sources */, 88BE381B2B0DCC3000D04877 /* KJAccountTableViewCell.swift in Sources */,
88B5B91B2B35804500871A63 /* KJChooseBankTVCell.swift in Sources */, 88B5B91B2B35804500871A63 /* KJChooseBankTVCell.swift in Sources */,
88B5B9162B32D5EB00871A63 /* KJRechargeModel.swift in Sources */, 88B5B9162B32D5EB00871A63 /* KJRechargeModel.swift in Sources */,
88BE37F22AFCC26100D04877 /* KJPDAMViewController.swift in Sources */, 88BE37F22AFCC26100D04877 /* KJPDAMViewController.swift in Sources */,
88B5B90A2B303F0800871A63 /* KJSingleChooseView.swift in Sources */, 88B5B90A2B303F0800871A63 /* KJSingleChooseView.swift in Sources */,
88B5B9292B468ACA00871A63 /* KJGotoPayView.swift in Sources */,
88BE37D82AFCC15400D04877 /* KJHomeViewController.swift in Sources */, 88BE37D82AFCC15400D04877 /* KJHomeViewController.swift in Sources */,
88BE382A2B1894F600D04877 /* KJPersonalViewController.swift in Sources */, 88BE382A2B1894F600D04877 /* KJPersonalViewController.swift in Sources */,
88B5B9182B34381000871A63 /* KJAddBankModel.swift in Sources */, 88B5B9182B34381000871A63 /* KJAddBankModel.swift in Sources */,
...@@ -631,6 +646,7 @@ ...@@ -631,6 +646,7 @@
88BE37DE2AFCC19F00D04877 /* KJChargeViewController.swift in Sources */, 88BE37DE2AFCC19F00D04877 /* KJChargeViewController.swift in Sources */,
88276FAD2B284AB0009BAE13 /* KJConfigParamModel.swift in Sources */, 88276FAD2B284AB0009BAE13 /* KJConfigParamModel.swift in Sources */,
883B01E82AC16CFC00C3ABBF /* ViewController.swift in Sources */, 883B01E82AC16CFC00C3ABBF /* ViewController.swift in Sources */,
88B5B9232B4648C700871A63 /* MainWebViewController.swift in Sources */,
88BE37FF2AFCCCB500D04877 /* KJDeviceInfo.swift in Sources */, 88BE37FF2AFCCCB500D04877 /* KJDeviceInfo.swift in Sources */,
88B5B9132B328F2400871A63 /* KJToRechargeViewController.swift in Sources */, 88B5B9132B328F2400871A63 /* KJToRechargeViewController.swift in Sources */,
883B01E42AC16CFC00C3ABBF /* AppDelegate.swift in Sources */, 883B01E42AC16CFC00C3ABBF /* AppDelegate.swift in Sources */,
......
...@@ -18,52 +18,36 @@ ...@@ -18,52 +18,36 @@
endingLineNumber = "190" endingLineNumber = "190"
landmarkName = "sureAction()" landmarkName = "sureAction()"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "F524BDAE-1E1F-44D5-AE5C-66108272416D"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "iOS-2kj/home/KJHomeViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "88"
endingLineNumber = "88"
landmarkName = "getData()"
landmarkType = "7">
<Locations> <Locations>
<Location <Location
uuid = "F524BDAE-1E1F-44D5-AE5C-66108272416D - 3300ef1b5f41f446" uuid = "852EE982-9260-4B98-BB63-A39D481130D0 - 18699f4fb98e8da4"
shouldBeEnabled = "Yes" shouldBeEnabled = "Yes"
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
symbolName = "closure #1 @Sendable (Swift.Optional&lt;Foundation.Data&gt;, Swift.Optional&lt;__C.NSURLResponse&gt;, Swift.Optional&lt;Swift.Error&gt;) -&gt; () in iOS_2kj.KJHomeViewController.getData() -&gt; ()" symbolName = "closure #1 @Sendable (Swift.Optional&lt;Foundation.Data&gt;, Swift.Optional&lt;__C.NSURLResponse&gt;, Swift.Optional&lt;Swift.Error&gt;) -&gt; () in iOS_2kj.KJAddBankCodeAlert.sureAction() -&gt; ()"
moduleName = "iOS-2kj" moduleName = "iOS-2kj"
usesParentBreakpointCondition = "Yes" usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/renxiupang/Documents/rire-tool/iOS-2kj/home/KJHomeViewController.swift" urlString = "file:///Users/renxiupang/Documents/rire-tool/iOS-2kj/home/view/KJAddBankCodeAlert.swift"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "89" startingLineNumber = "188"
endingLineNumber = "89" endingLineNumber = "188"
offsetFromSymbolStart = "600"> offsetFromSymbolStart = "712">
</Location> </Location>
<Location <Location
uuid = "F524BDAE-1E1F-44D5-AE5C-66108272416D - 3300ef1b5f41f439" uuid = "852EE982-9260-4B98-BB63-A39D481130D0 - 18699f4fb98e8d66"
shouldBeEnabled = "Yes" shouldBeEnabled = "Yes"
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
symbolName = "closure #1 @Sendable (Swift.Optional&lt;Foundation.Data&gt;, Swift.Optional&lt;__C.NSURLResponse&gt;, Swift.Optional&lt;Swift.Error&gt;) -&gt; () in iOS_2kj.KJHomeViewController.getData() -&gt; ()" symbolName = "closure #1 @Sendable (Swift.Optional&lt;Foundation.Data&gt;, Swift.Optional&lt;__C.NSURLResponse&gt;, Swift.Optional&lt;Swift.Error&gt;) -&gt; () in iOS_2kj.KJAddBankCodeAlert.sureAction() -&gt; ()"
moduleName = "iOS-2kj" moduleName = "iOS-2kj"
usesParentBreakpointCondition = "Yes" usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/renxiupang/Documents/rire-tool/iOS-2kj/home/KJHomeViewController.swift" urlString = "file:///Users/renxiupang/Documents/rire-tool/iOS-2kj/home/view/KJAddBankCodeAlert.swift"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "88" startingLineNumber = "190"
endingLineNumber = "88" endingLineNumber = "190"
offsetFromSymbolStart = "3632"> offsetFromSymbolStart = "1212">
</Location> </Location>
</Locations> </Locations>
</BreakpointContent> </BreakpointContent>
...@@ -71,47 +55,47 @@ ...@@ -71,47 +55,47 @@
<BreakpointProxy <BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent <BreakpointContent
uuid = "076956BE-CDC8-4508-9747-1FBE13E562BF" uuid = "9B032B8C-6F19-44E7-8A9C-C22D77B774A1"
shouldBeEnabled = "Yes" shouldBeEnabled = "Yes"
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
filePath = "iOS-2kj/home/subC/KJWithdrawViewController.swift" filePath = "iOS-2kj/home/subC/KJTransferViewController.swift"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "207" startingLineNumber = "143"
endingLineNumber = "207" endingLineNumber = "143"
landmarkName = "checkCode(param:)" landmarkName = "transferAction(_:)"
landmarkType = "7"> landmarkType = "7">
<Locations> <Locations>
<Location <Location
uuid = "076956BE-CDC8-4508-9747-1FBE13E562BF - 2e8e53d6c5875381" uuid = "9B032B8C-6F19-44E7-8A9C-C22D77B774A1 - 8d18ad34097b784a"
shouldBeEnabled = "Yes" shouldBeEnabled = "Yes"
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
symbolName = "closure #1 @Sendable (Swift.Optional&lt;Foundation.Data&gt;, Swift.Optional&lt;__C.NSURLResponse&gt;, Swift.Optional&lt;Swift.Error&gt;) -&gt; () in iOS_2kj.KJWithdrawViewController.checkCode() -&gt; ()" symbolName = "closure #1 @Sendable (Swift.Optional&lt;Foundation.Data&gt;, Swift.Optional&lt;__C.NSURLResponse&gt;, Swift.Optional&lt;Swift.Error&gt;) -&gt; () in iOS_2kj.KJTransferViewController.transferAction(Any) -&gt; ()"
moduleName = "iOS-2kj" moduleName = "iOS-2kj"
usesParentBreakpointCondition = "Yes" usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/renxiupang/Documents/rire-tool/iOS-2kj/home/subC/KJWithdrawViewController.swift" urlString = "file:///Users/renxiupang/Documents/rire-tool/iOS-2kj/home/subC/KJTransferViewController.swift"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "207" startingLineNumber = "143"
endingLineNumber = "207" endingLineNumber = "143"
offsetFromSymbolStart = "1212"> offsetFromSymbolStart = "1172">
</Location> </Location>
<Location <Location
uuid = "076956BE-CDC8-4508-9747-1FBE13E562BF - bea152a112446c7c" uuid = "9B032B8C-6F19-44E7-8A9C-C22D77B774A1 - 8d18ad34097b784a"
shouldBeEnabled = "Yes" shouldBeEnabled = "Yes"
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
symbolName = "closure #1 @Sendable (Swift.Optional&lt;Foundation.Data&gt;, Swift.Optional&lt;__C.NSURLResponse&gt;, Swift.Optional&lt;Swift.Error&gt;) -&gt; () in iOS_2kj.KJWithdrawViewController.checkCode(param: Swift.Dictionary&lt;Swift.String, Swift.String&gt;) -&gt; ()" symbolName = "closure #1 @Sendable (Swift.Optional&lt;Foundation.Data&gt;, Swift.Optional&lt;__C.NSURLResponse&gt;, Swift.Optional&lt;Swift.Error&gt;) -&gt; () in iOS_2kj.KJTransferViewController.transferAction(Any) -&gt; ()"
moduleName = "iOS-2kj" moduleName = "iOS-2kj"
usesParentBreakpointCondition = "Yes" usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/renxiupang/Documents/rire-tool/iOS-2kj/home/subC/KJWithdrawViewController.swift" urlString = "file:///Users/renxiupang/Documents/rire-tool/iOS-2kj/home/subC/KJTransferViewController.swift"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "207" startingLineNumber = "143"
endingLineNumber = "207" endingLineNumber = "143"
offsetFromSymbolStart = "1212"> offsetFromSymbolStart = "1896">
</Location> </Location>
</Locations> </Locations>
</BreakpointContent> </BreakpointContent>
......
//
// MainWebViewController.swift
// ios1
//
// Created by 仁秀逄 on 2023/1/3.
//
import UIKit
import WebKit
class MainWebViewController: KJBaseViewController {
var url: String = ""
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
titleL.text = "";
backBtn.setImage(UIImage(named: "icon_back_black"), for: .normal)
let config = WKWebViewConfiguration()
let webView = WKWebView(frame: CGRect(x: 0, y: StatusBar_Heigh + 44, width: kjWidth, height: kjHeight), configuration: config)
let string = url.replacingOccurrences(of: " ", with: "%20")
webView.load(URLRequest(url: URL(string: string)!))
view.addSubview(webView)
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
}
*/
}
...@@ -57,6 +57,16 @@ class KJHomeViewController: KJBaseViewController { ...@@ -57,6 +57,16 @@ class KJHomeViewController: KJBaseViewController {
} }
} }
@objc func cardManagerAction() {
if UserDefaults.standard.string(forKey: "token")?.count ?? 0 > 1 {
let vc = KJCardManagerViewController()
navigationController?.pushViewController(vc, animated: true)
} else {
let vc = KJLoginPhoneViewController()
navigationController?.pushViewController(vc, animated: true)
}
}
func getDictionaryFromJSONString(jsonString: String) -> NSDictionary { func getDictionaryFromJSONString(jsonString: String) -> NSDictionary {
// 将传入的 JSON 字符串 jsonString 使用 data(using:) 方法转换为 Data 类型 // 将传入的 JSON 字符串 jsonString 使用 data(using:) 方法转换为 Data 类型
let jsonData:Data = jsonString.data(using: .utf8)! let jsonData:Data = jsonString.data(using: .utf8)!
...@@ -116,7 +126,7 @@ class KJHomeViewController: KJBaseViewController { ...@@ -116,7 +126,7 @@ class KJHomeViewController: KJBaseViewController {
} }
extension KJHomeViewController: UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout { extension KJHomeViewController: UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, SDCycleScrollViewDelegate {
func numberOfSections(in collectionView: UICollectionView) -> Int { func numberOfSections(in collectionView: UICollectionView) -> Int {
return 3 return 3
} }
...@@ -139,6 +149,7 @@ extension KJHomeViewController: UICollectionViewDelegate, UICollectionViewDataSo ...@@ -139,6 +149,7 @@ extension KJHomeViewController: UICollectionViewDelegate, UICollectionViewDataSo
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "KJHomeHeaderCell", for: indexPath) as! KJHomeHeaderCell let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "KJHomeHeaderCell", for: indexPath) as! KJHomeHeaderCell
cell.accountBtn.addTarget(self, action: #selector(accountAction), for: .touchUpInside) cell.accountBtn.addTarget(self, action: #selector(accountAction), for: .touchUpInside)
cell.userBtn.addTarget(self, action: #selector(userAction), for: .touchUpInside) cell.userBtn.addTarget(self, action: #selector(userAction), for: .touchUpInside)
cell.cardManagerBtn.addTarget(self, action: #selector(cardManagerAction), for: .touchUpInside)
if UserDefaults.standard.string(forKey: "phone")?.count ?? 0 > 1 { if UserDefaults.standard.string(forKey: "phone")?.count ?? 0 > 1 {
cell.phoneL.text = UserDefaults.standard.string(forKey: "phone") ?? "登录" cell.phoneL.text = UserDefaults.standard.string(forKey: "phone") ?? "登录"
} else { } else {
...@@ -152,6 +163,7 @@ extension KJHomeViewController: UICollectionViewDelegate, UICollectionViewDataSo ...@@ -152,6 +163,7 @@ extension KJHomeViewController: UICollectionViewDelegate, UICollectionViewDataSo
for a in banner { for a in banner {
arr.append(a?.image ?? "") arr.append(a?.image ?? "")
} }
cell.bannerView.delegate = self
cell.bannerView.imageURLStringsGroup = arr cell.bannerView.imageURLStringsGroup = arr
return cell return cell
} }
...@@ -229,4 +241,10 @@ extension KJHomeViewController: UICollectionViewDelegate, UICollectionViewDataSo ...@@ -229,4 +241,10 @@ extension KJHomeViewController: UICollectionViewDelegate, UICollectionViewDataSo
} }
} }
} }
func cycleScrollView(_ cycleScrollView: SDCycleScrollView!, didSelectItemAt index: Int) {
let vc = MainWebViewController()
vc.url = banner[index]?.url ?? ""
navigationController?.pushViewController(vc, animated: true)
}
} }
...@@ -35,5 +35,8 @@ class KJConfigDataParamModel: HandyJSON { ...@@ -35,5 +35,8 @@ class KJConfigDataParamModel: HandyJSON {
var per_fee: String? var per_fee: String?
var prod_code: String? var prod_code: String?
var bank_code: String?
var bank_name: String?
required init() {} required init() {}
} }
...@@ -65,6 +65,9 @@ class KJBigViewController: KJBaseViewController { ...@@ -65,6 +65,9 @@ class KJBigViewController: KJBaseViewController {
jiantouLeft.constant = 15.0 + 11.0 + CGFloat(index ?? 0) * (kjWidth + 10) / 6.0 jiantouLeft.constant = 15.0 + 11.0 + CGFloat(index ?? 0) * (kjWidth + 10) / 6.0
transferVc.view.frame = CGRect(x: 0, y: 0, width: kjWidth, height: kjHeight - 152 - StatusBar_Heigh) transferVc.view.frame = CGRect(x: 0, y: 0, width: kjWidth, height: kjHeight - 152 - StatusBar_Heigh)
if index == 0 {
transferVc.loadUI()
}
scrollView.addSubview(transferVc.view) scrollView.addSubview(transferVc.view)
addChild(self.transferVc) addChild(self.transferVc)
......
//
// KJCardManagerViewController.swift
// iOS-2kj
//
// Created by 仁秀逄 on 2024/1/4.
//
import UIKit
class KJCardManagerViewController: KJBaseViewController {
var cardList: [KJCardListModel?] = []
@IBOutlet weak var tableView: UITableView!
@IBOutlet weak var tableHeight: NSLayoutConstraint!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
obtainList()
self.titleL.text = "卡管理"
tableView.delegate = self
tableView.dataSource = self
tableView.register(UINib(nibName: "KJChooseBankTVCell", bundle: nil), forCellReuseIdentifier: "KJChooseBankTVCell")
}
func obtainList() {
// 构建URL
let url:URL = URL(string: "https://www.danamudah.fun/kopisusu_server/convenience/bank_card")!
// 发送HTTP请求的的session对象
let session = URLSession.shared
// 构建请求request
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue(UserDefaults.standard.string(forKey: "token") ?? "", forHTTPHeaderField: "Token")
print(UserDefaults.standard.string(forKey: "token") ?? "")
var param = ["method": "list"]
var jsonData = NSData()
do {
jsonData = try JSONSerialization.data(withJSONObject: param, options: .prettyPrinted) as NSData
} catch {
print(error.localizedDescription)
}
request.httpBody = jsonData as! Data
// 发一个post请求
let task = session.dataTask(with: request as URLRequest) {(
data, response, error) in
guard let data = data, let _:URLResponse = response, error == nil else {
print("Request Erroor")
return
}
let dataString = String(data: data, encoding: String.Encoding.utf8)
let dict = self.getDictionaryFromJSONString(jsonString: dataString!)
print(dict)
if let arr = [KJCardListModel].deserialize(from: dict["ret"] as! NSArray) {
self.cardList = arr
DispatchQueue.main.async {
self.tableView.reloadData()
self.tableHeight.constant = CGFloat(86 * self.cardList.count)
}
}
}
task.resume()
}
func getDictionaryFromJSONString(jsonString: String) -> NSDictionary {
// 将传入的 JSON 字符串 jsonString 使用 data(using:) 方法转换为 Data 类型
let jsonData:Data = jsonString.data(using: .utf8)!
// 通过 JSONSerialization.jsonObject(with:options:) 方法将 jsonData 进行 JSON 解析,并将解析结果存储在 dict 变量中。这里使用的选项是 .mutableContainers,表示可以修改容器对象
let dict = try? JSONSerialization.jsonObject(with: jsonData, options: .mutableContainers)
// 使用条件语句判断 dict 是否为 nil。如果不为 nil,表示 JSON 解析成功,将 dict 强制转换为 NSDictionary 类型,并返回。
// 如果 dict 为 nil,表示 JSON 解析失败,返回一个空的 NSDictionary 对象。
if dict != nil {
return dict as! NSDictionary
}
return NSDictionary()
}
@IBAction func addNewCardAction(_ sender: Any) {
let alert = KJAddBankCodeAlert(frame: CGRect(x: 0, y: 0, width: kjWidth, height: kjHeight))
alert.refresh = {
self.obtainList()
}
alert.show()
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
}
*/
}
extension KJCardManagerViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return cardList.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "KJChooseBankTVCell") as! KJChooseBankTVCell
let model = cardList[indexPath.item]
cell.numL.text = model?.card_no
cell.titleL.text = model?.bank_name
cell.chooseImgV.isHidden = true
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 86
}
}
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="KJCardManagerViewController" customModule="iOS_2kj" customModuleProvider="target">
<connections>
<outlet property="tableHeight" destination="ehD-D8-9BY" id="KV5-hD-Oxg"/>
<outlet property="tableView" destination="OOt-Mr-hJF" id="J3j-1g-KWq"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="OOt-Mr-hJF">
<rect key="frame" x="15" y="129" width="363" height="88"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="88" id="ehD-D8-9BY"/>
</constraints>
</tableView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xiA-zm-An6">
<rect key="frame" x="137.33333333333334" y="237" width="118.66666666666666" height="35"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" image="plus-circle" title=" 添加新卡">
<attributedString key="attributedSubtitle"/>
<color key="baseForegroundColor" red="0.96470588239999999" green="0.63529411759999999" blue="0.1058823529" alpha="1" colorSpace="calibratedRGB"/>
</buttonConfiguration>
<connections>
<action selector="addNewCardAction:" destination="-1" eventType="touchUpInside" id="4rc-kV-LeC"/>
</connections>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="OOt-Mr-hJF" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="70" id="JNo-cS-hRB"/>
<constraint firstItem="xiA-zm-An6" firstAttribute="centerX" secondItem="fnl-2z-Ty3" secondAttribute="centerX" id="Lku-xs-NFs"/>
<constraint firstItem="OOt-Mr-hJF" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="15" id="YGK-RR-ubC"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="OOt-Mr-hJF" secondAttribute="trailing" constant="15" id="gJK-7I-K70"/>
<constraint firstItem="xiA-zm-An6" firstAttribute="top" secondItem="OOt-Mr-hJF" secondAttribute="bottom" constant="20" id="kwL-EA-iUo"/>
</constraints>
<point key="canvasLocation" x="114" y="-11"/>
</view>
</objects>
<resources>
<image name="plus-circle" width="21" height="21"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13142" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_0" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12042"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<objects> <objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="KJEmoneyViewController" customModuleProvider="target"> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="KJEmoneyViewController" customModule="iOS_2kj" customModuleProvider="target">
<connections> <connections>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections> </connections>
</placeholder> </placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT"> <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> <subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="charge_nxt" translatesAutoresizingMaskIntoConstraints="NO" id="l2G-FL-T9e">
<rect key="frame" x="284" y="18.5" width="6.5" height="10"/>
</imageView>
<textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Isikan dengan nomor rekening" textAlignment="right" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="WVk-JH-uj8">
<rect key="frame" x="90.5" y="77.5" width="194" height="18.5"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZNt-sL-lXk">
<rect key="frame" x="27" y="48" width="265" height="0.5"/>
<color key="backgroundColor" red="0.91764705879999997" green="0.91764705879999997" blue="0.91764705879999997" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="0.5" id="l7T-xR-ABt"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Produk E-Money" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ozu-9g-hG6">
<rect key="frame" x="29" y="14" width="114.5" height="19"/>
<constraints>
<constraint firstAttribute="height" constant="19" id="eOp-fb-CbE"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Isikan dengan nominal" textAlignment="right" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Big-ZG-MUu">
<rect key="frame" x="141" y="140.5" width="143.5" height="18.5"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oY7-yd-Akq">
<rect key="frame" x="27" y="111" width="265" height="0.5"/>
<color key="backgroundColor" red="0.91764705879999997" green="0.91764705879999997" blue="0.91764705879999997" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="0.5" id="B3W-Aq-YRZ"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PcA-TR-MbF">
<rect key="frame" x="27" y="174" width="265" height="0.5"/>
<color key="backgroundColor" red="0.91764705879999997" green="0.91764705879999997" blue="0.91764705879999997" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="0.5" id="tK2-gX-EZ1"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="29e-X7-iFk">
<rect key="frame" x="15" y="0.0" width="290" height="48"/>
<constraints>
<constraint firstAttribute="height" constant="48" id="s1H-Aq-6ll"/>
</constraints>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" title=" "/>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Nominal" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KzM-SH-jpU">
<rect key="frame" x="29" y="140" width="56" height="19"/>
<constraints>
<constraint firstAttribute="height" constant="19" id="VJ6-xH-qiK"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="GaZ-9X-rLO">
<rect key="frame" x="17" y="203.5" width="285" height="49"/>
<color key="backgroundColor" red="0.87843137250000003" green="0.87843137250000003" blue="0.87843137250000003" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="49" id="FLu-QI-9ub"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="15"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="Berikutnya"/>
</button>
<textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Pilih Produk..." textAlignment="right" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="pRH-ln-gdJ">
<rect key="frame" x="190" y="14.5" width="88.5" height="18.5"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</textField>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Nomor" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CZ2-Xa-HX7">
<rect key="frame" x="29" y="77" width="46.5" height="19"/>
<constraints>
<constraint firstAttribute="height" constant="19" id="ucP-j5-vKj"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/> <viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="oY7-yd-Akq" secondAttribute="trailing" constant="28" id="0Nt-NR-osy"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="WVk-JH-uj8" secondAttribute="trailing" constant="35.5" id="0e8-Cp-U2f"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="29e-X7-iFk" secondAttribute="trailing" constant="15" id="Awi-41-oZc"/>
<constraint firstItem="29e-X7-iFk" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="15" id="Ayk-D0-JT7"/>
<constraint firstItem="Big-ZG-MUu" firstAttribute="centerY" secondItem="KzM-SH-jpU" secondAttribute="centerY" id="CEU-Uo-ZFW"/>
<constraint firstItem="Ozu-9g-hG6" firstAttribute="centerY" secondItem="l2G-FL-T9e" secondAttribute="centerY" id="D3l-YX-rWq"/>
<constraint firstAttribute="trailing" secondItem="ZNt-sL-lXk" secondAttribute="trailing" constant="28" id="FGJ-y5-yLE"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="Big-ZG-MUu" secondAttribute="trailing" constant="35.5" id="FM5-Ku-eHD"/>
<constraint firstItem="PcA-TR-MbF" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="27" id="ITW-lc-ldh"/>
<constraint firstItem="KzM-SH-jpU" firstAttribute="top" secondItem="oY7-yd-Akq" secondAttribute="bottom" constant="28.5" id="J4g-Lu-ptd"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="l2G-FL-T9e" secondAttribute="trailing" constant="29.5" id="LBl-Ot-NBp"/>
<constraint firstItem="ZNt-sL-lXk" firstAttribute="top" secondItem="29e-X7-iFk" secondAttribute="bottom" id="LES-4Q-OAb"/>
<constraint firstItem="CZ2-Xa-HX7" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="29" id="RyP-oT-3NH"/>
<constraint firstItem="pRH-ln-gdJ" firstAttribute="centerY" secondItem="Ozu-9g-hG6" secondAttribute="centerY" id="TTI-Dd-r57"/>
<constraint firstAttribute="trailing" secondItem="PcA-TR-MbF" secondAttribute="trailing" constant="28" id="UMM-wq-juK"/>
<constraint firstItem="PcA-TR-MbF" firstAttribute="top" secondItem="oY7-yd-Akq" secondAttribute="bottom" constant="62.5" id="VNe-fJ-kYv"/>
<constraint firstItem="Ozu-9g-hG6" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="29" id="XrI-rB-lfA"/>
<constraint firstItem="CZ2-Xa-HX7" firstAttribute="top" secondItem="ZNt-sL-lXk" secondAttribute="bottom" constant="28.5" id="ZlD-kc-p4h"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="GaZ-9X-rLO" secondAttribute="trailing" constant="18" id="ZzH-vt-E9S"/>
<constraint firstItem="l2G-FL-T9e" firstAttribute="leading" secondItem="pRH-ln-gdJ" secondAttribute="trailing" constant="5.5" id="c00-22-I61"/>
<constraint firstItem="Ozu-9g-hG6" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" constant="14" id="cCi-9q-Zbz"/>
<constraint firstItem="KzM-SH-jpU" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="29" id="cKf-zY-Psz"/>
<constraint firstItem="ZNt-sL-lXk" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="27" id="e2Z-jc-Lz9"/>
<constraint firstItem="GaZ-9X-rLO" firstAttribute="top" secondItem="PcA-TR-MbF" secondAttribute="bottom" constant="29" id="fAh-zQ-cVg"/>
<constraint firstItem="GaZ-9X-rLO" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="17" id="my4-MW-Qsm"/>
<constraint firstItem="29e-X7-iFk" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="sho-Q9-9bf"/>
<constraint firstItem="oY7-yd-Akq" firstAttribute="top" secondItem="ZNt-sL-lXk" secondAttribute="bottom" constant="62.5" id="uPF-xd-Wqo"/>
<constraint firstItem="WVk-JH-uj8" firstAttribute="centerY" secondItem="CZ2-Xa-HX7" secondAttribute="centerY" id="v1B-E1-pXm"/>
<constraint firstItem="oY7-yd-Akq" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="27" id="yzv-qn-NcW"/>
</constraints>
<point key="canvasLocation" x="114" y="-11"/>
</view> </view>
</objects> </objects>
<resources>
<image name="charge_nxt" width="6.5" height="10"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document> </document>
...@@ -7,13 +7,18 @@ ...@@ -7,13 +7,18 @@
import UIKit import UIKit
class KJTransferViewController: KJBaseViewController { class KJTransferViewController: KJBaseViewController, UITextFieldDelegate {
@IBOutlet weak var firstTF: UITextField! @IBOutlet weak var firstTF: UITextField!
@IBOutlet weak var secondTF: UITextField! @IBOutlet weak var secondTF: UITextField!
@IBOutlet weak var thirdTF: UITextField! @IBOutlet weak var thirdTF: UITextField!
@IBOutlet weak var forthTF: UITextField! @IBOutlet weak var forthTF: UITextField!
@IBOutlet weak var transferBtn: UIButton! @IBOutlet weak var transferBtn: UIButton!
var bankCodeList: [KJBankCodeListModel?] = []
var chooseModel: KJBankCodeListModel?
var selectedIndex: Int = -1
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
...@@ -21,9 +26,126 @@ class KJTransferViewController: KJBaseViewController { ...@@ -21,9 +26,126 @@ class KJTransferViewController: KJBaseViewController {
navBack.isHidden = true navBack.isHidden = true
statusView.isHidden = true statusView.isHidden = true
backBtn.isHidden = true backBtn.isHidden = true
firstTF.delegate = self
thirdTF.delegate = self
forthTF.delegate = self
}
func loadUI() {
obtainData()
}
func obtainData() {
// 构建URL
let url:URL = URL(string: "https://www.danamudah.fun/kopisusu_server/convenience/bank_card")!
// 发送HTTP请求的的session对象
let session = URLSession.shared
// 构建请求request
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue(UserDefaults.standard.string(forKey: "token") ?? "", forHTTPHeaderField: "Token")
print(UserDefaults.standard.string(forKey: "token") ?? "")
var param = ["method": "code_list"]
var jsonData = NSData()
do {
jsonData = try JSONSerialization.data(withJSONObject: param, options: .prettyPrinted) as NSData
} catch {
print(error.localizedDescription)
}
request.httpBody = jsonData as! Data
// 发一个post请求
let task = session.dataTask(with: request as URLRequest) {(
data, response, error) in
guard let data = data, let _:URLResponse = response, error == nil else {
print("Request Erroor")
return
}
let dataString = String(data: data, encoding: String.Encoding.utf8)
let dict = self.getDictionaryFromJSONString(jsonString: dataString!)
print(dict)
if let arr = [KJBankCodeListModel].deserialize(from: dict["ret"] as! NSArray) {
self.bankCodeList = arr
}
}
task.resume()
}
func getDictionaryFromJSONString(jsonString: String) -> NSDictionary {
// 将传入的 JSON 字符串 jsonString 使用 data(using:) 方法转换为 Data 类型
let jsonData:Data = jsonString.data(using: .utf8)!
// 通过 JSONSerialization.jsonObject(with:options:) 方法将 jsonData 进行 JSON 解析,并将解析结果存储在 dict 变量中。这里使用的选项是 .mutableContainers,表示可以修改容器对象
let dict = try? JSONSerialization.jsonObject(with: jsonData, options: .mutableContainers)
// 使用条件语句判断 dict 是否为 nil。如果不为 nil,表示 JSON 解析成功,将 dict 强制转换为 NSDictionary 类型,并返回。
// 如果 dict 为 nil,表示 JSON 解析失败,返回一个空的 NSDictionary 对象。
if dict != nil {
return dict as! NSDictionary
}
return NSDictionary()
} }
@IBAction func bankAction(_ sender: Any) {
let alert = KJSingleChooseView(frame: CGRect(x: 0, y: 0, width: kjWidth, height: kjHeight))
alert.setBankCodeArray(arr: bankCodeList)
alert.setTitle(title: "选择银行")
alert.chooseBankComplete = {model, index in
self.selectedIndex = index
self.chooseModel = model
self.secondTF.text = model.bank_name
self.secondTF.textColor = UIColor(hex: "#333333")
if self.firstTF.text?.count ?? 0 > 0 && self.thirdTF.text?.count ?? 0 > 0 && self.forthTF.text?.count ?? 0 > 0 && self.selectedIndex > -1 {
self.transferBtn.backgroundColor = UIColor(hex: "#6747CD")
} else {
self.transferBtn.backgroundColor = UIColor(hex: "#E0E0E0")
}
}
alert.selectedInt = selectedIndex
alert.show()
}
func textFieldDidChangeSelection(_ textField: UITextField) {
if firstTF.text?.count ?? 0 > 0 && thirdTF.text?.count ?? 0 > 0 && forthTF.text?.count ?? 0 > 0 && selectedIndex > -1 {
transferBtn.backgroundColor = UIColor(hex: "#6747CD")
} else {
transferBtn.backgroundColor = UIColor(hex: "#E0E0E0")
}
}
@IBAction func transferAction(_ sender: Any) {
// 构建URL
let url:URL = URL(string: "https://www.danamudah.fun/kopisusu_server/convenience/inq_conv")!
// 发送HTTP请求的的session对象
let session = URLSession.shared
// 构建请求request
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue(UserDefaults.standard.string(forKey: "token") ?? "", forHTTPHeaderField: "Token")
print(UserDefaults.standard.string(forKey: "token") ?? "")
var param = ["prod_code": "TRS", "bank_code": chooseModel?.bank_code, "card_no": thirdTF.text ?? "", "amount": forthTF.text ?? ""] as [String : Any]
var jsonData = NSData()
do {
jsonData = try JSONSerialization.data(withJSONObject: param, options: .prettyPrinted) as NSData
} catch {
print(error.localizedDescription)
}
request.httpBody = jsonData as! Data
// 发一个post请求
let task = session.dataTask(with: request as URLRequest) {(
data, response, error) in
guard let data = data, let _:URLResponse = response, error == nil else {
print("Request Erroor")
return
}
let dataString = String(data: data, encoding: String.Encoding.utf8)
let dict = self.getDictionaryFromJSONString(jsonString: dataString!)
print(dict)
if let arr = [KJBankCodeListModel].deserialize(from: dict["ret"] as! NSArray) {
self.bankCodeList = arr
}
}
task.resume()
}
/* /*
// MARK: - Navigation // MARK: - Navigation
......
...@@ -76,6 +76,9 @@ ...@@ -76,6 +76,9 @@
</constraints> </constraints>
<state key="normal" title="Button"/> <state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" title=" "/> <buttonConfiguration key="configuration" style="plain" title=" "/>
<connections>
<action selector="bankAction:" destination="-1" eventType="touchUpInside" id="jAe-vi-p6r"/>
</connections>
</button> </button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="No. Rekening" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="REZ-9r-qND"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="No. Rekening" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="REZ-9r-qND">
<rect key="frame" x="29" y="139.5" width="91" height="19"/> <rect key="frame" x="29" y="139.5" width="91" height="19"/>
...@@ -121,6 +124,9 @@ ...@@ -121,6 +124,9 @@
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="15"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="15"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="Berikutnya"/> <state key="normal" title="Berikutnya"/>
<connections>
<action selector="transferAction:" destination="-1" eventType="touchUpInside" id="nqb-mk-mhJ"/>
</connections>
</button> </button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="e92-2H-hD4"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="e92-2H-hD4">
<rect key="frame" x="27.5" y="173.5" width="265" height="0.5"/> <rect key="frame" x="27.5" y="173.5" width="265" height="0.5"/>
......
//
// KJGotoPayView.swift
// iOS-2kj
//
// Created by 仁秀逄 on 2024/1/4.
//
import UIKit
class KJGotoPayView: UIView {
/*
// Only override draw() if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
override func draw(_ rect: CGRect) {
// Drawing code
}
*/
let whiteView = UIView(frame: CGRect(x: 0, y: kjHeight - 320 , width: kjWidth, height: 320))
let titleL = UILabel(frame: CGRect(x: 0, y: 26, width: kjWidth, height: 16))
let moneyL = UILabel(frame: CGRect(x: 0, y: 60, width: kjWidth, height: 30))
let yueBackView = UIView(frame: CGRect(x: 0, y: 115, width: kjWidth, height: 60))
let yueL = UILabel(frame: CGRect(x: 20, y: 0, width: kjWidth, height: 60))
let toRechargeBack = UIView(frame: CGRect(x: 0, y: 175, width: kjWidth, height: 60))
let toRechargeBtn = UIButton(type: .custom)
override init(frame: CGRect) {
super.init(frame: CGRect(x: 0, y: 0, width: kjWidth, height: kjHeight))
self.backgroundColor = UIColor(white: 0, alpha: 0.3)
addSubview(whiteView)
titleL.font = .systemFont(ofSize: 16)
titleL.textAlignment = .center
addSubview(titleL)
titleL.text = "支付金额"
moneyL.font = .systemFont(ofSize: 28, weight: .medium)
moneyL.textAlignment = .center
addSubview(moneyL)
addSubview(yueBackView)
yueBackView.backgroundColor = .white
yueBackView.addSubview(yueL)
yueL.textColor = UIColor(hex: "#333333")
yueL.font = .systemFont(ofSize: 16)
addSubview(toRechargeBack)
toRechargeBack.backgroundColor = .white
toRechargeBack.addSubview(toRechargeBtn)
toRechargeBtn.frame = CGRect(x: 20, y: 0, width: kjWidth - 35, height: 40)
toRechargeBtn.layer.cornerRadius = 5
toRechargeBtn.backgroundColor = UIColor(hex: "#EEEEEE")
let yuebuzu = UILabel(frame: CGRect(x: 35.0, y: 0, width: 100, height: 40))
toRechargeBack.addSubview(yuebuzu)
yuebuzu.textColor = UIColor(hex: "#6747CD")
yuebuzu.text = "余额不足"
yuebuzu.font = .systemFont(ofSize: 16)
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论