Commit 8bde7ed4a3b185ff6d3c4f0b1635a742bacac298

Authored by 徐烜
1 parent c7a2bd96

电子站牌项目

1、修改common/header/links.js,删除网页github,微信群等menu组件
2、修改editor/header/action-menu.js,删除设置为模版的下拉功能,将发布按钮改成一般按钮
3、修改editor/modals/preview.vue,删除二维码等不必要的链接
4、修改core/index.js,删除feedback组件引用(用户信息,退出登录)
5、修改lang/en-US.js zh-CN.js,设置title为电子站牌
6、修改views/work-manager/index.vue,删除左边菜单(作品列表,模版列表等)
7、修改views/work-manager/list-mixin.js,当点击新增作品时,打开编辑页面后,本页面也要刷新
8、替换asserts/lbp-picture-placeholder.png,默认的新增作品图片
front-end/h5/src/assets/lbp-picture-placeholder-bak.png 0 → 100644

23.2 KB

front-end/h5/src/assets/lbp-picture-placeholder.png

23.2 KB | W: | H:

775 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
front-end/h5/src/components/common/header/links.js
@@ -12,30 +12,7 @@ export default { @@ -12,30 +12,7 @@ export default {
12 defaultSelectedKeys={['2']} 12 defaultSelectedKeys={['2']}
13 style={{ lineHeight: '64px', display: 'inline-block' }} 13 style={{ lineHeight: '64px', display: 'inline-block' }}
14 > 14 >
15 - <a-menu-item key="dingtalk" >  
16 - <a-popover title="👨🏻‍💻👩🏻‍💻欢迎加入鲁班-H5交流群">  
17 - <template slot="content">  
18 - <p>For users in other languages(not zh-CN), <br />please keep using Github issue tracker. 🤟 </p>  
19 - <p>扫描二维码加入 钉钉 讨论组</p>  
20 - <img src="https://user-images.githubusercontent.com/12668546/61447488-a379f700-a983-11e9-9956-139352a2585d.png" width="200" />  
21 - <p>因为微信群二维码会过期,<br />请前往<a href="https://github.com/ly525/luban-h5/issues/57" target="_blank" rel="noopener">微信群和QQ群</a> 查看</p>  
22 - </template>  
23 - <span style={{ color: 'white', lineHeight: '64px', height: '64px', display: 'inline-block' }}><a-icon type="qrcode" />{this.$t('header.chat')}</span>  
24 - </a-popover>  
25 - </a-menu-item>  
26 - <a-menu-item key="document">  
27 - {/* <a href="https://ly525.github.io/luban-h5" target="_blank" rel="noopener" style={{ color: 'white' }}><a-icon type="read" />文档</a> */}  
28 - <a href="https://ly525.github.io/luban-h5/zh/" target="_blank" rel="noopener" style={{ color: 'white' }}><a-icon type="read" />{this.$t('header.chineseDocument')}</a>  
29 - </a-menu-item>  
30 - <a-menu-item key="document-en">  
31 - <a href="https://ly525.github.io/luban-h5" target="_blank" rel="noopener" style={{ color: 'white' }}><a-icon type="read" />Document(En)</a>  
32 - </a-menu-item>  
33 - <a-menu-item key="gitee">  
34 - <a href="https://gitee.com/ly525/luban-h5" target="_blank" rel="noopener" style={{ color: 'white' }}>Gitee</a>  
35 - </a-menu-item>  
36 - <a-menu-item key="github">  
37 - <a href="https://github.com/ly525/luban-h5" target="_blank" rel="noopener" style={{ color: 'white' }}><a-icon type="github" />Github</a>  
38 - </a-menu-item> 15 +
39 </a-menu> 16 </a-menu>
40 ) 17 )
41 } 18 }
front-end/h5/src/components/core/editor/header/action-menu.js
@@ -89,23 +89,14 @@ export default { @@ -89,23 +89,14 @@ export default {
89 </a-menu-item> 89 </a-menu-item>
90 {/* <a-menu-item key="3" class="transparent-bg"><a-button size="small">发布</a-button></a-menu-item> */} 90 {/* <a-menu-item key="3" class="transparent-bg"><a-button size="small">发布</a-button></a-menu-item> */}
91 <a-menu-item key="3" class="transparent-bg"> 91 <a-menu-item key="3" class="transparent-bg">
92 - <a-dropdown-button 92 + <a-button
93 size="small" 93 size="small"
94 onClick={this.handlePublish} 94 onClick={this.handlePublish}
95 loading={this.saveWork_loading || this.uploadWorkCover_loading} 95 loading={this.saveWork_loading || this.uploadWorkCover_loading}
96 > 96 >
97 {this.$t('editor.header.publish') /* 发布 */} 97 {this.$t('editor.header.publish') /* 发布 */}
98 - <a-menu slot="overlay" onClick={this.handleSelectItem}>  
99 - <a-menu-item key="setAsTemplate">  
100 - <a-spin spinning={this.setWorkAsTemplate_loading} size="small">  
101 - {/* 设置为模板 */}  
102 - <a-icon type="cloud-upload" />{this.$t('editor.header.setAsTemplate')}  
103 - </a-spin>  
104 - </a-menu-item>  
105 - {/* <a-menu-item key="2"><a-icon type="user" />2nd menu item</a-menu-item> */}  
106 - {/* <a-menu-item key="3"><a-icon type="user" />3rd item</a-menu-item> */}  
107 - </a-menu>  
108 - </a-dropdown-button> 98 +
  99 + </a-button>
109 </a-menu-item> 100 </a-menu-item>
110 </a-menu> 101 </a-menu>
111 ) 102 )
front-end/h5/src/components/core/editor/modals/preview.vue
@@ -98,6 +98,7 @@ export default { @@ -98,6 +98,7 @@ export default {
98 width="70%" 98 width="70%"
99 okText="保存" 99 okText="保存"
100 > 100 >
  101 + <div slot='cancelText'>取消</div>
101 <div class="preview-wrapper"> 102 <div class="preview-wrapper">
102 <a-row gutter={20}> 103 <a-row gutter={20}>
103 <a-col span={8}> 104 <a-col span={8}>
@@ -146,26 +147,14 @@ export default { @@ -146,26 +147,14 @@ export default {
146 // onBlur={this.saveDescription} 147 // onBlur={this.saveDescription}
147 placeholder="请输入描述" 148 placeholder="请输入描述"
148 type="textarea" 149 type="textarea"
  150 + rows="6"
149 ></a-input> 151 ></a-input>
150 </div> 152 </div>
151 <div class="qrcode my-4"> 153 <div class="qrcode my-4">
152 - <div class="label">  
153 - <span>手机扫码分享给好友</span>  
154 - </div>  
155 - <div class="code">  
156 - <canvas style="float: left" id="qrcode-container"></canvas>  
157 - {/**  
158 - <a-radio-group class="radios" value={this.qrcodeSize} onChange={e => { this.qrcodeSize = e.target.value }}>  
159 - <a-radio label={500} value={500}>500x500</a-radio>  
160 - <a-radio label={1000} value={1000}>1000x1000</a-radio>  
161 - <a-radio label={2000} value={2000}>2000x2000</a-radio>  
162 - </a-radio-group>  
163 - */}  
164 - </div> 154 +
165 </div> 155 </div>
166 <div style="background: #fafafa;"> 156 <div style="background: #fafafa;">
167 <a-button type="link" icon="link" onClick={() => this.openNewTab('openPreviewPage')}>打开预览页面</a-button> 157 <a-button type="link" icon="link" onClick={() => this.openNewTab('openPreviewPage')}>打开预览页面</a-button>
168 - <a-button type="link" icon="link" onClick={() => this.openNewTab('buildEngineDocs')}>如果本地预览显示空白,点此查看文档</a-button>  
169 </div> 158 </div>
170 </div> 159 </div>
171 </a-col> 160 </a-col>
front-end/h5/src/components/core/index.js
@@ -105,7 +105,8 @@ const CoreEditor = { @@ -105,7 +105,8 @@ const CoreEditor = {
105 handleClose={() => { this.previewDialogVisible = false }} 105 handleClose={() => { this.previewDialogVisible = false }}
106 /> 106 />
107 } 107 }
108 - <Feedback /> 108 +
  109 + {/* <Feedback /> */}
109 </a-layout> 110 </a-layout>
110 ) 111 )
111 }, 112 },
front-end/h5/src/components/core/plugins/bsth/bsth-slide.js
@@ -12,6 +12,7 @@ import &#39;video.js/dist/video-js.css&#39; @@ -12,6 +12,7 @@ import &#39;video.js/dist/video-js.css&#39;
12 import { GalleryValue, GalleryValueType } from 'core/support/resource-gallery/components/galleryValue' 12 import { GalleryValue, GalleryValueType } from 'core/support/resource-gallery/components/galleryValue'
13 13
14 import './bsth-slide.css' 14 import './bsth-slide.css'
  15 +import './bsth-line-prop-panel.css'
15 16
16 function getDefaultItems () { 17 function getDefaultItems () {
17 const defaultItems = [ // TODO:目前鲁班的后端渲染引擎处理不了组件属性的自定义类型,所以自定义转换成普通对象 18 const defaultItems = [ // TODO:目前鲁班的后端渲染引擎处理不了组件属性的自定义类型,所以自定义转换成普通对象
@@ -62,7 +63,7 @@ export default { @@ -62,7 +63,7 @@ export default {
62 } 63 }
63 }, 64 },
64 // -------------- 数据属性 ------------- // 65 // -------------- 数据属性 ------------- //
65 - interval: PropTypes.number({ label: '间隔时间', defaultValue: 4000 }) 66 + interval: PropTypes.number({ label: '间隔时间(秒)', defaultValue: 3, layout: { prefixCls: 'bsth-line' } })
66 }, 67 },
67 render () { 68 render () {
68 const { items, activeIndex } = this 69 const { items, activeIndex } = this
@@ -81,7 +82,7 @@ export default { @@ -81,7 +82,7 @@ export default {
81 } 82 }
82 }, 83 },
83 mounted () { 84 mounted () {
84 - this.innerInterval = this.interval 85 + this.innerInterval = this.interval * 1000 // 毫秒
85 86
86 // 使用外部元素的框架定义视频的长宽 87 // 使用外部元素的框架定义视频的长宽
87 let $jQuery = this.private_jQuery 88 let $jQuery = this.private_jQuery
@@ -100,7 +101,7 @@ export default { @@ -100,7 +101,7 @@ export default {
100 } 101 }
101 }, 102 },
102 onPlayEnded () { 103 onPlayEnded () {
103 - this.innerInterval = this.interval 104 + this.innerInterval = this.interval * 1000 // 毫秒
104 }, 105 },
105 renderSwipeItemWithEdit (item) { 106 renderSwipeItemWithEdit (item) {
106 const gItem = GalleryValue.toGalleryValue(item) 107 const gItem = GalleryValue.toGalleryValue(item)
front-end/h5/src/locales/lang/en-US.js
1 export default { 1 export default {
2 app: { 2 app: {
3 - title: 'Luban H5' 3 + title: 'Ebus station'
4 }, 4 },
5 header: { 5 header: {
6 chineseDocument: '中文文档', 6 chineseDocument: '中文文档',
front-end/h5/src/locales/lang/zh-CN.js
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 */ 10 */
11 export default { 11 export default {
12 app: { 12 app: {
13 - title: '鲁班 H5' 13 + title: '电子站牌'
14 }, 14 },
15 header: { 15 header: {
16 chineseDocument: '中文文档', 16 chineseDocument: '中文文档',
front-end/h5/src/views/work-manager/index.vue
@@ -110,6 +110,7 @@ export default { @@ -110,6 +110,7 @@ export default {
110 return ( 110 return (
111 <a-layout style={{ height: '100vh' }}> 111 <a-layout style={{ height: '100vh' }}>
112 <Header> 112 <Header>
  113 + {/*
113 <a-dropdown slot="action-menu" style="margin-right: 12px;"> 114 <a-dropdown slot="action-menu" style="margin-right: 12px;">
114 <a-menu 115 <a-menu
115 slot="overlay" 116 slot="overlay"
@@ -136,9 +137,11 @@ export default { @@ -136,9 +137,11 @@ export default {
136 <a-icon type="user" /> 137 <a-icon type="user" />
137 </a> 138 </a>
138 </a-dropdown> 139 </a-dropdown>
  140 + */}
139 </Header> 141 </Header>
140 <a-layout> 142 <a-layout>
141 - <a-layout-sider width="160" style="background: #fff"> 143 + <a-layout-sider width="0" style="background: #fff">
  144 + {/*
142 <a-menu 145 <a-menu
143 mode="inline" 146 mode="inline"
144 // defaultSelectedKeys={['1']} 147 // defaultSelectedKeys={['1']}
@@ -147,6 +150,7 @@ export default { @@ -147,6 +150,7 @@ export default {
147 > 150 >
148 {this.renderSidebar(sidebarMenus)} 151 {this.renderSidebar(sidebarMenus)}
149 </a-menu> 152 </a-menu>
  153 + */}
150 </a-layout-sider> 154 </a-layout-sider>
151 <a-layout style="padding: 0 0 24px"> 155 <a-layout style="padding: 0 0 24px">
152 <a-layout-content style={{ padding: '24px', minHeight: '280px' }}> 156 <a-layout-content style={{ padding: '24px', minHeight: '280px' }}>
front-end/h5/src/views/work-manager/list-mixin.js
@@ -58,6 +58,12 @@ export default { @@ -58,6 +58,12 @@ export default {
58 _start: (pageNum - 1) * pageSize 58 _start: (pageNum - 1) * pageSize
59 } 59 }
60 this.isTemplate ? this.fetchWorkTemplates(payload) : this.fetchWorks(payload) 60 this.isTemplate ? this.fetchWorkTemplates(payload) : this.fetchWorks(payload)
  61 + },
  62 + handleCreateWork () {
  63 + this.createWork().then(res => {
  64 + this.handleSearch()
  65 + this.fetchCount({ is_template: this.isTemplate })
  66 + })
61 } 67 }
62 }, 68 },
63 render (h) { 69 render (h) {
@@ -67,7 +73,7 @@ export default { @@ -67,7 +73,7 @@ export default {
67 { 73 {
68 !this.isTemplate && 74 !this.isTemplate &&
69 <a-col span={6} style="margin-bottom: 10px;"> 75 <a-col span={6} style="margin-bottom: 10px;">
70 - <AddNewCard handleCreate={this.createWork} /> 76 + <AddNewCard handleCreate={this.handleCreateWork} />
71 </a-col> 77 </a-col>
72 } 78 }
73 { 79 {
front-end/h5/vue.config.js
@@ -42,7 +42,7 @@ switch (process.env.PAGE) { @@ -42,7 +42,7 @@ switch (process.env.PAGE) {
42 title: 'Index Page', 42 title: 'Index Page',
43 // outputDir: 'dist', 43 // outputDir: 'dist',
44 outputDir: mainAppOutputDir, 44 outputDir: mainAppOutputDir,
45 - publicPath: './' 45 + publicPath: '/build-editor'
46 // publicPath: isProd ? '/main/' : '/' 46 // publicPath: isProd ? '/main/' : '/'
47 } 47 }
48 } 48 }