cooperation.vue 972 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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: {
  16. MescrollItem
  17. },
  18. data() {
  19. return {
  20. height:''
  21. }
  22. },
  23. onLoad(e) {
  24. let sysInfo = uni.getSystemInfoSync()
  25. this.height = sysInfo.windowHeight - 70 + 'px' //除标题栏栏外的屏幕可用高度
  26. },
  27. methods: {
  28. back() {
  29. let pages = getCurrentPages()
  30. if (pages.length > 1){
  31. uni.navigateBack({
  32. delta: 1,
  33. fail:err=>{
  34. console.log(err)
  35. }
  36. })
  37. }else {
  38. uni.switchTab({
  39. url: '/pages/my/my'
  40. });
  41. }
  42. },
  43. }
  44. }
  45. </script>
  46. <style lang="scss" scoped>
  47. @import './index.rpx.css';
  48. </style>