5.14
要开始重新做学习记录app了
用jetpack compose 做的前端安卓页面
用springboot 写的后端
先看看 我做出来的计划页面吧
``` kotlin
fun PlanScreen(
viewModel: PlanViewModel = viewModel(factory = PlanViewModelProvider.Factory)
) {
var openDialog = remember { mutableStateOf(false) }
Scaffold(
topBar = {
TopAppBar(
title = {
Row(
verticalAlignment = Alignment.CenterVertically
) {
Text(stringResource(id = R.string.weekPlane))
Spacer(modifier = Modifier.padding(horizontal = 120.dp))
//添加每周计划
IconButton(
onClick = {
openDialog.value = true
}
) {
Icon(
imageVector = Icons.Filled.Add,
contentDescription = stringResource(id = R.string.add)
)
}
if (openDialog.value) {
AddPlanDialog(openDialog = openDialog)
}
}
}
)
},
) { innerPadding ->
Column(
modifier = Modifier.padding(innerPadding)
) {
val calendar = Calendar.getInstance()
calendar.set(2024, Calendar.MAY, 15) // 设置为 2024 年 5 月 15 日
val zoneId = ZoneId.of("Asia/Shanghai") // 中国的时区
val specificDateTime: LocalDateTime =
LocalDateTime.ofInstant(calendar.toInstant(), zoneId)
PlanCard(
allWeekPlanes = listOf(
Plan(1, 1, "nininiwowowo", specificDateTime, "hao"),
Plan(2, 2, "wowowoninini", specificDateTime)
)
)
}
}
}
```