Browse Source

代理订单列表

master
yangrz 2 years ago
parent
commit
36de4a6ad2
  1. 2
      agentApp/common/api.js
  2. 206
      agentApp/pages/index/index.vue

2
agentApp/common/api.js

@ -63,6 +63,8 @@ const agentConfig = function() {
export const agentSmsLogin = (params) => http.post(baseUrl + '/api/agent/smsLogin', params)
export const agentAccountInfo = (params) => http.post(baseUrl + '/api/agent/accountInfo', params, agentConfig())
export const agentMerchantList = (params) => http.post(baseUrl + '/api/agent/merchantList', params, agentConfig())
export const agentOrderList = (params) => http.post(baseUrl + '/api/agent/orderList', params, agentConfig())
export const agentFillAlipayAccount = (params) => http.post(baseUrl + '/api/agent/fillAlipayAccount', params, agentConfig())
export const agentWithdraw = (params) => http.post(baseUrl + '/api/agent/withdraw', params, agentConfig())
export const agentWithdrawList = (params) => http.post(baseUrl + '/api/agent/withdrawList', params, agentConfig())

206
agentApp/pages/index/index.vue

@ -32,107 +32,41 @@
<view class="id-value">
{{accountInfo.id}}
</view>
<view class="id-text" style="margin-left:2em;">
商户数量
</view>
<view class="id-value">
{{accountInfo.merchant_count}}
</view>
</view>
</view>
</view>
<view class="agent-main">
<view class="agm-title">
提现信息
订单列表
</view>
<view class="agm-sitem">
<view class="ags-cell u-border-bottom">
<view class="agc-title">
用户提现流水号
</view>
<view class="agc-detail">
22398983498
</view>
<view class="ordering-information">
<view class="ordering-information-item" v-if="!orderList.length">
<view class="order-number">暂无订单</view>
</view>
<view class="ags-cell u-border-bottom">
<view class="agc-title">
提现金额
</view>
<view class="agc-detail">
<view class="price">
458.00
<view class="ordering-information-item" v-for="order in orderList" :key="order.out_trade_no">
<view class="order-number">订单编号 {{order.out_trade_no}}</view>
<view class="ordering-item-content">
<view class="ordering-pic">
<image class="order-chart" :src="order.merchant.logo" />
</view>
</view>
</view>
<view class="ags-cell u-border-bottom">
<view class="agc-title">
分成比例
</view>
<view class="agc-detail">
5%
</view>
</view>
<view class="ags-cell u-border-bottom">
<view class="agc-title">
状态
</view>
<view class="agc-detail">
到账
</view>
</view>
<view class="ags-cell">
<view class="agc-title">
时间
</view>
<view class="agc-detail">
2023-11-24 15:45:56
</view>
</view>
<u-gap height="10rpx" bgColor="#F7F7F7"></u-gap>
</view>
<view class="agm-sitem">
<view class="ags-cell u-border-bottom">
<view class="agc-title">
用户提现流水号
</view>
<view class="agc-detail">
22398983498
</view>
</view>
<view class="ags-cell u-border-bottom">
<view class="agc-title">
提现金额
</view>
<view class="agc-detail">
<view class="price">
458.00
<view class="ordering-text">
<view class="ordering-text-title">{{order.merchant.name}}</view>
<view class="amount-of-money">金额<span class="price-style">{{order.amount}}</span></view>
<view class="amount-of-money">收益<span class="price-style">{{order.agent_income}}</span></view>
<view class="order-time">订单时间{{order.paid_at}}</view>
</view>
</view>
</view>
<view class="ags-cell u-border-bottom">
<view class="agc-title">
分成比例
</view>
<view class="agc-detail">
5%
</view>
</view>
<view class="ags-cell u-border-bottom">
<view class="agc-title">
状态
</view>
<view class="agc-detail">
到账
</view>
</view>
<view class="ags-cell">
<view class="agc-title">
时间
</view>
<view class="agc-detail">
2023-11-24 15:45:56
</view>
</view>
<u-gap height="10rpx" bgColor="#F7F7F7"></u-gap>
</view>
<view class="loadmore">
下拉加载更多
</view>
<view class="load-more" @click="getOrderList">{{ hasMore ? '加载更多数据...' : '已加载完毕' }}</view>
</view>
</view>
@ -142,22 +76,43 @@
<script>
import {
agentAccountInfo
agentAccountInfo,
agentOrderList
} from '../../common/api.js'
export default {
data() {
return {
accountInfo: {},
orderList: [],
hasMore: true,
page: 0,
}
},
onLoad() {
this.getAccountInfo();
this.getOrderList();
},
onReachBottom() {
this.getOrderList()
},
methods: {
getAccountInfo() {
agentAccountInfo().then(data => this.accountInfo = data)
},
getOrderList() {
if (!this.hasMore) {
return
}
this.page++
agentOrderList({
page: this.page,
page_size: 15
}).then(data => {
this.orderList = [...this.orderList, ...data.list]
this.hasMore = data.has_more
})
},
cashManager() {
uni.navigateTo({
url: '/pages/cash/cash'
@ -346,4 +301,77 @@
font-size: 24rpx;
color: #fff;
}
.ordering-information {
padding: 30rpx;
background: #fff;
margin-top: 20rpx;
border-radius: 20rpx;
padding-top: 0;
}
.order-number {
font-family: PingFangSC-Regular, sans-serif;
font-size: 26rpx;
color: #454545;
padding: 30rpx 0;
}
.ordering-pic {
width: 120rpx;
height: 120rpx;
background-size: cover;
border-radius: 15rpx;
}
image.order-chart {
width: 120rpx;
height: 120rpx;
background-size: cover;
border-radius: 15rpx;
}
.ordering-text {
margin-left: 30rpx;
}
.ordering-text-title {
font-family: PingFangSC-Regular, sans-serif;
font-size: 30rpx;
color: #454545;
}
.amount-of-money {
font-family: PingFangSC-Regular, sans-serif;
font-size: 24rpx;
color: #999;
padding: 2rpx 0;
}
span.price-style {
font-family: PingFangSC-Regular, sans-serif;
font-size: 24rpx;
color: #F52F3E;
}
.order-time {
font-family: PingFangSC-Regular, sans-serif;
font-size: 24rpx;
color: #999;
padding: 2rpx 0;
}
.ordering-item-content {
display: flex;
justify-content: left;
align-items: center;
border-bottom: 1rpx solid #eee;
padding-bottom: 30rpx;
}
.load-more {
text-align: center;
font-size: 14px;
}
</style>
Loading…
Cancel
Save