Reasonable matching of capacity resources and transported cargoes is the key to realizing intelligent scheduling of less-than-truck-load (LTL) logistics. In practice, there are many types and numbers of participating objects involved in LTL logistics, such as customers, orders, trucks, unitized implements, etc. This results in a complex and large number of matching schemes where truck assignments interact with customer order service sequencing. For the truck–cargo online matching problem under real-time demand, it is necessary to comprehensively consider the online matching process of multi-node orders and the scheduling of multi-types of trucks. Combined with the actual operation scenario, a mixed-integer nonlinear programming model is introduced, and an online matching algorithm with a double-layer nested time window is designed to solve it. By solving the model in a small numerical case using Gurobi and the online matching algorithm, the validity of the model and the effectiveness of the algorithm are verified. The results indicate that the online matching algorithm can obtain optimization results with a lower gap while outperforming in terms of computation time. Relying on the realistic large-scale case for empirical analysis, the optimization results in a significant reduction in the number of trips for smaller types of trucks, and the average truck loading efficiency has reached close to 95%. The experimental results demonstrate the general applicability and effectiveness of the algorithm. Thus, it helps to realize the on-demand allocation of capacity resources and the timely response of transportation scheduling of LTL logistics hubs.