8ee870584f8fdf330ae9d91fe44e0a33.json 39 KB

1
  1. {"remainingRequest":"/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/node_modules/thread-loader/dist/cjs.js!/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/node_modules/babel-loader/lib/index.js!/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/node_modules/cache-loader/dist/cjs.js??ref--0-0!/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/node_modules/vue-loader/lib/index.js??vue-loader-options!/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/src/view/advertising-delivery/advertisementList.vue?vue&type=script&lang=js&","dependencies":[{"path":"/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/src/view/advertising-delivery/advertisementList.vue","mtime":1659068670000},{"path":"/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/node_modules/cache-loader/dist/cjs.js","mtime":1665684022107},{"path":"/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/node_modules/thread-loader/dist/cjs.js","mtime":1665684003955},{"path":"/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/node_modules/babel-loader/lib/index.js","mtime":1665684010704},{"path":"/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/node_modules/cache-loader/dist/cjs.js","mtime":1665684022107},{"path":"/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/node_modules/vue-loader/lib/index.js","mtime":1665684006084}],"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//\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//\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 axios from '@/libs/api.request';\nexport default {\n name: 'voice',\n\n data() {\n return {\n showVideoModal: false,\n queryDataPage: 1,\n tabName: '1',\n total: 0,\n queryDataPage1: 1,\n total1: 0,\n residueNum: '',\n // 剩余量\n showResidueNum: false,\n showTimeSlot: false,\n // 投放时间段\n startDate: '',\n // 开始时间\n endDate: '',\n // 结束时间\n posterTitle: '',\n // 广告标题\n posterImg: [],\n // 广告图片\n domain: this.domain,\n posterContent: '',\n // 广告内容\n residueId: '',\n // 存放剩余量和投放时间的id\n showAdItem: {},\n //查看广告时的广告对象\n guarantee: 0,\n // 普通广告查询条件\n queryData: {\n title: '',\n name: '',\n phone: '',\n status: '',\n pagenum: 10,\n province: '',\n // 省\n city: '',\n // 市\n district: '',\n // 区\n IndustryId: '',\n //行业id\n total_price: '' //额度\n\n },\n // 对赌广告查询条件\n queryData1: {\n title: '',\n name: '',\n phone: '',\n status: '',\n pagenum: 10,\n province: '',\n // 省\n city: '',\n // 市\n district: '',\n // 区\n IndustryId: '',\n //行业id\n total_price: '' //额度\n\n },\n provinceList: [],\n // 省列表\n cityList: [],\n // 市列表\n districtList: [],\n // 区列表\n IndustryList: [],\n //工业数据\n columns: [{\n title: '发布者ID',\n key: 'uid',\n width: 100,\n render: (h, params) => {\n return h('div', [h('p', {\n style: {\n color: '#4B8BF4',\n cursor: 'pointer'\n },\n on: {\n click: () => {\n this.$router.push({\n path: '/course/voice',\n query: {\n id: params.row.uid\n }\n });\n }\n }\n }, params.row.uid)]);\n }\n }, {\n title: '广告标题',\n key: 'title',\n width: 200\n }, {\n title: '姓名',\n key: 'real_name',\n width: 80\n }, {\n title: '电话',\n key: 'mobile',\n width: 120\n }, {\n title: '企业名',\n key: 'company_name',\n width: 200\n }, {\n title: '投放行业',\n key: 'industryArr',\n width: 200,\n render: (h, params) => {\n return h('div', [h('p', {}, params.row.industryArr ? params.row.industryArr.join(',') : '全行业投放')]);\n }\n }, {\n title: '投放城区',\n key: 'area',\n width: 200\n }, {\n title: '费用',\n key: 'total_price',\n width: 100\n }, {\n title: '单价',\n key: 'price',\n width: 100\n }, {\n title: '总展示量',\n key: 'total_num',\n width: 100\n }, {\n title: '剩余量',\n key: 'residue_num',\n width: 100,\n render: (h, params) => {\n let text = '';\n let color = '';\n let date = new Date();\n let year = date.getFullYear();\n let month = date.getMonth() + 1 <= 9 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1;\n let day = date.getDate() <= 9 ? '0' + date.getDate() : date.getDate();\n\n if (params.row.status == 3 && params.row.end_time.split(' ')[0] > year + '-' + month + '-' + day) {\n return h('div', [h('p', {\n style: {\n color: '#4B8BF4',\n cursor: 'pointer'\n },\n on: {\n click: () => {\n this.showResidueNum = true;\n this.residueNum = params.row.residue_num;\n this.residueId = params.row.id;\n }\n }\n }, params.row.residue_num)]);\n } else {\n return h('div', [h('p', {}, params.row.residue_num)]);\n }\n }\n }, {\n title: '投放时间段',\n key: 'memberinfo',\n width: 200,\n render: (h, params) => {\n let text = '';\n let color = '';\n let date = new Date();\n let year = date.getFullYear();\n let month = date.getMonth() + 1 <= 9 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1;\n let day = date.getDate() <= 9 ? '0' + date.getDate() : date.getDate();\n\n if (params.row.status == 3 && params.row.end_time.split(' ')[0] > year + '-' + month + '-' + day) {\n return h('div', [h('p', {\n style: {\n color: '#4B8BF4',\n cursor: 'pointer'\n },\n on: {\n click: () => {\n this.showTimeSlot = true;\n this.residueId = params.row.id;\n this.startDate = params.row.start_time;\n this.endDate = params.row.end_time;\n }\n }\n }, params.row.start_time + '至' + params.row.end_time)]);\n } else {\n return h('div', [h('p', {}, params.row.start_time + '至' + params.row.end_time)]);\n }\n }\n }, {\n title: '状态',\n key: 'status',\n width: 100,\n render: (h, params) => {\n let text = '';\n let color = '';\n let date = new Date();\n let year = date.getFullYear();\n let month = date.getMonth() + 1 <= 9 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1;\n let day = date.getDate() <= 9 ? '0' + date.getDate() : date.getDate();\n\n if (params.row.status == 4) {\n text = '已屏蔽';\n color = '#d6ab09';\n } else if (params.row.end_time.split(' ')[0] < year + '-' + month + '-' + day) {\n text = '已结束';\n color = '';\n } else {\n if (params.row.status == 5) {\n text = '已拒绝';\n color = 'red';\n } else if (params.row.status == 3) {\n text = '发布中';\n color = 'green';\n } else if (params.row.status == 4) {\n text = '已屏蔽';\n color = '#d6ab09';\n }\n }\n\n return h('div', [h('p', {\n style: {\n color: color\n }\n }, text)]);\n }\n }, {\n title: '操作',\n width: 300,\n key: 'action',\n align: 'center',\n render: (h, params) => {\n return h('div', [h('Button', {\n props: {\n size: 'small',\n type: 'primary'\n },\n style: {\n marginTop: '5px',\n marginBottom: '5px',\n marginRight: '5px'\n },\n on: {\n click: () => {\n axios.request({\n url: '/admins/adver/show',\n data: {\n id: params.row.id\n },\n method: 'POST'\n }).then(res => {\n if (res.data.code === 'success') {\n this.showVideoModal = true;\n this.showAdItem = res.data.data;\n this.showAdItem.industry = res.data.data.industry.split(',');\n this.showAdItem.industry.map((value, key, arr) => {\n this.$set(this.showAdItem.industry, key, parseInt(value));\n });\n this.$set(this.showAdItem, 'user_achievement_url', res.data.data.bet ? res.data.data.bet.user_achievement_url : '');\n this.$set(this.showAdItem, 'is_win', res.data.data.bet ? res.data.data.bet.is_win + '' : '');\n this.posterImg = res.data.data.image_group.filter(item => item != \"\");\n } else {\n that.$Message.error(res.data.message);\n }\n });\n }\n },\n directives: [{\n name: 'opcode',\n value: 'admins/adver/show'\n }]\n }, '查看'), h('a', {\n domProps: {\n target: '_blank',\n href: params.row.redirect\n },\n style: {\n marginTop: '5px',\n marginBottom: '5px',\n marginRight: '5px',\n display: params.row.redirect == '' ? 'none' : 'inline-block',\n color: '#fff',\n padding: '1px 7px 2px',\n backgroundColor: '#2d8cf0',\n borderColor: '#2d8cf0',\n borderRadius: '3px',\n border: '1px solid transparent'\n },\n on: {\n click: () => {}\n }\n }, '查看已有广告链接'), h('Button', {\n props: {\n size: 'small',\n type: 'primary'\n },\n style: {\n marginTop: '5px',\n marginBottom: '5px',\n marginRight: '5px',\n display: params.row.status == 3 ? 'inline-block' : 'none'\n },\n on: {\n click: () => {\n this.$Modal.confirm({\n title: '确定屏蔽该广告?',\n content: '',\n loading: true,\n onOk: () => {\n var that = this;\n axios.request({\n url: '/admins/adver/shield',\n data: {\n id: params.row.id,\n status: 4\n },\n method: 'POST'\n }).then(res => {\n if (res.data.code === 'success') {\n that.$Modal.remove();\n that.$Message.success(res.data.message, 'middle');\n\n if (that.tabName == '1') {\n if (this.isSearch) {\n that.cateadd(this.queryDataPage);\n } else {\n that.taskList();\n }\n } else {\n if (this.isSearch1) {\n this.cateadd(this.queryDataPage1);\n } else {\n this.taskListGuarantee();\n }\n }\n\n that.batchdelIDarray = [];\n } else {\n that.$Message.error(res.data.message);\n }\n });\n }\n });\n }\n },\n directives: [{\n name: 'opcode',\n value: 'admins/adver/shield'\n }]\n }, '屏蔽'), h('Button', {\n props: {\n size: 'small',\n type: 'error'\n },\n style: {\n marginTop: '5px',\n marginBottom: '5px',\n marginRight: '5px',\n display: params.row.status == 4 ? 'inline-block' : 'none'\n },\n on: {\n click: () => {\n this.$Modal.confirm({\n title: '是否取消屏蔽?',\n content: '',\n loading: true,\n onOk: () => {\n var that = this;\n axios.request({\n url: '/admins/adver/shield',\n data: {\n id: params.row.id,\n status: 3\n },\n method: 'POST'\n }).then(res => {\n if (res.data.code === 'success') {\n that.$Modal.remove();\n that.$Message.success(res.data.message, 'middle');\n\n if (that.tabName == '1') {\n if (this.isSearch) {\n that.cateadd(this.queryDataPage);\n } else {\n that.taskList();\n }\n } else {\n if (this.isSearch1) {\n this.cateadd(this.queryDataPage1);\n } else {\n this.taskListGuarantee();\n }\n }\n\n this.batchdelIDarray = [];\n } else {\n that.$Message.error(res.data.message);\n }\n });\n }\n });\n }\n },\n directives: [{\n name: 'opcode',\n value: 'admins/adver/shield'\n }]\n }, '取消屏蔽')]);\n }\n }],\n columns1: [{\n title: '发布者ID',\n key: 'uid',\n width: 100,\n render: (h, params) => {\n return h('div', [h('p', {\n style: {\n color: '#4B8BF4',\n cursor: 'pointer'\n },\n on: {\n click: () => {\n this.$router.push({\n path: '/course/voice',\n query: {\n id: params.row.uid\n }\n });\n }\n }\n }, params.row.uid)]);\n }\n }, {\n title: '广告标题',\n key: 'title',\n width: 200\n }, {\n title: '姓名',\n key: 'real_name',\n width: 80\n }, {\n title: '电话',\n key: 'mobile',\n width: 120\n }, {\n title: '企业名',\n key: 'company_name',\n width: 200\n }, {\n title: '投放行业',\n key: 'industryArr',\n width: 200,\n render: (h, params) => {\n return h('div', [h('p', {}, params.row.industryArr ? params.row.industryArr.join(',') : '全行业投放')]);\n }\n }, {\n title: '投放城区',\n key: 'area',\n width: 200\n }, {\n title: '费用',\n key: 'total_price',\n width: 100\n }, {\n title: '单价',\n key: 'price',\n width: 100\n }, {\n title: '总展示量',\n key: 'total_num',\n width: 100\n }, {\n title: '剩余量',\n key: 'residue_num',\n width: 100,\n render: (h, params) => {\n let text = '';\n let color = '';\n let date = new Date();\n let year = date.getFullYear();\n let month = date.getMonth() + 1 <= 9 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1;\n let day = date.getDate() <= 9 ? '0' + date.getDate() : date.getDate();\n\n if (params.row.status == 3 && params.row.end_time.split(' ')[0] > year + '-' + month + '-' + day) {\n return h('div', [h('p', {\n style: {\n color: '#4B8BF4',\n cursor: 'pointer'\n },\n on: {\n click: () => {\n this.showResidueNum = true;\n this.residueNum = params.row.residue_num;\n this.residueId = params.row.id;\n }\n }\n }, params.row.residue_num)]);\n } else {\n return h('div', [h('p', {}, params.row.residue_num)]);\n }\n }\n }, {\n title: '投放时间段',\n key: 'memberinfo',\n width: 200,\n render: (h, params) => {\n let text = '';\n let color = '';\n let date = new Date();\n let year = date.getFullYear();\n let month = date.getMonth() + 1 <= 9 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1;\n let day = date.getDate() <= 9 ? '0' + date.getDate() : date.getDate();\n\n if (params.row.status == 3 && params.row.end_time.split(' ')[0] > year + '-' + month + '-' + day) {\n return h('div', [h('p', {\n style: {\n color: '#4B8BF4',\n cursor: 'pointer'\n },\n on: {\n click: () => {\n this.showTimeSlot = true;\n this.residueId = params.row.id;\n this.startDate = params.row.start_time;\n this.endDate = params.row.end_time;\n }\n }\n }, params.row.start_time + '至' + params.row.end_time)]);\n } else {\n return h('div', [h('p', {}, params.row.start_time + '至' + params.row.end_time)]);\n }\n }\n }, {\n title: '状态',\n key: 'status',\n width: 100,\n render: (h, params) => {\n let text = '';\n let color = '';\n let date = new Date();\n let year = date.getFullYear();\n let month = date.getMonth() + 1 <= 9 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1;\n let day = date.getDate() <= 9 ? '0' + date.getDate() : date.getDate();\n\n if (params.row.status == 4) {\n text = '已屏蔽';\n color = '#d6ab09';\n } else if (params.row.end_time.split(' ')[0] < year + '-' + month + '-' + day) {\n text = '已结束';\n color = '';\n } else {\n if (params.row.status == 5) {\n text = '已拒绝';\n color = 'red';\n } else if (params.row.status == 3) {\n text = '发布中';\n color = 'green';\n } else if (params.row.status == 4) {\n text = '已屏蔽';\n color = '#d6ab09';\n }\n }\n\n return h('div', [h('p', {\n style: {\n color: color\n }\n }, text)]);\n }\n }, {\n title: '对赌状态',\n key: 'is_win',\n width: 100,\n render: (h, params) => {\n let text = '';\n let color = '';\n let date = new Date();\n let year = date.getFullYear();\n let month = date.getMonth() + 1 <= 9 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1;\n let day = date.getDate() <= 9 ? '0' + date.getDate() : date.getDate();\n\n if (params.row.is_win == 0) {\n text = '待操作';\n color = '';\n } else if (params.row.is_win == 1) {\n text = '平台输';\n color = 'red';\n } else if (params.row.is_win == 2) {\n text = '平台赢';\n color = 'green';\n }\n\n return h('div', [h('p', {\n style: {\n color: color\n }\n }, text)]);\n }\n }, {\n title: '操作',\n width: 300,\n key: 'action',\n align: 'center',\n render: (h, params) => {\n return h('div', [h('Button', {\n props: {\n size: 'small',\n type: 'primary'\n },\n style: {\n marginTop: '5px',\n marginBottom: '5px',\n marginRight: '5px'\n },\n on: {\n click: () => {\n axios.request({\n url: '/admins/adver/show',\n data: {\n id: params.row.id\n },\n method: 'POST'\n }).then(res => {\n if (res.data.code === 'success') {\n this.showVideoModal = true;\n this.showAdItem = res.data.data;\n this.showAdItem.industry = res.data.data.industry.split(',');\n this.showAdItem.industry.map((value, key, arr) => {\n this.$set(this.showAdItem.industry, key, parseInt(value));\n });\n this.$set(this.showAdItem, 'user_achievement_url', res.data.data.bet ? res.data.data.bet.user_achievement_url : '');\n this.$set(this.showAdItem, 'is_win', res.data.data.bet ? res.data.data.bet.is_win + '' : '');\n this.posterImg = res.data.data.image_group.filter(item => item != \"\");\n } else {\n that.$Message.error(res.data.message);\n }\n });\n }\n },\n directives: [{\n name: 'opcode',\n value: 'admins/adver/show'\n }]\n }, '查看'), h('a', {\n domProps: {\n target: '_blank',\n href: params.row.redirect\n },\n style: {\n marginTop: '5px',\n marginBottom: '5px',\n marginRight: '5px',\n display: params.row.redirect == '' ? 'none' : 'inline-block',\n color: '#fff',\n padding: '1px 7px 2px',\n backgroundColor: '#2d8cf0',\n borderColor: '#2d8cf0',\n borderRadius: '3px',\n border: '1px solid transparent'\n },\n on: {\n click: () => {}\n }\n }, '查看已有广告链接'), h('Button', {\n props: {\n size: 'small',\n type: 'primary'\n },\n style: {\n marginTop: '5px',\n marginBottom: '5px',\n marginRight: '5px',\n display: params.row.status == 3 ? 'inline-block' : 'none'\n },\n on: {\n click: () => {\n this.$Modal.confirm({\n title: '确定屏蔽该广告?',\n content: '',\n loading: true,\n onOk: () => {\n var that = this;\n axios.request({\n url: '/admins/adver/shield',\n data: {\n id: params.row.id,\n status: 4\n },\n method: 'POST'\n }).then(res => {\n if (res.data.code === 'success') {\n that.$Modal.remove();\n that.$Message.success(res.data.message, 'middle');\n\n if (that.tabName == '1') {\n if (this.isSearch) {\n that.cateadd(this.queryDataPage);\n } else {\n that.taskList();\n }\n } else {\n if (this.isSearch1) {\n this.cateadd(this.queryDataPage1);\n } else {\n this.taskListGuarantee();\n }\n }\n\n that.batchdelIDarray = [];\n } else {\n that.$Message.error(res.data.message);\n }\n });\n }\n });\n }\n },\n directives: [{\n name: 'opcode',\n value: 'admins/adver/shield'\n }]\n }, '屏蔽'), h('Button', {\n props: {\n size: 'small',\n type: 'error'\n },\n style: {\n marginTop: '5px',\n marginBottom: '5px',\n marginRight: '5px',\n display: params.row.status == 4 ? 'inline-block' : 'none'\n },\n on: {\n click: () => {\n this.$Modal.confirm({\n title: '是否取消屏蔽?',\n content: '',\n loading: true,\n onOk: () => {\n var that = this;\n axios.request({\n url: '/admins/adver/shield',\n data: {\n id: params.row.id,\n status: 3\n },\n method: 'POST'\n }).then(res => {\n if (res.data.code === 'success') {\n that.$Modal.remove();\n that.$Message.success(res.data.message, 'middle');\n\n if (that.tabName == '1') {\n if (this.isSearch) {\n that.cateadd(this.queryDataPage);\n } else {\n that.taskList();\n }\n } else {\n if (this.isSearch1) {\n this.cateadd(this.queryDataPage1);\n } else {\n this.taskListGuarantee();\n }\n }\n\n this.batchdelIDarray = [];\n } else {\n that.$Message.error(res.data.message);\n }\n });\n }\n });\n }\n },\n directives: [{\n name: 'opcode',\n value: 'admins/adver/shield'\n }]\n }, '取消屏蔽')]);\n }\n }],\n tableData: [],\n isSearch: false,\n isSearch1: false,\n tableData1: [],\n curImg: ''\n };\n },\n\n created() {\n this.taskList();\n this.taskListGuarantee();\n this.getProvince();\n this.getIndustryList();\n },\n\n filters: {\n capitalize: function (value) {\n if (!value) return '';\n\n switch (value) {\n case 1:\n return '1/3屏';\n break;\n\n case 2:\n return '半屏';\n break;\n\n case 3:\n return '全屏';\n break;\n\n default:\n break;\n }\n }\n },\n methods: {\n show(src) {\n this.curImg = src;\n },\n\n // 普通广告分页\n levelchangepage(res) {\n this.queryDataPage = res;\n\n if (this.isSearch) {\n this.cateadd(this.queryDataPage);\n } else {\n this.taskList();\n }\n },\n\n // 对赌广告分页\n levelchangepage1(res) {\n this.queryDataPage1 = res;\n\n if (this.isSearch1) {\n this.cateadd1(this.queryDataPage1);\n } else {\n this.taskListGuarantee();\n }\n },\n\n // 点击查询普通广告\n cateadd(page) {\n var listData = {\n page: page,\n title: this.queryData.title,\n real_name: this.queryData.name,\n mobile: this.queryData.phone,\n perPage: this.queryData.pagenum,\n status: this.queryData.status,\n guarantee: 0,\n province: this.queryData.province,\n city: this.queryData.city,\n district: this.queryData.district,\n total_price: this.queryData.total_price,\n industry: this.queryData.IndustryId\n }; // 清除对象中的空属性\n\n listData = this.clearNullData(listData); // listData = clearNullData(listData)\n\n axios.request({\n method: 'POST',\n url: '/admins/adver/index',\n data: listData\n }).then(res => {\n if (res.data.code === 'success') {\n this.$refs['pages'].currentPage = page;\n this.tableData = res.data.data.data;\n this.total = res.data.data.total;\n this.isSearch = true;\n } else {\n this.$Message.error(res.data.message, 'middle');\n }\n });\n },\n\n // 点击查询对赌广告\n cateadd1(page) {\n console.log(111);\n var listData = {\n page: page,\n title: this.queryData1.title,\n real_name: this.queryData1.name,\n mobile: this.queryData1.phone,\n perPage: this.queryData1.pagenum,\n status: this.queryData1.status,\n guarantee: 1,\n province: this.queryData1.province,\n city: this.queryData1.city,\n district: this.queryData1.district,\n total_price: this.queryData1.total_price,\n industry: this.queryData1.IndustryId\n }; // 清除对象中的空属性\n\n listData = this.clearNullData(listData); // listData = clearNullData(listData)\n\n axios.request({\n method: 'POST',\n url: '/admins/adver/index',\n data: listData\n }).then(res => {\n if (res.data.code === 'success') {\n this.$refs['pages1'].currentPage = page;\n this.tableData1 = res.data.data.data;\n this.total1 = res.data.data.total;\n this.isSearch1 = true;\n } else {\n this.$Message.error(res.data.message, 'middle');\n }\n });\n },\n\n // 获取普通广告\n taskList() {\n axios.request({\n method: 'POST',\n url: '/admins/adver/index',\n data: {\n page: this.queryDataPage,\n perPage: this.queryData.pagenum,\n guarantee: 0\n }\n }).then(res => {\n if (res.data.code === 'success') {\n this.tableData = res.data.data.data;\n this.total = res.data.data.total;\n this.isSearch = false;\n } else {\n this.$Message.error(res.data.message, 'middle');\n }\n });\n },\n\n // 获取对赌广告\n taskListGuarantee() {\n axios.request({\n method: 'POST',\n url: '/admins/adver/index',\n data: {\n page: this.queryDataPage1,\n perPage: this.queryData.pagenum,\n guarantee: 1\n }\n }).then(res => {\n if (res.data.code === 'success') {\n this.tableData1 = res.data.data.data;\n this.total1 = res.data.data.total;\n this.isSearch1 = false;\n } else {\n this.$Message.error(res.data.message, 'middle');\n }\n });\n },\n\n // 全选\n selectionClick(data) {\n // 只要选中项发生变化时就会触发\n this.batchdelIDarray = [];\n\n if (data.length !== 0) {\n for (var item of data) {\n this.batchdelIDarray.push(item.id);\n } // console.log(this.batchdelIDarray)\n\n }\n },\n\n // 批量审核\n batchSccress() {\n var that = this;\n\n if (this.batchdelIDarray.length === 0) {\n this.$Message.warning('请先选择提现记录', 'middle');\n return;\n }\n\n var ids = that.batchdelIDarray;\n this.$Modal.confirm({\n title: '确定要审核所选择的提现记录吗?',\n content: '',\n onOk: () => {\n axios.request({\n method: 'POST',\n url: '/admins/withdraw/audit',\n params: {\n ids: ids,\n status: 1\n }\n }).then(res => {\n this.$Message.info(res.data.message);\n\n if (res.data.code === 'success') {\n setTimeout(function () {\n if (this.isSearch) {\n that.cateadd(this.queryDataPage);\n } else {\n that.taskList();\n }\n }, 2000);\n }\n });\n }\n });\n },\n\n // 剩余量修改\n cateaddok() {\n axios.request({\n method: 'POST',\n url: '/admins/adver/modifymore',\n data: {\n id: this.residueId,\n residue_num: this.residueNum\n }\n }).then(res => {\n if (res.data.code === 'success') {\n this.$Modal.remove();\n this.$Message.success(res.data.message, 'middle');\n\n if (this.isSearch) {\n this.cateadd(this.queryDataPage);\n } else {\n this.taskList();\n this.taskListGuarantee();\n }\n } else {\n this.$Message.error(res.data.message, 'middle');\n }\n });\n },\n\n // 修改时间段\n timeSlotok() {\n axios.request({\n method: 'POST',\n url: '/admins/adver/modifymore',\n data: {\n id: this.residueId,\n start_time: this.startDate,\n end_time: this.endDate\n }\n }).then(res => {\n if (res.data.code === 'success') {\n this.$Modal.remove();\n this.$Message.success(res.data.message, 'middle');\n\n if (this.isSearch) {\n this.cateadd(this.queryDataPage);\n } else {\n this.taskList();\n this.taskListGuarantee();\n }\n } else {\n this.$Message.error(res.data.message, 'middle');\n }\n });\n },\n\n handleChange(date) {\n //console.log(date)\n this.startDate = date;\n },\n\n endChange(date) {\n this.endDate = date;\n },\n\n // 省\n getProvince() {\n axios.request({\n method: 'GET',\n url: '/admins/area/0'\n }).then(res => {\n if (res.data.code === 'success') {\n this.provinceList = res.data.data.list; // this.queryData.province = res.data.data.list[0].id;\n // this.queryData1.province = res.data.data.list[0].id;\n\n this.getCity(res.data.data.list[0].id);\n } else {\n this.$Message.error(res.data.message, 'middle');\n }\n });\n },\n\n // 市\n getCity(id) {\n axios.request({\n method: 'GET',\n url: '/admins/area/' + id\n }).then(res => {\n if (res.data.code === 'success') {\n this.cityList = res.data.data.list; // this.queryData.city = res.data.data.list[0].id\n // this.queryData1.city = res.data.data.list[0].id\n\n this.getDistrict(res.data.data.list[0].id);\n } else {\n this.$Message.error(res.data.message, 'middle');\n }\n });\n },\n\n // 区\n getDistrict(id) {\n axios.request({\n method: 'GET',\n url: '/admins/area/' + id\n }).then(res => {\n if (res.data.code === 'success') {\n this.districtList = res.data.data.list; // this.queryData.district = res.data.data.list[0].id\n // this.queryData1.district = res.data.data.list[0].id\n } else {\n this.$Message.error(res.data.message, 'middle');\n }\n });\n },\n\n //获取工业数据\n getIndustryList() {\n axios.request({\n method: 'POST',\n url: '/admins/adver/industry'\n }).then(res => {\n if (res.data.code === 'success') {\n this.IndustryList = res.data.data;\n } else {\n this.$Message.error(res.data.message, 'middle');\n }\n });\n },\n\n //对赌协议\n uploadCoverSuccess(res, file) {\n if (res.code == 'success') {\n this.$set(this.showAdItem, 'guarantee_url', res.data.url);\n } else {\n this.$Message.error(res.message);\n }\n },\n\n //业绩证明\n uploadYeJiSuccess(res, file) {\n if (res.code == 'success') {\n this.$set(this.showAdItem, 'user_achievement_url', res.data.url);\n } else {\n this.$Message.error(res.message);\n }\n },\n\n //保存修改广告\n saveAd() {\n if (!this.showAdItem.guarantee_url) {\n this.$Message.warning('请上传担保协议', 'middle');\n return;\n }\n\n if (!this.showAdItem.user_achievement_url) {\n this.$Message.warning('请上传业绩证明', 'middle');\n return;\n }\n\n if (this.showAdItem.is_win == 0) {\n this.$Message.warning('请选择对赌结果', 'middle');\n return;\n }\n\n this.$Modal.confirm({\n title: '确定要修改数据吗?',\n content: '',\n onOk: () => {\n axios.request({\n method: 'POST',\n url: '/admins/adver/judge',\n params: {\n id: this.showAdItem.id,\n user_guarantee_url: this.showAdItem.guarantee_url,\n user_achievement_url: this.showAdItem.user_achievement_url,\n is_win: this.showAdItem.is_win\n }\n }).then(res => {\n if (res.data.code === 'success') {\n this.showVideoModal = false;\n this.$Message.success(res.data.message, 'middle');\n\n if (this.isSearch) {\n this.cateadd(this.queryDataPage);\n } else {\n this.taskList();\n }\n\n if (this.isSearch1) {\n this.cateadd(this.queryDataPage1);\n } else {\n this.taskListGuarantee();\n }\n } else {\n this.$Message.error(res.data.message, 'middle');\n }\n });\n }\n });\n }\n\n }\n};",null]}