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
d008d2f5
Commit
d008d2f5
authored
May 19, 2020
by
刘俊宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成新增商品对接(缺商品详情)
parent
64d44745
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
17 deletions
+56
-17
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
...ata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/ViewController/商品详情/ProductDetailViewController.swift
...orm/ViewController/商品详情/ProductDetailViewController.swift
+56
-17
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
View file @
d008d2f5
No preview for this file type
GeliBusinessPlatform/ViewController/商品详情/ProductDetailViewController.swift
View file @
d008d2f5
...
@@ -155,7 +155,28 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -155,7 +155,28 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
//MARK:---新增商品接口
//MARK:---新增商品接口
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
var
goods_type
=
""
for
i
in
1
..<
itemTypeArr
!.
count
{
let
num
=
itemTypeArr
!
[
i
]
if
num
!=
99
{
switch
i
{
case
1
:
goods_type
=
"1"
break
case
2
:
goods_type
=
"3"
break
case
3
:
goods_type
=
"4"
break
default
:
break
}
}
}
var
is_qz
=
0
var
is_qz
=
0
if
shiFouQZ
{
if
shiFouQZ
{
is_qz
=
1
is_qz
=
1
...
@@ -165,13 +186,21 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -165,13 +186,21 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
is_inquiry
=
1
is_inquiry
=
1
}
}
var
is_adsale
=
0
var
is_adsale
=
0
var
need_check
=
0
if
isYuShouShangPin
!
{
if
isYuShouShangPin
!
{
is_adsale
=
1
is_adsale
=
1
if
shiFouSH
{
need_check
=
1
}
}
else
{
faHuoTime
=
""
dj_time_start
=
0
dj_time_end
=
0
wk_time_start
=
0
wk_time_end
=
0
}
}
var
need_check
=
0
if
shiFouSH
{
need_check
=
1
}
var
gs_id
=
1
var
gs_id
=
1
if
self
.
shangPinStatusArr
!.
count
>
0
{
if
self
.
shangPinStatusArr
!.
count
>
0
{
let
model
=
self
.
shangPinStatusArr
!
[
shangPinStatus
!
]
let
model
=
self
.
shangPinStatusArr
!
[
shangPinStatus
!
]
...
@@ -198,7 +227,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -198,7 +227,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
"brand_id"
:
selectPinPaiData
?
.
brand_id
as
Any
,
// 品牌ID
"brand_id"
:
selectPinPaiData
?
.
brand_id
as
Any
,
// 品牌ID
"goods_name"
:
itemName
,
//商品名称
"goods_name"
:
itemName
,
//商品名称
"is_qz"
:
is_qz
as
Any
,
//是否清真商品,1是0非
"is_qz"
:
is_qz
as
Any
,
//是否清真商品,1是0非
"goods_type"
:
""
,
//商品类型,普通2现货3期货4团购
"goods_type"
:
goods_type
,
//商品类型,普通2现货3期货4团购
"is_adsale"
:
is_adsale
as
Any
,
//商品类型字段,预售专用,选定”预售”则值为1,否则值为0
"is_adsale"
:
is_adsale
as
Any
,
//商品类型字段,预售专用,选定”预售”则值为1,否则值为0
"is_inquiry"
:
is_inquiry
as
Any
,
//是否询价:1是0非
"is_inquiry"
:
is_inquiry
as
Any
,
//是否询价:1是0非
"origin_number"
:
qiMaiShuLiang
as
Any
,
//起购数量
"origin_number"
:
qiMaiShuLiang
as
Any
,
//起购数量
...
@@ -222,11 +251,11 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -222,11 +251,11 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
"sku_info"
:
sku_info
as
Any
]
"sku_info"
:
sku_info
as
Any
]
print
(
dic
)
print
(
dic
)
//MARK:--新增商品接口
//MARK:--新增商品接口
goodsAdd
(
dic
,
success
:
{
(
data
)
in
//
goodsAdd(dic, success: { (data) in
//
})
{
(
error
)
in
//
}) { (error) in
//
}
//
}
}
}
@IBOutlet
weak
var
submitBtn
:
LGButton
!
@IBOutlet
weak
var
submitBtn
:
LGButton
!
...
@@ -1077,6 +1106,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -1077,6 +1106,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
}
}
}
}
//预售价
//预售价
var
is_adsale_tiered
=
0
var
is_adsale_tiered
=
0
var
adsale_tiered_pri
:
Dictionary
<
String
,
String
>
=
[:]
var
adsale_tiered_pri
:
Dictionary
<
String
,
String
>
=
[:]
...
@@ -1113,7 +1143,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -1113,7 +1143,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
}
}
let
pack_attr
=
[
"l"
:
"0"
,
"w"
:
"0"
,
"h"
:
"0"
,
"w"
:
md
.
weight
,
"v"
:
"0"
]
let
pack_attr
=
[
"l"
:
"0"
,
"w"
:
"0"
,
"h"
:
"0"
,
"w
g
"
:
md
.
weight
,
"v"
:
"0"
]
var
is_open_adsale
=
0
var
is_open_adsale
=
0
var
adsale_pri
=
""
var
adsale_pri
=
""
...
@@ -1126,9 +1156,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -1126,9 +1156,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
adsale_inventory
=
md
.
ysKuCun
adsale_inventory
=
md
.
ysKuCun
pct
=
md
.
DJBiLi
pct
=
md
.
DJBiLi
}
}
var
sku
=
[
"sku_sn"
:
""
,
let
sku
=
[
"sku_sn"
:
""
,
"spec_id"
:
"1"
,
"spec_id"
:
"1"
,
"attr"
:
md
.
guiGe
,
"attr"
:
md
.
guiGe
,
"pack_attr"
:
pack_attr
,
"pack_attr"
:
pack_attr
,
...
@@ -1136,13 +1164,24 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
...
@@ -1136,13 +1164,24 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
"unit"
:
md
.
danWei
,
"unit"
:
md
.
danWei
,
"price"
:
md
.
price
,
"price"
:
md
.
price
,
"is_tiered"
:
is_tiered
,
"is_tiered"
:
is_tiered
,
"tiered_pri"
:
tiered_pri
,
"is_open_adsale"
:
is_open_adsale
,
"is_open_adsale"
:
is_open_adsale
,
"adsale_pri"
:
adsale_pri
,
"adsale_pri"
:
adsale_pri
,
"adsale_inventory"
:
adsale_inventory
,
"adsale_inventory"
:
adsale_inventory
,
"pct"
:
pct
,
"pct"
:
pct
,
"adsale_tiered_pri"
:
adsale_tiered_pri
,
"is_adsale_tiered"
:
is_adsale_tiered
]
as
[
String
:
Any
]
"is_adsale_tiered"
:
is_adsale_tiered
]
as
[
String
:
Any
]
if
tiered_pri
.
keys
.
count
>
0
{
sku
.
updateValue
(
tiered_pri
,
forKey
:
"tiered_pri"
)
}
else
{
sku
.
updateValue
(
""
,
forKey
:
"tiered_pri"
)
}
if
adsale_tiered_pri
.
keys
.
count
>
0
{
sku
.
updateValue
(
adsale_tiered_pri
,
forKey
:
"adsale_tiered_pri"
)
}
else
{
sku
.
updateValue
(
""
,
forKey
:
"adsale_tiered_pri"
)
}
skuArr
.
append
(
sku
)
skuArr
.
append
(
sku
)
}
}
...
...
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