zhousq
7 months ago
44 changed files with 717 additions and 291 deletions
@ -0,0 +1,37 @@ |
|||
# 生产环境 |
|||
NODE_ENV=test |
|||
|
|||
VITE_DEV=false |
|||
|
|||
# 请求路径 |
|||
VITE_BASE_URL='http://dev.ccwin-in.com:25300/api' |
|||
|
|||
# 上传路径 |
|||
VITE_UPLOAD_URL='http://dev.ccwin-in.com:25300/api/admin-api/infra/file/upload' |
|||
|
|||
# 接口前缀 |
|||
VITE_API_BASEPATH= |
|||
|
|||
# 接口地址 |
|||
VITE_API_URL=/admin-api |
|||
|
|||
# 是否删除debugger |
|||
VITE_DROP_DEBUGGER=true |
|||
|
|||
# 是否删除console.log |
|||
VITE_DROP_CONSOLE=true |
|||
|
|||
# 是否sourcemap |
|||
VITE_SOURCEMAP=false |
|||
|
|||
# 打包路径 |
|||
VITE_BASE_PATH=/ |
|||
|
|||
# 输出路径 |
|||
VITE_OUT_DIR=sfms3.0 |
|||
|
|||
# 自定义接口路径 |
|||
VITE_INTERFACE_URL='http://dev.ccwin-in.com:25310/magic/web/index.html' |
|||
|
|||
# 积木报表请求路径 |
|||
VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25310' |
@ -1,10 +0,0 @@ |
|||
<template> |
|||
<div>11</div> |
|||
</template> |
|||
<script lang="ts" setup> |
|||
|
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
|
|||
</style> |
@ -0,0 +1,72 @@ |
|||
<template> |
|||
<div v-loading="loading" style="display: flex; justify-content: center; align-items: center;"> |
|||
<el-form ref="formSmsLogin" :model="loginData" :rules="rules" label-width="130px" label-position="top" size="large"> |
|||
<div class="title" style="font-size:25px" margin-left="0px">忘记密码</div> |
|||
<el-row type="flex" justify="center" align="middle"> |
|||
<el-col :span="13"> |
|||
<el-form-item label="请输入用户名" prop="username" align="center"> |
|||
<el-input v-model="loginData.username" placeholder="请输入用户名" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="13"> |
|||
<el-form-item label="请输入邮箱" prop="email"> |
|||
<el-input v-model="loginData.email" placeholder="请输入邮箱" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<div class="dialog-footer"> |
|||
<el-button type="primary" @click="submitForm">确 定</el-button> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
<script lang="ts" setup name="forgetPassword"> |
|||
import type { RouteLocationNormalizedLoaded } from 'vue-router' |
|||
import { useIcon } from '@/hooks/web/useIcon' |
|||
import { setTenantId, setToken } from '@/utils/auth' |
|||
import { usePermissionStore } from '@/store/modules/permission' |
|||
import { getTenantIdByName, sendSmsCode, smsLogin } from '@/api/login' |
|||
import * as UserApi from '@/api/system/user' |
|||
|
|||
const { t } = useI18n() |
|||
const message = useMessage() |
|||
const permissionStore = usePermissionStore() |
|||
const formSmsLogin = ref() |
|||
const loginLoading = ref(false) |
|||
const iconHouse = useIcon({ icon: 'ep:house' }) |
|||
const iconCellphone = useIcon({ icon: 'ep:cellphone' }) |
|||
const iconCircleCheck = useIcon({ icon: 'ep:circle-check' }) |
|||
const rules = { |
|||
username: [required], |
|||
email: [required] |
|||
} |
|||
const loginData = reactive({ |
|||
username: '', |
|||
email: '', |
|||
|
|||
}) |
|||
const loading = ref(false); |
|||
const submitForm = async () => { |
|||
try { |
|||
const data = loginData as unknown as UserApi.UserVO |
|||
await UserApi.forgetPassword(data) |
|||
message.success(t('common.updateSuccess')) |
|||
// 发送操作成功的事件 |
|||
router.go(-1) |
|||
} finally { |
|||
// formLoading.value = false |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
:deep(.anticon) { |
|||
&:hover { |
|||
color: var(--el-color-primary) !important; |
|||
} |
|||
} |
|||
|
|||
.smsbtn { |
|||
margin-top: 33px; |
|||
} |
|||
</style> |
@ -0,0 +1,78 @@ |
|||
<template> |
|||
<div v-loading="loading" style="display: flex; justify-content: center; align-items: center;"> |
|||
<el-form ref="formSmsLogin" :model="loginData" :rules="rules" label-width="130px" label-position="top" size="large"> |
|||
<div class="title" style="font-size:25px" margin-left="0px">重置密码</div> |
|||
<el-row type="flex" justify="center" align="middle"> |
|||
<el-col :span="13"> |
|||
<el-form-item label="新密码" prop="password" align="center"> |
|||
<el-input v-model="loginData.password" placeholder="请输入新密码" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="13"> |
|||
<el-form-item label="确认新密码" prop="againPassword"> |
|||
<el-input v-model="loginData.againPassword" placeholder="请再次新密码" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<div class="dialog-footer"> |
|||
<el-button type="primary" @click="submitForm">确 定</el-button> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
<script lang="ts" setup name="bb"> |
|||
import type { RouteLocationNormalizedLoaded } from 'vue-router' |
|||
import { useIcon } from '@/hooks/web/useIcon' |
|||
import { setTenantId, setToken } from '@/utils/auth' |
|||
import { usePermissionStore } from '@/store/modules/permission' |
|||
import { getTenantIdByName, sendSmsCode, smsLogin } from '@/api/login' |
|||
import * as UserApi from '@/api/system/user' |
|||
|
|||
const { t } = useI18n() |
|||
const message = useMessage() |
|||
const permissionStore = usePermissionStore() |
|||
const formSmsLogin = ref() |
|||
const loginLoading = ref(false) |
|||
const iconHouse = useIcon({ icon: 'ep:house' }) |
|||
const iconCellphone = useIcon({ icon: 'ep:cellphone' }) |
|||
const iconCircleCheck = useIcon({ icon: 'ep:circle-check' }) |
|||
const route = useRoute() //路由信息 |
|||
const rules = { |
|||
password: [required], |
|||
againPassword: [required] |
|||
} |
|||
const loginData = reactive({ |
|||
password: '', |
|||
againPassword: '', |
|||
mailKey: '', |
|||
}) |
|||
const loading = ref(false); |
|||
const submitForm = async () => { |
|||
try { |
|||
loginData.mailKey = route.query.mailKey; |
|||
if (loginData.password != loginData.againPassword) { |
|||
message.error('两次输入的密码不一致,请重新输入!') |
|||
} else { |
|||
const data = loginData as unknown as UserApi.UserVO |
|||
await UserApi.updatePassword(data) |
|||
// 发送操作成功的事件 |
|||
message.success(t('common.updateSuccess')) |
|||
router.go(-1) |
|||
} |
|||
} finally { |
|||
// formLoading.value = false |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
:deep(.anticon) { |
|||
&:hover { |
|||
color: var(--el-color-primary) !important; |
|||
} |
|||
} |
|||
|
|||
.smsbtn { |
|||
margin-top: 33px; |
|||
} |
|||
</style> |
Loading…
Reference in new issue