瑶都万能墙
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.

143 lines
3.0 KiB

8 months ago
2 months ago
8 months ago
6 months ago
2 months ago
6 months ago
2 months ago
2 days ago
2 months ago
2 days ago
2 months ago
2 days ago
2 months ago
8 months ago
6 months ago
8 months ago
6 months ago
8 months ago
2 months ago
6 months ago
8 months ago
2 months ago
6 months ago
8 months ago
6 months ago
8 months ago
6 months ago
8 months ago
6 months ago
8 months ago
2 months ago
8 months ago
  1. <template>
  2. <view class="running-water">
  3. <navbar :title="title[status]" leftClick @leftClick="leftClick" />
  4. <userShopCommission/>
  5. <view class="tab-box">
  6. <view class="tab-box1">
  7. <!-- <uv-cell
  8. center
  9. border
  10. :title="item.title"
  11. v-for="(item, index) in list"
  12. :value="x[item.type] + item.intger"
  13. :label="item.createTime" /> -->
  14. <uv-cell center border
  15. :key="item.id"
  16. :title="item.title" v-for="(item, index) in list"
  17. :label="item.createTime">
  18. <template #value>
  19. <view class="info">
  20. <view class="price">
  21. {{ x[item.type] + item.price }}
  22. </view>
  23. <view class="uni-color-btn"
  24. @click="requestMerchantTransfer(item)"
  25. v-if="item.type == 1 && item.state == 4"
  26. >
  27. 领取
  28. </view>
  29. <view class="status"
  30. v-else>
  31. {{ item.state_dictText }}
  32. </view>
  33. </view>
  34. </template>
  35. </uv-cell>
  36. </view>
  37. <view
  38. style="padding: 100rpx 0;"
  39. v-if="list.length == 0">
  40. <uv-empty
  41. mode="history"
  42. textSize="28rpx"
  43. iconSize="100rpx"/>
  44. </view>
  45. </view>
  46. </view>
  47. </template>
  48. <script>
  49. import userShopCommission from '@/components/userShop/userShopCommission.vue'
  50. import mixinsList from '@/mixins/list.js'
  51. export default {
  52. components : {
  53. userShopCommission,
  54. },
  55. mixins: [mixinsList],
  56. data() {
  57. return {
  58. mixinsListApi : 'getWalletFlow',
  59. title : ['余额记录','积分记录'],
  60. agentFlow : {
  61. total : 0,
  62. records : [
  63. {
  64. type : 0,
  65. money : 100,
  66. createTime : '2024-04-02 20:00',
  67. title : "佣金提现",
  68. },
  69. {
  70. type : 0,
  71. money : 100,
  72. createTime : '2024-04-02 20:00',
  73. title : "佣金提现",
  74. },
  75. {
  76. type : 0,
  77. money : 100,
  78. createTime : '2024-04-02 20:00',
  79. title : "佣金提现",
  80. },
  81. ]
  82. },
  83. x : ['-' , '+'],
  84. status : 0,
  85. }
  86. },
  87. onLoad(e) {
  88. this.status = e.status
  89. this.mixinsListApi = ['getWalletFlow', 'getPointsFlow'][e.status]
  90. },
  91. methods: {
  92. leftClick() { //返回钱包
  93. uni.navigateBack(-1)
  94. },
  95. requestMerchantTransfer(item) {
  96. if (!wx.canIUse('requestMerchantTransfer')) {
  97. wx.showModal({
  98. content: '你的微信版本过低,请更新至最新版本。',
  99. showCancel: false,
  100. });
  101. return
  102. }
  103. wx.requestMerchantTransfer({
  104. mchId: '1684424511',
  105. appId: wx.getAccountInfoSync().miniProgram.appId,
  106. package: item.packageInfo,
  107. success: (res) => {
  108. // res.err_msg将在页面展示成功后返回应用时返回ok,并不代表付款成功
  109. console.log('success:', res);
  110. this.getData()
  111. },
  112. fail: (res) => {
  113. console.log('fail:', res);
  114. this.getData()
  115. },
  116. });
  117. },
  118. }
  119. }
  120. </script>
  121. <style lang="scss" scoped>
  122. .running-water{
  123. width: 750rpx;
  124. background: #F5F5F5;
  125. margin: 0 auto;
  126. min-height: 100vh;
  127. .tab-box{
  128. margin: 20rpx;
  129. background-color: #fff;
  130. border-radius: 20rpx;
  131. overflow: hidden;
  132. }
  133. }
  134. </style>