小说小程序前端代码仓库(小程序)
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.

92 lines
1.8 KiB

4 months ago
4 months ago
  1. <template>
  2. <view class="running-water">
  3. <navbar :title="title[status]" leftClick @leftClick="leftClick" />
  4. <view class="tab-box">
  5. <view class="tab-box1" v-if="agentFlow && agentFlow.total">
  6. <uv-cell center border :title="item.title"
  7. v-for="(item, index) in agentFlow.records"
  8. :value="x[item.type] + item.money" :label="item.createTime" />
  9. </view>
  10. <view
  11. style="padding: 100rpx 0;"
  12. v-else>
  13. <uv-empty
  14. mode="history"
  15. textSize="28rpx"
  16. iconSize="100rpx"/>
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. export default {
  23. data() {
  24. return {
  25. title : ['余额记录','提现记录','佣金记录'],
  26. agentFlow : {
  27. total : 0,
  28. records : [
  29. {
  30. type : 0,
  31. money : 100,
  32. createTime : '2024-04-02 20:00',
  33. title : "佣金提现",
  34. },
  35. {
  36. type : 0,
  37. money : 100,
  38. createTime : '2024-04-02 20:00',
  39. title : "佣金提现",
  40. },
  41. {
  42. type : 0,
  43. money : 100,
  44. createTime : '2024-04-02 20:00',
  45. title : "佣金提现",
  46. },
  47. ]
  48. },
  49. x : ['+', '-' , '-' , '+'],
  50. status : 0,
  51. }
  52. },
  53. onLoad(e) {
  54. this.status = e.status
  55. },
  56. onShow() {
  57. // 更新用户信息
  58. this.$store.commit('getUserInfo')
  59. },
  60. methods: {
  61. leftClick() { //返回钱包
  62. uni.navigateBack(-1)
  63. },
  64. getAgentFlow(){ //获取流水记录
  65. let type = this.status;
  66. this.$api('getAgentFlow', { type }, res => {
  67. if(res.code == 200){
  68. this.agentFlow = res.result
  69. }
  70. })
  71. },
  72. }
  73. }
  74. </script>
  75. <style lang="scss" scoped>
  76. .running-water{
  77. width: 750rpx;
  78. background: #F5F5F5;
  79. margin: 0 auto;
  80. min-height: 100vh;
  81. .tab-box{
  82. margin: 20rpx;
  83. background-color: #fff;
  84. border-radius: 20rpx;
  85. overflow: hidden;
  86. }
  87. }
  88. </style>