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
54d9e033
Commit
54d9e033
authored
May 22, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编辑界面待调整
parent
ff005a84
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
72 deletions
+34
-72
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/ViewController/代客下单(购物)/DaiKeXiaDanGouWuViewController.swift
...wController/代客下单(购物)/DaiKeXiaDanGouWuViewController.swift
+3
-41
GeliBusinessPlatform/ViewController/商品详情/EPViewController.swift
...sinessPlatform/ViewController/商品详情/EPViewController.swift
+31
-31
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
54d9e033
No preview for this file type
GeliBusinessPlatform/ViewController/代客下单(购物)/DaiKeXiaDanGouWuViewController.swift
View file @
54d9e033
...
@@ -73,15 +73,12 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
...
@@ -73,15 +73,12 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
listView
.
register
(
UINib
(
nibName
:
"TitleAndTFCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndTFCell"
)
listView
.
register
(
UINib
(
nibName
:
"TitleAndTFCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"TitleAndTFCell"
)
listView
.
register
(
UINib
(
nibName
:
"DaiKeXiaDanGouWuCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"DaiKeXiaDanGouWuCell"
)
listView
.
register
(
UINib
(
nibName
:
"DaiKeXiaDanGouWuCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"DaiKeXiaDanGouWuCell"
)
listView
.
register
(
UINib
(
nibName
:
"DKXDAdrCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"DKXDAdrCell"
)
listView
.
register
(
UINib
(
nibName
:
"DKXDAdrCell"
,
bundle
:
nil
),
forCellReuseIdentifier
:
"DKXDAdrCell"
)
let
barView
=
UIView
(
frame
:
CGRect
(
x
:
0
,
y
:
fullScreenHeight
,
width
:
fullScreenWidth
,
height
:
30
))
barView
.
backgroundColor
=
UIColor
.
red
self
.
view
.
insertSubview
(
barView
,
at
:
self
.
view
.
subviews
.
count
)
barV
=
barView
//TitleAndBtnCell TitleAndTFCell
//TitleAndBtnCell TitleAndTFCell
// Do any additional setup after loading the view.
// Do any additional setup after loading the view.
registerNotification
()
}
}
var
barV
:
UIView
?
//MARK: - cell delegate
//MARK: - cell delegate
func
addAction
()
{
func
addAction
()
{
...
@@ -376,40 +373,5 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
...
@@ -376,40 +373,5 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
view
.
removeFromSuperview
()
view
.
removeFromSuperview
()
glSelectView
=
nil
glSelectView
=
nil
}
}
//键盘监听
deinit
{
NotificationCenter
.
default
.
removeObserver
(
self
)
}
func
registerNotification
(){
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
keyBoardWillShow(_ :)
)
,
name
:
UIResponder
.
keyboardWillShowNotification
,
object
:
nil
)
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
keyBoardWillHide(_ :)
)
,
name
:
UIResponder
.
keyboardWillHideNotification
,
object
:
nil
)
}
//MARK:键盘通知相关操作
@objc
func
keyBoardWillShow
(
_
notification
:
Notification
){
DispatchQueue
.
main
.
async
{
let
user_info
=
notification
.
userInfo
let
keyValue
=
user_info
!
[
"UIKeyboardFrameEndUserInfoKey"
]
let
keyRect
=
(
keyValue
as
AnyObject
)
.
cgRectValue
let
y
=
keyRect
?
.
origin
.
y
let
animationTime
=
user_info
!
[
"UIKeyboardAnimationDurationUserInfoKey"
]
UIView
.
animate
(
withDuration
:
0.38
)
{
self
.
barV
?
.
frame
=
CGRect
(
x
:
0
,
y
:
y
!-
30
,
width
:
fullScreenWidth
,
height
:
30
)
}
}
}
@objc
func
keyBoardWillHide
(
_
notification
:
Notification
){
DispatchQueue
.
main
.
async
{
UIView
.
animate
(
withDuration
:
0.38
)
{
self
.
barV
?
.
frame
=
CGRect
(
x
:
0
,
y
:
fullScreenHeight
,
width
:
fullScreenWidth
,
height
:
30
)
}
}
}
}
}
GeliBusinessPlatform/ViewController/商品详情/EPViewController.swift
View file @
54d9e033
...
@@ -400,9 +400,13 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
...
@@ -400,9 +400,13 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
for
item
in
model
.
data
!.
sku_res
!
{
for
item
in
model
.
data
!.
sku_res
!
{
let
dataSource
=
item
let
dataSource
=
item
let
data
=
GuiGeModel
()
let
data
=
GuiGeModel
()
data
.
price
=
dataSource
.
price
!//
价格
data
.
danWei
=
dataSource
.
unit
!//
单位
data
.
danWei
=
dataSource
.
unit
!//
单位
data
.
sku_id
=
dataSource
.
sku_id
!//
sku_id
data
.
sku_id
=
dataSource
.
sku_id
!//
sku_id
data
.
guiGe
=
dataSource
.
spec_str
!//
规格
let
arr
=
dataSource
.
spec_str
?
.
components
(
separatedBy
:
":"
)
data
.
guiGe
=
(
arr
?
.
last
)
!//
规格
data
.
weight
=
dataSource
.
pack_attr
!//
重量
data
.
wenDu
=
dataSource
.
refrigerate
!//
温藏
//预售设置
//预售设置
data
.
isOpenYSSetting
=
false
data
.
isOpenYSSetting
=
false
if
dataSource
.
is_open_adsale
!
==
1
{
if
dataSource
.
is_open_adsale
!
==
1
{
...
@@ -438,6 +442,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
...
@@ -438,6 +442,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
if
dataSource
.
adsale_tiered_pri
!.
count
>
0
{
if
dataSource
.
adsale_tiered_pri
!.
count
>
0
{
data
.
specalArr
=
self
.
getResponseArr
(
str
:
dataSource
.
adsale_tiered_pri
!
)
data
.
specalArr
=
self
.
getResponseArr
(
str
:
dataSource
.
adsale_tiered_pri
!
)
}
}
print
(
"data P = "
,
data
.
price
)
self
.
guiGeArr
.
append
(
data
)
self
.
guiGeArr
.
append
(
data
)
}
}
}
}
...
@@ -1046,15 +1051,15 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
...
@@ -1046,15 +1051,15 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
vc
.
barTitle
=
"查看规格"
vc
.
barTitle
=
"查看规格"
}
}
vc
.
datasArr
=
guiGeArr
vc
.
datasArr
=
guiGeArr
print
(
"abbabab=== "
,
guiGeArr
.
count
,
selectIdx
?
.
item
)
vc
.
danWeiArr
=
generalInfoModel
?
.
data
?
.
unit
!
vc
.
danWeiArr
=
generalInfoModel
?
.
data
?
.
unit
!
let
dataDict
:
GuiGeModel
!
let
dataDict
:
GuiGeModel
!
if
selectIdx
?
.
item
!=
nil
{
if
selectIdx
?
.
item
!=
nil
{
dataDict
=
guiGeArr
[
selectIdx
!.
item
]
dataDict
=
guiGeArr
[
selectIdx
!.
item
]
}
else
{
}
else
{
dataDict
=
guiGeArr
.
first
dataDict
=
guiGeArr
.
first
}
}
print
(
"abbabab=== "
,
dataDict
.
price
)
vc
.
price
=
dataDict
.
price
vc
.
price
=
dataDict
.
price
vc
.
guiGe
=
dataDict
.
guiGe
vc
.
guiGe
=
dataDict
.
guiGe
vc
.
weight
=
dataDict
.
weight
vc
.
weight
=
dataDict
.
weight
...
@@ -1470,15 +1475,15 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
...
@@ -1470,15 +1475,15 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
goods_banner
?
.
forEach
({
(
str
)
in
goods_banner
?
.
forEach
({
(
str
)
in
tempArr
.
append
(
str
)
tempArr
.
append
(
str
)
})
})
var
data1
:
Array
<
Dictionary
<
String
,
String
>>
=
[]
var
data1
:
Array
<
Dictionary
<
String
,
Any
>>
=
[]
tempArr
.
forEach
({
(
str
)
in
tempArr
.
forEach
({
(
str
)
in
tempOldArr
.
forEach
({
(
model
)
in
tempOldArr
.
forEach
({
(
model
)
in
if
str
==
model
.
img_original
!
{
if
str
==
model
.
img_original
!
{
var
data
:
Dictionary
<
String
,
String
>
=
[:]
var
data
:
Dictionary
<
String
,
Any
>
=
[:]
data
.
updateValue
(
"
\(
goods_id
)
"
,
forKey
:
"goods_id"
)
data
.
updateValue
(
goods_id
,
forKey
:
"goods_id"
)
data
.
updateValue
(
"
\(
model
.
img_id
)
"
,
forKey
:
"img_id"
)
data
.
updateValue
(
model
.
img_id
,
forKey
:
"img_id"
)
data
.
updateValue
(
str
,
forKey
:
"banner_img"
)
data
.
updateValue
(
str
,
forKey
:
"banner_img"
)
data
.
updateValue
(
"1"
,
forKey
:
"status"
)
data
.
updateValue
(
1
,
forKey
:
"status"
)
data1
.
append
(
data
)
data1
.
append
(
data
)
}
}
})
})
...
@@ -1486,26 +1491,30 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
...
@@ -1486,26 +1491,30 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
data1
.
forEach
{
(
dict
)
in
data1
.
forEach
{
(
dict
)
in
tempArr
.
forEach
({
(
str
)
in
tempArr
.
forEach
({
(
str
)
in
if
str
==
dict
[
"banner_img"
]
{
let
dic
=
dict
let
str1
=
dic
[
"banner_img"
]
as!
String
if
str
==
str1
{
let
idx
=
tempArr
.
index
(
of
:
str
)
let
idx
=
tempArr
.
index
(
of
:
str
)
tempArr
.
remove
(
at
:
idx
!
)
tempArr
.
remove
(
at
:
idx
!
)
}
}
})
})
}
}
var
data2
:
Array
<
Dictionary
<
String
,
String
>>
=
[]
var
data2
:
Array
<
Dictionary
<
String
,
Any
>>
=
[]
for
item
in
tempArr
{
for
item
in
tempArr
{
if
item
.
count
>
0
{
if
item
.
count
>
0
{
var
data
:
Dictionary
<
String
,
String
>
=
[:]
var
data
:
Dictionary
<
String
,
Any
>
=
[:]
data
.
updateValue
(
"
\(
goods_id
)
"
,
forKey
:
"goods_id"
)
data
.
updateValue
(
goods_id
,
forKey
:
"goods_id"
)
data
.
updateValue
(
"0"
,
forKey
:
"img_id"
)
data
.
updateValue
(
0
,
forKey
:
"img_id"
)
data
.
updateValue
(
item
,
forKey
:
"banner_img"
)
data
.
updateValue
(
item
,
forKey
:
"banner_img"
)
data
.
updateValue
(
"2"
,
forKey
:
"status"
)
data
.
updateValue
(
2
,
forKey
:
"status"
)
data2
.
append
(
data
)
data2
.
append
(
data
)
}
}
}
}
data1
.
forEach
{
(
dict
)
in
data1
.
forEach
{
(
dict
)
in
tempOldArr
.
forEach
({
(
model
)
in
tempOldArr
.
forEach
({
(
model
)
in
if
model
.
img_original
==
dict
[
"banner_img"
]{
let
dic
=
dict
let
str1
=
dic
[
"banner_img"
]
as!
String
if
model
.
img_original
==
str1
{
let
idx
=
tempOldArr
.
firstIndex
(
where
:
{
(
data
)
->
Bool
in
let
idx
=
tempOldArr
.
firstIndex
(
where
:
{
(
data
)
->
Bool
in
return
(
data
.
img_original
==
model
.
img_original
)
return
(
data
.
img_original
==
model
.
img_original
)
})
})
...
@@ -1513,30 +1522,21 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
...
@@ -1513,30 +1522,21 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
}
}
})
})
}
}
var
data3
:
Array
<
Dictionary
<
String
,
String
>>
=
[]
var
data3
:
Array
<
Dictionary
<
String
,
Any
>>
=
[]
for
item
in
tempOldArr
{
for
item
in
tempOldArr
{
var
data
:
Dictionary
<
String
,
String
>
=
[:]
var
data
:
Dictionary
<
String
,
Any
>
=
[:]
data
.
updateValue
(
"
\(
goods_id
)
"
,
forKey
:
"goods_id"
)
data
.
updateValue
(
goods_id
,
forKey
:
"goods_id"
)
data
.
updateValue
(
"
\(
item
.
img_id
)
"
,
forKey
:
"img_id"
)
data
.
updateValue
(
item
.
img_id
,
forKey
:
"img_id"
)
data
.
updateValue
(
item
.
img_original
!
,
forKey
:
"banner_img"
)
data
.
updateValue
(
item
.
img_original
!
,
forKey
:
"banner_img"
)
data
.
updateValue
(
"3"
,
forKey
:
"status"
)
data
.
updateValue
(
3
,
forKey
:
"status"
)
data3
.
append
(
data
)
data3
.
append
(
data
)
}
}
var
data4
=
data3
+
data2
+
data1
var
data4
=
data3
+
data2
+
data1
return
dataChangeString
(
sender
:
data4
)
return
changeAllDictToStr
(
arr
:
data4
)
}
func
changeAllDictToStr
(
arr
:
Array
<
Dictionary
<
String
,
String
>>
)
->
String
{
var
array
:
Array
<
String
>
=
[]
for
item
in
arr
{
array
.
append
(
dictChangeString
(
sender
:
item
))
}
}
return
dataChangeString
(
sender
:
array
)
// return dataChangeString(sender:arr)
}
}
}
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