index.vue 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  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. <uni-card style="margin-top: -21px;margin-bottom:0px; width:660rpx;height: 254rpx;">
  15. <text class="uni-body">宜春市靖安县北高速路口什么路899号</text>
  16. <image class="uni-phone" @click="telphone(phone)" src="../../static/index/index_phone.svg"></image>
  17. <image class="uni-map" src="../../static/index/index_map.svg"></image>
  18. <br><text class="uni-body2">距离我520km</text>
  19. </uni-card>
  20. <!-- 第二层工具 -->
  21. <view class="item-list">
  22. <view class="item-list-one" @click="navigateToXuzhi">
  23. <image src="../../static/index/index_xuzhi.svg" class="img-btn"></image>
  24. <text class="list-txt">入住须知</text>
  25. </view>
  26. <view class="item-list-one" @click="navigateToDairuzhu">
  27. <image src="../../static/index/index_ruzhu.svg" class="img-btn"></image>
  28. <text class="list-txt">办理入住</text>
  29. </view>
  30. <view class="item-list-one" @click="navigateToPay">
  31. <image src="../../static/index/index_xuzhu.svg" class="img-btn"></image>
  32. <text class="list-txt">办理续住</text>
  33. </view>
  34. <view class="item-list-one" @click="navigateToTuifang">
  35. <image src="../../static/index/index_tuifang.svg" class="img-btn"></image>
  36. <text class="list-txt">办理退房</text>
  37. </view>
  38. </view>
  39. <!-- 第三层订房 -->
  40. <view class="room-list">
  41. <!-- 选择住房日期 -->
  42. <view class="select-time" @click="openCalendar">
  43. <view class="select-time-one">
  44. <text class="select-list">周四入住</text>
  45. <text class="select-list-time">07月21日</text>
  46. </view>
  47. <view class="select-center">
  48. <view class="select-line1"></view>
  49. <view class="select-circle">1晚</view>
  50. <view class="select-line2"></view>
  51. </view>
  52. <view class="select-time-one">
  53. <text class="select-list">周五离店</text>
  54. <text class="select-list-time">07月22日</text>
  55. </view>
  56. <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"
  57. :endDate="info.endDate" :range="info.range" @change="change" @confirm="confirm" @close="close"/>
  58. </view>
  59. <!-- 房型列表 -->
  60. <view class="room-kuang">
  61. <view class="room-xinxi" v-for="(item,index) in room" :key="index">
  62. <image class="room-image" src="../../static/index/room_image.svg" @click="inputDialogToggle"></image>
  63. <view class="room-name">{{item.name}}</view>
  64. <view class="room-mark">{{item.mark1}} {{item.mark2}} {{item.mark3}}</view>
  65. <view class="room-icon">
  66. <image src="../../static/index/index_wifi.svg" style="width: 30rpx;height: 30rpx;"></image>
  67. <image src="../../static/index/index_kongtiao.svg" style="width: 26rpx;height: 26rpx;margin-left: 10rpx;"></image>
  68. <image src="../../static/index/index_nosmoking.svg" style="width: 30rpx;height: 30rpx;margin-left: 10rpx;"></image>
  69. <image src="../../static/index/index_lock.svg" style="width: 30rpx;height: 30rpx;margin-left: 10rpx;"></image>
  70. </view>
  71. <view class="before-price"><strike>{{item.before_price}}</strike></view>
  72. <view class="room-price">{{item.price}}</view>
  73. <view class="room-button" @click="navigateToOrderRoom"><text>订</text></view>
  74. <view class="room-line" v-if="index<(room.length-1)"></view>
  75. </view>
  76. </view>
  77. </view>
  78. <!-- 房间样式弹窗页面 -->
  79. <uni-popup ref="popup" type="dialog" :mask-click="false">
  80. <view class="popup_bg">
  81. <text class="popup_title">户型详情</text>
  82. <text class="popup_error" @click="popupClose"></text>
  83. <!-- 轮播图 -->
  84. <swiper class="swiper" circular :indicator-dots="indicatorDots">
  85. <swiper-item v-for="(item, index) in img" :key="index">
  86. <view class="swiper-item">
  87. <image :src="item.srcUrl" class="swiper-img"></image>
  88. </view>
  89. </swiper-item>
  90. </swiper>
  91. <text class="popup_title2">便利设施</text>
  92. <view class="popup_txt">尤其是刚上线的产品,很难通过产品的内部体系来实现快速的用户增长,所以会更加依赖于分享来达到广泛的传播,获取目标用户。
  93. 所以监听用户的截图操作,提示用户进行分享,既缩短了以前分享截...</view>
  94. </view>
  95. </uni-popup>
  96. </view>
  97. </template>
  98. <script>
  99. // 导入图片
  100. import room1 from '../../static/index/swiper_img1.svg'
  101. import room2 from '../../static/index/swiper_img1.svg'
  102. export default {
  103. data() {
  104. return {
  105. showCalendar: false,
  106. info: {
  107. lunar: true,
  108. range: true,
  109. insert: false,
  110. selected: []
  111. },
  112. room:[
  113. {id:1,room_img:({ url: "../../static/index/room_image.svg" }),name:'01户型',before_price:'¥419',price:'¥0.00',mark1:'22m',mark2:'无早',mark3:'大床'},
  114. {id:2,room_img:'url(../../static/index/index_bg.svg)',name:'02户型',before_price:'¥419',price:'¥0.00',mark1:'22m',mark2:'无早',mark3:'大床'},
  115. {id:3,room_img:({ url: "../../static/index/room_image.svg" }),name:'01户型',before_price:'¥419',price:'¥0.00',mark1:'22m',mark2:'无早',mark3:'大床'},
  116. {id:4,room_img:'url(../../static/index/index_bg.svg)',name:'02户型',before_price:'¥419',price:'¥0.00',mark1:'22m',mark2:'无早',mark3:'大床'},
  117. ],
  118. indicatorDots: true,//滚动图片提示条默认出现
  119. img:[
  120. {
  121. value: '1',
  122. srcUrl:room1,
  123. name: '图1'
  124. },
  125. {
  126. value: '2',
  127. srcUrl:room2,
  128. name: '图2'
  129. },
  130. ],
  131. phone:'15079248859',//电话
  132. }
  133. },
  134. onLoad() {
  135. },
  136. onReady() {
  137. this.$nextTick(() => {
  138. this.showCalendar = true
  139. })
  140. // TODO 模拟请求异步同步数据
  141. // setTimeout(() => {
  142. // this.info.date = getDate(new Date(),-30).fullDate
  143. // this.info.startDate = getDate(new Date(),-60).fullDate
  144. // this.info.endDate = getDate(new Date(),30).fullDate
  145. // this.info.selected = [{
  146. // date: getDate(new Date(),-3).fullDate,
  147. // info: '打卡'
  148. // },
  149. // {
  150. // date: getDate(new Date(),-2).fullDate,
  151. // info: '签到',
  152. // data: {
  153. // custom: '自定义信息',
  154. // name: '自定义消息头'
  155. // }
  156. // },
  157. // {
  158. // date: getDate(new Date(),-1).fullDate,
  159. // info: '已打卡'
  160. // }
  161. // ]
  162. // }, 2000)
  163. },
  164. methods: {
  165. // 跳转到入住须知
  166. navigateToXuzhi(){
  167. uni.navigateTo({
  168. url: "../ruzhuxuzhi/ruzhuxuzhi",
  169. });
  170. },
  171. // 跳转到公寓详情
  172. navigateToXiangqing(){
  173. uni.navigateTo({
  174. url: "../gongyuxiangqing/gongyuxiangqing",
  175. });
  176. },
  177. // 订房间
  178. navigateToOrderRoom() {
  179. uni.navigateTo({
  180. url: "../order_room/order_room",
  181. });
  182. },
  183. //办理入住跳转
  184. navigateToDairuzhu(){
  185. uni.navigateTo({
  186. url: "../my_orderlist/my_orderlist?Inv=2",
  187. })
  188. },
  189. //办理退房
  190. navigateToTuifang(){
  191. uni.navigateTo({
  192. url:"../my_orderlist/my_orderlist?Inv=3"
  193. })
  194. },
  195. //弹窗
  196. inputDialogToggle() {
  197. this.$refs.popup.open()
  198. },
  199. popupClose() {
  200. this.$refs.popup.close()
  201. },
  202. // 日期选择器弹窗
  203. openCalendar() {
  204. this.$refs.calendar.open()
  205. },
  206. close(){
  207. console.log('弹窗关闭');
  208. },
  209. confirm(e) {
  210. console.log('confirm 返回:', e)
  211. },
  212. change(e) {
  213. console.log('1change 返回:', e)
  214. // 模拟动态打卡
  215. if (this.info.selected.length > 5) return
  216. this.info.selected.push({
  217. date: e.fulldate,
  218. info: '打卡'
  219. })
  220. },
  221. //拨打电话
  222. telphone(phone){
  223. uni.makePhoneCall({
  224. phoneNumber: phone ,
  225. }) // 传参带入号码即可
  226. }
  227. }
  228. }
  229. </script>
  230. <style>
  231. @import url("./css/index.css");
  232. </style>