Kaynağa Gözat

[update] web page

x 5 yıl önce
ebeveyn
işleme
894403f673

+ 6 - 5
web/assets/css/style.css

@@ -187,14 +187,15 @@ input::-webkit-inner-spin-button { -webkit-appearance: none; }
 }
 
 .dialog-content {
-    padding-left: 3.5rem;
+    /* padding-left: 3.5rem;
     padding-right: 3.5rem;
     padding-bottom: 1rem;
-    width: 10rem;
+    width: 10rem; */
+    border: none;
     border-radius:15px;
-    background: rgba(45,45,45,.33);
-    margin: 0 auto;
-    margin-top: 50%;
+    background-color: rgba(45,45,45,.33);
+    /* margin: 0 auto;
+    margin-top: 50%; */
 
     text-align: center;
 }

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
web/assets/js/dialog-plus.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
web/assets/js/dialog.js


+ 14 - 11
web/assets/js/main.js

@@ -1,4 +1,4 @@
-var baseUrl = "http://192.168.3.20/api/";
+var baseUrl = "http://twong.h/api/";
 
 function get(api, data, callback) {
   http.ajax({
@@ -48,14 +48,16 @@ function getKey(callback) {
   });
 }
 
-function show(text) {
-  var dialog = document.getElementById("dialog");
-  dialog.style.display = "block";
-  document.getElementById("tips").innerHTML = text;
-
-  setTimeout(function() {
-    dialog.style.display = "none";
-  }, 1500);
+function show(text, callback) {
+  var d = dialog({
+    content: text,
+    skin: "dialog-content"
+  });
+  d.show();
+  setTimeout(function () {
+    d.close().remove();
+    if(callback != null) callback();
+  }, 2000);
 }
 
 function verify(phone) {
@@ -96,8 +98,9 @@ function register(phone, passwd, code) {
   post("register", data, function(result) {
     console.log(result);
     if (result.status === 200) {
-      show("注册成功!");
-      document.location.href = "/test";
+      show("注册成功!<br />正在跳转,请稍后...", function () {
+        document.location.href = "http://localhost:8080/#/login";
+      });
     } else {
       show(result.msg);
     }

+ 2 - 2
web/assets/js/scripts.js

@@ -29,7 +29,7 @@ function register_click() {
     var password = $(that).find('.password').val();
     var re_password = $(that).find('.repassword').val();
 
-    console.log(username, password, re_password, code);
+    // console.log(username, password, re_password, code);
     if(username == '') {
         $(that).find('.error').fadeOut('fast', function(){
             $(this).css('top', '27px');
@@ -59,7 +59,7 @@ function register_click() {
         return false;
     }
     if(password !== re_password) {
-        console.log(password, re_password);
+        // console.log(password, re_password);
         $(that).find('.error').fadeOut('fast', function(){
             $(this).css('top', '234px');
         });

+ 1 - 8
web/index.html

@@ -18,14 +18,6 @@
     </head>
 
     <body>
-        <!-- 弹窗 -->
-        <div id="dialog" class="dialog">
-            <!-- 弹窗内容 -->
-            <div class="dialog-content">
-                <div id="tips" class="text">文本内容</div>
-            </div>
-        </div>
-
         <img class="logo" src="assets/img/logo.png">
         <div class="container">
             <div class="form">
@@ -52,6 +44,7 @@
         <!-- Javascript -->
         <script src="./assets/js/jquery-1.8.2.min.js"></script>
         <script src="./assets/js/supersized.3.2.7.min.js"></script>
+        <script src="./assets/js/dialog.js"></script>
         <!-- <script src="assets/js/supersized-init.js"></script> -->
         <script src="./assets/js/scripts.js"></script>
 

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor