商城类、订单类uniapp模板,多角色
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.

88 lines
1.7 KiB

5 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. methods: {
  57. leftClick() { //返回钱包
  58. uni.navigateBack(-1)
  59. },
  60. getAgentFlow(){ //获取流水记录
  61. let type = this.status;
  62. this.$api('getAgentFlow', { type }, res => {
  63. if(res.code == 200){
  64. this.agentFlow = res.result
  65. }
  66. })
  67. },
  68. }
  69. }
  70. </script>
  71. <style lang="scss" scoped>
  72. .running-water{
  73. width: 750rpx;
  74. background: #F5F5F5;
  75. margin: 0 auto;
  76. min-height: 100vh;
  77. .tab-box{
  78. margin: 20rpx;
  79. background-color: #fff;
  80. border-radius: 20rpx;
  81. overflow: hidden;
  82. }
  83. }
  84. </style>