Commit 072319e5 authored by pete谢兆麟's avatar pete谢兆麟

Merge branch 'yinhe-live-1212' of...

Merge branch 'yinhe-live-1212' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS into yinhe-live-1212
parents 13ba21f4 e3bcdfd9
......@@ -178,6 +178,7 @@
0430E68E2C7875F4000511E2 /* YHAdopterDependentDataModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E68D2C7875F4000511E2 /* YHAdopterDependentDataModel.swift */; };
0430E6902C7EC78C000511E2 /* YHCardUploadView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E68F2C7EC78C000511E2 /* YHCardUploadView.swift */; };
0430E6922C7EF08B000511E2 /* YHAdopterOtherCardTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6912C7EF08B000511E2 /* YHAdopterOtherCardTableViewCell.swift */; };
0430EFDA2D041F5800EC8CC0 /* YHAIEvaluationWebView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430EFD92D041F5800EC8CC0 /* YHAIEvaluationWebView.swift */; };
0431F8822C942D88003B84F4 /* YHResignMaterialNameCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0431F8812C942D88003B84F4 /* YHResignMaterialNameCell.swift */; };
0431F8842C9579F7003B84F4 /* YHResignTemplateSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0431F8832C9579F7003B84F4 /* YHResignTemplateSheetView.swift */; };
04358E042C77322700811928 /* YHHaveGrabbedNumberListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04358E032C77322700811928 /* YHHaveGrabbedNumberListCell.swift */; };
......@@ -1289,6 +1290,7 @@
0430E68D2C7875F4000511E2 /* YHAdopterDependentDataModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterDependentDataModel.swift; sourceTree = "<group>"; };
0430E68F2C7EC78C000511E2 /* YHCardUploadView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCardUploadView.swift; sourceTree = "<group>"; };
0430E6912C7EF08B000511E2 /* YHAdopterOtherCardTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterOtherCardTableViewCell.swift; sourceTree = "<group>"; };
0430EFD92D041F5800EC8CC0 /* YHAIEvaluationWebView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAIEvaluationWebView.swift; sourceTree = "<group>"; };
0431F8812C942D88003B84F4 /* YHResignMaterialNameCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResignMaterialNameCell.swift; sourceTree = "<group>"; };
0431F8832C9579F7003B84F4 /* YHResignTemplateSheetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResignTemplateSheetView.swift; sourceTree = "<group>"; };
04358E032C77322700811928 /* YHHaveGrabbedNumberListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHaveGrabbedNumberListCell.swift; sourceTree = "<group>"; };
......@@ -4490,6 +4492,7 @@
04BE3A902CFFFF0900BD31DB /* YHFixProductMessageCell.swift */,
04BE3A912CFFFF0900BD31DB /* YHProductItemView.swift */,
04BE3A922CFFFF0900BD31DB /* YHProductListMessageCell.swift */,
0430EFD92D041F5800EC8CC0 /* YHAIEvaluationWebView.swift */,
);
path = V;
sourceTree = "<group>";
......@@ -6271,6 +6274,7 @@
047F3DF22CE888EF001B2A6D /* YHDocumentListCell.swift in Sources */,
040AE9992CF5CB1D00310241 /* YHSelectLookHeadView.swift in Sources */,
04256DE42C72E3FA00A37BA4 /* YHInfoItemOptionView.swift in Sources */,
0430EFDA2D041F5800EC8CC0 /* YHAIEvaluationWebView.swift in Sources */,
04256DF22C734E7E00A37BA4 /* YHGrabFileCell.swift in Sources */,
04CA2C052CB8F75700F36DE7 /* YHResignUploadDocListViewModel.swift in Sources */,
A5ACE9512B4564F7002C94D2 /* YhConstant.swift in Sources */,
......@@ -7172,7 +7176,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxyTestEnv.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5;
CURRENT_PROJECT_VERSION = 6;
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = (
......@@ -7314,7 +7318,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxy.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5;
CURRENT_PROJECT_VERSION = 6;
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = (
......@@ -7519,7 +7523,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxyDebug.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5;
CURRENT_PROJECT_VERSION = 6;
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = (
......@@ -7566,7 +7570,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxy.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5;
CURRENT_PROJECT_VERSION = 6;
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = (
......
......@@ -54,20 +54,7 @@ class YHAIMainChatViewController: YHBaseViewController {
v.stopSendBlock = {
[weak self] in
guard let self = self else { return }
self.manager.stopChat(chatId: self.manager.chatId, conversationId: self.conversationId) { success, error in
self.bottomInputView.status = self.bottomInputView.textView.text.isEmpty ? .disableSend : .enableSend
if success {
self.chatConfig.disableHandleMessage = true
self.chatConfig.removeThinkingMessageFromChatList(&self.messages)
self.bottomInputView.status = self.bottomInputView.textView.text.isEmpty ? .disableSend : .enableSend
self.tableView.reloadData()
}
}
}
v.keyBoardChangeBlock = {
[weak self] isKeyBoardShow in
guard let self = self else { return }
self.scrollToBottom()
self.stopAutoResponse()
}
return v
}()
......@@ -94,7 +81,7 @@ class YHAIMainChatViewController: YHBaseViewController {
tableView.snp.makeConstraints { make in
make.left.right.equalTo(0)
make.top.equalTo(0)
make.bottom.equalTo(bottomInputView.snp.top).offset(-10)
make.bottom.equalTo(-64-k_Height_safeAreaInsetsBottom())
}
bottomInputView.snp.makeConstraints { make in
......@@ -115,6 +102,11 @@ class YHAIMainChatViewController: YHBaseViewController {
autoResponseLocalPictureMessage()
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
self.bottomInputView.showKeyBoard(false)
}
func scrollToBottom() {
self.tableView.reloadData {
if self.messages.count > 0 {
......@@ -171,12 +163,15 @@ class YHAIMainChatViewController: YHBaseViewController {
return !uuids.contains($0.messageId)
}
messages.insert(contentsOf: results, at: 0)
self.tableView.reloadData()
self.tableView.reloadData {
self.scrollToBottom()
}
}
}
func autoResponseLocalPictureMessage() {
if isNeedAutoResponseImage {
isNeedAutoResponseImage = false
let previewUrl = "https://prod-cdn-pub.galaxy-immi.com/5000000/chats/mask_group.png"
let msg = self.chatConfig.createRobotResponseLocalPictureMessage("ai_auto_chat_img", previewUrl:previewUrl)
messages.append(msg)
......@@ -186,6 +181,20 @@ class YHAIMainChatViewController: YHBaseViewController {
}
}
func stopAutoResponse(completion:((Bool)->())? = nil) {
self.manager.stopChat(chatId: self.manager.chatId, conversationId: self.conversationId) { success, error in
self.bottomInputView.status = self.bottomInputView.textView.text.isEmpty ? .disableSend : .enableSend
if success {
self.manager.request?.cancel()
self.chatConfig.disableHandleMessage = true
self.chatConfig.removeThinkingMessageFromChatList(&self.messages)
self.bottomInputView.status = self.bottomInputView.textView.text.isEmpty ? .disableSend : .enableSend
self.tableView.reloadData()
completion?(success)
}
}
}
func uploadEvaluationMessage(_ msg: YHAIChatMessage, callback:((Bool)->())? = nil) {
viewModel.createMessage(conversationId: conversationId, role: "assistant", msg: msg) {
[weak self] success, error in
......@@ -211,6 +220,10 @@ class YHAIMainChatViewController: YHBaseViewController {
}
}
}
func isNeedStopResonse() -> Bool {
return self.bottomInputView.status == .loading
}
}
extension YHAIMainChatViewController: UITableViewDelegate, UITableViewDataSource {
......@@ -234,7 +247,15 @@ extension YHAIMainChatViewController: UITableViewDelegate, UITableViewDataSource
cell.messageClick = {
[weak self] text in
guard let self = self else { return }
self.sendMessage(text)
if self.isNeedStopResonse() {
self.stopAutoResponse { success in
if success {
self.sendMessage(text)
}
}
} else {
self.sendMessage(text)
}
}
return cell
......@@ -290,7 +311,11 @@ extension YHAIMainChatViewController: UITableViewDelegate, UITableViewDataSource
self.scrollToBottom()
}
}
}
cell.updateBlock = {
[weak self] in
guard let self = self else { return }
self.tableView.reloadData()
}
}
return cell
......@@ -300,6 +325,11 @@ extension YHAIMainChatViewController: UITableViewDelegate, UITableViewDataSource
if let imgInfo = msg.body.imageInfo {
cell.imgInfo = imgInfo
}
cell.updateBlock = {
[weak self] in
guard let self = self else { return }
self.tableView.reloadData()
}
return cell
}
}
......
......@@ -17,6 +17,7 @@ class YHAIRequestManager: NSObject {
static let subrobotConversationConfigKey = "subrobot_conversation_config_key"
var sessionId: String = ""
var request: DataStreamRequest?
let prefix_id = "id:"
let prefix_event = "event:"
......@@ -24,7 +25,7 @@ class YHAIRequestManager: NSObject {
let viewModel = YHAIViewModel()
var uuid = UUID().uuidString + NSDate().timeIntervalSince1970.description
var chatId = UUID().uuidString + NSDate().timeIntervalSince1970.description
var chatId = ""
func getCommonHeaders() -> HTTPHeaders {
......@@ -73,57 +74,58 @@ class YHAIRequestManager: NSObject {
let headers = self.getCommonHeaders()
// 发送 POST 请求
AF.streamRequest(url,
method: .post,
headers: headers,
automaticallyCancelOnStreamError: false,
requestModifier: { request in
if let httpBodyStream = self.dictionaryToHttpBodyStream(parameters) {
request.httpBodyStream = httpBodyStream
}
}).responseStreamString {
[weak self] stream in
guard let self = self else { return }
request = AF.streamRequest(url,
method: .post,
headers: headers,
automaticallyCancelOnStreamError: false,
requestModifier: { request in
if let httpBodyStream = self.dictionaryToHttpBodyStream(parameters) {
request.httpBodyStream = httpBodyStream
}
}).responseStreamString {
[weak self] stream in
guard let self = self else { return }
switch stream.event {
case let .stream(result):
switch result {
case let .success(string):
print(string)
self.handle(dataString: string) {
response, done in
callback?(response, done)
}
case let .failure(error):
print("\(error)")
// 一段话结束需要重新生成uuid 来
self.uuid = UUID().uuidString + NSDate().timeIntervalSince1970.description
callback?(nil, true)
}
case let .complete(completion):
print("COMPLETE")
// 一段话结束需要重新生成uuid 来
self.uuid = UUID().uuidString + NSDate().timeIntervalSince1970.description
callback?(nil, true)
if let af_error = completion.error {
if let error = af_error.underlyingError {
print("\(error)")
} else {
print("&&&&&&&&&&&&&&&&&&&&&&&&&&&&")
}
} else if let res = completion.response {
print("&&&&&&&&&&&&&&&&&&&&&&&&&&&&")
print("\(res)")
switch stream.event {
case let .stream(result):
switch result {
case let .success(string):
print(string)
self.handle(dataString: string) {
response, done in
callback?(response, done)
}
case let .failure(error):
print("\(error)")
// 一段话结束需要重新生成uuid 来
self.uuid = UUID().uuidString + NSDate().timeIntervalSince1970.description
callback?(nil, true)
}
case let .complete(completion):
print("COMPLETE")
// 一段话结束需要重新生成uuid 来
self.uuid = UUID().uuidString + NSDate().timeIntervalSince1970.description
callback?(nil, true)
if let af_error = completion.error {
if let error = af_error.underlyingError {
print("\(error)")
} else {
print("&&&&&&&&&&&&&&&&&&&&&&&&&&&&")
}
} else if let res = completion.response {
print("&&&&&&&&&&&&&&&&&&&&&&&&&&&&")
print("\(res)")
} else {
print("response done")
}
}
}
} else {
print("response done")
}
}
}
}
func stopChat(chatId: String, conversationId: String, callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
......
......@@ -11,6 +11,7 @@ import JXSegmentedView
import IQKeyboardManagerSwift
let isNeedShowAutoPictureMsg = "isNeedShowAutoPictureMsg"
let isNeedShowAIChatKeyBoard = "isNeedShowAIChatKeyBoard"
class YHAIServiceListViewController: YHBaseViewController {
......@@ -81,7 +82,8 @@ class YHAIServiceListViewController: YHBaseViewController {
}()
@objc func didInputButtonClicked() {
let dict:[String : Any] = [isNeedShowAutoPictureMsg : false]
let dict:[String : Any] = [isNeedShowAutoPictureMsg : false,
isNeedShowAIChatKeyBoard : true]
NotificationCenter.default.post(name: YhConstant.YhNotification.didSwitchToAIChatNotification, object: dict)
}
......@@ -168,7 +170,7 @@ extension YHAIServiceListViewController: UICollectionViewDelegate, UICollectionV
} else if model.redirectPath == YHAIJumpPageType.appServiceTab.rawValue {
// 服务页
UIViewController.current?.navigationController?.popToRootViewController(animated: true)
UIViewController.current?.navigationController?.popToRootViewController(animated: false)
goTabBarBy(tabType: .service)
}
......@@ -176,7 +178,8 @@ extension YHAIServiceListViewController: UICollectionViewDelegate, UICollectionV
if model.businessType == YHAIRobotType.main.rawValue {
// 切到主Robot
let dict:[String : Any] = [isNeedShowAutoPictureMsg : true]
let dict:[String : Any] = [isNeedShowAutoPictureMsg : true,
isNeedShowAIChatKeyBoard : false]
NotificationCenter.default.post(name: YhConstant.YhNotification.didSwitchToAIChatNotification, object: dict)
} else {
......
......@@ -89,11 +89,13 @@ class YHAITabViewController: YHBaseViewController {
@objc func didBackBtnClicked() {
mainChatVC.bottomInputView.showKeyBoard(false)
if segmentedView.selectedIndex == 1 { // AI 对话
// tab切换到港小宝
self.segmentedView.selectItemAt(index: 0)
return
}
self.navigationController?.popViewController(animated: true)
}
......@@ -211,15 +213,20 @@ class YHAITabViewController: YHBaseViewController {
@objc func didJumoToAIChat(_ notify: Notification) {
var showImg = false
var showKeyBoard = false
if let dict = notify.object as? [String : Any] {
if let isShowImg = dict[isNeedShowAutoPictureMsg] as? Bool {
showImg = isShowImg
}
if let isShowKeyBoard = dict[isNeedShowAIChatKeyBoard] as? Bool {
showKeyBoard = isShowKeyBoard
}
}
printLog("SHOW_IMG: \(showImg)")
mainChatVC.isNeedAutoResponseImage = showImg
jumpToItemIndex(itemIndex: 1)
mainChatVC.bottomInputView.showKeyBoard()
mainChatVC.bottomInputView.showKeyBoard(showKeyBoard)
}
......
......@@ -267,8 +267,8 @@ class YHAIListItemModel: SmartCodable {
// customerVoice -> APP客户心声 productList -> APP-首页银河甄选
var redirectPath: String = ""
var tags: [YHProductTag] = []
var originalPrice: Int = 0
var discountPrice: Int = 0
var originalPrice: String = ""
var discountPrice: String = ""
required init() {
......@@ -304,5 +304,3 @@ class YHAIImageInfo: SmartCodable {
......@@ -7,17 +7,50 @@
//
import UIKit
import SDWebImage
class YHAICardItemView: UIView {
var updateBlock:(()->())?
var evaluationResultCallback: ((Dictionary<String, Any>)->())?
var cardModel = YHAIListItemModel() {
didSet {
cardImgView.sd_setImage(with: URL(string: cardModel.cover), placeholderImage: UIImage(named: "global_default_image"))
cardTitleLabel.text = cardModel.title
describeLabel.text = cardModel.description
// 尝试从缓存中获取图片
if let cachedImage = SDImageCache.shared.imageFromCache(forKey: cardModel.cover) {
// 如果缓存中有图片,则直接使用
cardImgView.image = cachedImage
let ratio = self.getSizeRatio(img: cachedImage)
self.cardImgView.snp.remakeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(self.lineView.snp.bottom).offset(16)
make.height.equalTo(self.cardImgView.snp.width).multipliedBy(ratio)
make.bottom.equalTo(self.cardTitleLabel.snp.top).offset(-10)
}
} else {
cardImgView.sd_setImage(with: URL(string: cardModel.cover), placeholderImage: UIImage(named: "global_default_image"), options: [], completed: { (image, error, cacheType, url) in
self.updateBlock?()
})
}
self.setNeedsLayout()
self.layoutIfNeeded()
}
}
func getSizeRatio(img: UIImage?) -> CGFloat {
let size = img?.size ?? CGSize(width: 100, height: 50)
var ratio = 0.5
if size.width != 0.0, size.height != 0.0 {
ratio = size.height/size.width
}
return ratio
}
lazy var lineView: UIView = {
let v = UIView()
v.backgroundColor = .init(hex: 0xE9ECF0)
......@@ -79,11 +112,11 @@ class YHAICardItemView: UIView {
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(lineView.snp.bottom).offset(16)
make.height.equalTo(303)
make.height.equalTo(cardImgView.snp.width).multipliedBy(0.5)
make.bottom.equalTo(cardTitleLabel.snp.top).offset(-10)
}
cardTitleLabel.snp.makeConstraints { make in
make.top.equalTo(cardImgView.snp.bottom).offset(10)
make.left.equalTo(16)
make.right.equalTo(-16)
}
......@@ -98,8 +131,9 @@ class YHAICardItemView: UIView {
@objc func didItemViewClicked() {
YHAIJumpPageTool.jumpPageWithType(0, mode: cardModel.redirectMode, path: cardModel.redirectPath) {
YHAIJumpPageTool.jumpPageWithType(mode: cardModel.redirectMode, path: cardModel.redirectPath) {
dict in
self.evaluationResultCallback?(dict)
}
}
}
//
// YHAIEvaluationWebView.swift
// galaxy
//
// Created by Dufet on 2024/12/7.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHAIEvaluationWebView: UIView {
var finishBlock: (([String:Any])->())?
lazy var webVC: YHH5WebViewVC = {
let vc = YHH5WebViewVC()
vc.isFullScreenFlag = true
vc.isHideNavigationBar = true
vc.evaluationResultCallback = {
[weak self] dict in
guard let self = self else { return }
finishBlock?(dict)
self.dismiss()
}
return vc
}()
static func webView(url: String, finishBlock: (([String:Any])->())?) -> YHAIEvaluationWebView {
let view = YHAIEvaluationWebView(frame: UIScreen.main.bounds, url: url)
view.webVC.url = url
view.finishBlock = finishBlock
return view
}
func show() {
self.frame = CGRectMake(0, KScreenHeight, KScreenWidth, KScreenHeight)
UIApplication.shared.yhKeyWindow()?.addSubview(self)
UIView.animate(withDuration: 0.25, delay: 0, options: .curveEaseOut, animations: {
self.frame = CGRectMake(0, 0, KScreenWidth, KScreenHeight)
}) { finished in
self.frame = CGRectMake(0, 0, KScreenWidth, KScreenHeight)
}
}
func dismiss() {
UIView.animate(withDuration: 0.25, delay: 0, options: .curveEaseOut, animations: {
self.frame = CGRectMake(0, KScreenHeight, KScreenWidth, KScreenHeight)
}) { finished in
self.removeFromSuperview()
}
}
init(frame: CGRect, url: String) {
super.init(frame: frame)
self.webVC.url = url
createUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func createUI() {
self.addSubview(webVC.view)
webVC.view.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
}
}
......@@ -7,23 +7,32 @@
//
import UIKit
import SDWebImage
class YHAIPictureMessageCell: UITableViewCell {
static let cellReuseIdentifier = "YHAIPictureMessageCell"
var updateBlock: (()->())?
var imgInfo = YHAIImageInfo() {
didSet {
if imgInfo.imageType == YHAIImageType.url.rawValue {
imgView.sd_setImage(with: URL(string: imgInfo.imageUrl), placeholderImage: UIImage(named: "global_default_image"), options: [], completed: { (image, error, cacheType, url) in
let size = self.getShowSize(image: image!)
// 尝试从缓存中获取图片
if let cachedImage = SDImageCache.shared.imageFromCache(forKey: imgInfo.imageUrl) {
// 如果缓存中有图片,则直接使用
imgView.image = cachedImage
let size = self.getShowSize(image: cachedImage)
self.imgView.snp.updateConstraints { make in
make.width.equalTo(size.width)
make.height.equalTo(size.height)
}
})
} else {
imgView.sd_setImage(with: URL(string: imgInfo.imageUrl), placeholderImage: UIImage(named: "global_default_image"), options: [], completed: { (image, error, cacheType, url) in
self.updateBlock?()
})
}
} else if imgInfo.imageType == YHAIImageType.local.rawValue {
if let img = UIImage(named: imgInfo.localImageName) {
......@@ -42,16 +51,21 @@ class YHAIPictureMessageCell: UITableViewCell {
}
self.setNeedsLayout()
self.layoutIfNeeded()
}
}
func getShowSize(image: UIImage) -> CGSize {
func getShowSize(image: UIImage?) -> CGSize {
var imgW = 220.0
let imgW = 220.0
var imgH = 220.0
var ratio = 1.0
if image.size.width > 0, image.size.height > 0 {
ratio = image.size.width/image.size.height
guard let img = image else {
return CGSizeMake(imgW, imgH)
}
if img.size.width > 0, img.size.height > 0 {
ratio = img.size.width/img.size.height
}
imgH = imgW/ratio
......
......@@ -134,12 +134,18 @@ class YHAITextInputView: UIView {
NotificationCenter.default.removeObserver(self)
}
func showKeyBoard() {
self.textView.becomeFirstResponder()
func showKeyBoard(_ isShow: Bool) {
if isShow {
self.textView.becomeFirstResponder()
} else {
self.textView.resignFirstResponder()
self.textView.endEditing(true)
}
}
func createUI() {
self.backgroundColor = UIColor.init(hex: 0xF8FCFF)
self.addSubview(whiteView)
whiteView.addSubview(shadowView)
whiteView.addSubview(contentView)
......
......@@ -111,7 +111,7 @@ class YHAITextMessageCell: UITableViewCell {
let tap = UITapGestureRecognizer(target: self, action: #selector(didMessageClicked))
v.addGestureRecognizer(tap)
let longPress = UILongPressGestureRecognizer(target: self, action: #selector(didCopyTextButtonClicked))
let longPress = UILongPressGestureRecognizer(target: self, action: #selector(didCopyTextLongGesture(_:)))
v.addGestureRecognizer(longPress)
return v
}()
......@@ -186,11 +186,18 @@ class YHAITextMessageCell: UITableViewCell {
@objc func didCopyTextButtonClicked() {
let text = message.body.contentText
let pasteBoard = UIPasteboard.general
pasteBoard.string = text
UIPasteboard.general.string = text
YHHUD.flash(message: "复制成功")
}
@objc func didCopyTextLongGesture(_ sender: UIGestureRecognizer) {
let text = message.body.contentText
if sender.state == .began {
UIPasteboard.general.string = text
YHHUD.flash(message: "复制成功")
}
}
lazy var shadowView: YHAIChatShadowView = {
let v = YHAIChatShadowView()
return v
......
......@@ -8,34 +8,41 @@
import UIKit
enum YHAIJumpType: Int {
case common = 0
case evaluation = 1
}
enum YHAIJumpMode: Int {
case web = 1
case app = 2
case robot = 3
}
class YHAIJumpPageTool {
// mode = 0 // 1 web 2 原生页面 3 AI_Robot
// type = 0 // 0 普通 1 测评
static func jumpPageWithType(_ type:Int = 0, mode: Int, path: String, block:(([String:Any])->())?) {
static func jumpPageWithType(_ type:YHAIJumpType = .common, mode: Int, path: String, block:(([String:Any])->())?) {
printLog("type:\(type) mdde:\(mode) path:\(path)")
if mode == 1 { //
if mode == YHAIJumpMode.web.rawValue { //
if !path.isEmpty {
let vc = YHH5WebViewVC()
vc.url = path
if type == 1 {
vc.isPushed = false
vc.isFullScreenFlag = true
vc.isHideNavigationBar = true
vc.evaluationResultCallback = {
dict in
block?(dict)
}
UIViewController.current?.present(vc, animated: true)
if type == .evaluation {
YHAIEvaluationWebView.webView(url: path, finishBlock: block).show()
} else {
let vc = YHH5WebViewVC()
vc.url = path
vc.evaluationResultCallback = block
UIViewController.current?.navigationController?.pushViewController(vc, animated: true)
}
}
} else if mode == 2 {
} else if mode == YHAIJumpMode.app.rawValue {
// customerVoice -> APP客户心声 productList -> APP-首页银河甄选
if path == YHAIJumpPageType.customerHeart.rawValue {
//客户心声
......@@ -51,11 +58,11 @@ class YHAIJumpPageTool {
} else if path == YHAIJumpPageType.appServiceTab.rawValue {
// 服务页
UIViewController.current?.navigationController?.popToRootViewController(animated: true)
UIViewController.current?.navigationController?.popToRootViewController(animated: false)
goTabBarBy(tabType: .service)
}
} else if mode == 3 {
} else if mode == YHAIJumpMode.robot.rawValue {
}
}
......@@ -63,9 +70,11 @@ class YHAIJumpPageTool {
class YHCardMessageCell: UITableViewCell {
var updateBlock:(()->())?
static let cellReuseIdentifier = "YHCardMessageCell"
var evaluationResultCallback: ((Dictionary<String, Any>)->()) = { dic in }
var evaluationResultCallback: ((Dictionary<String, Any>)->())?
var cardListModel = YHAIListInfoModel() {
didSet {
......@@ -78,6 +87,16 @@ class YHCardMessageCell: UITableViewCell {
var lastItemView:YHAICardItemView? = nil
for (index, item) in cardListModel.list.enumerated() {
let productView = YHAICardItemView()
productView.updateBlock = {
[weak self] in
guard let self = self else { return }
self.updateBlock?()
}
productView.evaluationResultCallback = {
[weak self] dict in
guard let self = self else { return }
self.evaluationResultCallback?(dict)
}
productView.cardModel = item
listView.addSubview(productView)
productView.snp.makeConstraints { make in
......@@ -153,13 +172,13 @@ class YHCardMessageCell: UITableViewCell {
@objc func didBottomButtonClicked() {
var type = 0
var type = YHAIJumpType.common
if cardListModel.isEvaluation() {
type = 1
type = YHAIJumpType.evaluation
}
YHAIJumpPageTool.jumpPageWithType(type, mode: cardListModel.redirectMode, path: cardListModel.redirectPath) {
dict in
self.evaluationResultCallback(dict)
self.evaluationResultCallback?(dict)
}
}
......@@ -189,7 +208,6 @@ class YHCardMessageCell: UITableViewCell {
make.edges.equalTo(whiteContentView)
}
whiteContentView.snp.makeConstraints { make in
make.left.equalTo(20)
make.right.equalTo(-20)
......
......@@ -87,7 +87,7 @@ class YHProductItemView: UIView {
}
@objc func didClickProductItem() {
YHAIJumpPageTool.jumpPageWithType(0, mode: productModel.redirectMode, path: productModel.redirectPath) {
YHAIJumpPageTool.jumpPageWithType(mode: productModel.redirectMode, path: productModel.redirectPath) {
dict in
}
}
......
......@@ -111,7 +111,7 @@ class YHProductListMessageCell: UITableViewCell {
@objc func didMoreButtonClicked() {
YHAIJumpPageTool.jumpPageWithType(0, mode: listModel.redirectMode, path: listModel.redirectPath) {
YHAIJumpPageTool.jumpPageWithType(mode: listModel.redirectMode, path: listModel.redirectPath) {
dict in
}
}
......
......@@ -27,6 +27,7 @@ class YHButlerServiceManager: NSObject {
private var curentPresentedVC: UIViewController?
private lazy var reportHandler: YHButlerMessageReportHandler = YHButlerMessageReportHandler()
private var groupTmpId: Int64?
var lastMessage: YHButlerServiceMessage? {
getLastMessage()
......@@ -111,16 +112,18 @@ class YHButlerServiceManager: NSObject {
completion(false)
return
}
getUserInfoViewModel.getUserInfomation(userId) { [weak self] dataString, avatar, groupTmpId, error in
// 改变头像
self?.customUIConfig?.customerHeadImageUrl = avatar
self?.customUIConfig?.showServiceNickName = true
self?.updateUserInfo(userId: userId, userData: dataString ?? "", completion: { success in
DispatchQueue.main.async {
gotoSessionVC(groupTmpId)
}
})
}
gotoSessionVC(groupTmpId) //for test hjl
// getUserInfoViewModel.getUserInfomation(userId) { [weak self] dataString, avatar, groupTmpId, error in
// // 改变头像
// self?.customUIConfig?.customerHeadImageUrl = avatar
// self?.customUIConfig?.showServiceNickName = true
// self?.updateUserInfo(userId: userId, userData: dataString ?? "", completion: { success in
// DispatchQueue.main.async {
// gotoSessionVC(groupTmpId)
// }
// })
// }
}
}
......@@ -295,15 +298,18 @@ extension YHButlerServiceManager {
}
}
//for test hjl
private func setupInfomationForQiYu(completion: @escaping (Bool) -> Void) {
guard let userId = YHLoginManager.shared.userModel?.id, userId.count > 0 else {
completion(false)
return
}
getUserInfoViewModel.getUserInfomation(userId) { [weak self] dataString, avatar, _, _ in
getUserInfoViewModel.getUserInfomation(userId) { [weak self] dataString, avatar, groupTmpId, _ in
// 改变头像
self?.customUIConfig?.customerHeadImageUrl = avatar
self?.customUIConfig?.showServiceNickName = true
self?.groupTmpId = groupTmpId
self?.updateUserInfo(userId: userId, userData: dataString ?? "", completion: { success in
completion(success)
})
......
......@@ -188,7 +188,7 @@ class YHServerCenterHoldViewController: UIViewController {
}
self.segmentedView.selectItemAt(index: targetTabIndex)
self.segmentedView.listContainer?.didClickSelectedItem(at: targetTabIndex)
UIViewController.current?.navigationController?.popToRootViewController(animated: true)
UIViewController.current?.navigationController?.popToRootViewController(animated: false)
goTabBarBy(tabType: .service)
}
}
......
......@@ -185,7 +185,7 @@ class YHImproveSchemeViewController: YHBaseViewController {
self.navigationController?.popViewController(animated: true)
} else { // 进入服务tab页
self.navigationController?.popToRootViewController(animated: true)
self.navigationController?.popToRootViewController(animated: false)
goTabBarBy(tabType: .service)
}
}
......
......@@ -120,9 +120,6 @@ class YHH5WebViewVC: YHBaseViewController, WKUIDelegate, WKNavigationDelegate {
//6、是否展示 导航栏上的title
var showNavigationTitleFlag : Bool = true
// 是否push进来
var isPushed : Bool = true
//22、禁用全局手势
private var disableFullScreenGestureFlag : Bool = false
......@@ -521,14 +518,9 @@ extension YHH5WebViewVC {
if type == 2 {
printLog("web evaluation:\n")
printLog("\(dic)")
self.evaluationResultCallback?(dic)
}
if isPushed {
self.navigationController?.popViewController(animated: true)
} else {
self.dismiss(animated: true)
}
self.evaluationResultCallback?(dic)
self.navigationController?.popViewController(animated: false)
}
//22、禁用全局手势返回
......@@ -543,8 +535,6 @@ extension YHH5WebViewVC {
}
}
//20、导航栏上是否展示title
func hideNavigationTitleSyn(_ tag : String) {
if tag.contains("0") {
......
......@@ -64,6 +64,17 @@ class YHLivePlayerViewController: YHBasePlayerViewController {
}
return vc
}()
private lazy var videoStatsLabel: UILabel = {
let label = UILabel()
label.textColor = .white
label.font = .PFSC_R(ofSize: 13)
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
label.backgroundColor = .lightGray
label.alpha = 0.7
return label
}()
// MARK: - Initialization
......@@ -134,6 +145,14 @@ class YHLivePlayerViewController: YHBasePlayerViewController {
bottomInputBar.giftButtonClickEvent = { [weak self] in
self?.showGoods()
}
#if DEBUG || TESTENV
playerView.addSubview(videoStatsLabel)
videoStatsLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16)
make.top.equalToSuperview().offset(100)
make.width.equalTo(300)
}
#endif
}
private func setupStateViewController() {
......@@ -178,7 +197,7 @@ class YHLivePlayerViewController: YHBasePlayerViewController {
// 更新顶部栏信息
topBarView.setupTopBarView(
headUrl: liveDetail.avatar,
nickname: liveDetail.hxNickname,
nickname: liveDetail.account,
count: liveDetail.access_num
)
playbackInfo?.channelId = liveDetail.rtmp_channel
......@@ -576,4 +595,12 @@ extension YHLivePlayerViewController: YHPlayerDelegate {
func player(_ player: YHPlayer, didReceiveVideoSize size: CGSize) {
// 处理视频尺寸变化,如果需要的话
}
func player(_ player: YHPlayer, remoteVideoStats stats: AgoraRtcRemoteVideoStats) {
#if DEBUG || TESTENV
DispatchQueue.main.async {
self.videoStatsLabel.text = "width:\(stats.width),height:\(stats.height)\nreceivedBitrate:\(stats.receivedBitrate)\nreceivedFrameRate:\(stats.receivedFrameRate)\ndecoderOutputFrameRate:\(stats.decoderOutputFrameRate)\nrendererOutputFrameRate:\(stats.rendererOutputFrameRate)\nframeLossRate:\(stats.frameLossRate)"
}
#endif
}
}
......@@ -14,11 +14,7 @@ import UIKit
class YHMainChannelDelegate: NSObject, AgoraRtcEngineDelegate {
var channelId: String?
weak var player: YHPlayer?
func rtcEngine(_ engine: AgoraRtcEngineKit, didJoinChannel channel: String, withUid uid: UInt, elapsed: Int) {
printLog("$$$$###main channel: local user join room \(channelId ?? ""): \(uid) \(elapsed)ms")
}
func rtcEngine(_ engine: AgoraRtcEngineKit, didJoinedOfUid uid: UInt, elapsed: Int) {
guard let channelId = channelId,
let player = player,
......@@ -34,8 +30,7 @@ class YHMainChannelDelegate: NSObject, AgoraRtcEngineDelegate {
}
func rtcEngine(_ engine: AgoraRtcEngineKit, didOfflineOfUid uid: UInt, reason: AgoraUserOfflineReason) {
printLog("$$$$###main channel: remote user left: \(uid) reason \(reason)")
//printLog("$$$$###main channel: remote user left: \(uid) reason \(reason)")
let videoCanvas = AgoraRtcVideoCanvas()
videoCanvas.uid = uid
videoCanvas.view = nil
......@@ -44,12 +39,23 @@ class YHMainChannelDelegate: NSObject, AgoraRtcEngineDelegate {
}
func rtcEngine(_ engine: AgoraRtcEngineKit, videoSizeChangedOf sourceType: AgoraVideoSourceType, uid: UInt, size: CGSize, rotation: Int) {
printLog("$$$$###videoSizeChangedOf: \(size)")
//printLog("$$$$###videoSizeChangedOf: \(size)")
if let player = player {
player.delegate?.player(player, didReceiveVideoSize: size)
}
}
func rtcEngine(_ engine: AgoraRtcEngineKit, remoteVideoStats stats: AgoraRtcRemoteVideoStats) {
//printLog("$$$$###remoteVideoStats FrameRate: \(stats) receivedBitrate: \(stats.receivedBitrate), receivedFrameRate: \(stats.receivedFrameRate)")
if let player = player {
player.delegate?.player(player, remoteVideoStats: stats)
}
}
/*
func rtcEngine(_ engine: AgoraRtcEngineKit, didJoinChannel channel: String, withUid uid: UInt, elapsed: Int) {
//printLog("$$$$###main channel: local user join room \(channelId ?? ""): \(uid) \(elapsed)ms")
}
func rtcEngine(_ engine: AgoraRtcEngineKit, firstRemoteVideoFrameOfUid uid: UInt, size: CGSize, elapsed: Int) {
printLog("$$$$###firstRemoteVideoFrameOfUid: \(size)")
}
......@@ -73,59 +79,17 @@ class YHMainChannelDelegate: NSObject, AgoraRtcEngineDelegate {
func rtcEngineConnectionDidLost(_ engine: AgoraRtcEngineKit) {
printLog("$$$$###rtcEngineConnectionDidLost")
}
func rtcEngineConnectionDidBanned(_ engine: AgoraRtcEngineKit) {
printLog("$$$$###rtcEngineConnectionDidBanned")
}
func rtcEngine(_ engine: AgoraRtcEngineKit, networkTypeChanged type: AgoraNetworkType) {
printLog("$$$$###networkTypeChanged type:\(type)")
}
func rtcEngine(_ engine: AgoraRtcEngineKit, permissionError type: AgoraPermissionType) {
printLog("$$$$###permissionError type:\(type)")
}
func rtcEngine(_ engine: AgoraRtcEngineKit, connectionChangedTo state: AgoraConnectionState, reason: AgoraConnectionChangedReason) {
printLog("$$$$###connectionChangedTo state:\(state) reason: \(reason)")
}
func rtcEngine(_ engine: AgoraRtcEngineKit, reportRtcStats stats: AgoraChannelStats) {
printLog("$$$$###reportRtcStats:\(stats)")
}
func rtcEngine(_ engine: AgoraRtcEngineKit, lastmileQuality quality: AgoraNetworkQuality) {
printLog("$$$$###lastmileQuality:\(quality)")
}
func rtcEngine(_ engine: AgoraRtcEngineKit, lastmileProbeTest result: AgoraLastmileProbeResult) {
printLog("$$$$###lastmileProbeTest:\(result)")
}
func rtcEngine(_ engine: AgoraRtcEngineKit, didOccur errorType: AgoraEncryptionErrorType) {
printLog("$$$$###didOccur errorType:\(errorType)")
}
func rtcEngine(_ engine: AgoraRtcEngineKit, rtmpStreamingChangedToState url: String, state: AgoraRtmpStreamingState, reason: AgoraRtmpStreamingReason) {
printLog("$$$$###rtmpStreamingChangedToState:\(state) url: \(url)")
}
*/
}
class YHSecondaryChannelDelegate: NSObject, AgoraRtcEngineDelegate {
var channelId: String?
weak var player: YHPlayer?
func rtcEngine(_ engine: AgoraRtcEngineKit, didJoinChannel channel: String, withUid uid: UInt, elapsed: Int) {
printLog("$$$$###secondary channel: local user join room \(channelId ?? ""): \(uid) \(elapsed)ms")
}
func rtcEngine(_ engine: AgoraRtcEngineKit, didJoinedOfUid uid: UInt, elapsed: Int) {
guard let channelId = channelId,
let player = player,
let view = player.currentPlayView else { return }
printLog("$$$$###secondary channel: remote user join room \(channelId): \(uid) \(elapsed)ms")
//printLog("$$$$###secondary channel: remote user join room \(channelId): \(uid) \(elapsed)ms")
let videoCanvas = AgoraRtcVideoCanvas()
videoCanvas.uid = uid
videoCanvas.view = view
......@@ -140,9 +104,7 @@ class YHSecondaryChannelDelegate: NSObject, AgoraRtcEngineDelegate {
func rtcEngine(_ engine: AgoraRtcEngineKit, didOfflineOfUid uid: UInt, reason: AgoraUserOfflineReason) {
guard let channelId = channelId,
let player = player else { return }
printLog("$$$$###secondary channel: remote user left: \(uid) reason \(reason)")
//printLog("$$$$###secondary channel: remote user left: \(uid) reason \(reason)")
let videoCanvas = AgoraRtcVideoCanvas()
videoCanvas.uid = uid
videoCanvas.view = nil
......@@ -155,11 +117,21 @@ class YHSecondaryChannelDelegate: NSObject, AgoraRtcEngineDelegate {
}
func rtcEngine(_ engine: AgoraRtcEngineKit, videoSizeChangedOf sourceType: AgoraVideoSourceType, uid: UInt, size: CGSize, rotation: Int) {
printLog("$$$$###videoSizeChangedOf: \(size)")
//printLog("$$$$###videoSizeChangedOf: \(size)")
if let player = player {
player.delegate?.player(player, didReceiveVideoSize: size)
}
}
func rtcEngine(_ engine: AgoraRtcEngineKit, remoteVideoStats stats: AgoraRtcRemoteVideoStats) {
//printLog("$$$$###remoteVideoStats FrameRate: \(stats) receivedBitrate: \(stats.receivedBitrate), receivedFrameRate: \(stats.receivedFrameRate)")
if let player = player {
player.delegate?.player(player, remoteVideoStats: stats)
}
}
/*
func rtcEngine(_ engine: AgoraRtcEngineKit, didJoinChannel channel: String, withUid uid: UInt, elapsed: Int) {
printLog("$$$$###secondary channel: local user join room \(channelId ?? ""): \(uid) \(elapsed)ms")
}
func rtcEngine(_ engine: AgoraRtcEngineKit, firstRemoteVideoFrameOfUid uid: UInt, size: CGSize, elapsed: Int) {
printLog("$$$$###firstRemoteVideoFrameOfUid: \(size)")
......@@ -184,40 +156,5 @@ class YHSecondaryChannelDelegate: NSObject, AgoraRtcEngineDelegate {
func rtcEngineConnectionDidLost(_ engine: AgoraRtcEngineKit) {
printLog("$$$$###rtcEngineConnectionDidLost")
}
func rtcEngineConnectionDidBanned(_ engine: AgoraRtcEngineKit) {
printLog("$$$$###rtcEngineConnectionDidBanned")
}
func rtcEngine(_ engine: AgoraRtcEngineKit, networkTypeChanged type: AgoraNetworkType) {
printLog("$$$$###networkTypeChanged type:\(type)")
}
func rtcEngine(_ engine: AgoraRtcEngineKit, permissionError type: AgoraPermissionType) {
printLog("$$$$###permissionError type:\(type)")
}
func rtcEngine(_ engine: AgoraRtcEngineKit, connectionChangedTo state: AgoraConnectionState, reason: AgoraConnectionChangedReason) {
printLog("$$$$###connectionChangedTo state:\(state) reason: \(reason)")
}
func rtcEngine(_ engine: AgoraRtcEngineKit, reportRtcStats stats: AgoraChannelStats) {
printLog("$$$$###reportRtcStats:\(stats)")
}
func rtcEngine(_ engine: AgoraRtcEngineKit, lastmileQuality quality: AgoraNetworkQuality) {
printLog("$$$$###lastmileQuality:\(quality)")
}
func rtcEngine(_ engine: AgoraRtcEngineKit, lastmileProbeTest result: AgoraLastmileProbeResult) {
printLog("$$$$###lastmileProbeTest:\(result)")
}
func rtcEngine(_ engine: AgoraRtcEngineKit, didOccur errorType: AgoraEncryptionErrorType) {
printLog("$$$$###didOccur errorType:\(errorType)")
}
func rtcEngine(_ engine: AgoraRtcEngineKit, rtmpStreamingChangedToState url: String, state: AgoraRtmpStreamingState, reason: AgoraRtmpStreamingReason) {
printLog("$$$$###rtmpStreamingChangedToState:\(state) url: \(url)")
}
*/
}
......@@ -26,6 +26,11 @@ protocol YHPlayerDelegate: AnyObject {
func player(_ player: YHPlayer, didChangedToPosition position: Int)
func player(_ player: YHPlayer, didReceiveVideoSize size: CGSize)
func player(_ player: YHPlayer, didChangedTo positionMs: Int, atTimestamp timestampMs: TimeInterval)
func player(_ player: YHPlayer, remoteVideoStats stats: AgoraRtcRemoteVideoStats)
}
extension YHPlayerDelegate {
func player(_ player: YHPlayer, remoteVideoStats stats: AgoraRtcRemoteVideoStats) {}
}
// MARK: - 播放器实例封装
......
......@@ -201,6 +201,14 @@ class YHPlayerManager: NSObject {
}
}
private func checkLogin() -> Bool {
if YHLoginManager.shared.isLogin() == false {
YHOneKeyLoginManager.shared.oneKeyLogin()
return false
}
return true
}
// 加入频道的逻辑移到 PlayerManager
func joinChannel(for player: YHPlayer,
token: String,
......@@ -579,7 +587,7 @@ extension YHPlayerManager: YHFloatingWindowDelegate {
func floatingWindowDidTap(_ window: YHFloatingWindow) {
guard let playbackInfo = window.playbackInfo else { return }
guard checkLogin() else { return }
if playbackInfo.isLive {
enterLive(from: window.contentView, playbackInfo: playbackInfo)
} else {
......
......@@ -260,10 +260,13 @@ extension YHIMHelper {
DispatchQueue.main.async {
if let err = error {
printLog(err.errorDescription)
} else {
completion(nil, err)
} else if let message = message {
printLog("消息发送-成功")
completion(message, nil)
} else {
completion(nil, EMError.init(description: "发送失败", code: .noError))
}
completion(message, error)
}
})
}
......
......@@ -103,12 +103,6 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
if !checkLogin() { return }
let vc = YHMySettingViewController()
self.navigationController?.pushViewController(vc)
// let url = "https://pull-flv-f1-admin.douyincdn.com/thirdgame/stream-7443723341506054922_md.flv?keeptime=00093a80&wsSecret=cf2c048a5bceb7669e37b229e807c0e2&wsTime=674d82e7&major_anchor_level=common&abr_pts=-800&select_mode=score&_session_id=037-2024120217503167B9DF9F03DF6401DE50.1733133032147.26047&rsi=1"
// let playbackInfo = YHPlayerManager.PlaybackInfo(id: 40, url: url, isLive: true, scene: .fullscreen)
// YHPlayerManager.shared.enterLive(from: nil, playbackInfo: playbackInfo)
// let playbackInfo = YHPlayerManager.PlaybackInfo(id: 1, isLive: false, scene: .fullscreen)
// YHPlayerManager.shared.enterVOD(from: nil, playbackInfo: playbackInfo)
}
view.evaluateBlock = {
......
......@@ -24,7 +24,7 @@ enum YHUatModules: Int {
8、更新-强制更新弹窗、true
9、更新-建议更新弹窗、false
10、七鱼智能客服、false
10、七鱼智能客服、false 2024.12.07 默认修改成展示 true
*/
case Mine_Unknow = 0
......@@ -66,7 +66,7 @@ enum YHUatModules: Int {
case .Update_Suggest:
return 2
case .QiYu_Service:
return 2
return 1
default:
return 2
}
......
......@@ -61,8 +61,8 @@ extension YHUatHelperViewModel {
printLog("非登录状态")
return
}
let params: [String] = ["1", "2","3", "4","5","6","9","10"]
// let params: [String] = ["1", "2","3", "4","5","6","9","10"]
let params: [String] = ["1", "2","3", "4","5","6","9"]
var strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Uat.uatListApi
for (index,item) in params.enumerated() {
if index == 0 {
......
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