|
|
@@ -78,9 +78,8 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="active_state"
|
|
|
+ prop="activeTimeState"
|
|
|
align="center"
|
|
|
- :formatter="activeState"
|
|
|
label="活动状态"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
@@ -130,7 +129,7 @@
|
|
|
type="text"
|
|
|
size="small"
|
|
|
@click="goSeckillStop(scope.row.id)"
|
|
|
- v-if="scope.row.activeState == 1 && !scope.row.discard"
|
|
|
+ v-if="scope.row.activeTimeState == 1 && !scope.row.discard"
|
|
|
>终止</el-button
|
|
|
>
|
|
|
</template>
|
|
|
@@ -153,7 +152,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { seckillActivityPage_api } from "@/api/marketing/seckill";
|
|
|
+import { seckillActivityPage_api, seckillActivityDel_api, seckillActivityDiscard_api } from "@/api/marketing/seckill";
|
|
|
import getListApi from "@/mixins/getListApi";
|
|
|
import SeckillAddUpdate from "./components/SeckillAddUpdate";
|
|
|
|
|
|
@@ -194,8 +193,8 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 活动状态
|
|
|
- activeState(row, column) {
|
|
|
- let status = row.activeState;
|
|
|
+ activeTimeState(row, column) {
|
|
|
+ let status = row.activeTimeState;
|
|
|
if (status === 0) {
|
|
|
return "未开始";
|
|
|
} else if (status === 1) {
|
|
|
@@ -226,12 +225,9 @@ export default {
|
|
|
type: "warning",
|
|
|
})
|
|
|
.then(() => {
|
|
|
- seviceApi.delSeckillactivity(id).then((res) => {
|
|
|
- if (res && res.data.code == 200) {
|
|
|
- this.$message({
|
|
|
- message: "删除成功",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
+ seckillActivityDel_api(id).then((res) => {
|
|
|
+ if (res && res.code == 200) {
|
|
|
+ this.$message.success("删除成功");
|
|
|
this.getList();
|
|
|
}
|
|
|
});
|
|
|
@@ -245,12 +241,9 @@ export default {
|
|
|
type: "warning",
|
|
|
})
|
|
|
.then(() => {
|
|
|
- sysService.seckillStop(id).then((res) => {
|
|
|
- if (res && res.data.code == 200) {
|
|
|
- this.$message({
|
|
|
- message: "终止成功",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
+ seckillActivityDiscard_api(id).then((res) => {
|
|
|
+ if (res && res.code == 200) {
|
|
|
+ this.$message.success("终止成功");
|
|
|
this.getList();
|
|
|
}
|
|
|
});
|