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
0329f2d4
Commit
0329f2d4
authored
Apr 20, 2021
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sadfsadfsafasfd332323232324
parent
b7881fe0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
13 deletions
+56
-13
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/ViewController/拼拼货group/P_P_H_Adr_VC.swift
...sinessPlatform/ViewController/拼拼货group/P_P_H_Adr_VC.swift
+40
-13
GeliBusinessPlatform/ViewController/拼拼货group/P_P_H_Adr_VC.xib
...BusinessPlatform/ViewController/拼拼货group/P_P_H_Adr_VC.xib
+16
-0
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
0329f2d4
No preview for this file type
GeliBusinessPlatform/ViewController/拼拼货group/P_P_H_Adr_VC.swift
View file @
0329f2d4
...
...
@@ -39,7 +39,9 @@ class P_P_H_Adr_VC: BaseViewController,SJMapViewControllerDelegate, UIPickerView
func
SJMapViewControllerSelectArd
(
adr
:
String
,
cityData
:
String
,
loc
:
String
)
{
city_lbl
.
text
=
cityData
adrLast
=
adr
.
components
(
separatedBy
:
":"
)
.
last
!
adrTf
.
text
=
adr
.
components
(
separatedBy
:
":"
)
.
first
!
adrTv
.
text
=
adr
.
components
(
separatedBy
:
":"
)
.
first
!
adrTf
.
isHidden
=
true
getInsets
()
let
ar
=
loc
.
components
(
separatedBy
:
"-"
)
self
.
lng
=
(
ar
.
last
!
as
NSString
)
.
doubleValue
...
...
@@ -55,10 +57,10 @@ class P_P_H_Adr_VC: BaseViewController,SJMapViewControllerDelegate, UIPickerView
HUD
.
flash
(
.
label
(
"请选择地址"
),
delay
:
1.2
)
return
}
// if phoneTf.text?.count != 11 {
// HUD.flash(.label("请输入正确的手机号码"), delay: 1.2)
// return
// }
// if phoneTf.text?.count != 11 {
// HUD.flash(.label("请输入正确的手机号码"), delay: 1.2)
// return
// }
var
type
=
3
if
isSend
{
type
=
4
...
...
@@ -67,7 +69,7 @@ class P_P_H_Adr_VC: BaseViewController,SJMapViewControllerDelegate, UIPickerView
"province_name"
:
arr
[
0
]
as
Any
,
"city_name"
:
arr
[
1
]
as
Any
,
"district_name"
:
arr
[
2
]
as
Any
,
"address"
:
adrT
f
.
text
as
Any
,
"address"
:
adrT
v
.
text
as
Any
,
"linkman"
:
nameTf
.
text
as
Any
,
"shopName"
:
city_lbl
.
text
as
Any
,
"mobile"
:
phoneTf
.
text
as
Any
,
...
...
@@ -84,7 +86,7 @@ class P_P_H_Adr_VC: BaseViewController,SJMapViewControllerDelegate, UIPickerView
nameTf
.
resignFirstResponder
()
phoneTf
.
resignFirstResponder
()
textTV
.
resignFirstResponder
()
adrT
f
.
resignFirstResponder
()
adrT
v
.
resignFirstResponder
()
let
vc
=
SJMapViewController
()
vc
.
delegate
=
self
vc
.
isPPH
=
true
...
...
@@ -133,6 +135,7 @@ class P_P_H_Adr_VC: BaseViewController,SJMapViewControllerDelegate, UIPickerView
}
func
textViewDidChange
(
_
textView
:
UITextView
)
{
if
textView
==
textTV
{
if
textView
.
text
.
count
!=
0
{
holder_lbl
.
isHidden
=
true
}
else
{
...
...
@@ -145,12 +148,23 @@ class P_P_H_Adr_VC: BaseViewController,SJMapViewControllerDelegate, UIPickerView
}
}
count_lbl
.
text
=
"
\(
textView
.
text
.
count
)
/200"
}
else
{
if
textView
.
text
.
count
!=
0
{
adrTf
.
isHidden
=
true
}
else
{
adrTf
.
isHidden
=
false
}
getInsets
()
}
checkInfo
()
}
@IBOutlet
weak
var
adrTv
:
UITextView
!
@IBOutlet
weak
var
clearBtn
:
UIButton
!
@IBAction
func
clearAction
(
_
sender
:
Any
)
{
adrTf
.
text
=
""
adrTv
.
text
=
""
getInsets
()
phoneTf
.
text
=
""
nameTf
.
text
=
""
city_lbl
.
text
=
"请选择城市"
...
...
@@ -171,14 +185,14 @@ class P_P_H_Adr_VC: BaseViewController,SJMapViewControllerDelegate, UIPickerView
@IBOutlet
weak
var
holder_lbl
:
UILabel
!
func
checkInfo
(){
if
adrT
f
.
text
?
.
count
!=
0
&&
phoneTf
.
text
?
.
count
!=
0
&&
nameTf
.
text
?
.
count
!=
0
&&
city_lbl
.
text
!=
"请选择城市"
{
if
adrT
v
.
text
?
.
count
!=
0
&&
phoneTf
.
text
?
.
count
!=
0
&&
nameTf
.
text
?
.
count
!=
0
&&
city_lbl
.
text
!=
"请选择城市"
{
submit_btn
.
isUserInteractionEnabled
=
true
submit_btn
.
alpha
=
1
}
else
{
submit_btn
.
isUserInteractionEnabled
=
false
submit_btn
.
alpha
=
0.5
}
if
adrT
f
.
text
?
.
count
!=
0
||
phoneTf
.
text
?
.
count
!=
0
||
nameTf
.
text
?
.
count
!=
0
||
textTV
.
text
.
count
!=
0
||
city_lbl
.
text
!=
"请选择城市"
{
if
adrT
v
.
text
?
.
count
!=
0
||
phoneTf
.
text
?
.
count
!=
0
||
nameTf
.
text
?
.
count
!=
0
||
textTV
.
text
.
count
!=
0
||
city_lbl
.
text
!=
"请选择城市"
{
clearBtn
.
isUserInteractionEnabled
=
true
clearBtn
.
alpha
=
1
}
else
{
...
...
@@ -198,7 +212,6 @@ class P_P_H_Adr_VC: BaseViewController,SJMapViewControllerDelegate, UIPickerView
self
.
view
.
addSubview
(
navbar
)
nameTf
.
addTarget
(
self
,
action
:
#selector(
textChangeTf(tf:)
)
,
for
:
.
allEditingEvents
)
phoneTf
.
addTarget
(
self
,
action
:
#selector(
textChangeTf(tf:)
)
,
for
:
.
allEditingEvents
)
adrTf
.
addTarget
(
self
,
action
:
#selector(
textChangeTf(tf:)
)
,
for
:
.
allEditingEvents
)
top_view
.
snp
.
makeConstraints
{
(
make
)
in
make
.
top
.
equalTo
(
NavCGRect
.
height
+
10
)
...
...
@@ -214,7 +227,8 @@ class P_P_H_Adr_VC: BaseViewController,SJMapViewControllerDelegate, UIPickerView
if
adrInfo
!=
nil
{
city_lbl
.
text
=
adrInfo
?
.
shopName
textTV
.
text
=
adrInfo
?
.
note
adrTf
.
text
=
adrInfo
?
.
address
adrTv
.
text
=
adrInfo
?
.
address
getInsets
()
nameTf
.
text
=
adrInfo
?
.
linkman
phoneTf
.
text
=
adrInfo
?
.
mobile
lat
=
adrInfo
!.
lat
!
...
...
@@ -229,6 +243,7 @@ class P_P_H_Adr_VC: BaseViewController,SJMapViewControllerDelegate, UIPickerView
}
func
getIndex
(){
let
path
=
Bundle
.
main
.
path
(
forResource
:
"address_new"
,
ofType
:
"json"
)
let
url
=
URL
(
fileURLWithPath
:
path
!
)
...
...
@@ -402,5 +417,17 @@ class P_P_H_Adr_VC: BaseViewController,SJMapViewControllerDelegate, UIPickerView
return
genderLbl
}
@IBOutlet
weak
var
adrCenterY
:
NSLayoutConstraint
!
func
textSize
(
text
:
String
,
font
:
UIFont
,
maxSize
:
CGSize
)
->
CGSize
{
return
text
.
boundingRect
(
with
:
maxSize
,
options
:
[
.
usesLineFragmentOrigin
],
attributes
:
[
NSAttributedString
.
Key
.
font
:
font
],
context
:
nil
)
.
size
}
func
getInsets
()
{
let
tvSize
=
textSize
(
text
:
adrTv
.
text
,
font
:
UIFont
.
systemFont
(
ofSize
:
13
),
maxSize
:
CGSize
(
width
:
adrTv
.
bounds
.
size
.
width
,
height
:
900
))
if
tvSize
.
height
>
20
{
adrCenterY
.
constant
=
-
2
}
else
{
adrCenterY
.
constant
=
4
}
}
}
GeliBusinessPlatform/ViewController/拼拼货group/P_P_H_Adr_VC.xib
View file @
0329f2d4
...
...
@@ -12,7 +12,9 @@
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"P_P_H_Adr_VC"
customModule=
"TestClass"
customModuleProvider=
"target"
>
<connections>
<outlet
property=
"adrCenterY"
destination=
"9HD-uo-omN"
id=
"NZs-VH-0Ey"
/>
<outlet
property=
"adrTf"
destination=
"c79-WN-La1"
id=
"lqQ-rc-8Ck"
/>
<outlet
property=
"adrTv"
destination=
"bWc-5F-zex"
id=
"EAd-CQ-NBa"
/>
<outlet
property=
"city_lbl"
destination=
"qSB-h2-bQB"
id=
"IgF-C6-mjv"
/>
<outlet
property=
"clearBtn"
destination=
"Sya-Y4-SHc"
id=
"U7f-h0-3kb"
/>
<outlet
property=
"count_lbl"
destination=
"Vv5-0g-G5Q"
id=
"j8d-11-Hua"
/>
...
...
@@ -242,6 +244,16 @@
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Regular"
family=
"PingFang SC"
pointSize=
"13"
/>
<textInputTraits
key=
"textInputTraits"
/>
</textField>
<textView
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"scaleToFill"
textAlignment=
"natural"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"bWc-5F-zex"
>
<rect
key=
"frame"
x=
"70"
y=
"157"
width=
"299"
height=
"42"
/>
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
<color
key=
"textColor"
name=
"标题字颜色"
/>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Regular"
family=
"PingFang SC"
pointSize=
"13"
/>
<textInputTraits
key=
"textInputTraits"
autocapitalizationType=
"sentences"
/>
<connections>
<outlet
property=
"delegate"
destination=
"-1"
id=
"TJy-1W-7Fd"
/>
</connections>
</textView>
</subviews>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
/>
<constraints>
...
...
@@ -250,6 +262,8 @@
<constraint
firstItem=
"oQW-zP-UrW"
firstAttribute=
"centerY"
secondItem=
"dTK-sv-cT8"
secondAttribute=
"centerY"
id=
"4lS-HU-K3Z"
/>
<constraint
firstItem=
"c79-WN-La1"
firstAttribute=
"top"
secondItem=
"VhN-lm-X43"
secondAttribute=
"bottom"
id=
"5NX-xb-1d4"
/>
<constraint
firstItem=
"c79-WN-La1"
firstAttribute=
"centerY"
secondItem=
"Vx9-sb-QcV"
secondAttribute=
"centerY"
id=
"6br-Od-oYY"
/>
<constraint
firstItem=
"bWc-5F-zex"
firstAttribute=
"centerY"
secondItem=
"c79-WN-La1"
secondAttribute=
"centerY"
constant=
"4"
id=
"9HD-uo-omN"
/>
<constraint
firstItem=
"bWc-5F-zex"
firstAttribute=
"width"
secondItem=
"c79-WN-La1"
secondAttribute=
"width"
id=
"BNk-9F-2Op"
/>
<constraint
firstItem=
"Vx9-sb-QcV"
firstAttribute=
"leading"
secondItem=
"Hje-Lv-QT9"
secondAttribute=
"leading"
constant=
"10"
id=
"DvD-1k-SgT"
/>
<constraint
firstItem=
"nEW-3u-jw2"
firstAttribute=
"height"
secondItem=
"LpS-hu-fke"
secondAttribute=
"height"
id=
"Ex8-eM-aU4"
/>
<constraint
firstItem=
"LpS-hu-fke"
firstAttribute=
"leading"
secondItem=
"Hje-Lv-QT9"
secondAttribute=
"leading"
id=
"HEg-Xk-gKb"
/>
...
...
@@ -265,6 +279,8 @@
<constraint
firstAttribute=
"height"
constant=
"200"
id=
"fkG-O6-P7I"
/>
<constraint
firstItem=
"LpS-hu-fke"
firstAttribute=
"top"
secondItem=
"dTK-sv-cT8"
secondAttribute=
"bottom"
id=
"frC-Z2-eF2"
/>
<constraint
firstItem=
"dTK-sv-cT8"
firstAttribute=
"leading"
secondItem=
"Hje-Lv-QT9"
secondAttribute=
"leading"
constant=
"12.5"
id=
"iv8-9u-5uT"
/>
<constraint
firstItem=
"bWc-5F-zex"
firstAttribute=
"centerX"
secondItem=
"c79-WN-La1"
secondAttribute=
"centerX"
constant=
"-5"
id=
"jFo-9a-uqm"
/>
<constraint
firstItem=
"bWc-5F-zex"
firstAttribute=
"height"
secondItem=
"c79-WN-La1"
secondAttribute=
"height"
multiplier=
"0.8"
id=
"mle-Gz-tZw"
/>
<constraint
firstItem=
"nEW-3u-jw2"
firstAttribute=
"width"
secondItem=
"LpS-hu-fke"
secondAttribute=
"width"
id=
"nlD-GX-D6o"
/>
<constraint
firstItem=
"VhN-lm-X43"
firstAttribute=
"leading"
secondItem=
"Hje-Lv-QT9"
secondAttribute=
"leading"
id=
"obE-bw-6AP"
/>
<constraint
firstItem=
"UWp-ld-fgy"
firstAttribute=
"top"
secondItem=
"Hje-Lv-QT9"
secondAttribute=
"top"
constant=
"13"
id=
"pac-cV-Mrw"
/>
...
...
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