Files
ClassContent/历届学生/苏琪/项目练习/newApp/appFont/pages/user/user.vue
2024-09-27 02:06:13 +08:00

71 lines
1.5 KiB
Vue

<template>
<view class="login">
<view class="userIcon">
<view class="headericon">
<image src="../../static/icon.png" mode="aspectFit"></image>
</view>
</view>
<view class="loginForm">
<form action="" method="" name="">
<view class="inputBox">
<label for="username">
<span>手机号</span><input type="text" v-model="loginMessage.username" class="uni-input username" id="username" placeholder="请填写手机号" />
</label>
</view>
<view class="inputBox">
<label for="password">
<span>密 &nbsp; 码</span><input type="text" v-model="loginMessage.userpwd" class="uni-input password" id="password" placeholder="请输入你的密码" />
</label>
</view>
<button type="primary" form-type="submit" class="signIn" @click="login()" >登录</button>
</form>
</view>
</view>
</template>
<script>
export default{
data() {
return {
loginMessage: {
username: '',
userpwd: ''
}
}
},
created() {
},
onLoad() {
},
methods:{
getStatus () {
},
nochecked () {
uni.showToast({
title: "请先勾选协议",
duration: 2000
});
},
async login(){
let data = await this.$http.userLogin({
data: this.loginMessage
});
console.log(data)
localStorage.setItem("LoginStatus", JSON.stringify(data))
uni.switchTab({
url: '/pages/city/city'
});
}
// terunTo(){
// }
}
}
</script>
<style lang="less">
@import "./../../common/less/page/login.less";
</style>