jydetail.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <template>
  2. <view class="detail_wrap">
  3. <nav-logo title="祥粤云学堂"></nav-logo>
  4. <view class="detail_wrap_title">{{ goodsDetail.goodsName }}</view>
  5. <view class="content">
  6. <handouts-box
  7. :handoutsId="goodsDetail.handoutsId"
  8. v-if="goodsDetail.handoutsId"
  9. />
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. import handoutsBox from "@/components/course/handoutsBox.vue";
  15. export default {
  16. name: "SaasMiniprogramJydetail",
  17. data() {
  18. return {
  19. options: {},
  20. goodsDetail: {},
  21. };
  22. },
  23. async onLoad(options) {
  24. this.options = options;
  25. if (this.options.skipPort) {
  26. await this.$method.skipLogin(this.options.skipPort);
  27. }
  28. if (this.$method.isGoLogin()) {
  29. return;
  30. }
  31. this.getGoodsDetail();
  32. },
  33. methods: {
  34. getGoodsDetail() {
  35. this.$api.goodsDetail(this.options.id).then((res) => {
  36. this.goodsDetail = res.data.data;
  37. });
  38. },
  39. },
  40. components: {
  41. handoutsBox,
  42. },
  43. };
  44. </script>
  45. <style>
  46. page {
  47. background: #eaeef1;
  48. }
  49. </style>
  50. <style lang="scss" scoped>
  51. .content {
  52. padding: 16rpx;
  53. }
  54. .detail_wrap_title {
  55. background: #ffffff;
  56. color: #222222;
  57. font-size: 32rpx;
  58. padding: 30rpx 106rpx 28rpx 22rpx;
  59. }
  60. </style>