good-activity.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <view class="common_contant" :style="{padding: isBig ? '' : '24rpx'}">
  3. <tui-skeleton
  4. v-if="skeletonShow"
  5. backgroundColor="#fafafa"
  6. borderRadius="10rpx"
  7. :isLoading="true"
  8. :loadingType="5"
  9. ></tui-skeleton>
  10. <view class="" v-else>
  11. <view class="img_big" v-if="isBig">
  12. <image src="" mode="aspectFill"></image>
  13. </view>
  14. <view class="special_all" v-else>
  15. <SpecialItem v-for='item in 3' :key="item"/>
  16. </view>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. import SpecialItem from './components/cm-special.vue'
  22. export default {
  23. components: {
  24. SpecialItem
  25. },
  26. data() {
  27. return {
  28. isBig: false,
  29. skeletonShow: true,
  30. specialList: [], // 活动数据
  31. }
  32. },
  33. mounted() {},
  34. onLoad(options) {
  35. this.specialInfo(options.jumpActiveId)
  36. },
  37. methods: {
  38. // 网络请求
  39. async specialInfo(id){
  40. try{
  41. const res = await this.SpecialService.specialInfo({organizeId:1,id:id})
  42. this.specialList = res.data
  43. this.skeletonShow = false
  44. }catch(error){
  45. console.log('error',error)
  46. }
  47. }
  48. }
  49. }
  50. </script>
  51. <style scoped lang="scss">
  52. .common_contant {
  53. background-color: #FFFFFF;
  54. padding: 24rpx;
  55. }
  56. </style>