2022年5月29日 从svn移到git

This commit is contained in:
daihh
2022-05-29 18:59:24 +08:00
parent 9580ff8c9b
commit faa7afb65f
897 changed files with 171836 additions and 0 deletions

93
pages/login/login.vue Normal file
View File

@@ -0,0 +1,93 @@
<template>
<view style="padding-top: 100px;">
<u-toast ref="loginToast"></u-toast>
<view style="padding: 40uxp;background-color: #FFFFFF;">
<view class="logo">
<view style="font-size: 50upx;">京东方大学堂</view>
</view>
<view class="row">
<view class="">
<u--input prefixIcon="account" placeholder="员工号" border="surround" v-model="loginName"></u--input>
</view>
</view>
<view class="row">
<view class="">
<u--input prefixIcon="lock" placeholder="密码" :password="true" type="password" border="surround" v-model="password"></u--input>
</view>
</view>
<view class="row">
<u-button @tap="submitLogin" type="primary" text="登 录"></u-button>
</view>
<view class="getpass">
<!-- <a href="#">忘记密码?</a> -->
</view>
</view>
</view>
</template>
<script>
import apiLogin from '@/api/login.js'
export default {
data() {
return {
loginName: '',//10181457
password: '',//666666
loading:false,
redirect: undefined
}
},
mounted() {
//对cookies进行操作这里是写
//document.cookie = "mytest=qweqwe131231; path=/; max-age=" + 30*24*60*60;
},
methods: {
submitLogin(){
const params={
loginName:this.loginName,
password:this.password,
code:''
}
let $this=this;
this.$store.dispatch("Login", params).then(rs => {
$this.loading = false;
if(rs.status==200){
//console.log(rs);
$this.$store.dispatch("InitData").then(res => {
//console.log(res)
//$this.$watermark.set(res.result.name + res.result.loginName);
// uni.switchTab({
// url:'/pages/index/index'
// })
uni.switchTab({
url:'/pages/study/index'
})
});
}else{
console.log(rs.error);
$this.$refs.loginToast.show({message:'登录失败',type:'error'});
}
}).catch(() => {
$this.loading = false;
});
}
}
}
</script>
<style lang="scss" scoped>
page{
background-color: #FFFFFF;
}
.row{
margin: 30upx 100upx;
}
.logo{
text-align: center;
margin: 40upx;
}
.getpass{
text-align: right;
margin: 20upx 100upx;
}
</style>