diff --git a/admin/src/app/api/diy.ts b/admin/src/app/api/diy.ts index 1fe09fc66..c1aa6f43c 100644 --- a/admin/src/app/api/diy.ts +++ b/admin/src/app/api/diy.ts @@ -237,7 +237,7 @@ export function editTheme(params: Record) { /** * 删除配色 - * @param params + * @param id */ export function deleteTheme(id: number) { return request.delete(`diy/theme/delete/${ id }`, { showSuccessMessage: true }) diff --git a/admin/src/app/api/member.ts b/admin/src/app/api/member.ts index 54d4b4888..4a03299ea 100644 --- a/admin/src/app/api/member.ts +++ b/admin/src/app/api/member.ts @@ -393,7 +393,7 @@ export function memberRemark(params: Record) { } /** * 检查打款进度 - * @param params + * @param id */ export function memberCheck(id: number) { return request.put(`member/cash_out/check/${id}`, {}, { showSuccessMessage: true }) diff --git a/admin/src/app/api/notice.ts b/admin/src/app/api/notice.ts index c30f2dcba..b5374f93d 100644 --- a/admin/src/app/api/notice.ts +++ b/admin/src/app/api/notice.ts @@ -81,7 +81,6 @@ export function getSmsLog(params: Record) { /** * 获取当前登录子账号 - * @param params */ export function getAccountIsLogin() { return request.get(`notice/niusms/config`) @@ -105,7 +104,7 @@ export function registerAccount(params: Record) { /** * 获取当前登录子账号信息 - * @param params + * @param username */ export function getAccountInfo(username: string) { return request.get(`notice/niusms/account/info/${username}`) @@ -121,6 +120,7 @@ export function getTemplateList(params: Record) { /** * 获取签名列表 + * @param username * @param params */ export function getSignList(username: string, params: Record) { @@ -129,6 +129,7 @@ export function getSignList(username: string, params: Record) { /** * 添加签名 + * @param username * @param params */ export function addSign(username: string, params: Record) { @@ -137,6 +138,7 @@ export function addSign(username: string, params: Record) { /** * 删除签名 + * @param username * @param params */ export function deleteSign(username: string, params: Record) { @@ -145,6 +147,7 @@ export function deleteSign(username: string, params: Record) { /** * 更新子账号信息 + * @param username * @param params */ export function editAccount(username: string,params: Record) { @@ -153,6 +156,7 @@ export function editAccount(username: string,params: Record) { /** * 获取短信发送记录 + * @param username * @param params */ export function getSmsSendList(username: string, params: Record) { @@ -161,6 +165,7 @@ export function getSmsSendList(username: string, params: Record) { /** * 获取充值列表 + * @param username * @param params */ export function getSmsOrdersList(username: string, params: Record) { @@ -169,7 +174,6 @@ export function getSmsOrdersList(username: string, params: Record) /** * 获取套餐列表 - * @param params */ export function getSmsPackagesList() { return request.get(`notice/niusms/packages`) @@ -177,12 +181,17 @@ export function getSmsPackagesList() { /** * 获取图像验证码 - * @param params */ export function getSmsCaptcha() { return request.get(`notice/niusms/captcha`) } +/** + * 获取图像验证码 + */ +export function getsiteCaptcha() { + return request.get(`site/captcha/create`) +} /** * 发送验证码 * @param params @@ -193,7 +202,6 @@ export function getSmsSend(params: Record) { /** * 添加签名配置项 - * @param params */ export function getSmsSignConfig() { return request.get(`notice/niusms/sign/report/config`) @@ -201,7 +209,6 @@ export function getSmsSignConfig() { /** * 模版报备配置项 - * @param params */ export function getTemplateReportConfig() { return request.get(`notice/niusms/template/report/config`) @@ -209,6 +216,10 @@ export function getTemplateReportConfig() { /** * 模版报备 + * @param sms_type + * @param username + * @param sms_type + * @param username * @param params */ export function reportTemplate(sms_type: string, username: string, params: Record) { @@ -217,6 +228,10 @@ export function reportTemplate(sms_type: string, username: string, params: Recor /** * 模版详情 + * @param sms_type + * @param username + * @param sms_type + * @param username * @param params */ export function getreportTemplateInfo(sms_type: string, username: string,params: Record) { @@ -226,6 +241,7 @@ export function getreportTemplateInfo(sms_type: string, username: string,params: /** * 充值下单 + * @param username * @param params */ export function smsOrderCreate(username: string, params: Record) { @@ -234,6 +250,7 @@ export function smsOrderCreate(username: string, params: Record) { /** * 获取支付信息 + * @param username * @param params */ export function getOrderPayInfo(username: string, params: Record) { @@ -242,6 +259,7 @@ export function getOrderPayInfo(username: string, params: Record) { /** * 获取订单详情 + * @param username * @param params */ export function getOrderInfo(username: string, params: Record) { @@ -250,6 +268,7 @@ export function getOrderInfo(username: string, params: Record) { /** * 获取支付状态 + * @param username * @param params */ export function getOrderPayStatus(username: string, params: Record) { @@ -258,6 +277,7 @@ export function getOrderPayStatus(username: string, params: Record) /** * 计算金额 + * @param username * @param params */ export function calculateOrderPay(username: string, params: Record) { @@ -274,7 +294,9 @@ export function enableNiusms(params: Record) { /** * 同步模版状态 - * @param params + * @param username + * @param sms_type + * @param username */ export function templateSync(sms_type: string, username: string) { return request.get(`notice/niusms/template/sync/${sms_type}/${username}`) @@ -282,6 +304,7 @@ export function templateSync(sms_type: string, username: string) { /** * 重置密码 + * @param username * @param params */ export function resetPassword(username: string,params: Record) { @@ -290,7 +313,9 @@ export function resetPassword(username: string,params: Record) { /** * 清除模版报备 - * @param params + * @param template_id + * @param username + * @param template_id */ export function clearTemplate(username: string,template_id: string) { return request.delete(`notice/niusms/template/${username}/${template_id}`) diff --git a/admin/src/app/api/pay.ts b/admin/src/app/api/pay.ts index 911f2848b..2224092b9 100644 --- a/admin/src/app/api/pay.ts +++ b/admin/src/app/api/pay.ts @@ -56,7 +56,6 @@ export function getPayRefundInfo(refund_no: string) { /** * 获取退款状态字典 - * @param refund_no */ export function getRefundStatus() { return request.get(`pay/refund/status`) diff --git a/admin/src/app/api/site.ts b/admin/src/app/api/site.ts index 99d70547a..79076b087 100644 --- a/admin/src/app/api/site.ts +++ b/admin/src/app/api/site.ts @@ -42,8 +42,8 @@ export function editSite(params: Record) { * 删除站点 * @param siteId */ -export function deleteSite(siteId: number) { - return request.delete(`site/site/${ siteId }`) +export function deleteSite(params: Record) { + return request.delete(`site/site/${ params.site_id }?captcha_code=${ params.captcha_code }&captcha_key=${ params.captcha_key }`) } /** @@ -78,6 +78,20 @@ export function getStatusList() { return request.get(`site/statuslist`) } +/** + * 获取是否显示切换站点 + */ +export function getSiteAllowChange() { + return request.get(`site/allow_change`) +} + +/** + * 修改是否显示切换站点 + */ +export function putSiteAllowChange(params: Record) { + return request.put(`site/allow_change`,params, { showSuccessMessage: true }) +} + /***************************************************** 站点分组管理 ****************************************************/ /** diff --git a/admin/src/app/api/sys.ts b/admin/src/app/api/sys.ts index a40068742..4fb9d8b3d 100644 --- a/admin/src/app/api/sys.ts +++ b/admin/src/app/api/sys.ts @@ -505,6 +505,14 @@ export function clearCronLog(params: Record) { return request.put(`sys/schedule/log/clear`, params, { showSuccessMessage: true }) } +/** + * 重置计划任务 + * @returns + */ +export function resetCron() { + return request.post(`sys/schedule/reset`, { showSuccessMessage: true }) +} + /***************************************************** 协议管理 ****************************************************/ /** diff --git a/admin/src/app/api/upgrade.ts b/admin/src/app/api/upgrade.ts index 002a2ed67..4dcbd3ec9 100644 --- a/admin/src/app/api/upgrade.ts +++ b/admin/src/app/api/upgrade.ts @@ -19,6 +19,7 @@ export function getUpgradeTask() { /** * 升级 * @param addon + * @param params */ export function upgradeAddon(addon: string = '', params: Record = {}) { return request.post(addon ? `upgrade/${ addon }` : 'upgrade', params) @@ -137,3 +138,25 @@ export function performRecoveryTasks(params: Record) { export function performBackupTasks(params: Record) { return request.get("backup/task", params) } + +/** + * 连通测试 + * @param params + */ +export function connectTest(params: Record) { + return request.post("niucloud/build/connect_test", params) +} +/** + * 保存服务器地址 + * @param params + */ +export function setLocalUrl(params: Record) { + return request.post("niucloud/build/set_local_url", params) +} +/** + * 获取服务器地址 + * @param params + */ +export function getLocalUrl(params: Record) { + return request.get("niucloud/build/get_local_url", params) +} diff --git a/admin/src/app/api/user.ts b/admin/src/app/api/user.ts index c0d4776e3..1b2b1db9b 100644 --- a/admin/src/app/api/user.ts +++ b/admin/src/app/api/user.ts @@ -41,7 +41,7 @@ export function deleteUser(uid: number) { /** * 修改用户 - * @param uid + * @param params */ export function editUser(params: Record) { return request.put(`user/user/${ params.uid }`, params, { showSuccessMessage: true }) diff --git a/admin/src/app/api/weapp.ts b/admin/src/app/api/weapp.ts index 99b30fa12..de73009d7 100644 --- a/admin/src/app/api/weapp.ts +++ b/admin/src/app/api/weapp.ts @@ -151,7 +151,6 @@ export function setWeappPrivacySetting(params: Record) { /** * 获取小程序隐私协议 - * @param params */ export function getWeappPrivacySetting() { return request.get('weapp/privacysetting') diff --git a/admin/src/app/components/cloud-build/index.vue b/admin/src/app/components/cloud-build/index.vue index dd1c2cb46..9c16709b9 100644 --- a/admin/src/app/components/cloud-build/index.vue +++ b/admin/src/app/components/cloud-build/index.vue @@ -5,7 +5,7 @@
-
+

{{ t('cloudbuild.dirPermission') }}

@@ -14,7 +14,7 @@
立即查看
- +
@@ -66,7 +66,7 @@
- +
取消 @@ -81,7 +81,7 @@ diff --git a/admin/src/app/components/upgrade-log/index.vue b/admin/src/app/components/upgrade-log/index.vue index 53a4fe8ca..6bacfd39a 100644 --- a/admin/src/app/components/upgrade-log/index.vue +++ b/admin/src/app/components/upgrade-log/index.vue @@ -147,8 +147,7 @@ defineExpose({ left: 125px; border-left-color: #dddddd; border-left-style: dashed; - margin: 12px 0; - margin-top: 24px; + margin: 24px 0 12px; height: calc(100% - 24px - 12px); } @@ -201,7 +200,7 @@ defineExpose({ .time-dialog >>> .el-collapse-item__content { margin-top: 15px; - padding-bottom: 0px !important; + padding-bottom: 0 !important; } .time-dialog >>> .el-timeline-item__node--01 { diff --git a/admin/src/app/components/upgrade/index.vue b/admin/src/app/components/upgrade/index.vue index 13618990d..f61bf9c97 100644 --- a/admin/src/app/components/upgrade/index.vue +++ b/admin/src/app/components/upgrade/index.vue @@ -130,8 +130,9 @@
- +
+
@@ -155,18 +156,21 @@
-
- +
+
-
+
- \ No newline at end of file + diff --git a/admin/src/app/views/setting/components/sms_template.vue b/admin/src/app/views/setting/components/sms_template.vue index ebb461ca2..ee4b4bed4 100644 --- a/admin/src/app/views/setting/components/sms_template.vue +++ b/admin/src/app/views/setting/components/sms_template.vue @@ -143,16 +143,16 @@ +} +.attachment-wrap .el-upload-list__item .el-upload-list__item-info { + width: 150px!important; +} + diff --git a/admin/src/components/verifition/Verify.vue b/admin/src/components/verifition/Verify.vue index f37ca196e..e57c915a6 100644 --- a/admin/src/components/verifition/Verify.vue +++ b/admin/src/components/verifition/Verify.vue @@ -27,113 +27,113 @@
diff --git a/admin/src/layout/admin_simplicity/components/aside/side.vue b/admin/src/layout/admin_simplicity/components/aside/side.vue index 60074c71b..395d9ae2a 100644 --- a/admin/src/layout/admin_simplicity/components/aside/side.vue +++ b/admin/src/layout/admin_simplicity/components/aside/side.vue @@ -12,7 +12,7 @@ diff --git a/admin/src/layout/bussiness/components/aside/index.vue b/admin/src/layout/bussiness/components/aside/index.vue index a5a28e804..5d40adc51 100644 --- a/admin/src/layout/bussiness/components/aside/index.vue +++ b/admin/src/layout/bussiness/components/aside/index.vue @@ -28,7 +28,7 @@ watch(route, () => { .aside-drawer { .el-drawer__body { - padding: 0px !important; + padding: 0 !important; } } diff --git a/admin/src/layout/bussiness/components/aside/side.vue b/admin/src/layout/bussiness/components/aside/side.vue index e9f650536..b5f3de0d5 100644 --- a/admin/src/layout/bussiness/components/aside/side.vue +++ b/admin/src/layout/bussiness/components/aside/side.vue @@ -44,13 +44,13 @@ diff --git a/admin/src/layout/darkside/components/aside/index.vue b/admin/src/layout/darkside/components/aside/index.vue index a7125f431..514659290 100644 --- a/admin/src/layout/darkside/components/aside/index.vue +++ b/admin/src/layout/darkside/components/aside/index.vue @@ -65,7 +65,7 @@ watch(route, () => { .aside-drawer { .el-drawer__body { - padding: 0px !important; + padding: 0 !important; } } diff --git a/admin/src/layout/darkside/components/header/index.vue b/admin/src/layout/darkside/components/header/index.vue index e666e294d..181a70966 100644 --- a/admin/src/layout/darkside/components/header/index.vue +++ b/admin/src/layout/darkside/components/header/index.vue @@ -44,6 +44,22 @@
+
+ + + + +
@@ -109,6 +125,55 @@ const siteInfo:any = computed(() => { const dark = computed(() => { return systemStore.dark }) +const isMenuSearch = ref(false) +const routers = userStore.routers +const getParentTitleChain=(meta:any) =>{ + let titles = [] + let current = meta?.parent_route + + while (current) { + if (current.short_title) { + titles.unshift(current.short_title) + } + current = current.parent_route + } + + return titles.join(' - ') +} +const flattenRoutes = (routes:any, parent = null)=> { + let flat = []; + routes.forEach(route => { + const { path, name, meta = {}, short_title, children } = route + const isLeaf = meta.type ==1 && meta.show==1 + if(isLeaf){ + const title = meta.title || short_title || '' + const parentTitleChain = getParentTitleChain(meta) + const fullTitle = parentTitleChain ? `${parentTitleChain} - ${title}` : title + const item = { + path, + name, + title, + parent_title: parentTitleChain, + full_title: fullTitle + }; + + flat.push(item); + } + if (children && children.length > 0) { + flat = flat.concat(flattenRoutes(children, route)) + } + }); + + return flat; +} +const flatRoutes = flattenRoutes(routers) +const selectedRoute = ref('') +const handleRouteSelect = (name:any) => { + if (name) { + router.push({ name }) + isMenuSearch.value = false + } +} // 检测登录 start const detectionLoginDialog = ref(false) @@ -194,7 +259,7 @@ const toPreview = () => { .layout-header{ position: relative; z-index: 5; - box-shadow: 0px 0px 4px 0px rgba(0,145,255,0.1); + box-shadow: 0 0 4px 0 rgba(0,145,255,0.1); } .navbar-item { padding: 0 8px; diff --git a/admin/src/layout/darkside/components/header/user-info.vue b/admin/src/layout/darkside/components/header/user-info.vue index 3d88c0173..391a31e82 100644 --- a/admin/src/layout/darkside/components/header/user-info.vue +++ b/admin/src/layout/darkside/components/header/user-info.vue @@ -18,7 +18,7 @@
- +
切换站点 @@ -81,8 +81,9 @@ import useUserStore from '@/stores/modules/user' import { setUserInfo } from '@/app/api/personal' import { t } from '@/lang' import userInfoEdit from '@/app/components/user-info-edit/index.vue' -import {img} from "@/utils/common" +import { img } from '@/utils/common' +const isAllowChange = localStorage.getItem('isAllowChange') === 'true'; const userStore = useUserStore() const router = useRouter() const clickEvent = (command: string) => { @@ -94,34 +95,34 @@ const clickEvent = (command: string) => { } const logout = () => { - userStore.logout(); + userStore.logout() } const toLink = (link) => { router.push(link) } const userInfoEditRef = ref(null) -const getUserInfoFn = ()=>{ +const getUserInfoFn = () => { userInfoEditRef.value?.open() } // 修改密码 --- start const changePasswordDialog = ref(false) -const formRef = ref(); +const formRef = ref() // 提交信息 const saveInfo = reactive({ original_password: '', password: '', password_copy: '' -}); +}) // 表单验证规则 const formRules = reactive({ original_password: [ - { required: true, message: t("originalPasswordPlaceholder"), trigger: "blur" }, + { required: true, message: t('originalPasswordPlaceholder'), trigger: 'blur' } ], password: [ - { required: true, message: t("passwordPlaceholder"), trigger: "blur" }, + { required: true, message: t('passwordPlaceholder'), trigger: 'blur' } ], password_copy: [ - { required: true, message: t("passwordPlaceholder"), trigger: "blur" }, + { required: true, message: t('passwordPlaceholder'), trigger: 'blur' } ] }) @@ -129,20 +130,20 @@ const submitForm = (formEl: FormInstance | undefined) => { if (!formEl) return formEl.validate((valid) => { if (valid) { - let msg = ""; - if (saveInfo.password && !saveInfo.original_password) msg = t('originalPasswordHint'); - if (saveInfo.password && saveInfo.original_password && !saveInfo.password_copy) msg = t('newPasswordHint'); - if (saveInfo.password && saveInfo.original_password && saveInfo.password_copy && saveInfo.password != saveInfo.password_copy) msg = t('doubleCipherHint'); + let msg = '' + if (saveInfo.password && !saveInfo.original_password) msg = t('originalPasswordHint') + if (saveInfo.password && saveInfo.original_password && !saveInfo.password_copy) msg = t('newPasswordHint') + if (saveInfo.password && saveInfo.original_password && saveInfo.password_copy && saveInfo.password != saveInfo.password_copy) msg = t('doubleCipherHint') if (msg) { ElNotification({ type: 'error', - message: msg, + message: msg }) - return; + return } setUserInfo(saveInfo).then((res: any) => { - changePasswordDialog.value = false; + changePasswordDialog.value = false }) } else { return false diff --git a/admin/src/layout/default/components/aside/index.vue b/admin/src/layout/default/components/aside/index.vue index c30b7137d..b12f283aa 100644 --- a/admin/src/layout/default/components/aside/index.vue +++ b/admin/src/layout/default/components/aside/index.vue @@ -62,7 +62,7 @@ watch(route, () => { .aside-drawer { .el-drawer__body { - padding: 0px !important; + padding: 0 !important; } } diff --git a/admin/src/layout/default/components/header/index.vue b/admin/src/layout/default/components/header/index.vue index 28066181d..2fba9efb2 100644 --- a/admin/src/layout/default/components/header/index.vue +++ b/admin/src/layout/default/components/header/index.vue @@ -15,7 +15,7 @@
- {{route.meta.title }} + {{route.meta.title }}
@@ -44,6 +44,22 @@
+
+ + + + +
@@ -109,6 +125,55 @@ const siteInfo:any = computed(() => { const dark = computed(() => { return systemStore.dark }) +const isMenuSearch = ref(false) +const routers = userStore.routers +const getParentTitleChain=(meta:any) =>{ + let titles = [] + let current = meta?.parent_route + + while (current) { + if (current.short_title) { + titles.unshift(current.short_title) + } + current = current.parent_route + } + + return titles.join(' - ') +} +const flattenRoutes = (routes:any, parent = null)=> { + let flat = []; + routes.forEach(route => { + const { path, name, meta = {}, short_title, children } = route + const isLeaf = meta.type ==1 && meta.show==1 + if(isLeaf){ + const title = meta.title || short_title || '' + const parentTitleChain = getParentTitleChain(meta) + const fullTitle = parentTitleChain ? `${parentTitleChain} - ${title}` : title + const item = { + path, + name, + title, + parent_title: parentTitleChain, + full_title: fullTitle + }; + + flat.push(item); + } + if (children && children.length > 0) { + flat = flat.concat(flattenRoutes(children, route)) + } + }); + + return flat; +} +const flatRoutes = flattenRoutes(routers) +const selectedRoute = ref('') +const handleRouteSelect = (name:any) => { + if (name) { + router.push({ name }) + isMenuSearch.value = false + } +} // 检测登录 start const detectionLoginDialog = ref(false) @@ -193,7 +258,7 @@ const toPreview = () => { .layout-header{ position: relative; z-index: 5; - box-shadow: 0px 0px 4px 0px rgba(0,145,255,0.1); + box-shadow: 0 0 4px 0 rgba(0,145,255,0.1); } .navbar-item { padding: 0 8px; @@ -215,4 +280,8 @@ const toPreview = () => { color: #333 !important; } } +:deep(.inter .el-breadcrumb__inner){ + font-weight: inherit !important; + color: var(--el-text-color-regular) !important; +} diff --git a/admin/src/layout/default/components/header/user-info.vue b/admin/src/layout/default/components/header/user-info.vue index f3772a279..391a31e82 100644 --- a/admin/src/layout/default/components/header/user-info.vue +++ b/admin/src/layout/default/components/header/user-info.vue @@ -18,7 +18,7 @@ - +
切换站点 @@ -81,8 +81,9 @@ import useUserStore from '@/stores/modules/user' import { setUserInfo } from '@/app/api/personal' import { t } from '@/lang' import userInfoEdit from '@/app/components/user-info-edit/index.vue' -import { img } from "@/utils/common"; +import { img } from '@/utils/common' +const isAllowChange = localStorage.getItem('isAllowChange') === 'true'; const userStore = useUserStore() const router = useRouter() const clickEvent = (command: string) => { @@ -94,34 +95,34 @@ const clickEvent = (command: string) => { } const logout = () => { - userStore.logout(); + userStore.logout() } const toLink = (link) => { router.push(link) } const userInfoEditRef = ref(null) -const getUserInfoFn = ()=>{ +const getUserInfoFn = () => { userInfoEditRef.value?.open() } // 修改密码 --- start const changePasswordDialog = ref(false) -const formRef = ref(); +const formRef = ref() // 提交信息 const saveInfo = reactive({ original_password: '', password: '', password_copy: '' -}); +}) // 表单验证规则 const formRules = reactive({ original_password: [ - { required: true, message: t("originalPasswordPlaceholder"), trigger: "blur" }, + { required: true, message: t('originalPasswordPlaceholder'), trigger: 'blur' } ], password: [ - { required: true, message: t("passwordPlaceholder"), trigger: "blur" }, + { required: true, message: t('passwordPlaceholder'), trigger: 'blur' } ], password_copy: [ - { required: true, message: t("passwordPlaceholder"), trigger: "blur" }, + { required: true, message: t('passwordPlaceholder'), trigger: 'blur' } ] }) @@ -129,25 +130,25 @@ const submitForm = (formEl: FormInstance | undefined) => { if (!formEl) return formEl.validate((valid) => { if (valid) { - let msg = ""; - if (saveInfo.password && !saveInfo.original_password) msg = t('originalPasswordHint'); - if (saveInfo.password && saveInfo.original_password && !saveInfo.password_copy) msg = t('newPasswordHint'); - if (saveInfo.password && saveInfo.original_password && saveInfo.password_copy && saveInfo.password != saveInfo.password_copy) msg = t('doubleCipherHint'); + let msg = '' + if (saveInfo.password && !saveInfo.original_password) msg = t('originalPasswordHint') + if (saveInfo.password && saveInfo.original_password && !saveInfo.password_copy) msg = t('newPasswordHint') + if (saveInfo.password && saveInfo.original_password && saveInfo.password_copy && saveInfo.password != saveInfo.password_copy) msg = t('doubleCipherHint') if (msg) { ElNotification({ type: 'error', - message: msg, + message: msg }) - return; + return } setUserInfo(saveInfo).then((res: any) => { - changePasswordDialog.value = false; + changePasswordDialog.value = false }) } else { return false } - }); + }) } diff --git a/admin/src/layout/default/components/tabs.vue b/admin/src/layout/default/components/tabs.vue index f172194b8..3304940b1 100644 --- a/admin/src/layout/default/components/tabs.vue +++ b/admin/src/layout/default/components/tabs.vue @@ -66,7 +66,7 @@ const removeTab = (content: any) => { /** * 关闭左侧 - * @param path + * @param name */ const closeLeft = (name: string) => { const tabs = Object.keys(tabbarStore.tabs) @@ -78,7 +78,7 @@ const closeLeft = (name: string) => { /** * 关闭右侧 - * @param path + * @param name */ const closeRight = (name: string) => { const tabs = Object.keys(tabbarStore.tabs) @@ -90,7 +90,7 @@ const closeRight = (name: string) => { /** * 关闭其他 - * @param path + * @param name */ const closeOther = (name: string) => { const tabs = Object.keys(tabbarStore.tabs) diff --git a/admin/src/layout/profession/components/aside/index.vue b/admin/src/layout/profession/components/aside/index.vue index 5be2a4925..e0e657102 100644 --- a/admin/src/layout/profession/components/aside/index.vue +++ b/admin/src/layout/profession/components/aside/index.vue @@ -37,7 +37,7 @@ watch(route, () => { .aside-drawer { .el-drawer__body { - padding: 0px !important; + padding: 0 !important; } } diff --git a/admin/src/layout/profession/components/aside/side.vue b/admin/src/layout/profession/components/aside/side.vue index a7a850ed5..7f395f5b6 100644 --- a/admin/src/layout/profession/components/aside/side.vue +++ b/admin/src/layout/profession/components/aside/side.vue @@ -54,10 +54,10 @@ diff --git a/admin/src/stores/modules/diy.ts b/admin/src/stores/modules/diy.ts index 1d3f8687f..ee0ba3b8c 100644 --- a/admin/src/stores/modules/diy.ts +++ b/admin/src/stores/modules/diy.ts @@ -57,6 +57,7 @@ const useDiyStore = defineStore('diy', { // 顶部导航栏 topStatusBar: { + control: true, // 是否允许展示编辑 isShow: true, // 是否显示 bgColor: "#ffffff", // 头部背景颜色 rollBgColor: "#ffffff", // 滚动时,头部背景颜色 @@ -72,7 +73,11 @@ const useDiyStore = defineStore('diy', { } }, - bottomTabBarSwitch: true, // 底部导航开关 + // 底部导航 + bottomTabBar: { + control: true, // 是否允许展示编辑 + isShow: true, // 是否显示 + }, // 弹框 count:不弹出 -1,首次弹出 1,每次弹出 0 popWindow: { @@ -146,6 +151,7 @@ const useDiyStore = defineStore('diy', { // 顶部导航栏 topStatusBar: { + control: true, // 是否允许展示编辑 isShow: true, // 是否显示 bgColor: "#ffffff", // 头部背景颜色 rollBgColor: "#ffffff", // 滚动时,头部背景颜色 @@ -161,7 +167,11 @@ const useDiyStore = defineStore('diy', { } }, - bottomTabBarSwitch: true, // 底部导航开关 + // 底部导航 + bottomTabBar: { + control: true, // 是否允许展示编辑 + isShow: true, // 是否显示 + }, // 弹框 count:不弹出 -1,首次弹出 1,每次弹出 0 popWindow: { @@ -320,7 +330,7 @@ const useDiyStore = defineStore('diy', { }, // 将数据发送到uniapp postMessage() { - var diyData = JSON.stringify({ + const diyData = JSON.stringify({ pageMode: this.pageMode, currentIndex: this.currentIndex, global: toRaw(this.global), @@ -372,9 +382,9 @@ const useDiyStore = defineStore('diy', { }, // 上移组件 moveUpComponent() { - var temp = cloneDeep(this.value[this.currentIndex]); // 当前选中组件 + const temp = cloneDeep(this.value[this.currentIndex]); // 当前选中组件 let prevIndex = this.currentIndex - 1; - var temp2 = cloneDeep(this.value[prevIndex]); // 上个组件 + const temp2 = cloneDeep(this.value[prevIndex]); // 上个组件 if ((this.currentIndex - 1) < 0 || temp2.position && this.position.indexOf(temp2.position) != -1) return; // 从0开始 @@ -398,12 +408,12 @@ const useDiyStore = defineStore('diy', { moveDownComponent() { if (this.currentIndex < -1 || (this.currentIndex + 1) >= this.value.length) return; // 最后一个不能下移 - var nextIndex = this.currentIndex + 1; + const nextIndex = this.currentIndex + 1; - var temp = cloneDeep(this.value[this.currentIndex]); // 当前选中组件 + const temp = cloneDeep(this.value[this.currentIndex]); // 当前选中组件 temp.id = this.generateRandom(); // 更新id,刷新组件数据 - var temp2 = cloneDeep(this.value[nextIndex]); // 下个组件 + const temp2 = cloneDeep(this.value[nextIndex]); // 下个组件 temp2.id = this.generateRandom(); // 更新id,刷新组件数据 if (temp2.position && this.position.indexOf(temp2.position) != -1) return; @@ -445,7 +455,7 @@ const useDiyStore = defineStore('diy', { return; } - var index = this.currentIndex + 1; + const index = this.currentIndex + 1; this.value.splice(index, 0, component); this.changeCurrentIndex(index, component); @@ -457,10 +467,10 @@ const useDiyStore = defineStore('diy', { //为0时不处理 if (component.uses === 0) return true; - var count = 0; + let count = 0; //遍历已添加的自定义组件,检测是否超出数量 - for (var i in this.value) if (this.value[i].componentName === component.componentName) count++; + for (let i in this.value) if (this.value[i].componentName === component.componentName) count++; if (count >= component.uses) return false; else return true; @@ -510,7 +520,7 @@ const useDiyStore = defineStore('diy', { // this.changeCurrentIndex(-99); // return false; // } - + if (this.global.popWindow.show && !this.global.popWindow.imgUrl) { ElMessage({ message: '请上传弹窗图片', @@ -519,10 +529,10 @@ const useDiyStore = defineStore('diy', { return false; } - for (var i = 0; i < this.value.length; i++) { + for (let i = 0; i < this.value.length; i++) { try { if (this.value[i].verify) { - var res = this.value[i].verify(i); + const res = this.value[i].verify(i); if (!res.code) { this.changeCurrentIndex(i, this.value[i]) ElMessage({ diff --git a/admin/src/stores/modules/poster.ts b/admin/src/stores/modules/poster.ts index c1e2be892..e1cab0989 100644 --- a/admin/src/stores/modules/poster.ts +++ b/admin/src/stores/modules/poster.ts @@ -241,7 +241,7 @@ const usePosterStore = defineStore('poster', { return; } - var index = this.currentIndex + 1; + const index = this.currentIndex + 1; this.value.splice(index, 0, component); this.changeCurrentIndex(index, component); @@ -252,10 +252,10 @@ const usePosterStore = defineStore('poster', { //为0时不处理 if (component.uses === 0) return true; - var count = 0; + let count = 0; //遍历已添加的自定义组件,检测是否超出数量 - for (var i in this.value) if (this.value[i].componentName === component.componentName) count++; + for (let i in this.value) if (this.value[i].componentName === component.componentName) count++; if (count >= component.uses) return false; else return true; @@ -310,10 +310,10 @@ const usePosterStore = defineStore('poster', { return false; } - for (var i = 0; i < this.value.length; i++) { + for (let i = 0; i < this.value.length; i++) { try { if (this.value[i].verify) { - var res = this.value[i].verify(i); + const res = this.value[i].verify(i); if (!res.code) { this.changeCurrentIndex(i, this.value[i]); ElMessage({ diff --git a/admin/src/stores/modules/user.ts b/admin/src/stores/modules/user.ts index f506bdfac..c6c003c2d 100644 --- a/admin/src/stores/modules/user.ts +++ b/admin/src/stores/modules/user.ts @@ -68,6 +68,12 @@ const userStore = defineStore('user', { this.userInfo = {} this.siteInfo = {} removeToken() + window.localStorage.removeItem('admin.token') + window.localStorage.removeItem('admin.userinfo') + window.localStorage.removeItem('admin.siteInfo') + window.localStorage.removeItem('site.token') + window.localStorage.removeItem('site.userinfo') + window.localStorage.removeItem('site.siteInfo') storage.remove(['userinfo', 'siteInfo', 'darksideMarketingKeys', 'defaultMarketingKeys']) this.routers = [] this.rules = [] @@ -75,7 +81,8 @@ const userStore = defineStore('user', { // 清除tabbar useTabbarStore().clearTab() const login = getAppType() == 'admin' ? '/admin/login' : '/site/login' - router.push(login) + // router.push(login) + location.href = `${location.origin}${login}` }, getAuthMenusFn() { return new Promise((resolve, reject) => { diff --git a/admin/src/styles/icon/iconfont.css b/admin/src/styles/icon/iconfont.css index c098073b9..d2dd0d819 100644 --- a/admin/src/styles/icon/iconfont.css +++ b/admin/src/styles/icon/iconfont.css @@ -1,8 +1,8 @@ @font-face { font-family: "iconfont"; /* Project id 3883393 */ - src: url('//at.alicdn.com/t/c/font_3883393_yoxx0oc1k5.woff2?t=1749110697461') format('woff2'), - url('//at.alicdn.com/t/c/font_3883393_yoxx0oc1k5.woff?t=1749110697461') format('woff'), - url('//at.alicdn.com/t/c/font_3883393_yoxx0oc1k5.ttf?t=1749110697461') format('truetype'); + src: url('//at.alicdn.com/t/c/font_3883393_xjme8gg6x1p.woff2?t=1752467138564') format('woff2'), + url('//at.alicdn.com/t/c/font_3883393_xjme8gg6x1p.woff?t=1752467138564') format('woff'), + url('//at.alicdn.com/t/c/font_3883393_xjme8gg6x1p.ttf?t=1752467138564') format('truetype'); } .iconfont { @@ -13,6 +13,74 @@ -moz-osx-font-smoothing: grayscale; } + .iconhuodongguanli:before { + content: "\e8fb"; + } + + .icontuwendaohang:before { + content: "\e8f5"; + } + + .iconmiaoshashangpin:before { + content: "\e8f6"; + } + + .iconbaokuanmiaosha:before { + content: "\e8f7"; + } + + .iconmiaoshamofang:before { + content: "\e8f8"; + } + + .iconhuodongshijian:before { + content: "\e8f9"; + } + + .icontehuimiaosha:before { + content: "\e8fa"; + } + + .icondibucaidan:before { + content: "\e8ee"; + } + + .iconshangpinshuxing:before { + content: "\e8ef"; + } + + .iconjichuxinxi:before { + content: "\e8f0"; + } + + .iconshangpinxiangqing:before { + content: "\e8f1"; + } + + .iconshangpinpingjia1:before { + content: "\e8f2"; + } + + .iconzhongcaoxiu:before { + content: "\e8f3"; + } + + .iconshangpinfuwu1:before { + content: "\e8f4"; + } + + .iconmiaosha:before { + content: "\e8ed"; + } + + .iconchakan:before { + content: "\e8ec"; + } + + .icona-sousuoV6xx-36:before { + content: "\e8eb"; + } + .iconquanxian:before { content: "\e8e2"; } diff --git a/admin/src/utils/common.ts b/admin/src/utils/common.ts index 36bcb47c5..dc000c910 100644 --- a/admin/src/utils/common.ts +++ b/admin/src/utils/common.ts @@ -252,17 +252,17 @@ export function moneyFormat(money: string): string { */ export function timeStampTurnTime(timeStamp: any, type = "") { if (timeStamp != undefined && timeStamp != "" && timeStamp > 0) { - var date = new Date(); + const date = new Date(); date.setTime(timeStamp * 1000); - var y: any = date.getFullYear(); - var m: any = date.getMonth() + 1; + const y: any = date.getFullYear(); + let m: any = date.getMonth() + 1; m = m < 10 ? ('0' + m) : m; - var d: any = date.getDate(); + let d: any = date.getDate(); d = d < 10 ? ('0' + d) : d; - var h: any = date.getHours(); + let h: any = date.getHours(); h = h < 10 ? ('0' + h) : h; - var minute: any = date.getMinutes(); - var second: any = date.getSeconds(); + let minute: any = date.getMinutes(); + let second: any = date.getSeconds(); minute = minute < 10 ? ('0' + minute) : minute; second = second < 10 ? ('0' + second) : second; if (type) { @@ -279,14 +279,34 @@ export function timeStampTurnTime(timeStamp: any, type = "") { } } +/** + * 获取当前日期时间 + */ +export function getCurrentDataTime(timeStamp: any) { + const addZero = (t) => { + return t < 10 ? '0' + t : t; + } + const time = new Date(timeStamp); + let Y = time.getFullYear(), // 年 + M = time.getMonth() + 1, // 月 + D = time.getDate(), // 日 + h = time.getHours(), // 时 + m = time.getMinutes(), // 分 + s = time.getSeconds(); // 秒 + if (M > 12) { + M = M - 12; + } + return `${Y}-${addZero(M)}-${addZero(D)} ${addZero(h)}:${addZero(m)}:${addZero(s)}` +} + /** * 日期格式转时间戳 * @param {Object} date */ export function timeTurnTimeStamp(date: string) { - var f = date.split(' ', 2); - var d = (f[0] ? f[0] : '').split('-', 3); - var t = (f[1] ? f[1] : '').split(':', 3); + const f = date.split(' ', 2); + const d = (f[0] ? f[0] : '').split('-', 3); + const t = (f[1] ? f[1] : '').split(':', 3); return (new Date( parseInt(d[0], 10) || null, (parseInt(d[1], 10) || 1) - 1, @@ -344,18 +364,18 @@ export function filterBlank(event: any) { * @param where */ export function setTablePageStorage(page: any = 1, limit: any = 10, where: any = {}) { - var data = storage.get('tablePageStorage'); + let data = storage.get('tablePageStorage'); if (!data) { data = {}; } - var key = location.pathname + JSON.stringify(where); + const key = location.pathname + JSON.stringify(where); data[key] = { page, limit }; - var MAX_COUNT = 5; // 最多存储 5 个页面的分页缓存,超出则删除最开始的第一个页面 + const MAX_COUNT = 5; // 最多存储 5 个页面的分页缓存,超出则删除最开始的第一个页面 if (Object.keys(data).length > MAX_COUNT) { delete data[Object.keys(data)[0]]; } @@ -368,8 +388,8 @@ export function setTablePageStorage(page: any = 1, limit: any = 10, where: any = * @param where */ export function getTablePageStorage(where: any = {}) { - var data = storage.get('tablePageStorage'); - var key = location.pathname + JSON.stringify(where); + let data = storage.get('tablePageStorage'); + const key = location.pathname + JSON.stringify(where); if (!data || !data[key]) { data = { page: 1, diff --git a/admin/src/utils/request.ts b/admin/src/utils/request.ts index beb872b4b..8005781f3 100644 --- a/admin/src/utils/request.ts +++ b/admin/src/utils/request.ts @@ -85,6 +85,7 @@ class Request { /** * 发送get请求 * @param url + * @param data * @param config * @returns */ @@ -95,6 +96,7 @@ class Request { /** * 发送get请求 * @param url + * @param data * @param config * @returns */