|
|
@ -170,8 +170,6 @@ export default { |
|
|
|
name: 'HomeView', |
|
|
|
data() { |
|
|
|
return { |
|
|
|
// AUTH |
|
|
|
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTI2NDY1NDUsIm5iZiI6MTc1MjY0NjU0NSwiZXhwIjoxNzU1MjM4NTQ1LCJ1c2VyIjoic3VidXNlciIsImxvZ2luX3R5cGUiOjAsImFpZCI6IjEifQ.G-Is-x9qPMiV_urOlDPQVRjfAIozySxL5EK2k82d46k', |
|
|
|
// 表格加载 |
|
|
|
tableLoading: true, |
|
|
|
type2name:[], |
|
|
@ -248,13 +246,7 @@ export default { |
|
|
|
this.tableLoading = true |
|
|
|
const that = this |
|
|
|
that.serviceList = [] |
|
|
|
this.$http('POST', '/agentnew/ajax_get_supply_services', { |
|
|
|
|
|
|
|
},{ |
|
|
|
headers:{ |
|
|
|
'Auth': this.token |
|
|
|
} |
|
|
|
}).then(response => { |
|
|
|
this.$http('POST', '/agentnew/ajax_get_supply_services', {}).then(response => { |
|
|
|
this.tableLoading = false |
|
|
|
this.$nextTick(() => { |
|
|
|
that.serviceList = response.data.list |
|
|
@ -270,64 +262,40 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
getSaleStats() { |
|
|
|
this.$http('POST', '/agentnew/ajax_get_sale_stats', { |
|
|
|
|
|
|
|
},{ |
|
|
|
headers:{ |
|
|
|
'Auth': this.token |
|
|
|
} |
|
|
|
}).then(response => { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.saleStats = response.data |
|
|
|
}) |
|
|
|
}).catch(error => { |
|
|
|
console.error(error, 'error') |
|
|
|
this.$http('POST', '/agentnew/ajax_get_sale_stats', {}).then(response => { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.saleStats = response.data |
|
|
|
}) |
|
|
|
}).catch(error => { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
}, |
|
|
|
getExpireServices() { |
|
|
|
this.$http('POST', '/agentnew/ajax_get_expire_services', { |
|
|
|
|
|
|
|
},{ |
|
|
|
headers:{ |
|
|
|
'Auth': this.token |
|
|
|
} |
|
|
|
}).then(response => { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.expireServices = response.data |
|
|
|
}) |
|
|
|
}).catch(error => { |
|
|
|
console.error(error, 'error') |
|
|
|
this.$http('POST', '/agentnew/ajax_get_expire_services', {}).then(response => { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.expireServices = response.data |
|
|
|
}) |
|
|
|
}).catch(error => { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
}, |
|
|
|
getWalletList() { |
|
|
|
this.$http('POST', '/agentnew/ajax_get_wallet', { |
|
|
|
|
|
|
|
},{ |
|
|
|
headers:{ |
|
|
|
'Auth': this.token |
|
|
|
} |
|
|
|
}).then(response => { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.walletList = response.data |
|
|
|
}) |
|
|
|
}).catch(error => { |
|
|
|
console.error(error, 'error') |
|
|
|
this.$http('POST', '/agentnew/ajax_get_wallet', {}).then(response => { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.walletList = response.data |
|
|
|
}) |
|
|
|
}).catch(error => { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
}, |
|
|
|
getNoticeList(){ |
|
|
|
this.$http('POST', '/agentnew/ajax_get_notice_list', { |
|
|
|
|
|
|
|
},{ |
|
|
|
headers:{ |
|
|
|
'Auth': this.token |
|
|
|
} |
|
|
|
}).then(response => { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.noticeList = response.data |
|
|
|
}) |
|
|
|
}).catch(error => { |
|
|
|
console.error(error, 'error') |
|
|
|
this.$http('POST', '/agentnew/ajax_get_notice_list', {}).then(response => { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.noticeList = response.data |
|
|
|
}) |
|
|
|
}).catch(error => { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
}, |
|
|
|
lookTaoBaoExpire() { |
|
|
|
// 查看淘宝账号 |
|
|
@ -349,22 +317,15 @@ export default { |
|
|
|
}, |
|
|
|
// 弹框相关方法---start |
|
|
|
showRecommendedAgentDialog() { |
|
|
|
this.$http('POST', '/agentnew/ajax_get_recommended_text', { |
|
|
|
|
|
|
|
},{ |
|
|
|
headers:{ |
|
|
|
'Auth': this.token |
|
|
|
} |
|
|
|
}).then(response => { |
|
|
|
this.tableLoading = false |
|
|
|
this.$nextTick(() => { |
|
|
|
this.recommendedText = response.data.text |
|
|
|
this.dialogVisibleRecommendedAgent = true |
|
|
|
}) |
|
|
|
this.$http('POST', '/agentnew/ajax_get_recommended_text', {}).then(response => { |
|
|
|
this.tableLoading = false |
|
|
|
this.$nextTick(() => { |
|
|
|
this.recommendedText = response.data.text |
|
|
|
this.dialogVisibleRecommendedAgent = true |
|
|
|
}) |
|
|
|
}).catch(error => { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
// 取消按钮事件 |
|
|
|
handleCancel() { |
|
|
|