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

181 lines
3.7 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
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="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. :collectonFlag="collectonFlag"
  47. :collectType="dict.collectType"/>
  48. </view>
  49. </template>
  50. <script>
  51. import StudyAndPathDetailSubmit from '../components/submit/StudyAndPathDetailSubmit.vue'
  52. export default {
  53. components : {
  54. StudyAndPathDetailSubmit,
  55. },
  56. data() {
  57. return {
  58. type: '',
  59. tabs: [
  60. {
  61. name: '关于行程'
  62. },
  63. {
  64. name: '注意事项'
  65. },
  66. {
  67. name: '出行说明'
  68. },
  69. ],
  70. id : 0,
  71. detail : {},
  72. contentKey : ['amusementRoute', 'amusementAttention', 'amusementStatement'],
  73. content : '',
  74. dict : {},
  75. collectonFlag : false,
  76. }
  77. },
  78. onLoad(args) {
  79. this.type = args.type || ''
  80. this.id = args.id
  81. this.dict = this.$config.dict[args.type]
  82. },
  83. onShow() {
  84. this.getData()
  85. },
  86. onPullDownRefresh() {
  87. this.getData()
  88. },
  89. onShareAppMessage(res) {
  90. return {
  91. title: this.dict.title,
  92. desc: this.detail.amusementTitle,
  93. path: '/pages_order/service/StudyAndPathDetail?id=' + this.id
  94. }
  95. },
  96. methods: {
  97. //点击tab栏
  98. clickTabs({index}) {
  99. this.content = this.detail[this.contentKey[index]]
  100. },
  101. getData(){
  102. let data = {
  103. amusementId : this.id,
  104. }
  105. if(uni.getStorageSync('token')){
  106. data.token = uni.getStorageSync('token')
  107. }
  108. this.$api('queryAmusementById', data, res => {
  109. uni.stopPullDownRefresh()
  110. if(res.code == 200){
  111. this.detail = res.result.travelAmusement
  112. this.collectonFlag = res.result.collectonFlag
  113. this.content = this.detail[this.contentKey[0]]
  114. }
  115. })
  116. },
  117. toPayUrl(item, type){
  118. uni.navigateTo({
  119. url: `/pages_order/order/orderSubscribe?type=${type}&id=${item.id}`
  120. })
  121. },
  122. }
  123. }
  124. </script>
  125. <style scoped lang="scss">
  126. .page{
  127. image{
  128. width: 100%;
  129. height: 100%;
  130. }
  131. .image{
  132. width: 100%;
  133. height: 400rpx;
  134. }
  135. .box{
  136. margin-top: -40rpx;
  137. border-top-left-radius: 40rpx;
  138. border-top-right-radius: 40rpx;
  139. overflow: hidden;
  140. position: relative;
  141. .info{
  142. background-color: #fff;
  143. padding: 40rpx;
  144. .price{
  145. padding: 20rpx 0;
  146. font-size: 22rpx;
  147. text{
  148. font-size: 38rpx;
  149. color: $uni-color;
  150. font-weight: 900;
  151. }
  152. }
  153. .title{
  154. font-weight: 900;
  155. padding-bottom: 20rpx;
  156. font-size: 28rpx;
  157. }
  158. .tip{
  159. font-size: 22rpx;
  160. padding-bottom: 20rpx;
  161. line-height: 40rpx;
  162. }
  163. }
  164. .detail{
  165. margin-top: 20rpx;
  166. background-color: #fff;
  167. .content{
  168. padding: 40rpx;
  169. }
  170. }
  171. }
  172. }
  173. </style>