瀏覽代碼

Merge branch 'nacyy' of http://116.63.33.55/git/nazw into nacyy

# Conflicts:
#	nngkxxdp/src/main/resources/static/naxsb/znxz.html
tml 6 月之前
父節點
當前提交
3e2b24478c

+ 57 - 0
nngkxxdp/src/main/java/com/example/nngkxxdp/controller/QjingtController.java

@@ -0,0 +1,57 @@
+package com.example.nngkxxdp.controller;
+
+import com.example.nngkxxdp.util.BaseResult;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.time.DayOfWeek;
+import java.time.LocalDate;
+import java.time.LocalTime;
+import java.util.ArrayList;
+import java.util.Random;
+
+@RestController
+@RequestMapping("/qjt")
+public class QjingtController {
+
+    @GetMapping
+    public BaseResult isWeekend() {
+        ArrayList<Object> num = new ArrayList<>();
+        LocalDate today = LocalDate.now();
+        LocalTime now = LocalTime.now();
+        boolean isWorkday = isTodayWorkday(today, now);
+
+        // 根据是否是工作日来生成输出
+        if (isWorkday) {
+            num = generateRandomNumbers(10);
+            return BaseResult.ok(num);
+        } else if (isSaturdayBeforeNoon(now)) {
+            num = generateRandomNumbers(6);
+            return BaseResult.ok(num);
+        } else {
+            num.add(0);
+            num.add(0);
+            return BaseResult.ok(num);
+        }
+    }
+
+    private boolean isTodayWorkday(LocalDate date, LocalTime time) {
+        DayOfWeek dayOfWeek = date.getDayOfWeek();
+        return !(dayOfWeek == DayOfWeek.SATURDAY || dayOfWeek == DayOfWeek.SUNDAY);
+    }
+
+    private boolean isSaturdayBeforeNoon(LocalTime time) {
+        return time.isBefore(LocalTime.of(12, 0));
+    }
+
+    private ArrayList<Object> generateRandomNumbers(int upperBound) {
+        ArrayList<Object> num = new ArrayList<>();
+        Random random = new Random();
+        int num1 = random.nextInt(upperBound); // 生成0到upperBound-1之间的随机数
+        int num2 = random.nextInt(upperBound); // 再次生成0到upperBound-1之间的随机数
+        num.add(num1);
+        num.add(num2);
+        return num;
+    }
+}

+ 2 - 2
nngkxxdp/src/main/resources/mapper/SellBuildDao.xml

@@ -38,7 +38,7 @@
            <result property="complement" column="complement" jdbcType="VARCHAR"/>
          <association property="parkData" javaType="com.example.nngkxxdp.entity.ParkData">
             <result column="title" property="title"/>
-            <result column="id" property="id"/>
+            <result column="parkId" property="id"/>
              <result column="industry" property="industry"/>
             <result column="parkAddr" property="addr"/>
            </association>
@@ -84,7 +84,7 @@
         left join t_park_data pd on pd.id=sb.belong
     </select>
     <select id="findById" resultType="com.example.nngkxxdp.entity.SellBuild" resultMap="BaseResultMap">
-        select sb.*, sb.addr as landAddr,pd.title,pd.industry, pd.addr as parkAddr
+        select sb.*, sb.addr as landAddr,pd.title,pd.industry, pd.addr as parkAddr, pd.id as parkId
         from t_sell_build  sb
         left join t_park_data pd on pd.id=sb.belong
         where sb.id =#{id}

+ 10 - 10
nngkxxdp/src/main/resources/static/naxsb/tdcr.html

@@ -292,7 +292,7 @@
         $(".footer").load('footer/footer.html');
     });
 </script>
-<script src="swiper/swiper-bundle.js"></script>
+<script src="https://www.cqna.gov.cn/syygapi/naxsb/swiper/swiper-bundle.js"></script>
 <script>
     new Vue({
         el: '#tdcr',
@@ -301,7 +301,7 @@
                 reqPtah: '',
                 tdcrDetail: {},
                 imgUrl: '',
-                backgroundImage: 'images/indexsyyg.png',
+                backgroundImage: 'https://www.cqna.gov.cn/syygapi/naxsb/images/indexsyyg.png',
                 swiperList: []
             }
         },
@@ -323,19 +323,19 @@
                 });
             })
             if (id == 4) {
-                this.backgroundImage = 'image/npxqcyy.jpg';
+                this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/npxqcyy.jpg';
             } else if (id == 6) {
-                this.backgroundImage = 'image/dxkjy.jpg';
+                this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/dxkjy.jpg';
             } else if (id == 5) {
-                this.backgroundImage = 'image/ylcxg.jpg';
+                this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/ylcxg.jpg';
             } else if (id == 1) {
-                this.backgroundImage = 'image/cycyy.jpg';
+                this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/cycyy.jpg';
             } else if (id == 2) {
-                this.backgroundImage = 'image/xjqcdzcyy.jpg';
+                this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/xjqcdzcyy.jpg';
             } else if (id == 3) {
-                this.backgroundImage = 'image/cjlscxcyy.jpg';
+                this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/cjlscxcyy.jpg';
             } else {
-                this.backgroundImage = 'image/tdcy.webp';
+                this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/tdcy.webp';
             }
         },
         methods: {
@@ -343,7 +343,7 @@
                 window.history.go(-1)
             },
             imgDetail(imgurl) {
-                if (imgurl == "images/tdcr0.png") {
+                if (imgurl == "https://www.cqna.gov.cn/syygapi/naxsb/images/tdcr0.png") {
                     return
                 }
                 this.imgUrl = imgurl;

+ 16 - 16
nngkxxdp/src/main/resources/static/naxsb/tdcrlist.html

@@ -313,7 +313,7 @@
                 pointList: [],
                 currentPq: -1,
                 inputValue: '',
-                backgroundImage: 'image/cycyy.jpg',
+                backgroundImage: 'https://www.cqna.gov.cn/syygapi/naxsb/image/cycyy.jpg',
                 pqList: [
                 ],
             }
@@ -326,44 +326,44 @@
             this.getParkData();
             this.getSellLand(id);
             if (id == 4) {
-                this.backgroundImage = 'image/npxqcyy.jpg';
+                this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/npxqcyy.jpg';
             } else if (id == 6) {
-                this.backgroundImage = 'image/dxkjy.jpg';
+                this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/dxkjy.jpg';
             } else if (id == 5) {
-                this.backgroundImage = 'image/ylcxg.jpg';
+                this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/ylcxg.jpg';
             } else if (id == 1) {
-                this.backgroundImage = 'image/cycyy.jpg';
+                this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/cycyy.jpg';
             } else if (id == 2) {
-                this.backgroundImage = 'image/xjqcdzcyy.jpg';
+                this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/xjqcdzcyy.jpg';
             } else if (id == 3) {
-                this.backgroundImage = 'image/cjlscxcyy.jpg';
+                this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/cjlscxcyy.jpg';
             } else {
-                this.backgroundImage = 'image/tdcy.webp';
+                this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/tdcy.webp';
             }
         },
         methods: {
             goDeteil(id) {
                 if (id) {
-                    window.location.href = "ztcrdetail.html?ztid=" + id;
+                    window.location.href = "https://www.cqna.gov.cn/syygapi/naxsb/ztcrdetail.html?ztid=" + id;
                 }
             },
             handleParkChange(data) {
                 this.currentPq = data.id;
                 var id = data.id;
                 if (id == 4) {
-                    this.backgroundImage = 'image/npxqcyy.jpg';
+                    this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/npxqcyy.jpg';
                 } else if (id == 6) {
-                    this.backgroundImage = 'image/dxkjy.jpg';
+                    this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/dxkjy.jpg';
                 } else if (id == 5) {
-                    this.backgroundImage = 'image/ylcxg.jpg';
+                    this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/ylcxg.jpg';
                 } else if (id == 1) {
-                    this.backgroundImage = 'image/cycyy.jpg';
+                    this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/cycyy.jpg';
                 } else if (id == 2) {
-                    this.backgroundImage = 'image/xjqcdzcyy.jpg';
+                    this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/xjqcdzcyy.jpg';
                 } else if (id == 3) {
-                    this.backgroundImage = 'image/cjlscxcyy.jpg';
+                    this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/cjlscxcyy.jpg';
                 } else {
-                    this.backgroundImage = 'image/tdcy.webp';
+                    this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/tdcy.webp';
                 }
                 this.inputValue = '';
                 this.getParkDetail();

+ 17 - 4
nngkxxdp/src/main/resources/static/naxsb/znxz.html

@@ -293,7 +293,7 @@
                 contentList: [
                 ],
                 pointList: [],
-                backgroundImage: 'image/ztcy.webp'
+                backgroundImage: 'https://www.cqna.gov.cn/syygapi/naxsb/image/ztcy.webp'
             }
         },
         methods: {
@@ -315,7 +315,7 @@
             },
             goDeteil(id) {
                 if (id) {
-                    window.location.href = "ztcrdetail.html?ztid=" + id;
+                    window.location.href = "https://www.cqna.gov.cn/syygapi/naxsb/ztcrdetail.html?ztid=" + id;
                 }
             },
             getListData(json) {
@@ -364,7 +364,7 @@
             newchoice() {
                 sessionStorage.setItem('znxztabs', JSON.stringify({}));
                 sessionStorage.setItem('znxz', '');
-                window.location.href = 'znxzchoice.html'
+                window.location.href = 'https://www.cqna.gov.cn/syygapi/naxsb/znxzchoice.html'
             },
             loadMap(currentPoint) {
                 let that = this;
@@ -421,7 +421,7 @@
                         that.parkMap.addOverlay(marker);
                         marker.addEventListener('click', function () {
                             var id = d.id;
-                            window.location.href = 'ztcrdetail.html?ztid=' + id;
+                            window.location.href = 'https://www.cqna.gov.cn/syygapi/naxsb/ztcrdetail.html?ztid=' + id;
                         });
                     });
                 });
@@ -442,6 +442,19 @@
             if (znxztabs) {
                 this.tjdzList = znxztabs.split(',');
             }
+            if (id == 4) {
+                this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/ztnp.webp';
+            } else if (id == 6) {
+                this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/ztdx.webp';
+            } else if (id == 5) {
+                this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/ztyl.webp';
+            } else if (id == 3) {
+                this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/ztcjcx.webp';
+            } else if (id == 2) {
+                this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/ztxj.webp';
+            } else {
+                this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/ztcy.webp';
+            }
         }
     })
 </script>

+ 2 - 2
nngkxxdp/src/main/resources/static/naxsb/znxzchoice.html

@@ -308,7 +308,7 @@
                     const znxzString = JSON.stringify(znxz);
                     sessionStorage.setItem('znxztabs', selectTabs);
                     sessionStorage.setItem('znxz', znxzString);
-                    window.location.href = "znxz.html"
+                    window.location.href = "https://www.cqna.gov.cn/syygapi/naxsb/znxz.html"
                 } else {
                     var znxz = {
                         "productModule": this.currfwhy,
@@ -451,7 +451,7 @@
         }
     })
 </script>
-<script type="text/javascript" src="js/rightmap.js"></script>
+<script type="text/javascript" src="https://www.cqna.gov.cn/syygapi/naxsb/js/rightmap.js"></script>
 
 <script>
     var that = this;

+ 12 - 12
nngkxxdp/src/main/resources/static/naxsb/ztcrdetail.html

@@ -284,11 +284,11 @@
         * 导航栏
         * footer CopyRight
         */
-        $(".header").load('top/top_style.html');
-        $(".footer").load('footer/footer.html');
+        $(".header").load('https://www.cqna.gov.cn/syygapi/naxsb/top/top_style.html');
+        $(".footer").load('https://www.cqna.gov.cn/syygapi/naxsb/footer/footer.html');
     });
 </script>
-<script src="swiper/swiper-bundle.js"></script>
+<script src="https://www.cqna.gov.cn/syygapi/naxsb/swiper/swiper-bundle.js"></script>
 <script>
 
 </script>
@@ -299,7 +299,7 @@
             return {
                 reqPtah: '',
                 ztcrDetail: {},
-                imgUrl: 'images/slide1.png',
+                imgUrl: 'https://www.cqna.gov.cn/syygapi/naxsb/images/slide1.png',
                 swiperList: [],
                 backgroundImage: '',
                 znptList: '学校,轻轨,公交车站'
@@ -328,7 +328,7 @@
                 window.history.go(-1)
             },
             imgDetail(imgurl) {
-                if (imgurl == "images/tdcr0.png") {
+                if (imgurl == "https://www.cqna.gov.cn/syygapi/naxsb/images/tdcr0.png") {
                     return
                 }
                 this.imgUrl = imgurl;
@@ -345,19 +345,19 @@
                         that.ztcrDetail = mdata;
                         var yqid = mdata.parkData.id;
                         if (yqid == 4) {
-                            that.backgroundImage = 'image/npxq.webp';
+                            that.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/npxq.webp';
                         } else if (yqid == 6) {
-                            that.backgroundImage = 'image/dxkjy.webp';
+                            that.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/dxkjy.webp';
                         } else if (yqid == 5) {
-                            that.backgroundImage = 'image/ylcxg.png';
+                            that.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/ylcxg.png';
                         } else if (yqid == 3) {
-                            that.backgroundImage = 'image/cjls.webp';
+                            that.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/cjls.webp';
                         } else if (yqid == 2) {
-                            that.backgroundImage = 'image/xjcy.webp';
+                            that.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/xjcy.webp';
                         } else if (yqid == 1) {
-                            that.backgroundImage = 'image/cygyy.webp';
+                            that.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/cygyy.webp';
                         } else {
-                            that.backgroundImage = 'image/cygyy.webp';
+                            that.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/cygyy.webp';
                         }
                         that.swiperList = mdata.imgUrl ? mdata.imgUrl.split(",") : [];
                         if (!that.swiperList.length) {

+ 15 - 15
nngkxxdp/src/main/resources/static/naxsb/ztcrlist.html

@@ -341,7 +341,7 @@
                     }
                 ],
                 contentList: [],
-                backgroundImage: 'images/indexsyyg.png',
+                backgroundImage: 'https://www.cqna.gov.cn/syygapi/naxsb/images/indexsyyg.png',
             }
         },
         mounted() {
@@ -352,19 +352,19 @@
             this.getParkDetail();
             this.getSellBuild();
             if (id == 4) {
-                this.backgroundImage = 'image/npxq.webp';
+                this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/npxq.webp';
             } else if (id == 6) {
-                this.backgroundImage = 'image/dxkjy.webp';
+                this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/dxkjy.webp';
             } else if (id == 5) {
-                this.backgroundImage = 'image/ylcxg.png';
+                this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/ylcxg.png';
             } else if (id == 3) {
-                this.backgroundImage = 'image/cjls.webp';
+                this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/cjls.webp';
             } else if (id == 2) {
-                this.backgroundImage = 'image/xjcy.webp';
+                this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/xjcy.webp';
             } else if (id == 1) {
-                this.backgroundImage = 'image/cygyy.webp';
+                this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/cygyy.webp';
             } else {
-                this.backgroundImage = 'image/cygyy.webp';
+                this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/cygyy.webp';
             }
         },
         methods: {
@@ -375,19 +375,19 @@
                 this.currentPq = data.id;
                 var id = data.id;
                 if (id == 4) {
-                    this.backgroundImage = 'image/npxq.webp';
+                    this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/npxq.webp';
                 } else if (id == 6) {
-                    this.backgroundImage = 'image/dxkjy.webp';
+                    this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/dxkjy.webp';
                 } else if (id == 5) {
-                    this.backgroundImage = 'image/ylcxg.png';
+                    this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/ylcxg.png';
                 } else if (id == 3) {
-                    this.backgroundImage = 'image/cjls.webp';
+                    this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/cjls.webp';
                 } else if (id == 2) {
-                    this.backgroundImage = 'image/xjcy.webp';
+                    this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/xjcy.webp';
                 } else if (id == 1) {
-                    this.backgroundImage = 'image/cygyy.webp';
+                    this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/cygyy.webp';
                 } else {
-                    this.backgroundImage = 'image/cygyy.webp';
+                    this.backgroundImage = 'https://www.cqna.gov.cn/syygapi/naxsb/image/cygyy.webp';
                 }
                 this.getSellBuild();
                 this.getParkDetail();