Commit 374efdff authored by 胡's avatar

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

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