As one of the most energetic and brightest events, gamma-ray bursts (GRBs) have been used as a standard candle for cosmological probes. Based on the relevant features of the GRB light curve, namely a plateau phase followed a decay phase, we obtain X-ray samples of 31 GRBs and optical samples of 50 GRBs, which are thought to be caused by the same physical mechanism. We standardize GRBs using the two-dimension fundamental plane relation of the rest-frame luminosity of the plateau emission ($L_ b,z $) and the end time of plateau ($T_ b,z $) $L_ b,z -T_ b,z $, as well as the three-dimensional fundamental plane correlation including the peak energy ($E_ p,i $) $L_ b,z -T_ b,z -E_ p,i $. For the cosmological probes, we consider the omega CDM model in which the dark energy consists of one component, and mainly focus on the $X_1X_2$CDM model in which the dark energy is made up of two independent components. We obtain constraints on the related parameters of the cosmological models using type Ia supernovae (SNe Ia) data and selected X-ray and optical samples. For the $X_1X_2$CDM model, we find that the values of the equation-of-state parameters of two dark energies, $ and $ are very close. We also carry out a comparison between the models using the Bayesian information criterion, and find that the omega CDM model is favored.