diff --git a/src/components/site/serviceSetting/menuColorSet.vue b/src/components/site/serviceSetting/menuColorSet.vue index 9edd051..88247e7 100644 --- a/src/components/site/serviceSetting/menuColorSet.vue +++ b/src/components/site/serviceSetting/menuColorSet.vue @@ -158,20 +158,14 @@ export default { } }, saveConfirm() { - let obj = {} - obj.uid = this.info.uid - obj.type = this.info.type - obj.logo_bgcolor = this.tabColor.replace('#','') - obj.link_btn_color = this.themeColor.replace('#','') - obj.selected_nav_bgcolor = this.navColor.replace('#','') - - if(!this.sub_logo_file || !this.rep_logo_file){ - this.$message.warning(`请上传logo图`); - return false; - } - - obj.submit_logo = this.sub_logo_file - obj.report_logo = this.rep_logo_file + let obj = new FormData() + obj.set('uid', this.info.uid) + obj.set('type', this.info.type) + if(this.tabColor) obj.set('logo_bgcolor', this.tabColor.replace('#','')) + if(this.themeColor) obj.set('link_btn_color', this.themeColor.replace('#','')) + if(this.navColor) obj.set('selected_nav_bgcolor', this.navColor.replace('#','')) + if(this.sub_logo_file) obj.set('submit_logo', this.sub_logo_file) + if(this.rep_logo_file) obj.set('report_logo', this.rep_logo_file) const that = this this.$http('POST', '/agentnew/ajax_update_service_style', obj).then(response => {