bundleDetail.vue 894 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <template>
  2. <view class="bundleDetail-wrap">
  3. <bundleDetail :data="bundleData" parentPage="detail"></bundleDetail>
  4. </view>
  5. </template>
  6. <script>
  7. import bundleDetail from '../bundle_detail.vue'
  8. import {getBundleDetails} from '@/api/customerBundle'
  9. export default {
  10. data() {
  11. return {
  12. bundleData: {}
  13. }
  14. },
  15. onLoad(query) {
  16. console.log(query)
  17. let id = query.id
  18. if (id){
  19. this.getDetail(id)
  20. }
  21. },
  22. components:{
  23. bundleDetail
  24. },
  25. methods: {
  26. // 查看套餐详情
  27. getDetail (id) {
  28. let _this = this
  29. getBundleDetails({id: id}).then(res => {
  30. console.log(res)
  31. if (res.status == 200) {
  32. _this.bundleData = res.data
  33. console.log(_this.bundleData)
  34. }
  35. })
  36. }
  37. }
  38. }
  39. </script>
  40. <style lang="less">
  41. .bundleDetail-wrap{
  42. width: 100%;
  43. }
  44. </style>