import { getProducts, } from '~/api/global' let polling Component({ data: { products: [], }, lifetimes: { attached() { // this.selectComponent("#popUp").showModal() this.getProducts() }, }, methods: { async getProducts() { let { productList: products, } = await getProducts() this.setData({ products, }) }, openDonutBuy({ currentTarget }) { let product = currentTarget.dataset.product this.triggerEvent('toBuy',product) this.close() }, async open(product) { this.selectComponent("#popUp").showModal() }, closeEvent() {}, close() { this.selectComponent("#popUp").hideModal() } } })