Преглед изворни кода

Merge branch 'master' of http://116.63.33.55/git/nazw

# Conflicts:
#	nngkxxdp/src/main/resources/static/school/js/schoolDetail.js
#	nngkxxdp/src/main/resources/static/school/schoolDetail.html
elis пре 2 година
родитељ
комит
dae70dc625

+ 2 - 2
nngkxxdp/src/main/java/com/example/nngkxxdp/entity/NazwSchoolDO.java

@@ -54,12 +54,12 @@ public class NazwSchoolDO implements Serializable {
     /**
      * 餐食情况【0:堂食】
      */
-    private Integer canteenType;
+    private String canteenType;
 
     /**
      * 招生方式【0:统一招生 、1:自主招生】
      */
-    private Integer recruitType;
+    private String recruitType;
 
     /**
      * 上级主管部门

+ 2 - 2
nngkxxdp/src/main/java/com/example/nngkxxdp/entity/NazwSchoolVO.java

@@ -54,12 +54,12 @@ public class NazwSchoolVO implements Serializable {
     /**
      * 餐食情况【0:堂食】
      */
-    private Integer canteenType;
+    private String canteenType;
 
     /**
      * 招生方式【0:统一招生 、1:自主招生】
      */
-    private Integer recruitType;
+    private String recruitType;
 
     /**
      * 上级主管部门

+ 6 - 6
nngkxxdp/src/main/resources/mapper/NazwSchoolDao.xml

@@ -11,8 +11,8 @@
         <result property="postal" column="postal" jdbcType="INTEGER"/>
         <result property="natureType" column="nature_type" jdbcType="INTEGER"/>
         <result property="schoolType" column="school_type" jdbcType="INTEGER"/>
-        <result property="canteenType" column="canteen_type" jdbcType="INTEGER"/>
-        <result property="recruitType" column="recruit_type" jdbcType="INTEGER"/>
+        <result property="canteenType" column="canteen_type" jdbcType="VARCHAR"/>
+        <result property="recruitType" column="recruit_type" jdbcType="VARCHAR"/>
         <result property="competentDepartment" column="competent_department" jdbcType="VARCHAR"/>
         <result property="superviseTel" column="supervise_tel" jdbcType="VARCHAR"/>
         <result property="contactTel" column="contact_tel" jdbcType="VARCHAR"/>
@@ -44,8 +44,8 @@
         <result property="postal" column="postal" jdbcType="INTEGER"/>
         <result property="natureType" column="nature_type" jdbcType="INTEGER"/>
         <result property="schoolType" column="school_type" jdbcType="INTEGER"/>
-        <result property="canteenType" column="canteen_type" jdbcType="INTEGER"/>
-        <result property="recruitType" column="recruit_type" jdbcType="INTEGER"/>
+        <result property="canteenType" column="canteen_type" jdbcType="VARCHAR"/>
+        <result property="recruitType" column="recruit_type" jdbcType="VARCHAR"/>
         <result property="competentDepartment" column="competent_department" jdbcType="VARCHAR"/>
         <result property="superviseTel" column="supervise_tel" jdbcType="VARCHAR"/>
         <result property="contactTel" column="contact_tel" jdbcType="VARCHAR"/>
@@ -173,10 +173,10 @@
             <if test="schoolType != null">
                 school_type = #{schoolType},
             </if>
-            <if test="canteenType != null">
+            <if test="canteenType != null and canteenType !=''">
                 canteen_type = #{canteenType},
             </if>
-            <if test="recruitType != null">
+            <if test="recruitType != null and recruitType !=''">
                 recruit_type = #{recruitType},
             </if>
             <if test="competentDepartment != null">

+ 14 - 14
nngkxxdp/src/main/resources/static/school/js/schoolDetail.js

@@ -37,7 +37,7 @@ function initHead(data){
 	let tup = data.schoolImg==""?"images/school.png":data.schoolImg
 	$(".logo-img").attr("src",tup)
 
-	$(".name").css("background-image","url("+getSchoolTypeImg(data.schoolType)+") ")
+	$(".name").css("background-image","url("+getSchoolTypeImg(data.schoolType)+")")
 	console.log(getSchoolType(data.schoolType))
 	document.getElementById('schoolType').innerText = getSchoolType(data.schoolType)
 	// $(".name").attr("src",tup)
@@ -56,23 +56,23 @@ function initHead(data){
 	let html = '<div class="title" id="name">' + data.name + '</div>' +
 		'<div class="other">' +
 			'<ul>' +
-				'<li id="district">所在位置:'+data.address+'</li>' +
-				'<li id="natureOfTheSchool">学校性质'+natureType+'</li>' +
-				'<li>餐食情况'+canteenType+'</li>' +
-				'<li>上级主管部门'+competentDepartment+'</li>' +
+				'<li id="district">所在区:'+data.address+'</li>' +
+				'<li id="natureOfTheSchool">学校性质:'+natureType+'</li>' +
+				'<li>餐食情况:'+canteenType+'</li>' +
+				'<li>上级主管部门:'+competentDepartment+'</li>' +
 			'</ul>' +
 			'<ul>' +
-				'<li id="postcode">邮编'+postal+'</li>' +
-				'<li id="schoolClasses">学校类别'+schoolType+'</li>' +
-				'<li>招生方式'+recruitType+'</li>' +
-				'<li>监督电话'+superviseTel+'</li>' +
+				'<li id="postcode">邮编:'+postal+'</li>' +
+				'<li id="schoolClasses">学校类别:'+schoolType+'</li>' +
+				'<li>招生方式:'+recruitType+'</li>' +
+				'<li>监督电话:'+superviseTel+'</li>' +
 			'</ul>' +
 		'</div>' +
 		'<ul class="bottom">' +
-			'<li><img src="images/logo-dh.png" alt="" style="margin-top:10px;float: left; margin-right: 15px;"><span> 电话:'+data.contactTel+'</span></li>' +
-			'<li><img src="images/logo-dt.png" alt="" style="margin-top:10px;float: left; margin-right: 15px;"><span > 地址:'+data.address+'</span></li>' +
-			"<li style='cursor:pointer;' onclick='clickQRCode()'><img src='images/logo-wx.png' alt='' style='margin-top:10px;float: left;'><span>微信:点击查看二维码</span><div id='ewmImg' style='position: absolute;z-index: 99999;background: #f6f6f6;border-radius: 5px;height: 150px;width: 150px;padding: 8px;display: none;'><img style='height: 150px;width: 150px;' src='" + wechatImg + "' alt=''></div></li>" +
-			'<li><img src="images/logo-gw.png" alt="" style="margin-top:10px;float: left;"><span onclick="gotos(\''+website+'\')"> 官网:'+website+'</span></li>' +
+			'<li><img src="images/logo-dh.png" alt="" style="margin-right: 15px;"><span>电话:</span><span class="link">'+data.contactTel+'</span></li>' +
+			'<li><img src="images/logo-dt.png" alt="" style="margin-right: 15px;"><span>地址:</span><span class="link" title="'+data.address+'">'+data.address+'</span></li>' +
+			"<li style='cursor:pointer;' onclick='clickQRCode()'><img src='images/logo-wx.png' alt=''><span>微信:点击查看二维码</span><div id='ewmImg' style='position: absolute;z-index: 99999;background: #f6f6f6;border-radius: 5px;height: 150px;width: 150px;padding: 8px;display: none;'><img style='height: 150px;width: 150px;' src='" + wechatImg + "' alt=''></div></li>" +
+			'<li><img src="images/logo-gw.png" alt=""><span>官网:</span><span class="link" onclick="gotos(\''+website+'\')">'+website+'</span></li>' +
 		'</ul>'
 	document.getElementById('infoHead').innerHTML =html
 
@@ -80,7 +80,7 @@ function initHead(data){
 function gotos(src){
 
 	// console.log(src)
-	window.location.href=src;
+	window.open(src);
 }
 let p =[]
 function initbody(data){

+ 3 - 1
nngkxxdp/src/main/resources/static/school/schoolDetail.html

@@ -107,7 +107,9 @@
             line-height: 30px;
             color: #666666;
             float: left;
-            margin-top: 15px;
+            margin-top: 10px;
+            display: flex;
+            align-items: center;
         }
         .schoolList .message .bottom li:nth-child(2n){
             margin-left: 40px;