app-template.html
20 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
<!-- APP模板渲染 -->
<script type="text/template" id="app-template">
<div class="app-template">
<img src="/static/assets/images/decorator/nar.png" alt="#">
[[each data as item index]]
<!-- 店招模块 -->
[[if item.moduleType == 'ShopBanner']]
[[if templateType == '2']]
<!-- 展示装修数据 -->
[[if item.moduleData]]
<div class="app-top-banner">
<div class="app-shop-banner modular-editor" data-type="ShopBanner" data-title="编辑店招模块" data-index="[[index]]" non-delete="true">
<img src="[[item.moduleData.data[0].pic]]" alt="#" class="img-item">
</div>
<img src="/static/assets/images/decorator/tab.png" alt="#" class="app-shop-intro">
</div>
[[else]]
<!--展示默认的-->
<div class="app-top-banner">
<div class="app-shop-banner modular-editor" data-type="ShopBanner" data-title="编辑店招模块" data-index="[[index]]" non-delete="true">
<img src="/static/assets/images/decorator/yoho-logo.png" alt="#" class="logo">
</div>
<img src="/static/assets/images/decorator/tab.png" alt="#" class="app-shop-intro">
</div>
[[/if]]
[[else]]
<!-- 展示装修数据 -->
[[if item.moduleData]]
<div class="app-top-banner">
<div class="app-shop-banner modular-editor" data-type="ShopBanner" data-title="编辑店招模块" data-index="[[index]]" non-delete="true" non-added="true">
<img src="[[item.moduleData.data[0].pic]]" alt="#" class="img-item">
</div>
<img src="/static/assets/images/decorator/tab.png" alt="#" class="app-shop-intro">
</div>
[[else]]
<!--展示默认的-->
<div class="app-top-banner">
<div class="app-shop-banner modular-editor" data-type="ShopBanner" data-title="编辑店招模块" data-index="[[index]]" non-delete="true" non-added="true">
<img src="/static/assets/images/decorator/yoho-logo.png" alt="#" class="logo">
</div>
<img src="/static/assets/images/decorator/tab.png" alt="#" class="app-shop-intro">
</div>
[[/if]]
[[/if]]
[[/if]]
<!-- 商品列表 -->
[[if item.moduleType == 'ProductList']]
<div class="app-product-list modular-editor" data-type="ProductList" data-title="编辑商品列表模块" data-index="[[index]]">
<img src="/static/assets/images/decorator/app-product-list.png" alt="#">
</div>
[[/if]]
[[if item.moduleType == 'ProductListImg']]
<div class="app-product-list" non-delete="true" non-added="true" data-type="ProductListImg" data-title="编辑商品列表模块" data-index="[[index]]">
<img src="/static/assets/images/decorator/app-product-list.png" alt="#">
</div>
[[/if]]
[[/each]]
<div id="app-dragable"> <!-- 可拖拽的模块区域 -->
[[each data as item index]]
<!-- 轮播图 -->
[[if item.moduleType == 'CarouselImage']]
[[if item.moduleData]]
<div class="app-carousel-image modular-editor carouse-animation" data-type="CarouselImage" data-title="编辑轮播图模块" data-index="[[index]]"
style="[[item.moduleData.properties.isModuleMargin == 0 ? 'margin-bottom: 0;' : '']]">
[[each item.moduleData.data as data _index]]
<img src="[[data.pic]]" alt="#" class="img-item" style="[[_index == 0 ? 'display: inline;' : '']]">
[[/each]]
</div>
[[else]]
<div class="app-carousel-image modular-editor" data-type="CarouselImage" data-title="编辑轮播图模块" data-index="[[index]]">
<img src="/static/assets/images/decorator/yoho-logo.png" alt="#" class="logo">
</div>
[[/if]]
[[/if]]
[[if item.moduleType == 'DivideCarouselImage']]
[[if item.moduleData]]
<div class="app-carousel-image modular-editor carouse-animation" data-type="DivideCarouselImage" data-title="编辑均分轮播图模块" data-index="[[index]]"
style="[[item.moduleData.properties.isModuleMargin == 0 ? 'margin-bottom: 0;' : '']]">
[[each item.moduleData.data as data _index]]
<img src="[[data.pic]]" alt="#" class="img-item" style="[[_index == 0 ? 'display: inline;' : '']]">
[[/each]]
</div>
[[else]]
<div class="app-carousel-image modular-editor" data-type="DivideCarouselImage" data-title="编辑均分轮播图模块" data-index="[[index]]">
<img src="/static/assets/images/decorator/yoho-logo.png" alt="#" class="logo">
</div>
[[/if]]
[[/if]]
<!-- 一张图 -->
[[if item.moduleType == 'SingleImage']]
<!-- 展示装修数据 -->
[[if item.moduleData]]
<div class="app-single-image modular-editor" data-type="SingleImage" data-title="编辑一张图模块" data-index="[[index]]"
style="height: [[item.moduleData.properties.moduleHeight]]px; [[item.moduleData.properties.isModuleMargin == 0 ? 'margin-bottom: 0;' : '']]">
<img src="[[item.moduleData.data[0].pic]]" alt="#" class="img-item">
</div>
[[else]]
<div class="app-single-image modular-editor" data-type="SingleImage" data-title="编辑一张图模块" data-index="[[index]]">
<img src="/static/assets/images/decorator/yoho-logo.png" alt="#" class="logo">
</div>
[[/if]]
[[/if]]
<!-- 两张图 -->
[[if item.moduleType == 'DoubleImage']]
[[if item.moduleData]]
[[if item.moduleData.properties]]
<div class="app-double-image modular-editor" data-type="DoubleImage" data-title="编辑两张图模块" data-index="[[index]]"
style="[[item.moduleData.properties.isModuleMargin == 0 ? 'margin-bottom: 0;' : '']]">
<img src="[[item.moduleData.data[0].pic]]" alt="#" class="img-item">
<img src="[[item.moduleData.data[1].pic]]" alt="#" class="img-item">
</div>
[[else]]
<div class="app-double-image modular-editor" data-type="DoubleImage" data-title="编辑两张图模块" data-index="[[index]]">
<div class="border">
<img src="/static/assets/images/decorator/yoho-logo.png" alt="#" class="logo">
</div>
<img src="/static/assets/images/decorator/yoho-logo.png" alt="#" class="logo">
</div>
[[/if]]
[[else]]
<div class="app-double-image modular-editor" data-type="DoubleImage" data-title="编辑两张图模块" data-index="[[index]]">
<div class="border">
<img src="/static/assets/images/decorator/yoho-logo.png" alt="#" class="logo">
</div>
<img src="/static/assets/images/decorator/yoho-logo.png" alt="#" class="logo">
</div>
[[/if]]
[[/if]]
<!-- 三张图 -->
[[if item.moduleType == 'TripleImage']]
[[if item.moduleData]]
[[if item.moduleData.properties.displayType == 1]]
<!-- 250*330 并排展示 -->
<div class="app-triple-image modular-editor" data-type="TripleImage" data-title="编辑三张图模块" data-index="[[index]]"
style="[[item.moduleData.properties.isModuleMargin == 0 ? 'margin-bottom: 0;' : '']]">
<img src="[[item.moduleData.data[0].pic]]" alt="#" class="img-item1">
<img src="[[item.moduleData.data[1].pic]]" alt="#" class="img-item1">
<img src="[[item.moduleData.data[2].pic]]" alt="#" class="img-item1">
</div>
[[else if item.moduleData.properties.displayType == 2]]
<!-- 250*250 并排展示 -->
<div class="app-triple-image2 modular-editor" data-type="TripleImage" data-title="编辑三张图模块" data-index="[[index]]"
style="[[item.moduleData.properties.isModuleMargin == 0 ? 'margin-bottom: 0;' : '']]">
<img src="[[item.moduleData.data[0].pic]]" alt="#" class="img-item2">
<img src="[[item.moduleData.data[1].pic]]" alt="#" class="img-item2">
<img src="[[item.moduleData.data[2].pic]]" alt="#" class="img-item2">
</div>
[[else if item.moduleData.properties.displayType == 3]]
<!-- 左2右1 -->
<div class="app-triple-image3 modular-editor" data-type="TripleImage" data-title="编辑三张图模块" data-index="[[index]]"
style="[[item.moduleData.properties.isModuleMargin == 0 ? 'margin-bottom: 0;' : '']]">
<div class="img-item">
<img src="[[item.moduleData.data[0].pic]]" alt="#" class="img-item31">
<img src="[[item.moduleData.data[1].pic]]" alt="#" class="img-item31">
</div>
<div class="img-item">
<img src="[[item.moduleData.data[2].pic]]" alt="#" class="img-item32">
</div>
</div>
[[else if item.moduleData.properties.displayType == 4]]
<!-- 左1右2 -->
<div class="app-triple-image3 modular-editor" data-type="TripleImage" data-title="编辑三张图模块" data-index="[[index]]"
style="[[item.moduleData.properties.isModuleMargin == 0 ? 'margin-bottom: 0;' : '']]">
<div class="img-item">
<img src="[[item.moduleData.data[0].pic]]" alt="#" class="img-item41">
</div>
<div class="img-item">
<img src="[[item.moduleData.data[1].pic]]" alt="#" class="img-item42">
<img src="[[item.moduleData.data[2].pic]]" alt="#" class="img-item42">
</div>
</div>
[[else]]
<div class="app-triple-image modular-editor" data-type="TripleImage" data-title="编辑三张图模块" data-index="[[index]]">
<div class="border">
<img src="/static/assets/images/decorator/yoho-logo.png" alt="#" class="logo">
</div>
<div class="border">
<img src="/static/assets/images/decorator/yoho-logo.png" alt="#" class="logo">
</div>
<div class="border" style="border-width: 0;">
<img src="/static/assets/images/decorator/yoho-logo.png" alt="#" class="logo">
</div>
</div>
[[/if]]
[[else]]
<div class="app-triple-image modular-editor" data-type="TripleImage" data-title="编辑三张图模块" data-index="[[index]]">
<div class="border">
<img src="/static/assets/images/decorator/yoho-logo.png" alt="#" class="logo">
</div>
<div class="border">
<img src="/static/assets/images/decorator/yoho-logo.png" alt="#" class="logo">
</div>
<div class="border" style="border-width: 0;">
<img src="/static/assets/images/decorator/yoho-logo.png" alt="#" class="logo">
</div>
</div>
[[/if]]
[[/if]]
<!-- 四张图 -->
[[if item.moduleType == 'FourImage']]
[[if item.moduleData]]
<div class="app-four-image modular-editor" data-type="FourImage" data-title="编辑四张图模块" data-index="[[index]]"
style="[[item.moduleData.properties.isModuleMargin == 0 ? 'margin-bottom: 0;' : '']]">
<div class="img-item">
<img class="img" src="[[item.moduleData.data[0].pic]]" alt="#">
<input class="text" type="text" name="title1" id="title1" value="[[item.moduleData.data[0].text]]">
</div>
<div class="img-item">
<img class="img" src="[[item.moduleData.data[1].pic]]" alt="#">
<input class="text" type="text" name="title2" id="title2" value="[[item.moduleData.data[1].text]]">
</div>
<div class="img-item">
<img class="img" src="[[item.moduleData.data[2].pic]]" alt="#">
<input class="text" type="text" name="title3" id="title3" value="[[item.moduleData.data[2].text]]">
</div>
<div class="img-item">
<img class="img" src="[[item.moduleData.data[3].pic]]" alt="#">
<input class="text" type="text" name="title4" id="title4" value="[[item.moduleData.data[3].text]]">
</div>
</div>
[[else]]
<div class="app-four-image modular-editor" data-type="DoubleImage" data-title="编辑四张图模块" data-index="[[index]]">
<div class="border">
<img src="/static/assets/images/decorator/yoho-logo.png" alt="#" class="logo">
</div>
<div class="border">
<img src="/static/assets/images/decorator/yoho-logo.png" alt="#" class="logo">
</div>
<div class="border">
<img src="/static/assets/images/decorator/yoho-logo.png" alt="#" class="logo">
</div>
<img src="/static/assets/images/decorator/yoho-logo.png" alt="#" class="logo">
</div>
[[/if]]
[[/if]]
<!-- 标题 -->
[[if item.moduleType == 'Title']]
[[if item.moduleData]]
<div class="app-title modular-editor" data-type="Title" data-title="编辑标题模块" data-index="[[index]]"
style="[[item.moduleData.properties.isModuleMargin == 0 ? 'margin-bottom: 0;' : '']]">
<div class="title">
[[item.moduleData.data[0].text]]
[[if item.moduleData.data[0].resource]]
<a href="#"><b>...</b></a>
[[/if]]
</div>
</div>
[[else]]
<div class="app-title modular-editor" data-type="Title" data-title="编辑标题模块" data-index="[[index]]">
<div class="title">标题名称<a href="#"><b>...</b></a></div>
</div>
[[/if]]
[[/if]]
<!-- 视频 -->
[[if item.moduleType == 'Video']]
[[if item.moduleData]]
<div class="app-video modular-editor" data-type="Video" data-title="编辑直播模块" data-index="[[index]]"
style="[[item.moduleData.properties.isModuleMargin == 0 ? 'margin-bottom: 0;' : '']]">
<img src="[[item.moduleData.data[0].pic]]" alt="#" class="img-item">
</div>
[[else]]
<div class="app-video modular-editor" data-type="Video" data-title="编辑直播模块" data-index="[[index]]">
<img src="/static/assets/images/decorator/yoho-logo.png" alt="#" class="logo">
</div>
[[/if]]
[[/if]]
[[if item.moduleType == 'AppRecommendProduct']]
[[if item.productInfo]]
[[if item.moduleData.properties.displayType==1]]
<div class="modular-editor app-recommend-product clearfix" data-type="AppRecommendProduct" data-title="编辑推荐商品模块" data-index="[[index]]" style="[[item.moduleData.properties.isModuleMargin == 0 ? 'margin-bottom: 0;' : '']]">
[[each item.productInfo as data _index]]
<div style="float: left">
<img src="[[data.productPic]]" alt="#" class="img-item" style="[[_index == 0 ? 'display: inline;' : '']]">
<p class="hidden-text p-text">[[data.productName]]</p>
<p class="hidden-text p-text">[[data.productBrandName]]</p>
<p class="hidden-text p-text">[[if data.productSalePrice]] <label style="color:red">¥[[data.productSalePrice]]</label> [[/if]] [[if data.productMarketPrice]] <label style="color: lightgrey;font-size: small">¥[[data.productMarketPrice]]</label>[[/if]]</p>
</div>
[[/each]]
</div>
[[else]]
<div class="modular-editor app-recommend-product clearfix" data-type="AppRecommendProduct" data-title="编辑推荐商品模块" data-index="[[index]]" style="[[item.moduleData.properties.isModuleMargin == 0 ? 'margin-bottom: 0;' : '']]">
[[each item.productInfo as data _index]]
<div style="float: left">
<img src="[[data.productPic]]" alt="#" class="img-item" style="[[_index == 0 ? 'display: inline;' : '']]">
<p class="hidden-text p-text">[[data.productName]]</p>
<p class="hidden-text p-text">[[data.productBrandName]]</p>
<p class="hidden-text p-text">[[if data.productSalePrice]] <label style="color:red">¥[[data.productSalePrice]]</label> [[/if]] [[if data.productMarketPrice]] <label style="color: lightgrey;font-size: small">¥[[data.productMarketPrice]]</label>[[/if]]</p>
</div>
[[/each]]
</div>
[[/if]]
[[else]]
<div style="height:187px;text-align:center" class="modular-editor app-recommend-product" data-type="AppRecommendProduct" data-title="编辑推荐商品模块" data-index="[[index]]">
<img src="/static/assets/images/decorator/yoho-logo.png" alt="#" class="logo">
</div>
[[/if]]
[[/if]]
[[/each]]
</div>
<!-- 增加模块区域 -->
[[if templateType == '2']]
<div class="btn add-modular-area" title="添加模块" style="[[data.length > 1 ? 'margin-top: -5px;': '']]">
<span class="glyphicon glyphicon-plus" style="top: -4px;"></span>
</div>
[[/if]]
</div>
</script>
<!-- 三张图模块展示样式 -->
<script type="text/template" id="triple-image-radio-group">
<div class="form-group">
<div class="col-sm-1 title">展示类型: </div>
<div class="col-sm-1">
<input type="radio" name="displayType" value="1" class="display-type-radio" id="displayTypeRadio1" data-index="[[index]]">
<label for="displayTypeRadio1" class="title">250*330</label>
</div>
<div class="col-sm-1">
<input type="radio" name="displayType" value="2" class="display-type-radio" id="displayTypeRadio2" data-index="[[index]]">
<label for="displayTypeRadio2" class="title">250*250</label>
</div>
<div class="col-sm-1 ">
<input type="radio" name="displayType" value="3" class="display-type-radio" id="displayTypeRadio3" data-index="[[index]]">
<label for="displayTypeRadio3" class="title">左2右1</label>
</div>
<div class="col-sm-1">
<input type="radio" name="displayType" value="4" class="display-type-radio" id="displayTypeRadio4" data-index="[[index]]">
<label for="displayTypeRadio4" class="title">左1右2</label>
</div>
<!-- 此处的id要与radio的name一致,用于初始化数据绑定 -->
<input type="hidden" value="[[displayType||1]]" id="displayType" for="radio" required/>
</div>
</script>
<!-- 模态框(Modal) -->
<script type="text/template" id="timePushDialog">
<input type="text" class="form-control observe" data-field="publishTime" id="publishTime"
placeholder="模板发布时间" >
<div style="margin-top: 15px;color: grey;"><span style="color: red">*</span> 同一店铺的模板,不能设置相同的定时发布时间</div>
</script>