
import { tagAjax } from '/@/api/resource/plat';

export default function getKeywords(i, id) {
    if (i && id) {
        i = i.indexOf('[') > -1 ? JSON.parse(i) : [i];
        if (i.length) {
            tagAjax().then(r => {
                var name = r.filter(j => i.includes(j.code)).map(j => j.name).toString();
                document.getElementById(`${id}`).innerHTML = name;
            })
        }
    }
}