|
@@ -4,14 +4,42 @@
|
|
<el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
|
|
<el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
|
|
<el-col :span="24" class="one">
|
|
<el-col :span="24" class="one">
|
|
<div class="loginform">
|
|
<div class="loginform">
|
|
- <el-col :span="24" class="content">
|
|
|
|
- <User></User>
|
|
|
|
|
|
+ <el-col :span="24" class="content_1">
|
|
|
|
+ <div class="type-list">
|
|
|
|
+ <el-tooltip
|
|
|
|
+ v-for="(item, index) in typeList"
|
|
|
|
+ :key="index"
|
|
|
|
+ effect="dark"
|
|
|
|
+ :content="item.remark"
|
|
|
|
+ placement="top"
|
|
|
|
+ >
|
|
|
|
+ <span
|
|
|
|
+ class="span"
|
|
|
|
+ :class="[item.value === type ? 'active' : '']"
|
|
|
|
+ @click="toSelect(item.value)"
|
|
|
|
+ >{{ item.label }}</span
|
|
|
|
+ >
|
|
|
|
+ </el-tooltip>
|
|
|
|
+ </div>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="24" class="content_2">
|
|
|
|
+ <user v-if="type == '0'"></user>
|
|
|
|
+ <expert v-if="type == '1'"></expert>
|
|
|
|
+ <company v-if="type == '2'"></company>
|
|
|
|
+ <Incubator v-if="type == '3'"></Incubator>
|
|
|
|
+ <competition v-if="type == '4'"></competition>
|
|
|
|
+ <Investment v-if="type == '5'"></Investment>
|
|
|
|
+ <association v-if="type == '6'"></association>
|
|
|
|
+ <state v-if="type == '7'"></state>
|
|
|
|
+ <unit v-if="type == '8'"></unit>
|
|
</el-col>
|
|
</el-col>
|
|
</div>
|
|
</div>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
- <el-dialog v-model="dialog" title="使用协议">使用协议</el-dialog>
|
|
|
|
|
|
+ <el-dialog v-model="dialog" title="使用协议">
|
|
|
|
+ <div v-html="configInfo.agreement"></div>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script setup>
|
|
<script setup>
|
|
@@ -21,44 +49,29 @@ import { cloneDeep } from 'lodash-es'
|
|
// 接口
|
|
// 接口
|
|
import { UserStore } from '@/store/api/user/user'
|
|
import { UserStore } from '@/store/api/user/user'
|
|
import { DictDataStore } from '@/store/api/system/dictData'
|
|
import { DictDataStore } from '@/store/api/system/dictData'
|
|
|
|
+import { DesignStore } from '@/store/api/platform/design'
|
|
const store = UserStore()
|
|
const store = UserStore()
|
|
const dictDataStore = DictDataStore()
|
|
const dictDataStore = DictDataStore()
|
|
|
|
+const designStore = DesignStore()
|
|
// 组件
|
|
// 组件
|
|
-import User from './parts/user.vue'
|
|
|
|
|
|
+import user from './parts/user.vue'
|
|
|
|
+import association from './parts/association.vue'
|
|
|
|
+import company from './parts/company.vue'
|
|
|
|
+import competition from './parts/competition.vue'
|
|
|
|
+import expert from './parts/expert.vue'
|
|
|
|
+import Incubator from './parts/Incubator.vue'
|
|
|
|
+import state from './parts/state.vue'
|
|
|
|
+import unit from './parts/unit.vue'
|
|
|
|
+import Investment from './parts/Investment.vue'
|
|
// 路由
|
|
// 路由
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
// 加载中
|
|
// 加载中
|
|
const loading = ref(false)
|
|
const loading = ref(false)
|
|
const form = ref({ role: ['user'] })
|
|
const form = ref({ role: ['user'] })
|
|
const dialog = ref(false)
|
|
const dialog = ref(false)
|
|
-const validatePhoneNumber = (rule, value, callback) => {
|
|
|
|
- const reg = /^1[3-9]\d{9}$/
|
|
|
|
- if (!value) {
|
|
|
|
- return callback(new Error('手机号不能为空'))
|
|
|
|
- }
|
|
|
|
- if (!reg.test(value)) {
|
|
|
|
- return callback(new Error('请输入正确的手机号'))
|
|
|
|
- }
|
|
|
|
- callback()
|
|
|
|
-}
|
|
|
|
-const validatePassword = (rule, value, callback) => {
|
|
|
|
- if (!value) {
|
|
|
|
- return callback(new Error('请输入确认密码'))
|
|
|
|
- }
|
|
|
|
- if (form.value.password !== value) {
|
|
|
|
- callback(new Error('两次输入的密码不一致'))
|
|
|
|
- } else {
|
|
|
|
- callback()
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-const rules = reactive({
|
|
|
|
- nick_name: [{ required: true, message: '请输入昵称', trigger: 'blur' }],
|
|
|
|
- gender: [{ required: true, message: '请选择性别', trigger: 'blur' }],
|
|
|
|
- phone: [{ required: true, validator: validatePhoneNumber, trigger: 'blur' }],
|
|
|
|
- account: [{ required: true, message: '请输入账号', trigger: 'blur' }],
|
|
|
|
- password: [{ required: true, message: '请输入密码', trigger: 'blur' }],
|
|
|
|
- refpassword: [{ required: true, validator: validatePassword, trigger: 'blur' }]
|
|
|
|
-})
|
|
|
|
|
|
+const configInfo = ref({})
|
|
|
|
+const typeList = ref([])
|
|
|
|
+const type = ref('0')
|
|
const isAgree = ref(false)
|
|
const isAgree = ref(false)
|
|
const genderList = ref(false)
|
|
const genderList = ref(false)
|
|
// 请求
|
|
// 请求
|
|
@@ -73,6 +86,12 @@ const searchOther = async () => {
|
|
// 性别
|
|
// 性别
|
|
result = await dictDataStore.query({ code: 'gender', is_use: '0' })
|
|
result = await dictDataStore.query({ code: 'gender', is_use: '0' })
|
|
if ($checkRes(result)) genderList.value = result.data
|
|
if ($checkRes(result)) genderList.value = result.data
|
|
|
|
+ // 用户类型
|
|
|
|
+ result = await dictDataStore.query({ code: 'userType', is_use: '0' })
|
|
|
|
+ if ($checkRes(result)) typeList.value = result.data
|
|
|
|
+ // 基础设置
|
|
|
|
+ result = await designStore.query({})
|
|
|
|
+ if ($checkRes(result)) configInfo.value = result.data[0] || {}
|
|
}
|
|
}
|
|
const search = async () => {
|
|
const search = async () => {
|
|
// let res: IQueryResult = await toolsAxios.dataCount();
|
|
// let res: IQueryResult = await toolsAxios.dataCount();
|
|
@@ -80,6 +99,10 @@ const search = async () => {
|
|
// info.value = res.data;
|
|
// info.value = res.data;
|
|
// }
|
|
// }
|
|
}
|
|
}
|
|
|
|
+// 选择用户类型
|
|
|
|
+const toSelect = async (data) => {
|
|
|
|
+ type.value = data
|
|
|
|
+}
|
|
// 注册
|
|
// 注册
|
|
const submitForm = async (formEl) => {
|
|
const submitForm = async (formEl) => {
|
|
if (!isAgree.value) {
|
|
if (!isAgree.value) {
|
|
@@ -118,7 +141,7 @@ const toBack = () => {
|
|
// provide
|
|
// provide
|
|
provide('siteInfo', siteInfo)
|
|
provide('siteInfo', siteInfo)
|
|
provide('form', form)
|
|
provide('form', form)
|
|
-provide('rules', rules)
|
|
|
|
|
|
+provide('dialog', dialog)
|
|
provide('isAgree', isAgree)
|
|
provide('isAgree', isAgree)
|
|
provide('genderList', genderList)
|
|
provide('genderList', genderList)
|
|
provide('submitForm', submitForm)
|
|
provide('submitForm', submitForm)
|
|
@@ -131,7 +154,7 @@ provide('toBack', toBack)
|
|
background-image: url(@/assets/loginbg.jpeg);
|
|
background-image: url(@/assets/loginbg.jpeg);
|
|
background-position: center center;
|
|
background-position: center center;
|
|
background-repeat: no-repeat;
|
|
background-repeat: no-repeat;
|
|
- height: calc(100vh - 22.6vh);
|
|
|
|
|
|
+ height: calc(100vh - 23vh);
|
|
width: 100%;
|
|
width: 100%;
|
|
background-size: cover;
|
|
background-size: cover;
|
|
display: flex;
|
|
display: flex;
|
|
@@ -142,95 +165,47 @@ provide('toBack', toBack)
|
|
position: absolute;
|
|
position: absolute;
|
|
top: 50%;
|
|
top: 50%;
|
|
left: 50%;
|
|
left: 50%;
|
|
- min-height: 460px;
|
|
|
|
|
|
+ min-height: 400px;
|
|
background: hsla(0, 0%, 100%, 0.6);
|
|
background: hsla(0, 0%, 100%, 0.6);
|
|
box-shadow: 0 0 30px 0 rgba(51, 51, 51, 0.2);
|
|
box-shadow: 0 0 30px 0 rgba(51, 51, 51, 0.2);
|
|
-webkit-transform: translate(-50%, -50%);
|
|
-webkit-transform: translate(-50%, -50%);
|
|
transform: translate(-50%, -50%);
|
|
transform: translate(-50%, -50%);
|
|
border-top: 10px solid #1492ff;
|
|
border-top: 10px solid #1492ff;
|
|
|
|
|
|
- .tab {
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
- justify-content: center;
|
|
|
|
-
|
|
|
|
- .title {
|
|
|
|
- text-align: center;
|
|
|
|
- margin: 0 20px;
|
|
|
|
- font-family: PingFangSC-Semibold !important;
|
|
|
|
- font-size: 15px;
|
|
|
|
- letter-spacing: -0.14px;
|
|
|
|
- line-height: 30px;
|
|
|
|
- font-weight: bold;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .tab0 {
|
|
|
|
- color: #1492ff;
|
|
|
|
- border-bottom: 2px solid;
|
|
|
|
- border-bottom-color: #1492ff;
|
|
|
|
- padding-bottom: 10px;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .tab1 {
|
|
|
|
- color: #333333;
|
|
|
|
- padding-bottom: 10px;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .content {
|
|
|
|
- margin: 30px 30px 0 30px;
|
|
|
|
- overflow-y: auto;
|
|
|
|
-
|
|
|
|
- .remark {
|
|
|
|
- display: flex;
|
|
|
|
- justify-content: space-between;
|
|
|
|
-
|
|
|
|
- span {
|
|
|
|
- cursor: pointer;
|
|
|
|
- font-family: PingFangSC-Regular;
|
|
|
|
- font-size: 14px;
|
|
|
|
- color: #333333;
|
|
|
|
- letter-spacing: -0.09px;
|
|
|
|
- text-align: right;
|
|
|
|
- line-height: 32px;
|
|
|
|
|
|
+ .content_1 {
|
|
|
|
+ text-align: center;
|
|
|
|
+ padding: 10px;
|
|
|
|
+ .type-list {
|
|
|
|
+ margin: 10px 0 0 0;
|
|
|
|
+ .span {
|
|
|
|
+ padding: 0 10px;
|
|
|
|
+ margin-left: 5px;
|
|
|
|
+ height: 26px;
|
|
|
|
+ line-height: 24px;
|
|
|
|
+ border: 1px solid #ddd;
|
|
|
|
+ border-radius: 3px;
|
|
|
|
+ background-color: #f4f4f4;
|
|
}
|
|
}
|
|
-
|
|
|
|
- span:hover {
|
|
|
|
- color: #2374ff;
|
|
|
|
|
|
+ .span:hover {
|
|
|
|
+ border-color: #3497fc;
|
|
|
|
+ background-color: #d2f1fe;
|
|
}
|
|
}
|
|
- }
|
|
|
|
-
|
|
|
|
- .button {
|
|
|
|
- padding: 10px 0;
|
|
|
|
-
|
|
|
|
- :deep(.el-button) {
|
|
|
|
- width: 100% !important;
|
|
|
|
- height: 44px !important;
|
|
|
|
- border: 0 !important;
|
|
|
|
- color: #f8f8f8 !important;
|
|
|
|
- font-size: 16px !important;
|
|
|
|
- text-align: center !important;
|
|
|
|
- line-height: 40px !important;
|
|
|
|
- cursor: pointer !important;
|
|
|
|
- font-family: PingFangSC-Regular !important;
|
|
|
|
- background-color: #1492ff !important;
|
|
|
|
|
|
+ .active {
|
|
|
|
+ border-color: #3497fc;
|
|
|
|
+ background-color: #d2f1fe;
|
|
|
|
+ background-image: url(@/assets/icon_2.png);
|
|
|
|
+ background-position: top right;
|
|
|
|
+ background-repeat: no-repeat;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ }
|
|
|
|
|
|
- .agree {
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
- padding: 0 0 40px 0;
|
|
|
|
- color: #999;
|
|
|
|
- font-size: 12px;
|
|
|
|
-
|
|
|
|
- span:last-child {
|
|
|
|
- color: #2374ff;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ .content_2 {
|
|
|
|
+ margin: 0 20px;
|
|
|
|
+ overflow-y: auto;
|
|
}
|
|
}
|
|
|
|
|
|
- .content::-webkit-scrollbar {
|
|
|
|
|
|
+ .content_2::-webkit-scrollbar {
|
|
display: none;
|
|
display: none;
|
|
}
|
|
}
|
|
}
|
|
}
|