一、登陆页面
1.checkbox+button
<el-checkbox v-model="AccountForm.autoLogin">一周内自动登录</el-checkbox>
<el-button type="primary" style="width: 372px" @click="submitForm()">登录</el-button>
2.data
data () {
return {
AccountForm: {
userName: '',
password: '',
autoLogin: true
}
}
}
3.methods
methods: {
submitForm () {
let that = this
let userName = that.AccountForm.userName
let password = that.AccountForm.password
let autoLogin = that.AccountForm.autoLogin
sessionStorage.setItem('userName', userNameData)
sessionStorage.setItem('role', role)
sessio