diff --git a/public/favicon.ico b/public/favicon.ico old mode 100644 new mode 100755 index 32636c4..984092a Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/src/assets/logo-mini.png b/src/assets/logo-mini.png old mode 100644 new mode 100755 index 93be185..7ec72bd Binary files a/src/assets/logo-mini.png and b/src/assets/logo-mini.png differ diff --git a/src/layout/components/Sidebar/Logo.vue b/src/layout/components/Sidebar/Logo.vue index d95d379..e00be39 100644 --- a/src/layout/components/Sidebar/Logo.vue +++ b/src/layout/components/Sidebar/Logo.vue @@ -2,12 +2,11 @@ diff --git a/src/views/application/components/addCategory.vue b/src/views/application/components/addCategory.vue index 843d893..fae086b 100644 --- a/src/views/application/components/addCategory.vue +++ b/src/views/application/components/addCategory.vue @@ -33,18 +33,30 @@ - - + + + + @@ -129,7 +169,10 @@ } from "@/api/application/category.js" import { index as getBaseList - } from "@/api/system/baseForm.js" + } from "@/api/system/baseForm.js" + import { + getToken + } from '@/utils/auth' import { index } from "@/api/product/category.js" @@ -140,15 +183,21 @@ id: '', type: 'add', productPhaseList: [], - webinarList: [], + webinarList: [], + uploadOther: { + token: "" + }, + action: `${process.env.VUE_APP_UPLOAD_API}`, + iconList: [], // 存储多选的category id + iconActiveList: [], sampleTypeList: [{ id: 0, value: 'Normal' }, { id: 1, value: 'Special' - }], - visibelList:[{ + }], + visibelList: [{ id: 1, value: 'Yes' }, { @@ -157,14 +206,17 @@ }], form: { name: '', - type: 0, - is_visible:1, + type: 0, + is_visible: 1, + is_recommend: 0, sort: 0, size: [], lon: [], phase: [], interaction: [], - webinar_ids: [] + webinar_ids: [], + icon_id:'', + icon_active_id:'' }, rules: { name: [{ @@ -200,12 +252,61 @@ page_size: 9999, }) this.webinarList = res.data - }, + }, + + handleRemove(file, fileList) { + this.iconList = fileList + }, + handlesuccess(response, file, fileList) { + if (response && response.hasOwnProperty('errcode')) { + this.$Message.warning(response.errmsg || '') + this.iconList = [] + return + } + this.iconList = fileList + }, + + handleRemoveA(file, fileList) { + this.iconActiveList = fileList + }, + handlesuccessA(response, file, fileList) { + if (response && response.hasOwnProperty('errcode')) { + this.$Message.warning(response.errmsg || '') + this.iconList = [] + return + } + this.iconActiveList = fileList + }, + + submit() { if (this.id) { this.form.id = this.id } else { this.form.id = '' + } + if (this.iconList.length > 0) { + for (var h of this.iconList) { + if (h.response) { + this.form.icon_id = h.response.id + } else { + this.form.icon_id = h.id + } + } + } else { + this.form.icon_id = '' + } + + if (this.iconActiveList.length > 0) { + for (var h of this.iconActiveList) { + if (h.response) { + this.form.icon_active_id = h.response.id + } else { + this.form.icon_active_id = h.id + } + } + } else { + this.form.icon_active_id = '' } console.log("this.form", this.form) // return @@ -225,16 +326,34 @@ getDetail() { show({ id: this.id, - show_relation: [] + show_relation: ['icon','iconActive'] }).then(res => { this.form = this.base.requestToForm(res, this.form) - this.form.type = res.type ? res.type : 0 - this.form.is_visible = res.is_visible?res.is_visible:0 + this.form.type = res.type ? res.type : 0 + this.form.is_visible = res.is_visible ? res.is_visible : 0 + this.form.is_recommend = res.is_recommend ? res.is_recommend : 0 + this.form.size = res.size ? res.size : [] this.form.lon = res.lon ? res.lon : [] this.form.phase = res.phase ? res.phase : [] - this.form.interaction = res.interaction ? res.interaction : [], - this.form.webinar_ids = res.webinar_ids ? res.webinar_ids : [] + this.form.interaction = res.interaction ? res.interaction : [] + this.form.webinar_ids = res.webinar_ids ? res.webinar_ids : [] + if(res.icon){ + this.iconList.push({ + name: res.icon.original_name, + id: res.icon.id, + url: res.icon.url + }) + } + if(res.icon_active){ + this.iconActiveList.push({ + name: res.icon_active.original_name, + id: res.icon_active.id, + url: res.icon_active.url + }) + } + + }) } }, @@ -245,11 +364,14 @@ this.getDetail() } } else { - this.id = '' + this.id = '' + this.iconList = [] + this.iconActiveList = [] this.form = { name: '', - type: 0, - is_visible:1, + type: 0, + is_visible: 1, + is_recommend: 0, sort: 0, size: [], lon: [], @@ -266,4 +388,13 @@ diff --git a/src/views/product/components/addPhase.vue b/src/views/product/components/addPhase.vue index 3fcb1e3..850614c 100644 --- a/src/views/product/components/addPhase.vue +++ b/src/views/product/components/addPhase.vue @@ -49,7 +49,22 @@ - + +