Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
GeliBusinessPlatform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ljy
GeliBusinessPlatform
Commits
81bb2a0a
Commit
81bb2a0a
authored
May 22, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善地址选择
parent
804f9118
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
9 deletions
+29
-9
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/SceneDelegate.swift
GeliBusinessPlatform/SceneDelegate.swift
+2
-2
GeliBusinessPlatform/View/Cell/DKXDAdrCell.xib
GeliBusinessPlatform/View/Cell/DKXDAdrCell.xib
+1
-1
GeliBusinessPlatform/ViewController/代客下单(购物)/DaiKeXiaDanGouWuViewController.swift
...wController/代客下单(购物)/DaiKeXiaDanGouWuViewController.swift
+5
-3
GeliBusinessPlatform/ViewController/地址管理/DZGLViewController.swift
...nessPlatform/ViewController/地址管理/DZGLViewController.swift
+21
-3
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
81bb2a0a
No preview for this file type
GeliBusinessPlatform/SceneDelegate.swift
View file @
81bb2a0a
...
...
@@ -46,7 +46,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, UITabBarControllerDeleg
let
vc
=
LoginViewController
()
vc
.
delegate
=
self
let
contentView
=
vc
//
// let vc = DaiKeXiaDanGouWuViewController()
// let contentView = vc
...
...
@@ -94,7 +94,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, UITabBarControllerDeleg
// Create the SwiftUI view that provides the window contents.
tabBarController
.
viewControllers
=
[
v1
,
v2
,
v3
,
v4
,
v5
]
// tabBarController.selectedIndex =
1
// tabBarController.selectedIndex =
2
let
contentView
=
tabBarController
...
...
GeliBusinessPlatform/View/Cell/DKXDAdrCell.xib
View file @
81bb2a0a
...
...
@@ -10,7 +10,7 @@
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
/>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<tableViewCell
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
id=
"KGk-i7-Jjw"
customClass=
"DKXDAdrCell"
customModule=
"
GeliBusinessPlatform
"
customModuleProvider=
"target"
>
<tableViewCell
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
id=
"KGk-i7-Jjw"
customClass=
"DKXDAdrCell"
customModule=
"
TestClass
"
customModuleProvider=
"target"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"70"
/>
<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"
>
...
...
GeliBusinessPlatform/ViewController/代客下单(购物)/DaiKeXiaDanGouWuViewController.swift
View file @
81bb2a0a
...
...
@@ -31,7 +31,7 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
var
dj_payWay
=
0
//定金支付方式
var
orderType
:
Int
?
//订单类型
var
adrData
:
String
?
//地址数据
var
adrData
:
GetAddrsInfoDataModel
?
//地址数据
var
glSelectView
:
GLAlertSelectView
?
=
nil
var
footerView
:
DaiKeXiaDanFooterView
?
...
...
@@ -138,7 +138,8 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
if
indexPath
.
row
==
3
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"DKXDAdrCell"
)
as!
DKXDAdrCell
cell
.
nameLbl
.
text
=
p3Arr
[
indexPath
.
row
]
cell
.
contentLbl
.
text
=
adrData
cell
.
contentLbl
.
text
=
"
\(
adrData
?
.
consignee
)
\(
adrData
?
.
mobile
)
"
cell
.
adrLbl
.
text
=
adrData
?
.
addr_cn
cell
.
tag
=
indexPath
.
row
return
cell
}
...
...
@@ -229,6 +230,7 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
if
indexPath
.
row
==
3
||
indexPath
.
row
>
4
{
if
indexPath
.
row
==
3
{
let
vc
=
DZGLViewController
()
vc
.
cus_id
=
cusModel
?
.
cus_id
vc
.
isSelectMotion
=
true
vc
.
delegate
=
self
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
...
...
@@ -401,7 +403,7 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
}
//MARK: - 选择地址
func
DZGLViewControllerSelect
(
data
:
String
)
{
func
DZGLViewControllerSelect
(
data
:
GetAddrsInfoDataModel
)
{
adrData
=
data
listView
.
reloadData
()
}
...
...
GeliBusinessPlatform/ViewController/地址管理/DZGLViewController.swift
View file @
81bb2a0a
...
...
@@ -10,17 +10,19 @@ import UIKit
import
SwipeCellKit
import
LGButton
protocol
DZGLViewControllerDelegate
{
func
DZGLViewControllerSelect
(
data
:
String
)
func
DZGLViewControllerSelect
(
data
:
GetAddrsInfoDataModel
)
}
class
DZGLViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
SwipeTableViewCellDelegate
{
var
delegate
:
DZGLViewControllerDelegate
?
var
cus_id
:
Int
?
var
isSelectMotion
=
false
var
selectIdx
:
IndexPath
?
var
adrInfo
:
GetAddrsInfoModel
?
@IBOutlet
weak
var
btmLbl
:
UILabel
!
@IBOutlet
weak
var
listView
:
UITableView
!
@IBOutlet
weak
var
btmBtn
:
LGButton
!
@IBAction
func
btmClick
(
_
sender
:
Any
)
{
delegate
?
.
DZGLViewControllerSelect
(
data
:
"abc"
)
delegate
?
.
DZGLViewControllerSelect
(
data
:
(
adrInfo
?
.
data
!
[
selectIdx
!.
row
])
!
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
@IBOutlet
weak
var
btmLblHeight
:
NSLayoutConstraint
!
...
...
@@ -29,6 +31,15 @@ class DZGLViewController: BaseViewController,UITableViewDelegate,UITableViewData
navbar
.
title
=
"地址管理"
navbar
.
rightTitle
=
"新增"
self
.
view
.
addSubview
(
navbar
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
getAddrsInfo
([
"user_token"
:
UserToken
,
"cus_id"
:
cus_id
],
success
:
{
(
data
)
in
self
.
adrInfo
=
data
as!
GetAddrsInfoModel
self
.
listView
.
reloadData
()
})
{
(
error
)
in
}
listView
.
separatorStyle
=
.
none
SetTopFrameView
(
view
:
listView
,
btmView
:
btmLbl
)
listView
.
register
(
UINib
(
nibName
:
"DiZhiGuanLiCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"DiZhiGuanLiCell"
)
...
...
@@ -51,7 +62,10 @@ class DZGLViewController: BaseViewController,UITableViewDelegate,UITableViewData
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
return
3
if
adrInfo
!=
nil
{
return
(
adrInfo
?
.
data
!.
count
)
!
}
return
1
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
return
79
...
...
@@ -59,6 +73,10 @@ class DZGLViewController: BaseViewController,UITableViewDelegate,UITableViewData
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"DiZhiGuanLiCell"
)
as!
DiZhiGuanLiCell
cell
.
delegate
=
self
let
model
=
adrInfo
?
.
data
!
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
model
?
.
consignee
cell
.
phoneLbl
.
text
=
model
?
.
mobile
cell
.
adrLbl
.
text
=
model
?
.
addr_cn
if
isSelectMotion
==
false
{
cell
.
btnH
.
constant
=
0
cell
.
xValue
.
constant
=
0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment