Commit 1a74324d authored by DavidHuang's avatar DavidHuang

代码 合并

parents 03bf17d2 5a542dac
......@@ -10,6 +10,7 @@
## Build generated
build/
buglybin/
DerivedData/
Podfile.lock
......
......@@ -22,9 +22,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
Thread.sleep(forTimeInterval: 0.5) // 应产品同学Nick要求 启动页时间展示长点
//灰度规则配置
YHUatHelper.shared.loadUatData()
setupAudionConfig()
//初始化 神策sdk
......@@ -56,6 +53,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
printLog(string)
}
//灰度规则配置
YHUatHelper.shared.loadUatData()
// 一键登录
YHOneKeyLoginManager.shared.configOneKeyLogin()
......
......@@ -28,7 +28,7 @@ class YHHomeHoldViewPageViewController: YHBaseViewController {
dataSource.isTitleColorGradientEnabled = false
dataSource.titles = arrItemTitles
dataSource.titleNormalFont = UIFont.PFSC_M(ofSize: 15)
dataSource.titleNormalFont = UIFont.PFSC_M(ofSize: 16)
dataSource.titleNormalColor = UIColor.yhGreyColor
dataSource.titleSelectedFont = UIFont.PFSC_M(ofSize: 21)
......
......@@ -80,7 +80,7 @@ extension YHInvitationWithGiftsViewController: UITableViewDelegate, UITableViewD
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.row == 0 {
return 209
return KScreenWidth * 0.55 + 16.0
} else if indexPath.row == 1 {
if self.viewModel.recordModel.list.count == 0 {
return 345
......
......@@ -20,7 +20,7 @@ class YHInvitationWithGiftsDetailView: UIView {
var closeButton: UIButton!
var messageLabel: UILabel!
var messageImage: UIImageView!
var bgView: UIView!
var bgView: UIImageView!
override init(frame: CGRect) {
super.init(frame: frame)
......@@ -73,15 +73,16 @@ class YHInvitationWithGiftsDetailView: UIView {
}
bgView = {
let view = UIView()
view.backgroundColor = UIColor(hex: 0xf3f8ff)
return view
let imageView = UIImageView()
imageView.image = UIImage(named: "invitation_with_gifts_detail_bg")
imageView.isUserInteractionEnabled = true
return imageView
}()
topView.addSubview(bgView)
topContentView.addSubview(bgView)
bgView.snp.makeConstraints { make in
make.right.equalTo(-12)
make.top.left.equalTo(12)
make.height.equalTo(29)
make.right.bottom.equalTo(-12)
make.left.equalTo(12)
make.top.equalTo(12)
}
topImageView = {
......@@ -99,7 +100,7 @@ class YHInvitationWithGiftsDetailView: UIView {
scrollView = {
let view = UIScrollView()
view.bounds = CGRect(x: 0, y: 0, width: 287, height: 1252)
view.bounds = CGRect(x: 0, y: 0, width: 287, height: 1223)
// 去除弹簧效果
view.bounces = false
......@@ -112,12 +113,14 @@ class YHInvitationWithGiftsDetailView: UIView {
topContentView.addSubview(scrollView)
scrollView.snp.makeConstraints { make in
make.right.bottom.equalTo(-12)
make.top.left.equalTo(12)
make.left.equalTo(12)
make.top.equalTo(41)
}
bgImageView = {
let imageView = UIImageView()
imageView.image = UIImage(named: "invitation_with_gifts_detail_bg")
imageView.isHidden = true
return imageView
}()
scrollView.addSubview(bgImageView)
......@@ -137,7 +140,7 @@ class YHInvitationWithGiftsDetailView: UIView {
make.left.equalTo(14)
make.right.equalTo(-14)
make.height.equalTo(21)
make.top.equalTo(38)
make.top.equalTo(9)
}
titleImage = {
......@@ -150,7 +153,7 @@ class YHInvitationWithGiftsDetailView: UIView {
make.width.equalTo(259)
make.centerX.equalToSuperview()
make.height.equalTo(681)
make.top.equalTo(71)
make.top.equalTo(42)
}
messageLabel = {
......@@ -165,7 +168,7 @@ class YHInvitationWithGiftsDetailView: UIView {
make.left.equalTo(14)
make.right.equalTo(-14)
make.height.equalTo(21)
make.top.equalTo(782)
make.top.equalTo(753)
}
messageImage = {
......@@ -178,7 +181,7 @@ class YHInvitationWithGiftsDetailView: UIView {
make.width.equalTo(259)
make.centerX.equalToSuperview()
make.height.equalTo(426)
make.top.equalTo(814)
make.top.equalTo(785)
}
......
......@@ -33,7 +33,7 @@ class YHInvitationWithGiftsFirstTableViewCell: UITableViewCell {
}
func setupUI() {
self.backgroundColor = UIColor(hex: 0xededed)
self.backgroundColor = UIColor(hex: 0xebf4fe)
centerImageView = {
let imageView = UIImageView()
imageView.image = UIImage(named: "invitation_with_gifts_first")
......@@ -41,10 +41,10 @@ class YHInvitationWithGiftsFirstTableViewCell: UITableViewCell {
}()
contentView.addSubview(centerImageView)
centerImageView.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.bottom.equalTo(-8)
make.left.equalTo(12)
make.right.equalTo(-12)
make.height.equalTo(193)
make.top.equalTo(8)
}
}
......
......@@ -66,7 +66,7 @@ class YHInvitationWithGiftsHeadView: UIView {
}
func setUpView() {
self.backgroundColor = UIColor(hex: 0xededed)
self.backgroundColor = UIColor(hex: 0xebf4fe)
let height = KScreenWidth / 0.735
centerImageView = {
let view = UIImageView()
......
......@@ -91,7 +91,7 @@ class YHInvitationWithGiftsSecondTableViewCell: UITableViewCell {
}
func setupUI() {
self.backgroundColor = UIColor(hex: 0xededed)
self.backgroundColor = UIColor(hex: 0xebf4fe)
centerView = {
let view = UIView()
view.layer.cornerRadius = kCornerRadius3
......
......@@ -9,12 +9,14 @@
import UIKit
class YHHomeHeadView: UIView {
private static let topMargin : CGFloat = 10.0
// 不包含订单提示视图的总高度
private static let fixViewH : CGFloat = (YHHomeBannerView.viewH) + (20 + YHHomeKingKongBlockView.viewH) + (20 + 1) + (20 + YHAiRadarAreaView.viewH) + (20 + YHHomeSalonAreaView.viewH) + (20 + 1) + 20
private static let fixViewH : CGFloat = YHHomeHeadView.topMargin + (YHHomeBannerView.viewH) + (20 + YHHomeKingKongBlockView.viewH) + (20 + 1) + (20 + YHAiRadarAreaView.viewH) + (20 + YHHomeSalonAreaView.viewH) + (20 + 1) + 20
//展示 订单提示时候的 高度
private var homeHeadViewH : CGFloat {
return YHHomeHeadView.fixViewH + (20 + orderTipsView.tipViewH)
return YHHomeHeadView.fixViewH + (20 + orderTipsView.tipViewH) + YHHomeHeadView.topMargin
}
//获取headView的具体高度
......@@ -22,7 +24,7 @@ class YHHomeHeadView: UIView {
if showTips {
return homeHeadViewH
} else {
return YHHomeHeadView.fixViewH + (20 + YHEvaluationView.viewH)
return YHHomeHeadView.fixViewH + (20 + YHEvaluationView.viewH) + YHHomeHeadView.topMargin
}
}
......@@ -103,7 +105,7 @@ class YHHomeHeadView: UIView {
func updateSubViewsConstraints() {
homeBannerView.snp.remakeConstraints { make in
make.top.equalTo(0)
make.top.equalTo(YHHomeHeadView.topMargin)
make.left.right.equalToSuperview()
make.height.equalTo(YHHomeBannerView.viewH)
}
......@@ -174,7 +176,7 @@ private extension YHHomeHeadView {
addSubview(homeBannerView)
homeBannerView.snp.makeConstraints { make in
make.top.equalTo(0)
make.top.equalTo(YHHomeHeadView.topMargin)
make.left.right.equalToSuperview()
make.height.equalTo(YHHomeBannerView.viewH)
}
......
......@@ -27,6 +27,10 @@ class YHWorkExperienceViewController: YHBaseViewController {
let view = YHFileRenameInputView.inputView(defalutText: "请输入名称")
return view
}()
lazy var previewFileTool:YHFilePreviewTool = {
let tool = YHFilePreviewTool(targetVC: self)
return tool
}()
lazy var blackMaskView: UIView = {
let view = UIView(frame:UIScreen.main.bounds)
view.backgroundColor = UIColor(hex: 0x0F1214, alpha: 0.5)
......@@ -612,11 +616,12 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo
}
if editType == .preview {
if model.fileUrl.isEmpty == false {
let vc = YHImageViewController()
vc.imgString = model.fileUrl
UIViewController.current?.navigationController?.pushViewController(vc)
self.viewModel.getPublicImageUrl(model.fileUrl) { success, error in
if let success = success {
self.previewFileTool.openXLSXRemoteFile(urlString: success, fileName: model.fileName)
}
}
}
}
if editType == .delete {
self.showDeleteAlert(model)
......@@ -624,9 +629,11 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo
}.show()
} else {
if model.fileUrl.isEmpty == false {
let vc = YHImageViewController()
vc.imgString = model.fileUrl
UIViewController.current?.navigationController?.pushViewController(vc)
self.viewModel.getPublicImageUrl(model.fileUrl) { success, error in
if let success = success {
self.previewFileTool.openXLSXRemoteFile(urlString: success, fileName:model.fileName)
}
}
}
}
}
......@@ -740,9 +747,11 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo
}
if editType == .preview {
if model.fileUrl.isEmpty == false {
let vc = YHImageViewController()
vc.imgString = model.fileUrl
UIViewController.current?.navigationController?.pushViewController(vc)
self.viewModel.getPublicImageUrl(model.fileUrl) { success, error in
if let success = success {
self.previewFileTool.openXLSXRemoteFile(urlString: success, fileName:model.fileName)
}
}
}
}
if editType == .delete {
......@@ -750,15 +759,14 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo
}
}.show()
} else {
// let vc = YHImageViewController()
// vc.imgString = model.fileUrl
// UIViewController.current?.navigationController?.pushViewController(vc)
if model.fileUrl.isEmpty == false {
let vc = YHImageViewController()
vc.imgString = model.fileUrl
UIViewController.current?.navigationController?.pushViewController(vc)
self.viewModel.getPublicImageUrl(model.fileUrl) { success, error in
if let success = success {
self.previewFileTool.openXLSXRemoteFile(urlString: success, fileName:model.fileName)
}
}
}
}
}
......
......@@ -295,7 +295,7 @@ extension YHH5WebViewVC {
switch result {
case .success(let value):
self.saveImage(value.image)
case .failure(let value):
case .failure(_):
YHHUD.flash(message: "保存失败")
}
}
......
......@@ -158,6 +158,11 @@ class YHMySettingViewController: YHBaseViewController, ConstraintRelatableTarget
@objc func didLogoutBtnClicked() {
//灰度规则配置
YHUatHelper.shared.loadUatData()
YHCommonAlertView.show("", "您确定要退出登录吗?", "取消", "确定",fullGuestureEnable: false) {
} callBack: {
......
......@@ -120,6 +120,12 @@ extension YHUatHelper {
//加载服务器的uat配置
func loadUatData() {
if !YHNetworkStatusManager.shared.isNetWorkOK {
printLog("网络不可用")
return
}
if !viewModel.isDataOk {
viewModel.getUatList { success, error in
if success {
......
......@@ -10,6 +10,15 @@ import Foundation
import HandyJSON
//{"op": 1}
class YHUatModel2 : HandyJSON {
var op : Int = -1
required init() {
}
}
class YHUatModel : HandyJSON {
/*
默认展示
......@@ -50,7 +59,8 @@ extension YHUatHelperViewModel {
//请求灰度功能列表配置
func getUatList(callBackBlock:@escaping (_ success: Bool, _ error:YHErrorModel?)->()) {
let params: [String] = ["1", "2","3", "4","5","6", "7","9"]
// let params: [String] = ["1", "2","3", "4","5","6", "7","9"]
let params: [String] = ["1"]
var strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Uat.uatListApi
for (index,item) in params.enumerated() {
if index == 0 {
......@@ -72,6 +82,8 @@ extension YHUatHelperViewModel {
self.isDataOk = true
self.dataList = resultModel
callBackBlock(true,nil)
} failBlock: { err in
self.isDataOk = false
......
......@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "invitation_with_gifts_share_bg@2x.png",
"filename" : "Group 2033195291@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "invitation_with_gifts_share_bg@3x.png",
"filename" : "Group 2033195291@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