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
030e2ce0
Commit
030e2ce0
authored
Sep 05, 2020
by
刘俊宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修正个人中心获取数据逻辑+修正商品管理总数显示bug
parent
1337df96
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
...ata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/ViewController/个人中心/PersonCenterViewController.swift
...form/ViewController/个人中心/PersonCenterViewController.swift
+4
-2
GeliBusinessPlatform/ViewController/商品管理/GoodsManageListVC.swift
...inessPlatform/ViewController/商品管理/GoodsManageListVC.swift
+6
-3
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
View file @
030e2ce0
No preview for this file type
GeliBusinessPlatform/ViewController/个人中心/PersonCenterViewController.swift
View file @
030e2ce0
...
...
@@ -24,16 +24,18 @@ class PersonCenterViewController: BaseViewController,UITableViewDelegate,UITable
//MARK:--加载数据
func
loadData
(){
if
self
.
dataModel
!=
nil
{
return
}
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
HUD
.
flash
(
.
progress
)
adminInfo
([
"user_token"
:
UserToken
as
Any
],
success
:
{
(
data
)
in
HUD
.
hide
()
self
.
dataModel
=
(
data
as!
AdminInfoModel
)
// self.iconImg.sd_setImage(with: URL(string: SERVERCE_ImageHost + (self.dataModel?.data?.shop_img)!), placeholderImage: UIImage.init(named: "个人设置头像"))
self
.
shopNameLbl
.
text
=
self
.
dataModel
?
.
data
?
.
stall_name
self
.
nameLbl
.
text
=
self
.
nowDateStr
()
})
{
(
error
)
in
HUD
.
hide
()
}
}
func
nowDateStr
()
->
String
{
...
...
GeliBusinessPlatform/ViewController/商品管理/GoodsManageListVC.swift
View file @
030e2ce0
...
...
@@ -34,6 +34,7 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
//MARK:--数据处理字段
var
items
=
Array
<
GoodsResModel
>
()
var
itemsSearch
=
Array
<
GoodsResModel
>
()
var
itemsAllCount
=
0
var
selectIndexArr
=
[
0
,
0
,
0
]
var
showSelectvIndex
=
0
var
isSearch
=
false
...
...
@@ -130,7 +131,7 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
}
getSortData
()
itemsAllCount
=
0
goodsList
([
"user_token"
:
UserToken
as
Any
,
"keyword"
:
keyword
,
"goods_type"
:
goodsType
,
"sort"
:
sort
,
"is_show"
:
isShow
,
"page"
:
page
],
success
:
{
(
data
)
in
let
dataM
=
data
as!
GoodsListModel
if
self
.
isSearch
{
...
...
@@ -138,12 +139,14 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
self
.
itemsSearch
.
removeAll
()
dataM
.
data
?
.
goods_res
?
.
forEach
({
(
model
)
in
self
.
itemsSearch
.
append
(
model
)
self
.
itemsAllCount
=
dataM
.
data
?
.
count
as!
Int
})
}
else
{
self
.
pageNum
=
2
self
.
items
.
removeAll
()
dataM
.
data
?
.
goods_res
?
.
forEach
({
(
model
)
in
self
.
items
.
append
(
model
)
self
.
itemsAllCount
=
dataM
.
data
?
.
count
as!
Int
})
}
//collection动画效果
...
...
@@ -360,13 +363,13 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
let
headerLbl
=
UILabel
(
frame
:
CGRect
(
x
:
15*
glscale
,
y
:
10*
glscale
,
width
:
100*
glscale
,
height
:
20*
glscale
))
if
isSearch
{
if
itemsSearch
.
count
>
0
{
headerLbl
.
text
=
"共"
+
StringByInt
(
number
:
itemsSearch
.
c
ount
)
+
"件商品"
headerLbl
.
text
=
"共"
+
StringByInt
(
number
:
self
.
itemsAllC
ount
)
+
"件商品"
}
else
{
headerLbl
.
text
=
""
}
}
else
{
if
items
.
count
>
0
{
headerLbl
.
text
=
"共"
+
StringByInt
(
number
:
items
.
c
ount
)
+
"件商品"
headerLbl
.
text
=
"共"
+
StringByInt
(
number
:
self
.
itemsAllC
ount
)
+
"件商品"
}
else
{
headerLbl
.
text
=
""
}
...
...
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