JD.com beats Q2 EPS estimates as operating profit swings to $670M