hotelDetail.html 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. {% load staticfiles %}
  2. <!DOCTYPE html>
  3. <html lang="en">
  4. <head>
  5. <meta charset="UTF-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  8. <title>民宿详情页</title>
  9. <link rel="stylesheet" href="{% static '/lib/font/fontIcon/iconfont.css' %}">
  10. <link rel="stylesheet" href="{% static '/lib/layui/css/layui.css' %}">
  11. <link rel="stylesheet" href="https://a.amap.com/jsapi_demos/static/demo-center/css/demo-center.css" />
  12. <link rel="stylesheet" href="{% static '/lib/css/reset.css' %}">
  13. <link rel="stylesheet" href="{% static '/lib/css/swiper.min.css' %}">
  14. <link rel="stylesheet" href="{% static '/css/common.css' %}">
  15. <link rel="stylesheet" href="{% static '/css/module.css' %}">
  16. <link rel="stylesheet" href="{% static '/css/hotelDetail.css' %}">
  17. </head>
  18. <body>
  19. <div class="header">
  20. <div class="headerTxt">
  21. <div class="wrapper">
  22. <p class="logoNameCn">休闲农业旅游网</p>
  23. <p class="logoNameEn">Leisure agricultural tourism network</p>
  24. </div>
  25. </div>
  26. <!-- 广告 -->
  27. <div class="bjColor advImg"></div>
  28. </div>
  29. <!-- 主体部分 -->
  30. <div class="content">
  31. <div class="wrapper">
  32. <div class="newsDiv">
  33. <!-- 面包屑导航 -->
  34. <div class="breadcrumb">
  35. <span class="layui-breadcrumb">
  36. <a href="home">首页</a>
  37. <a href="dorm_list?page=1">民宿导览</a>
  38. <a>
  39. <cite>详情</cite>
  40. </a>
  41. </span>
  42. </div>
  43. <!-- 新闻列表 -->
  44. <div class="innerDiv">
  45. <div class="detailTop">
  46. <div class="floatDiv">
  47. <div class="swiperDiv">
  48. <!-- 图片集 -->
  49. <div class="swiper-container photos">
  50. <div class="swiper-wrapper">
  51. {% if photos|length %} {% for photosItem in photos %}
  52. <div class="swiper-slide">
  53. <img src="{{photosItem.addr}}" alt="">
  54. </div>
  55. {% endfor %} {% else %}
  56. <div class="swiper-slide">
  57. <img src="{% static '/imgs/dorm/dorm2.jpg' %}" alt="">
  58. </div>
  59. {% endif %}
  60. </div>
  61. <div class="swiper-button-next"></div>
  62. <div class="swiper-button-prev"></div>
  63. </div>
  64. </div>
  65. <div class="magnifyDiv">
  66. {% if photos|length %} {% for photosItem in photos %}
  67. {% if forloop.first %}
  68. <img src="{{photosItem.addr}}" alt="">
  69. {% endif %}
  70. {% endfor %} {% else %}
  71. {% endif %}
  72. </div>
  73. <div class="introduce">
  74. <h2>{{hotel.name}}</h2>
  75. <div class="txtColor price">¥<strong>{{hotel.price}}</strong>起</div>
  76. <p>法人代表:{{hotel.person}}</p>
  77. <p>联系电话:{{hotel.hotel_tel}}</p>
  78. <p>酒店地址:{{hotel.addr}}</p>
  79. </div>
  80. </div>
  81. </div>
  82. <div class="detailBottom">
  83. <div class="cutTitle">基本介绍</div>
  84. <div>{{hotel.intro}}</div>
  85. <div></div>
  86. <div class="cutTitle">详细说明</div>
  87. <div id="map" class="currMap"></div>
  88. <input type="hidden" value="{{hotel.location}}" id="location">
  89. <div class="txtDescription">
  90. {{hotel.name|safe}}
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. </div>
  97. <!-- 底部版权 -->
  98. <div class="footer bjColor">
  99. <div class="wrapper">
  100. <div class="floatDiv">
  101. <div class="copyrightTxt">
  102. <div>休闲农业旅游网</div>
  103. <div>联系人:李四  联系电话:13811111111</div>
  104. <div>地址:河南省郑州市XXXXXXXXXXXXXXXXXXXXXXXXXX</div>
  105. </div>
  106. <div class="WeChatCode">
  107. <img src="{% static '/imgs/WeChatCode.jpg' %}" alt="">
  108. <p>关注公众号</p>
  109. </div>
  110. </div>
  111. <div class="copyright">
  112. 版权所有XXXXXXXXXXXXXXXXXXXXXX
  113. </div>
  114. </div>
  115. </div>
  116. <script src="{% static '/lib/js/jquery-2.1.4.min.js'%}"></script>
  117. <script src="{% static '/lib/layui/layui.js'%}"></script>
  118. <script src="{% static '/lib/js/swiper.min.js'%}"></script>
  119. <script src="https://webapi.amap.com/maps?v=1.4.15&key=3939967b919a8003377dd113fc445a3d&plugin=AMap.Geocoder"></script>
  120. <script src="{% static '/js/newsList.js'%}"></script>
  121. <script src="{% static '/js/hotelDetail.js'%}"></script>
  122. <script>
  123. var map = new AMap.Map('map', {
  124. resizeEnable: true, //是否监控地图容器尺寸变化
  125. zoom: 5, //初始化地图层级
  126. center: [113.397428, 39.90923] //初始化地图中心点
  127. });
  128. // 创建点覆盖物
  129. var lng = $('#location').val().split(',');
  130. var marker = new AMap.Marker({
  131. position: new AMap.LngLat(lng[0],lng[1]),
  132. icon: new AMap.Icon({
  133. image: "//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-red.png",
  134. size: new AMap.Size(23, 35), //图标大小
  135. imageSize: new AMap.Size(23, 35)
  136. }),
  137. offset: new AMap.Pixel(-13, -30)
  138. });
  139. map.add(marker);
  140. // 设置点标记的动画效果,此处为弹跳效果
  141. marker.setAnimation('AMAP_ANIMATION_DROP');
  142. map.setFitView();
  143. console.log($('#location').val())
  144. </script>
  145. </body>
  146. </html>