In order to guarantee safety of campus service during epidemic of COVID-19, it is valuable to design a campus takeout system of intelligent self-pickup cabinets (ISPCs). This research aims to design such a system by optimizing the sites of cabinets, their capacity types, and the location-allocation scheme. In view of maximizing profits of the system, we formulate this design problem as a mixed integer nonlinear programming model, where the demand of takeout is distance-dependent and congestion-dependent, rather than a fixed constant. On the basis of model property analysis, the original model is transformed into an integer linear programming problem such that it is solved by off-the-shelf solvers. By case study and sensitivity analyses, it is found that: (1) The proposed method is valuable for providing an optimal strategy for a takeout system of ISPCs by choosing optimal sites of the cabinets and optimal capacity type and optimal location-allocation scheme; (2) The developed a system is more applicable in areas of intensively-distributed users or the areas closer to canteens so as to create significant effects of scale economy by optimizing the capacity types of ISPCs and the sites to install them in line with greater demands. (3) For the groups of consumers with different distance-dependent or congestion-dependent sensitivities, it is suggested to implement distinct optimal strategies of building the takeout system even for those in the same service area. (4) The takeout demand grows up with an increasing unit selling price in the developed system, rather than reduction as in an ordinary relation between the demand of products and the price. Thus, the designed self-pickup takeout system seems more applicable to be adopted for the high-quality takeout.