123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240 |
- <template>
- <div class="container">
- <!-- 导航栏 -->
- <div class="nav-bar">
- <div class="back-btn" @click="$router.back()">
- <i class="arrow-left"></i>
- </div>
- <div class="title">提现记录</div>
- </div>
- <!-- 记录列表 -->
- <div class="record-list">
- <div class="listItem" v-for="(item, index) in records" :key="index">
- <div class="flex listItemC">
- <div class="tr4">类型</div>
- <div class="money-col">金额</div>
- <div class="status-text">状态</div>
- <div class="remark">详情</div>
- <div class="right">日期</div>
- </div>
- <div class="flex listItemB">
- <div class="tr4">{{ getTypeText(item.type) }}</div>
- <div class="money-col money-text">{{ item.money }}</div>
- <div class="status-text">{{ getStatusText(item.stat, item) }}</div>
- <div class="remark">{{ item.remark || '-' }}</div>
- <div class="right gggg">
- <div>{{ item.addtime.split(' ')[0] }}</div>
- <div>{{ item.addtime.split(' ')[1] }}</div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import { getUserInfo } from '@/api/home';
- import { getWithdrawRecords } from '@/api/profile';
- export default {
- name: 'OrderList',
- data() {
- return {
- userInfo: {},
- records: []
- }
- },
- created() {
- this.getUserInfo();
- this.getRecords();
- },
- methods: {
- async getUserInfo() {
- try {
- const res = await getUserInfo();
- this.userInfo = res.data;
- } catch (error) {
- console.error('获取用户信息失败:', error);
- }
- },
- async getRecords() {
- try {
- const res = await getWithdrawRecords();
- this.records = res.data || [];
- } catch (error) {
- console.error('获取提现记录失败:', error);
- }
- },
- getStatusText(stat, item) {
- if (stat === 0 && item.type === 2) {
- // 获取提现日期
- const withdrawDate = new Date(item.addtime);
- const cutoffDate = new Date('2025-06-29 00:00:00');
-
- if (withdrawDate < cutoffDate) {
- return '审核已通过,7月20号到账您的银行卡';
- } else {
- // 计算到账日期:提现日期 + 21天
- const arrivalDate = new Date(withdrawDate);
- arrivalDate.setDate(withdrawDate.getDate() + 21);
-
- const month = arrivalDate.getMonth() + 1;
- const day = arrivalDate.getDate();
-
- return `审核已通过,${month}月${day}号到账您的银行卡`;
- }
- }
-
- const statusMap = {
- 0: '审核中',
- 1: '提现成功',
- 2: '提现失败'
- };
- return statusMap[stat] || '未知';
- },
- getTypeText(type) {
- const typeMap = {
- 1: '红旗资产',
- 2: '退休补贴',
- 3: '党员薪资',
- 4: '每日分红',
- 5: '原始股权'
- };
- return typeMap[type] || '未知';
- }
- }
- }
- </script>
- <style scoped>
- .container {
- min-height: 100vh;
- background: #f5f5f5;
- }
- .nav-bar {
- height: 44px;
- background-color: #fff;
- color: #000;
- display: flex;
- align-items: center;
- position: relative;
- padding: 0 15px;
- font-weight: bold;
- }
- .back-btn {
- width: 24px;
- height: 44px;
- display: flex;
- align-items: center;
- cursor: pointer;
- }
- .arrow-left {
- width: 12px;
- height: 12px;
- border-left: 2px solid #000;
- border-bottom: 2px solid #000;
- transform: rotate(45deg);
- }
- .title {
- position: absolute;
- left: 50%;
- transform: translateX(-50%);
- font-size: 16px;
- }
- .record-list {
- padding: 15px;
- }
- .listItem {
- background: #fff;
- border-radius: 8px;
- padding: 15px;
- margin-bottom: 10px;
- }
- .flex {
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
- .listItemC {
- color: #999;
- font-size: 14px;
- margin-bottom: 10px;
- }
- .listItemB {
- color: #333;
- font-size: 14px;
- margin-bottom: 5px;
- }
- .tr4 {
- flex: 0 0 75px;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- text-align: center;
- gap: 2px;
- }
- .type-text {
- font-size: 13px;
- color: #666;
- }
- .money-col {
- flex: 0 0 70px;
- text-align: center;
- }
- .money-text {
- font-size: 16px;
- color: #222;
- font-weight: bold;
- }
- .right {
- flex: 0 0 132px;
- text-align: right;
- display: flex;
- flex-direction: column;
- align-items: flex-end;
- word-break: break-all;
- }
- .gggg {
- color: #999;
- }
- .status-row {
- width: 100%;
- justify-content: center;
- margin-top: 10px;
- }
- .status-text {
- color: #666;
- font-size: 14px;
- flex: 0 0 65px;
- }
- .remark {
- flex: 0 1 auto;
- min-width: 20px;
- max-width: 120px;
- text-align: left;
- color: #666;
- font-size: 13px;
- padding-left: 10px;
- word-break: break-all;
- }
- </style>
|