The development of technology promotes the wide use of online classroom which enables people to have more flexible and diverse way to acquire knowledge. As a result, the educational resources are shared and educational equity is promoted. However, many studies reveal that there are some disadvantages of online classroom, such as high dropout rate, difficulty in learning process evaluation and low satisfaction with courses. Consequently, the performance of online learning is not satisfactory. Therefore, it is urgent to explore the factors affecting the performance of online learning. This study uses Bandura’s reciprocal determinism theory. With a questionnaire survey, this study collected data from 500 university students of five public universities in Henan province of China, to explore the following research objectives: whether there is a positive correlation between teacherstudent interaction and online academic performance; whether there is a positive correlation between teacherstudent interaction and academic optimism; whether there is a positive correlation between academic optimism and online academic performance; whether academic optimism plays a mediating role between online teacherstudent interaction and online academic performance. The results show that:(1) The average scores of academic optimisms are of medium level;(2) There are significant positive correlations between each pair of online teacher-student interaction, academic optimism and academic performance;(3) academic optimism plays a mediating role between online teacher-student interaction and academic performance, which can explain 10% of the relationship between online teacher-student interaction and academic performance. Research shows that academic optimism has an important impact on university students, and positive psychology knowledge should be imparted to university students to help them establish correct learning values.