jsdw_ios/QuickLocation/Manager/Account/UserConfigModel.swift

63 lines
1.3 KiB
Swift
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// UserConfigModel.swift
// QuickLocation
//
// Created by on 2026/5/26.
//
import ObjectMapper
import RxDataSources
struct UserConfigModel: Mappable {
var token: String?
var phone: String?
var name: String?
var avater: String?
///
var head_pic: String = "1"
///
var userIcon: UIImage {
UIImage(named: "UserIcon/\(head_pic)") ?? UIImage()
}
///
var temp: Bool = true
/// ID
var uid: String?
/// 1 2 3
var vip: Int = 1
/// Config
var config: SystemConfigModel?
init?(map: Map) {
}
mutating func mapping(map: Map) {
token <- map["token"]
temp <- map["temp"]
phone <- map["phone"]
name <- map["name"]
uid <- map["user_id"]
avater <- map["avater"]
head_pic <- (map["head_pic"], kIntTransformStr)
config <- map["config"]
vip <- map["vip"]
}
}
struct SystemConfigModel: Mappable {
/// banner
var groupBannerList: [String] = []
init?(map: Map) {
}
mutating func mapping(map: Map) {
groupBannerList <- map["client.team.ad", nested: false]
}
}