|
@@ -77,6 +77,10 @@ public let kUserSaveExpreesContactsApi = "/user/saveExpreesContacts"
|
|
|
/// 删除自提点收货人信息
|
|
|
public let kUserDelExpreesContactsApi = "/user/delExpreesContacts"
|
|
|
|
|
|
+// MARK: - 自提点收货人信息,设置默认
|
|
|
+/// 自提点收货人信息,设置默认
|
|
|
+public let kUserSetExpreesContactsDefaultApi = "/user/setExpreesContactsDefault"
|
|
|
+
|
|
|
/// 用户
|
|
|
///
|
|
|
/// - userLogout: 登出
|
|
@@ -96,6 +100,7 @@ public let kUserDelExpreesContactsApi = "/user/delExpreesContacts"
|
|
|
/// - userExpreesContactsList: 自提点收货人列表
|
|
|
/// - userSaveExpreesContacts: 新增、编辑 自提地址收货人信息
|
|
|
/// - userDelExpreesContacts: 删除自提点收货人信息
|
|
|
+/// - userSetExpreesContactsDefault: 自提点收货人信息,设置默认
|
|
|
public enum SwiftMoyaServiceUserApi {
|
|
|
case userLogout(parameters:Dictionary<String, Any>)
|
|
|
case userRefresh(parameters:Dictionary<String, Any>)
|
|
@@ -114,6 +119,7 @@ public enum SwiftMoyaServiceUserApi {
|
|
|
case userExpreesContactsList(parameters:Dictionary<String, Any>)
|
|
|
case userSaveExpreesContacts(parameters:Dictionary<String, Any>)
|
|
|
case userDelExpreesContacts(parameters:Dictionary<String, Any>)
|
|
|
+ case userSetExpreesContactsDefault(parameters:Dictionary<String, Any>)
|
|
|
|
|
|
}
|
|
|
|
|
@@ -137,7 +143,8 @@ extension SwiftMoyaServiceUserApi: TargetType {
|
|
|
.userAddressDelete,
|
|
|
.userExpreesContactsList,
|
|
|
.userSaveExpreesContacts,
|
|
|
- .userDelExpreesContacts
|
|
|
+ .userDelExpreesContacts,
|
|
|
+ .userSetExpreesContactsDefault
|
|
|
:
|
|
|
return URL(string: kApiDataPrefix())!
|
|
|
}
|
|
@@ -179,7 +186,8 @@ extension SwiftMoyaServiceUserApi: TargetType {
|
|
|
return kUserSaveExpreesContactsApi
|
|
|
case .userDelExpreesContacts:
|
|
|
return kUserDelExpreesContactsApi
|
|
|
-
|
|
|
+ case .userSetExpreesContactsDefault:
|
|
|
+ return kUserSetExpreesContactsDefaultApi
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -201,7 +209,8 @@ extension SwiftMoyaServiceUserApi: TargetType {
|
|
|
.userAddressDelete,
|
|
|
.userExpreesContactsList,
|
|
|
.userSaveExpreesContacts,
|
|
|
- .userDelExpreesContacts
|
|
|
+ .userDelExpreesContacts,
|
|
|
+ .userSetExpreesContactsDefault
|
|
|
:
|
|
|
return .post
|
|
|
}
|
|
@@ -228,7 +237,8 @@ extension SwiftMoyaServiceUserApi: TargetType {
|
|
|
.userAddressDelete(var parameters),
|
|
|
.userExpreesContactsList(var parameters),
|
|
|
.userSaveExpreesContacts(var parameters),
|
|
|
- .userDelExpreesContacts(var parameters)
|
|
|
+ .userDelExpreesContacts(var parameters),
|
|
|
+ .userSetExpreesContactsDefault(var parameters)
|
|
|
:
|
|
|
let sign = SwiftSign.shared().sign(signType:.AccessToken, parameters: parameters)
|
|
|
parameters.updateValue(sign, forKey: "sign")
|
|
@@ -267,8 +277,8 @@ extension SwiftMoyaServiceUserApi: TargetType {
|
|
|
.userAddressDelete,
|
|
|
.userExpreesContactsList,
|
|
|
.userSaveExpreesContacts,
|
|
|
- .userDelExpreesContacts
|
|
|
-
|
|
|
+ .userDelExpreesContacts,
|
|
|
+ .userSetExpreesContactsDefault
|
|
|
:
|
|
|
return (headerParameters(headerType: .tokenHeader) as! [String : String])
|
|
|
case .userLogout,
|