杨锴
2025-05-11 7453d2d0cef415b34323d1b91e6cfa4a6ba31178
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
//
//  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 //场地
}