A rational design of g-C3N4-based ternary composite for highly efficient H2 generation and 2,4-DCP degradation.