index.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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, index) in list" :key="item.sa_awardmxid"
  10. :url="'/cloud/winningNews/detail?data=' + JSON.stringify(item)" @click="toDetail(index)">
  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. toDetail(index) {
  56. this.$Http.changeItem = function (item) {
  57. this.$set(this.list, index, item)
  58. }.bind(this)
  59. }
  60. }
  61. }
  62. </script>
  63. <style lang="scss">
  64. .text-top {
  65. display: flex;
  66. flex-direction: row;
  67. justify-content: space-between;
  68. padding: 10px;
  69. .text {
  70. font-family: Source Han Sans SC, Source Han Sans SC;
  71. font-weight: 400;
  72. font-size: 12px;
  73. color: #666666;
  74. line-height: 0px;
  75. text-align: left;
  76. font-style: normal;
  77. text-transform: none;
  78. margin-top: 10px;
  79. }
  80. }
  81. .list-box {
  82. width: 100vw;
  83. box-sizing: border-box;
  84. .item {
  85. display: flex;
  86. width: 100vw;
  87. border-radius: 5px;
  88. overflow: hidden;
  89. margin-top: 10px;
  90. background: #FFFFFF;
  91. padding: 10px;
  92. .text {
  93. flex: 1;
  94. font-family: Source Han Sans SC, Source Han Sans SC;
  95. .title {
  96. font-weight: bold;
  97. font-size: 14px;
  98. color: #333333;
  99. line-height: 24px;
  100. }
  101. .count {
  102. font-size: 12px;
  103. color: #999999;
  104. line-height: 17px;
  105. margin-top: 8px;
  106. }
  107. }
  108. }
  109. }
  110. </style>