diff --git a/src/apis/modules/activities.js b/src/apis/modules/activities.js
index 9b07c1c..71b5ab4 100644
--- a/src/apis/modules/activities.js
+++ b/src/apis/modules/activities.js
@@ -1,6 +1,6 @@
import request from '@/utils/request'
-//获取产品优势列表
+//获取活动列表
export const getActiveList = (params) => request.basic.get('/api/v1/active', params)
//获取单个banner
diff --git a/src/apis/modules/banner.js b/src/apis/modules/banner.js
index e708ba0..1d12552 100644
--- a/src/apis/modules/banner.js
+++ b/src/apis/modules/banner.js
@@ -3,11 +3,12 @@ import request from '@/utils/request'
//获取banner列表
export const getBannerList = (params) => request.basic.get('/api/v1/banners', params)
-//获取单个banner
+//获取单个图片
export const getBanner = (id) => request.basic.get(`/api/v1/banners/${id}`)
//创建banner
export const createBanner = (data) => request.basic.post('/api/v1/banners', data)
-//更新banner
+
+//编辑banner
export const updateBanner = (id, data) => request.basic.put(`/api/v1/banners/${id}`, data)
//删除banner
export const deleteBanner = (id) => request.basic.delete(`/api/v1/banners/${id}`)
\ No newline at end of file
diff --git a/src/apis/modules/host.js b/src/apis/modules/host.js
index 55caa82..b60a607 100644
--- a/src/apis/modules/host.js
+++ b/src/apis/modules/host.js
@@ -2,21 +2,11 @@
* 权限接口
*/
import request from '@/utils/request'
-// 获取role列表
+// 获取主机列表
export const getPageList = (params) => request.basic.get('/api/v1/power-hosts', params)
-// 获取role条数据
-export const getPage = (id) => request.basic.get(`/api/v1/power-hosts/${id}`)
-// 添加role
-export const createPage = (params) => request.basic.post('/api/v1/power-hosts', params)
-// 更新role
-export const updatePage = (id, params) => request.basic.put(`/api/v1/power-hosts/${id}`, params)
-// 删除role
-export const delPage = (id) => request.basic.delete(`/api/v1/power-hosts/${id}`)
-//获取区域列表
-export const getRegionList = (params) => request.basic.get('/api/v1/computing-power-centers/label', params)
-//添加算力卡
-export const createComputeCard = (params) => request.basic.post('/api/v1/computing-cards', params)
-//获取算力卡列表
-export const getComputeCardList = (params) => request.basic.get('/api/v1/computing-cards', params)
-//删除算力卡
-export const delComputeCard = (id) => request.basic.delete(`/api/v1/computing-cards/${id}`)
\ No newline at end of file
+// 删除主机列表
+export const delHost = (id) => request.basic.delete(`/api/v1/power-hosts/${id}`)
+// 编辑主机列表
+export const updateHost = (id, params) => request.basic.put(`/api/v1/power-hosts/${id}`, params)
+// 获取主机详情
+export const getHostDetail = (id) => request.basic.delete(`/api/v1/power-hosts//${id}`)
diff --git a/src/apis/modules/platform.js b/src/apis/modules/platform.js
index cc2de92..6abdcae 100644
--- a/src/apis/modules/platform.js
+++ b/src/apis/modules/platform.js
@@ -3,12 +3,23 @@ import request from '@/utils/request'
//获取标签列表
export const getTagList = (params) => request.basic.get('/api/v1/home-top-labels', params)
-//获取算力卡列表
-export const getCardsList = (params) => request.basic.get('/api/v1/cards', params)
+// 新增标签
+export const createTag = (data) => request.basic.post('/api/v1/home-top-labels', data)
-//获取算力中心列表
-export const getCentersList = (params) => request.basic.get('/api/v1/centers', params)
+// 编辑标签
+export const updateTag = (id, data) => request.basic.put(`/api/v1/home-top-labels/${id}`, data)
+// 删除标签
+export const deleteTag = (id) => request.basic.delete(`/api/v1/home-top-labels/${id}`)
+
+//获取产品优势列表
+export const getAdvanceList = (params) => request.basic.get('/api/v1/advance', params)
+
+// 新增产品优势
+export const createAdvance = (data) => request.basic.post('/api/v1/advance', data)
+
+// 编辑产品优势
+export const updateAdvance = (id, data) => request.basic.put(`/api/v1/advance/${id}`, data)
//获取单个banner
export const getBanner = (id) => request.basic.get(`/api/v1/banners/${id}`)
diff --git a/src/router/routes/bannerMgt.js b/src/router/routes/bannerMgt.js
deleted file mode 100644
index 0d4a36d..0000000
--- a/src/router/routes/bannerMgt.js
+++ /dev/null
@@ -1,30 +0,0 @@
-import { SettingOutlined } from '@ant-design/icons-vue'
-
-export default [
- {
- path: 'bannerMgt',
- name: 'bannerMgt',
- component: 'RouteViewLayout',
- meta: {
- icon: 'icon-zhifudingjin',
- title: '图片管理',
- isMenu: true,
- keepAlive: true,
- permission: '*',
- },
- children: [
- {
- path: 'bannerList',
- name: 'bannerList',
- component: 'bannerMgt/bannerList/index.vue',
- meta: {
- title: '图片列表',
- isMenu: true,
- keepAlive: true,
- permission: '*',
- },
- },
- ],
- }
-
-]
diff --git a/src/router/routes/index.js b/src/router/routes/index.js
index 7c4b036..0900b0e 100644
--- a/src/router/routes/index.js
+++ b/src/router/routes/index.js
@@ -30,7 +30,6 @@ import withdrawal from './withdrawal'
import invoice from './invoice'
import activities from './activities'
import systemSettings from './systemSettings'
-import bannerMgt from './bannerMgt'
import platform from './platform'
export default [
...home,
@@ -65,6 +64,5 @@ export default [
...invoice,
...activities,
...systemSettings,
- ...bannerMgt,
...platform,
]
diff --git a/src/views/bannerMgt/bannerList/components/EditDialog.vue b/src/views/bannerMgt/bannerList/components/EditDialog.vue
deleted file mode 100644
index aa18d80..0000000
--- a/src/views/bannerMgt/bannerList/components/EditDialog.vue
+++ /dev/null
@@ -1,158 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/bannerMgt/bannerList/index.vue b/src/views/bannerMgt/bannerList/index.vue
deleted file mode 100644
index dea0c4c..0000000
--- a/src/views/bannerMgt/bannerList/index.vue
+++ /dev/null
@@ -1,211 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
- {{ $t('button.reset') }}
-
- {{ $t('button.search') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 添加图片
-
-
-
-
-
-
-
- 首页轮播图
-
-
-
- 营销活动图
-
-
-
-
-
-
- 启用
-
-
-
- 禁用
-
-
-
-
-
- {{ formatUtcDateTime(record.created_at) }}
-
-
-
-
-
- {{ $t('pages.system.role.edit') }}
-
-
-
-
-
- {{ $t('pages.system.delete') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/computing/host/components/EditDialog.vue b/src/views/computing/host/components/EditDialog.vue
index aa18d80..f8c475f 100644
--- a/src/views/computing/host/components/EditDialog.vue
+++ b/src/views/computing/host/components/EditDialog.vue
@@ -80,7 +80,7 @@ async function handleEdit(record = {}) {
title: t('pages.system.role.edit'),
})
- const { data, success } = await apis.role.getRole(record.id).catch()
+ const { data, success } = await apis.host.getHostDetail(record.id).catch()
if (!success) {
message.error(t('component.message.error.save'))
hideModal()
@@ -115,7 +115,7 @@ function handleOk() {
})
break
case 'edit':
- result = await apis.banner.updateBanner(formData.value.id, params).catch(() => {
+ result = await apis.host.updateHost(formData.value.id, params).catch(() => {
throw new Error()
})
break
diff --git a/src/views/computing/host/index.vue b/src/views/computing/host/index.vue
index 27b3ee5..5f3b6e3 100644
--- a/src/views/computing/host/index.vue
+++ b/src/views/computing/host/index.vue
@@ -215,7 +215,7 @@ function handleRemove({ id }) {
return new Promise((resolve, reject) => {
; (async () => {
try {
- const { success } = await apis.role.delRole(id).catch(() => {
+ const { success } = await apis.host.delHost(id).catch(() => {
throw new Error()
})
if (config('http.code.success') === success) {
diff --git a/src/views/platform/bannerList/components/EditDialog.vue b/src/views/platform/bannerList/components/EditDialog.vue
index aa18d80..df03b10 100644
--- a/src/views/platform/bannerList/components/EditDialog.vue
+++ b/src/views/platform/bannerList/components/EditDialog.vue
@@ -5,21 +5,29 @@
-
+
-
-
+
+
-
-
+
+
+
+
+
+
@@ -54,7 +62,7 @@ const { formRecord, formData, formRef, formRules, resetForm } = useForm()
const { t } = useI18n() // 解构出t方法
const cancelText = ref(t('button.cancel'))
const okText = ref(t('button.confirm'))
-formData.value.enabled='enabled'
+formData.value.enabled = 'enabled'
formRules.value = {
name: { required: true, message: t('pages.system.role.form.name.placeholder') },
code: { required: true, message: t('pages.system.role.form.code.placeholder') },
@@ -65,9 +73,10 @@ formRules.value = {
* 新建
*/
function handleCreate() {
+ console.log('添加handleCreate')
showModal({
type: 'create',
- title: t('pages.system.role.add'),
+ title: '添加图片',
})
}
@@ -77,22 +86,16 @@ function handleCreate() {
async function handleEdit(record = {}) {
showModal({
type: 'edit',
- title: t('pages.system.role.edit'),
+ title: '编辑图片',
})
- const { data, success } = await apis.role.getRole(record.id).catch()
+ const { data, success } = await apis.banner.getBanner(record.id).catch()
if (!success) {
message.error(t('component.message.error.save'))
hideModal()
return
}
- let menus = []
- if (data.menus) {
- for (let item of data.menus) {
- menus.push(item.menu_id)
- }
- }
- checkedKeys.value = menus
+
formRecord.value = data
formData.value = cloneDeep(data)
}
@@ -106,7 +109,7 @@ function handleOk() {
.then(async (values) => {
try {
showLoading()
- const params = {...values}
+ const params = { ...values }
let result = null
switch (modal.value.type) {
case 'create':
diff --git a/src/views/platform/bannerList/index.vue b/src/views/platform/bannerList/index.vue
index dea0c4c..9f01633 100644
--- a/src/views/platform/bannerList/index.vue
+++ b/src/views/platform/bannerList/index.vue
@@ -35,9 +35,9 @@
-
+
-
+
首页轮播图
@@ -104,7 +104,7 @@ const { t } = useI18n() // 解构出t方法
const columns = [
{ title: '缩略图', dataIndex: 'code', width: 200 },
{ title: '名称', dataIndex: 'name', width: 150 },
- { title: '类型', dataIndex: 'banner_type', key: 'banner_type', width: 150 },
+ { title: '类型', dataIndex: 'type', key: 'type', width: 150 },
{ title: t('pages.system.role.form.created_at'), key: 'createAt', fixed: 'right', width: 120 },
{ title: '是否启用', key: 'is_recommend', fixed: 'is_recommend', width: 120 },
{ title: t('button.action'), key: 'action', fixed: 'right', width: 120 },
@@ -149,14 +149,14 @@ async function getPageList() {
*/
function handleRemove({ id }) {
Modal.confirm({
- title: t('pages.system.role.delTip'),
+ title: '是否确认删除该图片?',
content: t('button.confirm'),
okText: t('button.confirm'),
onOk: () => {
return new Promise((resolve, reject) => {
; (async () => {
try {
- const { success } = await apis.role.delRole(id).catch(() => {
+ const { success } = await apis.banner.deleteBanner(id).catch(() => {
throw new Error()
})
if (config('http.code.success') === success) {
@@ -195,8 +195,8 @@ function handleResetSearch() {
* 搜索
*/
function handleSearch() {
- resetForm()
- resetPagination()
+ // resetForm()
+ // resetPagination()
getPageList()
}
diff --git a/src/views/platform/platformList/components/EditDialog.vue b/src/views/platform/platformList/components/EditDialog.vue
index 51f7a3a..7717d34 100644
--- a/src/views/platform/platformList/components/EditDialog.vue
+++ b/src/views/platform/platformList/components/EditDialog.vue
@@ -1,60 +1,101 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+