From 76b4122f1c143b9b871b010e5f2b9d77c3e445ce Mon Sep 17 00:00:00 2001 From: Double-_-Z <2492419643@qq.com> Date: Mon, 16 Dec 2024 22:04:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E5=90=88=E4=B8=9A=E5=8A=A1=E6=A8=A1?= =?UTF-8?q?=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 4 +- src/api/service/apply/index.ts | 50 ++++ src/assets/logo.png | Bin 0 -> 1931 bytes src/i18n/lang/en.ts | 12 +- src/i18n/lang/zh-cn.ts | 12 +- src/i18n/lang/zh-tw.ts | 12 +- src/layout/logo/index.vue | 2 +- src/router/route.ts | 60 ++-- src/stores/themeConfig.ts | 18 +- src/utils/request.ts | 2 + src/views/carousel/index.vue | 46 +-- src/views/login/component/account.vue | 2 +- src/views/login/index.vue | 2 +- src/views/message/index.vue | 1 + src/views/photos/index.vue | 19 +- src/views/service/apply/detail.vue | 96 +++++++ src/views/service/apply/dialog.vue | 319 +++++++++++++++++++++ src/views/service/apply/index.vue | 397 ++++++++++++++++++++++++++ src/views/website/index.vue | 9 +- vite.config.ts | 23 +- 20 files changed, 995 insertions(+), 91 deletions(-) create mode 100644 src/api/service/apply/index.ts create mode 100644 src/assets/logo.png create mode 100644 src/views/service/apply/detail.vue create mode 100644 src/views/service/apply/dialog.vue create mode 100644 src/views/service/apply/index.vue diff --git a/src/App.vue b/src/App.vue index f9f3119..7c2f400 100644 --- a/src/App.vue +++ b/src/App.vue @@ -20,7 +20,7 @@ import other from '/@/utils/other'; import { Local, Session } from '/@/utils/storage'; import mittBus from '/@/utils/mitt'; import setIntroduction from '/@/utils/setIconfont'; -import logoMini from '/@/assets/logo-mini.svg'; +import logoMini from '/@/assets/logo.png'; // 引入组件 const LockScreen = defineAsyncComponent(() => import('/@/layout/lockScreen/index.vue')); @@ -74,7 +74,7 @@ const getGlobalI18n = computed(() => { let link: any = document.querySelector("link[rel*='icon']") || document.createElement("link"); link.type = "image/x-icon"; link.rel = "shortcut icon"; -link.href = themeConfig.value.logoMini||logoMini; +link.href = themeConfig.logoMini||logoMini; document.getElementsByTagName("head")[0].appendChild(link); // 设置初始化,防止刷新时恢复默认 diff --git a/src/api/service/apply/index.ts b/src/api/service/apply/index.ts new file mode 100644 index 0000000..dd03ac4 --- /dev/null +++ b/src/api/service/apply/index.ts @@ -0,0 +1,50 @@ +import request from '/@/utils/request'; +import { pixelUrlHost } from '/@/api/baseUrlHost'; + +/** + * (不建议写成 request.post(xxx),因为这样 post 时,无法 params 与 data 同时传参) + * 注意在写get请求时,参数是params,而不是data,要标注好 + * + * 登录api接口集合 + * @method getServicesList 获取应用服务列表 + * @method getApplyDetail 获取应用服务详情 + * @method updateApply 更新应用服务 + */ + +export function applyApi() { + return { + getServicesList: (params: object) => { + return request({ + url: pixelUrlHost + '/paServices', + method: 'get', + params, + }); + }, + getApplyDetail: (id: Number) => { + return request({ + url: pixelUrlHost + `/paServices/${id}`, + method: 'get', + }); + }, + saveApply: (data: object) => { + return request({ + url: pixelUrlHost + '/paServices', + method: 'post', + data, + }) + }, + updateApply: (data: object) => { + return request({ + url: pixelUrlHost + '/paServices', + method: 'put', + data, + }) + }, + deleteApply: (id: Number) => { + return request({ + url: pixelUrlHost + `/paServices/${id}`, + method: 'delete', + }); + }, + }; +} diff --git a/src/assets/logo.png b/src/assets/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..84023e9d6f49f4870b0f425c2aa3936fb43f59d3 GIT binary patch literal 1931 zcmV;62Xy#}P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf6951U69E94oEQKA2OvpAK~z{r%~*YG zQ&ki{_jT>ouff)JFbZq~9kPLpfsB9y0vRw!m<)CBhp>bIBHySn2LD(HCPpODU}8XK zV4yISkC=!dsF@H98#4?ELlBtAzQ?wfu3g*L_nzmx-VH`6pL6XmdFj39-uLeB{qDKv zoL8nO3Oowc)zz8j&!3-i`t<3XmX?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r0}N!S0n> z82&GvVo?^gcmtFC{wPTfy^W6pgWl-k&Bp){ZnX}B!m^Nr9Z;KEt>pdW$H@$0JOX+h zQ$3G_rS`MI4-z`q<3FYg8k21B%CV3twJLjyoS1EhEIB?M3>g=pOG33t@n^Z7ge)N- zmJn)N>xMSN4+{h^x`-?{h7rU;kafuCfrRUnFIUvT&13^k;HI#Hfd(^!*%?ImHZ%-r zgChm;5Z^9ypA9!Cu|$EsE169@6-4+3lrC+Cromb;;g?$^xC6yupH71noEfH`xsPy5 zqM#gJBw=QGSoY~pD7ecW=!i>!+>=;YV6?gi^-9U|TDUPH2Ic3bu!6`+;1~d4ZB1q? zcayD$u!4d45<9#o79AU1JR*D-%UVHX_JL_gR)D}C+C7Aup{&rU)TZjt9k?lMAZ01@ zdoTdllvlq`gSDRrMo3D`bTYKZmn-vs^kcr(Mu z@WS = [ } ] }, + /** + * + * 业务模块start + * @name 业务模块 + * 应用服务路由——/apply + * + */ // 应用管理 - // { - // path: '/apply', - // name: 'apply', - // component: () => import('/@/views/apply/index.vue'), - // meta: { - // title: 'message.router.apply', - // isLink: '', - // isHide: false, - // isKeepAlive: true, - // isAffix: false, - // isIframe: false, - // roles: ['admin', 'common'], - // icon: 'iconfont icon-crew_feature', - // }, - // children: [] - // }, + { + path: '/apply', + name: 'apply', + component: () => import('/@/views/service/apply/index.vue'), + meta: { + title: 'message.router.apply', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + roles: ['admin', 'common'], + icon: 'iconfont icon-crew_feature', + }, + children: [ + // { + // path: '/apply/detail', + // name: 'applyDetail', + // component: () => import('/@/views/service/apply/detail.vue'), + // meta: { + // title: 'message.router.applyDetail', + // isLink: '', + // isHide: true, + // isKeepAlive: true, + // isAffix: false, + // isIframe: false, + // roles: ['admin', 'common'], + // icon: 'ele-Document', + // }, + // }, + ] + }, + + /** + * 业务模块end + */ + // 轮播图管理 { path: '/carousel', diff --git a/src/stores/themeConfig.ts b/src/stores/themeConfig.ts index 364167b..34cc5d9 100644 --- a/src/stores/themeConfig.ts +++ b/src/stores/themeConfig.ts @@ -78,7 +78,7 @@ export const useThemeConfig = defineStore('themeConfig', { * 界面显示 */ // 是否开启侧边栏 Logo - isShowLogo: false, + isShowLogo: true, // 初始化变量,用于 el-scrollbar 的高度更新,请勿删除 isShowLogoChange: false, // 是否开启 Breadcrumb,强制经典、横向布局不显示 @@ -102,13 +102,13 @@ export const useThemeConfig = defineStore('themeConfig', { // 是否开启色弱模式 isInvert: false, // 是否开启水印 - isWartermark: true, + isWartermark: false, // 水印文案 - wartermarkText: 'vue-next-admin', + wartermarkText: 'pixel.ai制图后台', // 页脚版权信息内容 - globalFootTitleMsg: '深圳市 xxx 公司版权所有', + globalFootTitleMsg: '广州市 xxx 公司版权所有', // 页脚tip - globalFootTipMsg: 'vue-next-admin,Made by lyt with ❤️', + globalFootTipMsg: 'ai创作,专享您的制图~~~', /** * 其它设置 @@ -141,17 +141,17 @@ export const useThemeConfig = defineStore('themeConfig', { * 全局网站标题 / 副标题 */ // 网站主标题(菜单导航、浏览器当前网页标题) - globalTitle: 'vue-next-admin', + globalTitle: 'pixel.ai制图后台', // 网站副标题(登录页顶部文字) - globalViceTitle: 'vueNextAdmin', + globalViceTitle: 'pixel.ai', // 网站副标题(登录页顶部文字) - globalViceTitleMsg: '专注、免费、开源、维护、解疑', + globalViceTitleMsg: '多种类、多趣味、多质图', // 默认初始语言,可选值"",默认 zh-cn globalI18n: 'zh-cn', // 默认全局组件大小,可选值"",默认 'large' globalComponentSize: 'large', // 网站logo - logoMini: '/@/assets/logo-mini.svg', + logoMini: '/@/assets/logo.png', }, }), actions: { diff --git a/src/utils/request.ts b/src/utils/request.ts index 6ba16fe..9719205 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -44,6 +44,8 @@ service.interceptors.response.use( ElMessageBox.alert('你已被登出,请重新登录', '提示', {}) .then(() => {}) .catch(() => {}); + }else if(res.code === 502 && res.errorMsg){ + return res; } return Promise.reject(service.interceptors.response); } else { diff --git a/src/views/carousel/index.vue b/src/views/carousel/index.vue index 2ca2102..eda0f52 100644 --- a/src/views/carousel/index.vue +++ b/src/views/carousel/index.vue @@ -24,22 +24,23 @@ --> - - + + - + - - + +