Chinese e-commerce company JD.com has returned to a loss in its second-quarter, despite booking a double-digit hike in revenues.