PROILGRUBS 5 LBS All Natural Dried Black Soldier Fly Larvae Treats- Non-GMO-Dried Grubs for Chickens - Dried Meal Worms for Chickens, Hens, Birds 5 Pound (Pack of 1)

$34.88
>=1 Pieces
class SpzCustomDiscountFlashsale extends SPZ.BaseElement { constructor(element) { super(element); this.xhr_ = SPZServices.xhrFor(this.win); this.getFlashSaleApi = "\/api\/storefront\/promotion\/flashsale\/display_setting\/product_setting"; this.timer = null; this.variantId = "d5e3491e-d3ad-4d39-b27c-788768e7b4c4"; // 促销活动数据 this.flashsaleData = {} } isLayoutSupported(layout) { return layout == SPZCore.Layout.CONTAINER; } buildCallback() { this.templates_ = SPZServices.templatesForDoc(); this.viewport_ = this.getViewport(); // 挂载bind函数 解决this指向问题 this.render = this.render.bind(this); this.resize = this.resize.bind(this); this.switchVariant = this.switchVariant.bind(this); } mountCallback() { // 获取数据 this.getData(); this.element.onclick = (e) => { const cur = this.win.document.querySelector(".app_discount_flashsale_desc"); const setting = this.flashsaleData.product_setting; const landingUrl = `/promotions/discount-default/${this.flashsaleData.discount_info.id}`; const finalUrl = appDiscountUtils.resolveDiscountHref(setting, landingUrl); if (finalUrl && appDiscountUtils.inProductBody(this.element) && e.target !== cur) { this.win.open(finalUrl, '_blank', 'noopener'); } } // 绑定 this.viewport_.onResize(this.resize); // 监听子款式切换,重新渲染 this.win.document.addEventListener('dj.variantChange', this.switchVariant); } unmountCallback() { // 解绑 this.viewport_.removeResize(this.resize); this.win.document.removeEventListener('dj.variantChange', this.switchVariant); // 清除定时器 if (this.timer) { clearTimeout(this.timer); this.timer = null; } } resize() { if (this.timer) { clearTimeout(this.timer) this.timer = null; } this.timer = setTimeout(() => { this.render(); }, 200) } switchVariant(event) { const variant = event.detail.selected; if (variant.product_id == '209c52f8-2b40-4f31-875b-e65b8494632c' && variant.id != this.variantId) { this.variantId = variant.id; this.getData(); } } getData() { const reqBody = { product_id: "209c52f8-2b40-4f31-875b-e65b8494632c", product_type: "", variant_id: this.variantId } this.flashsaleData = {}; this.win.fetch(this.getFlashSaleApi, { method: "POST", body: JSON.stringify(reqBody), headers: { "Content-Type": "application/json" } }).then(async (response) => { if (response.ok) { this.flashsaleData = await response.json(); this.render(); } else { this.clearDom(); } }).catch(err => { this.clearDom(); }); } clearDom() { const children = this.element.querySelector('*:not(template)'); children && SPZCore.Dom.removeElement(children); } render() { this.templates_ .findAndRenderTemplate(this.element, { isMobile: appDiscountUtils.judgeMobile(), isRTL: appDiscountUtils.judgeRTL(), inProductDetail: appDiscountUtils.inProductBody(this.element), flashsaleData: this.flashsaleData, image_domain: this.win.SHOPLAZZA.image_domain, }) .then((el) => { this.clearDom(); this.element.appendChild(el); }) } } SPZ.defineElement('spz-custom-discount-flashsale', SpzCustomDiscountFlashsale);
Size:  5 Pound (Pack of 1)
Quantity

Description

RECYCLABLE: Our solid pacakge helps the BSF be dried and avoid to be broken during the delivery time.It can keep them be freshness and healthy. With the shelf life of 24 months,Please store them in a cool dry place. FRESHNESS:Chickens love fresh food because of the fresh smell without any additives & preservatives. NATURE: Proilgrubs Black soldier fly larvae are dried worms which include natural component of the diets in foraging birds like chickens,ducks and laying hens and they are highly attractive to wild birds. NUTRITIOUS: BSF can help chickens to improve their Immune System because it provide affordable treats for chickens & birds to help them to boots their Immune System and promote higher egg productivity,stronger egg shell and nicer feather. GREAT VALUE: A great source of protein,Crude Fat, Fiber and lysine.They are the superior nutrients for chickens.