Networks are widely used in understanding the spread of infectious disease. Universities and colleges are characterized by frequent social gatherings and extensive interpersonal communication, making them ideal applications of complex networks. In this paper, a compound model consisting of a homogeneous (small world) network and a heterogeneous (scale free) network is established, the spreading characteristics of epidemics are analyzed by using the mean‐field (MF) and the heterogeneous mean‐field (HMF) approaches, and the effects of various factors such as the total node number (N), the randomly reconnection probability (p), the initial proportion of infected node (p0), the average degree (k), and the shared nodes (s) are simulated by numerical calculations. The simulation results are in consistent with theoretical predictions, indicating that the randomness effect decreases with increasing k and N and is small when k (k = 8) and N (N = 200) are relatively large; the randomness effect is more significant in the scale free (SF) network than in the small world (SW) network, and the disease spread faster in the SF network; shared nodes can weakly increase the disease spread, but when the shared nodes are involved in an infected and an uninfected network, it can induce the disease outbreak in the uninfected network.