Commit 1a74324d authored by DavidHuang's avatar DavidHuang

代码 合并

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