Commit 83c27499 authored by David黄金龙's avatar David黄金龙

处理版本号

parent 0a006aae
...@@ -60,6 +60,9 @@ class YHMySettingViewController: YHBaseViewController, ConstraintRelatableTarget ...@@ -60,6 +60,9 @@ class YHMySettingViewController: YHBaseViewController, ConstraintRelatableTarget
lazy var items: [PersonalModuleItem] = { lazy var items: [PersonalModuleItem] = {
// 是否需要展示版本更新红点 // 是否需要展示版本更新红点
let isShowVersionRedPoint = YHAppVersionManager.shared.needShowRedPointOfSuggestVersionUpdate() let isShowVersionRedPoint = YHAppVersionManager.shared.needShowRedPointOfSuggestVersionUpdate()
let myVer = UIDevice.appVersion() + "_" + UIDevice.appBuild()
#if DEBUG #if DEBUG
return [PersonalModuleItem(title: "通知设置".local, type:.notifySettings), return [PersonalModuleItem(title: "通知设置".local, type:.notifySettings),
PersonalModuleItem(title: "权限设置".local, type:.permissionSettings), PersonalModuleItem(title: "权限设置".local, type:.permissionSettings),
...@@ -68,7 +71,7 @@ class YHMySettingViewController: YHBaseViewController, ConstraintRelatableTarget ...@@ -68,7 +71,7 @@ class YHMySettingViewController: YHBaseViewController, ConstraintRelatableTarget
PersonalModuleItem(title: "用户条款".local, type:.userItems), PersonalModuleItem(title: "用户条款".local, type:.userItems),
PersonalModuleItem(title: "隐私协议".local, type:.privaceAgreement), PersonalModuleItem(title: "隐私协议".local, type:.privaceAgreement),
PersonalModuleItem(title: "设备相关".local, type:.deviceInfo), PersonalModuleItem(title: "设备相关".local, type:.deviceInfo),
PersonalModuleItem(title: "版本 \(UIDevice.appVersion())", isShowRedPoint:isShowVersionRedPoint, type:.version), ] PersonalModuleItem(title: "版本 \(myVer)", isShowRedPoint:isShowVersionRedPoint, type:.version), ]
#elseif TESTENV #elseif TESTENV
return [PersonalModuleItem(title: "通知设置".local, type:.notifySettings), return [PersonalModuleItem(title: "通知设置".local, type:.notifySettings),
...@@ -78,7 +81,7 @@ class YHMySettingViewController: YHBaseViewController, ConstraintRelatableTarget ...@@ -78,7 +81,7 @@ class YHMySettingViewController: YHBaseViewController, ConstraintRelatableTarget
PersonalModuleItem(title: "用户条款".local, type:.userItems), PersonalModuleItem(title: "用户条款".local, type:.userItems),
PersonalModuleItem(title: "隐私协议".local, type:.privaceAgreement), PersonalModuleItem(title: "隐私协议".local, type:.privaceAgreement),
PersonalModuleItem(title: "设备相关".local, type:.deviceInfo), PersonalModuleItem(title: "设备相关".local, type:.deviceInfo),
PersonalModuleItem(title: "版本 \(UIDevice.appVersion())",isShowRedPoint:isShowVersionRedPoint, type:.version)] PersonalModuleItem(title: "版本 \(myVer)",isShowRedPoint:isShowVersionRedPoint, type:.version)]
#else #else
return [PersonalModuleItem(title: "通知设置".local, type:.notifySettings), return [PersonalModuleItem(title: "通知设置".local, type:.notifySettings),
PersonalModuleItem(title: "权限设置".local, type:.permissionSettings), PersonalModuleItem(title: "权限设置".local, type:.permissionSettings),
...@@ -86,7 +89,7 @@ class YHMySettingViewController: YHBaseViewController, ConstraintRelatableTarget ...@@ -86,7 +89,7 @@ class YHMySettingViewController: YHBaseViewController, ConstraintRelatableTarget
PersonalModuleItem(title: "关于我们".local, type:.aboutUs), PersonalModuleItem(title: "关于我们".local, type:.aboutUs),
PersonalModuleItem(title: "用户条款".local, type:.userItems), PersonalModuleItem(title: "用户条款".local, type:.userItems),
PersonalModuleItem(title: "隐私协议".local, type:.privaceAgreement), PersonalModuleItem(title: "隐私协议".local, type:.privaceAgreement),
PersonalModuleItem(title: "版本 \(UIDevice.appVersion())",isShowRedPoint:isShowVersionRedPoint, type:.version)] PersonalModuleItem(title: "版本 \(myVer)",isShowRedPoint:isShowVersionRedPoint, type:.version)]
#endif #endif
}() }()
...@@ -139,7 +142,7 @@ class YHMySettingViewController: YHBaseViewController, ConstraintRelatableTarget ...@@ -139,7 +142,7 @@ class YHMySettingViewController: YHBaseViewController, ConstraintRelatableTarget
let version = "版本号:V" + UIDevice.appVersion() + "_" + UIDevice.appBuild() + "测试服" let version = "版本号:V" + UIDevice.appVersion() + "_" + UIDevice.appBuild() + "测试服"
versionLabel.text = version versionLabel.text = version
#else #else
let version = "版本号:V" + UIDevice.appVersion() + "_" + UIDevice.appBuild() let version = "版本号:V" + UIDevice.appVersion() + "_" + UIDevice.appBuild() + "测试服"
versionLabel.text = version versionLabel.text = version
versionLabel.isHidden = true versionLabel.isHidden = true
#endif #endif
......
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