You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

104 lines
2.4 KiB

1 week ago
  1. <template>
  2. <view class="personal-point">
  3. <view class="personal-point-header">
  4. <view class="personal-point-show">
  5. <view class="personal-point-value">
  6. {{currentPonit}}
  7. <view style="font-size: 16px; margin-left: 5px;">
  8. 当前积分
  9. </view>
  10. </view>
  11. <view class="personal-point-img">
  12. <img src="https://catmdogf.oss-cn-shanghai.aliyuncs.com/CMDF/front/personal/point/qianbi.png" alt="point" style="width: 108px; height: 88px;" mode="widthFix"/>
  13. </view>
  14. </view>
  15. <view class="personal-point-list" v-if="pointList.length>0">
  16. <view v-for="(item,index) in pointList" :key="index" class="personal-point-list-item">
  17. <view class="personal-point-list-item-date">
  18. {{item.createAt}}
  19. </view>
  20. <view class="personal-point-list-item-value">
  21. {{item.action == 'added' ? '+':'-'}} {{item.point}}
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. import {getPointList} from "@/api/system/personal.js"
  30. export default{
  31. data(){
  32. return{
  33. currentPonit:0,
  34. pointList:[]
  35. }
  36. },
  37. mounted() {
  38. this.getPointList();
  39. },
  40. methods:{
  41. getPointList(){
  42. getPointList().then(res=>{
  43. this.pointList = res.content
  44. if(this.pointList.length>0){
  45. this.currentPonit = res.content[0].pointAfter || 0
  46. }
  47. })
  48. }
  49. }
  50. }
  51. </script>
  52. <style lang="scss">
  53. .personal-point{
  54. .personal-point-header{
  55. display: flex;
  56. justify-content: center;
  57. flex-wrap: wrap;
  58. align-content:flex-start;
  59. width: 100%;
  60. height: 226px;
  61. flex-shrink: 0;
  62. background: linear-gradient(0deg, #F5F5F7 0%, #FFBF60 99.41%);
  63. .personal-point-show{
  64. width: 100%;
  65. height: 95px;
  66. display: flex;
  67. justify-content: space-between;
  68. align-items: center;
  69. padding: 10px 30px;
  70. .personal-point-value{
  71. color: #FFF;
  72. font-size: 38px;
  73. display: flex;
  74. align-items: baseline;
  75. }
  76. }
  77. .personal-point-list{
  78. margin: 10px;
  79. width: 100%;
  80. border-radius: 8px;
  81. background-color: #FFF;
  82. .personal-point-list-item{
  83. display: flex;
  84. justify-content: space-between;
  85. align-items: center;
  86. height: 48px;
  87. border-bottom: 1px solid #efefef;
  88. margin-left: 15px;
  89. padding-right: 15px;
  90. .personal-point-list-item-date{
  91. color: #333;
  92. font-size: 14px;
  93. }
  94. .personal-point-list-item-value{
  95. color: #FFAA48;
  96. font-size: 14px;
  97. }
  98. }
  99. }
  100. }
  101. }
  102. </style>