配置
This commit is contained in:
parent
2660dbf9e1
commit
e5a15b0330
@ -2,4 +2,4 @@
|
|||||||
NODE_ENV = "production"
|
NODE_ENV = "production"
|
||||||
|
|
||||||
# 线上环境接口地址(easymock)
|
# 线上环境接口地址(easymock)
|
||||||
VITE_API_URL = "https://mock.mengxuegu.com/mock/629d727e6163854a32e8307e"
|
VITE_API_URL = "http://139.9.66.234:6688"
|
||||||
|
|||||||
@ -99,6 +99,7 @@
|
|||||||
dot.forEach(item => (item.style.background = color));
|
dot.forEach(item => (item.style.background = color));
|
||||||
if (isDark) html.style.background = "#141414";
|
if (isDark) html.style.background = "#141414";
|
||||||
}
|
}
|
||||||
|
window.http = "http://139.9.66.234:6688";
|
||||||
</script>
|
</script>
|
||||||
<script type="module" src="/src/main.ts"></script>
|
<script type="module" src="/src/main.ts"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
"serve": "vite",
|
"serve": "vite",
|
||||||
"build:dev": "vue-tsc --noEmit && vite build --mode development",
|
"build:dev": "vue-tsc --noEmit && vite build --mode development",
|
||||||
"build:test": "vue-tsc --noEmit && vite build --mode test",
|
"build:test": "vue-tsc --noEmit && vite build --mode test",
|
||||||
"build:pro": "vue-tsc --noEmit && vite build --mode production",
|
"build:pro": "vite build --mode production",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"lint:eslint": "eslint --fix --ext .js,.ts,.vue ./src",
|
"lint:eslint": "eslint --fix --ext .js,.ts,.vue ./src",
|
||||||
"lint:prettier": "prettier --write --loglevel warn \"src/**/*.{js,ts,json,tsx,css,less,scss,vue,html,md}\"",
|
"lint:prettier": "prettier --write --loglevel warn \"src/**/*.{js,ts,json,tsx,css,less,scss,vue,html,md}\"",
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
// * 后端微服务端口名
|
// * 后端微服务端口名
|
||||||
export const PORT1 = "http://192.168.34.122:6688";
|
export const PORT1 = "http://192.168.34.122:6688";
|
||||||
export const PORT2 = "http://192.168.34.122:6688";
|
export const PORT2 = "http://139.9.66.234:6688";
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import router from "@/routers";
|
|||||||
const config = {
|
const config = {
|
||||||
// 默认地址请求地址,可在 .env.*** 文件中修改
|
// 默认地址请求地址,可在 .env.*** 文件中修改
|
||||||
baseURL: import.meta.env.VITE_API_URL as string,
|
baseURL: import.meta.env.VITE_API_URL as string,
|
||||||
|
// baseURL: import.meta.env.NODE_ENV=='development' ?'/api' : window.http,
|
||||||
// 设置超时时间(10s)
|
// 设置超时时间(10s)
|
||||||
timeout: ResultEnum.TIMEOUT as number,
|
timeout: ResultEnum.TIMEOUT as number,
|
||||||
// 跨域时候允许携带凭证
|
// 跨域时候允许携带凭证
|
||||||
|
|||||||
BIN
src/assets/images/login/loginImg.jpg
Normal file
BIN
src/assets/images/login/loginImg.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 108 KiB |
@ -6,11 +6,13 @@ export const HOME_URL: string = "/government";
|
|||||||
// * 登录页地址(默认)
|
// * 登录页地址(默认)
|
||||||
export const LOGIN_URL: string = "/login";
|
export const LOGIN_URL: string = "/login";
|
||||||
|
|
||||||
|
// export const PROJECT_URL: string = "/projectlogon";
|
||||||
|
|
||||||
// * 默认主题颜色
|
// * 默认主题颜色
|
||||||
export const DEFAULT_PRIMARY: string = "#008BFF";
|
export const DEFAULT_PRIMARY: string = "#008BFF";
|
||||||
|
|
||||||
// * 路由白名单地址(必须是本地存在的路由 staticRouter.ts)
|
// * 路由白名单地址(必须是本地存在的路由 staticRouter.ts)
|
||||||
export const ROUTER_WHITE_LIST: string[] = ["/500"];
|
export const ROUTER_WHITE_LIST: string[] = ["/500", "/projectlogon"];
|
||||||
|
|
||||||
// * 高德地图 key
|
// * 高德地图 key
|
||||||
export const AMAP_MAP_KEY: string = "";
|
export const AMAP_MAP_KEY: string = "";
|
||||||
|
|||||||
@ -17,6 +17,14 @@ export const staticRouter: RouteRecordRaw[] = [
|
|||||||
title: "登录"
|
title: "登录"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "/projectlogon",
|
||||||
|
name: "projectLogon",
|
||||||
|
component: () => import("@/views/login/ProJectForm/index.vue")
|
||||||
|
// meta: {
|
||||||
|
// title: "登录"
|
||||||
|
// }
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: "/layout",
|
path: "/layout",
|
||||||
name: "layout",
|
name: "layout",
|
||||||
|
|||||||
177
src/views/login/ProJectForm/index.vue
Normal file
177
src/views/login/ProJectForm/index.vue
Normal file
@ -0,0 +1,177 @@
|
|||||||
|
<template>
|
||||||
|
<div class="orderSide">
|
||||||
|
<div class="centerLogin">
|
||||||
|
<div class="loginRight">
|
||||||
|
<div class="title">项目注册账号申请</div>
|
||||||
|
<el-form :model="logonForm" :rules="rules">
|
||||||
|
<el-form-item class="nowrap" prop="account">
|
||||||
|
<img src="@/assets/images/projectLogon/account.png" alt="" />
|
||||||
|
<el-input v-model="logonForm.account" class="accountInput" size="large" placeholder="请输入账号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item class="nowrap" prop="email">
|
||||||
|
<img src="@/assets/images/projectLogon/email.png" alt="" />
|
||||||
|
<el-input v-model="logonForm.email" class="passwordInput" size="large" placeholder="请输入邮箱" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item class="nowrap" prop="projectName">
|
||||||
|
<img src="@/assets/images/projectLogon/projectName.png" alt="" />
|
||||||
|
<el-input v-model="logonForm.projectName" class="passwordInput" size="large" placeholder="请输入项目名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item class="nowrap" prop="governmentSn">
|
||||||
|
<img src="@/assets/images/projectLogon/zhujian.png" alt="" />
|
||||||
|
<el-select class="passwordInput selectWidth" v-model="logonForm.governmentSn" placeholder="请选择住建局">
|
||||||
|
<el-option
|
||||||
|
v-for="item in zhujian"
|
||||||
|
:key="item.governmentSn"
|
||||||
|
:label="item.governmentName"
|
||||||
|
:value="item.governmentSn"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item class="nowrap" prop="projectTel">
|
||||||
|
<img src="@/assets/images/projectLogon/telephone.png" alt="" />
|
||||||
|
<el-input v-model="logonForm.projectTel" class="passwordInput" size="large" placeholder="请输入手机号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item class="nowrap" prop="password">
|
||||||
|
<img src="@/assets/images/login/lockIcon.png" alt="" />
|
||||||
|
<el-input type="password" v-model="logonForm.password" class="passwordInput" size="large" placeholder="请输入密码" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item class="nowrap">
|
||||||
|
<button class="LoginBtn" :plain="true" @click="loginGo">提交</button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref, reactive } from "vue";
|
||||||
|
import { Search } from "@element-plus/icons-vue";
|
||||||
|
// import { projectLogon, zhujianList } from "@/assets/js/api";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
|
||||||
|
const rules = reactive({
|
||||||
|
account: [{ required: true, message: "请输入账号", trigger: "blur" }],
|
||||||
|
email: [
|
||||||
|
{ required: true, message: "请输入邮箱", trigger: "blur" },
|
||||||
|
{ type: "email", message: "请输入正确的邮箱", trigger: "blur" }
|
||||||
|
],
|
||||||
|
projectName: [{ required: true, message: "请输入项目名称", trigger: "blur" }],
|
||||||
|
governmentSn: [{ required: true, message: "请选择住建局", trigger: "blur" }],
|
||||||
|
projectTel: [{ required: true, message: "请输入手机号", trigger: "blur" }],
|
||||||
|
password: [{ required: true, message: "请输入密码", trigger: "blur" }]
|
||||||
|
});
|
||||||
|
const logonForm = reactive({
|
||||||
|
account: "",
|
||||||
|
email: "",
|
||||||
|
projectName: "",
|
||||||
|
governmentSn: "",
|
||||||
|
projectTel: "",
|
||||||
|
password: ""
|
||||||
|
});
|
||||||
|
const zhujian = ref([]);
|
||||||
|
// const zhujianSel = () => {
|
||||||
|
// zhujianList({}).then(res => {
|
||||||
|
// if (res.success) {
|
||||||
|
// zhujian.value = res.result;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// };
|
||||||
|
// zhujianSel();
|
||||||
|
// const router = useRouter();
|
||||||
|
// const loginGo = () => {
|
||||||
|
// projectLogon(logonForm).then(res => {
|
||||||
|
// if (res.success) {
|
||||||
|
// ElMessage.success("注册成功");
|
||||||
|
// router.push({ path: "/login" });
|
||||||
|
// } else {
|
||||||
|
// ElMessage.error("注册失败");
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// };
|
||||||
|
const radio1 = ref("1");
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.orderSide {
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
background: url("@/assets/images/login/loginImg.jpg") center center no-repeat;
|
||||||
|
background-size: 100%;
|
||||||
|
text-align: center;
|
||||||
|
position: relative;
|
||||||
|
.centerLogin {
|
||||||
|
display: flex;
|
||||||
|
width: 520px;
|
||||||
|
height: 720px;
|
||||||
|
background-color: #fff;
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
-webkit-transform: translate(-50%, -50%);
|
||||||
|
.loginRight {
|
||||||
|
margin: 0 auto;
|
||||||
|
.nowrap {
|
||||||
|
border-bottom: 1px solid #b5b5b5;
|
||||||
|
margin-top: 37px;
|
||||||
|
}
|
||||||
|
.title {
|
||||||
|
margin-top: 65px;
|
||||||
|
font-size: 30px;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.accountInput {
|
||||||
|
font-size: 16px;
|
||||||
|
:deep(.el-input__wrapper) {
|
||||||
|
box-shadow: 0 0 0 0px var(--el-input-border-color, var(--el-border-color)) inset;
|
||||||
|
cursor: default;
|
||||||
|
.el-input__inner {
|
||||||
|
cursor: default !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.passwordInput {
|
||||||
|
font-size: 16px;
|
||||||
|
:deep(.el-input__wrapper) {
|
||||||
|
box-shadow: 0 0 0 0px var(--el-input-border-color, var(--el-border-color)) inset;
|
||||||
|
cursor: default;
|
||||||
|
.el-input__inner {
|
||||||
|
cursor: default !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.selectWidth {
|
||||||
|
width: 265px;
|
||||||
|
}
|
||||||
|
#verityBtn {
|
||||||
|
margin-top: 38px;
|
||||||
|
width: 280px;
|
||||||
|
height: 42px;
|
||||||
|
border: none;
|
||||||
|
background-color: rgb(233, 237, 247);
|
||||||
|
color: #2246b4;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
.LoginBtn {
|
||||||
|
margin-top: 42px;
|
||||||
|
width: 280px;
|
||||||
|
height: 42px;
|
||||||
|
border: none;
|
||||||
|
background-color: rgb(34, 70, 180);
|
||||||
|
color: rgb(233, 237, 247);
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
.logon {
|
||||||
|
margin-top: 30px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
::v-deep .el-select .el-input.is-focus .el-input__wrapper {
|
||||||
|
box-shadow: none !important;
|
||||||
|
}
|
||||||
|
::v-deep .el-form-item__content {
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -8,7 +8,13 @@
|
|||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="showPassword">
|
<el-form-item prop="showPassword">
|
||||||
<el-input type="password" v-model="loginForm.showPassword" placeholder="密码:123456" show-password autocomplete="new-password">
|
<el-input
|
||||||
|
type="password"
|
||||||
|
v-model="loginForm.showPassword"
|
||||||
|
placeholder="密码:123456"
|
||||||
|
show-password
|
||||||
|
autocomplete="new-password"
|
||||||
|
>
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<el-icon class="el-input__icon"><lock /></el-icon>
|
<el-icon class="el-input__icon"><lock /></el-icon>
|
||||||
</template>
|
</template>
|
||||||
@ -21,6 +27,11 @@
|
|||||||
登录
|
登录
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="logon">
|
||||||
|
<el-button type="info" link>企业注册</el-button>
|
||||||
|
<el-button style="margin: 0 40px" type="info" link @click="projectLogon">项目注册</el-button>
|
||||||
|
<!-- <router-link to="projectLogon">1111111</router-link> -->
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@ -91,6 +102,10 @@ const resetForm = (formEl: FormInstance | undefined) => {
|
|||||||
formEl.resetFields();
|
formEl.resetFields();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const projectLogon = () => {
|
||||||
|
router.push("/projectlogon");
|
||||||
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 监听enter事件(调用登录)
|
// 监听enter事件(调用登录)
|
||||||
document.onkeydown = (e: any) => {
|
document.onkeydown = (e: any) => {
|
||||||
@ -103,8 +118,8 @@ onMounted(() => {
|
|||||||
});
|
});
|
||||||
// login页面销毁时,需要去掉enter监听
|
// login页面销毁时,需要去掉enter监听
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
document.onkeydown = null
|
document.onkeydown = null;
|
||||||
})
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@ -66,6 +66,12 @@
|
|||||||
width: 185px;
|
width: 185px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.logon {
|
||||||
|
display: flex;
|
||||||
|
// text-align: center;
|
||||||
|
margin-top: 48px;
|
||||||
|
margin-left: 29%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user