PHOENIX — Geraldo Perdomo went 3 for 3 with a double, a triple and two RBIs, Zac Gallen pitched six smooth innings and the surging Arizona Diamondbacks beat the San Francisco Giants 8-1 on Monday night. Arizona, which has won three straight and 12 of 18, moved a half-game ahead of San Francisco for third place in the NL West, just 1 1/2 games behind the idle New York Mets for the last National League wild card. Gallen (12-14) allowed one run and two hits with six strikeouts. Ildemaro Vargas’ two-run single gave the Diamondbacks a 3-1 lead in a six-run sixth. Jordan Lawlar doubled in a run, James McCann hit a two-run homer and Perdomo added an RBI triple to make it 7-1.Perdomo also walked twice on a perfect night at the plate in the leadoff spot. The Giants mustered only two hits, matching their season low in a July 29 loss to Pittsburgh, and lost for the fourth time in five games.Perdomo walked in the first and Ketel Marte was hit by the next pitch before back-to-back strikeouts of Corbin Carroll and Gabriel Moreno. Perdomo advanced to third on a passed ball by catcher Patrick Bailey and then scored on a throwing error by starter Kai-Wei Teng to make it 1-0. Casey Schmitt homered in the third to tie it. Popular ReadsTop prospect Bryce Eldridge, a 20-year-old first baseman, made his major league debut for the Giants and finished 0 for 3 with a strikeout. His 407-foot flyout to center field in the seventh would have been a home run in 23 big league ballparks, includi …