This paper addresses the challenges associated with the high costs and logistical difficulties in the distribution of fresh agricultural products from the perspective of community e-commerce. The paper takes the perspective of merchant scheduling and integrates a classical vehicle scheduling model. The study meticulously examines the various costs associated with the distribution process, encompassing fixed costs, transportation costs, refrigeration costs, storage costs and time subsidies. A vehicle routing optimisation model was developed with the dual objectives of cost control and product quality assurance. The use of a genetic algorithm for analysis and solution indicates that this approach can achieve superior cost efficiency and more optimal delivery routes. The results not only confirm the validity of the model and the effectiveness of the solution algorithm, but also provide theoretical underpinnings and viable optimisation strategies for analogous route optimisation challenges. This research has significant reference value and practical relevance for improving delivery efficiency and cost management in community e-commerce.