huangxiaojing 3 年之前
父節點
當前提交
13f2f61075
共有 2 個文件被更改,包括 17 次插入138 次删除
  1. 6 107
      microserviceUserH5/static/css/beeMansLogin.css
  2. 11 31
      microserviceUserH5/vcloud/beeMansLogin.html

+ 6 - 107
microserviceUserH5/static/css/beeMansLogin.css

@@ -5,12 +5,12 @@ body {
   font-family: PingFangSC-Semibold, PingFang SC;
 }
 @media screen and (max-width: 750px) {
-  html {
+  body, html {
       font-size: calc(100vw / 7.5);
   }
 }
 @media screen and (min-width: 750px) {
-  html {
+  body, html {
       font-size: calc(450px / 7.5);
   }
 }
@@ -30,111 +30,10 @@ body {
 .input-item input{border: none;outline: none;height: 0.28rem;padding-left: 0.1rem;border-left: 2px solid #e8e8e8;font-size: 0.28rem;color: #333;width: 3.66rem;}
 .icon-user{width: 0.44rem;height: 0.44rem;}
 .btn{width: 5.9rem;height: 1rem;background: #3B7FFF;border-radius: 0.6rem;letter-spacing: 2px;font-size: 0.36rem;line-height: 1rem;color: #fff;text-align: center;}
-#toast-container>.toast-error {background-image: none!important;}
-.toast-error {background-color: rgba(0, 0, 0, 0.7);}
-.toast-message {font-size: 0.28rem;line-height: 0.8rem;text-align: center;font-weight: 400;color: #FFFFFF;}
-#toast-container>div {width: 4rem;height: 0.8rem;opacity: 1;padding: 0 !important;border-radius: 0.2rem;box-shadow: none;}
-.toast-center-center {top: 50%;left: 50%;margin-top: -0.45rem;margin-left: -2rem;}
-.master {
-  width: 100%;
-  height: 100vh;
-  position: fixed;
-  top: 0;
-  left: 0;
-  display: none;
-}
-.loading {
-  color: #fff;
+.weui-toast--text, .weui-toast_content {
   font-size: 0.28rem;
-  text-align: center;
-  background-color: rgba(0, 0, 0, 0.7);
-  width: 2rem;
-  height: 2rem;
-  position: absolute;
-  top: 50%;
-  margin-top: -1rem;
-  left: 50%;
-  margin-left: -1rem;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  flex-direction: column;
-  border-radius: 0.2rem;
-}
-.loadingSix {
-  position: relative;
-  width: 1rem;
-  height: 1rem;
-  overflow: hidden;
-  margin-bottom: 0.2rem;
-}
-.loadingSix span {
-  display: inline-block;
-  width: 0.16rem;
-  height: 0.16rem;
-  border-radius: 50%;
-  background: #ffffff;
-  position: absolute;
-  animation: load 1.04s ease infinite;
-  -webkit-animation: load 1.04s ease infinite;
-}
-@keyframes load {
-  0%{
-    opacity: 1;
-  }
-  100%{
-    opacity: 0.2;
-  }
-}
-.loadingSix span:nth-child(1) {
-  left: 0;
-  top: 50%;
-  margin-top:-0.08rem;
-  animation-delay:0.13s;
-  -webkit-animation-delay:0.13s;
-}
-.loadingSix span:nth-child(2) {
-  left: 0.14rem;
-  top: 0.14rem;
-  animation-delay:0.26s;
-  -webkit-animation-delay:0.26s;
-}
-.loadingSix span:nth-child(3) {
-  left: 50%;
-  top: 0;
-  margin-left: -0.08rem;
-  animation-delay:0.39s;
-  -webkit-animation-delay:0.39s;
-}
-.loadingSix span:nth-child(4) {
-  top: 0.14rem;
-  right: 0.14rem;
-  animation-delay: 0.52s;
-  -webkit-animation-delay: 0.52s;
-}
-.loadingSix span:nth-child(5) {
-  right: 0;
-  top: 50%;
-  margin-top: -0.08rem;
-  animation-delay: 0.65s;
-  -webkit-animation-delay: 0.65s;
-}
-.loadingSix span:nth-child(6) {
-  right: 0.14rem;
-  bottom: 0.14rem;
-  animation-delay:0.78s;
-  -webkit-animation-delay:0.78s;
-}
-.loadingSix span:nth-child(7) {
-  bottom: 0;
-  left: 50%;
-  margin-left: -0.08rem;
-  animation-delay:0.91s;
-  -webkit-animation-delay:0.91s;
 }
-.loadingSix span:nth-child(8) {
-  bottom: 0.14rem;
-  left: 0.14rem;
-  animation-delay:1.04s;
-  -webkit-animation-delay:1.04s;
+.weui-toast {
+  width: 1.76rem;
+  min-height: 1.76rem;
 }

+ 11 - 31
microserviceUserH5/vcloud/beeMansLogin.html

@@ -6,7 +6,8 @@
   <link rel="icon" href="../static/img/favicon2.ico" type="img/x-ico">
   <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
   <title>双子星登录</title>
-  <link rel="stylesheet" href="../static/js/vender/toastr/toastr.min.css">
+  <link rel="stylesheet" href="https://cdn.bootcss.com/weui/1.1.3/style/weui.min.css">
+	<link rel="stylesheet" href="https://cdn.bootcss.com/jquery-weui/1.2.1/css/jquery-weui.min.css">
   <link rel="stylesheet" href="../static/css/beeMansLogin.css">
 </head>
 <body>
@@ -24,53 +25,32 @@
     </div>
     <div class="btn" onclick="handleClick()">登录</div>
   </div>
-  <div class="master" onclick="stop()">
-    <div class="loading">
-      <div class="loadingSix">
-        <span></span>
-        <span></span>
-        <span></span>
-        <span></span>
-        <span></span>
-        <span></span>
-        <span></span>
-        <span></span>
-      </div>
-      <p>正在登录</p>
-    </div>
-  </div>
 </body>
 <script src="../static/js/vender/jquery-3.4.1.min.js"></script>
-<script src="../static/js/vender/toastr/toastr.min.js"></script>
 <script src="../static/js/vender/jsencrypt.js"></script>
 <script src="../static/js/vender/md5.js"></script>
 <script src="../static/js/vender/config.js"></script>
+<script src="https://cdn.bootcss.com/jquery-weui/1.2.1/js/jquery-weui.min.js"></script>
 <script type="text/javascript">
-  toastr.options.timeOut = 500;
-  toastr.options.positionClass = 'toast-center-center';
   $("#tel_input").bind('input propertychange', function (e) {
     var ipt_phones = $('#tel_input').val();
     var c = $(this);
     if (/[^\d]/.test(c.val())) {//替换非数字字符
       var temp_amount = c.val().replace(/[^\d]/g, '');
       $(this).val(temp_amount);
-      toastr.error('请填写正确的手机号')
+      $.toast('请填写正确的手机号', "text");
     }
   });
-  function stop() {
-    event.stopPropagation();
-  };
   function handleClick() {
     var ipt_phone = $('#tel_input').val();
     var ipt_pass = $('#tel_pass').val();
     if (!ipt_phone) {
-      toastr.error('请填写正确的手机号')
+      $.toast('请填写正确的手机号', "text");
     } else if (!/^1[3|4|5|6|7|8|9][0-9]\d{8}$/.test(ipt_phone)) {
-      toastr.error('请填写正确的手机号')
+      $.toast('请填写正确的手机号', "text");
     } else if (!ipt_pass) {
-      toastr.error('请填写密码')
-    } else {
-      
+      $.toast('请填写密码', "text");
+    } else {     
       $.ajax({
         url: baseUrl + '/api/user/v1/client/getPbKey',
         type: 'post',
@@ -91,7 +71,7 @@
       password: getcode(md5($('#tel_pass').val()), publicKey),
       client: 5
     }
-    $('.master').show()
+    $.showLoading();
     $.ajax({
       url: baseUrl + '/api/user/v1/beeMans/fmCloudLogin',
       data: JSON.stringify(form),
@@ -100,11 +80,11 @@
       dataType: 'json',
       cache: false,
       success: function (res) {
-        $('.master').hide()
+        $.hideLoading();
         if (res.status === 0) {
           WebViewJavascriptBridge.callHandler('OpenBridgeKit', res.data)
         } else {
-          toastr.error(res.msg)
+          $.toast(res.msg, "text");
         }
       }
     })