hotelDetail.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414
  1. <template>
  2. <view class="pages">
  3. <div class="top-image" @click="handleToHotelImage">
  4. <div class="top-right">
  5. <div class="heart" style="margin-right:3px;">
  6. <u-icon name="star" color="#fff" size="20"></u-icon>
  7. </div>
  8. <div class="heart">
  9. <u-icon name="share" color="#fff" size="20"></u-icon>
  10. </div>
  11. </div>
  12. <div class="top-right-bottom">
  13. <u-icon name="photo" color="#fff" size="20"></u-icon> 1/64
  14. </div>
  15. </div>
  16. <div class="detail-card">
  17. <h4>恒枫酒店(红房子医院店)</h4>
  18. <div class="detail-card-call">
  19. <h4>2019年开业</h4>
  20. <u-icon @click="openPhone" name="phone" color="#000" size="30"></u-icon>
  21. </div>
  22. <div class="installation">
  23. <div class="installation-box" v-for="item in 5" :key="item.id">
  24. <div>
  25. <u-icon name="wifi" color="#000" size="30"></u-icon>
  26. </div>
  27. <div>
  28. WIFI
  29. </div>
  30. </div>
  31. </div>
  32. <div class="grade">
  33. <div class="grade-left">
  34. 0分
  35. </div>
  36. <div class="grade-center">
  37. 0.00%好评,0条评论
  38. </div>
  39. <div @click="handleToHotelAppraise">
  40. <u-icon name="arrow-right" color="#00000068" size="30"></u-icon>
  41. </div>
  42. </div>
  43. <div class="address">
  44. <div style="color:#0000068">
  45. 四川省甘孜州理塘县理塘路口
  46. </div>
  47. <div style="display:flex;align-items:center;">
  48. 查看地图<u-icon name="arrow-right" color="#00000068" size="26"></u-icon>
  49. </div>
  50. </div>
  51. </div>
  52. <div class="card-data-list">
  53. <div class="card-list-top">
  54. <div @click="handleCalendar">
  55. <div>入住</div>
  56. <div>{{`2023-04-10`}}</div>
  57. </div>
  58. <div>
  59. {{`共17晚`}}
  60. </div>
  61. <div>
  62. <div>离开</div>
  63. <div>{{`2023-04-28`}}</div>
  64. </div>
  65. </div>
  66. <div v-for="(item, index) in dataList" :key="item.id">
  67. <div class="card-list">
  68. <div class="card-list-left">
  69. <u-image :showLoading="true" radius="5px" mode="scaleToFill" src="@/static/niu.jpg" width="80px" height="80px" @click="click"></u-image>
  70. <div class="card-list-left-detail">详情</div>
  71. </div>
  72. <div class="card-list-center">
  73. <h2>家庭房</h2>
  74. <div>15 1.5+1.2 可住2人</div>
  75. </div>
  76. <div class="card-list-right" @click="showDetail(item, index)">
  77. <div>
  78. <div v-if="!item.checked">¥159.00</div>
  79. <div v-else style="font-size: 12px;text-decoration-line:line-through;color:#00000068;">门市价:¥{{item.price}}</div>
  80. <div style="font-size:14px;">房量紧张</div>
  81. </div>
  82. <div>
  83. <u-icon name="arrow-right" color="#00000068" size="26"></u-icon>
  84. </div>
  85. </div>
  86. </div>
  87. <div class="card-list-bottom" v-if="item.checked">
  88. <div>
  89. <div style="display:flex;align-items:center;">专享价
  90. <u-icon name="arrow-right" color="#00000068" size="26"></u-icon>
  91. </div>
  92. <div style="color:red">
  93. 仅剩6间
  94. </div>
  95. </div>
  96. <div style="display:flex;align-items:center;">
  97. <div style="margin-right:10px;text-align:right;">
  98. <div style="color:#30a7f5">¥159.00</div>
  99. <div style="color:#00000068;text-decoration-line: line-through;font-size: 12px;">¥179.00</div>
  100. <div style="color:#30a7f5">已优惠20元</div>
  101. </div>
  102. <div class="card-list-bottom-right" @click="handleToHotelBooking(item)">
  103. <div>预定</div>
  104. <div>到店支付</div>
  105. </div>
  106. </div>
  107. </div>
  108. </div>
  109. </div>
  110. <u-action-sheet :actions="list" @close="show = false" safeAreaInsetBottom @select="phoneSelect" :title="title" :show="show"></u-action-sheet>
  111. </view>
  112. </template>
  113. <script>
  114. export default {
  115. data() {
  116. return {
  117. dataList:[
  118. {
  119. id:1,
  120. name:'家庭房',
  121. price:159,
  122. img:'@/static/niu.jpg',
  123. type:'15 1.5+1.2 可住2人',
  124. status:'房量紧张',
  125. checked:false
  126. },
  127. {
  128. id:2,
  129. name:'家庭房',
  130. price:159,
  131. img:'@/static/niu.jpg',
  132. type:'15 1.5+1.2 可住2人',
  133. status:'房量紧张',
  134. checked:false
  135. },
  136. {
  137. id:3,
  138. name:'家庭房',
  139. price:159,
  140. img:'@/static/niu.jpg',
  141. type:'15 1.5+1.2 可住2人',
  142. status:'房量紧张',
  143. checked:false
  144. },
  145. {
  146. id:4,
  147. name:'家庭房',
  148. price:159,
  149. img:'@/static/niu.jpg',
  150. type:'15 1.5+1.2 可住2人',
  151. status:'房量紧张',
  152. checked:false
  153. },
  154. {
  155. id:5,
  156. name:'家庭房',
  157. price:159,
  158. img:'@/static/niu.jpg',
  159. type:'15 1.5+1.2 可住2人',
  160. status:'房量紧张',
  161. checked:false
  162. }
  163. ],
  164. list: [
  165. {
  166. name:'酒店客服:400-000-0000',
  167. phone:'400-000-0000'
  168. },
  169. {
  170. name: '平台客服:400-000-0000',
  171. phone:'400-000-0000'
  172. }
  173. ],
  174. show: false
  175. }
  176. },
  177. methods: {
  178. showDetail(item, index) {
  179. this.dataList[index].checked = !this.dataList[index].checked
  180. },
  181. handleToHotelBooking(item) {
  182. uni.navigateTo({
  183. url: '/components/hotelBooking/hotelBooking'
  184. })
  185. },
  186. handleToHotelAppraise(){
  187. uni.navigateTo({
  188. url: '/components/hotelAppraise/hotelAppraise'
  189. })
  190. },
  191. handleToHotelImage(){
  192. uni.navigateTo({
  193. url: '/components/hotelImage/hotelImage'
  194. })
  195. },
  196. openPhone(){
  197. this.show = true
  198. },
  199. phoneSelect(e){
  200. uni.makePhoneCall({
  201. phoneNumber: e.phone //仅为示例,并非真实的电话号码
  202. });
  203. }
  204. }
  205. }
  206. </script>
  207. <style lang="scss" scoped>
  208. .pages {
  209. width: 100vw;
  210. height: 100vh;
  211. background: #f3f3f3;
  212. }
  213. .top-image {
  214. width: 100vw;
  215. height: 260px;
  216. background: rgb(243, 142, 134);
  217. position: relative;
  218. }
  219. .top-right {
  220. position: absolute;
  221. top: 20px;
  222. right: 10px;
  223. display: flex;
  224. }
  225. .heart {
  226. background: #00000068;
  227. width: 30px;
  228. height: 30px;
  229. border-radius: 50%;
  230. display: flex;
  231. justify-content: center;
  232. align-items: center;
  233. }
  234. .top-right-bottom {
  235. position: absolute;
  236. right: 10px;
  237. bottom: 30px;
  238. background: #00000068;
  239. padding: 3px 5px;
  240. border-radius: 8px;
  241. display: flex;
  242. align-items: center;
  243. color: #fff;
  244. }
  245. .detail-card {
  246. background: #fff;
  247. width: 96vw;
  248. min-height: 220px;
  249. margin: auto;
  250. padding: 20px 15px 5px 15px;
  251. box-sizing: border-box;
  252. position: relative;
  253. top: -20px;
  254. border-radius: 8px;
  255. box-shadow: 0 0 10px #00000029;
  256. .detail-card-call {
  257. display: flex;
  258. justify-content: space-between;
  259. align-items: center;
  260. }
  261. }
  262. .installation {
  263. display: flex;
  264. justify-content: space-between;
  265. align-items: center;
  266. .installation-box {
  267. display: flex;
  268. align-items: center;
  269. }
  270. }
  271. .grade {
  272. display: flex;
  273. // justify-content: space-between;
  274. align-items: center;
  275. margin-top: 10px;
  276. .grade-left {
  277. width: 60px;
  278. height: 60px;
  279. background: #30a7f5;
  280. display: flex;
  281. justify-content: center;
  282. align-items: center;
  283. color: #fff;
  284. }
  285. .grade-center {
  286. flex: 1;
  287. margin: 0 10px;
  288. color: #00000068;
  289. }
  290. }
  291. .address {
  292. margin-top: 10px;
  293. display: flex;
  294. justify-content: space-between;
  295. align-items: center;
  296. }
  297. .card-data-list {
  298. background: #fff;
  299. width: 96vw;
  300. box-sizing: border-box;
  301. margin: auto;
  302. padding: 20px 10px;
  303. .card-list-top {
  304. display: flex;
  305. justify-content: space-between;
  306. align-items: center;
  307. }
  308. .card-list {
  309. display: flex;
  310. justify-content: space-between;
  311. align-items: center;
  312. margin-top: 10px;
  313. border-bottom: 1px solid #00000011;
  314. min-height: 100px;
  315. .card-list-left-detail {
  316. position: absolute;
  317. bottom: 0;
  318. right: 0;
  319. // width: 100%;
  320. // height: 100%;
  321. padding: 3px;
  322. background: #00000068;
  323. display: flex;
  324. justify-content: center;
  325. align-items: center;
  326. color: #fff;
  327. font-size: 14px;
  328. }
  329. .card-list-left {
  330. position: relative;
  331. }
  332. .card-list-center {
  333. flex: 1;
  334. margin: 0 10px;
  335. color: #00000068;
  336. h2 {
  337. font-size: 18px;
  338. color: #000;
  339. }
  340. }
  341. .card-list-right {
  342. display: flex;
  343. // justify-content: space-between;
  344. align-items: center;
  345. color: red;
  346. }
  347. }
  348. }
  349. .card-list-bottom{
  350. display: flex;
  351. justify-content: space-between;
  352. align-items: center;
  353. padding: 10px;
  354. background: #00000011;
  355. }
  356. .card-list-bottom-right{
  357. display: flex;
  358. flex-direction: column;
  359. align-items: center;
  360. justify-content: center;
  361. border-top-left-radius: 5px;
  362. border-top-right-radius: 5px;
  363. overflow: hidden;
  364. // height: 100%;
  365. width: 70px;
  366. height: 60px;
  367. >div:nth-child(1){
  368. background: #30a7f5;
  369. color: #fff;
  370. height: 100%;
  371. width: 100%;
  372. display: flex;
  373. justify-content: center;
  374. align-items: center;
  375. // padding: 5px 10px;
  376. // border-radius: 8px;
  377. // margin-bottom: 5px;
  378. }
  379. >div:nth-child(2){
  380. color: #30a7f5;
  381. background: #fff;
  382. width: 100%;
  383. height: 100%;
  384. display: flex;
  385. justify-content: center;
  386. align-items: center;
  387. }
  388. }
  389. </style>