Page({
  data:{
    date:"",
    region:"",
  },
  submit:function(e){
    wx.cloud.database()
    .collection("homeworks")
    .add({
      data: e.detail.value,

      success: (res) =>{
        console.log(res)
      }
    })
  },

  dateChange:function(e){
    this.setData({
      date:e.detail.value,
    });
  },
  regionChange:function(e){
    this.setData({
      region:e.detail.value,
    });
  },

  
});