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

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