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.

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