Due to the discrepancy of different devices for fundus image collection, a well-trained neural network usually fails to be applied to another new dataset. To solve this problem, the unsupervised domain adaptation strategy attracts a lot of attention. In this paper, we adopt image synthesis and adversarial learning mechanism to complete input-level adaptation and output-level adaptation, respectively. In particular, the edge structure information of optic disc and cup is embedded into the devised encoder-decoder structure in feature-level adaptation to obtain domain-invariant features. To enhance the ability of feature representation, we introduce the position attention module and the edge attention module to extract discriminative features. We train our proposed method on the training set of the REFUGE challenge dataset and test it on Drishti-GS and RIM-ONE-r3 datasets. The experimental results demonstrate that our method is promising with respect to the segmentation of optic disc and cup.