...
|
...
|
@@ -272,6 +272,7 @@ class featureModel extends global.yoho.BaseModel { |
|
|
sknsArr = [],
|
|
|
likeArr = [];
|
|
|
let shopGroups = [];
|
|
|
let showTimes = [];
|
|
|
|
|
|
if (params.type === 'preview') { // 开发/预览模式
|
|
|
data = yield api.get('', {
|
...
|
...
|
@@ -291,6 +292,32 @@ class featureModel extends global.yoho.BaseModel { |
|
|
}
|
|
|
data = data.data;
|
|
|
|
|
|
if (data && data.atlBo) {
|
|
|
let curTime = Math.round(new Date() / 1000);
|
|
|
|
|
|
data.atlBo.forEach(t => {
|
|
|
if (t.showTime < curTime) {
|
|
|
showTimes.push(t);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
showTimes = _.sortBy(showTimes, t => {
|
|
|
return -t.showTime;
|
|
|
});
|
|
|
|
|
|
if (showTimes && showTimes[0] && showTimes[0].templateId !== data.templateId) {
|
|
|
let newData = yield api.get('', {
|
|
|
method: 'app.activity.queryOneTemplate',
|
|
|
activity_id: showTimes[0].activityId,
|
|
|
template_id: showTimes[0].templateId
|
|
|
});
|
|
|
|
|
|
if (newData) {
|
|
|
data = newData.data;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (data && data.floors) {
|
|
|
data.floors.forEach(f => {
|
|
|
let componentArr = [];
|
...
|
...
|
@@ -360,6 +387,19 @@ class featureModel extends global.yoho.BaseModel { |
|
|
}
|
|
|
}
|
|
|
|
|
|
if (componentType === 'textEdit') {
|
|
|
f.component[0].bold = _.get(f, 'component[0].bold') === '1' ? 'bold' : 'none';
|
|
|
f.component[0].contentSpace = _.get(f, 'component[0].contentSpace') ? `${_.get(f, 'component[0].contentSpace') / 20}rem` : ''; // eslint-disable-line
|
|
|
f.component[0].lineHeight = _.get(f, 'component[0].lineHeight') ? `${_.get(f, 'component[0].lineHeight') / 20}rem` : ''; // eslint-disable-line
|
|
|
f.component[0].fontSize = _.get(f, 'component[0].fontSize') ? `${_.get(f, 'component[0].fontSize') / 20}rem` : ''; // eslint-disable-line
|
|
|
f.component[0].contentEdit = _.get(f, 'component[0].contentEdit').split('\n');
|
|
|
|
|
|
if (f.param.bgimg) {
|
|
|
f.param._bgimgFill = f.param.bgimg;
|
|
|
f.param.bgimg = '';
|
|
|
}
|
|
|
}
|
|
|
|
|
|
let set = new Set();
|
|
|
|
|
|
_.forEach(f.component, component => {
|
...
|
...
|
|