We performed 2.5D compressible resistive MHD simulations of magnetic reconnection with gravity considered. The background magnetic field is a canopy-type configuration which is rooted at the boundary of the solar supergranule. By changing the bottom boundary conditions in the simulations, an emerging flux rises up at the center of the supergranule and reconnects with the canopy magnetic field. We successfully simulate the coronal and chromospheric microflares, whose current sheets locate at the corona and chromosphere respectively. The coronal microflare is triggered by the reconnection at the corona, whose size and temperature enhancement is bigger and higher than the chromospheric one. We also found a hot jet (~1.8 × 106 K) relating to the observational EUV/SXR jet and a cold jet (~104 K) corresponding to the observational Hα /Ca surge or brightening in the coronal case. Whereas there is only Hα /Ca bright point in the chromospheric one.