// packageE/solitaire/components/yz_goodsPopup/yz_goodsPopup.js
// var app = getApp();
Component({
  /**
	 * 组件的属性列表
	 */
  properties: {
    show:{
      value:false,
      type:Boolean
    },
    addCartBtn:{
      value:true,
      type:Boolean
    },
    goodsInfo:{
      value:{},
      type:Object
    }
  },
  // observers:{
  //   'goodsInfo': function(str) {
  //     // console.log("11111111111111",str);
  //   }
  // },

  /**
	 * 组件的初始数据
	 */
  data: {
    language:{},
    getMarketPrice:'',
    timeData:{},
    goodsInfo: {}
  },
  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);
    }
  }
});















