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

83 lines
1.8 KiB

8 months ago
8 months ago
8 months ago
5 months ago
8 months ago
7 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
7 months ago
8 months ago
8 months ago
8 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
8 months ago
7 months ago
8 months ago
8 months ago
  1. <template>
  2. <!-- 0文化遗产详情1申遗历程详情2非遗体验详情 三合一 -->
  3. <view class="page">
  4. <navbar :title="dict.title" leftClick @leftClick="$utils.navigateBack" />
  5. <view class=""
  6. style="padding: 20rpx;">
  7. <uv-parse :content="detail.articleContent || detail.experienceDetail || detail.spotDetail"></uv-parse>
  8. </view>
  9. <StudyAndPathDetailSubmit
  10. article
  11. submiitTitle="线上预约"
  12. v-if="type == 'experience'"
  13. :detail="detail"
  14. @getData="queryArticleById"
  15. @submit="toPayUrl(detail, type)"
  16. :collectonFlag="collectonFlag"
  17. :collectType="dict.collectType"
  18. />
  19. </view>
  20. </template>
  21. <script>
  22. import StudyAndPathDetailSubmit from '../components/submit/StudyAndPathDetailSubmit.vue'
  23. export default {
  24. components : {
  25. StudyAndPathDetailSubmit,
  26. },
  27. data() {
  28. return {
  29. detail : {},
  30. id : 0,
  31. type : '',
  32. dict : {},
  33. collectonFlag : false,
  34. }
  35. },
  36. onLoad(args) {
  37. this.id = args.id
  38. this.type = args.type
  39. this.dict = this.$config.dict[args.type]
  40. },
  41. onShow() {
  42. this.queryArticleById()
  43. },
  44. onPullDownRefresh(){
  45. this.queryArticleById()
  46. },
  47. methods: {
  48. queryArticleById(){
  49. let data = {
  50. articleId : this.id,
  51. experienceId : this.id,
  52. spotId : this.id,
  53. }
  54. if(uni.getStorageSync('token')){
  55. data.token = uni.getStorageSync('token')
  56. }
  57. this.$api(this.dict.api, data, res => {
  58. uni.stopPullDownRefresh()
  59. if(res.code == 200){
  60. this.detail = res.result.travelExperience || res.result
  61. this.collectonFlag = res.result.collectonFlag
  62. }
  63. })
  64. },
  65. toPayUrl(item, dictKey){
  66. uni.navigateTo({
  67. url: `/pages_order/order/orderSubscribe?type=${dictKey}&id=${item.id}`
  68. })
  69. },
  70. }
  71. }
  72. </script>
  73. <style scoped lang="scss">
  74. .page{
  75. }
  76. </style>