Bladeren bron

样式更改

lixing 2 jaren geleden
bovenliggende
commit
54f7645306

+ 2 - 2
spring-cloud/server-page/src/main/resources/static/jsc/js/test.js

@@ -1,7 +1,7 @@
 // const GATEWAY_URL = "http://23.37.100.87:8084"; //连业务网的IP
 // const GATEWAY_URL = "http://23.37.100.80:8084"; //放到服务器上的IP
 // 暴露的端口号
-const GATEWAY_URL = "http://192.168.0.95:8084";
+const GATEWAY_URL = "http://192.168.0.100:8084";
 const PAGE_BASIC = GATEWAY_URL + "/basic";
 
 
@@ -59,7 +59,7 @@ $(function() {
     // 初始化DOM
     initLeftCenter(); //左中
     initLeftBottom(); //左下
-    initRightCenter(); //右
+    initRightCenter(); //右                                                                                                                                                                                                                                        
 
 
 

+ 13 - 13
spring-cloud/server-page/src/main/resources/static/lbzd/js/index.js

@@ -1,14 +1,14 @@
-// 顶部tab点击
-$(".tab-list").on("click",".tab-item",function(){
-	// 判断点击的当前元素是否选中
-	if(!$(this).hasClass("tab-item-act")){
-		// 删除其他兄弟元素的选中
-		$(this).siblings(".tab-item").removeClass("tab-item-act")
-		// 获取标识属性
-		var iden = $(this).attr("data-iden")
-		// 切换内容页面
-		$("#sec-ifr").attr("src",iden+".html")
-		// 添加选中类
-		$(this).addClass("tab-item-act")
-	}
+// 顶部tab点击事件委派
+$(".tab-list").on("click", ".tab-item", function() {
+    // 判断点击的当前元素是否选中
+    if (!$(this).hasClass("tab-item-act")) {
+        // 删除其他兄弟元素的选中
+        $(this).siblings(".tab-item").removeClass("tab-item-act")
+            // 自定义属性标识
+        var iden = $(this).attr("data-iden")
+            // 切换内容页面
+        $("#sec-ifr").attr("src", iden + ".html")
+            // 添加选中类
+        $(this).addClass("tab-item-act")
+    }
 })

+ 3 - 3
spring-cloud/server-page/src/main/resources/static/lbzd/js/indexb.js

@@ -1,5 +1,5 @@
 // 缓存保存状态
-const sesIden = sessionStorage.getItem("iden") || "yg"
+const sesIden = sessionStorage.getItem("iden")
     // 内容的显示隐藏
 $("." + sesIden + "-box").siblings("div").css("display", "none")
 if (sesIden == "jp" || sesIden == "dt") {
@@ -7,13 +7,13 @@ if (sesIden == "jp" || sesIden == "dt") {
 } else {
     $("." + sesIden + "-box").css("display", "block")
 }
-// 内容tab的选中控制
+// // 内容tab的选中控制
 for (var i = 0; i < $(".index-item").length; i++) {
     // 获取标识属性
     var idenItem = $($(".index-item")[i]).attr("data-iden")
         // 删除选中
     $($(".index-item")[i]).removeClass("index-item-act")
-        // 判断标识值与缓存值是否相等
+        // 判断标识值与缓存值是否相等相等就显现出来
     if (idenItem == sesIden) {
         $($(".index-item")[i]).addClass("index-item-act")
     }

+ 13 - 4
spring-cloud/server-page/src/main/resources/static/mh2/js/init.js

@@ -1,18 +1,22 @@
 // const GATEWAY_URL = "http://23.37.100.87:8084";
 // const GATEWAY_URL = "http://23.37.100.80:8084";
-const GATEWAY_URL = "http://192.168.0.95:8084"
+const GATEWAY_URL = "http://192.168.0.100:8084"
 const PAGE_BASIC = GATEWAY_URL + "/basic";
 let sceneThemes;
 $(function() {
     let datas = get(PAGE_BASIC + '/apiNoProcess/scence/getAllSceneAndThemeAndSystem');
     console.log(datas);
+    // 场景主题
     const scenes = datas.scenes;
     sceneThemes = datas.sceneThemes;
     initSences(scenes);
     initThemes(sceneThemes);
     initAncment(); //初始化通知公告
-    let back = 0;
 
+
+
+    // 下面的轮播图
+    let back = 0;
     $("#btn_back").click(function() {
         if (back < ($(".item-box>.item").length - 7)) {
             back++;
@@ -101,9 +105,11 @@ $(function() {
 
 });
 // <img src="${PAGE_BASIC + item.sceneImgPath}" alt=""><p>${item.voice}</p>
+// 初始化场景
 function initSences(scenes) {
     let str = '';
     scenes.forEach(item => {
+        // 图片路径
         str += `<div class="item" data-id='${item.id}' style="background-image: url(${PAGE_BASIC + item.sceneImgPath});">
 							<div class="content">
 								<div class="card-info">
@@ -115,7 +121,7 @@ function initSences(scenes) {
     $('.cards-box').empty().append(str);
 
 }
-
+// 初始化主题
 function initThemes(themes) {
     let str = '';
     themes.forEach(item => {
@@ -177,7 +183,7 @@ function clickAncmentList(id) {
     $(".notice").append(html);
 }
 
-// 请求函数
+// 请求函数封装
 function get(url, data, success, error) {
     return request(url, 'GET', data, success, error)
 }
@@ -188,6 +194,7 @@ function post(url, data, success, error) {
 
 function request(url, type, data, success, error) {
     var datas = null;
+    // 这里有个异步操作 代码是从上到下执行执行
     $.ajax({
         type: type,
         async: false,
@@ -200,6 +207,8 @@ function request(url, type, data, success, error) {
                     success(json.data);
                 }
                 datas = json.data;
+                console.log(datas);
+                // 终止运行
                 return;
             }
             if (error) {