Kaynağa Gözat

提交代码

hugeng 5 yıl önce
ebeveyn
işleme
c74a38aaa6

+ 4 - 0
src/main/webapp/WEB-INF/jsp/admin/course-update.jsp

@@ -249,6 +249,10 @@
             alert('描述不能为空!');
             return false;
         }
+        if($("#describes").val().length > 21500){
+            alert('"课程描述"最多只能保存2.0万个字符!');
+            return false;
+		}
 
         return true;
     }

+ 5 - 1
src/main/webapp/WEB-INF/jsp/admin/news-add.jsp

@@ -88,7 +88,7 @@
 		<div class="row cl recom" id="reone" >
 			<label class="form-label col-xs-4 col-sm-2">新闻描述:</label>
 			<div class="formControls col-xs-8 col-sm-9">
-				<textarea name="titles" class="textarea"></textarea>
+				<textarea name="titles" class="textarea" id="describes"></textarea>
 			</div>
 		</div>
 
@@ -313,6 +313,10 @@
                 alert('标题不能为空!');
                 return false;
             }
+            if($("#describes").val().length > 21500){
+                alert('"新闻描述"最多只能保存2.0万个字符!');
+                return false;
+            }
 
             return true;
         }

+ 5 - 1
src/main/webapp/WEB-INF/jsp/admin/news-update.jsp

@@ -90,7 +90,7 @@
         <div class="row cl recom" id="reone" >
             <label class="form-label col-xs-4 col-sm-2">新闻描述:</label>
             <div class="formControls col-xs-8 col-sm-9">
-                <textarea name="titles" class="textarea">${newsById.titles}</textarea>
+                <textarea name="titles" class="textarea" id="describes">${newsById.titles}</textarea>
             </div>
         </div>
         <div class="row cl">
@@ -329,6 +329,10 @@
                             alert('标题不能为空!');
                             return false;
                         }
+                        if($("#describes").val().length > 21500){
+                            alert('"新闻描述"最多只能保存2.0万个字符!');
+                            return false;
+                        }
 
                         return true;
                     }

+ 4 - 0
src/main/webapp/WEB-INF/jsp/admin/team-add.jsp

@@ -279,6 +279,10 @@
                 alert('名称不能为空!');
                 return false;
             }
+            if($("#describes").val().length > 21500){
+                alert('"简述"最多只能保存2.0万个字符!');
+                return false;
+            }
 
             return true;
         }

+ 4 - 0
src/main/webapp/WEB-INF/jsp/admin/team-update.jsp

@@ -280,6 +280,10 @@
             alert('名称不能为空!');
             return false;
         }
+        if($("#describes").val().length > 21500){
+            alert('"简述"最多只能保存2.0万个字符!');
+            return false;
+        }
 
         return true;
     }

+ 0 - 114
src/main/webapp/WEB-INF/jsp/user/register.jsp

@@ -1,114 +0,0 @@
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<html xmlns="http://www.w3.org/1999/xhtml">
-<!DOCTYPE html>
-<head>
-    <meta name="renderer" content="webkit"/>
-    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
-    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-    <meta name="format-detection" content="telephone=no" />
-    <meta name="apple-mobile-web-app-capable" content="yes" />
-    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
-    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0 user-scalable=no"/>
-    <title>科技艺术课程</title>
-    <link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/user/css/aos.css"/>
-    <link rel="stylesheet" href="${pageContext.request.contextPath}/user/css/base.css">
-    <link rel="stylesheet" href="${pageContext.request.contextPath}/user/css/baseindex.css">
-    <script src="${pageContext.request.contextPath}/user/js/jquery.min.js" type="text/javascript"></script>
-    <script type="text/javascript" src="${pageContext.request.contextPath}/static/admin/index/layer/layer.js"></script>
-    <script type="text/javascript" src="${pageContext.request.contextPath}/user/myJs/register.js"></script>
-    <script type="text/javascript" src="${pageContext.request.contextPath}/static/admin/index/layer/layer.js"></script>
-    <style type="text/css">
-        label.error {
-            color: Red;
-            position: absolute;
-            right: 0;
-            top: 0;
-            line-height: 55px;
-            padding-right: 10px;
-        }
-        input.error  {
-            border: dashed 1px red;
-        }
-    </style>
-
-</head>
-
-<body>
-
-<div class="login_top">
-    <div class="mainbox clearfix">
-        <a href="${pageContext.request.contextPath}/index.html" class="login_logo" data-aos-duration="500" data-aos-delay="200" data-aos="fade-right">
-            <img src="${pageContext.request.contextPath}/user/images/logo.png" alt="" />
-        </a>
-        <p class="login_top_r" data-aos-duration="500" data-aos-delay="200" data-aos="fade-left">已有账号: <a href="${pageContext.request.contextPath}/login.html">立即登录</a></p>
-    </div>
-</div>
-
-<div class="login_w">
-    <div class="login_con aos-init aos-animate" data-aos-duration="500" data-aos-delay="200" data-aos="fade-up">
-        <div class="login_tit"><i class="icon_zc"></i>用户注册</div>
-        <div class="login_text clearfix">
-            <form action="${pageContext.request.contextPath}/submit_register.html" method="post" id="form-admin-add" onsubmit="return checkForm();">
-                <p class="login_input">
-                    <i class="icon_people"></i>
-                    <input type="text" class="input_con" placeholder="请输入您的学号" name="sno" id="sno">
-                </p>
-
-                <p class="login_input">
-                    <i class="icon_people"></i>
-                    <input type="text" class="input_con" placeholder="请输入您的姓名" name="name">
-                </p>
-
-                <p class="login_input">
-                    <i class="icon_tel"></i>
-                    <input type="text" class="input_con" placeholder="输入手机号码" name="phone" id="phone">
-                </p>
-
-                <p class="login_input">
-                    <i class="icon_infor"></i>
-                    <input type="text" class="input_con input_infor yanZheng" placeholder="输入验证码" id="sms" name="sms">
-                    <input type="button" class="send_infor" value="发送验证码"  id="send_infor">
-                </p>
-
-
-                <p class="login_input">
-                    <i class="icon_password"></i>
-                    <input type="password" class="input_con" placeholder="请输入密码" name="password" id="password">
-                </p>
-
-                <p class="login_input">
-                    <i class="icon_password"></i>
-                    <input type="password" class="input_con" placeholder="请输入确认密码" name="passwords">
-                </p>
-
-                <input type="submit" value="立即注册" class="login_btn">
-            </form>
-        </div>
-
-    </div>
-</div>
-
-
-<%@ include file="../index01/gongyong.jsp" %>
-
-
-<script type="text/javascript" src="${pageContext.request.contextPath}/user/js/aos.js"></script>
-
-<!--请在下方写此页面业务相关的脚本-->
-<script type="text/javascript" src="${pageContext.request.contextPath}/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
-<script type="text/javascript" src="${pageContext.request.contextPath}/lib/jquery.validation/1.14.0/validate-methods.js"></script>
-<script type="text/javascript" src="${pageContext.request.contextPath}/lib/jquery.validation/1.14.0/messages_zh.js"></script>
-
-<script type="text/javascript">
-    (function(){
-        AOS.init({});
-    }());
-
-
-
-
-</script>
-
-</body>
-</html>

+ 0 - 188
src/main/webapp/user/myJs/register.js

@@ -1,188 +0,0 @@
-$(document).ready(function() {
-    $("#form-admin-add").validate({
-        rules: {
-            sno: {
-                required: true,
-                digits: true,
-                minlength: 6,
-                maxlength: 16
-            },
-            name: {
-                required: true,
-                isChinese: true,
-                minlength: 2,
-                maxlength: 10
-            },
-            phone: {
-                required: true,
-                isMobile: true,
-            },
-            password: {
-                required: true,
-                isPwd: true,
-
-            },
-            passwords: {
-                required: true,
-                equalTo: "#password",
-            }
-
-        },
-        onkeyup: false,
-        focusCleanup: true,
-        success: "valid"
-
-    });
-
-
-    var num02 = 0;
-    $("#sno").blur(function () {
-        /* 去验证学号是否存在*/
-        $.ajax({
-            url: 'submitSno.html',
-            type: 'POST',
-            async: false,
-            data: {'sno': $("#sno").val()},
-            dataType: 'text',
-            success: function (data) {
-                if (data == "ok") {
-                    layer.msg("此学号已存在!",{icon: 0, time: 1500});
-                    num02 = 1;
-                } else {
-                    num02 = 0;
-                }
-            },
-            error: function (data) {
-                console.log(data.msg);
-            },
-        });
-
-    })
-
-
-    var num01 = 0;
-    $("#phone").blur(function () {
-        /* 去验证该手机号是否已被注册*/
-        $.ajax({
-            url: 'submitPhone.html',
-            data: {'phone': $("#phone").val()},
-            type: 'POST',
-            async: false,
-            contentType: "application/x-www-form-urlencoded; charset=utf-8",
-            dataType: 'text',
-            success: function (data) {
-                if (data == "ok") {
-                    layer.msg("此手机号已注册!",{icon: 0, time: 1500});
-                    num01 = 1;
-                } else {
-                    num01 = 0;
-                }
-            },
-            error: function (data) {
-                console.log(data.msg);
-            },
-        });
-    })
-
-
-
-
-
-    var num03 = 0;
-    $("#sms").blur(function () {
-        /* 去验证验证码是否正确*/
-        $.ajax({
-            url: 'contractCode.html',
-            type: 'POST',
-            async: false,
-            data: {'code': $("#sms").val(), 'phone': $("#phone").val()},
-            dataType: 'json',
-            success: function (data) {
-                if (data.is == false) {
-                    if($("#sms").val()==null || $("#sms").val()==""){
-                        layer.msg("请输入验证码!",{icon: 2, time: 1500});
-                        num03 = 2;
-                    }else{
-                        layer.msg("请输入正确的验证码!",{icon: 0, time: 1500});
-                        num03 = 1;
-                    }
-                } else {
-                    num03 = 0;
-                }
-            },
-            error: function (data) {
-                console.log(data.msg);
-            },
-        });
-
-    })
-
-
-
-    $("#send_infor").click(function () {
-        if (num01 == 0 && $("#phone").val().length == 11) {
-            $.ajax({
-                url: 'sendSms.html',
-                type: 'POST',
-                async: false,
-                data: {'phone': $("#phone").val()},
-                dataType: 'json',
-                success: function () {
-                    layer.msg('已发送,请注意查收!', {icon: 1, time: 1000});
-                    $("#send_infor").attr("disabled", "disabled");
-                    $("#send_infor").val("已发送(100 秒)");
-                    faSong();
-                   /* setTimeout("faSong()", 1000);*/
-                    return false;
-                },
-                error: function (data) {
-                    console.log(data.msg);
-                },
-            });
-        } else {
-            layer.msg('请先输入正确的手机号!', {icon: 0, time: 1000});
-        }
-    });
-
-
-    $("#form-admin-add").submit(function () {
-        if(num02==1){
-            layer.msg("此学号已存在!",{icon: 0, time: 1500});
-            return false;
-        }
-        if(num01==1){
-            layer.msg("此手机号已注册!",{icon: 0, time: 1500});
-            return false;
-        }
-        if(num03==1){
-            layer.msg("请输入正确的验证码!",{icon: 0, time: 1500});
-            return false;
-        }
-        if($("#sms").val()==null || $("#sms").val()==""){
-            layer.msg("请输入验证码!",{icon: 2, time: 1500});
-            return false;
-        }
-
-    });
-
-
-
-});
-
-
-//手机号没有注册过的可以发送验证码
-var tt;
-var mm = 100;
-function faSong() {
-    mm--;
-    $("#send_infor").val("已发送(" + mm + " 秒)");
-    if (mm <= 0) {
-        mm = 100;
-        $("#send_infor").val("重新获取");
-        $("#send_infor").attr("disabled", false);
-        clearTimeout(tt);
-        return;
-    }
-    tt = setTimeout("faSong()", 1000);
-
-}