DESKTOP-812G6RA\PROW_006
9 days ago ee0581277156325f60fe3a1edfd8ac1645a77ec6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<template>
  <div class="login">
    <div class="top">
      <div class="top-title">
        <div class="left">
          <h2>小牛集卡</h2>
        </div>
        <div class="right">
          <span>入驻平台</span>
          <span class="middle-right">|</span>
          <span>关于我们</span>
        </div>
      </div>
    </div>
    <div class="mddile">
      <div class="login-main">
        <div class="login-top">
          <div class="log-avtar">
            <img src="../../../public/img/login/u1357.svg" alt="" />
          </div>
        </div>
        <div class="register">
          <div class="login-input">
            <div class="login-user">
              <el-input
                placeholder="请输入用户名"
                prefix-icon="el-icon-s-custom"
                v-model="userName" clearable
              >
              </el-input>
            </div>
 
            <el-input
              placeholder="请输入密码"
              prefix-icon="el-icon-lock" 
              v-model="password" clearable type="password"
            >
            </el-input>
          </div>
          <div class="login-remember">
            <div class="remember">
              <el-checkbox v-model="checked">记住密码</el-checkbox>
            </div>
            <div class="forget">
                <router-link to="/home">忘记密码?</router-link>
            </div>
          </div>
          <div class="login-btn">
              <!-- <button> 登 录 </button> -->
               <el-button type="danger" @click="register">登 录</el-button>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
        data(){
            return{
                checked:false,
                password:"",
                userName:"",
 
            }
        },
        methods:{
             register(){
 
                 this.$axios.post("api/Account/LoginApi",this.$qs.stringify({"userName":this.userName,"password":this.password,"type":0})).then(res=>{
                  if(res.data.IsSuccess){
                   
                    this.$message({message:res.data.Content,type:"success"});
                    this.$emit("acceptlogin",false);
                      // window.sessionStorage.setItem('token',res.data.SystemUserId)
                    this.$store.commit('set_token',res.data.Extra.SessionId);
                    this.$store.commit('get_user',res.data.Extra.DisplayName);
                    this.$router.push("/home");
                  }else{
                    this.$message.error(res.data.Content);
                  }
                }).catch(err=>{
                  console.log(err);
                })
            },
        }
 
};
</script>
<style lang="postcss" scoped>
.remember .el-checkbox{
    font-size: 14px;
    color: #fff;
}
.forget a{
    font-size: 14px;
    color: #000;
}
.login-remember{
    display: flex;
    justify-content: space-between;
    padding: 15px 0px;
}
 .login-btn button{
     width: 100%;
     padding: 10px;
     background-color: #A30014;
     outline: none;
     border: none;
     cursor: pointer;
 }
.top {
  width: 100%;
  background-color: #f59a24;
  height: 60px;
  min-width: 1158px;
}
.top-title {
  width: 1158px;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
}
.left h2 {
  color: #fff;
}
.left,
.right {
  line-height: 60px;
}
.right span {
  color: #fff;
}
.middle-right {
  margin: 0 15px;
}
.mddile {
  width: 1158px;
  height: 600px;
  background-image: url("../../../public/img/login/login.png");
  background-repeat: no-repeat;
  margin: 0 auto;
  margin-top: 100px;
}
.login-main {
  width: 320px;
  height: 490px;
  background-color: #d26443;
  margin: 0 auto;
  position: absolute;
  left: 800px;
  right: 0px; 
  
}
.log-avtar {
  height: 90px;
  width: 90px;
  background-color: #fff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.login-top {
  align-content: center;
  display: flex;
  justify-content: center;
  padding-top: 40px;
}
.register {
  padding: 15px;
}
.login-user {
  margin-bottom: 15px;
}
</style>