wangfukang 3 weeks ago
parent
commit
2d7451a248
  1. 10
      src/api/app.js
  2. 32
      src/views/app/business/deliverytruck/deliveryTruck.vue
  3. 34
      src/views/app/business/expressCompany/expressCompany.vue
  4. 39
      src/views/app/business/lineManage/lineManage.vue
  5. 2
      src/views/sys/order-manage/logisticsAddress.vue
  6. 2
      vue.config.js

10
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)

32
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) {

34
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;

39
src/views/app/business/lineManage/lineManage.vue

@ -14,6 +14,15 @@
<Button v-if="activeTab != 'homePopup' || data.length == 0" @click="add" type="primary" icon="md-add">
{{ activeTab == 'homePopup' ? '添加弹窗图片' : '添加' }}
</Button>
<Button
v-if="activeTab == 'homeAd'"
style="margin-left: 8px"
:type="homeCenterAdEnabled ? 'warning' : 'success'"
:loading="homeCenterAdSaving"
@click="toggleHomeCenterAd"
>
{{ homeCenterAdEnabled ? '关闭广告位' : '开启广告位' }}
</Button>
</div>
<div class="icons">
<Tooltip content="刷新" placement="top" transfer>
@ -56,7 +65,9 @@
<script>
import {
getADList,
delAD
delAD,
getHomeCenterAdEnabled,
saveHomeCenterAdEnabled
} from "@/api/app";
import addEdit from "@/views/app/business/lineManage/addEdit.vue";
import goodsList from "./dictManage.vue";
@ -81,6 +92,8 @@
openSearch: true,
openTip: true,
loading: true,
homeCenterAdEnabled: true,
homeCenterAdSaving: false,
reading: false,
loadingExport: true,
exportModalVisible: false,
@ -390,6 +403,7 @@
methods: {
init() {
this.getDataList();
this.getHomeCenterAdSetting();
},
changePage(v) {
this.searchForm.pageNum = v;
@ -427,6 +441,29 @@
}
});
},
getHomeCenterAdSetting() {
getHomeCenterAdEnabled({
regionId: this.searchForm.regionId
}).then((res) => {
if (res.code == 200 && res.result) {
this.homeCenterAdEnabled = res.result.homeCenterAdEnabled !== false;
}
});
},
toggleHomeCenterAd() {
this.homeCenterAdSaving = true;
const nextEnabled = !this.homeCenterAdEnabled;
saveHomeCenterAdEnabled({
regionId: this.searchForm.regionId,
enabled: nextEnabled
}).then((res) => {
this.homeCenterAdSaving = false;
if (res.success) {
this.homeCenterAdEnabled = nextEnabled;
this.$Message.success(nextEnabled ? "广告位已开启" : "广告位已关闭");
}
});
},
showPic(v) {
let image = new Image();
image.src = v;

2
src/views/sys/order-manage/logisticsAddress.vue

@ -638,3 +638,5 @@

2
vue.config.js

@ -8,7 +8,7 @@ module.exports = {
proxy: {
'/hiver': {
// target: 'https://hbkuaishi.com', // 正式1
target: 'http://192.168.100.34:8888', // 本地
target: 'http://192.168.100.37:8888', // 本地
ws: false
},
'/foo': {

Loading…
Cancel
Save