Commit 13c12ba2 authored by Steven杜宇's avatar Steven杜宇

// AI

parent de7305cd
...@@ -31,6 +31,49 @@ class YHAIServiceListViewController: YHBaseViewController { ...@@ -31,6 +31,49 @@ class YHAIServiceListViewController: YHBaseViewController {
collectView.contentInset = .zero collectView.contentInset = .zero
return collectView return collectView
}() }()
lazy var bottomInputView: UIView = {
let v = UIView()
let whiteView = UIView()
whiteView.backgroundColor = .white
whiteView.layer.cornerRadius = 12.0
v.addSubview(whiteView)
let label = UILabel()
label.font = .PFSC_R(ofSize: 14)
label.text = "有什么问题尽管问我"
label.textColor = .init(hex: 0xB3C8E9)
whiteView.addSubview(label)
let sendImgV = UIImageView(image: UIImage(named: "ai_chat_send_gray"))
whiteView.addSubview(sendImgV)
let btn = UIButton()
btn.addTarget(self, action: #selector(didInputButtonClicked), for: .touchUpInside)
whiteView.addSubview(btn)
whiteView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
label.snp.makeConstraints { make in
make.left.equalTo(16)
make.height.equalTo(20)
make.centerY.equalToSuperview()
}
sendImgV.snp.makeConstraints { make in
make.right.equalTo(-16)
make.width.height.equalTo(24)
make.centerY.equalToSuperview()
}
return v
}()
@objc func didInputButtonClicked() {
}
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
...@@ -38,10 +81,20 @@ class YHAIServiceListViewController: YHBaseViewController { ...@@ -38,10 +81,20 @@ class YHAIServiceListViewController: YHBaseViewController {
gk_navigationBar.isHidden = true gk_navigationBar.isHidden = true
view.backgroundColor = .clear view.backgroundColor = .clear
view.addSubview(collectionView) view.addSubview(collectionView)
view.addSubview(bottomInputView)
collectionView.snp.makeConstraints { make in collectionView.snp.makeConstraints { make in
make.left.equalTo(16) make.left.equalTo(16)
make.right.equalTo(-16) make.right.equalTo(-16)
make.top.bottom.equalToSuperview() make.top.equalToSuperview()
make.bottom.equalTo(bottomInputView.snp.top).offset(-8)
}
bottomInputView.snp.makeConstraints { make in
make.left.equalTo(20)
make.right.equalTo(-20)
make.height.equalTo(46)
make.bottom.equalTo(-10-k_Height_safeAreaInsetsBottom())
} }
requestList() requestList()
} }
...@@ -69,7 +122,7 @@ extension YHAIServiceListViewController: UICollectionViewDelegate, UICollectionV ...@@ -69,7 +122,7 @@ extension YHAIServiceListViewController: UICollectionViewDelegate, UICollectionV
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
let width = floor((KScreenWidth-16.0*2.0-10.0)/2.0) let width = floor((KScreenWidth-16.0*2.0-10.0)/2.0)
let height = width * (194.0/157.0) let height = width * (200.0/166.0)
return CGSize(width: width, height: height) return CGSize(width: width, height: height)
} }
...@@ -103,7 +156,7 @@ extension YHAIServiceListViewController: UICollectionViewDelegate, UICollectionV ...@@ -103,7 +156,7 @@ extension YHAIServiceListViewController: UICollectionViewDelegate, UICollectionV
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForHeaderInSection:Int) -> CGSize { func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForHeaderInSection:Int) -> CGSize {
return CGSize(width: KScreenWidth, height: 250) return CGSize(width: KScreenWidth, height: 177)
} }
} }
......
...@@ -12,18 +12,19 @@ class YHAIGreetCollectionReusableView: UICollectionReusableView { ...@@ -12,18 +12,19 @@ class YHAIGreetCollectionReusableView: UICollectionReusableView {
static let reuseIdentifier: String = "YHAIGreetCollectionReusableView" static let reuseIdentifier: String = "YHAIGreetCollectionReusableView"
let horizonalGap = 16.0
lazy var iconImgView: UIImageView = { lazy var iconImgView: UIImageView = {
let v = UIImageView(image: UIImage(named: "")) let v = UIImageView(image: UIImage(named: "ai_gangXiaoBao_logo"))
v.backgroundColor = .red
return v return v
}() }()
lazy var titleLabel:UILabel = { lazy var titleLabel:UILabel = {
let lable = UILabel() let lable = UILabel()
lable.textColor = UIColor.brandMainColor lable.textColor = UIColor.mainTextColor
lable.textAlignment = .left lable.textAlignment = .left
lable.font = UIFont.PFSC_B(ofSize:23) lable.font = UIFont(name: "AlimamaShuHeiTi-Bold", size: 30)
lable.text = "早上好,我是港小宝" lable.text = "Hi, 早上好!"
return lable return lable
}() }()
...@@ -33,7 +34,7 @@ class YHAIGreetCollectionReusableView: UICollectionReusableView { ...@@ -33,7 +34,7 @@ class YHAIGreetCollectionReusableView: UICollectionReusableView {
lable.textAlignment = .left lable.textAlignment = .left
lable.font = UIFont.PFSC_R(ofSize:14) lable.font = UIFont.PFSC_R(ofSize:14)
lable.numberOfLines = 0 lable.numberOfLines = 0
lable.text = "可以为您提供申请进度查询和赴港攻略,有什么问题尽管问我~您可以试试了解以下内容~" lable.text = "我是银河AI助手港小宝,可以为您提供申请进度查询和赴港攻略,有什么问题尽管问我哟~"
return lable return lable
}() }()
...@@ -52,23 +53,22 @@ class YHAIGreetCollectionReusableView: UICollectionReusableView { ...@@ -52,23 +53,22 @@ class YHAIGreetCollectionReusableView: UICollectionReusableView {
self.addSubview(subtitleLabel) self.addSubview(subtitleLabel)
iconImgView.snp.makeConstraints { make in iconImgView.snp.makeConstraints { make in
make.left.equalTo(29) make.right.equalTo(-20+horizonalGap)
make.top.equalTo(16) make.top.equalTo(4)
make.width.height.equalTo(50) make.width.equalTo(120)
make.height.equalTo(94)
} }
titleLabel.snp.makeConstraints { make in titleLabel.snp.makeConstraints { make in
make.left.equalTo(24) make.left.equalTo(24-horizonalGap)
make.right.equalTo(-24) make.bottom.equalTo(iconImgView.snp.bottom).offset(-15)
make.top.equalTo(iconImgView.snp.bottom).offset(16) make.height.equalTo(42)
make.height.equalTo(32)
} }
subtitleLabel.snp.makeConstraints { make in subtitleLabel.snp.makeConstraints { make in
make.left.equalTo(24) make.left.equalTo(24-horizonalGap)
make.right.equalTo(-24) make.right.equalTo(-24+horizonalGap)
make.top.equalTo(titleLabel.snp.bottom).offset(16) make.top.equalTo(titleLabel.snp.bottom).offset(8)
make.bottom.equalTo(-30)
} }
} }
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Frame.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Frame-1.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "港小宝IP(5).png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "港小宝IP(4).png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
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