The invention discloses a Saldmpn type 
nickel halide (II) complex and a preparation method and application thereof. The complex belongs to a P21 / n 
space group of a monoclinic 
system, an asymmetric unit of the complex is formed by connecting three neutral NiII (3,5-Cl-saldmpn) through multiple 
weak interaction participated by 
halogen bonds, and each NiII (3,5-Cl-salmen) unit comprises a Ni (II) center and a 3,5-Cl-salmen Saldmpn type ligand. The preparation method comprises the following steps: dissolving 3,5-dichlorosalicylaldehyde and N,N'-bis(3-aminopropyl)
methylamine in 
methanol, conducting stirring, adding 
nickel nitrate (II), conducting stirring, conducting filtering, volatilizing the filtrate at 
room temperature to obtain crystals, and conducting washing, filtering and 
drying to obtain the complex. The complex is used as a pH sensor based on a 
smart phone imaging 
system and used for constructing a 
molecular logic gate. According to the Saldmpn type 
nickel halide (II) complex, a 
research model and data are provided for the 
electronic structure of a front 
transition metal Schiff base complex and the regulation and 
control effect of 
halogen bonds, and compared with a known 
logic gate, the constructed inhibition type 
molecular logic gate has the advantages of being small in pH value regulation range, high in sensitivity, good in 
signal discrimination degree, easy to operate and the like.