index.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <template>
  2. <mobile-frame>
  3. <view class="main">
  4. <view class="one">
  5. <view class="one_1">
  6. <text>¥</text><text>{{money}}</text>
  7. </view>
  8. <view class="one_2">
  9. 当前可用
  10. </view>
  11. </view>
  12. <view class="two">
  13. <view class="two_1" v-if="list&&list.length>0">
  14. 数据列表
  15. </view>
  16. <view class="two_2" v-else>
  17. 已加载完全部
  18. </view>
  19. </view>
  20. </view>
  21. </mobile-frame>
  22. </template>
  23. <script>
  24. export default {
  25. data() {
  26. return {
  27. money: 0,
  28. list: []
  29. };
  30. },
  31. onLoad: function(e) {
  32. uni.startPullDownRefresh();
  33. },
  34. methods: {
  35. },
  36. onPullDownRefresh: async function() {
  37. const that = this;
  38. that.$set(that, `list`, [])
  39. that.$set(that, `skip`, 0)
  40. that.$set(that, `limit`, 6)
  41. that.$set(that, `page`, 0)
  42. await that.search();
  43. uni.stopPullDownRefresh();
  44. }
  45. }
  46. </script>
  47. <style lang="scss">
  48. .main {
  49. display: flex;
  50. flex-direction: column;
  51. width: 100vw;
  52. height: 100vh;
  53. .one {
  54. background-color: var(--fFB1Color);
  55. text-align: center;
  56. padding: 5vw 0;
  57. .one_1 {
  58. font-size: 25px;
  59. font-weight: bold;
  60. color: #fff;
  61. margin: 0 0 2vw 0;
  62. text:nth-child(1) {
  63. font-size: 15px;
  64. padding: 0 1vw 0 0;
  65. }
  66. }
  67. .one_2 {
  68. font-size: 16px;
  69. color: #fff;
  70. }
  71. }
  72. .two {
  73. .two_2 {
  74. text-align: center;
  75. color: #858585;
  76. font-size: 14px;
  77. margin: 5vw 0;
  78. }
  79. }
  80. }
  81. </style>