//
|
// CoinStoreHeadView.swift
|
// WanPai
|
//
|
// Created by 无故事王国 on 2023/6/29.
|
//
|
|
import UIKit
|
import JQTools
|
import QMUIKit
|
|
class CoinStoreHeadView: UICollectionReusableView {
|
|
@IBOutlet weak var btn_sort: QMUIButton!
|
@IBOutlet weak var btn_type: QMUIButton!
|
@IBOutlet weak var shadowView: UIView!
|
|
|
var innerView:UIView!
|
|
override func awakeFromNib() {
|
super.awakeFromNib()
|
shadowView.jq_addShadows(shadowColor: UIColor(hexStr: "DFDFDF").withAlphaComponent(0.5), corner: 0, radius: 2, offset: CGSize(width: 0, height: 3), opacity: 1)
|
btn_sort.imagePosition = .right
|
btn_type.imagePosition = .right
|
btn_sort.spacingBetweenImageAndTitle = 5
|
btn_type.spacingBetweenImageAndTitle = 5
|
}
|
|
|
@IBAction func resortAction(_ sender: QMUIButton) {
|
guard !sender.isSelected else {return}
|
sender.isSelected = true
|
CourseSubTypeView.show(inView: self.innerView, afterView: self, items: ["积分从高到底","积分从低到高","兑换从高到底"]) { str in
|
sender.isSelected = false
|
|
} closeClouse: {
|
sender.isSelected = false
|
}
|
}
|
|
@IBAction func typeAction(_ sender: UIButton) {
|
guard !sender.isSelected else {return}
|
sender.isSelected = true
|
CourseSubTypeView.show(inView: self.innerView, afterView: self, items: ["实体商品","课包商品","门票商品","优惠券"]) { str in
|
sender.isSelected = false
|
|
} closeClouse: {
|
sender.isSelected = false
|
}
|
}
|
|
@IBAction func recoredAction(_ sender: UIButton) {
|
let vc = RechargeRecordVC()
|
vc.title = "积分明细"
|
JQ_currentViewController().jq_push(vc: vc)
|
}
|
|
|
|
@IBAction func exchangeRecordAction(_ sender: UIButton) {
|
let vc = WelfareExchangeRecordListVC()
|
JQ_currentViewController().jq_push(vc: vc)
|
}
|
|
}
|