From 69a1b3bf45738f048361ee4ccb6bdc64fce35720 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期三, 12 三月 2025 11:31:46 +0800
Subject: [PATCH] 更新
---
h5/pages/meeting/login/login.vue | 173 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 173 insertions(+), 0 deletions(-)
diff --git a/h5/pages/meeting/login/login.vue b/h5/pages/meeting/login/login.vue
new file mode 100644
index 0000000..098af3d
--- /dev/null
+++ b/h5/pages/meeting/login/login.vue
@@ -0,0 +1,173 @@
+<template>
+ <view class="login">
+ <!-- 澶撮儴鑳屾櫙鍥剧墖 -->
+ <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"
+ />
+ </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>
+ </view>
+ <view class="login_box_sub" @click="login">鐧诲綍</view>
+ </view>
+
+ <u-toast ref="uToast"></u-toast>
+ </view>
+</template>
+
+<script>
+import { mapState, mapMutations } from 'vuex'
+
+export default {
+ data() {
+ return {
+ backgroundImage: 'https://dmtest.ahapp.net/file/projects/20230511/13f256b832db4a4fadc5e6770f5727bf.png',
+ from: {
+ account: '',
+ password: ''
+ },
+ isOpen: false
+ }
+ },
+ computed: {
+ ...mapState(['statusbarHeight', 'navHeight']),
+
+ height() {
+ return `${this.statusbarHeight + this.navHeight}px`
+ }
+ },
+ methods: {
+ ...mapMutations(["setToken", "setUserInfo"]),
+
+ login() {
+ if (!this.from.account) return this.$refs.uToast.show({ message: '璐﹀彿涓嶈兘涓虹┖' })
+ if (!this.from.password) return this.$refs.uToast.show({ message: '瀵嗙爜涓嶈兘涓虹┖' })
+ var that = this
+ that.$u.api.ordinaryLogin(that.from)
+ .then(res => {
+ if (res.code === 200) {
+ that.setToken(res.data.token)
+ that.setUserInfo(res.data.userResponse)
+ uni.login({
+ provider: 'MP-WEIXIN',
+ success: function (loginRes) {
+ that.$u.api.wxEmpower({ code: loginRes.code })
+ .then(resa => {
+ uni.switchTab({
+ url: '/pages/index/index'
+ })
+ })
+ }
+ })
+ }
+ })
+ }
+ }
+}
+</script>
+
+<style>
+page {
+ background-color: #fff !important;
+}
+</style>
+
+<style lang="scss">
+.login {
+ width: 100%;
+ .login_head {
+ width: 100%;
+ background-repeat: no-repeat;
+ background-size: 100%;
+ }
+ .login_box {
+ width: 100%;
+ position: relative;
+ top: -114rpx;
+ padding: 80rpx 60rpx;
+ box-sizing: border-box;
+ background-color: #ffffff;
+ border-radius: 48rpx 48rpx 0rpx 0rpx;
+ .login_box_input {
+ width: 100%;
+ height: 100rpx;
+ display: flex;
+ align-items: center;
+ background: #f7f7f7;
+ border-radius: 4rpx;
+ margin-bottom: 40rpx;
+ padding: 0 40rpx;
+ box-sizing: border-box;
+ .placeholder {
+ font-size: 30rpx;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #999999;
+ }
+ input {
+ width: 100%;
+ height: 100%;
+ font-size: 30rpx;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #000000;
+ margin-right: 20rpx;
+ }
+ }
+ .login_box_sub {
+ width: 100%;
+ height: 100rpx;
+ line-height: 100rpx;
+ text-align: center;
+ background: #0055ff;
+ border-radius: 4rpx;
+ font-size: 32rpx;
+ font-family: PingFangSC-Medium, PingFang SC;
+ font-weight: 600;
+ color: #ffffff;
+ margin-top: 60rpx;
+ }
+ }
+}
+</style>
--
Gitblit v1.9.3