| | |
| | | } |
| | | }, |
| | | { |
| | | path: "/registernav", |
| | | name: "RegisterNav", |
| | | component: () => import("@/views/register/registernav.vue"), |
| | | meta: { |
| | | title: "注册向导", |
| | | showLink: false, |
| | | rank: 103 |
| | | } |
| | | }, |
| | | { |
| | | path: "/redirect", |
| | | component: Layout, |
| | | meta: { |
New file |
| | |
| | | // 修改element-plus主题色 |
| | | @forward "element-plus/theme-chalk/src/common/var.scss" with ( |
| | | $colors: ( |
| | | "primary": ( |
| | | "base": #007d7b, |
| | | ), |
| | | ), |
| | | |
| | | $button-padding-horizontal: ( |
| | | // "default": 80px |
| | | ) |
| | | ); |
| | | |
| | | |
| | |
| | | --pure-theme-sidebar-logo: none; |
| | | --pure-theme-menu-title-hover: initial; |
| | | --pure-theme-menu-active-before: transparent; |
| | | --el-color-primary: #0F5FD2; |
| | | } |
| | | $--color-primary: #0F5FD2; // 蓝色 |
| | | |
| | | /* 灰色模式 */ |
| | | .html-grey { |
| | |
| | | /* 色弱模式 */ |
| | | .html-weakness { |
| | | filter: invert(80%); |
| | | } |
| | | } |
| | |
| | | .login-form h2 { |
| | | text-transform: uppercase; |
| | | margin: 15px 0; |
| | | color: #999; |
| | | color: var(--el-color-primary); |
| | | font: |
| | | bold 200% Consolas, |
| | | Monaco, |
| | |
| | | v-if="state.rolesCode.indexOf(item.code) !== -1" |
| | | :underline="false" |
| | | class="hover:cursor-pointer" |
| | | @click="toRegister" |
| | | @click="logOut" |
| | | >退出</el-link |
| | | > |
| | | <el-link |
| | | v-else-if="!state.accessToken" |
| | | :underline="false" |
| | | class="hover:cursor-pointer" |
| | | @click="toRegister" |
| | | >注册</el-link |
| | | > |
| | | <el-link |
| | | v-else |
| | | :underline="false" |
| | | class="hover:cursor-pointer" |
| | | @click="toRegister" |
| | | @click="toApply" |
| | | >申请</el-link |
| | | ><span class="m-2">|</span> |
| | | <el-link |
| | | v-if="state.rolesCode.indexOf(item.code) !== -1" |
| | | :underline="false" |
| | | class="hover:cursor-pointer" |
| | | @click="toWelcome" |
| | | @click="toWelcome(item)" |
| | | >进入</el-link |
| | | > |
| | | <el-link |
| | | v-else |
| | | :underline="false" |
| | | class="hover:cursor-pointer" |
| | | :disabled="state.accessToken" |
| | | @click="toLogin" |
| | | :disabled="!!state.accessToken" |
| | | @click="toLogin(item)" |
| | | >登录</el-link |
| | | > |
| | | </div> |
| | |
| | | |
| | | import { getToken } from "@/utils/auth"; |
| | | import { useRoute, useRouter } from "vue-router"; |
| | | const router = useRouter(); |
| | | |
| | | defineOptions({ |
| | | name: "Main" |
| | | }); |
| | |
| | | /** 角色(如果昵称为空则显示用户名) */ |
| | | const getUseRoles = () => { |
| | | state.userInfo = storageLocal().getItem("user-info"); |
| | | state.userInfo.exRoles.forEach(element => { |
| | | state.userInfo?.exRoles.forEach(element => { |
| | | state.rolesCode.push(element.code); |
| | | }); |
| | | }; |
| | |
| | | state.roleList = res.result; |
| | | }); |
| | | getUseRoles(); |
| | | state.accessToken = getToken().accessToken; |
| | | state.accessToken = getToken()?.accessToken; |
| | | }); |
| | | |
| | | const router = useRouter(); |
| | | const toRegister = () => { |
| | | router.push({ name: "Register" }); |
| | | }; |
| | | const toWelcome = () => { |
| | | router.push({ name: "Welcome" }); |
| | | // 退出 |
| | | const logOut = () => { |
| | | useUserStoreHook().logOut(); |
| | | }; |
| | | const toLogin = () => { |
| | | router.push({ name: "Login" }); |
| | | // 申请 |
| | | const toApply = () => {}; |
| | | // 去首页 |
| | | const toWelcome = item => { |
| | | let role = state.userInfo?.exRoles.find(ele => { |
| | | return item.code == ele.code; |
| | | }); |
| | | console.log(role); |
| | | if (role.hasFlsh) { |
| | | return router.push({ name: "Welcome" }); |
| | | } |
| | | router.push({ name: "RegisterNav" }); |
| | | }; |
| | | // 去登录 |
| | | const toLogin = item => { |
| | | router.push({ name: "Login", query: item }); |
| | | }; |
| | | </script> |
| | | |
| | |
| | | hideTenantForLogin: false, |
| | | expirySeconds: 60, // 验证码过期时间 |
| | | phoneSeconds: 0, // 手机验证码倒计时 |
| | | roleList: [] |
| | | roleList: [], |
| | | nowRole: {} |
| | | }); |
| | | // 验证码过期计时器 |
| | | let timer: any = null; |
| | |
| | | // 页面初始化 |
| | | onMounted(async () => { |
| | | // 若URL带有Token参数(第三方登录) |
| | | const accessToken = route.query.token; |
| | | |
| | | // if (accessToken) await saveTokenAndInitRoutes(accessToken); |
| | | // watch( |
| | | // () => themeConfig.value.isLoaded, |
| | |
| | | getCaptcha(); |
| | | exRole().then(res => { |
| | | state.roleList = res.result; |
| | | const role = route.query; |
| | | if (role.code) { |
| | | state.nowRole = role; |
| | | } else { |
| | | state.nowRole = state.roleList[0]; |
| | | } |
| | | state.ruleForm.exRoleCode = state.nowRole?.code; |
| | | }); |
| | | // 注册验证码过期计时器 |
| | | // if (state.captchaEnabled) { |
| | |
| | | <div class="login-form"> |
| | | <!-- <avatar class="avatar" /> --> |
| | | <Motion> |
| | | <h2 class="outline-hidden">{{ title }}</h2> |
| | | <h2 class="logintitle">{{ state.nowRole.name }}登录</h2> |
| | | </Motion> |
| | | |
| | | <el-form |
| | |
| | | :rules="loginRules" |
| | | size="large" |
| | | > |
| | | <Motion :delay="150"> |
| | | <!-- <Motion :delay="150"> |
| | | <el-form-item prop="exRoleCode"> |
| | | <el-radio-group v-model="state.ruleForm.exRoleCode"> |
| | | <el-radio |
| | |
| | | > |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </Motion> |
| | | </Motion> --> |
| | | <Motion :delay="100"> |
| | | <el-form-item |
| | | :rules="[ |
| | |
| | | #suffix-span { |
| | | cursor: pointer; |
| | | } |
| | | .login-content-code { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-around; |
| | | position: relative; |
| | | |
| | | .login-content-code-img { |
| | | width: 100%; |
| | | height: 40px; |
| | | line-height: 40px; |
| | | background-color: #ffffff; |
| | | // /* border: 1px solid rgb(220, 223, 230); */ |
| | | cursor: pointer; |
| | | transition: all ease 0.2s; |
| | | border-radius: 4px; |
| | | user-select: none; |
| | | |
| | | &:hover { |
| | | border-color: #c0c4cc; |
| | | transition: all ease 0.2s; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .login-content-code-expired { |
| | | @extend .login-content-code; |
| | | &::before { |
| | | content: "验证码已过期"; |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | border-radius: 4px; |
| | | background-color: rgba(0, 0, 0, 0.5); |
| | | color: #ffffff; |
| | | text-align: center; |
| | | line-height: 40px; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | label: `${idx + 1}` |
| | | })); |
| | | </script> |
| | | |
| | | <style scoped> |
| | | @import url("@/style/login.css"); |
| | | </style> |
| | | <style lang="scss" scoped> |
| | | .content { |
| | | background-color: #f8f8f8; |
| | |
| | | background-color: rgba(0, 0, 0, 0.5); |
| | | color: #ffffff; |
| | | text-align: center; |
| | | line-height: 40px; |
| | | } |
| | | } |
| | | </style> |
New file |
| | |
| | | <template> |
| | | <div class="content"> |
| | | <div class="header"> |
| | | <div class="headimg"> |
| | | <img width="167px" height="44px" src="@/assets/home/logo.png" alt="" /> |
| | | </div> |
| | | </div> |
| | | <div class="center w-[70%] h-[584px] bg-white mx-auto m-12"> |
| | | <div class="flex items-center p-5 pl-6"> |
| | | <img src="@/assets/home/xian.png" alt="" /> |
| | | <span style="margin-left: 5px">注册向导</span> |
| | | </div> |
| | | <div class="w-[95%] border-1 border-[#E5E5E5] mx-auto pt-5 pb-2"> |
| | | <el-steps style="max-width: 100%" :active="active" align-center> |
| | | <el-step title="阅读注册协议" /> |
| | | <el-step title="填写基本信息" /> |
| | | <el-step title="信息登记完成" /> |
| | | </el-steps> |
| | | </div> |
| | | <div v-if="active == 0" class="h-[60%]"> |
| | | <div class="text-center pt-5 pb-1.5">注册条款</div> |
| | | <div |
| | | class="w-[95%] h-[82%] border-1 border-[#E5E5E5] mx-auto p-2 overflow-y-auto" |
| | | > |
| | | <h3>注册采购供应商应具备以下条件</h3> |
| | | </div> |
| | | </div> |
| | | <div v-else-if="active == 1" class="h-[60%]"> |
| | | <div class="text-center pt-5 pb-1.5">注册条款</div> |
| | | <div |
| | | class="w-[95%] h-[82%] border-1 border-[#E5E5E5] mx-auto p-2 overflow-y-auto" |
| | | > |
| | | <h3>注册采购供应商应具备以下条件</h3> |
| | | </div> |
| | | </div> |
| | | <div class="mx-auto pt-1 flex justify-center"> |
| | | <el-button :disabled="active == 0" @click="backStep">上一步</el-button> |
| | | <el-button type="primary" @click="nextStep">同意下一步</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <script setup> |
| | | import { h, ref } from "vue"; |
| | | defineOptions({ |
| | | name: "RegisterNav" |
| | | }); |
| | | let active = ref(0); |
| | | const nextStep = () => { |
| | | active.value++; |
| | | }; |
| | | const backStep = () => { |
| | | active.value--; |
| | | }; |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .content { |
| | | background-color: #f8f8f8; |
| | | width: 100%; |
| | | height: 100%; |
| | | .header { |
| | | display: flex; |
| | | align-items: center; |
| | | height: 80px; |
| | | width: 100%; |
| | | margin: 0 auto; |
| | | background-color: #fff; |
| | | .headimg { |
| | | width: 1200px; |
| | | margin: 0 auto; |
| | | } |
| | | } |
| | | :deep .el-step__icon { |
| | | font-size: 12px; |
| | | height: 20px; |
| | | width: 20px; |
| | | } |
| | | } |
| | | :deep .el-step__title { |
| | | font-size: 12px; |
| | | } |
| | | </style> |
| | |
| | | <img width="167px" height="44px" src="@/assets/home/logo.png" alt="" /> |
| | | </div> |
| | | </div> |
| | | <div class="center w-[70%] h-[584px] bg-white mx-auto mt-25"> |
| | | <el-button type="primary">马上登录</el-button> |
| | | <div class="center w-[70%] h-[584px] bg-white mx-auto mt-12"> |
| | | <div |
| | | class="w-[20%] mx-auto flex flex-wrap justify-center items-center pt-38" |
| | | > |
| | | <div> |
| | | <img |
| | | width="90px" |
| | | height="90px" |
| | | src="@/assets/home/success.png" |
| | | alt="" |
| | | /> |
| | | </div> |
| | | <div class="w-[100%] text-center font-550 m-4 text-3xl"> |
| | | 账号注册成功 |
| | | </div> |
| | | <div class="w-[100%] text-center font-bold m-4 mt-10 text-2xl"> |
| | | <el-button type="primary" class="w-[100%]" @click="toLogin" |
| | | >马上登录</el-button |
| | | > |
| | | </div> |
| | | <div |
| | | class="w-[100%] text-center text-[#0F5FD2] cursor-pointer" |
| | | @click="toIndex" |
| | | > |
| | | 完成注册,返回首页 |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <script setup> |
| | | import { useRoute, useRouter } from "vue-router"; |
| | | const router = useRouter(); |
| | | |
| | | defineOptions({ |
| | | name: "RegisterSucess" |
| | | }); |
| | | const toIndex = () => { |
| | | router.replace("Index"); |
| | | }; |
| | | // 去登录 |
| | | const toLogin = item => { |
| | | router.push({ name: "Login", query: item }); |
| | | }; |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .content { |
| | |
| | | } |
| | | }, |
| | | plugins: getPluginsList(VITE_CDN, VITE_COMPRESSION), |
| | | css: { |
| | | preprocessorOptions: { |
| | | scss: { |
| | | // 自动导入定制化样式进行文件覆盖 |
| | | additionalData: `@use "@/style/element-plus-new.scss" as *;` |
| | | } |
| | | } |
| | | }, |
| | | // https://cn.vitejs.dev/config/dep-optimization-options.html#dep-optimization-options |
| | | optimizeDeps: { |
| | | include, |