景徳镇旅游微信小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

175 lines
3.4 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <!-- 我要研学详情 type:1 遗产路径详情 type:0 -->
  3. <view class="page">
  4. <navbar :title="dict.title" leftClick @leftClick="$utils.navigateBack" />
  5. <view class="image">
  6. <!-- <image src="https://img-s-msn-com.akamaized.net/tenant/amp/entityid/BB1msKSi.img" mode="aspectFill"></image> -->
  7. <uv-swiper
  8. :list="detail.amusementImage ?
  9. detail.amusementImage.split(',') : []"
  10. indicator
  11. height="420rpx"></uv-swiper>
  12. </view>
  13. <view class="box">
  14. <view class="info">
  15. <view class="price"
  16. v-if="detail.amusementPrice
  17. && detail.isPay == 1">
  18. <text>{{ detail.amusementPrice }}</text>
  19. </view>
  20. <view class="title">
  21. {{ detail.amusementTitle }}
  22. </view>
  23. <view class="tip">
  24. {{ detail.amusementBrief }}
  25. </view>
  26. </view>
  27. <view class="detail">
  28. <view class="">
  29. <uv-tabs :list="tabs"
  30. lineColor="#B12026"
  31. lineHeight="8rpx"
  32. lineWidth="50rpx"
  33. :scrollable="false"
  34. @click="clickTabs"></uv-tabs>
  35. </view>
  36. <view class="content">
  37. <uv-parse :content="content"></uv-parse>
  38. </view>
  39. </view>
  40. </view>
  41. <StudyAndPathDetailSubmit
  42. :detail="detail"
  43. @getData="getData"
  44. @submit="toPayUrl(detail, type)"
  45. :isPay="detail.isPay == '1'"
  46. :collectType="dict.collectType"/>
  47. </view>
  48. </template>
  49. <script>
  50. import StudyAndPathDetailSubmit from '../components/submit/StudyAndPathDetailSubmit.vue'
  51. export default {
  52. components : {
  53. StudyAndPathDetailSubmit,
  54. },
  55. data() {
  56. return {
  57. type: '',
  58. tabs: [
  59. {
  60. name: '关于行程'
  61. },
  62. {
  63. name: '注意事项'
  64. },
  65. {
  66. name: '出行说明'
  67. },
  68. ],
  69. id : 0,
  70. detail : {},
  71. contentKey : ['amusementRoute', 'amusementAttention', 'amusementStatement'],
  72. content : '',
  73. dict : {},
  74. }
  75. },
  76. onLoad(args) {
  77. this.type = args.type || ''
  78. this.id = args.id
  79. this.dict = this.$config.dict[args.type]
  80. },
  81. onShow() {
  82. this.getData()
  83. },
  84. onPullDownRefresh() {
  85. this.getData()
  86. },
  87. onShareAppMessage(res) {
  88. return {
  89. title: this.dict.title,
  90. desc: this.detail.amusementTitle,
  91. path: '/pages_order/service/StudyAndPathDetail?id=' + this.id
  92. }
  93. },
  94. methods: {
  95. //点击tab栏
  96. clickTabs({index}) {
  97. this.content = this.detail[this.contentKey[index]]
  98. },
  99. getData(){
  100. this.$api('queryAmusementById',
  101. {
  102. amusementId : this.id,
  103. }, res => {
  104. uni.stopPullDownRefresh()
  105. if(res.code == 200){
  106. this.detail = res.result
  107. this.content = this.detail[this.contentKey[0]]
  108. }
  109. })
  110. },
  111. toPayUrl(item, type){
  112. uni.navigateTo({
  113. url: `/pages_order/order/orderSubscribe?type=${type}&id=${item.id}`
  114. })
  115. },
  116. }
  117. }
  118. </script>
  119. <style scoped lang="scss">
  120. .page{
  121. image{
  122. width: 100%;
  123. height: 100%;
  124. }
  125. .image{
  126. width: 100%;
  127. height: 400rpx;
  128. }
  129. .box{
  130. margin-top: -40rpx;
  131. border-top-left-radius: 40rpx;
  132. border-top-right-radius: 40rpx;
  133. overflow: hidden;
  134. position: relative;
  135. .info{
  136. background-color: #fff;
  137. padding: 40rpx;
  138. .price{
  139. padding: 20rpx 0;
  140. font-size: 22rpx;
  141. text{
  142. font-size: 38rpx;
  143. color: $uni-color;
  144. font-weight: 900;
  145. }
  146. }
  147. .title{
  148. font-weight: 900;
  149. padding-bottom: 20rpx;
  150. font-size: 28rpx;
  151. }
  152. .tip{
  153. font-size: 22rpx;
  154. padding-bottom: 20rpx;
  155. line-height: 40rpx;
  156. }
  157. }
  158. .detail{
  159. margin-top: 20rpx;
  160. background-color: #fff;
  161. .content{
  162. padding: 40rpx;
  163. }
  164. }
  165. }
  166. }
  167. </style>