From 7dd33ed9e613e446cc7780a92074b89f12f47da1 Mon Sep 17 00:00:00 2001
From: xk_chenlianjie <15255791639@163.com>
Date: Mon, 15 Jan 2024 18:55:40 +0800
Subject: [PATCH] =?UTF-8?q?=E8=90=A5=E9=94=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/finance/marketing.js | 39 ++++
.../advertisement/advertisementAdd.vue | 12 +-
.../advertisement/advertisementList.vue | 51 ++++-
.../advertisement/advertisementUpdate.vue | 4 +-
src/views/marketing/home/homeFreshList.vue | 89 ++++++--
src/views/marketing/home/homeLikeList.vue | 85 ++++++--
.../marketing/home/homePopularityList.vue | 87 ++++++--
.../marketing/home/homeProductListAdd.vue | 159 ++++++++++++++
src/views/marketing/home/moduleSetting.vue | 198 ++++++++++++++++++
vue.config.js | 3 +-
10 files changed, 669 insertions(+), 58 deletions(-)
create mode 100644 src/views/marketing/home/homeProductListAdd.vue
diff --git a/src/api/finance/marketing.js b/src/api/finance/marketing.js
index f0631ea..8a5110e 100644
--- a/src/api/finance/marketing.js
+++ b/src/api/finance/marketing.js
@@ -84,5 +84,44 @@ export default {
method: 'post',
data: page
})
+ },
+ chooseProducts(page) {
+ // 选择商品新增推荐
+ return request({
+ url: `/${service_name}/${new_group_name}/chooseProducts`,
+ method: 'post',
+ data: page
+ })
+ },
+ getModuleByPage(page) {
+ // 模块分页查询
+ return request({
+ url: `/${service_name}/mallModule/getByPage`,
+ method: 'post',
+ data: page
+ })
+ },
+ getProductByPage(page) {
+ // 商品分页查询
+ return request({
+ url: `/${service_name}/mallProductInfo/getByPage`,
+ method: 'post',
+ data: page
+ })
+ },
+ updateModule(page) {
+ // 模块显示隐藏
+ return request({
+ url: `/${service_name}/mallModule/update`,
+ method: 'post',
+ data: page
+ })
+ },
+ fluctuation(id, type) {
+ // 模块上下移动
+ return request({
+ url: `/${service_name}/mallModule/fluctuation/${id}/${type}`,
+ method: 'get'
+ })
}
}
diff --git a/src/views/marketing/advertisement/advertisementAdd.vue b/src/views/marketing/advertisement/advertisementAdd.vue
index b86aa71..97bd073 100644
--- a/src/views/marketing/advertisement/advertisementAdd.vue
+++ b/src/views/marketing/advertisement/advertisementAdd.vue
@@ -26,10 +26,10 @@
-
+
- 上线
- 下线
+ 上线
+ 下线
@@ -44,14 +44,14 @@
-
+
提交
- 取消
+ 取消
@@ -65,7 +65,7 @@ export default {
components: { upload },
data() {
return {
- advertisement: { isDownline: '1' },
+ advertisement: { isDownline: '1', positionImage: '' },
rules: {
advertiseName: [{ required: true, message: '请输入广告名称', trigger: 'blur' }],
diff --git a/src/views/marketing/advertisement/advertisementList.vue b/src/views/marketing/advertisement/advertisementList.vue
index 79dc8c7..c08aed0 100644
--- a/src/views/marketing/advertisement/advertisementList.vue
+++ b/src/views/marketing/advertisement/advertisementList.vue
@@ -7,7 +7,7 @@
-
+
@@ -28,7 +28,7 @@
删除
-
+
@@ -82,11 +82,11 @@
-
+
-
+
@@ -109,6 +109,7 @@ export default {
updateDialog: false, // 修改弹窗
treeSelect: [],
FromData: null,
+ multipleSelection: [],
advertisement: {},
grid: {
xl: 7,
@@ -126,14 +127,41 @@ export default {
totalCount: 0
},
total: 0,
- tableData: []
+ tableData: [],
+ delData: { ids: [] }
}
},
mounted() {
this.getList()
},
methods: {
- handleCommand(e) {},
+ // 批量设置商品
+ batchSelect(type) {
+ this.delData = {}
+ if (!this.multipleSelection || this.multipleSelection.length < 1) {
+ this.$message.error('请选择需要操作的数据')
+ return
+ }
+ this.$alert('确定批量删除?', '提示', {
+ confirmButtonText: '确定',
+ callback: action => {
+ if (action == 'confirm') {
+ this.delData = Object.assign(this.delData, { ids: this.multipleSelection })
+
+ loadingFn.call(
+ this,
+ 'loading',
+ marketingApi.delete(this.delData).then(res => {
+ if ((res.code = 20000)) {
+ this.$message.success('操作成功!')
+ this.handleCurrentChange()
+ }
+ })
+ )
+ }
+ }
+ })
+ },
handleSizeChange(val) {
this.page.pageSize = val
this.getList()
@@ -142,7 +170,10 @@ export default {
this.page.currentPage = val
this.getList()
},
-
+ handleSelectionChange(val) {
+ console.log('handleSelectionChange-----', val)
+ this.multipleSelection = val
+ },
// 列表
getList() {
loadingFn.call(
@@ -196,14 +227,18 @@ export default {
// 删除
del(row, scope) {
console.log(row)
+
this.$alert('请确定删除!', '提示', {
confirmButtonText: '确定',
callback: action => {
if (action == 'confirm') {
+ this.delData = {}
+ this.delData.ids.push(row)
+ console.log('----', this.delData)
loadingFn.call(
this,
'loading',
- marketingApi.delete(row).then(res => {
+ marketingApi.delete(this.delData).then(res => {
if ((res.code = 20000)) {
this.$message.success('操作成功!')
this.handleCurrentChange()
diff --git a/src/views/marketing/advertisement/advertisementUpdate.vue b/src/views/marketing/advertisement/advertisementUpdate.vue
index 4cb59c9..030a5d8 100644
--- a/src/views/marketing/advertisement/advertisementUpdate.vue
+++ b/src/views/marketing/advertisement/advertisementUpdate.vue
@@ -26,7 +26,7 @@
-
+
上线
下线
@@ -70,7 +70,7 @@ export default {
},
data() {
return {
- advertisement: { isDownline: '1' },
+ advertisement: {},
rules: {
advertiseName: [{ required: true, message: '请输入广告名称', trigger: 'blur' }],
diff --git a/src/views/marketing/home/homeFreshList.vue b/src/views/marketing/home/homeFreshList.vue
index 20ceb3f..c02f7dd 100644
--- a/src/views/marketing/home/homeFreshList.vue
+++ b/src/views/marketing/home/homeFreshList.vue
@@ -24,11 +24,12 @@
批量修改
+ 设为推荐
取消推荐
删除
-
+
@@ -66,21 +67,24 @@
:total="page.totalCount"
/>
+
+
+
+
+
diff --git a/src/views/marketing/home/moduleSetting.vue b/src/views/marketing/home/moduleSetting.vue
index e69de29..ca409e8 100644
--- a/src/views/marketing/home/moduleSetting.vue
+++ b/src/views/marketing/home/moduleSetting.vue
@@ -0,0 +1,198 @@
+
+
+
+
+
模块设置
+
+
+
+
+
+
+
+
+
+
+
+
+ 上移
+
+ 下移
+
+
+
+
+
+
+ 提交
+
+
+
+
+
+
+
+
diff --git a/vue.config.js b/vue.config.js
index e133c6d..bd77f0c 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -25,9 +25,8 @@ module.exports = {
proxy: {
[process.env.VUE_APP_BASE_API]: {
// target: `cls`,
- target: `http://192.168.0.24:38080`,
- // target: `http://192.168.0.23:38080`,
// target: `http://192.168.0.24:38080`,
+ target: `http://192.168.0.22:38080`,
// target: `http://192.168.1.83:38080`,
// target: 'http://222.132.26.119:8081',
// target: `https://www.xingoil.com/adminapi`,