Commit 1ac977bb authored by DavidHuang's avatar DavidHuang

Merge branch 'yinhe-live-1212' of...

Merge branch 'yinhe-live-1212' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS into yinhe-live-1212

# Conflicts:
#	galaxy/galaxy/Classes/Modules/InteractionH5(与H5交互)/YHJsApi.swift
parents 998439a8 174c09d0
......@@ -170,14 +170,14 @@ extension YHInvatationShareViewController {
@objc func wxClick() {
// guard let combinedImage = combinedImageFrom(imageView: centerImageView) else { return }
YHShareManager.shared.sendLinkContent("香港身份规划专属礼包,限时领取!", "1000元折扣福利券,资深银河规划专家1V1评估方案", UIImage(named: "invitation_with_gifts_share_other") ?? UIImage(), link: YHBaseUrlManager.shared.curH5URL() + "superAppBridge.html#/evaluation?channel=lkhtj-app&customer_id=\(YHLoginManager.shared.userModel?.id ?? "")&scene_id=30")
YHShareManager.shared.sendLinkContent("香港身份规划专属礼包,限时领取!", "资深银河规划专家1V1评估方案", UIImage(named: "invitation_with_gifts_share_other") ?? UIImage(), link: YHBaseUrlManager.shared.curH5URL() + "superAppBridge.html#/evaluation?channel=lkhtj-app&customer_id=\(YHLoginManager.shared.userModel?.id ?? "")&scene_id=30")
// YHShareManager.shared.sendImageContent(combinedImage)
}
@objc func peopleClick() {
// guard let combinedImage = combinedImageFrom(imageView: centerImageView) else { return }
// YHShareManager.shared.sendImageContent(combinedImage, WXSceneTimeline)
YHShareManager.shared.sendLinkContent("香港身份规划专属礼包,限时领取!", "1000元折扣福利券,资深银河规划专家1V1评估方案", UIImage(named: "invitation_with_gifts_share_other") ?? UIImage(), link: YHBaseUrlManager.shared.curH5URL() + "superAppBridge.html#/evaluation?channel=lkhtj-app&customer_id=\(YHLoginManager.shared.userModel?.id ?? "")&scene_id=30", WXSceneTimeline)
YHShareManager.shared.sendLinkContent("香港身份规划专属礼包,限时领取!", "资深银河规划专家1V1评估方案", UIImage(named: "invitation_with_gifts_share_other") ?? UIImage(), link: YHBaseUrlManager.shared.curH5URL() + "superAppBridge.html#/evaluation?channel=lkhtj-app&customer_id=\(YHLoginManager.shared.userModel?.id ?? "")&scene_id=30", WXSceneTimeline)
}
......
......@@ -25,72 +25,29 @@ class YHInvitationWithGiftsViewController: YHBaseViewController {
setView()
loadData()
}
override func backItemClick(_ sender: Any) {
let view = YHInvitationWithGiftsShareView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
view.block = {[weak self] tag in
if tag == 0 {
self?.navigationController?.popViewController()
} else {
let vc = YHInvatationShareViewController()
self?.navigationController?.pushViewController(vc)
}
}
let window = UIApplication.shared.yhKeyWindow()
window?.addSubview(view)
}
/// 是否可以返回,包括点击返回和手势返回,默认YES
override func navigationShouldPop() -> Bool {
let view = YHInvitationWithGiftsShareView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
view.block = {[weak self] tag in
if tag == 0 {
self?.navigationController?.popViewController()
} else {
let vc = YHInvatationShareViewController()
self?.navigationController?.pushViewController(vc)
}
}
let window = UIApplication.shared.yhKeyWindow()
window?.addSubview(view)
return false
}
}
extension YHInvitationWithGiftsViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 2
return 1
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withClass: YHInvitationWithGiftsFirstTableViewCell.self)
return cell
} else {
let cell = tableView.dequeueReusableCell(withClass: YHInvitationWithGiftsSecondTableViewCell.self)
cell.headData = self.viewModel.overviewModel
cell.tableData = self.viewModel.recordModel
return cell
}
let cell = tableView.dequeueReusableCell(withClass: YHInvitationWithGiftsSecondTableViewCell.self)
cell.headData = self.viewModel.overviewModel
cell.tableData = self.viewModel.recordModel
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.row == 0 {
return KScreenWidth * 0.55 + 16.0
} else if indexPath.row == 1 {
if self.viewModel.recordModel.list.count == 0 {
return 385
} else if self.viewModel.recordModel.list.count <= 10 {
return CGFloat(345 + 40 * self.viewModel.recordModel.list.count)
} else {
return 713
}
if self.viewModel.recordModel.list.count == 0 {
return 385
} else if self.viewModel.recordModel.list.count <= 10 {
return CGFloat(345 + 40 * self.viewModel.recordModel.list.count)
} else {
return 713
}
return 0
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
......
......@@ -100,7 +100,7 @@ class YHInvitationWithGiftsDetailView: UIView {
scrollView = {
let view = UIScrollView()
view.bounds = CGRect(x: 0, y: 0, width: 287, height: 1223)
view.bounds = CGRect(x: 0, y: 0, width: 287, height: 883)
// 去除弹簧效果
view.bounces = false
......@@ -152,39 +152,10 @@ class YHInvitationWithGiftsDetailView: UIView {
titleImage.snp.makeConstraints { make in
make.width.equalTo(259)
make.centerX.equalToSuperview()
make.height.equalTo(681)
make.height.equalTo(843)
make.top.equalTo(42)
}
messageLabel = {
let label = UILabel()
label.text = "积分入账及提现"
label.font = UIFont.PFSC_M(ofSize: 15)
label.textColor = UIColor.mainTextColor
return label
}()
scrollView.addSubview(messageLabel)
messageLabel.snp.makeConstraints { make in
make.left.equalTo(14)
make.right.equalTo(-14)
make.height.equalTo(21)
make.top.equalTo(753)
}
messageImage = {
let imageView = UIImageView()
imageView.image = UIImage(named: "invitation_with_gifts_detail_message")
return imageView
}()
scrollView.addSubview(messageImage)
messageImage.snp.makeConstraints { make in
make.width.equalTo(259)
make.centerX.equalToSuperview()
make.height.equalTo(426)
make.top.equalTo(785)
}
closeButton = {
let button = UIButton(type: .custom)
button.setBackgroundImage(UIImage(named: "invitation_with_gifts_detail_close"), for: .normal)
......
......@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "invitation_with_gifts_detail_bg@2x.png",
"filename" : "Rectangle 346241543@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "invitation_with_gifts_detail_bg@3x.png",
"filename" : "Rectangle 346241543@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
......@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "invitation_with_gifts_detail_title@2x.png",
"filename" : "Frame 2033194996@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "invitation_with_gifts_detail_title@3x.png",
"filename" : "Frame 2033194996@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
......@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "invitation_with_gifts_head@2x.png",
"filename" : "Group 2033195261@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "invitation_with_gifts_head@3x.png",
"filename" : "Group 2033195261@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
......@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "iPhone 8 - 16@2x.png",
"filename" : "Group 2033195342@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "iPhone 8 - 16@3x.png",
"filename" : "Group 2033195342@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
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