Considering the uncertainties of the wind power and photovoltaic power generation in the operation of microgrids and the operational indicators such as economic costs and environmental costs, the non-cooperative dispatch model is first established based on chance constrained programming. On this basis, the cooperative scheduling model of multi-microgrids is proposed, which aims at minimizing the total cost of the micro-grid alliance. Afterwards, a genetic algorithm combined with Monte Carlo simulation was used to solve the model, and the Shapley value method is used to distribute the cooperative benefits. Finally, through examples, the dispatch results of micro-grid with non-cooperative scheduling and cooperative scheduling are analyzed under different confidence levels.The results show that the cost of each micro-grid is reduced with cooperative scheduling compared with non-cooperative scheduling, and the operating cost of the micro-grid will all continue to decrease under two kinds of scheduling methods, as the confidence level decreases, which proves the economical benefits of the cooperative model .