You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
437 B
25 lines
437 B
package com.gyf.csams
|
|
|
|
|
|
interface UrlPath{
|
|
fun build():String
|
|
}
|
|
|
|
enum class RegisterApi(val path: String):UrlPath{
|
|
register("/register"),
|
|
checkId("/register/checkId");
|
|
|
|
override fun build(): String {
|
|
return "/api/account${this.path}"
|
|
}
|
|
}
|
|
|
|
|
|
class Api {
|
|
companion object{
|
|
fun buildUrl(urlPath: UrlPath):String{
|
|
return "${BuildConfig.SERVER_ADDRESS}${urlPath.build()}"
|
|
}
|
|
}
|
|
}
|
|
|
|
|