jydetail.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. import { metaSetScalable } from "../../common/navTo";
  16. export default {
  17. name: "SaasMiniprogramJydetail",
  18. data() {
  19. return {
  20. options: {},
  21. goodsDetail: {},
  22. };
  23. },
  24. onShow() {
  25. // #ifdef H5
  26. metaSetScalable("no");
  27. // #endif
  28. },
  29. async onLoad(options) {
  30. this.options = options;
  31. if (this.options.skipPort) {
  32. await this.$method.skipLogin(this.options.skipPort);
  33. }
  34. if (this.$method.isGoLogin()) {
  35. return;
  36. }
  37. this.getGoodsDetail();
  38. },
  39. methods: {
  40. getGoodsDetail() {
  41. this.$api.goodsDetail(this.options.id).then((res) => {
  42. this.goodsDetail = res.data.data;
  43. });
  44. },
  45. metaSetScalable1() {
  46. let meta = document.querySelector(".meta_scalable_yes");
  47. console.log("🚀 ~ file: jydetail.vue:47 ~ metaSetScalable ~ meta:", meta);
  48. if (meta) {
  49. meta.remove();
  50. }
  51. document.querySelector(".meta_scalable_yes");
  52. console.log("12321321", meta);
  53. },
  54. },
  55. components: {
  56. handoutsBox,
  57. },
  58. };
  59. </script>
  60. <style>
  61. page {
  62. background: #eaeef1;
  63. }
  64. </style>
  65. <style lang="scss" scoped>
  66. .content {
  67. padding: 16rpx;
  68. }
  69. .detail_wrap_title {
  70. background: #ffffff;
  71. color: #222222;
  72. font-size: 32rpx;
  73. padding: 30rpx 106rpx 28rpx 22rpx;
  74. }
  75. </style>