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.

375 lines
7.3 KiB

  1. <template>
  2. <view class="app-container">
  3. <view class="agent-content">
  4. <view class="ag-sign" @click="cashManager">
  5. 提现管理
  6. </view>
  7. <view class="agent-top">
  8. <view class="ag-num">
  9. <view class="au-font">
  10. </view>
  11. <view class="au-num">
  12. {{accountInfo.wallet_balance}}
  13. </view>
  14. </view>
  15. <view class="age-font">
  16. 可提现
  17. </view>
  18. <view class="age-line">
  19. <img src="../../static/index/line-style.png" style="width: 200rpx;height: 2rpx;" alt="" srcset="" />
  20. </view>
  21. <view class="age-wait">
  22. 待入账{{accountInfo.waiting_amount}}
  23. </view>
  24. <view class="divider-style"></view>
  25. <view class="information-id-content">
  26. <view class="content-id-item">
  27. <view class="id-text">
  28. 代理ID
  29. </view>
  30. <view class="id-value">
  31. {{accountInfo.id}}
  32. </view>
  33. <view class="id-text" style="margin-left:2em;">
  34. 商户数量
  35. </view>
  36. <view class="id-value">
  37. {{accountInfo.merchant_count}}
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. <view class="agent-main">
  43. <view class="agm-title">
  44. 订单列表
  45. </view>
  46. <view class="ordering-information">
  47. <view class="ordering-information-item" v-if="!orderList.length">
  48. <view class="order-number">暂无订单</view>
  49. </view>
  50. <view class="ordering-information-item" v-for="order in orderList" :key="order.out_trade_no">
  51. <view class="order-number">订单编号 {{order.out_trade_no}}</view>
  52. <view class="ordering-item-content">
  53. <view class="ordering-pic">
  54. <image class="order-chart" :src="order.merchant.logo" />
  55. </view>
  56. <view class="ordering-text">
  57. <view class="ordering-text-title">{{order.merchant.name}}</view>
  58. <view class="amount-of-money">金额<span class="price-style">{{order.amount}}</span></view>
  59. <view class="amount-of-money">收益<span class="price-style">{{order.agent_income}}</span></view>
  60. <view class="order-time">订单时间{{order.paid_at}}</view>
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. <view class="load-more" @click="getOrderList">{{ hasMore ? '加载更多数据...' : '已加载完毕' }}</view>
  66. </view>
  67. </view>
  68. </view>
  69. </template>
  70. <script>
  71. import {
  72. agentAccountInfo,
  73. agentOrderList
  74. } from '../../common/api.js'
  75. export default {
  76. data() {
  77. return {
  78. accountInfo: {},
  79. orderList: [],
  80. hasMore: true,
  81. page: 0,
  82. }
  83. },
  84. onLoad() {
  85. this.getAccountInfo();
  86. this.getOrderList();
  87. },
  88. onReachBottom() {
  89. this.getOrderList()
  90. },
  91. methods: {
  92. getAccountInfo() {
  93. agentAccountInfo().then(data => this.accountInfo = data)
  94. },
  95. getOrderList() {
  96. if (!this.hasMore) {
  97. return
  98. }
  99. this.page++
  100. agentOrderList({
  101. page: this.page,
  102. page_size: 15
  103. }).then(data => {
  104. this.orderList = [...this.orderList, ...data.list]
  105. this.hasMore = data.has_more
  106. })
  107. },
  108. cashManager() {
  109. uni.navigateTo({
  110. url: '/pages/cash/cash'
  111. });
  112. }
  113. }
  114. }
  115. </script>
  116. <style lang="scss">
  117. .agent-content {
  118. position: relative;
  119. width: 100%;
  120. height: 1400rpx;
  121. padding-left: 30rpx;
  122. padding-right: 30rpx;
  123. background: url(../../static/index/principal-sheet-bg.png) no-repeat top center;
  124. background-size: 100% 100%;
  125. box-sizing: border-box;
  126. .ag-sign {
  127. position: absolute;
  128. right: 0;
  129. top: 0;
  130. width: 160rpx;
  131. height: 60rpx;
  132. line-height: 60rpx;
  133. padding-left: 40rpx;
  134. border-bottom-left-radius: 30rpx;
  135. color: #fff;
  136. font-size: 24rpx;
  137. background: #FCC565;
  138. box-sizing: border-box;
  139. cursor: pointer;
  140. }
  141. .agent-top {
  142. text-align: center;
  143. .ag-num {
  144. display: flex;
  145. justify-content: center;
  146. padding-top: 20rpx;
  147. color: #fff;
  148. .au-font {
  149. margin-top: 45rpx;
  150. font-size: 14px;
  151. margin-right: 10rpx;
  152. line-height: 28rpx;
  153. }
  154. .au-num {
  155. font-size: 30px;
  156. font-weight: bold;
  157. }
  158. }
  159. .age-font {
  160. margin-top: 10rpx;
  161. font-size: 16px;
  162. line-height: 1.5;
  163. font-family: PingFangSC-Regular, sans-serif;
  164. font-size: 30rpx;
  165. color: #fff;
  166. font-weight: bold;
  167. }
  168. .age-line {
  169. margin: 20rpx auto 0;
  170. width: 200rpx;
  171. height: 2rpx;
  172. img {
  173. display: block;
  174. margin: 0 auto;
  175. }
  176. }
  177. .age-wait {
  178. margin-top: 20rpx;
  179. font-family: PingFangSC-Regular, sans-serif;
  180. color: #fff;
  181. font-size: 30rpx;
  182. font-weight: bold;
  183. }
  184. }
  185. .agent-main {
  186. margin-top: 30rpx;
  187. padding-top: 30rpx;
  188. padding-bottom: 30rpx;
  189. background: #fff;
  190. border-top-left-radius: 20rpx;
  191. border-top-right-radius: 20rpx;
  192. .agm-title {
  193. padding-left: 30rpx;
  194. margin-left: 30rpx;
  195. color: #454545;
  196. font-weight: normal;
  197. font-size: 30rpx;
  198. line-height: 1.5;
  199. background: url(../../static/index/title-style.png) no-repeat left center;
  200. background-size: 15rpx 19rpx;
  201. }
  202. .agm-sitem {
  203. .ags-cell {
  204. display: flex;
  205. justify-content: space-between;
  206. height: 90rpx;
  207. line-height: 90rpx;
  208. margin-left: 30rpx;
  209. margin-right: 30rpx;
  210. .agc-title {
  211. height: 90rpx;
  212. line-height: 90rpx;
  213. font-size: 12px;
  214. color: #454545;
  215. }
  216. .agc-detail {
  217. height: 90rpx;
  218. line-height: 90rpx;
  219. font-size: 12px;
  220. color: #666;
  221. .price {
  222. color: #F52F3E;
  223. }
  224. }
  225. }
  226. .u-border-bottom {
  227. border-color: #eee !important
  228. }
  229. }
  230. .loadmore {
  231. width: 172rpx;
  232. margin: 30rpx auto;
  233. padding-right: 20rpx;
  234. color: #1783FF;
  235. font-size: 14px;
  236. background: url(../../static/index/down.png) no-repeat right center;
  237. background-size: 17rpx 20rpx;
  238. cursor: pointer;
  239. }
  240. }
  241. }
  242. .divider-style {
  243. width: 720rpx;
  244. height: 1rpx;
  245. background: #9ECBFF;
  246. margin: 20rpx 0;
  247. }
  248. .information-id-content {
  249. display: flex;
  250. justify-content: center;
  251. align-items: center;
  252. }
  253. .content-id-item {
  254. display: flex;
  255. justify-content: center;
  256. align-items: center;
  257. }
  258. .id-text {
  259. font-family: PingFangSC-Regular, sans-serif;
  260. font-size: 24rpx;
  261. color: #fff;
  262. }
  263. .id-value {
  264. font-family: PingFangSC-Regular, sans-serif;
  265. font-size: 24rpx;
  266. color: #fff;
  267. }
  268. .ordering-information {
  269. padding: 30rpx;
  270. background: #fff;
  271. margin-top: 20rpx;
  272. border-radius: 20rpx;
  273. padding-top: 0;
  274. }
  275. .order-number {
  276. font-family: PingFangSC-Regular, sans-serif;
  277. font-size: 26rpx;
  278. color: #454545;
  279. padding: 30rpx 0;
  280. }
  281. .ordering-pic {
  282. width: 120rpx;
  283. height: 120rpx;
  284. background-size: cover;
  285. border-radius: 15rpx;
  286. }
  287. image.order-chart {
  288. width: 120rpx;
  289. height: 120rpx;
  290. background-size: cover;
  291. border-radius: 15rpx;
  292. }
  293. .ordering-text {
  294. margin-left: 30rpx;
  295. }
  296. .ordering-text-title {
  297. font-family: PingFangSC-Regular, sans-serif;
  298. font-size: 30rpx;
  299. color: #454545;
  300. }
  301. .amount-of-money {
  302. font-family: PingFangSC-Regular, sans-serif;
  303. font-size: 24rpx;
  304. color: #999;
  305. padding: 2rpx 0;
  306. }
  307. span.price-style {
  308. font-family: PingFangSC-Regular, sans-serif;
  309. font-size: 24rpx;
  310. color: #F52F3E;
  311. }
  312. .order-time {
  313. font-family: PingFangSC-Regular, sans-serif;
  314. font-size: 24rpx;
  315. color: #999;
  316. padding: 2rpx 0;
  317. }
  318. .ordering-item-content {
  319. display: flex;
  320. justify-content: left;
  321. align-items: center;
  322. border-bottom: 1rpx solid #eee;
  323. padding-bottom: 30rpx;
  324. }
  325. .load-more {
  326. text-align: center;
  327. font-size: 14px;
  328. }
  329. </style>