const util = require("../../../utils/util.js");
Component({
  properties: {
    show:{
      type: Boolean,
      observer: function (newVal) {
        this.setData({ show: newVal });
      }
    },
    presell:{
      type:Object,
      observer:function(val){
        let presellPayEndTime = util.formatDate(util.formatUnixtimestamp(val.presellPaymentDeadline), 'MM月dd日 hh:mm', false);
        this.setData({ presell: val,presellPayEndTime});
      }
    },
  },
  data: {
    show:false,
    time:'',
    presell:{},
    presellPayEndTime:''
  },
  methods: {
    close(){
      this.triggerEvent("close", false);
    },
    // 继续购买
    newGroup(e){
      this.triggerEvent('makeUpGroup',1)
    },
    // 支付尾款
    jumpBalancePayment(e){
      this.triggerEvent('jumpBalancePayment')
    }
  }
})
