gongyuxiangqing.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <template>
  2. <view class="content">
  3. <view class="xuzhi">
  4. <view class="xiang_title">公寓介绍</view>
  5. <view class="xiang_txt">
  6. <!-- <view>{{intorduc}}</view> -->
  7. <rich-text :nodes="intorduc"></rich-text>
  8. <!-- <text style="display: block;text-indent: 56rpx;margin-top: 10px;">开业时间:{{yingye}}</text> -->
  9. <text style="display: block;text-indent: 56rpx;margin-top: 10px;">联系电话:<text @click="telphone(phone)" style="color:rgba(41, 109, 227, 1);">{{phone}}</text></text>
  10. </view>
  11. </view>
  12. <!-- 第二部分,公寓设施 -->
  13. <view class="sheshi">
  14. <view class="sheshi_title">公寓设施</view>
  15. <view v-for="(item,index) in sheshiList" :key="index">
  16. <view class="sheshi_txt_left" v-if="index%2===0">
  17. <view class="sheshi_txt" style="margin-top: 30rpx;">
  18. <!-- ../../static/gongyuxiangqing/sheshi_icon.png -->
  19. <image class="sheshi_icon" :src="item.iconPath"></image>{{item.houseService}}
  20. </view>
  21. </view>
  22. <view class="sheshi_txt_right" v-else>
  23. <view style="margin-top: 30rpx;">
  24. <image class="sheshi_icon" :src="item.iconPath"></image>{{item.houseService}}
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. <!-- 第三部分 入住须知 -->
  30. <!-- <view class="xuzhi">
  31. <view class="xiang_title">入住须知</view>
  32. <view class="xiang_txt">
  33. 我们从分享时机、分享形式、分享动机、分享场景4个维度来聊聊「社交分享」的那些事儿。<br>
  34. <text style="display: block;text-indent: 56rpx;">所以监听用户的截图操作,提示用户进行分享,既缩短了以前分享截图的操作路径,避免了在之前长路径中的行为流失(比如截图完成后忘记分享或觉得麻烦放弃分享等等),也让用户觉得更加贴心。</text>
  35. <text style="display: block;text-indent: 56rpx;">用户分享内容到社交媒体或好友,不应该是一种粗暴的强制行为,我们应该在保证产品本身内容有吸引力的核心前提下,仔细揣摩用户心理,结合产品本身的特色,在不同情境下提供给用户最合适的分享平台及方式,让用户分享成为一种水到渠。</text>
  36. <text style="display: block;text-indent: 56rpx;">营业时间:24小时</text>
  37. <text style="display: block;text-indent: 56rpx;">联系电话:<text @click="telphone(phone)" style="color:rgba(41, 109, 227, 1);">{{phone}}</text></text>
  38. </view>
  39. </view> -->
  40. </view>
  41. </template>
  42. <script>
  43. import {
  44. apartSet,
  45. gongyusheshi
  46. } from '../../utils/api_hotel.js'
  47. export default {
  48. data() {
  49. return {
  50. intorduc:'',
  51. sheshiList:[
  52. {id:1,list:'免费洗刷用品'},
  53. {id:2,list:'24小时热水'},
  54. {id:3,list:'客房wifi覆盖'},
  55. {id:4,list:'电视'},
  56. {id:5,list:'电吹风'},
  57. {id:6,list:'分体式空调'},
  58. ],
  59. phone:'',
  60. yingye:'',
  61. }
  62. },
  63. onLoad() {
  64. this.getAllset()
  65. this.getsheshi()
  66. },
  67. methods: {
  68. //拨打电话
  69. telphone(phone){
  70. uni.makePhoneCall({
  71. phoneNumber: phone ,
  72. }) // 传参带入号码即可
  73. },
  74. getsheshi(){
  75. let _self = this
  76. _self.sheshiList=[]
  77. gongyusheshi().then((res) => {
  78. if (res.success) {
  79. this.sheshiList=res.data
  80. return;
  81. } else {
  82. uni.showModal({
  83. content:"没有符合条件的数据!"
  84. })
  85. }
  86. }).catch((err) => {
  87. uni.showModal({
  88. content:err.message
  89. })
  90. });
  91. },
  92. //公寓整体配置
  93. getAllset(){
  94. let _self = this
  95. apartSet().then((res) => {
  96. if (res.success) {
  97. this.intorduc=res.data.introductory
  98. this.phone=res.data.phoneNumbr
  99. this.yingye=res.data.openingTime
  100. return;
  101. } else {
  102. uni.showModal({
  103. content:"没有符合条件的数据!"
  104. })
  105. }
  106. }).catch((err) => {
  107. uni.showModal({
  108. content:err.message
  109. })
  110. });
  111. },
  112. }
  113. }
  114. </script>
  115. <style>
  116. @import url("./css/gongyuxiangqing.css");
  117. </style>