package com.xw.yunwei.net import com.xw.common.net.interceptor.HttpResponse import com.xw.common.net.interceptor.PageResponse import com.xw.yunwei.BuildConfig import com.xw.yunwei.model.AppPermissionModel import com.xw.yunwei.model.AppVersionModel import com.xw.yunwei.model.ClockInStatusModel import com.xw.yunwei.model.LoginModel import com.xw.yunwei.model.NoticeModel import com.xw.yunwei.model.UserInfoRealtime import com.xw.yunwei.model.WebContentModel import okhttp3.RequestBody import retrofit2.Call import retrofit2.http.Body import retrofit2.http.GET import retrofit2.http.Header import retrofit2.http.POST import retrofit2.http.Path import retrofit2.http.Query interface UserApi { /*账号密码登录*/ @POST("account/maintenance-app/base/v1/operationPasswordLogin") fun loginByPassword(@Body body: RequestBody): Call> /*手机验证码登录*/ @POST("account/maintenance-app/base/v1/verificationCodeLogin") fun loginByCode(@Body body: RequestBody): Call> /*通过第三方token登录*/ @GET("${BuildConfig.API_HOST}account/maintenance-app/ssoAuthSdk/appLogin") fun loginByThirdToken( @Query("deviceType") deviceType: Int = 1, @Header("Content-Type") contentType: String = "application/json", @Header("XT-Client-Type") clientType: String, @Header("XT-DeviceId") deviceId: String, @Header("XT-Nonce") nonce: String, @Header("XT-AppId") appId: String, @Header("XT-Signature") sign: String, @Header("Authorization") token: String ): Call> /*获取手机验证码*/ @POST("account/maintenance-app/base/v1/getVerificationCode") fun getVerificationCode(@Body body: RequestBody): Call> /*修改密码*/ @POST("account/maintenance-app/base/v1/updatePassword") fun modifierPsw(@Body body: RequestBody): Call> /*获取个人中心首页信息*/ @GET("account/maintenance-app/api/v1/userInfo") fun getUserInfo(): Call> /*个人中心-证件上传*/ @POST("account/maintenance-app/api/v1/saveCertificate") fun saveCertificate(@Body body: RequestBody): Call> /*获取协议/隐私政策 类型 1=用户服务协议 2=平台隐私政策 */ @GET("operation/maintenance-app/base/v1/privacy/content/{type}") fun getProtocol(@Path("type") type: Int): Call> /*消息通知 */ @POST("account/maintenance-app/api/v1/notification/list") fun getNoticeList(@Body body: RequestBody): Call>> /*获取App最新版本 */ @GET("operation/maintenance-app/api/v1/app/version/latest") fun getVersion(): Call> /*获取客服电话 */ @GET("operation/maintenance-app/base/v1/support/phone") fun getPhone(): Call> /*查询个人排班与考勤信息 */ @POST("maintenance/maintenance-app/api/v1/scheduling/shiftAttendance") fun querySchedule(@Body body: RequestBody): Call> /*上班打卡 */ @POST("maintenance/maintenance-app/api/v1/clock/clockIn") fun clockIn(@Body body: RequestBody): Call> /*下班打卡 */ @POST("maintenance/maintenance-app/api/v1/clock/clockOut") fun clockOut(@Body body: RequestBody): Call> /*设置已读 */ // @FormUrlEncoded // @POST("account/api/v1/notification/read") // fun read(@Field("notificationId") notificationId: Long): Call> @GET("account/maintenance-app/api/v1/notification/read") fun read(@Query("notificationId") notificationId: Long): Call> /*获取获取当前登录用户权限列表 */ @GET("operation/maintenance-app/api/v1/getAppPermission") fun getAppPermission(): Call>> }