courseAd.vue 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <template>
  2. <div>
  3. <van-nav-bar
  4. :title="title"
  5. right-text="名额变动"
  6. @click-left="onClickLeft"
  7. @click-right="onClickRight"
  8. >
  9. <template #left>
  10. <van-icon name="wap-home-o" size="22" />
  11. </template>
  12. </van-nav-bar>
  13. <div class="listContent">
  14. <scroller ref="scroller" :on-infinite="onscrollB" :isInitRefresh="false">
  15. <courseList
  16. :dataList="courseMap"
  17. :showNum="1"
  18. ></courseList>
  19. </scroller>
  20. </div>
  21. </div>
  22. </template>
  23. <script>
  24. import courseList from "../components/courseList.vue";
  25. export default {
  26. name: "",
  27. components: { courseList },
  28. props: [],
  29. data() {
  30. return {
  31. title: "我的推广",
  32. courseMap: [
  33. {
  34. id: 123,
  35. surplus: 120,
  36. sale: 341,
  37. title:
  38. "大撒大声地大萨达大萨达撒大声地的撒旦撒旦撒打算打算大萨达萨达大萨达",
  39. price: 598,
  40. courseNum: 14,
  41. url: "/static/img/course.f1777cf.jpg"
  42. },
  43. {
  44. id: 124,
  45. surplus: 120,
  46. sale: 341,
  47. title:
  48. "大撒大声地大萨达大萨达撒大声地的撒旦撒旦撒打算打算大萨达萨达大萨达",
  49. price: 598,
  50. courseNum: 14,
  51. url: "/static/img/course.f1777cf.jpg"
  52. },
  53. {
  54. id: 125,
  55. surplus: 120,
  56. sale: 341,
  57. title:
  58. "大撒大声地大萨达大萨达撒大声地的撒旦撒旦撒打算打算大萨达萨达大萨达",
  59. price: 598,
  60. courseNum: 14,
  61. url: "/static/img/course.f1777cf.jpg"
  62. }
  63. ]
  64. };
  65. },
  66. created() {},
  67. methods: {
  68. onscrollB() {
  69. console.log("触底了");
  70. },
  71. onClickLeft() {
  72. this.$router.push("/courseHome");
  73. },
  74. onClickRight() {
  75. this.$router.push(`/course/limitChange`);
  76. }
  77. },
  78. computed: {}
  79. };
  80. </script>
  81. <style scoped lang="scss">
  82. *{
  83. margin: 0;
  84. padding: 0;
  85. }
  86. img{
  87. display: block;
  88. }
  89. .listContent{
  90. height: calc(100vh - .9rem);
  91. position: relative;
  92. }
  93. </style>