Commit 43c527f4 authored by David黄金龙's avatar David黄金龙

Merge branch 'youhua-dev' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS into youhua-dev

* 'youhua-dev' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS:
  //  bugly
  红点逻辑
  //  增加测试代码
  //  bugly 修复
  bug测试
  //  上传bugly 添加build号
parents 5f478c06 0aca3048
...@@ -3,9 +3,6 @@ default_platform(:ios) ...@@ -3,9 +3,6 @@ default_platform(:ios)
platform :ios do platform :ios do
desc "Description of what the lane does" desc "Description of what the lane does"
# 打包时候用的名称 例如 fastlane app # 打包时候用的名称 例如 fastlane app
adhoc_version = get_version_number_from_xcodeproj(scheme: "galaxyForTestArchive")
release_version = get_version_number_from_xcodeproj(scheme: "galaxy")
bundle_id = "com.intelligence.galaxy" bundle_id = "com.intelligence.galaxy"
adhoc_profile_name = "com.adhoc.profile" adhoc_profile_name = "com.adhoc.profile"
...@@ -23,8 +20,8 @@ platform :ios do ...@@ -23,8 +20,8 @@ platform :ios do
release_bugly_app_key = "ce23936f-3625-4452-92d9-31551858ae02" release_bugly_app_key = "ce23936f-3625-4452-92d9-31551858ae02"
# 上传符号表相对路径 # 上传符号表相对路径
adhoc_symbol_path = "./App/ad-hoc/galaxy.app.dSYM" adhoc_symbol_path = "./App/ad-hoc/galaxy.app.dSYM.zip"
release_symbol_path = "./App/Release/galaxy.app.dSYM" release_symbol_path = "./App/Release/galaxy.app.dSYM.zip"
#可以用来打包的分支 #可以用来打包的分支
develop_branch = "develop" develop_branch = "develop"
...@@ -92,11 +89,15 @@ platform :ios do ...@@ -92,11 +89,15 @@ platform :ios do
#1、通过 bugly 官网下载 buglyqq-upload-symbol.jar,可直接点击该链接下载 #1、通过 bugly 官网下载 buglyqq-upload-symbol.jar,可直接点击该链接下载
#2、下载后放在 ~/bin/ 文件夹下,文件夹不存在时手动创建 #2、下载后放在 ~/bin/ 文件夹下,文件夹不存在时手动创建
adhoc_version = get_version_number_from_xcodeproj(scheme: "galaxyForTestArchive", xcodeproj: "./galaxy.xcodeproj")
adhoc_build_number = get_build_number_from_xcodeproj(scheme: "galaxyForTestArchive", xcodeproj: "./galaxy.xcodeproj")
adhoc_version_key = "#{adhoc_version}.#{adhoc_build_number}"
upload_to_bugly( upload_to_bugly(
appid: adhoc_bugly_app_id, appid: adhoc_bugly_app_id,
appkey: adhoc_bugly_app_key, appkey: adhoc_bugly_app_key,
bundleid: bundle_id, bundleid: bundle_id,
version: adhoc_version, version: adhoc_version_key,
inputSymbol: adhoc_symbol_path) inputSymbol: adhoc_symbol_path)
# mac上的通知弹窗,通知上传符号表完毕 # mac上的通知弹窗,通知上传符号表完毕
...@@ -159,11 +160,15 @@ platform :ios do ...@@ -159,11 +160,15 @@ platform :ios do
# mac上的通知弹窗,通知上传pgy完毕 # mac上的通知弹窗,通知上传pgy完毕
notification(app_icon: "", title: "manager", subtitle: "安装包上传到蒲公英成功", message: "准备上传符号表到bugly") notification(app_icon: "", title: "manager", subtitle: "安装包上传到蒲公英成功", message: "准备上传符号表到bugly")
release_version = get_version_number_from_xcodeproj(scheme: "galaxy", xcodeproj: "./galaxy.xcodeproj")
release_build_number = get_build_number_from_xcodeproj(scheme: "galaxy", xcodeproj: "./galaxy.xcodeproj")
release_version_key = "#{release_version}.#{release_build_number}"
upload_to_bugly( upload_to_bugly(
appid: release_bugly_app_id, appid: release_bugly_app_id,
appkey: release_bugly_app_key, appkey: release_bugly_app_key,
bundleid: bundle_id, bundleid: bundle_id,
version: release_version, version: release_version_key,
inputSymbol: release_symbol_path) inputSymbol: release_symbol_path)
# mac上的通知弹窗,通知上传符号表完毕 # mac上的通知弹窗,通知上传符号表完毕
......
...@@ -29,8 +29,9 @@ struct YHUserInformationModel { ...@@ -29,8 +29,9 @@ struct YHUserInformationModel {
var message: String? var message: String?
var type: YHItemSelectType? var type: YHItemSelectType?
var value: [String]? var value: [String]?
var isNeed: Bool?
init(id: YHUserInformationID? = nil, title: String? = nil, isUserKeyBoard: Bool? = nil, prompts: String? = nil, message: String? = nil, type: YHItemSelectType? = nil, value: [String]? = nil) { init(id: YHUserInformationID? = nil, title: String? = nil, isUserKeyBoard: Bool? = nil, prompts: String? = nil, message: String? = nil, type: YHItemSelectType? = nil, value: [String]? = nil, isNeed: Bool? = nil) {
self.id = id self.id = id
self.title = title self.title = title
self.isUserKeyBoard = isUserKeyBoard self.isUserKeyBoard = isUserKeyBoard
...@@ -38,6 +39,7 @@ struct YHUserInformationModel { ...@@ -38,6 +39,7 @@ struct YHUserInformationModel {
self.message = message self.message = message
self.type = type self.type = type
self.value = value self.value = value
self.isNeed = isNeed
} }
} }
......
...@@ -107,13 +107,25 @@ class YHMyInformationItemCell: UITableViewCell { ...@@ -107,13 +107,25 @@ class YHMyInformationItemCell: UITableViewCell {
func updateAllViews() { func updateAllViews() {
guard let dataSource = dataSource else { return } guard let dataSource = dataSource else { return }
let str = dataSource.title ?? "" if dataSource.isNeed ?? false {
let attributes: [NSAttributedString.Key: Any] = [ let str = "*" + (dataSource.title ?? "")
.font: UIFont.PFSC_R(ofSize: 14), let attributes: [NSAttributedString.Key: Any] = [
.foregroundColor: UIColor.mainTextColor .font: UIFont.PFSC_R(ofSize: 14),
] .foregroundColor: UIColor.mainTextColor
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes) ]
titleLabel.attributedText = questionAttrStr let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
let starRange = NSRange(location: 0, length: 1)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.failColor, range: starRange)
titleLabel.attributedText = questionAttrStr
} else {
let str = dataSource.title ?? ""
let attributes: [NSAttributedString.Key: Any] = [
.font: UIFont.PFSC_R(ofSize: 14),
.foregroundColor: UIColor.mainTextColor
]
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
titleLabel.attributedText = questionAttrStr
}
messageTextField.placeholder = dataSource.prompts messageTextField.placeholder = dataSource.prompts
messageTextField.text = dataSource.message messageTextField.text = dataSource.message
if dataSource.isUserKeyBoard ?? false { if dataSource.isUserKeyBoard ?? false {
......
...@@ -16,17 +16,17 @@ class YHInformationAuthorizeViewModel: YHBaseViewModel { ...@@ -16,17 +16,17 @@ class YHInformationAuthorizeViewModel: YHBaseViewModel {
} }
func getBaseDataSource() -> [YHUserInformationModel] { func getBaseDataSource() -> [YHUserInformationModel] {
let item1 = YHUserInformationModel(id: .id1, title: "真实姓名", isUserKeyBoard: true, prompts: "请输入您的真实姓名", message: model.username) let item1 = YHUserInformationModel(id: .id1, title: "真实姓名", isUserKeyBoard: true, prompts: "请输入您的真实姓名", message: model.username, isNeed: false)
let item2 = YHUserInformationModel(id: .id6, title: "所在地", isUserKeyBoard: false, prompts: "请选择您的所在地", message: model.address.country, type: .country) let item2 = YHUserInformationModel(id: .id6, title: "所在地", isUserKeyBoard: false, prompts: "请选择您的所在地", message: model.address.country, type: .country, isNeed: false)
var string = "" var string = ""
if model.address.province.count != 0 { if model.address.province.count != 0 {
string = model.address.province + "/" + model.address.city string = model.address.province + "/" + model.address.city
} }
let item3 = YHUserInformationModel(id: .id2, title: "所在地-省市", isUserKeyBoard: false, prompts: "请选择您的所在地", message: string, type: .address) let item3 = YHUserInformationModel(id: .id2, title: "所在地-省市", isUserKeyBoard: false, prompts: "请选择您的所在地", message: string, type: .address, isNeed: false)
let item4 = YHUserInformationModel(id: .id3, title: "毕业院校", isUserKeyBoard: true, prompts: "请输入您的毕业院校", message: model.college) let item4 = YHUserInformationModel(id: .id3, title: "毕业院校", isUserKeyBoard: true, prompts: "请输入您的毕业院校", message: model.college, isNeed: false)
let item5 = YHUserInformationModel(id: .id4, title: "所属行业", isUserKeyBoard: false, prompts: "请选择您的所属行业", message: model.industry, type: .id) let item5 = YHUserInformationModel(id: .id4, title: "所属行业", isUserKeyBoard: false, prompts: "请选择您的所属行业", message: model.industry, type: .id, isNeed: false)
let item6 = YHUserInformationModel(id: .id5, title: "职位", isUserKeyBoard: true, prompts: "请输入您的职位", message: model.position) let item6 = YHUserInformationModel(id: .id5, title: "职位", isUserKeyBoard: true, prompts: "请输入您的职位", message: model.position, isNeed: false)
if model.address.country.contains("中国") { if model.address.country.contains("中国") {
return [item1, item2, item3, item4, item5, item6] return [item1, item2, item3, item4, item5, item6]
} }
......
...@@ -195,8 +195,16 @@ class YHMySettingViewController: YHBaseViewController, ConstraintRelatableTarget ...@@ -195,8 +195,16 @@ class YHMySettingViewController: YHBaseViewController, ConstraintRelatableTarget
//点击注销按钮 //点击注销按钮
@objc func clickRegBtn() { @objc func clickRegBtn() {
YHCommonAlertView.show("风险提示", "您正在进行账号注销操作,一旦完成注销,您将无法再登录\"银河港生活\"APP,并因此无法在APP中继续现有的服务流程。\n \n真心希望您能留下来,继续享受银河港生活为您提供的精彩服务。", "取消", "坚持注销") { YHCommonAlertView.show("风险提示", "您正在进行账号注销操作,一旦完成注销,您将无法再登录\"银河港生活\"APP,并因此无法在APP中继续现有的服务流程。\n \n真心希望您能留下来,继续享受银河港生活为您提供的精彩服务。", "取消", "坚持注销") {
self.unRegisterAPPOp()
if true {
let arrData = [1,2]
let i = arrData[10]
if i == 100 {
}
return
}
self.unRegisterAPPOp()
} }
} }
......
...@@ -275,6 +275,14 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource { ...@@ -275,6 +275,14 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if (indexPath.row >= items.count) { return } if (indexPath.row >= items.count) { return }
#if DEBUG
YHHUD.flash(message: "DEBUG", duration: 2.0)
#elseif TESTNEV
YHHUD.flash(message: "TESTNEV", duration: 2.0)
#else
YHHUD.flash(message: "RELEASE", duration: 2.0)
#endif
if !checkLogin() { if !checkLogin() {
return return
......
...@@ -38,15 +38,15 @@ class YHEditViewModel: YHBaseViewModel { ...@@ -38,15 +38,15 @@ class YHEditViewModel: YHBaseViewModel {
} }
func getBaseDataSource() -> [YHUserInformationModel] { func getBaseDataSource() -> [YHUserInformationModel] {
let item1 = YHUserInformationModel(id: .id1, title: "真实姓名", isUserKeyBoard: true, prompts: "请输入您的真实姓名", message: model.username) let item1 = YHUserInformationModel(id: .id1, title: "真实姓名", isUserKeyBoard: true, prompts: "请输入您的真实姓名", message: model.username, isNeed: true)
let item2 = YHUserInformationModel(id: .id6, title: "所在地", isUserKeyBoard: false, prompts: "请选择您的所在地", message: model.address.country, type: .country) let item2 = YHUserInformationModel(id: .id6, title: "所在地", isUserKeyBoard: false, prompts: "请选择您的所在地", message: model.address.country, type: .country, isNeed: true)
var string = "" var string = ""
if model.address.province.count != 0 { if model.address.province.count != 0 {
string = model.address.province + "/" + model.address.city string = model.address.province + "/" + model.address.city
} }
let item3 = YHUserInformationModel(id: .id2, title: "所在地-省市", isUserKeyBoard: false, prompts: "请选择您的所在地", message: string, type: .address) let item3 = YHUserInformationModel(id: .id2, title: "所在地-省市", isUserKeyBoard: false, prompts: "请选择您的所在地", message: string, type: .address, isNeed: true)
let item4 = YHUserInformationModel(id: .id7, title: "星座", isUserKeyBoard: false, prompts: "请选择您的星座", message: model.zodiac, type: .constellation) let item4 = YHUserInformationModel(id: .id7, title: "星座", isUserKeyBoard: false, prompts: "请选择您的星座", message: model.zodiac, type: .constellation, isNeed: false)
if model.address.country.contains("中国") { if model.address.country.contains("中国") {
return [item1, item2, item3, item4] return [item1, item2, item3, item4]
} }
...@@ -82,17 +82,17 @@ class YHEditViewModel: YHBaseViewModel { ...@@ -82,17 +82,17 @@ class YHEditViewModel: YHBaseViewModel {
} }
func getBaseSchoolDataSource() -> [YHUserInformationModel] { func getBaseSchoolDataSource() -> [YHUserInformationModel] {
let item1 = YHUserInformationModel(id: .id3, title: "毕业院校", isUserKeyBoard: true, prompts: "请输入您的毕业院校", message: model.college) let item1 = YHUserInformationModel(id: .id3, title: "毕业院校", isUserKeyBoard: true, prompts: "请输入您的毕业院校", message: model.college, isNeed: true)
let item2 = YHUserInformationModel(id: .id8, title: "专业", isUserKeyBoard: true, prompts: "请输入您的专业", message: model.major) let item2 = YHUserInformationModel(id: .id8, title: "专业", isUserKeyBoard: true, prompts: "请输入您的专业", message: model.major, isNeed: false)
let item3 = YHUserInformationModel(id: .id9, title: "学位", isUserKeyBoard: false, prompts: "请选择您的学位", message: model.background, type: .degree) let item3 = YHUserInformationModel(id: .id9, title: "学位", isUserKeyBoard: false, prompts: "请选择您的学位", message: model.background, type: .degree, isNeed: false)
return [item1, item2, item3] return [item1, item2, item3]
} }
func getBaseWorkDataSource() -> [YHUserInformationModel] { func getBaseWorkDataSource() -> [YHUserInformationModel] {
let item1 = YHUserInformationModel(id: .id10, title: "所在企业", isUserKeyBoard: true, prompts: "请输入您的所在企业", message: model.companyName) let item1 = YHUserInformationModel(id: .id10, title: "所在企业", isUserKeyBoard: true, prompts: "请输入您的所在企业", message: model.companyName, isNeed: false)
let item2 = YHUserInformationModel(id: .id5, title: "职位", isUserKeyBoard: true, prompts: "请输入您的职位", message: model.position) let item2 = YHUserInformationModel(id: .id5, title: "职位", isUserKeyBoard: true, prompts: "请输入您的职位", message: model.position, isNeed: true)
let item3 = YHUserInformationModel(id: .id4, title: "所在行业", isUserKeyBoard: false, prompts: "请选择您的所在行业", message: model.industry, type: .id) let item3 = YHUserInformationModel(id: .id4, title: "所在行业", isUserKeyBoard: false, prompts: "请选择您的所在行业", message: model.industry, type: .id, isNeed: true)
return [item1, item2, item3] return [item1, item2, item3]
} }
......
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