salix/print/report/email-footer/index.js

31 lines
857 B
JavaScript
Raw Normal View History

2019-01-22 08:55:35 +00:00
module.exports = {
name: 'email-footer',
2019-01-23 08:33:58 +00:00
asyncData(ctx) {
2019-01-22 08:55:35 +00:00
return {
isPreview: ctx.method === 'GET',
};
},
created() {
const embeded = [];
2019-01-23 08:33:58 +00:00
this.files.map(file => {
2019-01-28 11:28:22 +00:00
const src = this.isPreview ? `/api/${file}` : `cid:${file}`;
2019-01-23 08:33:58 +00:00
embeded[file] = src;
2019-01-22 08:55:35 +00:00
});
this.embeded = embeded;
},
data() {
return {
2019-01-23 08:33:58 +00:00
files: [
/* '/assets/images/action.png',
'/assets/images/info.png', */
2019-01-22 08:55:35 +00:00
'/assets/images/facebook.png',
'/assets/images/twitter.png',
'/assets/images/youtube.png',
'/assets/images/pinterest.png',
'/assets/images/instagram.png',
'/assets/images/linkedin.png',
],
};
},
};