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.

243 lines
4.9 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="distribution">
  3. <mNavbar title="分销代理" :leftClick="leftClick" />
  4. <view class="box">
  5. <view class="box1" />
  6. <view class="content">
  7. <view class="content-box">
  8. <view class="content-box1">
  9. <view>总佣金</view>
  10. <view>累计提现</view>
  11. <!-- <view>累积收益</view> -->
  12. </view>
  13. <view class="content-box2">
  14. <view>{{ agentFlow.use_money }}</view>
  15. <view>{{ agentFlow.lei_give }}</view>
  16. <!-- <view>{{ agentFlow.lei_set }}</view> -->
  17. </view>
  18. <view class="content-box3">
  19. <view @click="toNodes">
  20. <text>提现</text>
  21. </view>
  22. <view @click="toWithdraw">
  23. <text>提现记录</text>
  24. </view>
  25. <!-- <view @click="showQrcode">
  26. <text>二维码</text>
  27. </view> -->
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. <van-tabs v-model:active="active" @change="tagChange">
  33. <van-tab v-for="(item,index) in tabs" :key="index" :title="item.title"></van-tab>
  34. </van-tabs>
  35. <view class="tab-box">
  36. <view class="tab-box1" v-if="agentFlow.pageList && agentFlow.pageList.total">
  37. <van-cell center border :title="item.title" v-for="(item, index) in agentFlow.pageList.records"
  38. :label="item.createTime">
  39. <template #value>
  40. <view :class="{ addMonry : x[item.type] == '+'}">
  41. {{ x[item.type] + item.money }}
  42. </view>
  43. </template>
  44. </van-cell>
  45. </view>
  46. <van-empty v-else description="暂无数据" image="/static/ms/empty.png" />
  47. </view>
  48. <van-overlay :show="show" @click="show = false" z-index="999999">
  49. <div style="display: flex;justify-content: center;
  50. height: 100%;align-items: center;">
  51. <placard ref="placard"></placard>
  52. </div>
  53. </van-overlay>
  54. </view>
  55. </template>
  56. <script>
  57. import mNavbar from '@/components/base/m-navbar.vue'
  58. import placard from '@/components/placard.vue'
  59. export default {
  60. components: {
  61. mNavbar,
  62. placard
  63. },
  64. data() {
  65. return {
  66. imageUrl: '',
  67. show: false,
  68. agentFlow: {},
  69. x: ['+', '-', '+'],
  70. type: 0,
  71. active : 0,
  72. tabs : [
  73. { title : '金额明细' },
  74. { title : '提现记录' }
  75. ]
  76. }
  77. },
  78. onShow() {
  79. this.getAgentFlow()
  80. },
  81. methods: {
  82. getAgentFlow() {
  83. this.$api('getAgentFlow', {
  84. type: this.type
  85. }, res => {
  86. if (res.code == 200) {
  87. this.agentFlow = res.result
  88. }
  89. })
  90. },
  91. toNodes() {
  92. uni.navigateTo({
  93. url: '/pages/mine/nodes'
  94. })
  95. },
  96. leftClick() { //返回个人中心
  97. uni.switchTab({
  98. url: '/pages/index/center'
  99. })
  100. },
  101. showQrcode() {
  102. this.show = true
  103. // this.$api('showQrcode', {}, res => {
  104. // if (res.code == 200) {
  105. // this.imageUrl = res.result
  106. // }
  107. // })
  108. setTimeout(() => {
  109. this.$refs.placard.draw()
  110. })
  111. },
  112. tagChange(index) { //选中标签发生改变
  113. this.type = index;
  114. this.getAgentFlow()
  115. },
  116. toWithdraw() { //跳转充值页面
  117. uni.navigateTo({
  118. url: '/pages/mine/withdraw'
  119. })
  120. }
  121. }
  122. }
  123. </script>
  124. <style scoped lang="scss">
  125. .distribution {
  126. background-color: #f3f3f3;
  127. min-height: 100vh;
  128. .box {
  129. position: relative;
  130. width: 100%;
  131. height: 175px;
  132. background-color: #fff;
  133. .box1 {
  134. height: 100px;
  135. background: #F6BEC3;
  136. }
  137. .content {
  138. position: absolute;
  139. display: flex;
  140. justify-content: space-around;
  141. width: 94%;
  142. height: 140px;
  143. background-color: #F5FDFB;
  144. top: 20px;
  145. left: 3%;
  146. z-index: 9;
  147. border-radius: 10px;
  148. box-shadow: 0px 1px 7px 1px rgba(0,0,0,.1);
  149. .content-box {
  150. display: flex;
  151. width: 94%;
  152. height: 94%;
  153. flex-direction: column;
  154. align-items: self-end;
  155. .content-box1 {
  156. display: flex;
  157. width: 100%;
  158. height: 60px;
  159. justify-content: space-around;
  160. align-items: center;
  161. view {
  162. width: 200rpx;
  163. display: flex;
  164. justify-content: space-around;
  165. }
  166. }
  167. .content-box2 {
  168. display: flex;
  169. width: 100%;
  170. height: 60px;
  171. justify-content: space-around;
  172. align-items: center;
  173. view {
  174. width: 200rpx;
  175. display: flex;
  176. justify-content: space-around;
  177. color: #F6BEC3;
  178. font-size: 18px;
  179. }
  180. }
  181. .content-box3 {
  182. display: flex;
  183. width: 100%;
  184. height: 60px;
  185. justify-content: space-around;
  186. align-items: center;
  187. view {
  188. width: 200rpx;
  189. display: flex;
  190. justify-content: space-around;
  191. align-items: center;
  192. }
  193. text {
  194. display: inline-block;
  195. padding: 5px 20px;
  196. text-align: center;
  197. border: 1px solid #F6BEC3;
  198. color: #F6BEC3;
  199. border-radius: 5px;
  200. }
  201. }
  202. }
  203. }
  204. }
  205. .tab-box {
  206. width: 96%;
  207. margin-top: 10px;
  208. margin-left: 2%;
  209. background-color: #fff;
  210. border-radius: 10px;
  211. overflow: hidden;
  212. .tab-box1 {
  213. margin-top: 10px;
  214. }
  215. .addMonry{
  216. color: #FC5341;
  217. }
  218. }
  219. }
  220. </style>