|
@@ -272,6 +272,7 @@ class featureModel extends global.yoho.BaseModel { |
|
@@ -272,6 +272,7 @@ class featureModel extends global.yoho.BaseModel { |
272
|
sknsArr = [],
|
272
|
sknsArr = [],
|
273
|
likeArr = [];
|
273
|
likeArr = [];
|
274
|
let shopGroups = [];
|
274
|
let shopGroups = [];
|
|
|
275
|
+ let showTimes = [];
|
275
|
|
276
|
|
276
|
if (params.type === 'preview') { // 开发/预览模式
|
277
|
if (params.type === 'preview') { // 开发/预览模式
|
277
|
data = yield api.get('', {
|
278
|
data = yield api.get('', {
|
|
@@ -291,6 +292,32 @@ class featureModel extends global.yoho.BaseModel { |
|
@@ -291,6 +292,32 @@ class featureModel extends global.yoho.BaseModel { |
291
|
}
|
292
|
}
|
292
|
data = data.data;
|
293
|
data = data.data;
|
293
|
|
294
|
|
|
|
295
|
+ if (data && data.atlBo) {
|
|
|
296
|
+ let curTime = Math.round(new Date() / 1000);
|
|
|
297
|
+
|
|
|
298
|
+ data.atlBo.forEach(t => {
|
|
|
299
|
+ if (t.showTime < curTime) {
|
|
|
300
|
+ showTimes.push(t);
|
|
|
301
|
+ }
|
|
|
302
|
+ });
|
|
|
303
|
+
|
|
|
304
|
+ showTimes = _.sortBy(showTimes, t => {
|
|
|
305
|
+ return -t.showTime;
|
|
|
306
|
+ });
|
|
|
307
|
+
|
|
|
308
|
+ if (showTimes && showTimes[0] && showTimes[0].templateId !== data.templateId) {
|
|
|
309
|
+ let newData = yield api.get('', {
|
|
|
310
|
+ method: 'app.activity.queryOneTemplate',
|
|
|
311
|
+ activity_id: showTimes[0].activityId,
|
|
|
312
|
+ template_id: showTimes[0].templateId
|
|
|
313
|
+ });
|
|
|
314
|
+
|
|
|
315
|
+ if (newData) {
|
|
|
316
|
+ data = newData.data;
|
|
|
317
|
+ }
|
|
|
318
|
+ }
|
|
|
319
|
+ }
|
|
|
320
|
+
|
294
|
if (data && data.floors) {
|
321
|
if (data && data.floors) {
|
295
|
data.floors.forEach(f => {
|
322
|
data.floors.forEach(f => {
|
296
|
let componentArr = [];
|
323
|
let componentArr = [];
|
|
@@ -360,6 +387,19 @@ class featureModel extends global.yoho.BaseModel { |
|
@@ -360,6 +387,19 @@ class featureModel extends global.yoho.BaseModel { |
360
|
}
|
387
|
}
|
361
|
}
|
388
|
}
|
362
|
|
389
|
|
|
|
390
|
+ if (componentType === 'textEdit') {
|
|
|
391
|
+ f.component[0].bold = _.get(f, 'component[0].bold') === '1' ? 'bold' : 'none';
|
|
|
392
|
+ f.component[0].contentSpace = _.get(f, 'component[0].contentSpace') ? `${_.get(f, 'component[0].contentSpace') / 20}rem` : ''; // eslint-disable-line
|
|
|
393
|
+ f.component[0].lineHeight = _.get(f, 'component[0].lineHeight') ? `${_.get(f, 'component[0].lineHeight') / 20}rem` : ''; // eslint-disable-line
|
|
|
394
|
+ f.component[0].fontSize = _.get(f, 'component[0].fontSize') ? `${_.get(f, 'component[0].fontSize') / 20}rem` : ''; // eslint-disable-line
|
|
|
395
|
+ f.component[0].contentEdit = _.get(f, 'component[0].contentEdit').split('\n');
|
|
|
396
|
+
|
|
|
397
|
+ if (f.param.bgimg) {
|
|
|
398
|
+ f.param._bgimgFill = f.param.bgimg;
|
|
|
399
|
+ f.param.bgimg = '';
|
|
|
400
|
+ }
|
|
|
401
|
+ }
|
|
|
402
|
+
|
363
|
let set = new Set();
|
403
|
let set = new Set();
|
364
|
|
404
|
|
365
|
_.forEach(f.component, component => {
|
405
|
_.forEach(f.component, component => {
|