qsh 5 months ago
parent 16e3ac5c6d
commit 43b95e3a10
  1. 2
      .env.base
  2. 2
      .env.dev
  3. 2
      .env.front
  4. 2
      .env.pro
  5. 2
      .env.static
  6. 2
      .env.test
  7. 2
      src/config/axios/config.ts
  8. 20
      src/config/axios/service.ts
  9. 5
      src/layout/components/Setting/src/Setting.vue
  10. 6
      src/layout/components/UserInfo/src/UserInfo.vue
  11. 4
      src/permission.js
  12. 5
      src/views/Basic/GeneralSet/Comp/BSClue.vue
  13. 6
      src/views/Login/Login.vue
  14. 3
      src/views/Login/components/LoginForm.vue
  15. 2
      src/views/Profile/components/UserSocial.vue

@ -16,4 +16,4 @@ VITE_API_BASEPATH=/crm-api
VITE_API_URL=/admin-api VITE_API_URL=/admin-api
# 打包路径 # 打包路径
VITE_BASE_PATH=/crm VITE_BASE_PATH=/crm/

@ -16,7 +16,7 @@ VITE_API_BASEPATH=/crm-api
VITE_API_URL=/admin-api VITE_API_URL=/admin-api
# 打包路径 # 打包路径
VITE_BASE_PATH=/crm VITE_BASE_PATH=/crm/
# 是否删除debugger # 是否删除debugger
VITE_DROP_DEBUGGER=false VITE_DROP_DEBUGGER=false

@ -16,7 +16,7 @@ VITE_API_BASEPATH=/crm-api
VITE_API_URL=/admin-api VITE_API_URL=/admin-api
# 打包路径 # 打包路径
VITE_BASE_PATH=/crm VITE_BASE_PATH=/crm/
# 项目本地运行端口号, 与.vscode/launch.json配合 # 项目本地运行端口号, 与.vscode/launch.json配合
VITE_PORT=80 VITE_PORT=80

@ -25,7 +25,7 @@ VITE_DROP_CONSOLE=true
VITE_SOURCEMAP=false VITE_SOURCEMAP=false
# 打包路径 # 打包路径
VITE_BASE_PATH=/crm VITE_BASE_PATH=/crm/
# 输出路径 # 输出路径
VITE_OUT_DIR=dist-pro VITE_OUT_DIR=dist-pro

@ -25,7 +25,7 @@ VITE_DROP_CONSOLE=true
VITE_SOURCEMAP=false VITE_SOURCEMAP=false
# 打包路径 # 打包路径
VITE_BASE_PATH=/crm VITE_BASE_PATH=/crm/
# 输出路径 # 输出路径
VITE_OUT_DIR=dist-dev VITE_OUT_DIR=dist-dev

@ -25,7 +25,7 @@ VITE_DROP_CONSOLE=false
VITE_SOURCEMAP=true VITE_SOURCEMAP=true
# 打包路径 # 打包路径
VITE_BASE_PATH=/crm VITE_BASE_PATH=/crm/
# 输出路径 # 输出路径
VITE_OUT_DIR=dist-test VITE_OUT_DIR=dist-test

@ -7,7 +7,7 @@ const config: {
/** /**
* api请求基础路径 * api请求基础路径
*/ */
base_url: 'http://localhost' + import.meta.env.VITE_API_BASEPATH, base_url: import.meta.env.VITE_API_BASEPATH,
/** /**
* *
*/ */

@ -200,14 +200,18 @@ service.interceptors.response.use(
} else { } else {
ElNotification.error({ title: msg }) ElNotification.error({ title: msg })
if (code == 403) { if (code == 403) {
// 无访问权限,退出登录 ElMessageBox.confirm(`${msg},是否重新登陆`, '提示', {
const { wsCache } = useCache() type: 'warning'
const tenantId = wsCache.get('TENANT_ID') }).then(() => {
const appId = wsCache.get('App_ID') // 无访问权限,退出登录
resetRouter() // 重置静态路由表 const { wsCache } = useCache()
wsCache.clear() const tenantId = wsCache.get('TENANT_ID')
removeToken() const appId = wsCache.get('App_ID')
window.location.href = `/login?tenantId=${tenantId}&appId=${appId}` resetRouter() // 重置静态路由表
wsCache.clear()
removeToken()
window.location.href = `/crm/login?tenantId=${tenantId}&appId=${appId}`
})
} }
} }
return Promise.reject('error') return Promise.reject('error')

@ -198,6 +198,7 @@ const clear = () => {
<template> <template>
<div <div
v-if="false"
:class="prefixCls" :class="prefixCls"
class="fixed top-[45%] right-0 w-40px h-40px text-center leading-40px bg-[var(--el-color-primary)] cursor-pointer" class="fixed top-[45%] right-0 w-40px h-40px text-center leading-40px bg-[var(--el-color-primary)] cursor-pointer"
@click="drawer = true" @click="drawer = true"
@ -205,7 +206,9 @@ const clear = () => {
<Icon color="#fff" icon="ep:setting" /> <Icon color="#fff" icon="ep:setting" />
</div> </div>
<ElDrawer v-model="drawer" :z-index="4000" direction="rtl" size="350px"> <div @click="drawer = true">主题配置</div>
<ElDrawer v-model="drawer" :z-index="4000" append-to-body direction="rtl" size="350px">
<template #header> <template #header>
<span class="text-16px font-700">{{ t('setting.projectSetting') }}</span> <span class="text-16px font-700">{{ t('setting.projectSetting') }}</span>
</template> </template>

@ -8,6 +8,8 @@ import { useUserStore } from '@/store/modules/user'
import { useTagsViewStore } from '@/store/modules/tagsView' import { useTagsViewStore } from '@/store/modules/tagsView'
import { getTenantId, getAppId } from '@/utils/auth' import { getTenantId, getAppId } from '@/utils/auth'
import { Setting } from '@/layout/components/Setting'
const { t } = useI18n() const { t } = useI18n()
const { wsCache } = useCache() const { wsCache } = useCache()
@ -58,6 +60,10 @@ const toProfile = async () => {
</div> </div>
<template #dropdown> <template #dropdown>
<ElDropdownMenu> <ElDropdownMenu>
<ElDropdownItem>
<Icon icon="ep:tools" />
<Setting />
</ElDropdownItem>
<ElDropdownItem> <ElDropdownItem>
<Icon icon="ep:tools" /> <Icon icon="ep:tools" />
<div @click="toProfile">{{ t('common.profile') }}</div> <div @click="toProfile">{{ t('common.profile') }}</div>

@ -54,9 +54,9 @@ router.beforeEach(async (to, from, next) => {
const tenantId = getTenantId() const tenantId = getTenantId()
const appId = getAppId() const appId = getAppId()
if (tenantId && appId) { if (tenantId && appId) {
next(`/login?tenantId=${tenantId}&appId=${appId}&redirect=${to.fullPath}`) // 否则全部重定向到登录页 next(`/crm/login?tenantId=${tenantId}&appId=${appId}&redirect=${to.fullPath}`) // 否则全部重定向到登录页
} else { } else {
next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页 next(`/crm/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
} }
} }
} }

@ -8,7 +8,10 @@
/> />
<span>使用外呼</span> <span>使用外呼</span>
</template> </template>
<el-radio-group v-model="form.usePhoneConfig"> <el-radio-group
v-model="form.usePhoneConfig"
:disabled="getConfig('usePhoneConfig').modifiable == 'false'"
>
<el-radio <el-radio
v-for="(item, index) in getConfig('usePhoneConfig').options" v-for="(item, index) in getConfig('usePhoneConfig').options"
:key="index" :key="index"

@ -50,9 +50,9 @@
<!-- 账号登录 --> <!-- 账号登录 -->
<LoginForm class="p-20px h-auto m-auto <xl:(rounded-3xl light:bg-white)" /> <LoginForm class="p-20px h-auto m-auto <xl:(rounded-3xl light:bg-white)" />
<!-- 手机登录 --> <!-- 手机登录 -->
<MobileForm class="p-20px h-auto m-auto <xl:(rounded-3xl light:bg-white)" /> <!-- <MobileForm class="p-20px h-auto m-auto <xl:(rounded-3xl light:bg-white)" /> -->
<!-- 二维码登录 --> <!-- 二维码登录 -->
<QrCodeForm class="p-20px h-auto m-auto <xl:(rounded-3xl light:bg-white)" /> <!-- <QrCodeForm class="p-20px h-auto m-auto <xl:(rounded-3xl light:bg-white)" /> -->
<!-- 注册 --> <!-- 注册 -->
<!-- <RegisterForm class="p-20px h-auto m-auto <xl:(rounded-3xl light:bg-white)" /> --> <!-- <RegisterForm class="p-20px h-auto m-auto <xl:(rounded-3xl light:bg-white)" /> -->
<!-- 三方登录 --> <!-- 三方登录 -->
@ -70,7 +70,7 @@ import { useDesign } from '@/hooks/web/useDesign'
import { useAppStore } from '@/store/modules/app' import { useAppStore } from '@/store/modules/app'
import { ThemeSwitch } from '@/layout/components/ThemeSwitch' import { ThemeSwitch } from '@/layout/components/ThemeSwitch'
import { LoginForm, MobileForm, QrCodeForm } from './components' import { LoginForm } from './components'
import soups from './components/soup.js' import soups from './components/soup.js'

@ -82,7 +82,7 @@
mode="pop" mode="pop"
@success="handleLogin" @success="handleLogin"
/> />
<el-col :span="24" style="padding-left: 10px; padding-right: 10px"> <el-col v-if="showOtherLogin" :span="24" style="padding-left: 10px; padding-right: 10px">
<el-form-item> <el-form-item>
<el-row :gutter="5" justify="space-between" style="width: 100%"> <el-row :gutter="5" justify="space-between" style="width: 100%">
<el-col :span="12"> <el-col :span="12">
@ -131,6 +131,7 @@ const verify = ref()
const captchaType = ref('blockPuzzle') // blockPuzzle clickWord const captchaType = ref('blockPuzzle') // blockPuzzle clickWord
const getShow = computed(() => unref(getLoginState) === LoginStateEnum.LOGIN) const getShow = computed(() => unref(getLoginState) === LoginStateEnum.LOGIN)
const showOtherLogin = false
const LoginRules = { const LoginRules = {
username: [required], username: [required],

@ -61,6 +61,8 @@ const bindSocial = () => {
}) })
} }
const bind = (row) => { const bind = (row) => {
message.info('暂未开放,敬请期待')
return
const redirectUri = location.origin + '/user/profile?type=' + row.type const redirectUri = location.origin + '/user/profile?type=' + row.type
// //
socialAuthRedirect(row.type, encodeURIComponent(redirectUri)).then((res) => { socialAuthRedirect(row.type, encodeURIComponent(redirectUri)).then((res) => {

Loading…
Cancel
Save