index.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <template>
  2. <view class="content">
  3. <!-- 背景图 -->
  4. <view class="index_bg">
  5. <view class="welcome"><image class="welcome_img" src="../../static/index/welcome.png"></image></view>
  6. </view>
  7. <!-- 第一层公寓名称卡片 -->
  8. <uni-card style="margin-top: -40px;margin-bottom:0px; width:660rpx;height: 254rpx;" title="墨轩湖姬子公寓(南昌交通学院)" sub-title="2021年装修 | 智能门锁 | 房间wifi | 免费停车" extra="设施/详情>" @click="navigateToXiangqing">
  9. <text class="uni-body">宜春市靖安县北高速路口什么路899号</text>
  10. <image class="uni-phone" src="../../static/index/index_phone.svg"></image>
  11. <image class="uni-map" src="../../static/index/index_map.svg"></image>
  12. <br><text class="uni-body2">距离我520km</text>
  13. </uni-card>
  14. <!-- 第二层工具 -->
  15. <view class="item-list">
  16. <view class="item-list-one" @click="navigateToXuzhi">
  17. <image src="../../static/index/index_xuzhi.svg" class="img-btn"></image>
  18. <text class="list-txt">入住须知</text>
  19. </view>
  20. <view class="item-list-one" @click="navigateToCard">
  21. <image src="../../static/index/index_ruzhu.svg" class="img-btn"></image>
  22. <text class="list-txt">办理入住</text>
  23. </view>
  24. <view class="item-list-one" @click="navigateToPay">
  25. <image src="../../static/index/index_xuzhu.svg" class="img-btn"></image>
  26. <text class="list-txt">办理续住</text>
  27. </view>
  28. <view class="item-list-one" @click="navigateToPay">
  29. <image src="../../static/index/index_tuifang.svg" class="img-btn"></image>
  30. <text class="list-txt">办理退房</text>
  31. </view>
  32. </view>
  33. <!-- 第三层订房 -->
  34. <view class="room-list">
  35. <!-- 选择住房日期 -->
  36. <view class="select-time" @click="openCalendar">
  37. <view class="select-time-one">
  38. <text class="select-list">周四入住</text>
  39. <text class="select-list-time">07月21日</text>
  40. </view>
  41. <view class="select-center">
  42. <view class="select-line1"></view>
  43. <view class="select-circle">1晚</view>
  44. <view class="select-line2"></view>
  45. </view>
  46. <view class="select-time-one">
  47. <text class="select-list">周五离店</text>
  48. <text class="select-list-time">07月22日</text>
  49. </view>
  50. <uni-calendar ref="calendar" :selected="info.selected" class="uni-calendar--hook" :clear-date="true" :date="info.date" :insert="info.insert" :lunar="info.lunar" :startDate="info.startDate"
  51. :endDate="info.endDate" :range="info.range" @confirm="confirm" @close="close"/>
  52. </view>
  53. <!-- 房型列表 -->
  54. <view class="room-kuang">
  55. <view class="room-xinxi" v-for="(item,index) in room" :key="index">
  56. <image class="room-image" src="../../static/index/room_image.svg" @click="inputDialogToggle"></image>
  57. <view class="room-name">{{item.name}}</view>
  58. <view class="room-mark">{{item.mark1}} {{item.mark2}} {{item.mark3}}</view>
  59. <view class="room-icon">
  60. <image src="../../static/index/index_wifi.svg" style="width: 30rpx;height: 30rpx;"></image>
  61. <image src="../../static/index/index_kongtiao.svg" style="width: 26rpx;height: 26rpx;margin-left: 10rpx;"></image>
  62. <image src="../../static/index/index_nosmoking.svg" style="width: 30rpx;height: 30rpx;margin-left: 10rpx;"></image>
  63. <image src="../../static/index/index_lock.svg" style="width: 30rpx;height: 30rpx;margin-left: 10rpx;"></image>
  64. </view>
  65. <view class="before-price"><strike>{{item.before_price}}</strike></view>
  66. <view class="room-price">{{item.price}}</view>
  67. <view class="room-button" @click="navigateToOrderRoom"><text>订</text></view>
  68. <view class="room-line" v-if="index<(room.length-1)"></view>
  69. </view>
  70. </view>
  71. </view>
  72. <!-- 房间样式弹窗页面 -->
  73. <uni-popup ref="inputDialog" type="dialog">
  74. <view class="popup_bg">
  75. <text class="popup_title">户型详情</text>
  76. <text class="popup_error" @confirm="dialogInputConfirm"></text>
  77. <!-- 轮播图 -->
  78. <swiper class="swiper" circular :indicator-dots="indicatorDots">
  79. <swiper-item v-for="(item, index) in img" :key="index">
  80. <view class="swiper-item">
  81. <image :src="item.srcUrl" class="swiper-img"></image>
  82. </view>
  83. </swiper-item>
  84. </swiper>
  85. <text class="popup_title2">便利设施</text>
  86. <view class="popup_txt">尤其是刚上线的产品,很难通过产品的内部体系来实现快速的用户增长,所以会更加依赖于分享来达到广泛的传播,获取目标用户。
  87. 所以监听用户的截图操作,提示用户进行分享,既缩短了以前分享截...</view>
  88. </view>
  89. <!-- <uni-popup-dialog ref="baseClose" mode="base" title="输入内容" value="对话框预置提示内容!"
  90. placeholder="请输入内容" @confirm="dialogInputConfirm"></uni-popup-dialog> -->
  91. </uni-popup>
  92. </view>
  93. </template>
  94. <script>
  95. // 导入图片
  96. import room1 from '../../static/index/swiper_img1.svg'
  97. import room2 from '../../static/index/swiper_img1.svg'
  98. export default {
  99. data() {
  100. return {
  101. showCalendar: false,
  102. info: {
  103. lunar: true,
  104. range: true,
  105. insert: false,
  106. selected: []
  107. },
  108. room:[
  109. {id:1,room_img:({ url: "../../static/index/room_image.svg" }),name:'01户型',before_price:'¥419',price:'¥0.00',mark1:'22m',mark2:'无早',mark3:'大床'},
  110. {id:2,room_img:'url(../../static/index/index_bg.svg)',name:'02户型',before_price:'¥419',price:'¥0.00',mark1:'22m',mark2:'无早',mark3:'大床'},
  111. {id:3,room_img:({ url: "../../static/index/room_image.svg" }),name:'01户型',before_price:'¥419',price:'¥0.00',mark1:'22m',mark2:'无早',mark3:'大床'},
  112. {id:4,room_img:'url(../../static/index/index_bg.svg)',name:'02户型',before_price:'¥419',price:'¥0.00',mark1:'22m',mark2:'无早',mark3:'大床'},
  113. ],
  114. indicatorDots: true,//滚动图片提示条默认出现
  115. img:[
  116. {
  117. value: '1',
  118. srcUrl:room1,
  119. name: '图1'
  120. },
  121. {
  122. value: '2',
  123. srcUrl:room2,
  124. name: '图2'
  125. },
  126. ]
  127. }
  128. },
  129. onLoad() {
  130. },
  131. methods: {
  132. // 跳转到入住须知
  133. navigateToXuzhi(){
  134. uni.navigateTo({
  135. url: "../ruzhuxuzhi/ruzhuxuzhi",
  136. });
  137. },
  138. // 跳转到公寓详情
  139. navigateToXiangqing(){
  140. uni.navigateTo({
  141. url: "../gongyuxiangqing/gongyuxiangqing",
  142. });
  143. },
  144. // 订房间
  145. navigateToOrderRoom() {
  146. uni.navigateTo({
  147. url: "../order_room/order_room",
  148. });
  149. },
  150. //弹窗
  151. inputDialogToggle() {
  152. this.$refs.inputDialog.open()
  153. },
  154. dialogInputConfirm() {
  155. console.log(1)
  156. // 关闭窗口后,恢复默认内容
  157. this.$refs.inputDialog.close()
  158. },
  159. openCalendar() {
  160. this.$refs.calendar.open()
  161. },
  162. close(){
  163. console.log('弹窗关闭');
  164. },
  165. confirm(e) {
  166. console.log('confirm 返回:', e)
  167. },
  168. }
  169. }
  170. </script>
  171. <style>
  172. @import url("./css/index.css");
  173. </style>