From be5829165f7cd49216971d22e39b8eae16fad915 Mon Sep 17 00:00:00 2001
From: tj <1378534974@qq.com>
Date: 星期二, 25 三月 2025 14:06:19 +0800
Subject: [PATCH] 1.阿里支付
---
app/src/main/java/com/example/firstapp/database/service/ApiService.kt | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/app/src/main/java/com/example/firstapp/database/service/ApiService.kt b/app/src/main/java/com/example/firstapp/database/service/ApiService.kt
index b563cd2..691f7ab 100644
--- a/app/src/main/java/com/example/firstapp/database/service/ApiService.kt
+++ b/app/src/main/java/com/example/firstapp/database/service/ApiService.kt
@@ -7,10 +7,14 @@
import com.example.firstapp.database.response.LoginResponse
import com.example.firstapp.database.response.SecurityResponse
import com.example.firstapp.database.response.UserInfo
+import okhttp3.MultipartBody
+import okhttp3.RequestBody
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
import retrofit2.http.GET
+import retrofit2.http.Multipart
import retrofit2.http.POST
+import retrofit2.http.Part
import retrofit2.http.Path
import retrofit2.http.Query
@@ -39,6 +43,13 @@
@GET("flower/api/supplier/info/{phone}")
suspend fun getUserInfo(@Path("phone") phone: String): ApiResponse<UserInfo>
+
+ @Multipart
+ @POST("api/supplier/operation/update")
+ suspend fun updateProfile(
+ @Part("nickname") nickname: RequestBody,
+ @Part avatar: MultipartBody.Part?
+ ): ApiResponse<Unit>
}
// 创建Retrofit实例(单例)
--
Gitblit v1.9.3