// packageE/solitaire/components/yz_goodsPopup/yz_goodsPopup.js Component({ /** * 组件的属性列表 */ properties: { show: { value: false, type: Boolean, }, goodsInfo: { value: {}, type: Object, }, }, /** * 组件的初始数据 */ data: { language: {}, getMarketPrice: "", timeData: {}, goodsInfo: { thumb_url: [ "https://img.yzcdn.cn/upload_files/2020/03/31/Fh0JRCgClmgcMRaD9elw3ZgJDN-2.jpg", "https://img.yzcdn.cn/upload_files/2020/03/31/FhaAiL_aSqAQBkZfQa1ogFI7z3NF.jpg", ], }, }, lifetimes: { ready() { try { wx.getStorage({ key: "langIndex", success: (res) => { console.log(res.data, 888); this.setData({ language: res.data.en }); }, }); wx.getStorage({ key: "yz_basic_info", success: (res) => { this.setData({ getMarketPrice: res.data.lang.goods.market_price, getprice: res.data.lang.goods.price, }); }, }); } catch (e) { console.log(e); } }, }, /** * 组件的方法列表 */ methods: { popupSpecsbtn(evt) { console.log(evt); this.setData({ show: false }); }, onChangeTime(e) { this.setData({ timeData: e.detail, }); }, addCart() { this.triggerEvent("addCart", this.data.goodsInfo); }, }, });