auth to server-V6

This commit is contained in:
Eric85710 2026-04-28 16:11:54 +08:00
parent 880db5b251
commit 7614184eb9
3 changed files with 5 additions and 27 deletions

View file

@ -0,0 +1,4 @@
kotlin version: 2.0.21
error message: The daemon has terminated unexpectedly on startup attempt #1 with error code: 0. The daemon process output:
1. Kotlin compile daemon is ready

View file

@ -31,7 +31,7 @@ class MainActivity : ComponentActivity() {
val currentAppTheme by themeViewModel.currentTheme.collectAsState()
Login_V3Theme(appTheme = currentAppTheme) {
HealthCheckScreen()
Technologia()
}
}
}

View file

@ -1,26 +0,0 @@
package com.example.login_v3.data.api
import com.squareup.moshi.Moshi
import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory
import retrofit2.Retrofit
import retrofit2.converter.moshi.MoshiConverterFactory
object RetrofitInstance {
private const val BASE_URL = "https://192.168.0.217:8443/" // 開發測試可能需改 HTTP
// 建立 Moshi instance,加入 Kotlin 支援
private val moshi: Moshi by lazy {
Moshi.Builder()
.add(KotlinJsonAdapterFactory())
.build()
}
val api: TecnologiaApi by lazy {
Retrofit.Builder()
.baseUrl(BASE_URL)
.addConverterFactory(MoshiConverterFactory.create(moshi))
.build()
.create(TecnologiaApi::class.java)
}
}