cart.js 750 Bytes
// pack-cookbook/components/cart/cart.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    rid:{
      type:String,
      value:"",
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    hidden: true,
    carts: ['啦啦啦', '啦啦啦啦啦', '啦啦', '啦', '啦啦啦啦啦', '啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦', '啦啦啦啦', '啦啦', '啦', '啦啦啦', '啦啦啦'],
  },

  /**
   * 组件的方法列表
   */
  methods: {
    hide(){
      this.setData({
        hidden:true,
      })
    },
    show(){
      this.setData({
        hidden:false,
      })
    },
    init(){
      App.Advance.CreateOrder({
        rid:this.data.rid
      }).then(res=>{

      })
    },
  }
})