{"remainingRequest":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/mer.ws.baibaodun.com.cn/src/views/marketing/seckill/seckillActivity/index.vue?vue&type=script&lang=js","dependencies":[{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/src/views/marketing/seckill/seckillActivity/index.vue","mtime":1701742078555},{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/babel-loader/lib/index.js","mtime":456789000000},{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/vue-loader/lib/index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport { seckillActivityListApi, seckillAtivityDelApi } from '@/api/marketing';\nimport { checkPermi } from '@/utils/permission'; // 权限判断函数\nimport Cookies from 'js-cookie';\nexport default {\n  name: 'SeckillList',\n  data() {\n    return {\n      listLoading: false,\n      tableData: {\n        data: [],\n        total: 0,\n      },\n      tableForm: {\n        page: 1,\n        limit: 20,\n        name: '',\n        date: '',\n      },\n      name: '',\n      fromList: this.$constants.fromList,\n      merStarLevel: Cookies.get('merStarLevel'),\n    };\n  },\n  mounted() {\n    if (checkPermi(['merchant:seckill:activity:page'])) this.getList(1);\n    if (checkPermi(['merchant:plat:product:category:cache:tree']))\n      this.$store.dispatch('product/getAdminProductClassify');\n  },\n  methods: {\n    checkPermi,\n    goOn(id) {\n      this.$router.push({ path: `/marketing/seckill/creatActivity/${id}` });\n    },\n    // 删除\n    handleDelete(id) {\n      this.$modalSure(`删除该秒杀活动吗？`).then(() => {\n        seckillAtivityDelApi(id).then(() => {\n          this.$message.success('删除成功');\n          if (this.tableData.data.length === 1 && this.tableForm.page > 1)\n            this.tableForm.page = this.tableForm.page - 1;\n          this.getList();\n        });\n      });\n    },\n    // 列表\n    getList(num) {\n      this.tableForm.page = num ? num : this.tableForm.page;\n      this.tableForm.name = encodeURIComponent(this.name);\n      this.listLoading = true;\n      seckillActivityListApi(this.tableForm)\n        .then((res) => {\n          this.tableData.data = res.list;\n          this.tableData.total = res.total;\n          this.listLoading = false;\n        })\n        .catch((res) => {\n          this.listLoading = false;\n        });\n    },\n    pageChange(page) {\n      this.tableForm.page = page;\n      this.getList();\n    },\n    handleSizeChange(val) {\n      this.tableForm.limit = val;\n      this.getList();\n    },\n  },\n};\n",null]}