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.
csamsclient/foreground/src/main/java/com/gyf/csams/association/model/RegAssociationViewModel.kt

46 lines
1.1 KiB

package com.gyf.csams.association.model
import android.net.Uri
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import com.gyf.csams.NOT_IMPL_TIP
import com.gyf.csams.uikit.StringForm
data class Image(val uri: Uri, val createTime: Long, val size: Long)
class RegAssociationViewModel : ViewModel() {
val frameDesc = "社团注册资料"
val name = StringForm(formDesc = "社团名称", textLength = 5)
val desc = StringForm(formDesc = "社团简介", textLength = 30)
val _picture = MutableLiveData<Uri>()
val picture: LiveData<Uri> = _picture
val piciurePlaceHolder = "请上传图片"
val errorPicture = "图片加载失败,请联系管理员"
val deninedPermission = "拒绝授权"
val register = "注册"
val back = "返回"
fun setPicture(uri: Uri) {
_picture.value = uri
}
/**
* TODO 注册社团
*
* @param callback
*/
fun register(callback: (value: String) -> Unit) {
callback(NOT_IMPL_TIP)
}
}