天马学航——智慧教务系统(移动端)开发日志一
日志摘要:完成了学生端+教师端登陆功能的实现以及相应功能的后端调优
开发日志中所有图片均为概念图,请大家以实际发布上线为准
一、学生端登陆功能开发
老生常谈的问题:
没有思路怎么办:那就先写前端!
前端技术:HarmonyOS
1、使用ArkTS构建简单的前端界面:
import router from '@ohos.router'
import promptAction from '@ohos.promptAction'
import StudentLogins from '../../HttpModel/Student/StudentLogins'
@Entry
@Component
struct StudentLogin {
@State message: string = 'Hello World'
sid:string = null
pwd:string = null
build() {
Row(){
Column({
space:30}) {
Text("学生登陆")
.fontSize(40)
.fontWeight(FontWeight.Bolder)
.fontFamily("楷体")
//账号
Row({
space:20}){
Text("账号")
.fontSize(20)
TextInput({
placeholder:'请输入账号'})
.width(250)
.height(50)
.onChange(value=>{
this.sid=value
})
}
.width('100%')
.justifyContent(FlexAlign.Center)
//密码
Row({
space:20}){
Text("密码")
.fontSize(20)
TextInput({
placeholder:'请输入密码'})
.width(250)
.height(50)
.type(InputType.Password)
.onChange(value=>{
this.pwd=value
})
}
.width('100%')