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.

376 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: 150rpx;
  131. height: 60rpx;
  132. line-height: 60rpx;
  133. padding-left: 40rpx;
  134. border-top-left-radius: 30rpx;
  135. border-bottom-left-radius: 30rpx;
  136. color: #fff;
  137. font-size: 12px;
  138. background: #FCC565;
  139. box-sizing: border-box;
  140. cursor: pointer;
  141. }
  142. .agent-top {
  143. text-align: center;
  144. .ag-num {
  145. display: flex;
  146. justify-content: center;
  147. padding-top: 20rpx;
  148. color: #fff;
  149. .au-font {
  150. margin-top: 45rpx;
  151. font-size: 14px;
  152. margin-right: 10rpx;
  153. line-height: 28rpx;
  154. }
  155. .au-num {
  156. font-size: 30px;
  157. font-weight: bold;
  158. }
  159. }
  160. .age-font {
  161. margin-top: 10rpx;
  162. font-size: 16px;
  163. line-height: 1.5;
  164. font-family: PingFangSC-Regular, sans-serif;
  165. font-size: 30rpx;
  166. color: #fff;
  167. font-weight: bold;
  168. }
  169. .age-line {
  170. margin: 20rpx auto 0;
  171. width: 200rpx;
  172. height: 2rpx;
  173. img {
  174. display: block;
  175. margin: 0 auto;
  176. }
  177. }
  178. .age-wait {
  179. margin-top: 20rpx;
  180. font-family: PingFangSC-Regular, sans-serif;
  181. color: #fff;
  182. font-size: 30rpx;
  183. font-weight: bold;
  184. }
  185. }
  186. .agent-main {
  187. margin-top: 30rpx;
  188. padding-top: 30rpx;
  189. padding-bottom: 30rpx;
  190. background: #fff;
  191. border-top-left-radius: 20rpx;
  192. border-top-right-radius: 20rpx;
  193. .agm-title {
  194. padding-left: 30rpx;
  195. margin-left: 30rpx;
  196. color: #454545;
  197. font-weight: normal;
  198. font-size: 30rpx;
  199. line-height: 1.5;
  200. background: url(../../static/index/title-style.png) no-repeat left center;
  201. background-size: 15rpx 19rpx;
  202. }
  203. .agm-sitem {
  204. .ags-cell {
  205. display: flex;
  206. justify-content: space-between;
  207. height: 90rpx;
  208. line-height: 90rpx;
  209. margin-left: 30rpx;
  210. margin-right: 30rpx;
  211. .agc-title {
  212. height: 90rpx;
  213. line-height: 90rpx;
  214. font-size: 12px;
  215. color: #454545;
  216. }
  217. .agc-detail {
  218. height: 90rpx;
  219. line-height: 90rpx;
  220. font-size: 12px;
  221. color: #666;
  222. .price {
  223. color: #F52F3E;
  224. }
  225. }
  226. }
  227. .u-border-bottom {
  228. border-color: #eee !important
  229. }
  230. }
  231. .loadmore {
  232. width: 172rpx;
  233. margin: 30rpx auto;
  234. padding-right: 20rpx;
  235. color: #1783FF;
  236. font-size: 14px;
  237. background: url(../../static/index/down.png) no-repeat right center;
  238. background-size: 17rpx 20rpx;
  239. cursor: pointer;
  240. }
  241. }
  242. }
  243. .divider-style {
  244. width: 720rpx;
  245. height: 1rpx;
  246. background: #9ECBFF;
  247. margin: 20rpx 0;
  248. }
  249. .information-id-content {
  250. display: flex;
  251. justify-content: center;
  252. align-items: center;
  253. }
  254. .content-id-item {
  255. display: flex;
  256. justify-content: center;
  257. align-items: center;
  258. }
  259. .id-text {
  260. font-family: PingFangSC-Regular, sans-serif;
  261. font-size: 24rpx;
  262. color: #fff;
  263. }
  264. .id-value {
  265. font-family: PingFangSC-Regular, sans-serif;
  266. font-size: 24rpx;
  267. color: #fff;
  268. }
  269. .ordering-information {
  270. padding: 30rpx;
  271. background: #fff;
  272. margin-top: 20rpx;
  273. border-radius: 20rpx;
  274. padding-top: 0;
  275. }
  276. .order-number {
  277. font-family: PingFangSC-Regular, sans-serif;
  278. font-size: 26rpx;
  279. color: #454545;
  280. padding: 30rpx 0;
  281. }
  282. .ordering-pic {
  283. width: 120rpx;
  284. height: 120rpx;
  285. background-size: cover;
  286. border-radius: 15rpx;
  287. }
  288. image.order-chart {
  289. width: 120rpx;
  290. height: 120rpx;
  291. background-size: cover;
  292. border-radius: 15rpx;
  293. }
  294. .ordering-text {
  295. margin-left: 30rpx;
  296. }
  297. .ordering-text-title {
  298. font-family: PingFangSC-Regular, sans-serif;
  299. font-size: 30rpx;
  300. color: #454545;
  301. }
  302. .amount-of-money {
  303. font-family: PingFangSC-Regular, sans-serif;
  304. font-size: 24rpx;
  305. color: #999;
  306. padding: 2rpx 0;
  307. }
  308. span.price-style {
  309. font-family: PingFangSC-Regular, sans-serif;
  310. font-size: 24rpx;
  311. color: #F52F3E;
  312. }
  313. .order-time {
  314. font-family: PingFangSC-Regular, sans-serif;
  315. font-size: 24rpx;
  316. color: #999;
  317. padding: 2rpx 0;
  318. }
  319. .ordering-item-content {
  320. display: flex;
  321. justify-content: left;
  322. align-items: center;
  323. border-bottom: 1rpx solid #eee;
  324. padding-bottom: 30rpx;
  325. }
  326. .load-more {
  327. text-align: center;
  328. font-size: 14px;
  329. }
  330. </style>