|
@@ -26,20 +26,23 @@ class PlatformActService extends CrudService {
|
|
|
|
|
|
getActText(data) {
|
|
|
const { type } = data;
|
|
|
+ let tag = '';
|
|
|
let text = '';
|
|
|
if (type === '2') {
|
|
|
- text = '赠品';
|
|
|
+ tag = '赠品';
|
|
|
} else if (type === '3') {
|
|
|
- text = '特价';
|
|
|
+ tag = '特价';
|
|
|
} else if (type === '4') {
|
|
|
- text = '加价购';
|
|
|
+ tag = '加价购';
|
|
|
} else if (type === '5') {
|
|
|
+ tag = '满减';
|
|
|
const discount = _.get(data, 'config.discount', []);
|
|
|
for (const i of discount) {
|
|
|
const { limit, number } = i;
|
|
|
text = `${text}满${limit}减${number};`;
|
|
|
}
|
|
|
} else if (type === '6') {
|
|
|
+ tag = '满折';
|
|
|
const discount = _.get(data, 'config.discount', []);
|
|
|
for (const i of discount) {
|
|
|
const { limit, number, max } = i;
|
|
@@ -48,9 +51,9 @@ class PlatformActService extends CrudService {
|
|
|
text = `${text};`;
|
|
|
}
|
|
|
} else if (type === '7') {
|
|
|
- text = '套装';
|
|
|
+ tag = '套装';
|
|
|
}
|
|
|
- return text;
|
|
|
+ return { tag, text };
|
|
|
}
|
|
|
|
|
|
}
|