Bläddra i källkod

限制销售访问地址

chenjunkai 6 år sedan
förälder
incheckning
cadb0b76e0
2 ändrade filer med 9 tillägg och 4 borttagningar
  1. 4 3
      web/imgTab.html
  2. 5 1
      web/login.html

+ 4 - 3
web/imgTab.html

@@ -32,6 +32,7 @@
             </a>
         </div>
     </div>
+    <!--
     <input type="radio" class="tab-1" name="tab" onclick="location.href='index.html'">
     <span>Home</span><i class="fa fa-home"></i>
 
@@ -40,7 +41,7 @@
 
     <input type="radio" class="tab-3" name="tab" onclick="location.href='userTab.html'">
     <span>Users</span><i class="fa fa-user"></i>
-
+    -->
     <input type="radio" class="tab-4" name="tab" checked="checked">
     <span>Azimg</span><i class="fa fa-image"></i>
 
@@ -442,12 +443,12 @@
     }
 
     function SaveSysFunc() {
-        let asinterval = $('#asIntervalINput').val()
+        let asinterval = parseInt($('#asIntervalINput').val())
         let asimgEmail = $('#asimgMsgEmailInput').val()
         let post_data = {
             'update_data': [
                 {'key': 'asimgEmail', 'val': asimgEmail},
-                {'key': 'asinterval', 'val': asinterval}
+                {'key': 'asinterval', 'val': asinterval*3600}
             ],
             'token': $.cookie('access_token'),
         }

+ 5 - 1
web/login.html

@@ -198,7 +198,11 @@
                     setCookie('refresh_token', data['res']['refresh_token'], data['res']['refresh_expire'])
                     console.log(data)
                     //window.location.href = "http://localhost:63339/web/index.html";
-                     window.location.href = "http://"+domain+":7724/web/index.html";
+                    if (username == 'saler') {
+                        window.location.href = "http://" + domain + ":7724/web/imgTab.html";
+                    } else {
+                        window.location.href = "http://" + domain + ":7724/web/index.html";
+                    }
 
                 } else {
                     alert(data['msg'])