tranRecord.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <template>
  2. <view class="page">
  3. <uni-nav-bar rightWidth='136rpx' title="记录" fixed :border="false" statusBar backgroundColor="#24234B" color="#FFFFFF">
  4. <template #left>
  5. <view class="cl-topbar__icon" @click="navigateBack">
  6. <text class="cl-icon-arrow-left"></text>
  7. </view>
  8. </template>
  9. </uni-nav-bar>
  10. <view class="list_info">
  11. <view class="item" v-for="(item,index) in list">
  12. <view class="left">
  13. <view class="name">{{item.name}}</view>
  14. <view class="desc">{{item.create_time}}</view>
  15. </view>
  16. <text class="right">
  17. <view class="num">{{item.type}} {{item.num}}</view>
  18. </text>
  19. </view>
  20. <view class="no-content" v-if="nodata">
  21. <image class="icon" mode="widthFix" src="http://c.yujianmate.com/images/v1/w3/empty.png"></image>
  22. <text>暂无数据</text>
  23. </view>
  24. <view class="blankHeight"></view>
  25. </view>
  26. <DialogBox ref="DialogBox"></DialogBox>
  27. </view>
  28. </template>
  29. <script>
  30. import uniNavBar from '../../components/uni-ui/uni-nav-bar/uni-nav-bar.vue'
  31. export default {
  32. components: {uniNavBar},
  33. data() {
  34. return {
  35. tab: 1,
  36. scrollTop: 0,
  37. old: {
  38. scrollTop: 0
  39. },
  40. list: [],
  41. stype: '',
  42. nodata: true,
  43. }
  44. },
  45. onLoad(parms) {
  46. this.stype = parms.stype || ''
  47. // setTimeout(function() {
  48. // uni.setNavigationBarColor({
  49. // frontColor: '#ffffff',
  50. // backgroundColor: '#00000000',
  51. // animation: {
  52. // duration: 400,
  53. // timingFunc: 'easeIn'
  54. // }
  55. // })
  56. // }, 200);
  57. },
  58. onShow() {
  59. this.loadData();
  60. },
  61. methods: {
  62. navigateBack(){
  63. uni.navigateBack(1)
  64. },
  65. onBack() {},
  66. checkTab(tab) {
  67. this.tab = tab;
  68. // this.loadData();
  69. },
  70. scroll: function(e) {
  71. console.log(e)
  72. this.old.scrollTop = e.detail.scrollTop
  73. },
  74. loadData() {
  75. console.log({
  76. uuid: getApp().globalData.uuid,
  77. skey: getApp().globalData.skey
  78. });
  79. uni.request({
  80. url: this.$apiHost + '/My/recordlist',
  81. data: {
  82. uuid: getApp().globalData.uuid,
  83. type: 'GMB',
  84. stype: this.stype
  85. },
  86. header: {
  87. "content-type": "application/json",
  88. 'sign': getApp().globalData.headerSign
  89. },
  90. success: (res) => {
  91. console.log("----:", res.data);
  92. this.list = res.data.list;
  93. if (this.list != null && this.list != undefined) {
  94. this.nodata = false;
  95. }
  96. },
  97. complete: (com) => {
  98. // uni.hideLoading();
  99. },
  100. fail: (e) => {
  101. console.log("----e:", e);
  102. }
  103. });
  104. },
  105. }
  106. }
  107. </script>
  108. <style scoped lang="scss">
  109. @import 'tranRecord.scss';
  110. </style>