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
9ad3451d
Commit
9ad3451d
authored
Dec 05, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化数量显示
parent
87fe50ff
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
59 deletions
+13
-59
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/ViewController/供应商分销商品管理/GYS_FX_Product_ListVc.swift
...form/ViewController/供应商分销商品管理/GYS_FX_Product_ListVc.swift
+13
-59
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
9ad3451d
No preview for this file type
GeliBusinessPlatform/ViewController/供应商分销商品管理/GYS_FX_Product_ListVc.swift
View file @
9ad3451d
...
...
@@ -70,10 +70,8 @@ class GYS_FX_Product_ListVc: BaseViewController ,PagingViewControllerDelegate,UI
pagingViewController
.
menuItemSize
=
.
fixed
(
width
:
0
,
height
:
44*
glscale
)
pagingViewController
.
font
=
UIFont
.
systemFont
(
ofSize
:
13
)
pagingViewController
.
selectedFont
=
UIFont
.
systemFont
(
ofSize
:
13
)
// pagingViewController.textColor = UIColor.init(named: "灰色字体颜色")!
// pagingViewController.selectedTextColor = UIColor.init(named: "蓝色字体颜色")!
pagingViewController
.
textColor
=
UIColor
.
white
pagingViewController
.
selectedTextColor
=
UIColor
.
white
pagingViewController
.
textColor
=
UIColor
.
init
(
named
:
"灰色字体颜色"
)
!
pagingViewController
.
selectedTextColor
=
UIColor
.
init
(
named
:
"蓝色字体颜色"
)
!
pagingViewController
.
delegate
=
self
pagingViewController
.
dataSource
=
self
pagingViewController
.
sizeDelegate
=
self
...
...
@@ -88,34 +86,8 @@ class GYS_FX_Product_ListVc: BaseViewController ,PagingViewControllerDelegate,UI
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
getNoti2(noti:)
)
,
name
:
NSNotification
.
Name
(
rawValue
:
"sum_goods_count"
),
object
:
nil
)
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
getNoti(noti:)
)
,
name
:
NSNotification
.
Name
(
rawValue
:
"fx_action"
),
object
:
nil
)
contentV
.
addSubview
(
left_title
)
contentV
.
addSubview
(
right_title
)
right_title
.
textColor
=
UIColor
.
init
(
named
:
"灰色字体颜色"
)
!
left_title
.
textColor
=
UIColor
.
init
(
named
:
"蓝色字体颜色"
)
!
left_title
.
text
=
"已铺货商品"
left_title
.
font
=
UIFont
(
name
:
"PingFangSC-Medium"
,
size
:
13
)
left_title
.
textAlignment
=
.
center
left_title
.
snp
.
makeConstraints
{
(
make
)
in
make
.
top
.
left
.
equalTo
(
0
)
make
.
width
.
equalTo
(
ScreenWidth
*
0.5
)
make
.
height
.
equalTo
(
49
)
}
right_title
.
text
=
"可铺货商品"
right_title
.
font
=
UIFont
(
name
:
"PingFangSC-Medium"
,
size
:
13
)
right_title
.
textAlignment
=
.
center
right_title
.
snp
.
makeConstraints
{
(
make
)
in
make
.
top
.
right
.
equalTo
(
0
)
make
.
width
.
equalTo
(
ScreenWidth
*
0.5
)
make
.
height
.
equalTo
(
49
)
}
}
let
left_title
=
UILabel
()
let
right_title
=
UILabel
()
var
needs_refresh
=
false
...
...
@@ -124,24 +96,20 @@ class GYS_FX_Product_ListVc: BaseViewController ,PagingViewControllerDelegate,UI
let
sum_goods
=
String
(
describing
:
noti
.
userInfo
!
[
"sum_goods"
]
!
)
let
sum_goods2
=
String
(
describing
:
noti
.
userInfo
!
[
"sum_goods2"
]
!
)
left_title
.
text
=
"已铺货商品"
var
left_title
=
"已铺货商品"
if
sum_goods
!=
"0"
{
left_title
.
text
=
"已铺货商品("
+
sum_goods
+
")"
left_title
=
"已铺货商品("
+
sum_goods
+
")"
}
right_title
.
text
=
"可铺货商品"
var
right_title
=
"可铺货商品"
if
sum_goods2
!=
"0"
{
right_title
.
text
=
"可铺货商品("
+
sum_goods2
+
")"
right_title
=
"可铺货商品("
+
sum_goods2
+
")"
}
// cities = [
// left_title,
// right_title
// ]
//
//
// pagingVC?.reloadMenu()
// pagingVC?.select(index: 1)
cities
=
[
left_title
,
right_title
]
pagingVC
?
.
reloadData
(
around
:
PagingIndexItem
(
index
:
selectIndex
,
title
:
cities
[
selectIndex
]))
}
@objc
func
getNoti
(
noti
:
Notification
){
needs_refresh
=
true
...
...
@@ -324,13 +292,6 @@ class GYS_FX_Product_ListVc: BaseViewController ,PagingViewControllerDelegate,UI
guard
let
item
=
pagingItem
as?
PagingIndexItem
else
{
return
}
if
selectIndex
!=
item
.
index
{
selectIndex
=
item
.
index
if
selectIndex
==
0
{
right_title
.
textColor
=
UIColor
.
init
(
named
:
"灰色字体颜色"
)
!
left_title
.
textColor
=
UIColor
.
init
(
named
:
"蓝色字体颜色"
)
!
}
else
{
right_title
.
textColor
=
UIColor
.
init
(
named
:
"蓝色字体颜色"
)
!
left_title
.
textColor
=
UIColor
.
init
(
named
:
"灰色字体颜色"
)
!
}
}
if
needs_refresh
{
needs_refresh
=
false
...
...
@@ -346,13 +307,6 @@ extension GYS_FX_Product_ListVc: PagingViewControllerDataSource {
guard
let
item
=
pagingItem
as?
PagingIndexItem
else
{
return
}
if
selectIndex
!=
item
.
index
{
selectIndex
=
item
.
index
if
selectIndex
==
0
{
right_title
.
textColor
=
UIColor
.
init
(
named
:
"灰色字体颜色"
)
!
left_title
.
textColor
=
UIColor
.
init
(
named
:
"蓝色字体颜色"
)
!
}
else
{
right_title
.
textColor
=
UIColor
.
init
(
named
:
"蓝色字体颜色"
)
!
left_title
.
textColor
=
UIColor
.
init
(
named
:
"灰色字体颜色"
)
!
}
}
if
needs_refresh
{
needs_refresh
=
false
...
...
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