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

// AI

parent 13c12ba2
......@@ -668,6 +668,7 @@
04B9EE5B2C06CC3100A4018D /* YHOtherLoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B9EE592C06CC3100A4018D /* YHOtherLoginViewController.swift */; };
04BD83452CCA2009003A88DF /* AlimamaShuHeiTi-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 04BD83442CCA2009003A88DF /* AlimamaShuHeiTi-Bold.ttf */; };
04BE39282CF848F300BD31DB /* YHAIMessageModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04BE39272CF848F300BD31DB /* YHAIMessageModel.swift */; };
04BE392A2CF85F8900BD31DB /* YHAITabIndicatorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04BE39292CF85F8900BD31DB /* YHAITabIndicatorView.swift */; };
04C693622B723AB8004C1758 /* YHMySettingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C693612B723AB8004C1758 /* YHMySettingViewController.swift */; };
04C693642B723B56004C1758 /* YHMySettingCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C693632B723B56004C1758 /* YHMySettingCell.swift */; };
04C85DDF2C364FE9008B20D6 /* YHAboutUsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C85DDE2C364FE9008B20D6 /* YHAboutUsCell.swift */; };
......@@ -1718,6 +1719,7 @@
04B9EE592C06CC3100A4018D /* YHOtherLoginViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHOtherLoginViewController.swift; sourceTree = "<group>"; };
04BD83442CCA2009003A88DF /* AlimamaShuHeiTi-Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "AlimamaShuHeiTi-Bold.ttf"; sourceTree = "<group>"; };
04BE39272CF848F300BD31DB /* YHAIMessageModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAIMessageModel.swift; sourceTree = "<group>"; };
04BE39292CF85F8900BD31DB /* YHAITabIndicatorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAITabIndicatorView.swift; sourceTree = "<group>"; };
04C693612B723AB8004C1758 /* YHMySettingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMySettingViewController.swift; sourceTree = "<group>"; };
04C693632B723B56004C1758 /* YHMySettingCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMySettingCell.swift; sourceTree = "<group>"; };
04C85DDE2C364FE9008B20D6 /* YHAboutUsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAboutUsCell.swift; sourceTree = "<group>"; };
......@@ -3967,6 +3969,7 @@
045F28452CF6C47800520F19 /* YHAIProductCell.swift */,
04943BF52CF49E3E00BF2255 /* YHAITextInputView.swift */,
045F28472CF6EF9800520F19 /* YHAIGreetCollectionReusableView.swift */,
04BE39292CF85F8900BD31DB /* YHAITabIndicatorView.swift */,
);
path = V;
sourceTree = "<group>";
......@@ -6546,6 +6549,7 @@
04174D742BCD5B74000BA46D /* IMAppKey.swift in Sources */,
A567E5B62BD7643D00D5D5A0 /* YHHomeBannerIndicatorView.swift in Sources */,
04CA2BFB2CB7BAC600F36DE7 /* YHResignUploadDocListViewController.swift in Sources */,
04BE392A2CF85F8900BD31DB /* YHAITabIndicatorView.swift in Sources */,
045EEEAD2B9F171A0022A143 /* YHWorkExperienceListTableViewCell.swift in Sources */,
049A48A82B49417300D0C641 /* YHAboutUsViewController.swift in Sources */,
047619E92BA9867100F45358 /* YHCountryHotView.swift in Sources */,
......
......@@ -68,11 +68,15 @@ class YHAIServiceListViewController: YHBaseViewController {
make.width.height.equalTo(24)
make.centerY.equalToSuperview()
}
btn.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
return v
}()
@objc func didInputButtonClicked() {
NotificationCenter.default.post(name: YhConstant.YhNotification.didSwitchToAIChatNotification, object: nil)
}
override func viewDidLoad() {
......
......@@ -13,7 +13,7 @@ class YHAITabViewController: YHBaseViewController {
var defaltIndex: Int = 0
let arrItemTitles = ["银河AI", "AI"]
let arrItemTitles = ["港小宝", "对话"]
var arrItemVCs : [YHBaseViewController] = []
lazy var headerImgView: UIImageView = {
......@@ -32,10 +32,10 @@ class YHAITabViewController: YHBaseViewController {
dataSource.isTitleColorGradientEnabled = true
dataSource.titles = arrItemTitles
dataSource.titleNormalFont = UIFont.PFSC_M(ofSize: 15)
dataSource.titleNormalColor = UIColor.init(hex:0x6D788A)
dataSource.titleNormalFont = UIFont.PFSC_M(ofSize: 16)
dataSource.titleNormalColor = UIColor.init(hex:0x778FB4)
dataSource.titleSelectedFont = UIFont.PFSC_B(ofSize: 21)
dataSource.titleSelectedFont = UIFont(name: "AlimamaShuHeiTi-Bold", size: 18)
dataSource.titleSelectedColor = .mainTextColor
dataSource.isItemSpacingAverageEnabled = false
......@@ -50,6 +50,18 @@ class YHAITabViewController: YHBaseViewController {
view.backgroundColor = .clear
return view
}()
lazy var backBtn: UIButton = {
let btn = UIButton()
btn.setImage(UIImage(named: "back_icon"), for: .normal)
btn.YH_clickEdgeInsets = UIEdgeInsets(top: 16, left: 16, bottom: 16, right: 16)
btn.addTarget(self, action: #selector(didBackBtnClicked), for: .touchUpInside)
return btn
}()
@objc func didBackBtnClicked() {
self.navigationController?.popViewController(animated: true)
}
override func viewDidLoad() {
super.viewDidLoad()
......@@ -59,8 +71,14 @@ class YHAITabViewController: YHBaseViewController {
createUI()
}
deinit {
NotificationCenter.default.removeObserver(self)
}
func createUI() {
NotificationCenter.default.addObserver(self, selector: #selector(didJumoToAIChat), name: YhConstant.YhNotification.didSwitchToAIChatNotification, object: nil)
view.addSubview(headerImgView)
for i in 0..<arrItemTitles.count {
......@@ -95,24 +113,40 @@ class YHAITabViewController: YHBaseViewController {
segmentedView.indicators = [indicator]
segmentedView.defaultSelectedIndex = defaltIndex
view.addSubview(backBtn)
backBtn.snp.makeConstraints { make in
make.left.equalTo(16)
make.width.height.equalTo(21)
make.centerY.equalTo(segmentedView)
}
headerImgView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.height.equalTo(269)
}
let segmentHeight = 29.0
let segmentHeight = 48.0
segmentedView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.left.equalTo(61-25)
make.right.equalToSuperview()
make.top.equalTo(k_Height_safeAreaInsetsTop())
make.height.equalTo(segmentHeight)
}
listContainerView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(k_Height_safeAreaInsetsTop() + segmentHeight + 9.0)
make.top.equalTo(k_Height_safeAreaInsetsTop() + segmentHeight)
make.bottom.equalTo(0)
}
}
func jumpToItemIndex(itemIndex : Int) {
self.segmentedView.selectItemAt(index: itemIndex)
}
@objc func didJumoToAIChat() {
jumpToItemIndex(itemIndex: 1)
}
}
extension YHAITabViewController: JXSegmentedViewDelegate {
......
//
// YHAITabIndicatorView.swift
// galaxy
//
// Created by Dufet on 2024/11/28.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import JXSegmentedView
class YHAITabIndicatorView: JXSegmentedIndicatorBaseView {
}
......@@ -315,5 +315,8 @@ extension YhConstant {
// 已经展示银河管家
public static let didLoadYhManagerNotification = Notification.Name(rawValue: "com.yinhe.didLoadYhManager")
// 切换到AI对话tab
public static let didSwitchToAIChatNotification = Notification.Name(rawValue: "com.yinhe.switchToAIChat")
}
}
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