景徳镇旅游微信小程序
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.

173 lines
3.5 KiB

8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
  1. <template>
  2. <!-- 我要研学详情 type:1 遗产路径详情 type:0 -->
  3. <view class="page">
  4. <navbar :title="titles[type]" 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, payType[type])"
  45. :isPay="detail.isPay == '1' || type == 1"
  46. :collectType="collectType[type]"/>
  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. titles: ['遗产路径', '我要研学'],
  58. collectType : [2, 5],
  59. payType : [0, 5],
  60. type: 0,
  61. tabs: [
  62. {
  63. name: '关于行程'
  64. },
  65. {
  66. name: '注意事项'
  67. },
  68. {
  69. name: '出行说明'
  70. },
  71. ],
  72. id : 0,
  73. detail : {},
  74. contentKey : ['amusementRoute', 'amusementAttention', 'amusementStatement'],
  75. content : '',
  76. }
  77. },
  78. onLoad(args) {
  79. this.type = args.type || 0
  80. this.id = args.id
  81. },
  82. onShow() {
  83. this.getData()
  84. },
  85. onShareAppMessage(res) {
  86. return {
  87. title: this.titles[this.type],
  88. desc: this.detail.amusementTitle,
  89. path: '/pages_order/service/StudyAndPathDetail?id=' + this.id
  90. }
  91. },
  92. methods: {
  93. //点击tab栏
  94. clickTabs({index}) {
  95. this.content = this.detail[this.contentKey[index]]
  96. },
  97. getData(){
  98. this.$api('queryAmusementById',
  99. {
  100. amusementId : this.id,
  101. }, res => {
  102. uni.stopPullDownRefresh()
  103. if(res.code == 200){
  104. this.detail = res.result
  105. this.content = this.detail[this.contentKey[0]]
  106. }
  107. })
  108. },
  109. toPayUrl(item, payType){
  110. uni.navigateTo({
  111. url: `/pages_order/order/orderSubscribe?payType=${payType}&id=${item.id}`
  112. })
  113. },
  114. }
  115. }
  116. </script>
  117. <style scoped lang="scss">
  118. .page{
  119. image{
  120. width: 100%;
  121. height: 100%;
  122. }
  123. .image{
  124. width: 100%;
  125. height: 400rpx;
  126. }
  127. .box{
  128. margin-top: -40rpx;
  129. border-top-left-radius: 40rpx;
  130. border-top-right-radius: 40rpx;
  131. overflow: hidden;
  132. position: relative;
  133. .info{
  134. background-color: #fff;
  135. padding: 40rpx;
  136. .price{
  137. padding: 20rpx 0;
  138. font-size: 22rpx;
  139. text{
  140. font-size: 38rpx;
  141. color: $uni-color;
  142. font-weight: 900;
  143. }
  144. }
  145. .title{
  146. font-weight: 900;
  147. padding-bottom: 20rpx;
  148. font-size: 28rpx;
  149. }
  150. .tip{
  151. font-size: 22rpx;
  152. padding-bottom: 20rpx;
  153. line-height: 40rpx;
  154. }
  155. }
  156. .detail{
  157. margin-top: 20rpx;
  158. background-color: #fff;
  159. .content{
  160. padding: 40rpx;
  161. }
  162. }
  163. }
  164. }
  165. </style>