ZeYanG
2018-08-24 d6404ab72e2e0fa8a8c68b7ce14c2f2a6352bfae
publish/WEB-INF/jsp/showForm.jsp
@@ -59,8 +59,12 @@
   <div id="CursorLayerCanvas" style="display: none;"></div> 
    </div>
   <div class="sure_box">
        <button class="btn btn-info btn-action closeBtn s_savebtn" onclick="customShow.onclickSave2()">保存</button>
    </div>
        <button class="btn btn-info btn-action closeBtn s_savebtn" onclick="customShow.onclickSave2()" style="display:none">保存</button>
   </div>
   <!-- des -->
    <script type="text/javascript" charset="utf-8" src="../js/tripledes.js"></script>
    <script type="text/javascript" charset="utf-8" src="../js/mode-ecb.js"></script>
    <script type="text/javascript" charset="utf-8" src="../js/desutil.js"></script>
    <!-- 表单相关设置 -->
   <script type="text/javascript">
      var datasource = ${formdatabase};
@@ -68,7 +72,7 @@
      var showFormEvent = ${formevent};
      var showFormApi = ${formapi};
      
      var preview = "${preview}";
      var preview = ${preview};
      // $(".sure_box").append('<button class="btn btn-info btn-action closeBtn s_savebtn" onclick="customShow.onclickSave2()">保存</button>')
      // var formbaseInfo = ${formbaseInfo};
      
@@ -79,24 +83,24 @@
      var username = {"userName":"${userName}"};
      
      
       window.localStorage.setItem("datasource",JSON.stringify(datasource));
       setDeclocal("datasource",datasource);
      window.localStorage.setItem("newFormID",formID);
      window.localStorage.setItem("tenantID",JSON.stringify(obj));
      window.localStorage.setItem("token",JSON.stringify(token));
      setDeclocal("newFormID",formID);
      setDeclocal("tenantID",obj);
      setDeclocal("token",token);
      
      window.localStorage.setItem("customShowFlag",preview);
      setDeclocal("customShowFlag",preview);
      
      // 发布模式选择
      if(window.localStorage.getItem("customShowFlag") == undefined) {
         window.localStorage.setItem("customShowFlag","3");
      if(getEnclocal("customShowFlag") == undefined) {
         setDeclocal("customShowFlag","3");
      } else {
         customShowFlag = window.localStorage.getItem("customShowFlag");
         customShowFlag = getEnclocal("customShowFlag");
      }
      //window.localStorage.setItem("userName",JSON.stringify(username));
   </script>
   
    <div id="CursorLayerCanvas" style="display: none;"></div>
    <div id="CursorLayerCanvas" style="display: none;"></div>
    <script type="text/javascript" charset="utf-8" src="../js/vender/jquery-2.2.3.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="../js/vender/jquery-ui.js"></script>  
     <!-- <script type="text/javascript" charset="utf-8" src="../js/vender/all.js"></script>  -->
@@ -118,10 +122,6 @@
   <script type="text/javascript" charset="utf-8" src="../js/vender/bootstrap-tooltip.js"></script>  
   <script type="text/javascript" charset="utf-8" src="../js/vender/bootstrap-popover.js"></script> 
    <!-- des -->
    <script type="text/javascript" charset="utf-8" src="./../../js/util/tripledes.js"></script>
    <script type="text/javascript" charset="utf-8" src="./../../js/util/mode-ecb.js"></script>
    <script type="text/javascript" charset="utf-8" src="./../../js/util/desutil.js"></script>
   <script type="text/javascript" src="../js/ajax.js"></script>  
     <script type="text/javascript" src="../js/customMin/formula_min.js"></script>  
@@ -138,11 +138,16 @@
    <!-- 密码验证 -->
    <script type="text/javascript">
    $(function(){
        var url = window.location.href;
        var key = GetQueryString(url,"publishShowflag");
        if(key==1){
            return ;
        }
      // 发布模式选择
      if(window.localStorage.getItem("customShowFlag") == undefined) {
         window.localStorage.setItem("customShowFlag","3");
      if(getEnclocal("customShowFlag") == undefined) {
         setDeclocal("customShowFlag","3");
      } else {
         customShowFlag = window.localStorage.getItem("customShowFlag");
         customShowFlag = getEnclocal("customShowFlag");
      }
         //window.localStorage.setItem("userName",JSON.stringify(username));
       
@@ -151,22 +156,35 @@
          popupDiv('showPassword');
       };
       $("#auth").click(function(){
          var param = {};
          param.accesspassword = $("#password").val();
          var param = {};
          param.accesspassword = encryptByDES($("#password").val(),"");
          param.ver = encryptByDES($("#ver").val().toLocaleLowerCase(),"");
          // param.openId = getCookie("openId");
          // param.formId = getEnclocal("customForm").newFormID;
          if (!param.accesspassword) {
            customBase.alert("E", "密码不能为空!");
            return;
         }
         if(!param.ver){
                customBase.alert("E", "验证码不能为空!");
                return;
            }
          $.ajax({
             type : "POST",
             dataType : "text",
                // headers : {"Content-Type":"application/json"},
             url : "/publish/auth",
             data : param,
             success : function(data){
                  if(data == "success") {
                     hideDiv('showPassword');
                  } else {
                     alert("密码错误");
                  } else if(data == "error"){
                            customBase.alert("E", "验证码错误!");
                            reloadPic();
                        }else {
                            customBase.alert("E", "密码错误!");
                            reloadPic();
                     // alert("密码错误");
                     
                  }
                     }
@@ -215,7 +233,7 @@
   
    <div id="showPassword" class="pop-box">
    <div class="x-dialog">
    <div class="x-dialog" style="height: 260px;">
       <div class="dialog-header">
          <span style="font-size:16">密码登录</span>
         <!--<span class="fa fa-remove x-close"></span>   -->
@@ -223,12 +241,15 @@
       <div class="dialog-body">
          <div class="x-layout-table">
             <div class="x-layout-table-row" style="left: 33px;top: 26px;height: 30px;">
                <div class="x-layout-table-item fui_text">
                <div class="x-layout-table-item fui_text" id = "a">
                  <div class="x-lock"><img class="lockImg"  src="../img/lock.png" alt="" /></div>
                   <input id="password" type="password" placeholder="请输入密码" class="x-input" style="" >
                        <input id = "ver" class="x-input" style="width: 60%;margin-top: 15px;padding-left: 20px;" placeholder="请输入验证码">
                        <img src="${ctx }/publish/generate?t=1" id="checkCode" align="middle" onclick="reloadPic()" style=" margin-top: 15px;width: 23%; height: 32px;border-radius: 4px;">
                </div>
             </div>
                <div class="x-layout-table-row" style="left: 40px;top: 58px;">
                <div class="x-layout-table-row" style="left: -50px;top: 125px;">
                <div class="x-layout-table-item fui_text x-login ">
                   <button  class="loginBtn" style="" id="auth">登录</button>
                </div>
@@ -248,5 +269,8 @@
      //      console.log($('#showPassword'))
      
      //}
            function reloadPic() {
                document.getElementById("checkCode").src = document.getElementById("checkCode").src + "1";
            }
   </script>
</html>