diff --git a/src/api/index.js b/src/api/index.js index ff32b19..be43a6b 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -91,6 +91,8 @@ export default { delSeo: `/iasf/seo/delete`, seoList: `/iasf/seo/list`, updateSeo: `/iasf/seo/update`, + saveLogo: `/iasf/LogoService/Logo/saveOrUpdate`, + findLogo: `/iasf/LogoService/Logo/findById`, batchDeletionFloating: `/iasf/SysFloatingColumnSchemeService/SysFloatingColumnScheme/batchDeletion`, findFloating: `/iasf/SysFloatingColumnSchemeService/SysFloatingColumnScheme/findById`, diff --git a/src/assets/images/page/shop.png b/src/assets/images/page/shop.png new file mode 100644 index 0000000..a252bbe Binary files /dev/null and b/src/assets/images/page/shop.png differ diff --git a/src/components/modules/content.vue b/src/components/modules/content.vue index b2af1ac..393dbf2 100644 --- a/src/components/modules/content.vue +++ b/src/components/modules/content.vue @@ -12,7 +12,7 @@
@@ -35,6 +35,17 @@

只支持.jpg,.png格式

+ + + + @@ -64,7 +64,7 @@

上传图片

-

只支持.jpg,.png格式

+

只支持.jpg,.png,.mp4格式

- - + + @@ -91,45 +78,54 @@ export default { \ No newline at end of file diff --git a/src/pages/column/page/shop.vue b/src/pages/column/page/shop.vue new file mode 100644 index 0000000..9a835d8 --- /dev/null +++ b/src/pages/column/page/shop.vue @@ -0,0 +1,131 @@ + + + + + \ No newline at end of file diff --git a/src/pages/floatingFrame/index.vue b/src/pages/floatingFrame/index.vue index b33bec0..6b2c6cf 100644 --- a/src/pages/floatingFrame/index.vue +++ b/src/pages/floatingFrame/index.vue @@ -366,7 +366,7 @@ export default { applicationScopeId: 0 }] } - form.isDisable = 1 + // form.isDisable = 1 if (!form.floatingBarSchemeId) form.founderId = form.editorId // 新增则创建人即编辑人 try { await this.$post(this.api.saveFloating, form) diff --git a/src/pages/footer/index.vue b/src/pages/footer/index.vue index 2f98e84..8138298 100644 --- a/src/pages/footer/index.vue +++ b/src/pages/footer/index.vue @@ -351,7 +351,7 @@ export default { }] } form.footerContent = JSON.stringify(this.modules) - form.isDisable = 1 + // form.isDisable = 1 if (!form.footerId) form.founderId = form.editorId // 新增则创建人即编辑人 try { await this.$post(this.api.saveFooter, form) diff --git a/src/pages/logo/index.vue b/src/pages/logo/index.vue new file mode 100644 index 0000000..cf06497 --- /dev/null +++ b/src/pages/logo/index.vue @@ -0,0 +1,105 @@ + + + + + \ No newline at end of file diff --git a/src/pages/seo/index.vue b/src/pages/seo/index.vue index 9563ca6..c8636c1 100644 --- a/src/pages/seo/index.vue +++ b/src/pages/seo/index.vue @@ -63,7 +63,7 @@ export default { this.$get(this.api.seoList, { siteId: this.siteId, }).then(({ data }) => { - this.form = data[0] + if (data.length) this.form = data[0] }).catch(err => { }) }, // 保存 @@ -72,7 +72,7 @@ export default { if (valid) { if (this.submiting) return false this.submiting = true - this.$post(this.api.updateSeo, this.form).then(res => { + this.$post(this.api[this.form.id ? 'updateSeo' : 'addSeo'], this.form).then(res => { Util.successMsg('保存成功!') this.submiting = false }).catch(res => { diff --git a/src/plugins/requests/index.js b/src/plugins/requests/index.js index 0cd208f..ddc36cc 100644 --- a/src/plugins/requests/index.js +++ b/src/plugins/requests/index.js @@ -2,6 +2,7 @@ import axios from 'axios' import Util from '@/libs/util' import Setting from '@/setting' import store from '@/store' +import Router from '@/router' const service = axios.create({ baseURL: Setting.apiBaseURL, @@ -51,37 +52,42 @@ service.interceptors.response.use( error => { if (error.response.status) { const { msg, code } = error.response.data - switch (code) { - // 401: 未登录 - case 401: - Util.errorMsg("登录过期,请重新登录"); - setTimeout(() => { - store.dispatch('user/logout') - }, 1000); - break; - // 403 token过期 - case 403: - Util.errorMsg("登录过期,请重新登录"); - setTimeout(() => { - store.dispatch('user/logout') - }, 1000); - break; - // 其他错误,直接抛出错误提示 - default: - Util.errorMsg(msg); - Promise.reject(error.response.data); + // 站点id为空 + if (error.response.status === 405) { + Router.replace('/site') + } else { + switch (code) { + // 401: 未登录 + case 401: + Util.errorMsg("登录过期,请重新登录") + setTimeout(() => { + store.dispatch('user/logout') + }, 1000) + break + // 403 token过期 + case 403: + Util.errorMsg("登录过期,请重新登录") + setTimeout(() => { + store.dispatch('user/logout') + }, 1000) + break + // 其他错误,直接抛出错误提示 + default: + Util.errorMsg(msg) + Promise.reject(error.response.data) + } + return Promise.reject(error.response) } - return Promise.reject(error.response); } } -); +) function get (url, params) { return new Promise((resolve, reject) => { service.get(url, { params: params }).then(res => { - resolve(res); + resolve(res) }).catch(err => { - reject(err); + reject(err) }); }); } diff --git a/src/router/modules/column.js b/src/router/modules/column.js index 7a3d12c..500d4db 100644 --- a/src/router/modules/column.js +++ b/src/router/modules/column.js @@ -53,7 +53,7 @@ export default { path: `careers`, component: () => import('@/pages/column/page/careers'), meta: { title: 'CAREERS' } - },, + }, , { name: `${pre}edu`, path: `edu`, @@ -267,5 +267,10 @@ export default { component: () => import('@/pages/column/page/aboutUs'), meta: { title: '关于我们' } }, + { + path: `shop`, + component: () => import('@/pages/column/page/shop'), + meta: { title: '产品中心' } + }, ] } diff --git a/src/router/modules/logo.js b/src/router/modules/logo.js new file mode 100644 index 0000000..90d255e --- /dev/null +++ b/src/router/modules/logo.js @@ -0,0 +1,16 @@ +import BasicLayout from '@/layouts/home' + +const meta = {} + +export default { + path: '/logo', + meta, + component: BasicLayout, + children: [ + { + path: `/logo`, + component: () => import('@/pages/logo'), + meta: { title: '网站logo设置' } + }, + ] +} diff --git a/src/router/modules/seo.js b/src/router/modules/seo.js index 9dfc16a..d2c209d 100644 --- a/src/router/modules/seo.js +++ b/src/router/modules/seo.js @@ -5,14 +5,14 @@ const meta = {} const pre = 'article-' export default { - path: '/seo', - meta, - component: BasicLayout, - children: [ - { - path: `/seo`, - component: () => import('@/pages/seo'), - meta: { title: 'SEO管理' } - }, - ] + path: '/seo', + meta, + component: BasicLayout, + children: [ + { + path: `/seo`, + component: () => import('@/pages/seo'), + meta: { title: 'SEO管理' } + }, + ] } diff --git a/src/setting.js b/src/setting.js index e2b7b9b..8cd23f3 100644 --- a/src/setting.js +++ b/src/setting.js @@ -5,7 +5,7 @@ const isDev = process.env.NODE_ENV === 'development' // 开发环境 let host = location.origin if (isDev) { host = 'https://huorantech.com' - // host = 'http://192.168.31.217:10000' + host = 'http://192.168.31.217:10000' } const Setting = { @@ -16,8 +16,7 @@ const Setting = { routerMode: "hash", // 路由模式,可选值为 history 或 hash showProgressBar: true, // 页面切换时,是否显示模拟的进度条 apiBaseURL: host, // 接口请求地址 - // huoranApi: `https://occupationlab.com`, - huoranApi: `http://121.37.12.51`, + huoranApi: `https://occupationlab.com`, autoLogoutTime: 1000 * 60 * 60 * 3, // 长时间未操作,自动退出登录时间 modalDuration: 3, // 接口请求返回错误时,弹窗的持续时间,单位:秒 errorModalType: "Message", // 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice