Commit 374efdff authored by 胡's avatar

fix: 登录问题(极光推送问题)

parent e7fc4ea9
......@@ -11,5 +11,5 @@ module.exports = {
ocrPath:'"http://180.104.121.66:8088/r/api"',
fileUploadSvcPath:'"http://180.104.121.66:8088/r/api/app/fileUploadSvc?sysName=XCMG_UAT&apiName="',
appId: '"com.xcmg.app.dev"',
currentVersion: '"3.4.8"'
currentVersion: '"3.5.0"'
}
<template>
<scroll id="login">
<h-content id="login">
<transition name="trans">
<div v-show="downNum" class="modal-show">
<div class="down">
......@@ -11,27 +11,27 @@
</div>
</div>
</transition>
<div class="bird-icon" />
<div class="bird-icon"/>
<div class="login-wrap">
<img class="title" src="../assets/login/right-title.png" >
<img class="title" src="../assets/login/right-title.png">
<div class="pwd">
<div class="pwd-input">
<input
id="userInput" v-model.trim="username" class="user" type="text"
placeholder="请输入用户名/手机号" >
id="userInput" v-model="username" class="user" type="text"
placeholder="请输入用户名/手机号">
</div>
<div v-if="username" class="delete" @click="clearAccount">
<img src="../assets/login/login-delete.png" >
<img src="../assets/login/login-delete.png">
</div>
</div>
<div class="pwd">
<div class="pwd-input">
<input
id="passwordInput" v-model="password" :type="pwdType" placeholder="请输入密码"
oninput="value=value.replace(/[^\w\.\&\/\|\,\\_\-\+\=\[\]\{\}\'\^\%\$\@\!\~\`\*\《\》\<\>\/\;\:\,\,\。\【\】\?\?\、\;\:\‘\“\(\#)]/i,'')" >
oninput="value=value.replace(/[^\w\.\&\/\|\,\\_\-\+\=\[\]\{\}\'\^\%\$\@\!\~\`\*\《\》\<\>\/\;\:\,\,\。\【\】\?\?\、\;\:\‘\“\(\#)]/i,'')">
</div>
<div v-if="password" class="delete" @click="changeType">
<img :src="openEye" >
<img :src="openEye">
</div>
</div>
<div class="other-function">
......@@ -44,7 +44,7 @@
</div>
</div>
</scroll>
</h-content>
</template>
<script>
var CryptoJS = require('crypto-js')
......@@ -103,9 +103,13 @@ export default {
},
methods: {
async goHome () {
this.hlsPopup.showLoading('请稍等')
let flag = await this.getAccessToken()
this.hlsPopup.hideLoading()
if (flag) {
this.$router.push('tab')
this.$router.push({
name: 'HomePage',
})
}
},
changeType () {
......@@ -137,16 +141,23 @@ export default {
vm.hlsHttp.post(url, param).then(function (res) {
if (res.result === 'S' && res.info.login_flag === 'Y') {
vm.hlsPopup.hideLoading()
vm.updateVersion() // 版本更新
// vm.updateVersion() // 版本更新
window.localStorage.setItem('user_phone', isNaN(parseInt(vm.username)) ? '11111111111': vm.username)
window.localStorage.setItem('password', md5passwprd)
window.localStorage.setItem('user_phone', vm.username)
window.localStorage.setItem('app_user_id', res.info.app_user_id)
// vm.$router.push('tab')
// vm.$router.push({
// name: 'HomePage',
// })
vm.$router.push('/choose-user');
window.localStorage.setItem('app_user_id', res.info.app_user_id)
let tagOption = {
'username': vm.username,
'username': isNaN(parseInt(vm.username)) ? '11111111111': vm.username
}
vm.Jpush._jpush_config(tagOption)
vm.Jpush._jpush_config(tagOption);
} else {
hlsPopup.hideLoading()
hlsPopup.showLongCenter(res.message)
......@@ -306,11 +317,13 @@ export default {
.trans-leave-active {
transition: opacity 0.5s;
}
.trans-enter,
.trans-leave-active {
opacity: 0;
}
#login {
#login {
background: url("../assets/login/back.png") no-repeat;
background-size: 100% 100%;
background-position-x: 0px;
......@@ -318,11 +331,13 @@ export default {
width: 100%;
height: 100%;
margin: 0 auto;
.scrollContent {
display: flex;
justify-content: center;
align-items: center;
}
.modal-show {
width: 100%;
height: 100%;
......@@ -332,16 +347,18 @@ export default {
background-color: rgba(56, 63, 69, 0.3);
justify-content: center;
align-items: center;
.policy{
width:80%;
height:90%;
margin:0 auto;
.policy {
width: 80%;
height: 90%;
margin: 0 auto;
display: flex;
justify-content: center;
flex-direction: column;
flex-wrap: wrap;
align-items: center;
}
.down {
position: relative;
width: 301px;
......@@ -353,6 +370,7 @@ export default {
background-size: 301px 24.7px;
background-color: #fff;
border-radius: 8px;
p {
font-family: PingFangSC-Semibold;
font-size: 16px;
......@@ -360,6 +378,7 @@ export default {
margin-top: 16px;
flex: 2;
}
span {
font-family: PingFangSC-Regular;
font-size: 14px;
......@@ -370,6 +389,7 @@ export default {
letter-spacing: 0;
// margin-top: 6px;
}
button {
width: 159px;
flex: 2;
......@@ -383,11 +403,13 @@ export default {
}
}
}
.bird-icon {
padding-top: 30%;
background: url("../assets/login/right.png") 90% no-repeat;
background-size: 51px 25px;
}
.login-wrap {
width: 87%;
height: 355px;
......@@ -397,37 +419,45 @@ export default {
// margin-top: 15%;
margin-top: 6%;
padding: 32px 24px;
.title {
width: 227px;
height: 71px;
margin-left: -10px;
}
}
.pwd {
position: relative;
width: 279px;
margin: 0 auto;
display: flex;
display: -webkit-flex;
.pwd-icon {
margin-top: 2px;
margin-right: 6px;
margin-left: 4px;
img {
width: 18px;
height: 20px;
}
}
.pwd-input {
width: 100%;
.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%;
text-indent: 30px;
......@@ -440,23 +470,27 @@ export default {
align-items: center;
border-bottom: 1px solid rgba(42, 42, 42, 0.4);
margin-top: 30px;
border-top:1px solid #FFF;
border-top: 1px solid #FFF;
border-left: 1px solid #FFF;
border-right: 1px solid #FFF;
}
input:focus {
border-bottom: 1px solid #1d3fff;
}
input::-webkit-input-placeholder {
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;
......@@ -465,6 +499,7 @@ export default {
}
}
}
.other-function {
width: 279px;
margin: 0 auto;
......@@ -478,10 +513,12 @@ export default {
justify-content: space-between;
-webkit-justify-content: space-between;
}
.both-button{
.both-button {
display: flex;
justify-content: space-around;
}
.submit {
background: #1d3fff;
border-radius: 4px;
......@@ -496,49 +533,55 @@ export default {
-webkit-justify-content: center;
align-items: center;
-webkit-align-items: center;
&.activated {
opacity: 0.8;
-webkit-transform: scale(1, 1);
transform: scale(1, 1);
}
}
}
.platform-ios {
}
.platform-ios {
#login {
.pwd-input{
input{
.pwd-input {
input {
line-height: 20px;
}
}
}
}
@media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) {
}
@media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) {
.platform-ios {
#login {
.pwd-input{
input{
.pwd-input {
input {
line-height: 20px;
}
}
.login-wrap{
margin-top:20%
.login-wrap {
margin-top: 20%
}
}
}
}
// iPhoneXR适配
@media (device-width: 414px) and (device-height: 896px) {
}
// iPhoneXR适配
@media (device-width: 414px) and (device-height: 896px) {
.platform-ios {
#login {
.pwd-input{
input{
.pwd-input {
input {
line-height: 20px;
}
}
.login-wrap{
margin-top:20%
.login-wrap {
margin-top: 20%
}
}
}
}
}
</style>
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