Преглед на файлове

Merge remote-tracking branch 'origin/master'

lyq преди 6 месеца
родител
ревизия
b669368002

+ 33 - 10
src/main/java/com/sooka/module/web/cms/CertificateAuthController.java

@@ -1,14 +1,20 @@
 package com.sooka.module.web.cms;
 
+import com.github.pagehelper.PageInfo;
 import com.sooka.common.annotation.FormToken;
 import com.sooka.common.utils.ControllerUtil;
 import com.sooka.common.utils.JsonUtil;
 import com.sooka.common.utils.StrUtil;
+import com.sooka.module.web.cms.service.ContentService;
+import com.sooka.mybatis.model.TCmsContent;
+import com.sooka.mybatis.model.TCmsSite;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.ModelAndView;
 
 import javax.servlet.http.HttpServletRequest;
 import java.util.HashMap;
@@ -17,26 +23,43 @@ import java.util.Map;
 @Controller
 @RequestMapping("/cms/certificate")
 public class CertificateAuthController {
-//    @FormToken
-    @RequestMapping("/auth")
-    @ResponseBody
-    public Map<String, Object> certificateAuth(
+
+    @Autowired
+    private ContentService contentService;
+
+    @RequestMapping("/query")
+    public ModelAndView certificateAuth(
             HttpServletRequest request,
             @RequestParam(value = "verifyCode",required = false) String verifyCode,
-            @RequestParam(value = "certificateNum",required = false) String certificateNum,
             @RequestParam(value = "username",required = false) String username,
             @RequestParam(value = "telephone",required = false) String telephone,
             @RequestParam(value = "certificateType",required = false) String certificateType,
-            @RequestParam(value = "idNumber",required = false) String idNumber){
+            @RequestParam(value = "siteId", required=false) String siteId,
+            @RequestParam(value = "number",defaultValue = "1") Integer pageNumber){
         System.out.println("verifyCode = " + verifyCode);
-        System.out.println("certificateNum = " + certificateNum);
         System.out.println("username = " + username);
         System.out.println("telephone = " + telephone);
-        System.out.println("idNumber = " + idNumber);
         System.out.println("certificateType = " + certificateType);
+        System.out.println("siteId = " + siteId);
         if(StrUtil.isBlank(verifyCode)|| !ControllerUtil.validate(verifyCode,request)) {
-            return JsonUtil.toMAP(false,"验证码输入错误");
+            System.out.println(" 验证码错误!!!!!!! ");
         }
-        return JsonUtil.toMAP(true,"验证成功");
+
+        ModelAndView modelAndView=new ModelAndView("www/tuiyijunren/list-zslb");
+        Map<String,Object>map=new HashMap<>();
+        map.put("title",username);
+        map.put("telephone", telephone);
+        map.put("siteId", siteId);
+        map.put("categoryId",certificateType);
+        PageInfo<TCmsContent> tCmsContentPageInfo = contentService.certificateQuery(pageNumber, map);
+        TCmsSite site = new TCmsSite();
+        site.setSiteId(Integer.parseInt(siteId));
+        modelAndView.addObject("model",tCmsContentPageInfo);
+        modelAndView.addObject("siteId",siteId);
+        modelAndView.addObject("site",site);
+        modelAndView.addObject("categoryId", certificateType);
+        return modelAndView;
+
+//        return JsonUtil.toMAP(true,"验证成功");
     }
 }

+ 2 - 0
src/main/java/com/sooka/module/web/cms/service/ContentService.java

@@ -64,4 +64,6 @@ public interface  ContentService extends BaseService<TCmsContent,Long> {
     PageInfo<TCmsContent> QueryTitleDescription(int pageNumber,Map<String,Object> map);
 
     PageInfo<TCmsContent> SearchTitleFor(int pageNumber,Map<String,Object> map);
+
+    PageInfo<TCmsContent> certificateQuery(Integer pageNumber, Map<String, Object> map);
 }

+ 13 - 0
src/main/java/com/sooka/module/web/cms/service/impl/ContentServiceImpl.java

@@ -575,4 +575,17 @@ public class ContentServiceImpl implements ContentService {
         return pageInfo;
     }
 
+    @Override
+    public PageInfo<TCmsContent> certificateQuery(Integer pageNumber, Map<String, Object> map) {
+        PageHelper.startPage(pageNumber, 10);
+        TCmsCategory category = categoryService.findById(Long.parseLong(map.get("categoryId").toString()));
+        if(CmsUtil.isNullOrEmpty(category)) {
+            throw new CmsException("栏目["+Long.parseLong(map.get("categoryId").toString())+"]不存在!");
+        }
+        TCmsModel model = modelService.findById(category.getModelId());
+        map.put("tableName", model.getTableName());
+        List<TCmsContent> tCmsContents = contentMapper.certificateQuery(map);
+        PageInfo pageInfo=new PageInfo(tCmsContents);
+        return pageInfo;
+    }
 }

+ 2 - 0
src/main/java/com/sooka/mybatis/mapper/TCmsContentMapper.java

@@ -132,4 +132,6 @@ public interface TCmsContentMapper extends Mapper<TCmsContent> {
 
 
     List<TCmsContent> SearchTitleFor(Map<String,Object> map);
+
+    List<TCmsContent> certificateQuery(Map<String, Object> map);
 }

+ 37 - 0
src/main/resources/com/sooka/mybatis/mapper/TCmsContentMapper.xml

@@ -375,4 +375,41 @@
             order by news.content_id
         ) a
     </select>
+
+    <select id="certificateQuery" parameterType="map" resultType="map">
+        SELECT
+            c.content_id contentId,
+            c.site_id siteId,
+            c.user_id userId,
+            c.category_id categoryId,
+            c.model_id modelId,
+            c.title,
+            c.keywords,
+            c.description,
+            c.top,
+            c.recommend,
+            c.thumb,
+            c.updatedate,
+            c.inputdate,
+            c.STATUS,
+            c.url,
+            c.author,
+            c.view_num viewNum,
+            m.*
+        FROM
+            t_cms_content c
+                INNER JOIN t_cms_category cat ON cat.category_id = c.category_id
+                LEFT JOIN t_cms_content_${tableName} m ON c.content_id = m.content_id
+        WHERE
+            cat.category_id = #{categoryId}
+            and c.site_id=#{siteId}
+            and c.status=1
+            <if test="title != null and title != ''">
+                and c.title = #{title}
+            </if>
+            <if test="telephone != null and telephone != ''">
+                and c.keywords = #{telephone}
+            </if>
+        order by c.content_id desc
+    </select>
 </mapper>

+ 19 - 0
src/main/resources/templates/www/tuiyijunren/content-zslb.html

@@ -0,0 +1,19 @@
+<!--头部开始-->
+@includeFileTemplate("/www/tuiyijunren/include/header.html"){}
+<!--头部结束-->
+<!--中间内容开始-->
+<div class="er_content">
+	<div class="dqwz"><span>当前位置:<a href="${frontPath}/${site.siteId}">网站首页</a>><a href="${frontPath}/${site.siteId}/1244.html">证书认证</a></span></div>
+	<div class="news_txt">
+		<h1>${content.title!}</h1>
+		<h2>联系电话: ${content.keywords!}</h2>
+<!--		<h5><i class="laiy">来源:${content.author!}</i><i class="date">时间:${content.inputdate,dateFormat="yyyy-MM-dd"}</i></h5>-->
+		<p>${content.content}</p>
+	</div>
+</div>
+<!--中间内容结束-->
+<!--底部开始-->
+@includeFileTemplate("/www/tuiyijunren/include/footer.html"){}
+<!--底部结束-->
+</body>
+</html>

+ 82 - 78
src/main/resources/templates/www/tuiyijunren/list-yzgw.html

@@ -3,18 +3,30 @@
 <!--头部结束-->
 <!--中间内容开始-->
 <script>
-    function renderPost(post_str,id) {
+    function renderContent(title,pay,salary_treatment,address,experience_and_education,url,content_tag,id,tag) {
+        if(content_tag === tag){
+            let html = '<div class="yzgw_list_div" aos="fade-up" >';
+            html += '<h1>'+title+'<b>'+pay+'</b></h1>';
+            html += '<h4>';
+            html += renderSalaryTreatment(salary_treatment);
+            html += '</h4>';
+            html += '<p><span class="address">'+address+'</span>'+renderExperienceAndEducation(experience_and_education)+'</p>';
+            html += '<a class="zp_more" href="'+url+'">查看详细</a>';
+            html += '</div>';
+            $("#"+id).append(html);
+        }
+    }
+    function renderSalaryTreatment(salaryTreatment) {
         let html = "";
-        let arr = post_str.split("/");
+        let arr = salaryTreatment.split("/");
         for (let i = 0; i < arr.length; i++) {
             html += "<span>"+arr[i]+"</span>";
         }
-        $("#"+id).html(html);
+        return html;
     }
-    function getList(list,id,reg) {
-        console.log(list)
-        console.log(id)
-        console.log(reg)
+
+    function renderExperienceAndEducation(experienceAndEducation) {
+        return "&nbsp;&nbsp"+experienceAndEducation.replaceAll("/","&nbsp;&nbsp;");
     }
 </script>
 <div class="er_content clearfix">
@@ -38,85 +50,77 @@
             <span>金融</span>
             <span>其他</span>
         </div>
-        <div class="yzgw_list clearfix">
-            <#cms_pagination siteId="${site.siteId}" categoryId="${categoryId}" page="${page}" moreNum="6" var="page">
-            <#cms_content_list siteId="${site.siteId}" categoryId="${categoryId}" orderBy="3" isHot="0" hasChild="0" isRecommend="0" size="4" titleLen="24" var="bean" pageNumber="${page.current}">
-            <div class="yzgw_list_div" aos="fade-up">
-                <h1>${bean.title!}<b>${bean.pay!}</b></h1>
-                <h4 id="${bean.content_id!}">
-                    <script>
-                        renderPost("${bean.salary_treatment!}","${bean.content_id!}");
-                    </script>
-                </h4>
-                <p><span class="address">${bean.address!}</span>&nbsp;&nbsp;${reg.replace(bean.experience_and_education,"/","&nbsp;&nbsp;")}</p>
-                <a class="zp_more" href="${bean.url}">查看详细</a>
-            </div>
-                </#cms_content_list>
-            </#cms_pagination>
+        <div class="yzgw_list clearfix" id="it">
+            <#cms_content_list siteId="${site.siteId}" categoryId="${categoryId}" orderBy="2" isHot="0" hasChild="0" isRecommend="0" size="99" titleLen="24" var="bean">
+                <script>
+                    renderContent("${bean.title!}","${bean.pay!}","${bean.salary_treatment!}","${bean.address!}",
+                    "${bean.experience_and_education!}","${bean.url}","${bean.tag}","it","IT/互联网服务业");
+                </script>
+            </#cms_content_list>
         </div>
-        <div class="yzgw_list clearfix">
-            <div class="yzgw_list_div" aos="fade-up">
-                <h1>动画学院行政1<b>5K-8K</b></h1>
-                <h4><span>五险一金</span><span>周末双休</span><span>年底双薪</span></h4>
-                <p><span class="address">长春-南关</span>&nbsp;&nbsp;3年经验&nbsp;&nbsp;&nbsp;&nbsp;专科毕业</p>
-                <a class="zp_more">查看详细</a>
-            </div>
+        <div class="yzgw_list clearfix" id="qiche">
+            <#cms_content_list siteId="${site.siteId}" categoryId="${categoryId}" orderBy="2" isHot="0" hasChild="0" isRecommend="0" size="99" titleLen="24" var="bean">
+                <script>
+                    renderContent("${bean.title!}","${bean.pay!}","${bean.salary_treatment!}","${bean.address!}",
+                        "${bean.experience_and_education!}","${bean.url}","${bean.tag}","qiche","汽车/制造");
+                </script>
+            </#cms_content_list>
         </div>
-        <div class="yzgw_list clearfix">
-            <div class="yzgw_list_div" aos="fade-up">
-                <h1>动画学院行政2<b>5K-8K</b></h1>
-                <h4><span>五险一金</span><span>周末双休</span><span>年底双薪</span></h4>
-                <p><span class="address">长春-南关</span>&nbsp;&nbsp;3年经验&nbsp;&nbsp;&nbsp;&nbsp;专科毕业</p>
-                <a class="zp_more">查看详细</a>
-            </div>
+        <div class="yzgw_list clearfix" id="lingshou">
+            <#cms_content_list siteId="${site.siteId}" categoryId="${categoryId}" orderBy="2" isHot="0" hasChild="0" isRecommend="0" size="99" titleLen="24" var="bean">
+                <script>
+                    renderContent("${bean.title!}","${bean.pay!}","${bean.salary_treatment!}","${bean.address!}",
+                        "${bean.experience_and_education!}","${bean.url}","${bean.tag}","lingshou","贸易/零售");
+                </script>
+            </#cms_content_list>
         </div>
-        <div class="yzgw_list clearfix">
-            <div class="yzgw_list_div" aos="fade-up">
-                <h1>动画学院行政3<b>5K-8K</b></h1>
-                <h4><span>五险一金</span><span>周末双休</span><span>年底双薪</span></h4>
-                <p><span class="address">长春-南关</span>&nbsp;&nbsp;3年经验&nbsp;&nbsp;&nbsp;&nbsp;专科毕业</p>
-                <a class="zp_more">查看详细</a>
-            </div>
+        <div class="yzgw_list clearfix" id="fangdichan">
+            <#cms_content_list siteId="${site.siteId}" categoryId="${categoryId}" orderBy="2" isHot="0" hasChild="0" isRecommend="0" size="99" titleLen="24" var="bean">
+                <script>
+                    renderContent("${bean.title!}","${bean.pay!}","${bean.salary_treatment!}","${bean.address!}",
+                        "${bean.experience_and_education!}","${bean.url}","${bean.tag}","fangdichan","房地产/建筑");
+                </script>
+            </#cms_content_list>
         </div>
-        <div class="yzgw_list clearfix">
-            <div class="yzgw_list_div" aos="fade-up">
-                <h1>动画学院行政4<b>5K-8K</b></h1>
-                <h4><span>五险一金</span><span>周末双休</span><span>年底双薪</span></h4>
-                <p><span class="address">长春-南关</span>&nbsp;&nbsp;3年经验&nbsp;&nbsp;&nbsp;&nbsp;专科毕业</p>
-                <a class="zp_more">查看详细</a>
-            </div>
+        <div class="yzgw_list clearfix" id="yiliao">
+            <#cms_content_list siteId="${site.siteId}" categoryId="${categoryId}" orderBy="2" isHot="0" hasChild="0" isRecommend="0" size="99" titleLen="24" var="bean">
+                <script>
+                    renderContent("${bean.title!}","${bean.pay!}","${bean.salary_treatment!}","${bean.address!}",
+                        "${bean.experience_and_education!}","${bean.url}","${bean.tag}","yiliao","医疗/化工");
+                </script>
+            </#cms_content_list>
         </div>
-        <div class="yzgw_list clearfix">
-            <div class="yzgw_list_div" aos="fade-up">
-                <h1>动画学院行政5<b>5K-8K</b></h1>
-                <h4><span>五险一金</span><span>周末双休</span><span>年底双薪</span></h4>
-                <p><span class="address">长春-南关</span>&nbsp;&nbsp;3年经验&nbsp;&nbsp;&nbsp;&nbsp;专科毕业</p>
-                <a class="zp_more">查看详细</a>
-            </div>
+        <div class="yzgw_list clearfix" id="xiaofei">
+            <#cms_content_list siteId="${site.siteId}" categoryId="${categoryId}" orderBy="2" isHot="0" hasChild="0" isRecommend="0" size="99" titleLen="24" var="bean">
+                <script>
+                    renderContent("${bean.title!}","${bean.pay!}","${bean.salary_treatment!}","${bean.address!}",
+                        "${bean.experience_and_education!}","${bean.url}","${bean.tag}","xiaofei","消费品");
+                </script>
+            </#cms_content_list>
         </div>
-        <div class="yzgw_list clearfix">
-            <div class="yzgw_list_div" aos="fade-up">
-                <h1>动画学院行政6<b>5K-8K</b></h1>
-                <h4><span>五险一金</span><span>周末双休</span><span>年底双薪</span></h4>
-                <p><span class="address">长春-南关</span>&nbsp;&nbsp;3年经验&nbsp;&nbsp;&nbsp;&nbsp;专科毕业</p>
-                <a class="zp_more">查看详细</a>
-            </div>
+        <div class="yzgw_list clearfix" id="wenhua">
+            <#cms_content_list siteId="${site.siteId}" categoryId="${categoryId}" orderBy="2" isHot="0" hasChild="0" isRecommend="0" size="99" titleLen="24" var="bean">
+                <script>
+                    renderContent("${bean.title!}","${bean.pay!}","${bean.salary_treatment!}","${bean.address!}",
+                        "${bean.experience_and_education!}","${bean.url}","${bean.tag}","wenhua","文化/传媒");
+                </script>
+            </#cms_content_list>
         </div>
-        <div class="yzgw_list clearfix">
-            <div class="yzgw_list_div" aos="fade-up">
-                <h1>动画学院行政7<b>5K-8K</b></h1>
-                <h4><span>五险一金</span><span>周末双休</span><span>年底双薪</span></h4>
-                <p><span class="address">长春-南关</span>&nbsp;&nbsp;3年经验&nbsp;&nbsp;&nbsp;&nbsp;专科毕业</p>
-                <a class="zp_more">查看详细</a>
-            </div>
+        <div class="yzgw_list clearfix" id="jinrong">
+            <#cms_content_list siteId="${site.siteId}" categoryId="${categoryId}" orderBy="2" isHot="0" hasChild="0" isRecommend="0" size="99" titleLen="24" var="bean">
+                <script>
+                    renderContent("${bean.title!}","${bean.pay!}","${bean.salary_treatment!}","${bean.address!}",
+                        "${bean.experience_and_education!}","${bean.url}","${bean.tag}","jinrong","金融");
+                </script>
+            </#cms_content_list>
         </div>
-        <div class="yzgw_list clearfix">
-            <div class="yzgw_list_div" aos="fade-up">
-                <h1>动画学院行政8<b>5K-8K</b></h1>
-                <h4><span>五险一金</span><span>周末双休</span><span>年底双薪</span></h4>
-                <p><span class="address">长春-南关</span>&nbsp;&nbsp;3年经验&nbsp;&nbsp;&nbsp;&nbsp;专科毕业</p>
-                <a class="zp_more">查看详细</a>
-            </div>
+        <div class="yzgw_list clearfix" id="qita">
+            <#cms_content_list siteId="${site.siteId}" categoryId="${categoryId}" orderBy="2" isHot="0" hasChild="0" isRecommend="0" size="99" titleLen="24" var="bean" >
+                <script>
+                    renderContent("${bean.title!}","${bean.pay!}","${bean.salary_treatment!}","${bean.address!}",
+                        "${bean.experience_and_education!}","${bean.url}","${bean.tag}","qita","其他");
+                </script>
+            </#cms_content_list>
         </div>
     </div>
 

+ 46 - 0
src/main/resources/templates/www/tuiyijunren/list-zslb.html

@@ -0,0 +1,46 @@
+<!--头部开始-->
+@includeFileTemplate("/www/tuiyijunren/include/header.html"){}
+<!--头部结束-->
+<!--中间内容开始-->
+<div class="er_content">
+		<div class="news_list">
+			@for(item in model.list){
+<!--			${item}-->
+			<a class="news_list_div clearfix" href="${frontPath}/${siteId}/${item.categoryId}/${item.contentId}.html">
+				<img src="${item.thumb!}" alt="${item.title!}"/>
+				<div class="news_list_text">
+					<h2>${item.title!}</h2>
+					<h2>${item.keywords!}</h2>
+					<span>${item.description!}</span>
+					<p><i class="date">${item.inputdate,dateFormat="yyyy年MM月dd日"}</i><i class="djl">点击量:${item.viewNum!}</i></p>
+				</div>
+			</a>
+
+
+			<!--<a class="hzqy_list_div clearfix" href="${frontPath}/${siteId}/${item.categoryId}/${item.contentId}.html" style="color: #1b1b1b">
+				<div class="news_list_text">
+					<h2>${item.title!}</h2>
+					<h2>${categoryId!}</h2>
+					<span>${item.description!}</span>
+					<p><i class="date">${item.inputdate,dateFormat="yyyy年MM月dd日"}</i><i class="djl">点击量:${item.viewNum!}</i></p>
+				</div>
+			</a>-->
+			@}
+
+		</div>
+		<div class="fenye">
+			@includeFileTemplate("/www/tuiyijunren/include/page.html"){}
+		</div>
+</div>
+<script>
+	$(function () {
+		let id = "${categoryId}";
+		$("#"+id).addClass("on");
+	});
+</script>
+<!--中间内容结束-->
+<!--底部开始-->
+@includeFileTemplate("/www/tuiyijunren/include/footer.html"){}
+<!--底部结束-->
+</body>
+</html>

+ 29 - 79
src/main/resources/templates/www/tuiyijunren/list-zsrz.html

@@ -5,36 +5,27 @@
 <div class="content wid1200">
     <div class="renzhen-form">
         <h1>证书认证</h1>
-<!--        <form action="${ctxPath}/cms/certificate/auth" id="certificate_auth_form" method="post">-->
+        <form action="${ctxPath}/cms/certificate/query" method="post" onsubmit="return validateForm();">
             <ul>
+                <input type="hidden" value="${site.siteId!}" name="siteId">
                 <li>
                     <div><p>姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名</p>:</div>
                     <input id="username" name="username" type="text" class="chang-inp" placeholder="请输入姓名"/>
                 </li>
                 <li>
-                    <div><p>身份证号</p>:</div>
-                    <input id="idNumber" name="idNumber" type="text" class="chang-inp" placeholder="请输入身份证号"/>
+                    <div><p>联系电话</p>:</div>
+                    <input id="telephone" name="telephone" type="text" class="chang-inp" placeholder="请输入联系电话"/>
                 </li>
                 <li>
                     <div><p>证书类别</p>:</div>
                     <select id="certificateType" name="certificateType" class="sel">
                         <option value="0">请选择证书类别</option>
-                        <option value="1">证书类别A</option>
-                        <option value="2">证书类别B</option>
-                        <option value="3">证书类别C</option>
-                        <option value="4">证书类别D</option>
+                        <option value="1248">证书类别A</option>
+                        <option value="1249">证书类别B</option>
+                        <option value="1250">证书类别C</option>
                     </select>
                 </li>
                 <li>
-                    <div><p>证书编号</p>:</div>
-                    <input id="certificateNum" name="certificateNum" type="text" class="chang-inp"
-                           placeholder="请输入证书编号"/>
-                </li>
-                <li>
-                    <div><p>联系电话</p>:</div>
-                    <input name="telephone" type="text" class="chang-inp" placeholder="请输入联系电话"/>
-                </li>
-                <li>
                     <div><p>验&nbsp;&nbsp;证&nbsp;&nbsp;码</p>:</div>
                     <input id="verifyCode" name="verifyCode" type="text" class="yzm-inp" placeholder="请输入验证码"/>
                     <span class="input-group-addon code zsrz-code" id="basic-addon-code">
@@ -44,10 +35,10 @@
                 </li>
                 <li>
                     <div></div>
-                    <button class="cx-but" id="certificate_auth_btn">免费查询</button>
+                    <button type="submit" class="cx-but">免费查询</button>
                 </li>
             </ul>
-<!--        </form>-->
+        </form>
     </div>
 </div>
 <script src="${ctxPath}/static/js/login/login_tooltips.js"></script>
@@ -55,76 +46,35 @@
 <script src="${ctxPath}/static/BJUI/js/jquery.cookie.js"></script>
 <script src="${ctxPath}/static/js/login/jquery.form.js"></script>
 <script>
-    /*$(function () {
-        let id = "${categoryId}";
-        $("#"+id).addClass("on");
-    });*/
 
     function changeCode() {
         $("#captcha_img").attr("src", "${ctxPath}/verify?t=" + (new Date().getTime()));
     }
 
-    $('#certificate_auth_btn').click(function () {
-        // show_loading();
-        $('#username').focus();
-        if ($('#username').val() === '') {
-            show_err_msg('姓名不能为空!');
-            $('#username').focus();
-        } else if ($('#idNumber').val() === '') {
-            show_err_msg('身份证号不能为空!');
-            $('#idNumber').focus();
-        } else if ($('#certificateType').val() === '0' || $('#certificateType').val() === '') {
-            show_err_msg('请选择证件类别!');
-            $('#certificateNum').focus();
-        } else if ($('#certificateNum').val() === '') {
-            show_err_msg('证件号码不能为空!');
+    function validateForm() {
+        // 获取姓名和联系电话的值
+        var username = document.getElementById('username').value;
+        var telephone = document.getElementById('telephone').value;
+        var certificateType = document.getElementById('certificateType').value;
+
+        // 验证姓名和联系电话至少有一个有值
+        if (username.trim() === '' && telephone.trim() === '') {
+            show_err_msg('姓名与联系电话至少填写一个!');
+            return false;
+        }
+        if(certificateType === '0' || certificateType.trim() === ''){
+            show_err_msg('请选择证书类别! ')
             $('#certificateNum').focus();
-        } else if ($('#verifyCode').val() === '') {
+            return false;
+        }
+
+        if ($('#verifyCode').val() === '') {
             show_err_msg('验证码还没填呢!');
             $('#verifyCode').focus();
-        } else {
-            var data = {
-                username: $("#username").val(),
-                idNumber: $("#idNumber").val(),
-                certificateType: $("#certificateType").val(),
-                certificateNum: $("#certificateNum").val(),
-                telephone: $("input[name='telephone']").val(),
-                verifyCode: $("#verifyCode").val()
-            };
-            console.log(data)
-            $.ajax({
-                // 请求的 URL
-                url: "${ctxPath}/cms/certificate/auth",
-                // 请求类型,可以是 GET、POST、PUT、DELETE 等
-                type: "GET",
-                // 发送到服务器的数据,格式为键值对
-                data: data,
-                // 设置请求和响应的格式,常见的有 "json"、"html"、"xml" 等
-                dataType: "json",
-                // 请求成功时的回调函数
-                success: function(response) {
-                    console.log(response);
-                    if(response.success){
-                        show_msg(response.message, '', false)
-                    }else{
-                        show_err_msg(response.message)
-                    }
-                },
-                // 请求失败时的回调函数
-                error: function(xhr, status, error) {
-                    // xhr 是 XMLHttpRequest 对象,status 是请求的状态,error 是错误信息
-                    console.log("请求失败!");
-                    console.log("状态码:" + xhr.status);
-                    console.log("错误信息:" + error);
-                    $("#result").html("请求失败,错误信息:" + error);
-                },
-                // 请求完成后回调函数(请求成功或失败时均调用)
-                complete: function() {
-                    console.log("请求完成!");
-                }
-            });
+            return false;
         }
-    });
+        return true;
+    }
 </script>
 <style>
     .zsrz-code {