//
|
// Enums.swift
|
// XQMuse
|
//
|
// Created by 无故事王国 on 2024/8/20.
|
//
|
|
import Foundation
|
import HandyJSON
|
|
enum PlayMode:Int,Decodable,Encodable{
|
case singleLoop = 0 //单曲
|
case line = 1 //顺序播放
|
}
|
|
|
enum DisplayType:Int,HandyJSONEnum{
|
case horizontal = 1 //横
|
case vertical = 2 //竖
|
}
|
|
enum ChargeType:Int,HandyJSONEnum{
|
case free = 1 //免费
|
case vipFree = 2 //会员免费
|
case payment = 3 // 需支付
|
}
|
|
enum DeliverStudyType:Int,HandyJSONEnum{
|
case online = 1 // 线上课程
|
case offline = 2 //线下课程
|
}
|
|
enum ConditionType:Int,HandyJSONEnum,Codable{
|
case yes = 1
|
case no = 2
|
|
mutating func troggle(){
|
if self == .no{
|
self = .yes
|
}else{
|
self = .no
|
}
|
}
|
}
|
|
enum TreeLevel:Int,HandyJSONEnum,Codable{
|
case level_1 = 1
|
case level_2 = 2
|
case level_3 = 3
|
case level_4 = 4
|
case level_5 = 5
|
case level_6 = 6
|
case level_7 = 7
|
case level_8 = 8
|
case level_9 = 9
|
case level_10 = 10
|
|
static var sunAni:String{
|
get{
|
return "https://xqgwzh.obs.cn-south-1.myhuaweicloud.com/1744626206206sunshine.png"
|
}
|
}
|
|
var aniResource:String{
|
switch self {
|
case .level_1:return "apngb-animated-level-1"
|
case .level_2:return "apngb-animated-level-2"
|
case .level_3:return "apngb-animated-level-3"
|
case .level_4:return "apngb-animated-level-4"
|
case .level_5:return "apngb-animated-level-5"
|
case .level_6:return "apngb-animated-level-6"
|
case .level_7:return "apngb-animated-level-7"
|
case .level_8:return "apngb-animated-level-8"
|
case .level_9:return "apngb-animated-level-9"
|
case .level_10:return "apngb-animated-level-10"
|
}
|
}
|
|
var aniResourceUrl:String{
|
switch self {
|
case .level_1:return "https://xqgwzh.obs.cn-south-1.myhuaweicloud.com/1744625964828apngb_level_1.png"
|
case .level_2:return "https://xqgwzh.obs.cn-south-1.myhuaweicloud.com/1744625964828apngb_level_2.png"
|
case .level_3:return "https://xqgwzh.obs.cn-south-1.myhuaweicloud.com/1744625964828apngb_level_3.png"
|
case .level_4:return "https://xqgwzh.obs.cn-south-1.myhuaweicloud.com/1744625964828apngb_level_4.png"
|
case .level_5:return "https://xqgwzh.obs.cn-south-1.myhuaweicloud.com/1744625964828apngb_level_5.png"
|
case .level_6:return "https://xqgwzh.obs.cn-south-1.myhuaweicloud.com/1744625964828apngb_level_6.png"
|
case .level_7:return "https://xqgwzh.obs.cn-south-1.myhuaweicloud.com/1744625964828apngb_level_7.png"
|
case .level_8:return "https://xqgwzh.obs.cn-south-1.myhuaweicloud.com/1744625964828apngb_level_8.png"
|
case .level_9:return "https://xqgwzh.obs.cn-south-1.myhuaweicloud.com/1744625964828apngb_level_9.png"
|
case .level_10:return "https://xqgwzh.obs.cn-south-1.myhuaweicloud.com/1744625964828apngb_level_10.png"
|
}
|
}
|
|
|
var staticDroopResource:String{
|
switch self {
|
case .level_1:return "static-level-1"
|
case .level_2:return "static-level-2"
|
case .level_3:return "static-level-3"
|
case .level_4:return "static-level-4"
|
case .level_5:return "static-level-5"
|
case .level_6:return "static-level-6"
|
case .level_7:return "static-level-7"
|
case .level_8:return "static-level-8"
|
case .level_9:return "static-level-9"
|
case .level_10:return "static-level-10"
|
}
|
}
|
|
var title:String{
|
switch self {
|
case .level_1:return "种子"
|
case .level_2:return "发芽"
|
case .level_3:return "幼苗"
|
case .level_4:return "小树苗"
|
case .level_5:return "中等树苗"
|
case .level_6:return "小树"
|
case .level_7:return "中树"
|
case .level_8:return "大树"
|
case .level_9:return "成熟的大树"
|
case .level_10:return "参天大树"
|
}
|
}
|
|
var titleContent:String{
|
switch self {
|
case .level_1:return "亲爱的家人,生命之树的种子已植入这片沃土,请以农夫的心态用心浇灌,为你加油哦。"
|
case .level_2:return "恭喜您,种子发芽了,爱的旅程已经开始,为你加油!"
|
case .level_3:return "幼苗拔地而起,智慧俏然萌发,前方的道路,更加的明亮,继续努力吧!"
|
case .level_4:return "树苗正在成长,内心变得更加的柔软包容。未来正在向你招手。"
|
case .level_5:return "小树扎下了深深的根,离爱的梦想越来越近,继续坚持吧。"
|
case .level_6:return "大树已枝繁叶茂,自由的伸展,你的努力成就了这份美好,未来将更加的璀璨。"
|
case .level_7:return "智慧之花即将绽放,满载着希望与能量,前路无限的可能!"
|
case .level_8:return "恭喜你,智慧的花朵已经绽放,让我们走在充满芬芳的道路上吧!"
|
case .level_9:return "智慧之花开满枝头,满满的活力和美好,向你涌来了!"
|
case .level_10:return "真爱的果实已挂满枝头,丰盛而充实,人生如此美好,感谢您的浇灌!"
|
}
|
}
|
|
var sound:String{
|
switch self {
|
case .level_1: return oss_domain + "/xinquan/1d3254a9966b476789491032d8bb908a.wav"
|
case .level_2:return oss_domain + "/xinquan/d8daa4d5490f40f9a68a8469ad697660.wav"
|
case .level_3:return oss_domain + "/xinquan/0da0e117c4374c398347c480d2cfc6b4.wav"
|
case .level_4:return oss_domain + "/xinquan/6160ba07229a486da93880ac19db3768.wav"
|
case .level_5:return oss_domain + "/xinquan/1998498217564da7b3336fa867b5255d.wav"
|
case .level_6:return oss_domain + "/xinquan/d829bf1c7b544a83a7a09b5dfab3226d.wav"
|
case .level_7:return oss_domain + "/xinquan/0407fe616cd34ef0bffcd1d57520cd20.wav"
|
case .level_8:return oss_domain + "/xinquan/d3980143fbc14f86b635efd05f05c24e.wav"
|
case .level_9:return oss_domain + "/xinquan/b7bb109fc64f49e481013fe1c8f4693e.wav"
|
case .level_10:return oss_domain + "/xinquan/8b0303829a6547f5a16c5232883b94cc.wav"
|
}
|
}
|
|
mutating func updateLevel(){
|
|
let raw = self.rawValue + 1
|
let raw_1 = max(1,min(10, raw))
|
self = TreeLevel(rawValue: raw_1)!
|
}
|
}
|
|
enum TreeTeskDetailType:Int{
|
case all = 1
|
case increase = 2
|
case decreate = 3
|
}
|
|
enum EnergyChangeType:Int,HandyJSONEnum{
|
case increase = 1
|
case decreate = 2
|
}
|
|
enum GenderType:Int,HandyJSONEnum,Codable{
|
case man = 1
|
case woman = 2
|
case encrypt = 3
|
|
var rawTitle:String{
|
switch self {
|
case .man:return "男"
|
case .woman:return "女"
|
case .encrypt:return "保密"
|
}
|
}
|
|
static func GenderBy(_ str:String)->GenderType{
|
switch str {
|
case "男":return .man
|
case "女":return .woman
|
default:return .encrypt
|
}
|
}
|
}
|