Commit a753c6b1 authored by lujunye's avatar lujunye

修复数据刷新bug

parent a03aa44b
......@@ -90,21 +90,6 @@ class GYS_FX_Product_ListVc: BaseViewController ,PagingViewControllerDelegate,UI
}
@objc func getNoti(noti:Notification){
let noti_str = String(describing: noti.userInfo!["intro"])
if noti_str.contains("铺货"){
let vc = viewControllers.first
vc?.isUpData = true
vc?.home_list_tbv.mj_header?.beginRefreshing()
}else{
let vc = viewControllers.last
vc?.isUpData = true
vc?.home_list_tbv.mj_header?.beginRefreshing()
}
}
@objc func getNoti2(noti:Notification){
let sum_goods = String(describing: noti.userInfo!["sum_goods"]!)
......@@ -303,6 +288,10 @@ class GYS_FX_Product_ListVc: BaseViewController ,PagingViewControllerDelegate,UI
let vc = self.viewControllers[self.selectIndex]
vc.home_list_tbv.mj_header?.beginRefreshing()
}
var noti_str = ""
@objc func getNoti(noti:Notification){
noti_str = String(describing: noti.userInfo!["intro"])
}
......@@ -312,15 +301,28 @@ class GYS_FX_Product_ListVc: BaseViewController ,PagingViewControllerDelegate,UI
startingViewController: UIViewController?,
destinationViewController: UIViewController,
transitionSuccessful: Bool){
if transitionSuccessful {
guard let item = pagingItem as? PagingIndexItem else { return}
if selectIndex != item.index {
selectIndex = item.index
if noti_str != "" {
if noti_str.contains("铺货"){
let vc = viewControllers.first
vc?.isUpData = true
}else{
let vc = viewControllers.last
vc?.isUpData = true
}
noti_str = ""
}else{
let vc = viewControllers[selectIndex]
if !vc.isUpData {
vc.home_list_tbv.mj_header?.beginRefreshing()
}
}
}
}
}
}
......
......@@ -26,9 +26,8 @@ class GYS_FX_Product_VC: BaseViewController,UITableViewDelegate,UITableViewDataS
"shop_id":shop_id as Any,
"action":action]
spreadGoods(dic) { (data) in
HUD.flash(.label(intro), delay: 2)
HUD.flash(.label(intro), delay: 0.5)
self.home_list_tbv.mj_header?.beginRefreshing()
// NotificationCenter.default.post(name: NSNotification.Name(rawValue: "fx_action"), object:nil)
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "fx_action"), object: nil, userInfo: ["intro":intro])
} failture: { (err) in
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment