//
|
// Enums.swift
|
// WanPai
|
//
|
// Created by 杨锴 on 2023/6/9.
|
//
|
|
import Foundation
|
import HandyJSON
|
|
enum BannerPositionType:Int{
|
/// 首页
|
case homeTop = 1
|
///线上课得积分
|
case onlineCourse = 2
|
///看视频得奖励
|
case video = 3
|
///常见问题
|
case qusition = 4
|
|
case worldCup_top = 6
|
|
case worldCup_bottom = 7
|
}
|
|
/// 登录类型
|
enum LoginType{
|
case pwd,smsCode
|
}
|
|
/// 支付方式
|
enum PayType:Int,HandyJSONEnum{
|
case free = 0 //特殊状态:免费
|
case wechat = 1
|
case aliPay = 2
|
case coin = 3
|
case courseNum = 4
|
case integral = 5
|
}
|
|
enum PayStateType:Int,HandyJSONEnum{
|
case unPayment = 1
|
case paymented = 2
|
}
|
|
enum ItemType{
|
case course
|
case activity
|
case worldCup
|
}
|
|
/// 获取短信验证码类型
|
enum GetSMSCodeType:Int{
|
case login = 1
|
case register = 2
|
case updatePwd = 3
|
case forgotPwd = 4
|
|
var titleStr:String{
|
switch self {
|
case .login:
|
return "登录"
|
case .register:
|
return "注册"
|
case .updatePwd:
|
return "修改密码"
|
case .forgotPwd:
|
return "忘记密码"
|
}
|
}
|
}
|
|
|
//【mark】注意与:/other/base/protocol/queryProtocol 混用了,注意区分或分开
|
enum AgreentType:Int {
|
|
case user = 1
|
case safe = 3
|
case privacy = 2
|
case other = 4
|
case matchStore = 5
|
case useStore = 6
|
case matchPoint = 7
|
|
var titleStr:String{
|
switch self{
|
case .privacy:return "隐私协议"
|
case .safe:return "运动安全告知书"
|
case .user:return "用户协议"
|
case .matchStore:return "参与门店"
|
case .other:return ""
|
case .useStore:return "可用门店"
|
case .matchPoint:return "参与赛点"
|
}
|
}
|
}
|
|
enum SystemImgType:Int{
|
case notStudent = 1
|
case becomeVip = 2
|
case myCoupon = 3
|
case shoppingOnline = 4
|
case welfareWeekly = 5
|
case freeToday = 6
|
case launch = 7
|
}
|
|
|
enum HomeItemType:Int,HandyJSONEnum{
|
///世界杯
|
case worldcup = 0
|
///报名玩湃运动营
|
case course = 1
|
///预约场地
|
case booking = 2
|
///报名赛事及活动
|
case activity = 3
|
///免费福利
|
case welfare = 4
|
///线上运动营积分
|
case coin = 5
|
///购买优惠门票
|
case ticket = 6
|
/// 看视频得奖励
|
case video = 7
|
///智慧球场
|
case wisdomCourt = 8
|
|
case worldcupDetail = 9
|
|
case huimin = 10
|
|
case nothing = -999
|
|
var defaultImg:UIImage{
|
switch self {
|
case .course:
|
return UIImage(named: "b_1")!
|
case .booking:
|
return UIImage(named: "b_5")!
|
case .activity:
|
return UIImage(named: "b_2")!
|
case .welfare:
|
return UIImage(named: "b_6")!
|
case .coin:
|
return UIImage(named: "b_4")!
|
case .ticket:
|
return UIImage(named: "b_8")!
|
case .video:
|
return UIImage(named: "b_3")!
|
case .wisdomCourt:
|
return UIImage(named: "b_7")!
|
default:
|
return UIImage(named: "b_1")!
|
}
|
}
|
}
|
|
|
|
enum SortType:String{
|
case asc = "asc"
|
case desc = "desc"
|
case def = "icon_sort_normal"
|
|
var img:UIImage{
|
switch self{
|
case .asc:return UIImage(named: "icon_asc")!
|
case .desc:return UIImage(named: "icon_desc")!
|
case .def:return UIImage(named: "icon_sort_normal")!
|
}
|
}
|
}
|
|
enum Sort2Type:Int,HandyJSONEnum{
|
//1积分高到低 2积分从低到高 3兑换从高到低
|
case coinAsc = 1
|
case coinDesc = 2
|
case exAsc = 3
|
case exDesc = 4
|
}
|
|
enum GenderType:Int,HandyJSONEnum{
|
case none = 0
|
case man = 1
|
case woman = 2
|
}
|
|
enum PaymentType:Int,HandyJSONEnum{
|
case cash = 1 //现金
|
case coin = 2 //玩湃币
|
case cashCoin = 3 //现金 + 币
|
}
|
|
enum CouponType:Int,HandyJSONEnum{
|
case none = 0
|
///满减券
|
case discount = 1
|
/// 代金券
|
case voucher = 2
|
/// 体验券
|
case experience = 3
|
|
var rawTitle:String{
|
switch self {
|
case .none:return ""
|
case .discount:return "满减券"
|
case .voucher:return "代金券"
|
case .experience:return "体验券"
|
}
|
}
|
}
|
|
enum RegisterAcitivyType:Int,HandyJSONEnum{
|
/// 全部用户
|
case allUser = 1
|
/// 仅限年度会员参与
|
case vip = 2
|
///仅限学员参与
|
case student = 3
|
|
var strTitle:String{
|
switch self {
|
case .allUser:return "全部用户"
|
case .vip:return "仅限年度会员"
|
case .student:return "仅限运动营成员"
|
}
|
}
|
}
|
|
|
/// 我的报名活动赛事
|
enum SignupType:Int,HandyJSONEnum{
|
///全部
|
case all = 0
|
///未开始
|
case prepare = 1
|
/// 进行中
|
case ongoing = 2
|
/// 已结束
|
case over = 3
|
/// 已取消
|
case cancel = 4
|
|
var rawTitle:String{
|
switch self {
|
case .all:return ""
|
case .prepare:return "未开始"
|
case .ongoing:return "进行中"
|
case .over:return "已结束"
|
case .cancel:return "已取消"
|
}
|
}
|
}
|
|
enum YardBookingType:Int,HandyJSONEnum{
|
case none = -1
|
case waitPayment = 0
|
case pending = 1
|
case inStore = 2
|
case complete = 3
|
case overdue = 4
|
case cancel = 5
|
|
var titleRaw:String{
|
switch self {
|
case .waitPayment:return "待支付"
|
case .pending:return "待核销"
|
case .inStore:return "已核销"
|
case .complete:return "已完成"
|
case .overdue:return "已过期"
|
case .cancel:return "已取消"
|
case .none:return ""
|
}
|
}
|
}
|
|
|
|
enum CouponConditionType:Int,HandyJSONEnum{
|
case nationwide = 1 //全国
|
case city = 2 //城市
|
case store = 3 // 门店
|
|
var titleRaw:String{
|
switch self {
|
case .nationwide:return "全国通用"
|
case .city:return "指定城市可用"
|
case .store:return "指定门店可用"
|
}
|
}
|
}
|
|
enum CouponUseType:Int,HandyJSONEnum{
|
case unused = 1
|
case used = 2
|
case overdue = 3
|
}
|
|
enum ExchangeType:Int,HandyJSONEnum{
|
//商品类型 1实物 2课包 3门票 4优惠券
|
case goods = 1
|
case course = 2
|
case ticket = 3
|
case coupon = 4
|
|
var strTitle:String{
|
switch self {
|
case .goods:return "实体"
|
case .coupon:return "优惠券"
|
case .course:return "运动营"
|
case .ticket:return "门票"
|
}
|
}
|
}
|
|
enum ExchangePaymentType:Int,HandyJSONEnum{
|
case coin = 1
|
case cashAndCoin = 2
|
case cash = 3
|
}
|
|
enum UseStateType:Int,HandyJSONEnum{
|
case used = 1
|
case unUsed = 2
|
case expired = 3
|
|
var strTitle:String{
|
switch self{
|
case .used:return "已使用"
|
case .unUsed:return "待使用"
|
case .expired:return "已过期"
|
}
|
}
|
}
|
|
enum DetailType:Int,HandyJSONEnum{
|
case minus = 1 //正数
|
case positive = 2 //负数
|
}
|
|
|
enum StudentAppointType:Int,HandyJSONEnum{
|
case pedding = 1
|
case begining = 2
|
case complete = 3
|
case cancel = 4
|
case leave = 5
|
case truant = 6
|
|
var strTitle:String{
|
switch self{
|
case .pedding:return "待上课"
|
case .begining:return "已开始"
|
case .complete:return "已完成"
|
case .cancel:return "已取消"
|
case .leave:return "已请假"
|
case .truant:return "旷课"
|
}
|
}
|
}
|
|
enum StudentAppointTypeList:Int{
|
case all = 0
|
case pedding = 1
|
case complete = 2
|
case cancel = 3
|
}
|
|
enum StudentAppointDateType:Int,HandyJSONEnum{
|
case all = 0
|
case week = 1
|
case month = 2
|
case year = 3
|
}
|
|
enum MedalType:Int,HandyJSONEnum{
|
case club = 1
|
case sport = 2
|
case communtiy = 3
|
case deepPlayer = 4
|
case winner = 5
|
case counter = 6
|
case more = 7
|
|
|
var image:UIImage{
|
switch self {
|
case .club:return UIImage(named: "icon_coupon_1")!
|
case .sport:return UIImage(named: "icon_coupon_2")!
|
case .communtiy:return UIImage(named: "icon_coupon_3")!
|
case .deepPlayer:return UIImage(named: "icon_coupon_4")!
|
case .winner:return UIImage(named: "icon_coupon_8")!
|
case .counter:return UIImage(named: "icon_coupon_7")!
|
case .more:return UIImage(named: "icon_coupon_6")!
|
}
|
}
|
|
var title_en:String{
|
switch self {
|
case .club:return "COURSE"
|
case .sport:return "EVENTS"
|
case .communtiy:return "KING"
|
case .deepPlayer:return "APPOINTMENT"
|
case .winner:return "TRIUMPH"
|
case .counter:return "FIGHTING"
|
case .more:return "MORE"
|
}
|
}
|
|
var title:String{
|
switch self {
|
case .club:return "俱乐部之星"
|
case .sport:return "运动达人"
|
case .communtiy:return "社区之王"
|
case .deepPlayer:return "深度玩家"
|
case .winner:return "常胜将军"
|
case .counter:return "越战越勇"
|
case .more:return "更多"
|
}
|
}
|
|
|
/**
|
|
|
mentals.append(MentalInfo(img: UIImage(named: "icon_coupon_1"), t1: "COURSE", t2: "俱乐部之星"))
|
mentals.append(MentalInfo(img: UIImage(named: "icon_coupon_2"), t1: "EVENTS", t2: "运动达人"))
|
mentals.append(MentalInfo(img: UIImage(named: "icon_coupon_3"), t1: "KING", t2: "社区之王"))
|
mentals.append(MentalInfo(img: UIImage(named: "icon_coupon_4"), t1: "APPOINTMENT", t2: "深度玩家"))
|
mentals.append(MentalInfo(img: UIImage(named: "icon_coupon_5"), t1: "EVENTS", t2: "月度冠军"))
|
mentals.append(MentalInfo(img: UIImage(named: "icon_coupon_6"), t1: "MORE", t2: "更多"))*/
|
}
|
|
enum CourseType:Int,HandyJSONEnum{
|
case none = 0
|
case normal = 1
|
case vocation = 2
|
case experience = 3
|
|
var strTitle:String{
|
switch self {
|
case .normal: return "常规班"
|
case .vocation:return "假期班"
|
case .experience:return "体验课"
|
default:return ""
|
}
|
}
|
}
|
|
|
enum CardType:Int,HandyJSONEnum{
|
case none = 0
|
case subCard = 1
|
case monthCard = 2
|
case quarterCard = 3
|
case yearCard = 4
|
|
var strTitle:String{
|
switch self {
|
case .subCard: return "日卡"
|
case .monthCard:return "月卡"
|
case .quarterCard:return "季卡"
|
case .yearCard:return "年卡"
|
default:return ""
|
}
|
}
|
}
|
|
enum ScanType:Int,HandyJSONEnum{
|
case games = 1000 //游戏
|
case course = 1001 //运动营
|
case yard = 1002 //场地
|
}
|