Despite widening its net losses, Chinese e-commerce giant JD.com has offered an optimistic outlook thanks to higher sales in the second quarter.