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

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