Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
rire-tool
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
逄仁秀
rire-tool
Commits
9d4ad50d
提交
9d4ad50d
authored
12月 22, 2023
作者:
逄仁秀
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
no message
上级
4e7ebb7d
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
243 行增加
和
18 行删除
+243
-18
project.pbxproj
iOS-2kj.xcodeproj/project.pbxproj
+8
-0
UserInterfaceState.xcuserstate
...ata/renxiupang.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
Breakpoints_v2.xcbkptlist
...nxiupang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
+18
-0
KJAddBankModel.swift
iOS-2kj/home/model/KJAddBankModel.swift
+12
-0
KJAccountViewController.swift
iOS-2kj/home/subC/KJAccountViewController.swift
+1
-0
KJWithdrawViewController.swift
iOS-2kj/home/subC/KJWithdrawViewController.swift
+43
-13
KJWithdrawViewController.xib
iOS-2kj/home/subC/KJWithdrawViewController.xib
+3
-0
KJAddBankCodeAlert.swift
iOS-2kj/home/view/KJAddBankCodeAlert.swift
+62
-1
KJChooseBankTVCell.swift
iOS-2kj/home/view/KJChooseBankTVCell.swift
+28
-0
KJChooseBankTVCell.xib
iOS-2kj/home/view/KJChooseBankTVCell.xib
+64
-0
KJSingleChooseView.swift
iOS-2kj/home/view/KJSingleChooseView.swift
+4
-4
没有找到文件。
iOS-2kj.xcodeproj/project.pbxproj
浏览文件 @
9d4ad50d
...
...
@@ -28,6 +28,8 @@
88B5B9142B328F2400871A63
/* KJToRechargeViewController.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
88B5B9122B328F2400871A63
/* KJToRechargeViewController.xib */
;
};
88B5B9162B32D5EB00871A63
/* KJRechargeModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
88B5B9152B32D5EB00871A63
/* KJRechargeModel.swift */
;
};
88B5B9182B34381000871A63
/* KJAddBankModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
88B5B9172B34381000871A63
/* KJAddBankModel.swift */
;
};
88B5B91B2B35804500871A63
/* KJChooseBankTVCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
88B5B9192B35804500871A63
/* KJChooseBankTVCell.swift */
;
};
88B5B91C2B35804500871A63
/* KJChooseBankTVCell.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
88B5B91A2B35804500871A63
/* KJChooseBankTVCell.xib */
;
};
88BE37D82AFCC15400D04877
/* KJHomeViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
88BE37D62AFCC15400D04877
/* KJHomeViewController.swift */
;
};
88BE37D92AFCC15400D04877
/* KJHomeViewController.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
88BE37D72AFCC15400D04877
/* KJHomeViewController.xib */
;
};
88BE37DE2AFCC19F00D04877
/* KJChargeViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
88BE37DC2AFCC19F00D04877
/* KJChargeViewController.swift */
;
};
...
...
@@ -113,6 +115,8 @@
88B5B9122B328F2400871A63
/* KJToRechargeViewController.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
KJToRechargeViewController.xib
;
sourceTree
=
"<group>"
;
};
88B5B9152B32D5EB00871A63
/* KJRechargeModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
KJRechargeModel.swift
;
sourceTree
=
"<group>"
;
};
88B5B9172B34381000871A63
/* KJAddBankModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
KJAddBankModel.swift
;
sourceTree
=
"<group>"
;
};
88B5B9192B35804500871A63
/* KJChooseBankTVCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
KJChooseBankTVCell.swift
;
sourceTree
=
"<group>"
;
};
88B5B91A2B35804500871A63
/* KJChooseBankTVCell.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
KJChooseBankTVCell.xib
;
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>"
;
};
88BE37DC2AFCC19F00D04877
/* KJChargeViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
KJChargeViewController.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -350,6 +354,8 @@
88B5B90B2B304DF800871A63
/* KJChooseTableViewCell.swift */
,
88B5B90C2B304DF800871A63
/* KJChooseTableViewCell.xib */
,
88B5B90F2B317CCF00871A63
/* KJAddBankCodeAlert.swift */
,
88B5B9192B35804500871A63
/* KJChooseBankTVCell.swift */
,
88B5B91A2B35804500871A63
/* KJChooseBankTVCell.xib */
,
);
path
=
view
;
sourceTree
=
"<group>"
;
...
...
@@ -501,6 +507,7 @@
88BE37EB2AFCC23300D04877
/* KJElectricityViewController.xib in Resources */
,
88BE37E72AFCC21300D04877
/* KJTransferViewController.xib in Resources */
,
88BE37DF2AFCC19F00D04877
/* KJChargeViewController.xib in Resources */
,
88B5B91C2B35804500871A63
/* KJChooseBankTVCell.xib in Resources */
,
88BE38182B0CB1B100D04877
/* KJAccountViewController.xib in Resources */
,
88BE38202B0DD83D00D04877
/* KJWithdrawViewController.xib in Resources */
,
88B5B9142B328F2400871A63
/* KJToRechargeViewController.xib in Resources */
,
...
...
@@ -602,6 +609,7 @@
88B5B9102B317CCF00871A63
/* KJAddBankCodeAlert.swift in Sources */
,
88B5B90D2B304DF800871A63
/* KJChooseTableViewCell.swift in Sources */
,
88BE381B2B0DCC3000D04877
/* KJAccountTableViewCell.swift in Sources */
,
88B5B91B2B35804500871A63
/* KJChooseBankTVCell.swift in Sources */
,
88B5B9162B32D5EB00871A63
/* KJRechargeModel.swift in Sources */
,
88BE37F22AFCC26100D04877
/* KJPDAMViewController.swift in Sources */
,
88B5B90A2B303F0800871A63
/* KJSingleChooseView.swift in Sources */
,
...
...
iOS-2kj.xcworkspace/xcuserdata/renxiupang.xcuserdatad/UserInterfaceState.xcuserstate
浏览文件 @
9d4ad50d
No preview for this file type
iOS-2kj.xcworkspace/xcuserdata/renxiupang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
浏览文件 @
9d4ad50d
...
...
@@ -3,4 +3,22 @@
uuid =
"083033CE-6D7A-4E6A-9037-453F99AE79A1"
type =
"0"
version =
"2.0"
>
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
uuid =
"852EE982-9260-4B98-BB63-A39D481130D0"
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"iOS-2kj/home/view/KJAddBankCodeAlert.swift"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"190"
endingLineNumber =
"190"
landmarkName =
"sureAction()"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
iOS-2kj/home/model/KJAddBankModel.swift
浏览文件 @
9d4ad50d
...
...
@@ -17,3 +17,15 @@ class KJBankCodeListModel: HandyJSON {
var
bank_name
:
String
?
required
init
()
{}
}
class
KJCardListModel
:
HandyJSON
{
var
bank_code
:
String
?
var
bank_name
:
String
?
var
card_no
:
String
?
var
create_time
:
String
?
var
id
:
String
?
var
update_time
:
String
?
var
user_id
:
String
?
var
valid
:
String
?
required
init
()
{}
}
iOS-2kj/home/subC/KJAccountViewController.swift
浏览文件 @
9d4ad50d
...
...
@@ -128,6 +128,7 @@ class KJAccountViewController: KJBaseViewController {
@IBAction
func
withdrawAction
(
_
sender
:
Any
)
{
let
vc
=
KJWithdrawViewController
()
vc
.
balance
=
balanceL
.
text
??
""
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
...
...
iOS-2kj/home/subC/KJWithdrawViewController.swift
浏览文件 @
9d4ad50d
...
...
@@ -8,32 +8,33 @@
import
UIKit
class
KJWithdrawViewController
:
KJBaseViewController
{
@IBOutlet
weak
var
balanceL
:
UILabel
!
var
balance
:
String
=
""
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.
obtainData
()
self
.
titleL
.
text
=
"提现"
}
func
obtainData
()
{
func
obtainList
()
{
// 构建URL
let
url
:
URL
=
URL
(
string
:
"https://www.danamudah.fun/kopisusu_server/convenience/
get_conv_param
"
)
!
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"
let
param
=
[
"method"
:
"transfer"
]
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
request
.
setValue
(
UserDefaults
.
standard
.
string
(
forKey
:
"token"
)
??
""
,
forHTTPHeaderField
:
"Token"
)
request
.
httpBody
=
jsonData
as!
Data
// 发一个post请求
let
task
=
session
.
dataTask
(
with
:
request
as
URLRequest
)
{(
data
,
response
,
error
)
in
...
...
@@ -44,9 +45,22 @@ class KJWithdrawViewController: KJBaseViewController {
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
}
}
task
.
resume
()
}
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
// Do any additional setup after loading the view.
obtainList
()
self
.
titleL
.
text
=
"提现"
balanceL
.
text
=
balance
}
func
getDictionaryFromJSONString
(
jsonString
:
String
)
->
NSDictionary
{
// 将传入的 JSON 字符串 jsonString 使用 data(using:) 方法转换为 Data 类型
...
...
@@ -63,6 +77,9 @@ class KJWithdrawViewController: KJBaseViewController {
@IBAction
func
addNewCardAction
(
_
sender
:
Any
)
{
let
alert
=
KJAddBankCodeAlert
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
kjWidth
,
height
:
kjHeight
))
alert
.
refresh
=
{
self
.
obtainList
()
}
alert
.
show
()
}
/*
...
...
@@ -76,3 +93,16 @@ class KJWithdrawViewController: KJBaseViewController {
*/
}
extension
KJWithdrawViewController
:
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
return
cell
}
}
iOS-2kj/home/subC/KJWithdrawViewController.xib
浏览文件 @
9d4ad50d
...
...
@@ -11,6 +11,9 @@
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"KJWithdrawViewController"
customModule=
"iOS_2kj"
customModuleProvider=
"target"
>
<connections>
<outlet
property=
"balanceL"
destination=
"a6Q-aQ-Vna"
id=
"GJq-tW-dge"
/>
<outlet
property=
"tableHeight"
destination=
"Q1Z-sD-XdS"
id=
"5K1-QG-q9c"
/>
<outlet
property=
"tableView"
destination=
"eVs-gj-gSe"
id=
"WtT-UR-GyR"
/>
<outlet
property=
"view"
destination=
"i5M-Pr-FkT"
id=
"sfx-zR-JGt"
/>
</connections>
</placeholder>
...
...
iOS-2kj/home/view/KJAddBankCodeAlert.swift
浏览文件 @
9d4ad50d
...
...
@@ -24,6 +24,11 @@ class KJAddBankCodeAlert: UIView {
let
bankCodeValueTF
=
UITextField
(
frame
:
CGRect
(
x
:
25.5
,
y
:
156
,
width
:
kjWidth
-
113
,
height
:
23
))
let
sureBtn
=
UIButton
(
type
:
.
custom
)
var
bankCodeList
:
[
KJBankCodeListModel
?]
=
[]
var
chooseModel
:
KJBankCodeListModel
?
var
selectedIndex
:
Int
=
-
1
var
refresh
:
()
->
Void
=
{}
func
obtainData
()
{
// 构建URL
let
url
:
URL
=
URL
(
string
:
"https://www.danamudah.fun/kopisusu_server/convenience/bank_card"
)
!
...
...
@@ -52,6 +57,9 @@ class KJAddBankCodeAlert: UIView {
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
()
}
...
...
@@ -94,6 +102,7 @@ class KJAddBankCodeAlert: UIView {
chooseBtn
.
backgroundColor
=
UIColor
(
hex
:
"#F9F9F9"
)
chooseBtn
.
layer
.
cornerRadius
=
5
chooseBtn
.
frame
=
CGRect
(
x
:
15
,
y
:
80
,
width
:
kjWidth
-
80
,
height
:
48
)
chooseBtn
.
addTarget
(
self
,
action
:
#selector(
chooseBank
)
,
for
:
.
touchUpInside
)
let
chooseL
=
UILabel
(
frame
:
CGRect
(
x
:
25.5
,
y
:
93.5
,
width
:
100
,
height
:
23
))
whiteView
.
addSubview
(
chooseL
)
...
...
@@ -128,7 +137,7 @@ class KJAddBankCodeAlert: UIView {
sureBtn
.
frame
=
CGRect
(
x
:
15
,
y
:
213
,
width
:
kjWidth
-
80
,
height
:
49
)
sureBtn
.
backgroundColor
=
UIColor
(
hex
:
"#6747CD"
)
sureBtn
.
setTitle
(
"确认"
,
for
:
.
normal
)
sureBtn
.
addTarget
(
self
,
action
:
#selector(
sureAction
)
,
for
:
.
touchUpInside
)
}
...
...
@@ -136,6 +145,58 @@ class KJAddBankCodeAlert: UIView {
fatalError
(
"init(coder:) has not been implemented"
)
}
@objc
func
chooseBank
()
{
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
.
bankLabel
.
text
=
model
.
bank_name
self
.
bankLabel
.
textColor
=
UIColor
(
hex
:
"#333333"
)
}
alert
.
selectedInt
=
selectedIndex
alert
.
show
()
}
@objc
func
sureAction
()
{
// 构建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"
:
"add"
,
"card_no"
:
bankCodeValueTF
.
text
??
""
,
"bank_name"
:
chooseModel
?
.
bank_name
,
"bank_code"
:
chooseModel
?
.
bank_code
]
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
(
dict
.
allKeys
as
NSArray
)
.
contains
(
"success"
)
==
true
{
DispatchQueue
.
main
.
async
{
self
.
refresh
()
self
.
dismiss
()
}
}
}
task
.
resume
()
}
func
show
()
{
let
window
=
UIApplication
.
shared
.
delegate
?
.
window
as!
UIView
window
.
addSubview
(
self
)
...
...
iOS-2kj/home/view/KJChooseBankTVCell.swift
0 → 100644
浏览文件 @
9d4ad50d
//
// KJChooseBankTVCell.swift
// iOS-2kj
//
// Created by 仁秀逄 on 2023/12/22.
//
import
UIKit
class
KJChooseBankTVCell
:
UITableViewCell
{
@IBOutlet
weak
var
titleL
:
UILabel
!
@IBOutlet
weak
var
numL
:
UILabel
!
@IBOutlet
weak
var
chooseImgV
:
UIImageView
!
override
func
awakeFromNib
()
{
super
.
awakeFromNib
()
// Initialization code
}
override
func
setSelected
(
_
selected
:
Bool
,
animated
:
Bool
)
{
super
.
setSelected
(
selected
,
animated
:
animated
)
// Configure the view for the selected state
}
}
iOS-2kj/home/view/KJChooseBankTVCell.xib
0 → 100644
浏览文件 @
9d4ad50d
<?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=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
/>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<tableViewCell
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
rowHeight=
"84"
id=
"KGk-i7-Jjw"
customClass=
"KJChooseBankTVCell"
customModule=
"iOS_2kj"
customModuleProvider=
"target"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"320"
height=
"84"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"KGk-i7-Jjw"
id=
"H2p-sc-9uM"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"320"
height=
"84"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<subviews>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"Label"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"udK-lT-nHl"
>
<rect
key=
"frame"
x=
"13.666666666666664"
y=
"20"
width=
"42"
height=
"16"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"16"
id=
"0hr-OC-rZC"
/>
</constraints>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"17"
/>
<color
key=
"textColor"
red=
"0.59999999999999998"
green=
"0.59999999999999998"
blue=
"0.59999999999999998"
alpha=
"0.84705882352941175"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"Label"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"adh-h2-dq2"
>
<rect
key=
"frame"
x=
"13.666666666666664"
y=
"45"
width=
"49"
height=
"23"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"23"
id=
"Yu1-Oo-f7o"
/>
</constraints>
<fontDescription
key=
"fontDescription"
type=
"system"
weight=
"medium"
pointSize=
"20"
/>
<nil
key=
"textColor"
/>
<nil
key=
"highlightedColor"
/>
</label>
<imageView
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFit"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"vVY-MZ-BG8"
>
<rect
key=
"frame"
x=
"286"
y=
"32.666666666666664"
width=
"18.666666666666686"
height=
"18.666666666666664"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"18.5"
id=
"Iai-SP-lRr"
/>
<constraint
firstAttribute=
"width"
constant=
"18.5"
id=
"roe-rz-6MD"
/>
</constraints>
</imageView>
</subviews>
<constraints>
<constraint
firstItem=
"udK-lT-nHl"
firstAttribute=
"top"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"top"
constant=
"20"
id=
"Ara-TI-Bi6"
/>
<constraint
firstItem=
"vVY-MZ-BG8"
firstAttribute=
"centerY"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"centerY"
id=
"HB5-7B-6TA"
/>
<constraint
firstItem=
"udK-lT-nHl"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"13.5"
id=
"ITD-OE-Lu4"
/>
<constraint
firstItem=
"adh-h2-dq2"
firstAttribute=
"top"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"top"
constant=
"45"
id=
"OmA-Vv-mmB"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"vVY-MZ-BG8"
secondAttribute=
"trailing"
constant=
"15.5"
id=
"R6d-6d-N95"
/>
<constraint
firstItem=
"adh-h2-dq2"
firstAttribute=
"leading"
secondItem=
"H2p-sc-9uM"
secondAttribute=
"leading"
constant=
"13.5"
id=
"xvK-47-IXs"
/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide
key=
"safeArea"
id=
"njF-e1-oar"
/>
<connections>
<outlet
property=
"chooseImgV"
destination=
"vVY-MZ-BG8"
id=
"XxC-6g-Naw"
/>
<outlet
property=
"numL"
destination=
"adh-h2-dq2"
id=
"nTb-oM-u5l"
/>
<outlet
property=
"titleL"
destination=
"udK-lT-nHl"
id=
"A5C-zW-2oW"
/>
</connections>
<point
key=
"canvasLocation"
x=
"126.71755725190839"
y=
"2.8169014084507045"
/>
</tableViewCell>
</objects>
</document>
iOS-2kj/home/view/KJSingleChooseView.swift
浏览文件 @
9d4ad50d
...
...
@@ -15,7 +15,7 @@ class KJSingleChooseView: UIView {
let
titleLabel
=
UILabel
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
kjWidth
,
height
:
66
))
var
accountArr
:
[
KJConfigDataParamModel
]
=
[]
var
bankcodeArr
:
[
KJBankCodeListModel
]
=
[]
var
bankcodeArr
:
[
KJBankCodeListModel
?
]
=
[]
var
chooseComplete
:
(
_
model
:
KJConfigDataParamModel
,
_
index
:
Int
)
->
Void
=
{
_
,
_
in
}
var
chooseBankComplete
:
(
_
model
:
KJBankCodeListModel
,
_
index
:
Int
)
->
Void
=
{
_
,
_
in
}
...
...
@@ -56,7 +56,7 @@ class KJSingleChooseView: UIView {
fatalError
(
"init(coder:) has not been implemented"
)
}
func
setBankCodeArray
(
arr
:
[
KJBankCodeListModel
])
{
func
setBankCodeArray
(
arr
:
[
KJBankCodeListModel
?
])
{
bankcodeArr
=
arr
tableView
.
reloadData
()
}
...
...
@@ -97,7 +97,7 @@ extension KJSingleChooseView: UITableViewDelegate, UITableViewDataSource {
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"KJChooseTableViewCell"
)
as!
KJChooseTableViewCell
if
bankcodeArr
.
count
>
0
{
let
model
=
bankcodeArr
[
indexPath
.
row
]
cell
.
titleL
.
text
=
model
.
bank_name
cell
.
titleL
.
text
=
model
?
.
bank_name
}
else
{
let
model
=
accountArr
[
indexPath
.
row
]
cell
.
titleL
.
text
=
model
.
name
...
...
@@ -119,7 +119,7 @@ extension KJSingleChooseView: UITableViewDelegate, UITableViewDataSource {
tableView
.
reloadData
()
if
bankcodeArr
.
count
>
0
{
chooseBankComplete
(
bankcodeArr
[
selectedInt
],
selectedInt
)
chooseBankComplete
(
bankcodeArr
[
selectedInt
]
??
KJBankCodeListModel
()
,
selectedInt
)
}
else
{
chooseComplete
(
accountArr
[
selectedInt
],
selectedInt
)
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论