Commit 8848772d authored by linxin's avatar linxin

升级登录注册

parent 93c344c3
......@@ -207,7 +207,7 @@ export default {
let url = process.env.basePath + 'do_car_confirm'
let param = {
master: {
contract_id: '123',
project_id: this.$route.params.project_id,
confirm_status: 'APPROVED',
},
}
......
......@@ -16,7 +16,7 @@
:updateData="[showList]"
:pullUp="true"
>
<div v-for="(item,index) in showList" :key="index" class="item" @click="changePage(item.project_id)">
<div v-for="(item,index) in showList" :key="index" class="item" @click="changePage(item)">
<div class="left">
<span>
<img src="@/assets/contractStart/icon.png" >
......@@ -107,7 +107,7 @@ export default {
this.$router.push({
name: 'ConfirmDetail',
params: {
project_id: e,
project_id: e.project_id,
},
})
},
......
<template>
<scroll id="login" ref="scroll" class="content">
<div class="bird-icon"/>
<div class="bird-icon" />
<div class="login-wrap">
<img class="title" src="../assets/login/title.png" >
<div class="pwd">
<div class="pwd-icon"><img src="../assets/login/user.png"></div>
<div class="pwd-input"><input v-model="username" type="text" placeholder="请输入用户名/手机号"></div>
<div v-if="username" class="delete" @click="clearAccount"><img src="../assets/login/delete.png"></div>
<div class="pwd-input">
<input v-model="username" class="user" type="text" placeholder="请输入用户名/手机号" >
</div>
<div v-if="username" class="delete" @click="clearAccount">
<img src="../assets/login/login-delete.png" >
</div>
</div>
<div class="pwd">
<div class="pwd-icon"><img src="../assets/login/password.png"></div>
<div class="pwd-input"><input id="passwordInput" v-model="password" :type="pwdType" placeholder="请输入密码"></div>
<div v-if="password" class="delete" @click="changeType"><img :src="openEye"></div>
<div class="pwd-input">
<input id="passwordInput" v-model="password" :type="pwdType" placeholder="请输入密码" >
</div>
<div v-if="password" class="delete" @click="changeType">
<img :src="openEye" >
</div>
</div>
<div class="button submit" @click="access">登录</div>
<div class="other-function">
<div class="register" @click="registerNew">注册</div>
<div class="pwd-forgotten" @click="pwdForgotten">忘记密码?</div>
</div>
<div class="button submit" @click="access">登录</div>
</div>
</scroll>
</template>
......@@ -28,8 +34,10 @@ export default {
data () {
return {
pwdType: 'password', // 密码类型
openEye: require('@/assets/login/passNoShow.png'), // 图片地址
username: window.localStorage.username ? window.localStorage.username : '',
openEye: require('@/assets/login/pwd.png'), // 图片地址
username: window.localStorage.username
? window.localStorage.username
: '',
password: '',
version: process.env.currentVersion,
routeName: this.$route.params.routeName || '',
......@@ -42,19 +50,23 @@ export default {
},
methods: {
changeType () {
this.pwdType = this.pwdType === 'password' ? 'text' : 'password'
this.openEye = this.pwdType === 'password' ? require('@/assets/login/passNoShow.png') : require('@/assets/login/passShow.png')
this.pwdType = this.pwdType === 'password' ? 'text' : 'password';
this.openEye =
this.pwdType === 'password'
? require('@/assets/login/passNoShow.png')
: require('@/assets/login/passShow.png')
},
login: function () {
let vm = this
// vm.password = CryptoJS.MD5(vm.password).toString().toUpperCase();
let md5passwprd = CryptoJS.MD5(vm.password).toString().toUpperCase()
let md5passwprd = CryptoJS.MD5(vm.password)
.toString()
.toUpperCase()
let param = {
'phone': vm.username,
'password': md5passwprd,
phone: vm.username,
password: md5passwprd,
}
vm.$post(process.env.basePath + 'app_login', param)
.then(function (res) {
vm.$post(process.env.basePath + 'app_login', param).then(function (res) {
if (res.result === 'S' && res.info.login_flag === 'Y') {
vm.hlsPopup.hideLoading()
window.localStorage.setItem('user_phone', vm.username)
......@@ -88,7 +100,7 @@ export default {
} else if (!vm.password || vm.password === undefined) {
vm.hlsPopup.showLongCenter('请输入密码')
} else {
let url = process.env.loginPath + 'admin'
let url = process.env.loginPath + 'admin';
let param = {}
vm.hlsPopup.showLoading('请稍等')
vm.$post(url, param).then(function (res) {
......@@ -105,42 +117,55 @@ export default {
this.$router.push('pwd-forgot')
},
clearAccount: function () {
this.username = ''
this.password = ''
this.username = '';
this.password = '';
},
clearPassword: function () {
this.password = ''
this.password = '';
},
},
}
</script>
<style lang="less" scoped type="text/less">
#login {
background: url("../assets/login/bg@2x.png") no-repeat;
background-size: cover;
#login {
background: url("../assets/login/back.png") no-repeat;
background-size: 100% 100%;
background-position-x: 0px;
color: #FFFFFF;
color: #ffffff;
width: 100%;
height: 100%;
margin: 0 auto;
.scrollContent{
.scrollContent {
display: flex;
justify-content: center;
align-items: center;
}
.bird-icon{
padding-top: 20%;
.bird-icon {
padding-top: 30%;
background: url("../assets/login/right.png") 90% no-repeat;
background-size: 51px 25px;
}
.login-wrap {
width: 87%;
height: 355px;
margin: 0 auto;
background-color: #fff;
border-radius: 8px;
margin-top: 15%;
padding: 32px 24px;
.title {
width: 227px;
height: 71px;
margin-left: -10px;
}
.login-wrap{
width: 100%;
margin-top: 60%;
}
.pwd {
border-bottom: 1px solid #5D98F6;
position: relative;
width: 279px;
margin: 0 auto;
display: flex;
display: -webkit-flex;
margin: 5% 0 5% 14%;
.pwd-icon {
margin-top: 2px;
margin-right: 6px;
......@@ -151,61 +176,69 @@ export default {
}
}
.pwd-input {
margin-left: 4%;
width: 100%;
margin-bottom: 10px;
display: flex;
display: -webkit-flex;
align-items: center;
-webkit-align-items: center;
// background-color: #0057C3 !important;
.user {
background: url("../assets/login/phone.png") 2px 2px no-repeat;
background-size: 25px 25px;
}
#passwordInput {
background: url("../assets/login/passwordConfirm.png") 2px 2px no-repeat;
background-size: 25px 25px;
}
input {
width: 100%;
height: 100%;
font-size: 16px;
color: #fff;
line-height: 22px;
background-color: rgba(0,87,195,0) !important;
text-indent: 30px;
font-family: PingFangSC-Regular;
font-size: 14px;
color: #2a2a2a;
height: 35px;
display: flex;
align-items: center;
border-bottom: 1px solid rgba(42, 42, 42, 0.4);
margin-top: 30px;
}
input:focus {
border-bottom: 1px solid #1d3fff;
}
input::-webkit-input-placeholder {
font-size: 16px;
color: #CDD1D3;
font-family: PingFangSC-Regular;
font-size: 14px;
color: rgba(75, 74, 75, 0.4);
}
}
.delete {
position: absolute;
right: -15px;
top: 30px;
img {
margin-right: 20px;
margin-top: 5px;
width: 14px;
height: 14px;
width: 20px;
// height: 14px;
}
}
}
.other-function {
width: 64%;
width: 279px;
margin: 0 auto;
display: flex;
font-family: PingFangSC-Regular;
font-size: 13px;
color: #1d3fff;
margin-top: 8px;
font-weight: 500;
display: -webkit-flex;
justify-content: space-between;
-webkit-justify-content: space-between;
margin: 0 0 0 23%;
.register {
color: #FDFDFD;
font-size: 15px;
}
.pwd-forgotten {
color: #FDFDFD;
font-size: 15px;
}
}
.submit {
opacity: 1;
background: #FDFDFD;
border-radius: 8px 0 0 8px;
height: 50px;
margin: 10% 0 6% 14%;
font-size:16px;
color: #000000;
background: #1d3fff;
border-radius: 4px;
width: 279px;
margin-top: 32px;
height: 49px;
font-size: 16px;
color: #fff;
display: flex;
display: -webkit-flex;
justify-content: center;
......@@ -215,8 +248,8 @@ export default {
&.activated {
opacity: 0.8;
-webkit-transform: scale(1, 1);
transform: scale(1, 1)
}
transform: scale(1, 1);
}
}
}
</style>
......@@ -46,7 +46,7 @@
</template>
<script>
var CryptoJS = require('crypto-js')
var CryptoJS = require('crypto-js')
export default {
data () {
return {
......@@ -167,7 +167,7 @@ export default {
let md5passwprd = CryptoJS.MD5(vm.user_password).toString().toUpperCase()
let params = {
phone: vm.phone_number,
password: md5passwprd
password: md5passwprd,
}
hlsHttp.post(url, params).then(function (res) {
if (res.result === 'S') {
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment