Computer foundation in universities are general courses for non-computer majors. Carrying out ideological and political construction in general courses is an important way for universities to fulfill the fundamental task of cultivating morality and cultivating talents. This paper explores and reflects on the theoretical research and teaching practice of curriculum ideological and political education from four aspects: enhancing teachers' educational and teaching concepts, emphasizing the development of curriculum ideological and political content, innovating curriculum ideological and political teaching methods, and improving the evaluation system of curriculum ideological and political teaching effectiveness. The aim is to provide reference for the promotion and popularization of curriculum ideological and political education in general courses.