Commit dcc77b02 authored by David黄金龙's avatar David黄金龙

Merge branch 'davidhuang' into develop

* davidhuang:
  图片替换
  10  七鱼智能 灰度
  个人 头像链接替换
  头像 地址替换 方便七鱼客服中展示用户自己头像
  一处代码优化
parents 18ad73a2 acb968fb
...@@ -67,15 +67,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate { ...@@ -67,15 +67,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
YHOSSManager.share.getOSSID() YHOSSManager.share.getOSSID()
//for test hjl
AGCInstance.startUp()
AGCAppLinking.instance().handle { (link, error) in
let deepLink = link?.deepLink
//TODO: 增加deeplink地址跳转
print(deepLink as Any)
}
//设置主窗口 //设置主窗口
setupRootVC() setupRootVC()
return true return true
...@@ -153,6 +144,11 @@ extension AppDelegate { ...@@ -153,6 +144,11 @@ extension AppDelegate {
//3、AGC 短链相关 //3、AGC 短链相关
AGCInstance.startUp() AGCInstance.startUp()
AGCAppLinking.instance().handle { (link, error) in
let deepLink = link?.deepLink
//TODO: 增加deeplink地址跳转
print(deepLink as Any)
}
} }
//2.通用全局UI设置相关 //2.通用全局UI设置相关
......
...@@ -186,7 +186,9 @@ class YHInformationAuthorizationStepOneViewController: YHBaseViewController { ...@@ -186,7 +186,9 @@ class YHInformationAuthorizationStepOneViewController: YHBaseViewController {
self.photoImageView.image = result self.photoImageView.image = result
self.viewModel.uploadImage(result, true) {[weak self] success, error in self.viewModel.uploadImage(result, true) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
self.viewModel.model.avatar = success ?? "" var replacedString = (success ?? "").getCdnUrl()
print(replacedString)
self.viewModel.model.avatar = replacedString
} }
} }
self.navigationController?.pushViewController(clipperVC, animated: true) self.navigationController?.pushViewController(clipperVC, animated: true)
......
...@@ -164,7 +164,10 @@ class YHUserInfoSettingViewController: YHBaseViewController { ...@@ -164,7 +164,10 @@ class YHUserInfoSettingViewController: YHBaseViewController {
self.photoImageView.image = result self.photoImageView.image = result
self.viewModel.uploadImage(result, true) {[weak self] success, error in self.viewModel.uploadImage(result, true) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
self.headUrl = success ?? ""
let replacedString = (success ?? "").getCdnUrl()
print(replacedString)
self.headUrl = replacedString
} }
} }
self.navigationController?.pushViewController(clipperVC, animated: true) self.navigationController?.pushViewController(clipperVC, animated: true)
......
...@@ -151,7 +151,10 @@ class YHEditBaseUserInfoViewController: YHBaseViewController { ...@@ -151,7 +151,10 @@ class YHEditBaseUserInfoViewController: YHBaseViewController {
self.photoImageView.image = result self.photoImageView.image = result
self.viewModel.uploadImage(result, true) {[weak self] success, error in self.viewModel.uploadImage(result, true) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
viewModel.model.avatar = success ?? ""
var replacedString = (success ?? "").getCdnUrl()
print(replacedString)
viewModel.model.avatar = replacedString
if self.viewModel.isCanNext(step: 1) { if self.viewModel.isCanNext(step: 1) {
nextButton.isEnabled = true nextButton.isEnabled = true
nextButton.backgroundColor = UIColor.brandMainColor nextButton.backgroundColor = UIColor.brandMainColor
......
...@@ -22,6 +22,8 @@ enum YHUatModules: Int { ...@@ -22,6 +22,8 @@ enum YHUatModules: Int {
8、更新-强制更新弹窗、true 8、更新-强制更新弹窗、true
9、更新-建议更新弹窗、false 9、更新-建议更新弹窗、false
10、七鱼智能客服、false
*/ */
case Mine_Unknow = 0 case Mine_Unknow = 0
...@@ -37,6 +39,8 @@ enum YHUatModules: Int { ...@@ -37,6 +39,8 @@ enum YHUatModules: Int {
case Update_Fource = 8 //更新-强制更新弹窗 case Update_Fource = 8 //更新-强制更新弹窗
case Update_Suggest = 9 //更新-建议更新弹窗 case Update_Suggest = 9 //更新-建议更新弹窗
case QiYu_Service = 10 //七鱼智能客服入口
//1-可见 2-不可见 3-新界面 //1-可见 2-不可见 3-新界面
var defaultValue : Int { var defaultValue : Int {
...@@ -60,6 +64,8 @@ enum YHUatModules: Int { ...@@ -60,6 +64,8 @@ enum YHUatModules: Int {
return 2 return 2
case .Update_Suggest: case .Update_Suggest:
return 2 return 2
case .QiYu_Service:
return 2
default: default:
return 2 return 2
} }
......
...@@ -31,6 +31,7 @@ class YHUatModel : HandyJSON { ...@@ -31,6 +31,7 @@ class YHUatModel : HandyJSON {
7、服务-订单搜索、false 7、服务-订单搜索、false
8、更新-强制更新弹窗、true 8、更新-强制更新弹窗、true
9、更新-建议更新弹窗、false 9、更新-建议更新弹窗、false
10、七鱼智能客服、false
*/ */
var module_number : String = "" var module_number : String = ""
var result : Int = 0 //命中结果 0-未找到该规则,走默认逻辑 1-未命中,2-命中 var result : Int = 0 //命中结果 0-未找到该规则,走默认逻辑 1-未命中,2-命中
...@@ -61,7 +62,7 @@ extension YHUatHelperViewModel { ...@@ -61,7 +62,7 @@ extension YHUatHelperViewModel {
return return
} }
let params: [String] = ["1", "2","3", "4","5","6","9"] let params: [String] = ["1", "2","3", "4","5","6","9","10"]
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 {
......
...@@ -322,4 +322,11 @@ extension String { ...@@ -322,4 +322,11 @@ extension String {
} }
return nil return nil
} }
//头像使用cdn地址
func getCdnUrl() -> String {
var replacedString = self.replacingOccurrences(of: "prod-bucket-v1-pub.oss-cn-shenzhen.aliyuncs.com", with: "prod-cdn-pub.galaxy-immi.com")
replacedString = replacedString.replacingOccurrences(of: "test-bucket-v1-pub.oss-cn-shenzhen.aliyuncs.com", with: "test-cdn-pub.galaxy-immi.com")
return replacedString
}
} }
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