|
@@ -578,7 +578,21 @@ class KMMemberCenterManager: NSObject {
|
|
|
if let token = activeVIP_dict["id"] as? String { activeVIP_id = token }
|
|
|
if let token = activeVIP_dict["userId"] as? String { activeVIP_userId = token }
|
|
|
if let token = activeVIP_dict["status"] as? Int { activeVIP_status = token }
|
|
|
- if let token = activeVIP_dict["endDate"] as? String { activeVIP_endDate = token }
|
|
|
+ if let token = activeVIP_dict["endDate"] as? String {
|
|
|
+
|
|
|
+ // 创建一个日期格式化器
|
|
|
+ let dateFormatter = DateFormatter()
|
|
|
+ dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
|
|
|
+
|
|
|
+ // 将字符串转换为日期对象
|
|
|
+ if let date = dateFormatter.date(from: token) {
|
|
|
+ // 创建一个新的日期格式化器,用于只显示天
|
|
|
+ let dayFormatter = DateFormatter()
|
|
|
+ dayFormatter.dateFormat = "yyyy-MM-dd" // 只保留年月日部分
|
|
|
+
|
|
|
+ activeVIP_endDate = dayFormatter.string(from: date)
|
|
|
+ }
|
|
|
+ }
|
|
|
if let token = activeVIP_dict["payType"] as? Int { activeVIP_payType = token }
|
|
|
if let token = activeVIP_dict["productName"] as? String { activeVIP_productName = token }
|
|
|
if let token = activeVIP_dict["levels"] as? String { activeVIP_levels = token }
|