rimDetail.vue 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395
  1. <template>
  2. <view class="container" :style="'overflow:' + (showPage ? 'hidden' : 'visible')" v-if="info">
  3. <!-- 顶部轮播图区域 -->
  4. <swiper v-if="info.detail_img" class="swiper" indicator-dots indicator-color="rgba(255, 255, 255, 0.5)" indicator-active-color="#fff" autoplay :interval="3000">
  5. <swiper-item v-for="(item, index) in info.detail_img.split(',')" :key="index" @click="handleLookImgs(info.detail_img.split(','), index)">
  6. <view class="swiper-item">
  7. <img class="img" mode="aspectFill" :src="item" />
  8. </view>
  9. </swiper-item>
  10. </swiper>
  11. <!-- 周边信息区域 -->
  12. <view class="info">
  13. <view class="info_name">{{ info.rname }}</view>
  14. <view class="info_score">
  15. <!-- <view class="score_left">5.0</view>
  16. <view class="score_right">超棒</view> -->
  17. <view class="score_msg" @click="goPageInfo">简介</view>
  18. <img class="score_icon" src="../../static/index/right.png" @click="goPageInfo" />
  19. </view>
  20. <view class="info_address">
  21. <img class="address_icon" src="../../static/index/address.png" />
  22. <text @click="handleLookAddress">{{ info.radress }}</text>
  23. </view>
  24. </view>
  25. <!-- 周边产品区域 -->
  26. <view class="goods" v-if="goodList.length">
  27. <view class="goods_title">周边产品</view>
  28. <!-- 列表区域 -->
  29. <view class="goods_list">
  30. <!-- 每一个产品区域 -->
  31. <view class="item_box" v-for="item in goodList" :key="item.id" @click="handleLookDetail(item)">
  32. <view class="box_left">
  33. <view class="left_name">{{ item.product_name }}</view>
  34. <view class="left_info">产品简介 ></view>
  35. <view class="left_price">¥{{ item.price }}</view>
  36. </view>
  37. <view class="box_right">
  38. <view class="right_btn">预定</view>
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. <!-- 查看更多区域 -->
  44. <view class="more" v-if="showMore" @click="handleShowMore">
  45. 查看更多
  46. <img class="more_icon" src="../../static/index/down.png" />
  47. </view>
  48. <!-- 弹窗区域 -->
  49. <uv-popup ref="popup" bgColor="none" :safeAreaInsetBottom="false">
  50. <view class="body_pop">
  51. <img class="pop_img" mode="aspectFill" :src="info.first_img" />
  52. <!-- 弹窗关闭图标区域 -->
  53. <img class="pop_icon" src="../../static/index/close.png" @click="handleClosePop" />
  54. <view class="pop_name">{{ popInfo.product_name }}</view>
  55. <view class="pop_desc">
  56. <mp-html :content="popInfo.product_desc" />
  57. </view>
  58. <!-- <view class="pop_title">
  59. <img class="title_img" src="../../static/index/notice.png" />
  60. 购票须知
  61. </view>
  62. <view class="pop_content">16:00点前可订今日,预订后立即可用平均2秒出票凭[入园码先换票再入园</view>
  63. <view class="pop_content">未使用可随时由请全额退款</view>
  64. <view class="pop_content">使用日期后1天经核实未使用系统将自动发起退款申请</view>
  65. <view class="pop_content">换票后,不支持退款</view>
  66. <view class="pop_content">下单后不支持改期使用说明:</view>
  67. <view class="pop_content">换票时间:08:00-16:00 换票地址:游客中心取票入园</view>
  68. <view class="pop_content">费用说明费用包含三爪仑观音岩-[成人票]门票- 1张</view>
  69. <view class="pop_content">其它说明</view>
  70. <view class="pop_content">比产品由商家开具发票,若需要发票,请在消费前和商家联系确认开票方法</view>
  71. <view class="pop_title">
  72. <img class="title_img" src="../../static/index/phone3.png" />
  73. 联系电话
  74. </view>
  75. <view class="pop_phone">13677988964</view> -->
  76. </view>
  77. </uv-popup>
  78. </view>
  79. </template>
  80. <script>
  81. export default {
  82. data() {
  83. return {
  84. // 滚动穿透控制
  85. showPage: false,
  86. goodList: [],
  87. page: 1,
  88. rows: 3,
  89. total: null,
  90. info: null,
  91. showMore: true,
  92. popInfo: null
  93. }
  94. },
  95. onLoad(options) {
  96. this.info = JSON.parse(decodeURIComponent(options.info))
  97. this.getData()
  98. },
  99. methods: {
  100. async getData() {
  101. const res = await this.$myRequest({
  102. url: '/mhotel/applistAround_pd.action',
  103. data: {
  104. aid: this.info.id,
  105. page: this.page,
  106. rows: this.rows
  107. }
  108. })
  109. // console.log(res)
  110. if (res.code === 200) {
  111. this.goodList = [...this.goodList, ...res.rows]
  112. this.total = res.total
  113. if (this.goodList.length >= this.total) {
  114. this.showMore = false
  115. }
  116. }
  117. },
  118. goPageInfo() {
  119. uni.navigateTo({
  120. url: `/pages/rimInfo/rimInfo?desc=${this.info.detail}`
  121. })
  122. },
  123. handleLookDetail(item) {
  124. this.popInfo = item
  125. this.showPage = true
  126. this.$refs.popup.open('bottom')
  127. },
  128. // 点击弹窗关闭图标回调
  129. handleClosePop() {
  130. this.showPage = false
  131. this.$refs.popup.close()
  132. },
  133. handleLookImgs(urls, current) {
  134. uni.previewImage({
  135. urls,
  136. current
  137. })
  138. },
  139. handleLookAddress() {
  140. let latitude = this.info.jingwei.split(',')[1] * 1
  141. let longitude = this.info.jingwei.split(',')[0] * 1
  142. uni.openLocation({
  143. latitude,
  144. longitude,
  145. name: this.info.rname,
  146. address: this.info.radress,
  147. success: () => {}
  148. })
  149. },
  150. handleShowMore() {
  151. this.page++
  152. this.getData()
  153. }
  154. }
  155. }
  156. </script>
  157. <style lang="scss" scoped>
  158. .container {
  159. min-height: 100vh;
  160. background-color: #fff;
  161. .swiper {
  162. height: 423rpx;
  163. .swiper-item {
  164. width: 100%;
  165. height: 100%;
  166. .img {
  167. width: 100%;
  168. height: 100%;
  169. }
  170. }
  171. }
  172. .info {
  173. margin-top: 20rpx;
  174. padding: 0 20rpx;
  175. .info_name {
  176. font-size: 34rpx;
  177. font-weight: bold;
  178. color: #000000;
  179. }
  180. .info_score {
  181. display: flex;
  182. align-items: center;
  183. margin-top: 22rpx;
  184. font-size: 24rpx;
  185. .score_left {
  186. padding: 0 10rpx 0 12rpx;
  187. line-height: 36rpx;
  188. color: #fff;
  189. text-align: center;
  190. font-weight: bold;
  191. border-radius: 32rpx 0 0 32rpx;
  192. background-color: #096562;
  193. }
  194. .score_right {
  195. padding: 0 12rpx 0 10rpx;
  196. line-height: 36rpx;
  197. color: #096562;
  198. text-align: center;
  199. font-weight: bold;
  200. border-radius: 0 32rpx 32rpx 0;
  201. background-color: #dff2f2;
  202. }
  203. .score_msg {
  204. // margin-left: 42rpx;
  205. color: #096562;
  206. }
  207. .score_icon {
  208. margin-top: 5rpx;
  209. margin-left: 13rpx;
  210. width: 10rpx;
  211. height: 20rpx;
  212. }
  213. }
  214. .info_address {
  215. display: flex;
  216. align-items: center;
  217. margin-top: 24rpx;
  218. height: 83rpx;
  219. font-size: 28rpx;
  220. border-top: 1rpx solid #e6e6e6;
  221. .address_icon {
  222. margin-right: 8rpx;
  223. width: 30rpx;
  224. height: 30rpx;
  225. }
  226. }
  227. }
  228. .goods {
  229. padding: 0 20rpx;
  230. border-top: 1rpx solid #cccccc;
  231. .goods_title {
  232. margin-top: 30rpx;
  233. font-size: 32rpx;
  234. font-weight: bold;
  235. }
  236. .goods_list {
  237. margin-top: 17rpx;
  238. .item_box {
  239. display: flex;
  240. margin-bottom: 20rpx;
  241. padding: 0 32rpx 0 24rpx;
  242. height: 170rpx;
  243. border-radius: 10rpx;
  244. background-color: #f2f2f2;
  245. .box_left {
  246. flex: 2;
  247. display: flex;
  248. flex-direction: column;
  249. justify-content: space-evenly;
  250. overflow: hidden;
  251. .left_name {
  252. font-size: 28rpx;
  253. overflow: hidden;
  254. text-overflow: ellipsis;
  255. white-space: nowrap;
  256. }
  257. .left_info {
  258. color: #808080;
  259. font-size: 24rpx;
  260. overflow: hidden;
  261. text-overflow: ellipsis;
  262. white-space: nowrap;
  263. }
  264. .left_price {
  265. color: #ff5733;
  266. font-size: 24rpx;
  267. }
  268. }
  269. .box_right {
  270. flex: 1;
  271. display: flex;
  272. justify-content: flex-end;
  273. align-items: center;
  274. .right_btn {
  275. display: flex;
  276. justify-content: center;
  277. align-items: center;
  278. width: 115rpx;
  279. height: 60rpx;
  280. color: #fff;
  281. font-size: 28rpx;
  282. border-radius: 10rpx;
  283. background-color: #ff5733;
  284. }
  285. }
  286. }
  287. }
  288. }
  289. .more {
  290. display: flex;
  291. justify-content: center;
  292. align-items: center;
  293. padding: 20rpx 0 30rpx 0;
  294. color: #096663;
  295. font-size: 24rpx;
  296. .more_icon {
  297. width: 38rpx;
  298. height: 48rpx;
  299. }
  300. }
  301. .body_pop {
  302. position: relative;
  303. width: 750rpx;
  304. height: 85vh;
  305. border-radius: 22rpx 22rpx 0 0;
  306. background-color: #fff;
  307. overflow-y: auto;
  308. .pop_img {
  309. width: 100%;
  310. height: 423rpx;
  311. border-radius: 20rpx 20rpx 0 0;
  312. }
  313. .pop_icon {
  314. position: absolute;
  315. top: 20rpx;
  316. right: 30rpx;
  317. width: 58rpx;
  318. height: 58rpx;
  319. }
  320. .pop_name {
  321. padding: 0 20rpx;
  322. line-height: 90rpx;
  323. font-size: 32rpx;
  324. font-weight: bold;
  325. }
  326. .pop_desc {
  327. padding: 0 20rpx;
  328. }
  329. .pop_title {
  330. display: flex;
  331. align-items: center;
  332. padding: 12rpx 20rpx 13rpx;
  333. font-size: 32rpx;
  334. font-weight: bold;
  335. .title_img {
  336. margin-right: 15rpx;
  337. width: 38rpx;
  338. height: 38rpx;
  339. }
  340. }
  341. .pop_content {
  342. padding: 0 20rpx;
  343. line-height: 40rpx;
  344. color: #666666;
  345. font-size: 24rpx;
  346. }
  347. .pop_phone {
  348. margin-left: 50rpx;
  349. padding-bottom: 50rpx;
  350. color: #096562;
  351. font-size: 24rpx;
  352. }
  353. }
  354. }
  355. </style>