We consider the one-dimensional nonlinear Schrödinger equations that describe the dynamics of a Bose–Einstein Condensates with time-dependent scattering length in a complex potential. Our results show that as long as the integrable relation is satisfied, exact solutions of the one-dimensional nonlinear Schrödinger equation can be found in a general closed form, and interactions between two solitons are modulated in a complex potential. We find that the changes of the scattering length and trapping potential can be effectively used to control the interaction between two bright soliton.