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
eaf854fe
Commit
eaf854fe
authored
Apr 07, 2021
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asdf;lasdf/.lasd;ksadf?
parent
9771b2dc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
9 deletions
+57
-9
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
+29
-9
GeliBusinessPlatform/ViewController/拼拼货group/P_P_H_Adr_VC.xib
...BusinessPlatform/ViewController/拼拼货group/P_P_H_Adr_VC.xib
+28
-0
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
eaf854fe
No preview for this file type
GeliBusinessPlatform/ViewController/拼拼货group/P_P_H_Adr_VC.swift
View file @
eaf854fe
...
...
@@ -9,9 +9,14 @@
import
UIKit
import
SwiftyJSON
class
P_P_H_Adr_VC
:
BaseViewController
,
SJMapViewControllerDelegate
,
UIPickerViewDataSource
,
UIPickerViewDelegate
{
var
dzStr
=
""
var
detailDzStr
=
""
class
P_P_H_Adr_VC
:
BaseViewController
,
SJMapViewControllerDelegate
,
UIPickerViewDataSource
,
UIPickerViewDelegate
,
UITextViewDelegate
{
@IBOutlet
weak
var
count_lbl
:
UILabel
!
@IBOutlet
weak
var
textTV
:
UITextView
!
@IBOutlet
weak
var
phoneTf
:
UITextField
!
@IBOutlet
weak
var
adrTf
:
UITextField
!
@IBOutlet
weak
var
nameTf
:
UITextField
!
var
btmView
:
UIView
?
var
bgBtn
:
UIButton
?
//选择的省索引
...
...
@@ -22,7 +27,7 @@ class P_P_H_Adr_VC: BaseViewController,SJMapViewControllerDelegate, UIPickerView
var
areaIndex
=
0
func
SJMapViewControllerSelectArd
(
adr
:
String
,
cityData
:
String
)
{
dzStr
=
cityData
city_lbl
.
text
=
cityData
let
arr
=
cityData
.
components
(
separatedBy
:
"-"
)
for
i
in
0
..<
addressArray
.
count
{
let
provinceData
=
addressArray
[
i
]
as!
Dictionary
<
String
,
Any
>
...
...
@@ -45,7 +50,7 @@ class P_P_H_Adr_VC: BaseViewController,SJMapViewControllerDelegate, UIPickerView
}
}
detailDzStr
=
adr
adrTf
.
text
=
adr
}
...
...
@@ -83,7 +88,7 @@ class P_P_H_Adr_VC: BaseViewController,SJMapViewControllerDelegate, UIPickerView
}
}
dzStr
=
selectAdr
bgBtn
?
.
removeFromSuperview
()
btmView
?
.
subviews
.
forEach
({
(
view
)
in
view
.
removeFromSuperview
()
...
...
@@ -91,7 +96,20 @@ class P_P_H_Adr_VC: BaseViewController,SJMapViewControllerDelegate, UIPickerView
btmView
?
.
removeFromSuperview
()
btmView
=
nil
bgBtn
=
nil
city_lbl
.
text
=
selectAdr
}
func
textViewDidChange
(
_
textView
:
UITextView
)
{
if
textView
.
text
.
count
>
200
{
if
let
str
=
textView
.
text
{
let
subStr
=
str
.
prefix
(
200
)
textView
.
text
=
String
(
subStr
)
}
}
count_lbl
.
text
=
"
\(
textView
.
text
.
count
)
/200"
}
@objc
func
closeAction
(
sender
:
UIButton
){
bgBtn
?
.
removeFromSuperview
()
btmView
?
.
subviews
.
forEach
({
(
view
)
in
...
...
@@ -167,6 +185,8 @@ class P_P_H_Adr_VC: BaseViewController,SJMapViewControllerDelegate, UIPickerView
}
getIndex
()
textTV
.
delegate
=
self
}
...
...
@@ -187,7 +207,7 @@ class P_P_H_Adr_VC: BaseViewController,SJMapViewControllerDelegate, UIPickerView
let
citys
=
item
[
"city_list"
]
as!
Array
<
Dictionary
<
String
,
Any
>>
if
citys
.
count
==
0
{
provinceIndex
=
i
dzStr
=
item
[
"area_name"
]
!
as!
String
city_lbl
.
text
=
item
[
"area_name"
]
!
as!
String
}
for
j
in
0
..<
citys
.
count
{
let
cItem
=
citys
[
j
]
...
...
@@ -195,7 +215,7 @@ class P_P_H_Adr_VC: BaseViewController,SJMapViewControllerDelegate, UIPickerView
let
districts
=
cItem
[
"district_list"
]
as!
Array
<
Dictionary
<
String
,
Any
>>
if
districts
.
count
==
0
{
cityIndex
=
j
dzStr
=
"
\(
item
[
"area_name"
]
!
)
-
\(
cItem
[
"area_name"
]
!
)
"
city_lbl
.
text
=
"
\(
item
[
"area_name"
]
!
)
-
\(
cItem
[
"area_name"
]
!
)
"
}
for
k
in
0
..<
districts
.
count
{
let
dItem
=
districts
[
k
]
...
...
@@ -203,7 +223,7 @@ class P_P_H_Adr_VC: BaseViewController,SJMapViewControllerDelegate, UIPickerView
provinceIndex
=
i
cityIndex
=
j
areaIndex
=
k
dzStr
=
"
\(
item
[
"area_name"
]
!
)
-
\(
cItem
[
"area_name"
]
!
)
-
\(
dItem
[
"area_name"
]
!
)
"
city_lbl
.
text
=
"
\(
item
[
"area_name"
]
!
)
-
\(
cItem
[
"area_name"
]
!
)
-
\(
dItem
[
"area_name"
]
!
)
"
break
}
}
...
...
GeliBusinessPlatform/ViewController/拼拼货group/P_P_H_Adr_VC.xib
View file @
eaf854fe
...
...
@@ -12,7 +12,12 @@
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"P_P_H_Adr_VC"
customModule=
"TestClass"
customModuleProvider=
"target"
>
<connections>
<outlet
property=
"adrTf"
destination=
"c79-WN-La1"
id=
"lqQ-rc-8Ck"
/>
<outlet
property=
"city_lbl"
destination=
"qSB-h2-bQB"
id=
"IgF-C6-mjv"
/>
<outlet
property=
"count_lbl"
destination=
"Vv5-0g-G5Q"
id=
"j8d-11-Hua"
/>
<outlet
property=
"nameTf"
destination=
"K6G-YC-k50"
id=
"hRS-18-XCj"
/>
<outlet
property=
"phoneTf"
destination=
"Xw0-ZF-SNA"
id=
"2aS-a6-39Z"
/>
<outlet
property=
"textTV"
destination=
"SOk-O6-8QU"
id=
"7Cb-eJ-PdP"
/>
<outlet
property=
"top_view"
destination=
"Hje-Lv-QT9"
id=
"Oan-uX-vYR"
/>
<outlet
property=
"view"
destination=
"i5M-Pr-FkT"
id=
"sfx-zR-JGt"
/>
</connections>
...
...
@@ -317,7 +322,30 @@
</label>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"L26-Wm-cnn"
>
<rect
key=
"frame"
x=
"10"
y=
"60.5"
width=
"364"
height=
"142"
/>
<subviews>
<textView
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"scaleToFill"
textAlignment=
"natural"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"SOk-O6-8QU"
>
<rect
key=
"frame"
x=
"5"
y=
"5"
width=
"354"
height=
"132"
/>
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
<color
key=
"textColor"
name=
"标题字颜色"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<textInputTraits
key=
"textInputTraits"
autocapitalizationType=
"sentences"
/>
</textView>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"0/200"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Vv5-0g-G5Q"
>
<rect
key=
"frame"
x=
"317.5"
y=
"118.5"
width=
"31.5"
height=
"13.5"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"11"
/>
<color
key=
"textColor"
name=
"#999999"
/>
<nil
key=
"highlightedColor"
/>
</label>
</subviews>
<color
key=
"backgroundColor"
name=
"app底色"
/>
<constraints>
<constraint
firstItem=
"SOk-O6-8QU"
firstAttribute=
"leading"
secondItem=
"L26-Wm-cnn"
secondAttribute=
"leading"
constant=
"5"
id=
"8hS-gR-NxS"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"SOk-O6-8QU"
secondAttribute=
"trailing"
constant=
"5"
id=
"Dls-aX-kjm"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"SOk-O6-8QU"
secondAttribute=
"bottom"
constant=
"5"
id=
"Iin-MT-R3m"
/>
<constraint
firstItem=
"SOk-O6-8QU"
firstAttribute=
"top"
secondItem=
"L26-Wm-cnn"
secondAttribute=
"top"
constant=
"5"
id=
"JJF-RO-7ia"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"Vv5-0g-G5Q"
secondAttribute=
"bottom"
constant=
"10"
id=
"nrz-b5-f8X"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"Vv5-0g-G5Q"
secondAttribute=
"trailing"
constant=
"15"
id=
"ryz-b0-dep"
/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute
type=
"number"
keyPath=
"cornerRadius"
>
<real
key=
"value"
value=
"8"
/>
...
...
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