diff --git a/src/api/app.js b/src/api/app.js index 8043a6d..897d08a 100644 --- a/src/api/app.js +++ b/src/api/app.js @@ -280,6 +280,16 @@ export const delAD = (id,params) => { return postRequest(`/mall/adPosition/delete/${id}`, params) } +// 查询首页待成团下方广告位开关 +export const getHomeCenterAdEnabled = (params) => { + return getRequest('/mall/adPosition/homeCenter/enabled', params) +} + +// 保存首页待成团下方广告位开关 +export const saveHomeCenterAdEnabled = (params) => { + return postRequest('/mall/adPosition/homeCenter/enabled/save', params) +} + //获取商品分类 export const goodsType = (params) => { return getRequest('/app/productCategory/list', params) diff --git a/src/views/app/business/deliverytruck/deliveryTruck.vue b/src/views/app/business/deliverytruck/deliveryTruck.vue index 4edb9b3..acc5a5f 100644 --- a/src/views/app/business/deliverytruck/deliveryTruck.vue +++ b/src/views/app/business/deliverytruck/deliveryTruck.vue @@ -300,14 +300,16 @@ export default { { title: '分类', key: 'categoryName', width: 120 }, { title: '审核', key: 'auditStatus', width: 110, render: (h, p) => h('Tag', { props: { color: this.auditColor(p.row.auditStatus) } }, this.auditText(p.row.auditStatus)) }, { title: '热度', key: 'hotScore', width: 90, sortable: true }, + { title: '排名', key: 'rankOrder', width: 80, render: (h, p) => h('span', p.row.rankOrder == null ? '' : p.row.rankOrder) }, { title: '赞/评/举报', width: 120, render: (h, p) => h('span', `${p.row.likeCount || 0}/${p.row.commentCount || 0}/${p.row.complaintCount || 0}`) }, { title: '浏览', key: 'browseCount', width: 80 }, { title: '状态', width: 90, render: (h, p) => h('Tag', { props: { color: this.statusColor(p.row.status) } }, this.statusText(p.row.status)) }, { title: '发布时间', key: 'createTime', minWidth: 160 }, - { title: '操作', width: 260, fixed: 'right', render: (h, p) => { + { title: '操作', width: 320, fixed: 'right', render: (h, p) => { if (p.row.status == 3) return h('span', ''); return h('div', [ h('Button', { props: { size: 'small', type: 'info' }, on: { click: () => this.openPostDetail(p.row) } }, '详情'), + h('Button', { props: { size: 'small', type: 'success' }, style: { marginLeft: '6px' }, on: { click: () => this.changePostRank(p.row) } }, '排名'), h('Button', { props: { size: 'small', type: 'warning' }, style: { marginLeft: '6px' }, on: { click: () => this.changePostStatus(p.row, 2, '强制下架') } }, '下架'), h('Button', { props: { size: 'small', type: 'primary' }, style: { marginLeft: '6px' }, on: { click: () => this.changePostStatus(p.row, 1, '恢复上架') } }, '恢复'), h('Button', { props: { size: 'small', type: 'error' }, style: { marginLeft: '6px' }, on: { click: () => this.changePostStatus(p.row, 3, '删除内容') } }, '删除') @@ -465,6 +467,34 @@ export default { } }); }, + changePostRank(row) { + this.actionReason = row.rankOrder == null ? '' : String(row.rankOrder); + this.$Modal.confirm({ + title: '设置排名', + render: (h) => h('Input', { + props: { autofocus: true, placeholder: '请输入正整数排名,留空则清空排名', value: this.actionReason }, + on: { input: val => { this.actionReason = val; } } + }), + onOk: () => { + const value = (this.actionReason || '').trim(); + const params = { postId: row.id }; + if (value === '') { + params.clearRankOrder = true; + } else { + const rankOrder = Number(value); + if (!Number.isInteger(rankOrder) || rankOrder < 1) { + this.$Message.warning('请输入大于0的整数排名'); + return; + } + params.rankOrder = rankOrder; + } + campusPostStatus(params).then(() => { + this.$Message.success('排名设置成功'); + this.loadByType(row.postType === 'partner' ? 'partner' : 'wall'); + }); + } + }); + }, openPostDetail(row) { const postId = row.postId || row.id; if (!postId) { diff --git a/src/views/app/business/expressCompany/expressCompany.vue b/src/views/app/business/expressCompany/expressCompany.vue index a5f04ef..baf5a26 100644 --- a/src/views/app/business/expressCompany/expressCompany.vue +++ b/src/views/app/business/expressCompany/expressCompany.vue @@ -287,6 +287,7 @@ export default { ], goodsDetail: {}, detailGoodsId: "", + actionReason: "", detailCommentList: [], detailCommentTotal: 0, detailCommentQuery: { pageNum: 1, pageSize: 10 }, @@ -301,14 +302,16 @@ export default { { title: "价格", key: "price", width: 90 }, { title: "审核", key: "auditStatus", width: 110, render: (h, p) => h("Tag", { props: { color: this.auditColor(p.row.auditStatus) } }, this.auditText(p.row.auditStatus)) }, { title: "状态", key: "status", width: 100, render: (h, p) => h("Tag", { props: { color: this.goodsStatusColor(p.row.status) } }, this.goodsStatusText(p.row.status)) }, + { title: "排名", key: "rankOrder", width: 80, render: (h, p) => h("span", p.row.rankOrder == null ? "" : p.row.rankOrder) }, { title: "举报", key: "complaintCount", width: 80 }, { title: "浏览", key: "browseCount", width: 80 }, { title: "发布时间", key: "createTime", minWidth: 150 }, - { title: "操作", width: 250, fixed: "right", render: (h, p) => { + { title: "操作", width: 310, fixed: "right", render: (h, p) => { if (p.row.status == 3) return h("span", ""); return h("div", [ /* h("Button", { props: { type: "success", size: "small" }, style: { marginRight: "6px" }, on: { click: () => this.handleGoods(p.row, 1, "审核已处理") } }, "已处理"), */ h("Button", { props: { type: "info", size: "small" }, style: { marginRight: "6px" }, on: { click: () => this.viewGoodsDetail(p.row) } }, "详情"), + h("Button", { props: { type: "success", size: "small" }, style: { marginRight: "6px" }, on: { click: () => this.changeGoodsRank(p.row) } }, "排名"), h("Button", { props: { type: "warning", size: "small" }, style: { marginRight: "6px" }, on: { click: () => this.handleGoods(p.row, 2, "强制下架") } }, "下架"), h("Button", { props: { type: "primary", size: "small" }, style: { marginRight: "6px" }, on: { click: () => this.handleGoods(p.row, 1, "恢复上架") } }, "恢复") ]); @@ -521,6 +524,7 @@ export default { return "green"; }, handleGoods(row, status, title) { + this.actionReason = ""; this.$Modal.confirm({ title, render: (h) => h("Input", { props: { autofocus: true, placeholder: "请输入原因" }, on: { input: val => this.actionReason = val } }), @@ -532,6 +536,34 @@ export default { } }); }, + changeGoodsRank(row) { + this.actionReason = row.rankOrder == null ? "" : String(row.rankOrder); + this.$Modal.confirm({ + title: "设置排名", + render: (h) => h("Input", { + props: { autofocus: true, placeholder: "请输入正整数排名,留空则清空排名", value: this.actionReason }, + on: { input: val => this.actionReason = val } + }), + onOk: () => { + const value = (this.actionReason || "").trim(); + const params = { goodsId: row.id }; + if (value === "") { + params.clearRankOrder = true; + } else { + const rankOrder = Number(value); + if (!Number.isInteger(rankOrder) || rankOrder < 1) { + this.$Message.warning("请输入大于0的整数排名"); + return; + } + params.rankOrder = rankOrder; + } + fishGoodsStatus(params).then(() => { + this.$Message.success("排名设置成功"); + this.loadGoods(); + }); + } + }); + }, openCategory(row = {}) { this.categoryForm = { regionId: this.resolveRegionId(), ...row, statusBool: row.status !== 0 }; this.categoryModal = true; diff --git a/src/views/app/business/lineManage/lineManage.vue b/src/views/app/business/lineManage/lineManage.vue index 2913fd1..cc5324a 100644 --- a/src/views/app/business/lineManage/lineManage.vue +++ b/src/views/app/business/lineManage/lineManage.vue @@ -14,6 +14,15 @@ +
@@ -56,7 +65,9 @@