特易招,招聘小程序
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.

158 lines
2.9 KiB

7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
  1. <template>
  2. <!-- 积分记录 -->
  3. <view class="IntegralRecord">
  4. <navbar :title="title" leftClick @leftClick="leftClick" />
  5. <view class="const">
  6. <view class="number">
  7. 当前积分
  8. <view>
  9. {{ formal.score + temporarily.score }}
  10. </view>
  11. </view>
  12. <view class="bottom">
  13. <view>
  14. 正式积分{{ formal.score }}
  15. </view>
  16. <view>
  17. 临时积分{{ temporarily.score }}
  18. </view>
  19. </view>
  20. </view>
  21. <view class="">
  22. <uv-tabs :list="tabs"
  23. lineColor="#3796F8"
  24. lineHeight="8rpx"
  25. lineWidth="50rpx"
  26. @click="clickTabs"></uv-tabs>
  27. </view>
  28. <view class="tab-box">
  29. <view class="tab-box1" v-if="total">
  30. <uv-cell center border :title="item.title"
  31. v-for="(item, index) in list"
  32. :value="x[item.type] + item.score" :label="item.createTime" />
  33. </view>
  34. <view
  35. style="padding: 100rpx 0;"
  36. v-else>
  37. <uv-empty
  38. mode="history"
  39. textSize="28rpx"
  40. iconSize="100rpx"/>
  41. </view>
  42. </view>
  43. </view>
  44. </template>
  45. <script>
  46. import mixinList from '@/mixins/list.js'
  47. export default {
  48. mixins : [mixinList],
  49. data() {
  50. return {
  51. title : '积分记录',
  52. x : ['+', '-'],
  53. status : 0,
  54. tabs: [
  55. {
  56. name: '收入'
  57. },
  58. {
  59. name: '消耗'
  60. },
  61. ],
  62. type : 0,
  63. mixinsListApi : 'commonQueryScoreRecord',
  64. // 正式积分
  65. formal : {
  66. score : 0
  67. },
  68. // 临时积分
  69. temporarily : {
  70. score : 0
  71. },
  72. }
  73. },
  74. onLoad(e) {
  75. this.status = e.status
  76. this.queryParams.type = this.type
  77. },
  78. onShow() {
  79. this.getCounst()
  80. },
  81. methods: {
  82. leftClick() { //返回钱包
  83. uni.navigateBack(-1)
  84. },
  85. clickTabs({index}) {
  86. this.type = index
  87. this.queryParams.type = this.type
  88. this.getData()
  89. },
  90. getCounst(){
  91. this.$api('commonQueryScore', {type : 0}, res => {
  92. if(res.code == 200){
  93. this.formal = res.result
  94. }
  95. })
  96. this.$api('commonQueryScore', {type : 1}, res => {
  97. if(res.code == 200){
  98. this.temporarily = res.result
  99. }
  100. })
  101. },
  102. }
  103. }
  104. </script>
  105. <style lang="scss" scoped>
  106. .IntegralRecord{
  107. width: 750rpx;
  108. background: #fff;
  109. margin: 0 auto;
  110. min-height: 100vh;
  111. .const{
  112. display: flex;
  113. flex-direction: column;
  114. margin: 40rpx 20rpx;
  115. box-shadow: 0 0 6rpx 6rpx #00000011;
  116. border-radius: 20rpx;
  117. overflow: hidden;
  118. .number{
  119. display: flex;
  120. flex-direction: column;
  121. justify-content: center;
  122. align-items: center;
  123. padding: 40rpx;
  124. background-color: $uni-color;
  125. color: #fff;
  126. view{
  127. font-size: 40rpx;
  128. font-weight: 900;
  129. }
  130. }
  131. .bottom{
  132. color: $uni-color;
  133. display: flex;
  134. view{
  135. flex: 1;
  136. display: flex;
  137. justify-content: center;
  138. align-items: center;
  139. padding: 20rpx;
  140. }
  141. view:nth-child(1){
  142. border-right: 1rpx solid $uni-color;
  143. }
  144. }
  145. }
  146. .tab-box{
  147. margin: 20rpx;
  148. background-color: #fff;
  149. border-radius: 20rpx;
  150. overflow: hidden;
  151. }
  152. }
  153. </style>