Drug-drug interaction (DDI) is important in drug research and are one of the major causes of morbidity and mortality. The deep learning methods can automatically extract drug features from molecular graphs or drug-related networks, which improves the performance of DDI prediction. However, there is noise and incomplete data in existing datasets, and the volume of dataset is limited. In order to fully utilize the knowledge graph network and the molecular structure, we propose a dual-view fusion model GDF-DDI. In one view, the knowledge graph network and drug similarity network are constructed as the global information, and two graph convolution operations are implemented on both networks to extract drug embeddings. Subsequently, layer wise graph contrastive learning is performed to update the drug embeddings to captures richer semantic information. In the other view, the self-supervised learning is utilized to extract more comprehensive embedding of drugs. The embeddings under two views are concatenated to cover the global and local DDI information. The comparative experiments on two datasets show that our model outperforms other recent and state-of-the-art baselines.