directPromotionList.vue 967 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <template>
  2. <view class="page">
  3. <view :style="{height:height}" class="list">
  4. <mescroll-item ref="MescrollItem" :i="0" :index="0" :height="height">
  5. </mescroll-item>
  6. </view>
  7. <!--#ifdef H5-->
  8. <liu-drag-button @clickBtn="back">返回</liu-drag-button>
  9. <!--#endif-->
  10. </view>
  11. </template>
  12. <script>
  13. import MescrollItem from "./module/mescrollUni-item.vue";
  14. export default {
  15. components: {MescrollItem},
  16. data() {
  17. return {
  18. height:'',
  19. }
  20. },
  21. onLoad(e) {
  22. let sysInfo = uni.getSystemInfoSync()
  23. this.height = sysInfo.windowHeight - 70 + 'px' //除标题栏栏外的屏幕可用高度
  24. },
  25. methods: {
  26. back() {
  27. let pages = getCurrentPages()
  28. if (pages.length > 1){
  29. uni.navigateBack({
  30. delta: 1,
  31. fail:err=>{
  32. console.log(err)
  33. }
  34. })
  35. }else {
  36. uni.switchTab({
  37. url: '/pages/my/my'
  38. });
  39. }
  40. },
  41. }
  42. }
  43. </script>
  44. <style lang="scss" scoped>
  45. @import './index.rpx.css';
  46. </style>