| | |
| | | <template> |
| | | <view class="login">
|
| | | <!-- 头部背景图片 --> |
| | | <view class="login_head"
|
| | | :style="{ height: 'calc(' + height + ' + ' + '388rpx)', backgroundImage: 'url(' + backgroundImage + ')' }"></view>
|
| | | <view
|
| | | class="login_head"
|
| | | :style="{
|
| | | height: 'calc(' + height + ' + ' + '388rpx)',
|
| | | backgroundImage: 'url(' + backgroundImage + ')',
|
| | | }"
|
| | | ></view>
|
| | |
|
| | | <!-- 登录框 -->
|
| | | <view class="login_box">
|
| | | <view class="login_box_input">
|
| | | <input type="text" v-model="from.account" placeholder="请输入账号名称" placeholder-class="placeholder" />
|
| | | <input
|
| | | type="text"
|
| | | v-model="from.account"
|
| | | placeholder="请输入账号名称"
|
| | | placeholder-class="placeholder"
|
| | | />
|
| | | </view>
|
| | | <view class="login_box_input">
|
| | | <input type="password" v-if="!isOpen" v-model="from.password" placeholder="请输入密码" placeholder-class="placeholder" />
|
| | | <input type="text" v-else v-model="from.password" placeholder="请输入密码" placeholder-class="placeholder" />
|
| | | <u-icon name="eye-fill" color="#999999" size="20" v-if="!isOpen" @click="isOpen = true"></u-icon>
|
| | | <u-icon name="eye-off" color="#999999" size="20" v-else @click="isOpen = false"></u-icon>
|
| | | <input
|
| | | type="password"
|
| | | v-if="!isOpen"
|
| | | v-model="from.password"
|
| | | placeholder="请输入密码"
|
| | | placeholder-class="placeholder"
|
| | | />
|
| | | <input
|
| | | type="text"
|
| | | v-else
|
| | | v-model="from.password"
|
| | | placeholder="请输入密码"
|
| | | placeholder-class="placeholder"
|
| | | />
|
| | | <u-icon
|
| | | name="eye-fill"
|
| | | color="#999999"
|
| | | size="20"
|
| | | v-if="!isOpen"
|
| | | @click="isOpen = true"
|
| | | ></u-icon>
|
| | | <u-icon
|
| | | name="eye-off"
|
| | | color="#999999"
|
| | | size="20"
|
| | | v-else
|
| | | @click="isOpen = false"
|
| | | ></u-icon>
|
| | | </view>
|
| | | <view class="login_box_sub" @click="login">登录</view>
|
| | | </view>
|
| | |
| | | password: ''
|
| | | },
|
| | | isOpen: false |
| | | }; |
| | | }
|
| | | },
|
| | | computed: {
|
| | | ...mapState(['statusbarHeight', 'navHeight']),
|
| | |
|
| | | height() {
|
| | | return `${this.statusbarHeight + this.navHeight}px`;
|
| | | return `${this.statusbarHeight + this.navHeight}px`
|
| | | }
|
| | | },
|
| | | methods: {
|
| | |
| | | .then(resa => {
|
| | | uni.switchTab({
|
| | | url: '/pages/index/index'
|
| | | });
|
| | | })
|
| | | })
|
| | | }
|
| | | });
|
| | | })
|
| | | }
|
| | | })
|
| | | }
|
| | |
| | | height: 100rpx;
|
| | | display: flex;
|
| | | align-items: center;
|
| | | background: #F7F7F7;
|
| | | background: #f7f7f7;
|
| | | border-radius: 4rpx;
|
| | | margin-bottom: 40rpx;
|
| | | padding: 0 40rpx;
|
| | |
| | | height: 100rpx;
|
| | | line-height: 100rpx;
|
| | | text-align: center;
|
| | | background: #0055FF;
|
| | | background: #0055ff;
|
| | | border-radius: 4rpx;
|
| | | font-size: 32rpx;
|
| | | font-family: PingFangSC-Medium, PingFang SC;
|
| | | font-weight: 500;
|
| | | color: #FFFFFF;
|
| | | font-weight: 600;
|
| | | color: #ffffff;
|
| | | margin-top: 60rpx;
|
| | | }
|
| | | }
|