Commit 9dcb6239 authored by Steven杜宇's avatar Steven杜宇

// AI

parent 5c50ce98
...@@ -261,19 +261,6 @@ extension YHAIMainChatViewController: UITableViewDelegate, UITableViewDataSource ...@@ -261,19 +261,6 @@ extension YHAIMainChatViewController: UITableViewDelegate, UITableViewDataSource
if msgType == .text { if msgType == .text {
let cell = tableView.dequeueReusableCell(withIdentifier: YHAITextMessageCell.cellReuseIdentifier, for: indexPath) as! YHAITextMessageCell let cell = tableView.dequeueReusableCell(withIdentifier: YHAITextMessageCell.cellReuseIdentifier, for: indexPath) as! YHAITextMessageCell
cell.message = msg cell.message = msg
cell.messageClick = {
[weak self] text in
guard let self = self else { return }
self.bottomInputView.showKeyBoard(false)
if self.isNeedStopResonse() {
self.stopAutoResponse { success in
self.sendMessage(text)
}
} else {
self.sendMessage(text)
}
}
return cell return cell
} else if msgType == .recommendText { } else if msgType == .recommendText {
......
...@@ -404,11 +404,6 @@ extension YHAIRobotChatViewController: UITableViewDelegate, UITableViewDataSourc ...@@ -404,11 +404,6 @@ extension YHAIRobotChatViewController: UITableViewDelegate, UITableViewDataSourc
if msgType == .text { if msgType == .text {
let cell = tableView.dequeueReusableCell(withIdentifier: YHAITextMessageCell.cellReuseIdentifier, for: indexPath) as! YHAITextMessageCell let cell = tableView.dequeueReusableCell(withIdentifier: YHAITextMessageCell.cellReuseIdentifier, for: indexPath) as! YHAITextMessageCell
cell.message = msg cell.message = msg
cell.messageClick = {
[weak self] text in
guard let self = self else { return }
}
return cell return cell
} else if msgType == .recommendText { } else if msgType == .recommendText {
......
...@@ -133,6 +133,8 @@ class YHAICardItemView: UIView { ...@@ -133,6 +133,8 @@ class YHAICardItemView: UIView {
@objc func didItemViewClicked() { @objc func didItemViewClicked() {
UIApplication.shared.yhKeyWindow()?.endEditing(true)
YHAIJumpPageTool.jumpPageWithType(mode: cardModel.redirectMode, path: cardModel.redirectPath) { YHAIJumpPageTool.jumpPageWithType(mode: cardModel.redirectMode, path: cardModel.redirectPath) {
dict in dict in
self.evaluationResultCallback?(dict) self.evaluationResultCallback?(dict)
......
...@@ -100,13 +100,6 @@ class YHAIPictureMessageCell: UITableViewCell { ...@@ -100,13 +100,6 @@ class YHAIPictureMessageCell: UITableViewCell {
return v return v
}() }()
lazy var rightAngleView: UIView = {
let v = UIView()
v.backgroundColor = .white
v.isHidden = true
return v
}()
required init?(coder: NSCoder) { required init?(coder: NSCoder) {
super.init(coder: coder) super.init(coder: coder)
} }
...@@ -122,7 +115,6 @@ class YHAIPictureMessageCell: UITableViewCell { ...@@ -122,7 +115,6 @@ class YHAIPictureMessageCell: UITableViewCell {
contentView.backgroundColor = .clear contentView.backgroundColor = .clear
backgroundColor = .clear backgroundColor = .clear
contentView.addSubview(shadowView) contentView.addSubview(shadowView)
contentView.addSubview(rightAngleView)
contentView.addSubview(whiteContentView) contentView.addSubview(whiteContentView)
whiteContentView.addSubview(imgView) whiteContentView.addSubview(imgView)
...@@ -141,15 +133,11 @@ class YHAIPictureMessageCell: UITableViewCell { ...@@ -141,15 +133,11 @@ class YHAIPictureMessageCell: UITableViewCell {
shadowView.snp.makeConstraints { make in shadowView.snp.makeConstraints { make in
make.edges.equalTo(whiteContentView) make.edges.equalTo(whiteContentView)
} }
rightAngleView.snp.makeConstraints { make in
make.top.left.equalTo(whiteContentView)
make.width.height.equalTo(15)
}
} }
@objc func didMessageClicked() { @objc func didMessageClicked() {
self.endEditing(true)
UIApplication.shared.yhKeyWindow()?.endEditing(true)
YHPictureReviewManager.shared.showNetWorkPicturs(curIndex: 0, arrPicturs: [imgInfo.imageUrl]) YHPictureReviewManager.shared.showNetWorkPicturs(curIndex: 0, arrPicturs: [imgInfo.imageUrl])
} }
......
...@@ -260,9 +260,6 @@ class YHAITextMessageCell: UITableViewCell { ...@@ -260,9 +260,6 @@ class YHAITextMessageCell: UITableViewCell {
@objc func didMessageClicked() { @objc func didMessageClicked() {
UIApplication.shared.yhKeyWindow()?.endEditing(true) UIApplication.shared.yhKeyWindow()?.endEditing(true)
if message.getType() == .recommendText { messageClick?(text)
let text = message.getText()
messageClick?(text)
}
} }
} }
...@@ -194,6 +194,8 @@ class YHCardMessageCell: UITableViewCell { ...@@ -194,6 +194,8 @@ class YHCardMessageCell: UITableViewCell {
@objc func didBottomButtonClicked() { @objc func didBottomButtonClicked() {
UIApplication.shared.yhKeyWindow()?.endEditing(true)
var type = YHAIJumpType.common var type = YHAIJumpType.common
if cardListModel.isEvaluation() { if cardListModel.isEvaluation() {
type = YHAIJumpType.evaluation type = YHAIJumpType.evaluation
......
...@@ -91,6 +91,9 @@ class YHProductItemView: UIView { ...@@ -91,6 +91,9 @@ class YHProductItemView: UIView {
} }
@objc func didClickProductItem() { @objc func didClickProductItem() {
UIApplication.shared.yhKeyWindow()?.endEditing(true)
YHAIJumpPageTool.jumpPageWithType(mode: productModel.redirectMode, path: productModel.redirectPath) { YHAIJumpPageTool.jumpPageWithType(mode: productModel.redirectMode, path: productModel.redirectPath) {
dict in dict in
} }
......
...@@ -112,6 +112,7 @@ class YHProductListMessageCell: UITableViewCell { ...@@ -112,6 +112,7 @@ class YHProductListMessageCell: UITableViewCell {
@objc func didMoreButtonClicked() { @objc func didMoreButtonClicked() {
UIApplication.shared.yhKeyWindow()?.endEditing(true)
YHAIJumpPageTool.jumpPageWithType(mode: listModel.redirectMode, path: listModel.redirectPath) { YHAIJumpPageTool.jumpPageWithType(mode: listModel.redirectMode, path: listModel.redirectPath) {
dict in dict in
} }
......
...@@ -100,9 +100,7 @@ class YHRecommendTextMessageCell: UITableViewCell { ...@@ -100,9 +100,7 @@ class YHRecommendTextMessageCell: UITableViewCell {
@objc func didMessageClicked() { @objc func didMessageClicked() {
UIApplication.shared.yhKeyWindow()?.endEditing(true) UIApplication.shared.yhKeyWindow()?.endEditing(true)
if message.getType() == .recommendText { let text = message.getText()
let text = message.getText() messageClick?(text)
messageClick?(text)
}
} }
} }
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