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

163 lines
3.5 KiB

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