Commit 3f7e6fcd authored by pete谢兆麟's avatar pete谢兆麟

bug修复

parent 550eeaa9
...@@ -77,12 +77,20 @@ class YHSelectLookView: UIView { ...@@ -77,12 +77,20 @@ class YHSelectLookView: UIView {
extension YHSelectLookView: UICollectionViewDelegate, UICollectionViewDataSource { extension YHSelectLookView: UICollectionViewDelegate, UICollectionViewDataSource {
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return items.count if items.count < 7 {
return items.count
} else {
return 6
}
} }
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHSelectLookViewCell.cellReuseIdentifier, for: indexPath) as! YHSelectLookViewCell let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHSelectLookViewCell.cellReuseIdentifier, for: indexPath) as! YHSelectLookViewCell
cell.dataSource = items[indexPath.row] if indexPath.row < 5 {
cell.dataSource = items[indexPath.row]
} else {
cell.moreState()
}
return cell return cell
...@@ -90,6 +98,11 @@ extension YHSelectLookView: UICollectionViewDelegate, UICollectionViewDataSource ...@@ -90,6 +98,11 @@ extension YHSelectLookView: UICollectionViewDelegate, UICollectionViewDataSource
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
//跳转直播 文哥代办 //跳转直播 文哥代办
if indexPath.row == 5 {
NotificationCenter.default.post(name: YhConstant.YhNotification.backToHomeNotification, object: nil, userInfo: ["value":2])
return
}
guard items.count > indexPath.row else { guard items.count > indexPath.row else {
return return
} }
...@@ -183,6 +196,16 @@ class YHSelectLookViewCell: UICollectionViewCell { ...@@ -183,6 +196,16 @@ class YHSelectLookViewCell: UICollectionViewCell {
guard let dataSource = dataSource else { return } guard let dataSource = dataSource else { return }
descripeLable.text = dataSource.account descripeLable.text = dataSource.account
headIamge.kf.setImage(with: URL(string: dataSource.avatar)) headIamge.kf.setImage(with: URL(string: dataSource.avatar))
animationView.isHidden = false
liveAnimationView.isHidden = false
headIamge.layer.borderWidth = 2
} }
func moreState() {
headIamge.image = UIImage(named: "home_live_more")
animationView.isHidden = true
liveAnimationView.isHidden = true
headIamge.layer.borderWidth = 0
}
} }
...@@ -234,6 +234,7 @@ class YHOrderDetailTableViewCell: UITableViewCell { ...@@ -234,6 +234,7 @@ class YHOrderDetailTableViewCell: UITableViewCell {
titleLabel.snp.makeConstraints { make in titleLabel.snp.makeConstraints { make in
make.top.equalTo(18) make.top.equalTo(18)
make.left.equalTo(16) make.left.equalTo(16)
make.right.equalTo(-80)
make.height.equalTo(24) make.height.equalTo(24)
} }
...@@ -246,7 +247,7 @@ class YHOrderDetailTableViewCell: UITableViewCell { ...@@ -246,7 +247,7 @@ class YHOrderDetailTableViewCell: UITableViewCell {
centerView.addSubview(otherTypeView) centerView.addSubview(otherTypeView)
otherTypeView.snp.makeConstraints { make in otherTypeView.snp.makeConstraints { make in
make.centerY.equalTo(titleLabel.snp.centerY) make.centerY.equalTo(titleLabel.snp.centerY)
make.left.equalTo(titleLabel.snp.right).offset(8) make.right.equalTo(-16)
make.height.equalTo(18) make.height.equalTo(18)
make.width.equalTo(48) make.width.equalTo(48)
} }
......
...@@ -34,7 +34,8 @@ enum YHPersonalModuleItemType: Int { ...@@ -34,7 +34,8 @@ enum YHPersonalModuleItemType: Int {
case userItems//用户条款 case userItems//用户条款
case privaceAgreement//隐私协议 case privaceAgreement//隐私协议
case myOrder //我的订单 双十一订单入口 case myOrder //我的订单 双十一订单入口
case mycart //我的订单 双十一订单入口
//case liveEntryTest //直播入口 //case liveEntryTest //直播入口
} }
...@@ -294,6 +295,11 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget { ...@@ -294,6 +295,11 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
items.append(item) items.append(item)
} }
if let configModel = YHConfigManager.shared.reqVM.configModel,configModel.is_recharge_order_open {
let item = PersonalModuleItem(icon: "mine_item_card", title: "购物车".local, type:.mycart)
items.append(item)
}
do { do {
let item = PersonalModuleItem(icon: "mine_item_msg", title: "我的消息".local, type:.myMessage) let item = PersonalModuleItem(icon: "mine_item_msg", title: "我的消息".local, type:.myMessage)
items.append(item) items.append(item)
...@@ -306,8 +312,6 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget { ...@@ -306,8 +312,6 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
} }
} }
if YHUatHelper.shared.getUatModuleStatusBy(module: .Mine_EvaluationCode) == 1 { if YHUatHelper.shared.getUatModuleStatusBy(module: .Mine_EvaluationCode) == 1 {
let item = PersonalModuleItem(icon: "mine_item_code", title: "我的测评码".local, type:.myTestCode) let item = PersonalModuleItem(icon: "mine_item_code", title: "我的测评码".local, type:.myTestCode)
items.append(item) items.append(item)
...@@ -441,6 +445,26 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource { ...@@ -441,6 +445,26 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
// case .liveEntryTest: // case .liveEntryTest:
// let vc = YHSimpleAudienceVC() // let vc = YHSimpleAudienceVC()
// self.navigationController?.pushViewController(vc) //for test hjl // self.navigationController?.pushViewController(vc) //for test hjl
case .mycart:
// 我的订单
if let token = YHLoginManager.shared.userModel?.token,token.count > 5 {
var url = YHBaseUrlManager.shared.curH5URL() + "superAppBridge.html#/goods/cart"
url = url + "?param=" + YHLoginManager.shared.h5Token
printLog("URL: \(url)")
var tUrl = url
if !url.contains("navigationH=") {
tUrl = url + "?navigationH=\(k_Height_NavigationtBarAndStatuBar)"
if url.contains("?") {
tUrl = url + "&navigationH=\(k_Height_NavigationtBarAndStatuBar)"
}
}
let vc = YHH5WebViewVC()
vc.url = tUrl
vc.isFullScreenFlag = false
vc.navTitle = "购物车"
vc.isSupportWebviewInterBackFlag = true
UIViewController.current?.navigationController?.pushViewController(vc)
}
default: default:
printLog("不需要响应") printLog("不需要响应")
} }
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "home_live_more@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "home_live_more@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "mine_item_card@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "mine_item_card@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
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