package com.zaojiao.app.data.remote.api

import com.zaojiao.app.core.http.common.NetResult
import com.zaojiao.app.data.model.TokenModel
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path

interface LoginApi {
    @POST("/app/sms/v2/checkCode/app/{phone}/{code}")
    fun loginBySms(
        @Path(value = "phone") phone: String,
        @Path(value = "code") code: String,
    ): NetResult<TokenModel>

    @GET("/app/login/v2/{code}")
    fun loginByWechat(
        @Path(value = "code") code: String,
    ): NetResult<TokenModel>

    @POST("/app/login/oneClickLogin")
    fun loginByOneClick(
        @Body token: String,
    ): NetResult<TokenModel>
}