zsk 11 months ago
parent 6bd83f0157
commit bbeda9e09f

@ -1,6 +1,6 @@
import request from "../utils/request";
// 获取轮播列表
// 获取中奖列表
export function getCarouselListApi(page, limit = 10) {
return request({
url: `/admin/banner/${page}/${limit}`,
@ -8,7 +8,7 @@ export function getCarouselListApi(page, limit = 10) {
});
}
// 保存轮播
// 保存中奖
export function saveCarouselApi(data) {
return request({
url: `/admin/banner/save`,
@ -17,7 +17,7 @@ export function saveCarouselApi(data) {
});
}
// 删除轮播
// 删除中奖
export function deleteCarouselApi(id) {
return request({
url: `/admin/banner/remove/${id}`,
@ -25,7 +25,7 @@ export function deleteCarouselApi(id) {
});
}
// 修改轮播
// 修改中奖
export function updateCarouselApi(data) {
return request({
url: `/admin/banner/update`,

@ -52,7 +52,7 @@ const router = createRouter({
path: "/merchantManagement/message",
name: "message",
meta: {
title: '轮播管理',
title: '中奖管理',
},
component: () => import("../views/message/index.vue")
},

@ -63,7 +63,7 @@ export let mockMenuList = {
"createTime": "",
"updateTime": "",
"deleted": 0,
"title": "轮播管理",
"title": "中奖管理",
"menuName": "message",
"parentName": "",
"path": "message",

@ -48,7 +48,7 @@
</template>
<script setup>
/*
/*
* @params list 展示的数组
* @params size 尺寸对象形式存放图片的宽高
* @params num 默认显示的数量数值类型

@ -92,7 +92,7 @@
<div class="g_c_7 desc" v-if="info.desc_yq == '-'"></div>
<div v-html="info.desc_yq || '-'" style="white-space: pre-line" class="g_c_7 desc" v-else></div>
</div>
<!-- 轮播 -->
<!-- 中奖 -->
<div class="m-swiper-box" style="padding-top: 0.8rem; border-top: 1px solid #f5f5f5">
<div v-if="info.list.length == 0">
<img src="../../../assets/image/shareJob/nopicture.png" class="empty-img" />

@ -41,7 +41,7 @@
<a-modal
v-model:visible="modalVisible"
:title="modalMode === 'add' ? '新增轮播图' : '编辑轮播图'"
:title="modalMode === 'add' ? '新增中奖图' : '编辑中奖图'"
@ok="handleModalOk"
@cancel="handleModalCancel"
width="800px"
@ -146,7 +146,7 @@ const handleModalOk = async () => {
try {
const data = {
title: formState.title,
img: formState.img,
img: processImagePath(formState.img),
status: formState.status
};
if (modalMode.value === 'add') {
@ -166,6 +166,14 @@ const handleModalOk = async () => {
}
};
const processImagePath = (imgPath) => {
const urlPrefix = 'http://123.249.121.26:8801/images/';
if (imgPath.startsWith(urlPrefix)) {
return imgPath.substring(urlPrefix.length);
}
return imgPath;
};
const handleModalCancel = () => {
modalVisible.value = false;
};

Loading…
Cancel
Save