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
f9e5a69e
Commit
f9e5a69e
authored
Jun 08, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
地址列表,新增,编辑
parent
9ec64ef9
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
785 additions
and
129 deletions
+785
-129
GeliBusinessPlatform.xcodeproj/project.pbxproj
GeliBusinessPlatform.xcodeproj/project.pbxproj
+16
-0
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/Define/Define.swift
GeliBusinessPlatform/Define/Define.swift
+61
-34
GeliBusinessPlatform/Interface/Interface_Z.plist
GeliBusinessPlatform/Interface/Interface_Z.plist
+6
-0
GeliBusinessPlatform/Model/AdrModel/AddressListModel.swift
GeliBusinessPlatform/Model/AdrModel/AddressListModel.swift
+135
-0
GeliBusinessPlatform/Model/AdressInterface.swift
GeliBusinessPlatform/Model/AdressInterface.swift
+69
-0
GeliBusinessPlatform/Model/UpDataModel.swift
GeliBusinessPlatform/Model/UpDataModel.swift
+1
-1
GeliBusinessPlatform/View/AlertView/GeliAlertTextFiled.xib
GeliBusinessPlatform/View/AlertView/GeliAlertTextFiled.xib
+4
-4
GeliBusinessPlatform/ViewController/地图/SJMapViewController.swift
...inessPlatform/ViewController/地图/SJMapViewController.swift
+20
-9
GeliBusinessPlatform/ViewController/地址管理/DZGLViewController.swift
...nessPlatform/ViewController/地址管理/DZGLViewController.swift
+123
-26
GeliBusinessPlatform/ViewController/地址管理/DZGLViewController.xib
...sinessPlatform/ViewController/地址管理/DZGLViewController.xib
+32
-5
GeliBusinessPlatform/ViewController/地址管理/XinZengDiZhiViewController.swift
...form/ViewController/地址管理/XinZengDiZhiViewController.swift
+310
-43
GeliBusinessPlatform/ViewController/地址管理/XinZengDiZhiViewController.xib
...atform/ViewController/地址管理/XinZengDiZhiViewController.xib
+5
-4
GeliBusinessPlatform/ViewController/工作中心/WorkCViewController.swift
...essPlatform/ViewController/工作中心/WorkCViewController.swift
+3
-3
No files found.
GeliBusinessPlatform.xcodeproj/project.pbxproj
View file @
f9e5a69e
...
...
@@ -129,6 +129,8 @@
E0516F7F244806C500E373CE
/* MsgCenterViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0516F7E244806C500E373CE
/* MsgCenterViewController.swift */
;
};
E0516F822448086700E373CE
/* MsgCenterCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0516F802448086700E373CE
/* MsgCenterCell.swift */
;
};
E0516F832448086700E373CE
/* MsgCenterCell.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0516F812448086700E373CE
/* MsgCenterCell.xib */
;
};
E0571C6C248DC60000E85711
/* AddressListModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0571C6B248DC60000E85711
/* AddressListModel.swift */
;
};
E0571C6E248DD4DE00E85711
/* AdressInterface.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E0571C6D248DD4DE00E85711
/* AdressInterface.swift */
;
};
E06524ED2458008900CA22E2
/* RuKuViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E06524EB2458008900CA22E2
/* RuKuViewController.swift */
;
};
E06524EE2458008900CA22E2
/* RuKuViewController.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E06524EC2458008900CA22E2
/* RuKuViewController.xib */
;
};
E06524F124580AAC00CA22E2
/* RuKuJiaGeCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E06524EF24580AAC00CA22E2
/* RuKuJiaGeCell.swift */
;
};
...
...
@@ -647,6 +649,8 @@
E0516F7E244806C500E373CE
/* MsgCenterViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MsgCenterViewController.swift
;
sourceTree
=
"<group>"
;
};
E0516F802448086700E373CE
/* MsgCenterCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MsgCenterCell.swift
;
sourceTree
=
"<group>"
;
};
E0516F812448086700E373CE
/* MsgCenterCell.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
MsgCenterCell.xib
;
sourceTree
=
"<group>"
;
};
E0571C6B248DC60000E85711
/* AddressListModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
AddressListModel.swift
;
sourceTree
=
"<group>"
;
};
E0571C6D248DD4DE00E85711
/* AdressInterface.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
AdressInterface.swift
;
sourceTree
=
"<group>"
;
};
E06524EB2458008900CA22E2
/* RuKuViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
RuKuViewController.swift
;
sourceTree
=
"<group>"
;
};
E06524EC2458008900CA22E2
/* RuKuViewController.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
RuKuViewController.xib
;
sourceTree
=
"<group>"
;
};
E06524EF24580AAC00CA22E2
/* RuKuJiaGeCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
RuKuJiaGeCell.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -1468,6 +1472,14 @@
path
=
"消息中心"
;
sourceTree
=
"<group>"
;
};
E0571C68248DC5CD00E85711
/* AdrModel */
=
{
isa
=
PBXGroup
;
children
=
(
E0571C6B248DC60000E85711
/* AddressListModel.swift */
,
);
path
=
AdrModel
;
sourceTree
=
"<group>"
;
};
E06524EA2458006600CA22E2
/* 入库 */
=
{
isa
=
PBXGroup
;
children
=
(
...
...
@@ -1601,6 +1613,7 @@
E09B03A92445B09200211A51
/* Model */
=
{
isa
=
PBXGroup
;
children
=
(
E0571C68248DC5CD00E85711
/* AdrModel */
,
E00D85DC244561FD00F5F816
/* Products */
,
F95B8533247F47D800790719
/* Work */
,
E0B5308224728D5600FFCC15
/* WarehouseManageModel */
,
...
...
@@ -1608,6 +1621,7 @@
F956D5BD246A3629003FF510
/* PersonCenterModel */
,
F956D5BC246A35DB003FF510
/* GoodsManageMoel */
,
F9171EFB245128B200359C2B
/* Interface.swift */
,
E0571C6D248DD4DE00E85711
/* AdressInterface.swift */
,
E0B5308524728FB600FFCC15
/* WarehouseInterface.swift */
,
F93615DA2480B421004187F9
/* WorkInterface.swift */
,
F956D5BA246A359C003FF510
/* GoodsInterface.swift */
,
...
...
@@ -2915,6 +2929,7 @@
E0190A2D2487696F00B1E067
/* NewSelectItemVc.swift in Sources */
,
E09B03C32445BD9500211A51
/* NavViewController.swift in Sources */
,
F950FDD924518B9500C40530
/* FSCalendarDelegationFactory.m in Sources */
,
E0571C6C248DC60000E85711
/* AddressListModel.swift in Sources */
,
E0A2E82B24555D8600D6DB34
/* KuCunXiangQingCell.swift in Sources */
,
F933F6C22452C68B00189561
/* PKHUDAnimating.swift in Sources */
,
E00E48C62457C99900F16545
/* KuCunShangPinXQViewController.swift in Sources */
,
...
...
@@ -3020,6 +3035,7 @@
E013D7882484B1B90092DE46
/* CRKXiangQVC.swift in Sources */
,
E0DDCB0F244AD8C500DF54C7
/* DaiQueRenCell.swift in Sources */
,
E042F74024528CD500CDFA12
/* TitleAndOnlyBtnCell.swift in Sources */
,
E0571C6E248DD4DE00E85711
/* AdressInterface.swift in Sources */
,
F969BF07244EC38000C79953
/* GoodsCollectionViewCell.swift in Sources */
,
F9531F462465108800724BEE
/* JXPhotoBrowser.swift in Sources */
,
E08A7ADC246505F000F934F2
/* KeHuListViewController.swift in Sources */
,
...
...
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
f9e5a69e
No preview for this file type
GeliBusinessPlatform/Define/Define.swift
View file @
f9e5a69e
...
...
@@ -127,9 +127,9 @@ func isPurnInt(string: String) -> Bool {
}
//MARK:--是否是正确的数值
func
isPurnNumber
(
str
:
String
)
->
Bool
{
// let expression = "^[0-9]*((\\.|,)[0-9]{0,2})?$"
// let expression = "^[0-9]*((\\.|,)[0-9]{0,2})?$"
let
arr
=
str
.
components
(
separatedBy
:
","
)
if
arr
.
count
>
0
{
...
...
@@ -146,10 +146,10 @@ func isPurnNumber(str:String)-> Bool{
return
predicate
.
evaluate
(
with
:
currObject
)
}
if
isPurnInt
(
string
:
num
)
||
isPurnFloat
(
string
:
num
){
return
true
}
else
{
return
false
}
return
true
}
else
{
return
false
}
}
else
{
if
str
.
count
>
0
{
var
predicateStr
:
String
!
...
...
@@ -217,6 +217,29 @@ func isMailBox(mail_ad:String) -> Bool {
return
emailTest
.
evaluate
(
with
:
mail_ad
)
}
extension
String
{
var
containsEmoji
:
Bool
{
for
scalar
in
unicodeScalars
{
switch
scalar
.
value
{
case
0x00A0
...
0x00AF
,
0x2030
...
0x204F
,
0x2120
...
0x213F
,
0x2190
...
0x21AF
,
0x2310
...
0x329F
,
0x1F000
...
0x1F9CF
:
return
true
default
:
continue
}
}
return
false
}
}
extension
UIViewController
{
class
func
currentViewController
(
base
:
UIViewController
?
=
UIApplication
.
shared
.
keyWindow
?
.
rootViewController
)
->
UIViewController
?
{
...
...
@@ -274,17 +297,18 @@ func dayAndTimeByDouble (sender : Double ) -> String {
}
//MARK: -- 格式化数字
func
formatShowNumber
(
value
:
String
)
->
String
{
if
value
.
isEmpty
{
return
"0"
}
//保留位数
let
interceptValue
=
String
(
format
:
"%.2f"
,
(
value
as
NSString
)
.
doubleValue
)
//添加分隔符
let
format
=
NumberFormatter
()
format
.
numberStyle
=
.
decimal
let
formatValue
=
format
.
string
(
from
:
NSNumber
(
value
:
(
interceptValue
as
NSString
)
.
doubleValue
))
return
formatValue
!
}
if
value
.
isEmpty
{
return
"0"
}
//保留位数
let
interceptValue
=
String
(
format
:
"%.2f"
,
(
value
as
NSString
)
.
doubleValue
)
//添加分隔符
let
format
=
NumberFormatter
()
format
.
numberStyle
=
.
decimal
let
formatValue
=
format
.
string
(
from
:
NSNumber
(
value
:
(
interceptValue
as
NSString
)
.
doubleValue
))
return
formatValue
!
}
//MARK:--数组转字符串
func
dataChangeString
(
sender
:
Array
<
Any
>
)
->
String
{
var
str
=
""
...
...
@@ -301,26 +325,29 @@ func dataChangeString(sender:Array<Any>) -> String{
}
//MARK:--字符串转字典
func
getDictionaryFromJSONString
(
jsonString
:
String
)
->
NSDictionary
{
let
jsonData
:
Data
=
jsonString
.
data
(
using
:
.
utf8
)
!
let
dict
=
try
?
JSONSerialization
.
jsonObject
(
with
:
jsonData
,
options
:
.
mutableContainers
)
if
dict
!=
nil
{
return
dict
as!
NSDictionary
}
return
NSDictionary
()
let
jsonData
:
Data
=
jsonString
.
data
(
using
:
.
utf8
)
!
let
dict
=
try
?
JSONSerialization
.
jsonObject
(
with
:
jsonData
,
options
:
.
mutableContainers
)
if
dict
!=
nil
{
return
dict
as!
NSDictionary
}
return
NSDictionary
()
}
//MARK:--字符串转字典
func
getDicFromJSONString
(
jsonString
:
String
)
->
Dictionary
<
String
,
Any
>
{
let
jsonData
:
Data
=
jsonString
.
data
(
using
:
.
utf8
)
!
let
dict
=
try
?
JSONSerialization
.
jsonObject
(
with
:
jsonData
,
options
:
.
mutableContainers
)
if
dict
!=
nil
{
return
dict
as!
Dictionary
}
return
Dictionary
()
let
jsonData
:
Data
=
jsonString
.
data
(
using
:
.
utf8
)
!
let
dict
=
try
?
JSONSerialization
.
jsonObject
(
with
:
jsonData
,
options
:
.
mutableContainers
)
if
dict
!=
nil
{
return
dict
as!
Dictionary
}
return
Dictionary
()
}
//MARK: - 获取系统当前时间
func
getTimeNow
()
->
String
{
let
date
=
Date
()
...
...
GeliBusinessPlatform/Interface/Interface_Z.plist
View file @
f9e5a69e
...
...
@@ -132,5 +132,11 @@
<string>
Admin/messageList
</string>
<key>
出库入库审核不通过
</key>
<string>
Warehouse/auditFail
</string>
<key>
地址列表
</key>
<string>
Address/addressList
</string>
<key>
编辑地址
</key>
<string>
Address/editAddress
</string>
<key>
新增地址
</key>
<string>
Address/addAddress
</string>
</dict>
</plist>
GeliBusinessPlatform/Model/AdrModel/AddressListModel.swift
0 → 100644
View file @
f9e5a69e
//
// AddressListModel.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/6/8.
// Copyright © 2020 junye lu. All rights reserved.
//
import
Foundation
import
ObjectMapper
//获取统计+权限
class
AddressListModel
:
Mappable
{
var
code
:
Int
?
var
message
:
String
?
var
data
:
Array
<
AddressListDataModel
>
?
required
init
?(
map
:
Map
)
{
}
func
mapping
(
map
:
Map
)
{
code
<-
map
[
"code"
]
message
<-
map
[
"message"
]
data
<-
map
[
"data"
]
}
}
class
AddressListDataModel
:
Mappable
{
var
address_id
:
Int
?
//地址ID
var
user_id
:
Int
?
//用户ID
var
consignee
:
String
?
//联系人名称
var
province
:
Int
?
//省ID
var
city
:
Int
?
//市ID
var
district
:
Int
?
//D区ID
var
address
:
String
?
//详细地址
var
zipcode
:
String
?
//邮编
var
tel
:
String
?
//电话号码
var
mobile
:
String
?
//手机号码
var
is_default
:
Int
?
//是否默认收货地址
var
country
:
Int
?
var
street
:
Int
?
//街道ID
var
is_send_default
:
Int
?
//地址ID是否默认发货地址
var
province_cn
:
String
?
//地址ID省名
var
city_cn
:
String
?
//市名
var
district_cn
:
String
?
//区名
var
street_cn
:
String
?
//街道名
required
init
?(
map
:
Map
)
{
}
func
mapping
(
map
:
Map
)
{
address_id
<-
map
[
"address_id"
]
user_id
<-
map
[
"user_id"
]
consignee
<-
map
[
"consignee"
]
province
<-
map
[
"province"
]
city
<-
map
[
"city"
]
district
<-
map
[
"district"
]
address
<-
map
[
"address"
]
zipcode
<-
map
[
"zipcode"
]
tel
<-
map
[
"tel"
]
mobile
<-
map
[
"mobile"
]
is_default
<-
map
[
"is_default"
]
country
<-
map
[
"country"
]
street
<-
map
[
"street"
]
is_send_default
<-
map
[
"is_send_default"
]
province_cn
<-
map
[
"province_cn"
]
city_cn
<-
map
[
"city_cn"
]
district_cn
<-
map
[
"district_cn"
]
street_cn
<-
map
[
"street_cn"
]
}
}
class
AddAddressModel
:
Mappable
{
var
code
:
Int
?
var
message
:
String
?
var
data
:
AddAddressDataModel
?
required
init
?(
map
:
Map
)
{
}
func
mapping
(
map
:
Map
)
{
code
<-
map
[
"code"
]
message
<-
map
[
"message"
]
data
<-
map
[
"data"
]
}
}
class
AddAddressDataModel
:
Mappable
{
var
consignee
:
String
?
//联系人
var
province
:
Int
?
//省ID
var
city
:
Int
?
//市ID
var
district
:
Int
?
//区ID
var
street
:
Int
?
//街ID
var
mobile
:
String
?
//手机号码
var
address
:
String
?
//详细地址
var
is_default
:
Int
?
//是否默认收货地址,1是0非
var
is_send_default
:
Int
?
//是否默发收货地址,1是0非
var
user_id
:
Int
?
var
address_id
:
Int
?
required
init
?(
map
:
Map
)
{
}
func
mapping
(
map
:
Map
)
{
consignee
<-
map
[
"consignee"
]
province
<-
map
[
"province"
]
city
<-
map
[
"city"
]
district
<-
map
[
"district"
]
street
<-
map
[
"street"
]
mobile
<-
map
[
"mobile"
]
address
<-
map
[
"address"
]
is_default
<-
map
[
"is_default"
]
is_send_default
<-
map
[
"is_send_default"
]
user_id
<-
map
[
"user_id"
]
address_id
<-
map
[
"address_id"
]
}
}
GeliBusinessPlatform/Model/AdressInterface.swift
0 → 100644
View file @
f9e5a69e
//
// AdressInterface.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/6/8.
// Copyright © 2020 junye lu. All rights reserved.
//
import
Foundation
import
Alamofire
import
SwiftyJSON
import
ObjectMapper
//MARK:--登录
//params-key(user_token(用户token ),key_word(关键字))
func
AddressList
(
_
params
:[
String
:
Any
],
success
:
@escaping
(
_
res
:
Any
)
->
(),
failture
:
@escaping
(
_
error
:
Error
)
->
())
{
NetworkRequest
.
sharedInstance
.
postRequest
(
"地址列表"
,
params
,
{
(
rep
:
DataResponse
<
AddressListModel
>
)
in
},
success
:
{
(
data
)
in
success
(
data
)
})
{
(
error
)
in
failture
(
error
)
}
}
/*
params-key(
user_token(用户token )
address_id 地址ID
consignee 联系人
province 省ID
city 市ID
district 区ID
street 街ID
address 详细地址
mobile 手机号码
tel 电话号码
is_default 是否默认收货地址,1是0非
is_send_default 是否默发收货地址,1是0非
*/
func
EditAddress
(
_
params
:[
String
:
Any
],
success
:
@escaping
(
_
res
:
Any
)
->
(),
failture
:
@escaping
(
_
error
:
Error
)
->
())
{
NetworkRequest
.
sharedInstance
.
postRequest
(
"编辑地址"
,
params
,
{
(
rep
:
DataResponse
<
UpDataModel
>
)
in
},
success
:
{
(
data
)
in
success
(
data
)
})
{
(
error
)
in
failture
(
error
)
}
}
/*
params-key(
user_token(用户token )
consignee 联系人
province 省ID
city 市ID
district 区ID
street 街ID
address 详细地址
mobile 手机号码
tel 电话号码
is_default 是否默认收货地址,1是0非
is_send_default 是否默发收货地址,1是0非
*/
func
AddAddress
(
_
params
:[
String
:
Any
],
success
:
@escaping
(
_
res
:
Any
)
->
(),
failture
:
@escaping
(
_
error
:
Error
)
->
())
{
NetworkRequest
.
sharedInstance
.
postRequest
(
"新增地址"
,
params
,
{
(
rep
:
DataResponse
<
AddAddressDataModel
>
)
in
},
success
:
{
(
data
)
in
success
(
data
)
})
{
(
error
)
in
failture
(
error
)
}
}
GeliBusinessPlatform/Model/UpDataModel.swift
View file @
f9e5a69e
...
...
@@ -8,7 +8,7 @@
import
Foundation
import
ObjectMapper
//发送验证码,验证短信验证码,修改登录密码,绑定、更换绑定格利支付账号,简单通用操作接口,普通订单发货,预售订单发货,订单绑定/更换绑定客户,确认订单,订单取消,修改订单商品价格,订单退款,普通订单退货,预售订单退货,修改订单支付方式(状态),商家仓库添加,商家仓库修改,商家仓库删除,提交下单,商品入库审核,商品入库,商品入库申请,商品出库,商品申请出库,商品审核出库,出库入库审核不通过
//发送验证码,验证短信验证码,修改登录密码,绑定、更换绑定格利支付账号,简单通用操作接口,普通订单发货,预售订单发货,订单绑定/更换绑定客户,确认订单,订单取消,修改订单商品价格,订单退款,普通订单退货,预售订单退货,修改订单支付方式(状态),商家仓库添加,商家仓库修改,商家仓库删除,提交下单,商品入库审核,商品入库,商品入库申请,商品出库,商品申请出库,商品审核出库,出库入库审核不通过
,编辑地址
class
UpDataModel
:
Mappable
{
var
code
:
Int
?
...
...
GeliBusinessPlatform/View/AlertView/GeliAlertTextFiled.xib
View file @
f9e5a69e
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1609
6
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1609
7
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina5_5"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"16087"
/>
<capability
name=
"Named colors"
minToolsVersion=
"9.0"
/>
<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"
customClass=
"GeliAlertTextFiled"
customModule=
"
GeliBusinessPlatform
"
customModuleProvider=
"target"
>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"GeliAlertTextFiled"
customModule=
"
TestClass
"
customModuleProvider=
"target"
>
<connections>
<outlet
property=
"textTF"
destination=
"kuS-yq-U0R"
id=
"6K0-Eu-oXJ"
/>
</connections>
...
...
@@ -95,7 +96,6 @@
<constraints>
<constraint
firstAttribute=
"height"
constant=
"44"
id=
"dNK-WF-IcX"
/>
</constraints>
<nil
key=
"textColor"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
weight=
"semibold"
pointSize=
"15"
/>
<textInputTraits
key=
"textInputTraits"
/>
<userDefinedRuntimeAttributes>
...
...
@@ -176,7 +176,7 @@
<color
red=
"0.40000000000000002"
green=
"0.40000000000000002"
blue=
"0.40000000000000002"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
<namedColor
name=
"蓝色字体颜色"
>
<color
red=
"0.27
799999713897705"
green=
"0.56099998950958252"
blue=
"0.889999985694885
25"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
red=
"0.27
843137254901962"
green=
"0.5607843137254902"
blue=
"0.89019607843137
25"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
</resources>
</document>
GeliBusinessPlatform/ViewController/地图/SJMapViewController.swift
View file @
f9e5a69e
...
...
@@ -13,9 +13,13 @@ import MAMapKit
import
AMapSearchKit
import
LGButton
import
IQKeyboardManagerSwift
protocol
SJMapViewControllerDelegate
{
func
SJMapViewControllerSelectArd
(
adr
:
String
)
}
class
SJMapViewController
:
UIViewController
,
AMapLocationManagerDelegate
,
MAMapViewDelegate
,
AMapSearchDelegate
,
UISearchBarDelegate
,
SearchBarViewDelegate
,
UITableViewDelegate
,
UITableViewDataSource
{
var
delegate
:
SJMapViewControllerDelegate
?
var
mapView
:
MAMapView
!
var
search
:
AMapSearchAPI
!
...
...
@@ -25,7 +29,7 @@ class SJMapViewController: UIViewController,AMapLocationManagerDelegate,MAMapVie
var
lat
:
CLLocationDegrees
=
23.142059
var
lng
:
CLLocationDegrees
=
113.240747
var
adrArr
:
Array
<
A
ny
>
=
[]
var
adrArr
:
Array
<
A
MapPOI
>
=
[]
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
self
.
navigationController
?
.
navigationBar
.
isHidden
=
true
...
...
@@ -66,8 +70,12 @@ class SJMapViewController: UIViewController,AMapLocationManagerDelegate,MAMapVie
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
@objc
func
submitAction
(){
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
if
adrStr
!.
count
>
0
{
delegate
?
.
SJMapViewControllerSelectArd
(
adr
:
adrStr
!
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
else
{
HUD
.
flash
(
.
label
(
"请选择地址"
),
delay
:
1.2
)
}
}
//MARK: - 高德地图delegate
...
...
@@ -78,7 +86,9 @@ class SJMapViewController: UIViewController,AMapLocationManagerDelegate,MAMapVie
}
//解析response获取POI信息,具体解析见 Demo
adrArr
.
removeAll
()
adrArr
.
append
(
response
.
pois
)
response
.
pois
.
forEach
{
(
poi
)
in
adrArr
.
append
(
poi
)
}
listView
?
.
reloadData
()
}
...
...
@@ -139,7 +149,7 @@ class SJMapViewController: UIViewController,AMapLocationManagerDelegate,MAMapVie
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"SJMapCell"
)
as!
SJMapCell
let
poi
=
adrArr
[
indexPath
.
row
]
as!
AMapPOI
let
poi
=
adrArr
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
poi
.
name
//1.将两个经纬度点转成投影点
...
...
@@ -159,7 +169,7 @@ class SJMapViewController: UIViewController,AMapLocationManagerDelegate,MAMapVie
return
cell
}
var
adrStr
:
String
?
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
if
idx
==
indexPath
{
return
...
...
@@ -168,6 +178,7 @@ class SJMapViewController: UIViewController,AMapLocationManagerDelegate,MAMapVie
let
cell
=
tableView
.
cellForRow
(
at
:
idx
!
)
as!
SJMapCell
mapView
.
setCenter
(
CLLocationCoordinate2D
(
latitude
:
CLLocationDegrees
(
cell
.
lat
!
),
longitude
:
CLLocationDegrees
(
cell
.
lng
!
)),
animated
:
false
)
listView
?
.
reloadData
()
adrStr
=
cell
.
nameLbl
.
text
}
}
...
...
@@ -193,7 +204,7 @@ class SJMapViewController: UIViewController,AMapLocationManagerDelegate,MAMapVie
btn
.
addTarget
(
self
,
action
:
#selector(
submitAction
)
,
for
:
.
touchUpInside
)
self
.
view
.
addSubview
(
btn
)
btn
.
snp
.
makeConstraints
{
(
make
)
in
make
.
top
.
equalTo
(
2
0
)
make
.
top
.
equalTo
(
6
0
)
make
.
right
.
equalTo
(
-
20
)
make
.
width
.
equalTo
(
60
)
make
.
height
.
equalTo
(
30
)
...
...
@@ -207,7 +218,7 @@ class SJMapViewController: UIViewController,AMapLocationManagerDelegate,MAMapVie
btn2
.
addTarget
(
self
,
action
:
#selector(
backAction
)
,
for
:
.
touchUpInside
)
self
.
view
.
addSubview
(
btn2
)
btn2
.
snp
.
makeConstraints
{
(
make
)
in
make
.
top
.
equalTo
(
2
0
)
make
.
top
.
equalTo
(
6
0
)
make
.
left
.
equalTo
(
20
)
make
.
width
.
equalTo
(
60
)
make
.
height
.
equalTo
(
30
)
...
...
GeliBusinessPlatform/ViewController/地址管理/DZGLViewController.swift
View file @
f9e5a69e
...
...
@@ -12,38 +12,85 @@ import LGButton
protocol
DZGLViewControllerDelegate
{
func
DZGLViewControllerSelect
(
data
:
GetAddrsInfoDataModel
)
}
class
DZGLViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
SwipeTableViewCellDelegate
{
class
DZGLViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
SwipeTableViewCellDelegate
,
UISearchBarDelegate
,
SearchBarViewDelegate
,
XinZengDiZhiViewControllerDelegate
{
func
XinZengDiZhiViewControllerFinishAction
()
{
loadData
()
}
func
clearSearchAction
()
{
}
var
delegate
:
DZGLViewControllerDelegate
?
var
cus_id
:
Int
?
var
isSelectMotion
=
false
var
selectIdx
:
IndexPath
?
var
adrInfo
:
GetAddrsInfoModel
?
//列表
var
adrArrs
:
Array
<
AddressListDataModel
>
=
[]
@IBOutlet
weak
var
searchBg
:
UIView
!
@IBOutlet
weak
var
btmLbl
:
UILabel
!
@IBOutlet
weak
var
listView
:
UITableView
!
@IBOutlet
weak
var
searchBgH
:
NSLayoutConstraint
!
var
searchV
:
SearchBarView
?
=
nil
@IBOutlet
weak
var
btmBtn
:
LGButton
!
@IBAction
func
btmClick
(
_
sender
:
Any
)
{
delegate
?
.
DZGLViewControllerSelect
(
data
:
(
adrInfo
?
.
data
!
[
selectIdx
!.
row
])
!
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
@IBOutlet
weak
var
btmLblHeight
:
NSLayoutConstraint
!
var
keyWord
=
""
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
navbar
.
title
=
"地址管理"
// navbar.rightTitle = "新增"
self
.
view
.
addSubview
(
navbar
)
HUD
.
flash
(
.
progress
)
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
()
HUD
.
hide
()
})
{
(
error
)
in
if
cus_id
!=
nil
{
searchBgH
.
constant
=
0
getAddrsInfo
([
"user_token"
:
UserToken
,
"cus_id"
:
cus_id
],
success
:
{
(
data
)
in
self
.
adrInfo
=
data
as!
GetAddrsInfoModel
self
.
listView
.
reloadData
()
HUD
.
hide
()
})
{
(
error
)
in
}
}
else
{
//searchbar
let
searchBr
=
SearchBarView
.
init
()
self
.
searchBg
.
addSubview
(
searchBr
)
searchBr
.
snp
.
makeConstraints
{
(
make
)
in
make
.
left
.
right
.
equalTo
(
0
)
make
.
centerY
.
equalToSuperview
()
make
.
height
.
equalTo
(
35
)
}
searchV
=
searchBr
searchBr
.
placeholderStr
=
"请输入收货人地址"
searchBr
.
cornerRadius
=
35
/
2.0
searchBr
.
delegate
=
self
searchBr
.
delegateL
=
self
navbar
.
rightTitle
=
"新增"
searchBgH
.
constant
=
45
AddressList
([
"user_token"
:
UserToken
as
Any
,
"key_word"
:
keyWord
],
success
:
{
(
data
)
in
let
model
=
data
as!
AddressListModel
model
.
data
?
.
forEach
({
(
item
)
in
self
.
adrArrs
.
append
(
item
)
})
self
.
listView
.
reloadData
()
})
{
(
error
)
in
}
}
listView
.
separatorStyle
=
.
none
SetTopFrameView
(
view
:
listView
,
btmView
:
btmLbl
)
// SetTopFrameView(view: listView, btmView: btmLbl)
SetTopFrame
(
view
:
searchBg
,
height
:
45
)
listView
.
register
(
UINib
(
nibName
:
"DiZhiGuanLiCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"DiZhiGuanLiCell"
)
btmLbl
.
isHidden
=
!
isSelectMotion
...
...
@@ -53,21 +100,38 @@ class DZGLViewController: BaseViewController,UITableViewDelegate,UITableViewData
}
else
{
btmLblHeight
.
constant
=
0
}
// Do any additional setup after loading the view.
}
@objc
func
loadData
(){
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
adrArrs
.
removeAll
()
AddressList
([
"user_token"
:
UserToken
as
Any
,
"key_word"
:
""
],
success
:
{
(
data
)
in
let
model
=
data
as!
AddressListModel
model
.
data
?
.
forEach
({
(
item
)
in
self
.
adrArrs
.
append
(
item
)
})
self
.
listView
.
reloadData
()
})
{
(
error
)
in
}
}
func
rightBtnClick
()
{
let
vc
=
XinZengDiZhiViewController
()
vc
.
navTitle
=
"新增地址"
vc
.
delegate
=
self
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
if
adrInfo
!=
nil
{
return
(
adrInfo
?
.
data
!.
count
)
!
if
cus_id
!=
nil
{
if
adrInfo
!=
nil
{
return
(
adrInfo
?
.
data
!.
count
)
!
}
}
return
1
return
adrArrs
.
count
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
return
79
...
...
@@ -75,16 +139,27 @@ 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
}
else
{
if
indexPath
==
selectIdx
{
cell
.
btn
.
isSelected
=
true
if
cus_id
!=
nil
{
//选择
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
}
else
{
if
indexPath
==
selectIdx
{
cell
.
btn
.
isSelected
=
true
}
}
}
else
{
//列表
if
adrArrs
.
count
>
0
{
let
model
=
adrArrs
[
indexPath
.
row
]
cell
.
nameLbl
.
text
=
model
.
consignee
cell
.
phoneLbl
.
text
=
model
.
mobile
cell
.
adrLbl
.
text
=
model
.
address
cell
.
btnH
.
constant
=
0
cell
.
xValue
.
constant
=
0
}
}
return
cell
...
...
@@ -93,9 +168,31 @@ class DZGLViewController: BaseViewController,UITableViewDelegate,UITableViewData
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
print
(
indexPath
.
row
)
if
isSelectMotion
==
false
{
let
vc
=
XinZengDiZhiViewController
()
vc
.
navTitle
=
"编辑地址"
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
if
adrArrs
.
count
>
0
{
let
model
=
adrArrs
[
indexPath
.
row
]
let
vc
=
XinZengDiZhiViewController
()
vc
.
delegate
=
self
vc
.
navTitle
=
"编辑地址"
vc
.
provinceIndex
=
model
.
province
!
vc
.
cityIndex
=
model
.
city
!
vc
.
areaIndex
=
model
.
district
!
vc
.
address_id
=
model
.
address_id
!
vc
.
adrStr
=
model
.
address
!
vc
.
nameStr
=
model
.
consignee
!
vc
.
phone
=
model
.
mobile
!
vc
.
tel
=
model
.
tel
!
vc
.
zip
=
model
.
zipcode
!
vc
.
is_send_default
=
false
vc
.
pcdStr
=
model
.
province_cn
!+
"-"
+
model
.
city_cn
!+
"-"
+
model
.
district_cn
!
if
model
.
is_send_default
==
1
{
vc
.
is_send_default
=
true
}
vc
.
is_default
=
false
if
model
.
is_default
==
1
{
vc
.
is_default
=
true
}
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
}
else
{
selectIdx
=
indexPath
listView
.
reloadData
()
...
...
GeliBusinessPlatform/ViewController/地址管理/DZGLViewController.xib
View file @
f9e5a69e
...
...
@@ -15,6 +15,8 @@
<outlet
property=
"btmLbl"
destination=
"Ypv-HH-qxb"
id=
"Qod-Sc-gU9"
/>
<outlet
property=
"btmLblHeight"
destination=
"5VM-BT-t21"
id=
"Drd-88-AM5"
/>
<outlet
property=
"listView"
destination=
"PT0-ms-ns9"
id=
"I4E-LU-xmE"
/>
<outlet
property=
"searchBg"
destination=
"OU4-kr-Utk"
id=
"jZZ-K3-uQJ"
/>
<outlet
property=
"searchBgH"
destination=
"ZqD-2y-Mup"
id=
"Kb9-3v-jUA"
/>
<outlet
property=
"view"
destination=
"i5M-Pr-FkT"
id=
"sfx-zR-JGt"
/>
</connections>
</placeholder>
...
...
@@ -24,7 +26,7 @@
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<subviews>
<tableView
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
alwaysBounceVertical=
"YES"
style=
"plain"
separatorStyle=
"default"
rowHeight=
"-1"
estimatedRowHeight=
"-1"
sectionHeaderHeight=
"28"
sectionFooterHeight=
"28"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"PT0-ms-ns9"
>
<rect
key=
"frame"
x=
"0.0"
y=
"
44"
width=
"414"
height=
"769
"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"
89"
width=
"414"
height=
"724
"
/>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
<connections>
<outlet
property=
"dataSource"
destination=
"-1"
id=
"S9q-iF-ucu"
/>
...
...
@@ -63,19 +65,41 @@
</attributedString>
<nil
key=
"highlightedColor"
/>
</label>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"OU4-kr-Utk"
>
<rect
key=
"frame"
x=
"0.0"
y=
"44"
width=
"414"
height=
"45"
/>
<subviews>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"4o7-3y-vAM"
>
<rect
key=
"frame"
x=
"0.0"
y=
"44"
width=
"414"
height=
"1"
/>
<color
key=
"backgroundColor"
name=
"灰色分界线"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"1"
id=
"eFj-Bx-o5r"
/>
</constraints>
</view>
</subviews>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
<constraints>
<constraint
firstItem=
"4o7-3y-vAM"
firstAttribute=
"leading"
secondItem=
"OU4-kr-Utk"
secondAttribute=
"leading"
id=
"Wwr-qE-7A7"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"4o7-3y-vAM"
secondAttribute=
"bottom"
id=
"ZGB-P3-w3m"
/>
<constraint
firstAttribute=
"height"
constant=
"45"
id=
"ZqD-2y-Mup"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"4o7-3y-vAM"
secondAttribute=
"trailing"
id=
"kNH-yD-Ob3"
/>
</constraints>
</view>
</subviews>
<color
key=
"backgroundColor"
red=
"1"
green=
"1"
blue=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<constraints>
<constraint
firstAttribute=
"bottom"
secondItem=
"cAI-JO-Qdu"
secondAttribute=
"bottom"
id=
"1MD-9W-7eX"
/>
<constraint
firstItem=
"cAI-JO-Qdu"
firstAttribute=
"leading"
secondItem=
"i5M-Pr-FkT"
secondAttribute=
"leading"
id=
"2al-2v-3lI"
/>
<constraint
firstItem=
"OU4-kr-Utk"
firstAttribute=
"top"
secondItem=
"fnl-2z-Ty3"
secondAttribute=
"top"
id=
"DaO-lj-329"
/>
<constraint
firstItem=
"OU4-kr-Utk"
firstAttribute=
"leading"
secondItem=
"fnl-2z-Ty3"
secondAttribute=
"leading"
id=
"DtA-69-LGt"
/>
<constraint
firstItem=
"cAI-JO-Qdu"
firstAttribute=
"top"
secondItem=
"Ypv-HH-qxb"
secondAttribute=
"top"
id=
"GhW-XG-N4K"
/>
<constraint
firstItem=
"fnl-2z-Ty3"
firstAttribute=
"trailing"
secondItem=
"OU4-kr-Utk"
secondAttribute=
"trailing"
id=
"ODV-uf-oai"
/>
<constraint
firstItem=
"fnl-2z-Ty3"
firstAttribute=
"trailing"
secondItem=
"Ypv-HH-qxb"
secondAttribute=
"trailing"
id=
"PaP-SV-iSE"
/>
<constraint
firstItem=
"PT0-ms-ns9"
firstAttribute=
"trailing"
secondItem=
"fnl-2z-Ty3"
secondAttribute=
"trailing"
id=
"V5G-53-sAf"
/>
<constraint
firstItem=
"PT0-ms-ns9"
firstAttribute=
"top"
secondItem=
"fnl-2z-Ty3"
secondAttribute=
"top"
id=
"Zy4-E7-jKS"
/>
<constraint
firstItem=
"PT0-ms-ns9"
firstAttribute=
"trailing"
secondItem=
"fnl-2z-Ty3"
secondAttribute=
"trailing"
id=
"Qza-8B-fzu"
/>
<constraint
firstItem=
"cAI-JO-Qdu"
firstAttribute=
"top"
secondItem=
"PT0-ms-ns9"
secondAttribute=
"bottom"
id=
"Unt-K0-Scq"
/>
<constraint
firstItem=
"PT0-ms-ns9"
firstAttribute=
"top"
secondItem=
"OU4-kr-Utk"
secondAttribute=
"bottom"
id=
"VnE-6I-IKx"
/>
<constraint
firstItem=
"Ypv-HH-qxb"
firstAttribute=
"leading"
secondItem=
"fnl-2z-Ty3"
secondAttribute=
"leading"
id=
"a42-al-5WD"
/>
<constraint
firstItem=
"PT0-ms-ns9"
firstAttribute=
"leading"
secondItem=
"fnl-2z-Ty3"
secondAttribute=
"leading"
id=
"aAW-Lb-vlo"
/>
<constraint
firstItem=
"cAI-JO-Qdu"
firstAttribute=
"top"
secondItem=
"PT0-ms-ns9"
secondAttribute=
"bottom"
id=
"euL-DJ-Xbf"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"cAI-JO-Qdu"
secondAttribute=
"trailing"
id=
"fGl-8X-Oxx"
/>
<constraint
firstItem=
"PT0-ms-ns9"
firstAttribute=
"leading"
secondItem=
"fnl-2z-Ty3"
secondAttribute=
"leading"
id=
"ySk-wu-4YG"
/>
<constraint
firstItem=
"fnl-2z-Ty3"
firstAttribute=
"bottom"
secondItem=
"Ypv-HH-qxb"
secondAttribute=
"bottom"
id=
"z9r-c2-Am0"
/>
</constraints>
<viewLayoutGuide
key=
"safeArea"
id=
"fnl-2z-Ty3"
/>
...
...
@@ -89,6 +113,9 @@
<namedColor
name=
"按钮渐变色下,字体颜色"
>
<color
red=
"0.27843137254901962"
green=
"0.5607843137254902"
blue=
"0.8901960784313725"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
<namedColor
name=
"灰色分界线"
>
<color
red=
"0.92941176470588238"
green=
"0.92941176470588238"
blue=
"0.92941176470588238"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
<namedColor
name=
"白色背景色"
>
<color
red=
"1"
green=
"1"
blue=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
...
...
GeliBusinessPlatform/ViewController/地址管理/XinZengDiZhiViewController.swift
View file @
f9e5a69e
...
...
@@ -8,23 +8,161 @@
import
UIKit
import
SwiftyJSON
class
XinZengDiZhiViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
TitleAndTFAndBtnCellDelegate
,
UIPickerViewDelegate
,
UIPickerViewDataSource
{
protocol
XinZengDiZhiViewControllerDelegate
{
func
XinZengDiZhiViewControllerFinishAction
()
}
class
XinZengDiZhiViewController
:
BaseViewController
,
UITableViewDelegate
,
UITableViewDataSource
,
TitleAndTFAndBtnCellDelegate
,
UIPickerViewDelegate
,
UIPickerViewDataSource
,
SJMapViewControllerDelegate
,
UITextFieldDelegate
,
TitleAndSwitchCellDelegate
,
GeliAlertViewDelegate
{
var
address_id
:
Int
?
func
sureGeliAlertViewAction
(
sender
:
UIButton
)
{
HUD
.
flash
(
.
progress
)
print
(
"adfb == "
,
provinceIndex
)
let
proDict
=
addressArray
[
provinceIndex
]
as!
Dictionary
<
String
,
Any
>
let
cityDict
=
(
proDict
[
"city_list"
]
as!
NSArray
)[
cityIndex
]
as!
[
String
:
AnyObject
]
let
areaDict
=
(
cityDict
[
"district_list"
]
as!
NSArray
)[
areaIndex
]
as!
Dictionary
<
String
,
Any
>
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
var
defalut
=
0
if
is_default
{
defalut
=
1
}
var
send_default
=
0
if
is_send_default
{
send_default
=
1
}
if
navTitle
==
"编辑地址"
{
let
dict
=
[
"user_token"
:
UserToken
as
Any
,
"address_id"
:
address_id
as
Any
,
"consignee"
:
nameStr
as
Any
,
"province"
:
proDict
[
"area_id"
]
!
as
Any
,
"city"
:
cityDict
[
"area_id"
]
!
as
Any
,
"district"
:
areaDict
[
"area_id"
]
!
as
Any
,
"street"
:
0
as
Any
,
"address"
:
adrStr
as
Any
,
"mobile"
:
phone
as
Any
,
"tel"
:
tel
as
Any
,
"is_default"
:
defalut
as
Any
,
"is_send_default"
:
send_default
as
Any
,
]
EditAddress
(
dict
,
success
:
{
(
data
)
in
self
.
delegate
?
.
XinZengDiZhiViewControllerFinishAction
()
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
HUD
.
hide
()
})
{
(
error
)
in
}
}
else
{
let
dict
=
[
"user_token"
:
UserToken
as
Any
,
"consignee"
:
nameStr
as
Any
,
"province"
:
proDict
[
"area_id"
]
!
as
Any
,
"city"
:
cityDict
[
"area_id"
]
!
as
Any
,
"district"
:
areaDict
[
"area_id"
]
!
as
Any
,
"street"
:
0
as
Any
,
"address"
:
adrStr
as
Any
,
"mobile"
:
phone
as
Any
,
"tel"
:
tel
as
Any
,
"is_default"
:
defalut
as
Any
,
"is_send_default"
:
send_default
as
Any
,
]
AddAddress
(
dict
,
success
:
{
(
data
)
in
self
.
delegate
?
.
XinZengDiZhiViewControllerFinishAction
()
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
HUD
.
hide
()
})
{
(
error
)
in
}
}
}
var
delegate
:
XinZengDiZhiViewControllerDelegate
?
//选择的省索引
var
provinceIndex
=
0
//选择的市索引
var
cityIndex
=
0
//选择的区(县)索引
var
areaIndex
=
0
var
adrStr
=
""
//详细地址地址
var
nameStr
=
""
//收货人
var
phone
=
""
//手机
var
tel
=
""
//电话
var
zip
=
""
//邮编
var
is_send_default
=
false
//默认发货
var
is_default
=
false
//默认收货
let
titleArr
=
[
"收货人:"
,
"地址:"
,
"详细地址:"
,
"手机号:"
,
"电话:"
,
"邮编:"
]
let
holderArr
=
[
"请填写收货人姓名"
,
"请选择城市"
,
"请输入详细地址"
,
"请输入手机号"
,
"请输入电话"
,
"请输入邮编"
]
var
holderArr
=
[
"请填写收货人姓名"
,
"请选择城市"
,
"请输入详细地址"
,
"请输入手机号"
,
"请输入电话"
,
"请输入邮编"
]
@IBOutlet
weak
var
listView
:
UITableView
!
@IBAction
func
saveAction
(
_
sender
:
Any
)
{
print
(
"保存"
)
print
(
"save "
)
let
alertView
=
GeliAlertView
(
frame
:
self
.
view
.
window
!.
bounds
)
alertView
.
delegate
=
self
alertView
.
tishiLbl
.
text
=
""
if
navTitle
==
"编辑地址"
{
alertView
.
titileLbl
.
text
=
"是否提交地址修改?"
}
else
{
alertView
.
titileLbl
.
text
=
"是否保存当前地址?"
}
alertView
.
rightBtn
.
setAttributedTitle
(
NSAttributedString
(
string
:
"确定"
),
for
:
.
normal
)
self
.
view
.
window
?
.
addSubview
(
alertView
)
}
var
pcdStr
:
String
?
var
navTitle
:
String
?
func
getIndex
(){
let
path
=
Bundle
.
main
.
path
(
forResource
:
"address_new"
,
ofType
:
"json"
)
let
url
=
URL
(
fileURLWithPath
:
path
!
)
// 带throws的方法需要抛异常
do
{
let
data
=
try
Data
(
contentsOf
:
url
)
let
jsonData
=
JSON
(
data
)
print
(
"地址文件数据"
,
jsonData
[
"data"
])
self
.
addressArray
=
jsonData
[
"data"
]
.
arrayObject
!
if
navTitle
==
"编辑地址"
{
for
i
in
0
..<
addressArray
.
count
{
let
item
=
addressArray
[
i
]
as!
Dictionary
<
String
,
Any
>
if
item
[
"area_id"
]
as!
Int
==
provinceIndex
{
let
citys
=
item
[
"city_list"
]
as!
Array
<
Dictionary
<
String
,
Any
>>
for
j
in
0
..<
citys
.
count
{
let
cItem
=
citys
[
j
]
if
cItem
[
"area_id"
]
as!
Int
==
cityIndex
{
let
districts
=
cItem
[
"district_list"
]
as!
Array
<
Dictionary
<
String
,
Any
>>
for
k
in
0
..<
districts
.
count
{
let
dItem
=
districts
[
k
]
if
dItem
[
"area_id"
]
as!
Int
==
areaIndex
{
print
(
"id === "
,
k
,
dItem
[
"area_id"
],
areaIndex
)
provinceIndex
=
i
cityIndex
=
j
areaIndex
=
k
break
}
}
}
}
}
}
}
}
catch
let
error
as
Error
?
{
print
(
"读取本地数据出现错误!"
,
error
as
Any
)
}
}
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
getIndex
()
navbar
.
title
=
navTitle
if
navTitle
==
"编辑地址"
{
navbar
.
rightTitle
=
"删除"
// navbar.rightTitle = "删除"
if
pcdStr
!=
nil
{
holderArr
.
insert
(
pcdStr
!
,
at
:
1
)
holderArr
.
remove
(
at
:
2
)
}
}
self
.
view
.
addSubview
(
navbar
)
...
...
@@ -35,6 +173,7 @@ class XinZengDiZhiViewController: BaseViewController,UITableViewDelegate,UITable
make
.
left
.
right
.
equalTo
(
0
)
make
.
height
.
equalTo
(
418*
glscale
)
}
listView
.
isScrollEnabled
=
false
listView
.
register
(
UINib
(
nibName
:
"TitleAndTFCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndTFCell"
)
listView
.
register
(
UINib
(
nibName
:
"TitleAndBtnCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndBtnCell"
)
...
...
@@ -42,14 +181,99 @@ class XinZengDiZhiViewController: BaseViewController,UITableViewDelegate,UITable
listView
.
register
(
UINib
(
nibName
:
"TitleAndTFAndBtnCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndTFAndBtnCell"
)
// Do any additional setup after loading the view.
showAreaSelect
()
}
@objc
func
adrSelectFinish
(
sender
:
UIButton
){
let
proDict
=
addressArray
[
provinceIndex
]
as!
Dictionary
<
String
,
Any
>
let
cityDict
=
(
proDict
[
"city_list"
]
as!
NSArray
)[
cityIndex
]
as!
[
String
:
AnyObject
]
let
areaDict
=
(
cityDict
[
"district_list"
]
as!
NSArray
)[
areaIndex
]
as!
Dictionary
<
String
,
Any
>
let
selectAdr
=
"
\(
proDict
[
"area_name"
]
!
)
"
+
"-"
+
"
\(
cityDict
[
"area_name"
]
!
)
"
+
"-"
+
"
\(
areaDict
[
"area_name"
]
!
)
"
holderArr
.
insert
(
selectAdr
,
at
:
1
)
holderArr
.
remove
(
at
:
2
)
bgBtn
?
.
removeFromSuperview
()
btmView
?
.
subviews
.
forEach
({
(
view
)
in
view
.
removeFromSuperview
()
})
btmView
?
.
removeFromSuperview
()
btmView
=
nil
bgBtn
=
nil
listView
.
reloadData
()
}
@objc
func
closeAction
(
sender
:
UIButton
){
bgBtn
?
.
removeFromSuperview
()
btmView
?
.
subviews
.
forEach
({
(
view
)
in
view
.
removeFromSuperview
()
})
btmView
?
.
removeFromSuperview
()
btmView
=
nil
bgBtn
=
nil
}
var
btmView
:
UIView
?
var
bgBtn
:
UIButton
?
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
print
(
indexPath
.
section
,
indexPath
.
row
)
if
indexPath
.
section
==
0
{
if
indexPath
.
row
==
1
{
if
bgBtn
==
nil
{
let
btn
=
UIButton
()
self
.
view
.
addSubview
(
btn
)
btn
.
backgroundColor
=
UIColor
.
black
btn
.
alpha
=
0.4
btn
.
addTarget
(
self
,
action
:
#selector(
closeAction(sender:)
)
,
for
:
.
touchUpInside
)
btn
.
snp
.
makeConstraints
{
(
make
)
in
make
.
top
.
right
.
bottom
.
left
.
equalTo
(
0
)
}
bgBtn
=
btn
}
if
btmView
==
nil
{
let
view
=
UIView
()
view
.
backgroundColor
=
UIColor
.
white
btmView
=
view
self
.
view
.
addSubview
(
btmView
!
)
btmView
!.
snp
.
makeConstraints
{
(
make
)
in
make
.
left
.
bottom
.
right
.
equalTo
(
0
)
make
.
height
.
equalTo
(
230
)
}
showAreaSelect
(
view
:
btmView
!
)
let
rightBtn
=
UIButton
()
rightBtn
.
setTitle
(
"确定"
,
for
:
.
normal
)
rightBtn
.
setTitleColor
(
UIColor
(
named
:
"蓝色字体颜色"
),
for
:
.
normal
)
rightBtn
.
titleLabel
?
.
font
=
UIFont
.
systemFont
(
ofSize
:
13
)
rightBtn
.
addTarget
(
self
,
action
:
#selector(
adrSelectFinish(sender:)
)
,
for
:
.
touchUpInside
)
btmView
?
.
addSubview
(
rightBtn
)
rightBtn
.
snp
.
makeConstraints
{
(
make
)
in
make
.
right
.
equalTo
(
-
15
)
make
.
top
.
equalTo
(
0
)
make
.
height
.
equalTo
(
30
)
make
.
width
.
equalTo
(
50
)
}
let
leftBtn
=
UIButton
()
leftBtn
.
setTitle
(
"取消"
,
for
:
.
normal
)
leftBtn
.
setTitleColor
(
UIColor
(
named
:
"多选按钮字体颜色"
),
for
:
.
normal
)
leftBtn
.
titleLabel
?
.
font
=
UIFont
.
systemFont
(
ofSize
:
13
)
leftBtn
.
addTarget
(
self
,
action
:
#selector(
closeAction(sender:)
)
,
for
:
.
touchUpInside
)
btmView
?
.
addSubview
(
leftBtn
)
leftBtn
.
snp
.
makeConstraints
{
(
make
)
in
make
.
left
.
equalTo
(
15
)
make
.
top
.
equalTo
(
0
)
make
.
height
.
equalTo
(
30
)
make
.
width
.
equalTo
(
50
)
}
}
}
}
}
func
rightBtnClick
()
{
print
(
"删除"
)
}
//MARK: - cell delegate
func
TitleAndTFAndBtnCellBtnClick
()
{
let
vc
=
SJMapViewController
()
vc
.
delegate
=
self
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
UIView
?
{
...
...
@@ -81,17 +305,38 @@ class XinZengDiZhiViewController: BaseViewController,UITableViewDelegate,UITable
if
indexPath
.
row
!=
1
&&
indexPath
.
row
!=
2
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndTFCell"
)
as!
TitleAndTFCell
cell
.
nameLbl
.
text
=
titleArr
[
indexPath
.
row
]
if
indexPath
.
row
==
0
{
//收货人
cell
.
textTF
.
keyboardType
=
.
default
cell
.
textTF
.
text
=
nameStr
}
if
indexPath
.
row
==
3
{
//手机
cell
.
textTF
.
keyboardType
=
.
numberPad
cell
.
textTF
.
text
=
phone
}
if
indexPath
.
row
==
4
{
//电话
cell
.
textTF
.
keyboardType
=
.
numberPad
cell
.
textTF
.
text
=
tel
}
if
indexPath
.
row
==
5
{
//邮编
cell
.
textTF
.
keyboardType
=
.
numberPad
cell
.
textTF
.
text
=
zip
}
cell
.
textTF
.
placeholder
=
holderArr
[
indexPath
.
row
]
cell
.
tag
=
indexPath
.
row
cell
.
textTF
.
tag
=
cell
.
tag
cell
.
textTF
.
delegate
=
self
return
cell
}
if
indexPath
.
row
==
1
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndBtnCell"
)
as!
TitleAndBtnCell
cell
.
nameLbl
.
text
=
titleArr
[
indexPath
.
row
]
cell
.
contentLbl
.
text
=
holderArr
[
indexPath
.
row
]
cell
.
btn
.
isUserInteractionEnabled
=
false
return
cell
}
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"TitleAndTFAndBtnCell"
)
as!
TitleAndTFAndBtnCell
cell
.
titleLbl
.
text
=
titleArr
[
indexPath
.
row
]
cell
.
textTF
.
text
=
adrStr
cell
.
textTF
.
placeholder
=
holderArr
[
indexPath
.
row
]
cell
.
delegate
=
self
return
cell
...
...
@@ -100,50 +345,44 @@ class XinZengDiZhiViewController: BaseViewController,UITableViewDelegate,UITable
cell
.
namelbl
.
text
=
"设为默认收货地址"
if
indexPath
.
section
==
1
{
cell
.
namelbl
.
text
=
"设为默认寄件地址"
cell
.
infoSw
.
isOn
=
is_send_default
}
else
{
cell
.
infoSw
.
isOn
=
is_default
}
cell
.
tag
=
indexPath
.
section
cell
.
delegate
=
self
return
cell
}
}
//MARK:--地址选择器
func
showAreaSelect
(){
func
showAreaSelect
(
view
:
UIView
){
//创建选择器
let
path
=
Bundle
.
main
.
path
(
forResource
:
"address_new"
,
ofType
:
"json"
)
let
url
=
URL
(
fileURLWithPath
:
path
!
)
// 带throws的方法需要抛异常
do
{
let
data
=
try
Data
(
contentsOf
:
url
)
let
jsonData
=
JSON
(
data
)
print
(
"地址文件数据"
,
jsonData
[
"data"
])
self
.
addressArray
=
jsonData
[
"data"
]
.
arrayObject
!
//创建选择器
pickerView
=
UIPickerView
()
//将dataSource设置成自己
pickerView
.
dataSource
=
self
//将delegate设置成自己
pickerView
.
delegate
=
self
self
.
view
.
addSubview
(
pickerView
)
pickerView
.
snp
.
makeConstraints
{
(
make
)
in
make
.
left
.
right
.
equalTo
(
0
)
make
.
height
.
equalTo
(
200
)
make
.
top
.
equalTo
(
600
)
}
}
catch
let
error
as
Error
?
{
print
(
"读取本地数据出现错误!"
,
error
as
Any
)
pickerView
=
UIPickerView
()
//将dataSource设置成自己
pickerView
.
dataSource
=
self
//将delegate设置成自己
pickerView
.
delegate
=
self
view
.
addSubview
(
pickerView
)
pickerView
.
snp
.
makeConstraints
{
(
make
)
in
make
.
top
.
equalTo
(
30
)
make
.
left
.
right
.
bottom
.
equalTo
(
0
)
}
pickerView
.
selectRow
(
provinceIndex
,
inComponent
:
0
,
animated
:
false
)
pickerView
(
pickerView
,
didSelectRow
:
provinceIndex
,
inComponent
:
0
)
pickerView
.
selectRow
(
cityIndex
,
inComponent
:
1
,
animated
:
false
)
pickerView
(
pickerView
,
didSelectRow
:
cityIndex
,
inComponent
:
1
)
pickerView
.
selectRow
(
areaIndex
,
inComponent
:
2
,
animated
:
false
)
pickerView
(
pickerView
,
didSelectRow
:
areaIndex
,
inComponent
:
2
)
}
//选择器
var
pickerView
:
UIPickerView
!
//所以地址数据集合
var
addressArray
:
Array
<
Any
>
=
[]
//选择的省索引
var
provinceIndex
=
0
//选择的市索引
var
cityIndex
=
0
//选择的区(县)索引
var
areaIndex
=
0
//设置选择框的列数为3列,继承于UIPickerViewDataSource协议
func
numberOfComponents
(
in
pickerView
:
UIPickerView
)
->
Int
{
return
3
...
...
@@ -198,17 +437,14 @@ class XinZengDiZhiViewController: BaseViewController,UITableViewDelegate,UITable
switch
(
component
)
{
case
0
:
provinceIndex
=
row
;
cityIndex
=
0
;
areaIndex
=
0
;
pickerView
.
reloadComponent
(
1
);
pickerView
.
reloadComponent
(
2
);
pickerView
.
selectRow
(
0
,
inComponent
:
1
,
animated
:
false
)
pickerView
.
selectRow
(
0
,
inComponent
:
2
,
animated
:
false
)
pickerView
.
selectRow
(
cityIndex
,
inComponent
:
1
,
animated
:
false
)
pickerView
.
selectRow
(
areaIndex
,
inComponent
:
2
,
animated
:
false
)
case
1
:
cityIndex
=
row
;
areaIndex
=
0
;
pickerView
.
reloadComponent
(
2
);
pickerView
.
selectRow
(
0
,
inComponent
:
2
,
animated
:
false
)
pickerView
.
selectRow
(
areaIndex
,
inComponent
:
2
,
animated
:
false
)
case
2
:
areaIndex
=
row
;
default
:
...
...
@@ -240,4 +476,35 @@ class XinZengDiZhiViewController: BaseViewController,UITableViewDelegate,UITable
return
genderLbl
}
func
SJMapViewControllerSelectArd
(
adr
:
String
)
{
adrStr
=
adr
listView
.
reloadData
()
}
func
textFieldDidEndEditing
(
_
textField
:
UITextField
)
{
if
textField
.
tag
==
0
{
if
textField
.
text
!.
containsEmoji
{
HUD
.
flash
(
.
label
(
"内容不得包含表情符号"
),
delay
:
1.2
)
textField
.
text
=
""
}
else
{
nameStr
=
textField
.
text
!
}
}
if
textField
.
tag
==
3
{
phone
=
textField
.
text
!
}
if
textField
.
tag
==
4
{
tel
=
textField
.
text
!
}
if
textField
.
tag
==
5
{
zip
=
textField
.
text
!
}
listView
.
reloadData
()
}
func
switchClick
(
content
:
UISwitch
,
cell
:
TitleAndSwitchCell
)
{
if
cell
.
tag
==
1
{
//寄件
is_send_default
=
content
.
isOn
}
is_default
=
content
.
isOn
}
}
GeliBusinessPlatform/ViewController/地址管理/XinZengDiZhiViewController.xib
View file @
f9e5a69e
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
5702
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
6097
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"15704"
/>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"16087"
/>
<capability
name=
"Named colors"
minToolsVersion=
"9.0"
/>
<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"
customClass=
"XinZengDiZhiViewController"
customModule=
"
GeliBusinessPlatform
"
customModuleProvider=
"target"
>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"XinZengDiZhiViewController"
customModule=
"
TestClass
"
customModuleProvider=
"target"
>
<connections>
<outlet
property=
"listView"
destination=
"8oC-r4-8Ak"
id=
"BND-Zt-77I"
/>
<outlet
property=
"view"
destination=
"i5M-Pr-FkT"
id=
"sfx-zR-JGt"
/>
...
...
@@ -32,7 +33,7 @@
<userDefinedRuntimeAttribute
type=
"boolean"
keyPath=
"gradientHorizontal"
value=
"YES"
/>
</userDefinedRuntimeAttributes>
<connections>
<action
selector=
"saveAction:"
destination=
"-1"
eventType=
"
valueChanged"
id=
"Azy-JY-gMp
"
/>
<action
selector=
"saveAction:"
destination=
"-1"
eventType=
"
touchUpInside"
id=
"LQs-al-C7J
"
/>
</connections>
</view>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
usesAttributedText=
"YES"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"2aH-ML-hyn"
>
...
...
GeliBusinessPlatform/ViewController/工作中心/WorkCViewController.swift
View file @
f9e5a69e
...
...
@@ -423,9 +423,9 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
return
case
59
:
//地址管理
//
let vc = DZGLViewController()
let
vc
=
XinZengDiZhiViewController
()
//新增
vc
.
navTitle
=
"新增地址"
let
vc
=
DZGLViewController
()
//
let vc = XinZengDiZhiViewController()//新增
//
vc.navTitle = "新增地址"
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
return
case
61
:
//库存商品
...
...
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