Enhanced the photoelectrochemical performance of Bi2XO6 (X = W, Mo) for detecting hexavalent chromium by modification of CuS.