Browse Source

前端样式兼容问题

lizhen_gitee 3 years ago
parent
commit
3d18407c86
1 changed files with 35 additions and 0 deletions
  1. 35 0
      application/index/view/recharge/index.html

+ 35 - 0
application/index/view/recharge/index.html

@@ -210,6 +210,9 @@
                 width: 100%;
             }
         }
+        .warning{
+            color:#E6A23C !important;
+        }
 
     </style>
     <script>
@@ -341,4 +344,36 @@
         });
         setFontSize();
     })(window, document);
+</script>
+<script>
+    var timer;
+    function onInpt(){
+        var phone = $(".phoneInpt").val();
+        if(!phone){
+            return;
+        }
+        if(timer){
+            // console.log('正清空中---')
+            clearTimeout(timer);
+            timer=null;
+        }
+        timer=setTimeout(function(){
+            $.post("http://mita.lanmaonet.com/api/recharge/check_user", {mobile:phone},
+                    function (data, textStatus, jqXHR) {
+                        console.log(data, textStatus)
+                        if(textStatus === "success"){
+                            // $.messager.alert("系统提示","添加成功",data.message);
+                            if(data.code === 1){
+                                $(".phone-nick").html('昵称: '+data.data.nickname).removeClass("warning");
+                            }else{
+                                $(".phone-nick").html('未搜到该用户').addClass("warning");
+                            }
+
+                        }else{
+                            alert("系统提示","失败");
+                        }
+                    }
+            );
+        },1400);
+    }
 </script>