|
@@ -0,0 +1,134 @@
|
|
|
+<!--
|
|
|
+ * @Author: wjc
|
|
|
+ * @Date: 2024-06-06 14:51:25
|
|
|
+ * @LastEditors: wjc
|
|
|
+ * @LastEditTime: 2024-06-11 17:33:05
|
|
|
+ * @Description:
|
|
|
+-->
|
|
|
+<template>
|
|
|
+ <view class="login-container">
|
|
|
+ <view class="header">
|
|
|
+ <image :src="logo" class="logo"></image>
|
|
|
+ <view class="title">欢迎登录绘管家</view>
|
|
|
+ <view class="desc">可使用企业号、账号密码登录</view>
|
|
|
+ </view>
|
|
|
+ <view class="form">
|
|
|
+ <up-form ref="formRef" :model="formState" :rules="rules" error-type="toast">
|
|
|
+ <up-form-item prop="entCode">
|
|
|
+ <up-input v-model="formState.entCode" border="none" placeholder="请输入企业号"></up-input>
|
|
|
+ </up-form-item>
|
|
|
+ <up-form-item prop="account">
|
|
|
+ <up-input v-model="formState.account" border="none" placeholder="请输入账号"></up-input>
|
|
|
+ </up-form-item>
|
|
|
+ <up-form-item prop="password">
|
|
|
+ <up-input
|
|
|
+ v-model="formState.password"
|
|
|
+ border="none"
|
|
|
+ type="password"
|
|
|
+ placeholder="请输入密码"
|
|
|
+ ></up-input>
|
|
|
+ </up-form-item>
|
|
|
+ </up-form>
|
|
|
+ <view class="flex items-center color-gray text-14px mt-24px mb-24px">
|
|
|
+ <up-checkbox
|
|
|
+ shape="circle"
|
|
|
+ name="isCheck"
|
|
|
+ :checked="formState.isCheck"
|
|
|
+ label="我已阅读同意"
|
|
|
+ :label-size="14"
|
|
|
+ ></up-checkbox>
|
|
|
+ <text class="font-500 color-black" @click="goPrivacy">《绘管家个人信息保护政策》</text>
|
|
|
+ </view>
|
|
|
+ <up-button type="primary" class="btn-primary" @click="onSubmit">登录</up-button>
|
|
|
+ </view>
|
|
|
+ <view class="footer">
|
|
|
+ <view>绘管家</view>
|
|
|
+ <view>2016-{{ new Date().getFullYear() }} Ⓒ 海南智慧城科技有限公司</view>
|
|
|
+ <view>琼ICP备18001846号-4A</view>
|
|
|
+ </view>
|
|
|
+ <PrivacyModal></PrivacyModal>
|
|
|
+ </view>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup lang="ts">
|
|
|
+ import logo from '@/static/images/logo.png'
|
|
|
+ import PrivacyModal from './components/privacy.vue'
|
|
|
+
|
|
|
+ defineOptions({ name: 'Login' })
|
|
|
+
|
|
|
+ const formRef = ref(null)
|
|
|
+ const formState = ref({
|
|
|
+ entCode: '',
|
|
|
+ account: '',
|
|
|
+ password: undefined,
|
|
|
+ isCheck: false,
|
|
|
+ })
|
|
|
+ const rules = ref({
|
|
|
+ entCode: {
|
|
|
+ type: 'number',
|
|
|
+ required: true,
|
|
|
+ message: '请输入企业号',
|
|
|
+ trigger: ['blur', 'change'],
|
|
|
+ },
|
|
|
+ account: {
|
|
|
+ type: 'number',
|
|
|
+ required: true,
|
|
|
+ message: '请输入账号',
|
|
|
+ trigger: ['blur', 'change'],
|
|
|
+ },
|
|
|
+ password: {
|
|
|
+ type: 'number',
|
|
|
+ required: true,
|
|
|
+ message: '请输入密码',
|
|
|
+ trigger: ['blur', 'change'],
|
|
|
+ },
|
|
|
+ })
|
|
|
+
|
|
|
+ const goPrivacy = () => {
|
|
|
+ uni.navigateTo({ url: '/pages/privacy/index' })
|
|
|
+ }
|
|
|
+ const onSubmit = () => {
|
|
|
+ formRef.value
|
|
|
+ .validate()
|
|
|
+ .then((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ console.log(124)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ // 处理验证错误
|
|
|
+ })
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped lang="scss">
|
|
|
+ .login-container {
|
|
|
+ @apply h-full p-24px;
|
|
|
+ background: url('@/static/images/login/bg.png') no-repeat;
|
|
|
+ background-size: contain;
|
|
|
+ .header {
|
|
|
+ @apply mt-140px;
|
|
|
+ .logo {
|
|
|
+ @apply wh-60px;
|
|
|
+ }
|
|
|
+ .title {
|
|
|
+ @apply text-30px mt-20px mb-10px;
|
|
|
+ }
|
|
|
+ .desc {
|
|
|
+ @apply text-16px color-gray;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .form {
|
|
|
+ @apply my-24px;
|
|
|
+ .u-form {
|
|
|
+ @apply flex flex-col gap-18px;
|
|
|
+ .u-form-item {
|
|
|
+ @apply bg-bg-page rounded-20px px-16px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .footer {
|
|
|
+ @apply text-12px text-center color-gray;
|
|
|
+ }
|
|
|
+ }
|
|
|
+</style>
|