| 1 |
- {"remainingRequest":"/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/course/voice.vue?vue&type=script&lang=js&","dependencies":[{"path":"/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/src/view/course/voice.vue","mtime":1618306924000},{"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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n import axios from '@/libs/api.request'\n export default {\n\n name: 'voice',\n data () {\n return {\n free_num: '', // 免费投放次数\n min_money: '', // 广告起投额度\n money: '', // 广告单价\n promotionId: '',\n agentId: '', // 代理ID\n agentName: '', // 姓名\n showRelieve: false,\n queryDataPage: 1,\n total: 0,\n inviteTotal: 0,\n invitePage: 1,\n showInvite: false,\n inviteData: [],\n inviteId: '',\n // 余额提现\n withdrawPage: 1,\n withdrawTotal: 0,\n agentPage: 1,\n agentTotal: 0,\n curAgentId: '',\n showWithdraw: false, // 余额提现\n showAgent: false, // 余额提现\n withdrawData: [],\n agentData: [],\n withdrawId: '',\n // 点币设置\n showCurrency: false,\n currencyTotal: 0,\n currencyPage: 1,\n currencyData: [],\n currencyName: 'name1',\n currencyUserId: '',\n currencyUserName: '',\n currencyCoin: '',\n // 代理费分佣\n formValidate: {\n proxy: '',\n proxy_one_left: '',\n proxy_one: '',\n proxy_one_right: '',\n proxy_two_left: '',\n proxy_two: '',\n proxy_two_right: ''\n },\n showProxy: false,\n proxyID: '',\n type: '',\n showVideoModal: false,\n showLevelModal: false,\n showPrivateLetter: false, // 私信\n private_title: '', // 私信标题\n private_content: '', // 私信内容\n startDate: '',\n endDate: '',\n postData: {\n province: '', // 省\n city: '', // 市\n district: '' // 区\n },\n province: '', // 编辑时用到的省id\n provinceList: [], // 省列表\n cityList: [], // 市列表\n districtList: [], // 区列表\n // 查询条件\n queryData: {\n level: '',\n cp_id: '',\n mobile: '',\n status: '',\n pagenum: 12,\n sort: '',\n order: '',\n },\n discounts: '',\n min_num: '',\n task_num: '',\n levelData: [],\n // 输入框为空提示\n ruleValidate: {\n proxy: [{\n required: true,\n message: '直推返佣比例不能为空',\n trigger: 'blur'\n }],\n proxy_one: [{\n required: true,\n message: '间一返佣比例不能为空',\n trigger: 'blur'\n }],\n proxy_one_left: [{\n required: true,\n message: '间一返佣比例不能为空',\n trigger: 'blur'\n }],\n proxy_one_right: [{\n required: true,\n message: '间一返佣比例不能为空',\n trigger: 'blur'\n }],\n proxy_two: [{\n required: true,\n message: '间二返佣比例不能为空',\n trigger: 'blur'\n }],\n proxy_two_left: [{\n required: true,\n message: '间二返佣比例不能为空',\n trigger: 'blur'\n }],\n proxy_two_right: [{\n required: true,\n message: '间二返佣比例不能为空',\n trigger: 'blur'\n }]\n },\n // 点币记录\n currency: [{\n title: '转账时间',\n key: 'created_at',\n sortable: true\n },\n {\n title: '转账类型',\n key: 'type',\n render: (h, params) => {\n let text = '';\n if (params.row.type == 2 || params.row.type == 30) {\n text = '收入'\n } else if (params.row.type == 3 || params.row.type == 31 || params.row.type == 32) {\n text = '支出'\n } else if (params.row.type == 0) {\n text = '未知'\n } else if (params.row.type == 1 || params.row.type == 4) {\n text = '提现'\n } else {\n text = '收入'\n }\n return h('div', [\n h('p', {}, text)\n ])\n }\n },\n {\n title: '转账金额',\n key: 'money',\n sortable: true\n }\n ],\n // 余额提现记录\n columnWithdraw: [{\n title: '提现时间',\n key: 'created_at',\n sortable: true\n },\n {\n title: '提现金额',\n key: 'money',\n sortable: true,\n render: (h, params) => {\n return h('div', [\n h('p', {}, -params.row.money)\n ])\n }\n }\n ],\n // 代理费记录\n columnAgent: [{\n title: '交费时间',\n key: 'created_at',\n sortable: true,\n },\n {\n title: '金额',\n key: 'money',\n sortable: true,\n render: (h, params) => {\n return h('div', [\n h('p', {}, -params.row.money)\n ])\n }\n }, {\n title: '交费类型',\n key: 'type',\n render: (h, params) => {\n let text = '';\n if (params.row.type == 7) {\n text = '升级缴费'\n } else if (params.row.type == 8) {\n text = '升级区域代理缴费'\n }\n return h('div', [\n h('p', {}, text)\n ])\n }\n }\n ],\n // 代理人数\n column: [{\n title: '代理ID',\n key: 'id'\n },\n {\n title: '代理等级',\n key: 'level',\n sortable: true,\n render: (h, params) => {\n let text = ''\n if (params.row.level == 1) {\n text = 'A'\n } else if (params.row.level == 2) {\n text = 'B'\n } else if (params.row.level == 3) {\n text = 'C'\n } else if (params.row.level == 4) {\n text = 'D'\n } else if (params.row.level == 5) {\n text = 'E'\n } else if (params.row.level == 6) {\n text = 'F'\n } else if (params.row.level == 7) {\n text = 'G'\n } else {\n text = '--'\n }\n return h('span', {\n props: {},\n }, text)\n }\n },\n {\n title: '代理昵称',\n key: 'nick_name',\n render: (h, params) => {\n let text = '';\n if (params.row.nick_name == '') {\n text = '--'\n } else {\n text = params.row.nick_name\n }\n return h('span', {\n props: {},\n }, text)\n }\n },\n {\n title: '代理姓名',\n key: 'real_name',\n render: (h, params) => {\n let text = '';\n if (params.row.real_name == '') {\n text = '--'\n } else {\n text = params.row.real_name\n }\n return h('span', {\n props: {},\n }, text)\n }\n },\n {\n title: '注册时间',\n key: 'created_at',\n sortable: true\n }\n ],\n columns: [{\n title: 'ID',\n key: 'id',\n width: 100\n },\n {\n title: '等级',\n key: 'level',\n sortable: 'custom',\n width: 100,\n render: (h, params) => {\n let text = ''\n if (params.row.level == 1) {\n text = 'A'\n } else if (params.row.level == 2) {\n text = 'B'\n } else if (params.row.level == 3) {\n text = 'C'\n } else if (params.row.level == 4) {\n text = 'D'\n } else if (params.row.level == 5) {\n text = 'E'\n } else if (params.row.level == 6) {\n text = 'F'\n } else if (params.row.level == 7) {\n text = 'G'\n }\n return h('span', {\n props: {},\n }, text)\n }\n },\n {\n title: '姓名',\n key: 'real_name',\n width: 100,\n render: (h, params) => {\n return h('div', [\n h('p', {\n style: {\n marginTop: '5px',\n marginBottom: '5px',\n marginRight: '5px',\n color: '#2d8cf0',\n cursor: 'pointer'\n },\n on: {\n click: () => {\n this.$router.push({\n path: '/course/voice-detail',\n query: {\n id: params.row.id\n }\n })\n }\n }\n }, params.row.real_name)\n ])\n }\n },\n {\n title: '昵称',\n key: 'nick_name',\n width: 100\n },\n {\n title: '手机号',\n key: 'mobile',\n width: 150\n },\n {\n title: '注册时间',\n key: 'created_at',\n sortable: 'custom',\n width: 150\n },\n {\n title: '邀请人手机号码',\n key: 'invitor_mobile',\n width: 120\n },\n {\n title: '地区',\n key: 'area',\n width: 200\n },\n {\n title: '代理区域',\n key: 'proxyarea',\n width: 200\n }, {\n title: '代理费总额',\n key: 'agentAllmoney',\n sortable: 'custom',\n width: 100,\n render: (h, params) => {\n return h('div', [\n h('p', {\n style: {\n marginTop: '5px',\n marginBottom: '5px',\n marginRight: '5px',\n color: '#2d8cf0',\n cursor: 'pointer',\n },\n on: {\n click: () => {\n this.showAgent = true;\n this.curAgentId = params.row.id;\n this.getAgentDetail()\n }\n }\n }, Math.abs(params.row.agentAllmoney))\n ])\n }\n },\n {\n title: '广告笔数',\n key: 'count',\n sortable: 'custom',\n width: 100\n// render: (h, params) => {\n// return h('div', [\n// h('p', {}, params.row.adver.count)\n// ])\n// }\n },\n {\n title: '广告总业绩(元)',\n key: 'allMoney',\n sortable: 'custom',\n width: 100,\n render: (h, params) => {\n return h('div', [\n h('p', {}, params.row.allMoney ? params.row.allMoney : 0)\n ])\n }\n },\n {\n title: '广告费分佣(元)',\n key: 'adverCommission',\n sortable: 'custom',\n width: 100\n// render: (h, params) => {\n// return h('div', [\n// h('p', {\n// style: {\n// marginTop: '5px',\n// marginBottom: '5px',\n// marginRight: '5px',\n//// color: '#2d8cf0',\n//// cursor: 'pointer'\n// },\n// on: {\n// click: () => {\n//// this.showProxy = true\n//// this.type = 2\n//// this.proxyID = params.row.id\n//// this.formValidate.proxy = ''\n//// this.formValidate.proxy_one_left = ''\n//// this.formValidate.proxy_one = ''\n//// this.formValidate.proxy_one_right = ''\n//// this.formValidate.proxy_two_left = ''\n//// this.formValidate.proxy_two = ''\n//// this.formValidate.proxy_two_right = ''\n// }\n// }\n// }, params.row.adverCommission)\n// ])\n// }\n },\n {\n title: '下级代理人数(人)',\n key: 'invite_num',\n sortable: 'custom',\n width: 100,\n render: (h, params) => {\n return h('div', [\n h('p', {\n style: {\n marginTop: '5px',\n marginBottom: '5px',\n marginRight: '5px',\n color: '#2d8cf0',\n cursor: 'pointer'\n },\n on: {\n click: () => {\n this.showInvite = true\n this.inviteId = params.row.id\n this.invite()\n }\n }\n }, params.row.invite_num)\n ])\n }\n },\n {\n title: '代理费分佣(元)',\n key: 'proxyCommission',\n sortable: 'custom',\n width: 100,\n render: (h, params) => {\n return h('div', [\n h('p', {\n style: {\n marginTop: '5px',\n marginBottom: '5px',\n marginRight: '5px',\n// color: '#2d8cf0',\n// cursor: 'pointer'\n },\n on: {\n click: () => {\n// this.showProxy = true\n// this.type = 1\n// this.proxyID = params.row.id\n// this.formValidate.proxy = ''\n// this.formValidate.proxy_one_left = ''\n// this.formValidate.proxy_one = ''\n// this.formValidate.proxy_one_right = ''\n// this.formValidate.proxy_two_left = ''\n// this.formValidate.proxy_two = ''\n// this.formValidate.proxy_two_right = ''\n }\n }\n }, params.row.proxyCommission)\n ])\n }\n },\n {\n title: '点币',\n key: 'coin',\n width: 100,\n sortable: 'custom',\n render: (h, params) => {\n return h('div', [\n h('p', {\n style: {\n marginTop: '5px',\n marginBottom: '5px',\n marginRight: '5px',\n color: '#2d8cf0',\n cursor: 'pointer'\n },\n on: {\n click: () => {\n this.showCurrency = true\n this.currencyId = params.row.id\n this.currencyUserId = params.row.id\n this.currencyUserName = params.row.real_name\n this.currencyCoin = params.row.coin\n this.currencyLIist()\n }\n }\n }, params.row.coin)\n ])\n }\n },\n {\n title: '余额',\n key: 'balance',\n sortable: 'custom',\n width: 100,\n render: (h, params) => {\n return h('div', [\n h('p', {\n style: {\n marginTop: '5px',\n marginBottom: '5px',\n marginRight: '5px',\n color: '#2d8cf0',\n cursor: 'pointer'\n },\n on: {\n click: () => {\n this.showWithdraw = true\n this.withdrawId = params.row.id\n this.withdraw()\n }\n }\n }, params.row.balance)\n ])\n }\n },\n {\n title: '操作',\n minWidth: 250,\n key: 'action',\n align: 'center',\n render: (h, params) => {\n return h('div', [\n 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 this.showVideoModal = true\n this.promotionId = params.row.id\n this.free_num = params.row.proxyAdverSet.free_num\n this.min_money = params.row.proxyAdverSet.min_money\n this.money = params.row.proxyAdverSet.money\n }\n },\n directives: [\n {\n name: 'opcode',\n value: 'admins/proxy/setproxy'\n }\n ]\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 == 1) ? 'inline-block' : 'none'\n },\n on: {\n click: () => {\n // console.log(params)\n this.$Modal.confirm({\n title: '确定要冻结该账户吗?',\n content: '',\n loading: true,\n onOk: () => {\n var that = this\n axios\n .request({\n url: '/admins/proxy/freeze',\n data: {\n id: params.row.id,\n status: 2\n },\n method: 'POST'\n })\n .then(res => {\n if (res.data.code === 'success') {\n that.$Modal.remove()\n that.$Message.warning(res.data.message, 'middle')\n if (this.isSearch) {\n this.cateadd(this.queryDataPage)\n } else {\n this.taskList()\n }\n } else {\n that.$Message.error(res.data.message)\n }\n })\n }\n })\n }\n },\n directives: [\n {\n name: 'opcode',\n value: 'admins/proxy/freeze'\n }\n ]\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 == 2) ? 'inline-block' : 'none'\n },\n on: {\n click: () => {\n // console.log(params)\n this.$Modal.confirm({\n title: '确定要解除冻结吗?',\n content: '',\n loading: true,\n onOk: () => {\n var that = this\n axios\n .request({\n url: '/admins/proxy/freeze',\n data: {\n id: params.row.id,\n status: 1\n },\n method: 'POST'\n })\n .then(res => {\n if (res.data.code === 'success') {\n that.$Modal.remove()\n that.$Message.warning(res.data.message, 'middle')\n if (this.isSearch) {\n this.cateadd(this.queryDataPage)\n } else {\n this.taskList()\n }\n } else {\n that.$Message.error(res.data.message)\n }\n })\n }\n })\n }\n },\n directives: [\n {\n name: 'opcode',\n value: 'admins/proxy/freeze'\n }\n ]\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// },\n// on: {\n// click: () => {\n// this.promotionId = params.row.id\n// this.showRelieve = true\n// this.agentId = params.row.id\n// this.agentName = params.row.real_name\n// }\n// },\n// // 在这里注册自定义指令\n// directives: [\n// {\n// name: 'opcode',\n// value: 'admins/proxy/relieve'\n// }\n// ]\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 },\n on: {\n click: () => {\n this.promotionId = params.row.id\n this.showPrivateLetter = true\n }\n },\n directives: [\n {\n name: 'opcode',\n value: 'admins/proxy/sendmsg'\n }\n ]\n }, '私信')\n ])\n }\n }\n ],\n tableData: [],\n isSearch: false,\n id: ''\n }\n },\n watch: {\n '$route'(){\n this.id = this.$route.query.id || '';\n this.taskList();\n }\n },\n created () {\n this.id = this.$route.query.id || '';\n this.taskList();\n this.getProvince();\n },\n methods: {\n //排序\n sortData(params){\n// if (params.order == 'normal') {\n// return;\n// }\n this.queryData.sort = params.key;\n this.queryData.order = params.order;\n if (this.isSearch) {\n this.cateadd(this.queryDataPage)\n } else {\n this.taskList()\n }\n },\n // 时间转换\n handleChange (date) {\n // console.log(date)\n this.startDate = date\n },\n endChange (date) {\n this.endDate = date\n },\n // 点币记录\n currencyChangepage (res) {\n this.currencyPage = res\n this.currencyLIist()\n },\n currencyLIist () {\n axios\n .request({\n method: 'POST',\n url: '/admins/proxy/change',\n data: {\n id: this.currencyId,\n page: this.currencyPage,\n perPage: this.queryData.pagenum\n }\n })\n .then(res => {\n if (res.data.code === 'success') {\n this.currencyData = res.data.data.data\n this.currencyTotal = res.data.data.total\n } else {\n this.$Message.error(res.data.message, 'middle')\n }\n })\n },\n // 余额提现记录\n withdraw () {\n axios\n .request({\n method: 'POST',\n url: '/admins/proxy/withdraw',\n data: {\n id: this.withdrawId,\n page: this.withdrawPage,\n perPage: this.queryData.pagenum\n }\n })\n .then(res => {\n if (res.data.code === 'success') {\n this.withdrawData = res.data.data.data\n this.withdrawTotal = res.data.data.total\n } else {\n this.$Message.error(res.data.message, 'middle')\n }\n })\n },\n // 余额提现分页\n withdrawchangepage (res) {\n this.withdrawPage = res\n this.withdraw()\n },\n // 下级代理数据\n invite () {\n axios\n .request({\n method: 'POST',\n url: '/admins/proxy/invite',\n data: {\n id: this.inviteId,\n page: this.invitePage,\n perPage: this.queryData.pagenum\n }\n })\n .then(res => {\n if (res.data.code === 'success') {\n this.inviteData = res.data.data.data\n this.inviteTotal = res.data.data.total\n } else {\n this.$Message.error(res.data.message, 'middle')\n }\n })\n },\n // 下级代理数据分页\n invitechangepage (res) {\n this.invitePage = res\n this.invite()\n },\n // 分页\n levelchangepage (res) {\n this.queryDataPage = res\n if (this.isSearch) {\n this.cateadd(this.queryDataPage)\n } else {\n this.taskList()\n }\n },\n // 点击查询\n cateadd (page) {\n var listData = {\n page: page,\n mobile: this.queryData.mobile,\n level: this.queryData.cp_id,\n province: this.postData.province,\n city: this.postData.city,\n district: this.postData.district,\n startTime: this.startDate,\n endTime: this.endDate,\n status: this.queryData.status,\n perPage: 15,\n sort: this.queryData.sort,\n order: this.queryData.order\n }\n // 清除对象中的空属性\n listData = this.clearNullData(listData)\n axios\n .request({\n method: 'POST',\n url: '/admins/proxy/list?id=' + this.id,\n data: listData\n })\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 taskList () {\n let params = {\n page: this.queryDataPage,\n perPage: this.queryData.pagenum,\n sort: this.queryData.sort,\n order: this.queryData.order,\n }\n // 清除对象中的空属性\n params = this.clearNullData(params)\n axios\n .request({\n method: 'POST',\n url: '/admins/proxy/list?id=' + this.id,\n data: params,\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 getProvince (type) {\n axios.request({\n method: 'GET',\n url: '/admins/area/0'\n }).then((res) => {\n if (res.data.code === 'success') {\n // this.postData.province === '' && (this.postData.province = res.data.data.list[0].id)\n this.provinceList = res.data.data.list\n } else {\n this.$Message.error(res.data.message, 'middle')\n }\n })\n },\n // 市\n getCity () {\n var id = this.postData.province\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\n this.postData.city = res.data.data.list[0].id\n this.getDistrict();\n } else {\n this.$Message.error(res.data.message, 'middle')\n }\n })\n },\n // 区\n getDistrict () {\n var id = parseInt(this.$route.query.id)\n axios.request({\n method: 'GET',\n url: '/admins/area/' + this.postData.city\n }).then((res) => {\n if (res.data.code === 'success') {\n this.districtList = res.data.data.list\n this.postData.district = res.data.data.list[0].id\n if (this.$route.query.id) {\n this.postData.district = this.bankList[id].district\n }\n } else {\n this.$Message.error(res.data.message, 'middle')\n }\n })\n },\n // 促销设置\n cateaddok () {\n axios.request({\n url: '/admins/proxy/setproxy',\n data: {\n type: 0,\n id: this.promotionId,\n free_num: this.free_num,\n },\n method: 'POST'\n })\n .then(res => {\n if (res.data.code === 'success') {\n this.$Message.warning(res.data.message, 'middle')\n if (this.isSearch) {\n this.cateadd(this.queryDataPage)\n } else {\n this.taskList()\n }\n } else {\n this.$Message.error(res.data.message, 'middle')\n }\n })\n },\n // 解除代理\n relieve () {\n axios.request({\n url: '/admins/proxy/relieve',\n data: {\n id: this.promotionId\n },\n method: 'POST'\n })\n .then(res => {\n if (res.data.code === 'success') {\n this.$Message.warning(res.data.message, 'middle')\n if (this.isSearch) {\n this.cateadd(this.queryDataPage)\n } else {\n this.taskList()\n }\n } else {\n this.$Message.error(res.data.message, 'middle')\n }\n })\n },\n // 私信\n privateLetter () {\n if (this.private_content === '') {\n this.$Message.warning('私信标题不能为空', 'middle')\n } else {\n axios.request({\n url: '/admins/proxy/sendmsg',\n data: {\n id: this.promotionId,\n title: this.private_title,\n content: this.private_content\n },\n method: 'POST'\n })\n .then(res => {\n if (res.data.code === 'success') {\n this.$Message.warning(res.data.message, 'middle')\n if (this.isSearch) {\n this.cateadd(this.queryDataPage)\n } else {\n this.taskList()\n }\n } else {\n this.$Message.error(res.data.message, 'middle')\n }\n })\n }\n },\n // 点币汇率设置\n successCoin () {\n axios\n .request({\n url: '/admins/proxy/setproxy',\n data: {\n id: this.currencyUserId,\n coin: this.currencyCoin,\n type: 0\n },\n method: 'POST'\n })\n .then(res => {\n if (res.data.code === 'success') {\n this.showCurrency = false\n this.$Message.success(res.data.message, 'middle')\n if (this.isSearch) {\n this.cateadd(this.queryDataPage)\n } else {\n this.taskList()\n }\n } else {\n this.$Message.error(res.data.message)\n }\n })\n },\n // 代理费分佣设置\n proxyOk (name) {\n this.$refs[name].validate((valid) => {\n if (valid) {\n axios\n .request({\n url: '/admins/proxy/setproxy',\n data: {\n id: this.proxyID,\n type: this.type,\n proxy: this.formValidate.proxy,\n proxy_one: this.formValidate.proxy_one,\n proxy_one_left: this.formValidate.proxy_one_left,\n proxy_one_right: this.formValidate.proxy_one_right,\n proxy_two: this.formValidate.proxy_two,\n proxy_two_right: this.formValidate.proxy_two_right,\n proxy_two_left: this.formValidate.proxy_two_left\n },\n method: 'POST'\n })\n .then(res => {\n if (res.data.code === 'success') {\n this.showProxy = false\n this.$Message.success(res.data.message, 'middle')\n if (this.isSearch) {\n this.cateadd(this.queryDataPage)\n } else {\n this.taskList()\n }\n } else {\n this.$Message.error(res.data.message)\n }\n })\n } else {\n // this.$Message.error('Fail!');\n }\n })\n },\n // 取消\n hideProxy (name) {\n this.showProxy = false\n this.$refs[name].resetFields()\n },\n // 代理费详细分页\n agentchangepage (res) {\n this.agentPage = res\n this.getAgentDetail()\n },\n //获取代理费详细\n getAgentDetail(){\n axios\n .request({\n url: '/admins/proxy/agentlog',\n data: {\n id: this.curAgentId\n },\n method: 'POST'\n })\n .then(res => {\n if (res.data.code === 'success') {\n this.agentData = res.data.data.data;\n this.agentTotal = res.data.data.total\n } else {\n this.$Message.error(res.data.message)\n }\n })\n }\n }\n }\n",null]}
|