On the regularity criterion of weak solutions for the 3D MHD equations