1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <template>
- <view>
- <u-navbar back-text="返回" @leftClick="navbackHandler" class="top-navbar" :background="{'background':'transparent'}"></u-navbar>
- <view class="login-logo">
- <u-image width="120rpx" height="120rpx" src="../../static/img/logo.png" border-radius="20"></u-image>
- <h3>停车场管理端</h3>
- </view>
- <view class="tip">{{tiptxt}}</view>
- </view>
- </template>
- <script>
- import * as api from '@/apis/login.js'
- import app from '@/utils/app.js'
-
- export default {
- data() {
- return {
- tiptxt:'正在进入系统...'
- }
- },
- onLoad() {
- this.login(app.getURLParams())
- },
- methods: {
- login(param){
- api.login3(param).then(resp=>{
- if(!resp.success){
- this.tiptxt=resp.msg || '登录失败'
- return
- }
- app.addSetting(resp.data);
- uni.switchTab({
- url: '../index/index'
- })
- }).catch(err=>{
- console.log(err)
- this.tiptxt='登录出现错误'
- }).finally(()=>{
- if(this.tiptxt=='正在进入系统...'){
- this.tiptxt=''
- }
- })
- },
- navbackHandler(){
- console.log('navbackHandler')
- return false
- }
-
- }
- }
- </script>
- <style>
- page{
- background: url(../../static/img/bgbg.png) no-repeat;
- background-size: 100%;
- }
- </style>
- <style lang="scss" scoped>
- .login-logo{
- display: flex;
- flex-direction: column;
- align-items: center;
- padding-top: 20%;
- h3{
- margin:15px 0;
- }
- }
- .tip{
- margin:100rpx 0rpx;
- padding:30rpx;
- text-align: center;
- font-size: 32rpx;
- color:#333;
- }
- </style>
|