diff --git a/canvas-container/components/canvasEditPage.vue b/canvas-container/components/canvasEditPage.vue index f49312e..48d57f8 100644 --- a/canvas-container/components/canvasEditPage.vue +++ b/canvas-container/components/canvasEditPage.vue @@ -159,6 +159,7 @@ }) break case 'header': + case 'classify-header': case 'notice': case 'text': case 'imageTextNav': @@ -274,7 +275,7 @@ position: relative; cursor: move; background-color: #fff; - min-height: 100px; + min-height: 60px; &.item-assistDiv,&.item-notice,&.item-text{ min-height: 0px; } diff --git a/canvas-container/components/canvasShow/basics/classifyheader/app/index.vue b/canvas-container/components/canvasShow/basics/classifyheader/app/index.vue new file mode 100644 index 0000000..cf50d5a --- /dev/null +++ b/canvas-container/components/canvasShow/basics/classifyheader/app/index.vue @@ -0,0 +1,66 @@ + + + + + diff --git a/canvas-container/components/canvasShow/basics/classifyheader/mixin.js b/canvas-container/components/canvasShow/basics/classifyheader/mixin.js new file mode 100644 index 0000000..04e21db --- /dev/null +++ b/canvas-container/components/canvasShow/basics/classifyheader/mixin.js @@ -0,0 +1,48 @@ +import api from '../../config/api' +import {funMixin} from '../../config/mixin' + +export const commonMixin = { + name: 'classifyheaderComponent', + mixins: [funMixin], + props: { + terminal: { + type: Number, + default: 4 + }, + typeId: { + type: Number, + default: 1 + }, + shopId: { + type: Number, + default: 0 + }, + componentContent: { + type: Object + } + }, + data () { + return { + classifyData: [] + } + }, + mounted() { + this.getData() + }, + methods: { + getData() { + this.beforeGetData() + const _ = this + _.sendReq({ + url: `${api.getClassify}?page=1&pageSize=20`, + method: 'GET' + }, (res) => { + _.afterGetData() + _.classifyData = res.data + console.log(_.classifyData) + },(err)=>{ + _.afterGetData() + }) + } + } +} diff --git a/canvas-container/components/canvasShow/basics/classifyheader/pc/index.vue b/canvas-container/components/canvasShow/basics/classifyheader/pc/index.vue new file mode 100644 index 0000000..eb00f89 --- /dev/null +++ b/canvas-container/components/canvasShow/basics/classifyheader/pc/index.vue @@ -0,0 +1,108 @@ + + + + + diff --git a/canvas-container/components/canvasShow/basics/header/app/index.vue b/canvas-container/components/canvasShow/basics/header/app/index.vue index 19d1869..0fe9099 100644 --- a/canvas-container/components/canvasShow/basics/header/app/index.vue +++ b/canvas-container/components/canvasShow/basics/header/app/index.vue @@ -11,7 +11,7 @@ mode="widthFix"> -
+
首页
diff --git a/canvas-container/components/canvasShow/componentMap.js b/canvas-container/components/canvasShow/componentMap.js index 03bb4b8..d6a0766 100644 --- a/canvas-container/components/canvasShow/componentMap.js +++ b/canvas-container/components/canvasShow/componentMap.js @@ -2,6 +2,7 @@ export const componentMap = [ // 小程序 new Map([ ['header', () => import('./basics/header/app')], // 首页头部 + ['classify-header', () => import('./basics/classifyheader/app')], // 首页头部 ['banner', () => import('./basics/banner')], // 轮播图 ['text', () => import('./basics/text')], // 文本 ['imageText', () => import('./basics/imageText')], // 图文 @@ -27,6 +28,7 @@ export const componentMap = [ // H5 new Map([ ['header', () => import('./basics/header/app')], // 首页头部 + ['classify-header', () => import('./basics/classifyheader/app')], // 首页头部 ['banner', () => import('./basics/banner')], // 轮播图 ['text', () => import('./basics/text')], // 文本 ['imageText', () => import('./basics/imageText')], // 图文 @@ -52,6 +54,7 @@ export const componentMap = [ // APP new Map([ ['header', () => import('./basics/header/app')], // 首页头部 + ['classify-header', () => import('./basics/classifyheader/app')], // 首页头部 ['banner', () => import('./basics/banner')], // 轮播图 ['text', () => import('./basics/text')], // 文本 ['imageText', () => import('./basics/imageText')], // 图文 @@ -77,6 +80,7 @@ export const componentMap = [ // PC new Map([ ['header', () => import('./basics/header/pc')], // 首页头部 + ['classify-header', () => import('./basics/classifyheader/pc')], // 首页头部 ['banner', () => import('./basics/banner')], // 轮播图 ['text', () => import('./basics/text')], // 文本 ['imageText', () => import('./basics/imageText')], // 图文 diff --git a/canvas-container/components/canvasShow/config/mixin/sendReqMixin.js b/canvas-container/components/canvasShow/config/mixin/sendReqMixin.js index 9c18178..88e9244 100644 --- a/canvas-container/components/canvasShow/config/mixin/sendReqMixin.js +++ b/canvas-container/components/canvasShow/config/mixin/sendReqMixin.js @@ -2,6 +2,7 @@ * 发送请求 mixin */ import request from './server' +import {getProject} from "@@/utils/auth.js" /* eslint-disable */ export const sendReq = { @@ -17,13 +18,15 @@ export const sendReq = { */ sendReq (params, callback, errorCallback) { let self = this + request({ method: params.method || 'POST', url: params.url, data: params.data || {}, withCredentials : true, headers: { - 'Content-type': params.contentType || 'application/json;charset=utf-8' + 'Content-type': params.contentType || 'application/json;charset=utf-8', + "project" : getProject() } }).then((res) => { if (res && res.data) { diff --git a/canvas-container/components/leftBar/panelList.js b/canvas-container/components/leftBar/panelList.js index e2fdaf3..c2a360a 100644 --- a/canvas-container/components/leftBar/panelList.js +++ b/canvas-container/components/leftBar/panelList.js @@ -17,7 +17,22 @@ export const panelList = [ title: '', fontSizeNum: '', textFontW: 'normal', - titColor: '#CD5353' + titColor: '#CD5353', + useSelfTitle : 2, + } + }, + { + title: '商品分类', + iconClass: 'icon-dianputoubu', + type: 'classify-header', + undraggable: true, // 不可拖动 + onlyAdmin: true, // 平台端显示 + onlyApp: true, // 只在app显示 + componentContent: { + fontSizeNum: '', + textFontW: 'normal', + titColor: '#CD5353', + } }, { diff --git a/canvas-container/components/toolBar/BasicsComp/classifyheaderTool.vue b/canvas-container/components/toolBar/BasicsComp/classifyheaderTool.vue new file mode 100644 index 0000000..c28a17f --- /dev/null +++ b/canvas-container/components/toolBar/BasicsComp/classifyheaderTool.vue @@ -0,0 +1,165 @@ + + + + + diff --git a/canvas-container/components/toolBar/BasicsComp/customTool.vue b/canvas-container/components/toolBar/BasicsComp/customTool.vue index e63f657..78333cb 100644 --- a/canvas-container/components/toolBar/BasicsComp/customTool.vue +++ b/canvas-container/components/toolBar/BasicsComp/customTool.vue @@ -39,7 +39,7 @@ :class="activeComponent.componentContent.layoutType" >
- +
@@ -625,7 +625,7 @@ .item { margin: -1px 0 0 -1px; flex: 0 0 50%; - height: 142px; + height: 125px; border: 1px solid #E8EAEC; box-sizing: border-box; display: flex; @@ -634,7 +634,7 @@ cursor: pointer; position: relative; &:before { - content: '600像素'; + content: '600px'; font-size: 12px; color: #666666; padding: 0 10px; @@ -670,7 +670,7 @@ flex: 0 0 100%; height: 93px; &:before { - content: '1200像素'; + content: '1200px'; } } } @@ -679,7 +679,7 @@ flex: 0 0 33.3%; height: 93px; &:before { - content: '400像素'; + content: '400px'; } } } @@ -688,7 +688,7 @@ flex:0 0 25%; height: 71px; &:before { - content: '300像素'; + content: '300px'; } } } @@ -698,7 +698,7 @@ flex: 0 0 50%; height: 142px; &:before { - content: '600x600像素'; + content: '600x600px'; } } } @@ -706,13 +706,13 @@ flex-wrap: wrap; .item{ &:before { - content: '600x600像素'; + content: '600x600px'; } } .item:nth-child(1) { height: 284px; &:before { - content: '600x1200像素'; + content: '600x1200px'; } } .item:nth-child(3) { @@ -724,13 +724,13 @@ flex-wrap: wrap; .item{ &:before { - content: '600x600像素'; + content: '600x500px'; } } .item:nth-child(1) { flex: 0 0 100%; &:before { - content: '1200x600像素'; + content: '1200x500px'; } } } @@ -738,18 +738,18 @@ flex-wrap: wrap; .item{ &:before { - content: '300x300像素'; + content: '300x300px'; } } .item:nth-child(1) { &:before { - content: '600x600像素'; + content: '600x600px'; } } .item:nth-child(2) { height: 72px; &:before { - content: '600x300像素'; + content: '600x300px'; } } .item:nth-child(3) { @@ -990,76 +990,76 @@ .layoutBox { .item { &:before { - content: '360像素'; + content: '360px'; } } } .L1 { .item { &:before { - content: '720像素'; + content: '720px'; } } } .L3 { .item { &:before { - content: '240像素'; + content: '240px'; } } } .L4 { .item { &:before { - content: '180像素'; + content: '180px'; } } } .T2B2 { .item { &:before { - content: '360x360像素'; + content: '360x360px'; } } } .L1R2 { .item{ &:before { - content: '360x360像素'; + content: '360x360px'; } } .item:nth-child(1) { &:before { - content: '360x720像素'; + content: '360x720px'; } } } .T1B2 { .item{ &:before { - content: '360x360像素'; + content: '360x360px'; } } .item:nth-child(1) { &:before { - content: '720x360像素'; + content: '720x360px'; } } } .L1T1B2 { .item{ &:before { - content: '180x180像素'; + content: '180x180px'; } } .item:nth-child(1) { &:before { - content: '360x360像素'; + content: '360x360px'; } } .item:nth-child(2) { &:before { - content: '360x180像素'; + content: '360x180px'; } } } diff --git a/canvas-container/components/toolBar/BasicsComp/headerTool.vue b/canvas-container/components/toolBar/BasicsComp/headerTool.vue index b195c82..3a47ab0 100644 --- a/canvas-container/components/toolBar/BasicsComp/headerTool.vue +++ b/canvas-container/components/toolBar/BasicsComp/headerTool.vue @@ -43,7 +43,15 @@
- + +
+
使用默认标题头
+ + + + +
+ diff --git a/canvas-container/components/toolBar/componentMap.js b/canvas-container/components/toolBar/componentMap.js index 4aa318d..29cbba1 100644 --- a/canvas-container/components/toolBar/componentMap.js +++ b/canvas-container/components/toolBar/componentMap.js @@ -1,5 +1,6 @@ export const componentMap = new Map([ ['header', () => import('./BasicsComp/headerTool')], // 头部 + ['classify-header', () => import('./BasicsComp/classifyheaderTool')], // 商品分类头部 ['banner', () => import('./BasicsComp/bannerTool')], // 轮播图 ['text', () => import('./BasicsComp/textTool')], // 文本 ['videoBox', () => import('./BasicsComp/videoTool')], // 视频控件 diff --git a/canvas-container/components/toolBar/shopComp/discountTool.vue b/canvas-container/components/toolBar/shopComp/discountTool.vue index e1fb462..3ed1ace 100644 --- a/canvas-container/components/toolBar/shopComp/discountTool.vue +++ b/canvas-container/components/toolBar/shopComp/discountTool.vue @@ -80,6 +80,7 @@ import {checkEmptyChild} from '@@/config/common' import ToolSelect from '../toolModule/tool-select' import ToolSingleImg from '../toolModule/tool-single-img' import ToolSelectLink from '../toolModule/tool-select-link' +import {getShopId} from "@@/utils/auth.js" export default { mixins: [toolMixin, sendReqMixin], name: 'discountTool', @@ -160,7 +161,7 @@ export default { if(this.typeId===1){ _url = `${api.getMinDiscount}` } else if(this.typeId===3){ - _url = `${api.getDiscounts}?shopId=${Cookies.get('cereShopId')}` + _url = `${api.getDiscounts}?shopId=${getShopId()}` } const params = { method: 'GET', diff --git a/canvas-container/components/toolBar/shopComp/groupTool.vue b/canvas-container/components/toolBar/shopComp/groupTool.vue index 25eccf5..7f7e4a3 100644 --- a/canvas-container/components/toolBar/shopComp/groupTool.vue +++ b/canvas-container/components/toolBar/shopComp/groupTool.vue @@ -91,7 +91,6 @@