index.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <template>
  2. <view>
  3. <view class="text-top">
  4. <view class="text">奖项</view>
  5. <view class="text">共{{total}}个</view>
  6. </view>
  7. <My_listbox ref="List" @getlist="getList" >
  8. <view class="list-box">
  9. <navigator class="item" v-for="item in list" :key="item.sa_awardmxid"
  10. url="">
  11. <view class="text">
  12. <view class="title u-line-2">{{ item.awardname || '--' }}</view>
  13. <view class="count u-line-1">
  14. <text style="margin-right: 118px">类型:{{ item.type || '--' }}</text>
  15. <text>金额:{{ CNY(item.price,'',false) || '--' }}元</text>
  16. </view>
  17. <view class="count u-line-1">来源:{{ item.awardheadname || '--' }}</view>
  18. </view>
  19. </navigator>
  20. </view>
  21. </My_listbox>
  22. </view>
  23. </template>
  24. <script>
  25. export default {
  26. data() {
  27. return {
  28. list: [],
  29. total:0,
  30. "content": {
  31. },
  32. }
  33. },
  34. onLoad(options){
  35. this.getList(true)
  36. uni.setNavigationBarTitle({
  37. title: '我的中奖信息'
  38. });
  39. },
  40. methods:{
  41. getList(init = false) {
  42. if (this.paging(this.content, init)) return;
  43. this.$Http.basic({
  44. "id": 20240515140302,
  45. content: this.content
  46. }).then(res => {
  47. this.$refs.List.RefreshToComplete()
  48. console.log("中奖信息", res)
  49. if (this.cutoff(res.msg)) return;
  50. this.list = res.pageNumber == 1 ? res.data : this.list.concat(res.data);
  51. this.total = res.total
  52. this.content = this.$refs.List.paging(this.content, res)
  53. })
  54. },
  55. }
  56. }
  57. </script>
  58. <style lang="scss">
  59. .text-top{
  60. display: flex;
  61. flex-direction: row;
  62. justify-content: space-between;
  63. padding: 10px;
  64. .text{
  65. font-family: Source Han Sans SC, Source Han Sans SC;
  66. font-weight: 400;
  67. font-size: 12px;
  68. color: #666666;
  69. line-height: 0px;
  70. text-align: left;
  71. font-style: normal;
  72. text-transform: none;
  73. margin-top: 10px;
  74. }
  75. }
  76. .list-box {
  77. width: 100vw;
  78. box-sizing: border-box;
  79. .item {
  80. display: flex;
  81. width: 100vw;
  82. border-radius: 5px;
  83. overflow: hidden;
  84. margin-top: 10px;
  85. background: #FFFFFF;
  86. padding: 10px;
  87. .text {
  88. flex: 1;
  89. font-family: Source Han Sans SC, Source Han Sans SC;
  90. .title {
  91. font-weight: bold;
  92. font-size: 14px;
  93. color: #333333;
  94. line-height: 24px;
  95. }
  96. .count {
  97. font-size: 12px;
  98. color: #999999;
  99. line-height: 17px;
  100. margin-top: 8px;
  101. }
  102. }
  103. }
  104. }
  105. </style>