jhzh
2025-04-25 dfa832402406320240380fb5372f4a19ed62b2f7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
<template>
  <div style="padding-bottom: 100px;background-color: #fff;">
    <div v-if="list.length <= 0" class="empty text-center">
      {{ $t("hj168") }}
    </div>
    <div v-else>
      <ul
        class="table-list"
        v-infinite-scroll="loadMore"
        infinite-scroll-disabled="loading"
        infinite-scroll-distance="10"
      >
        <li class="list-body" v-for="item in list" :key="item.key">
          <div class="order-info-box">
            <div class="order-title">
              <span :class="['main', 'wechat']">
                {{ item.payChannel }}
              </span>
              <span class="payNumber">
                {{ $t("hj172") }}:
                <span
                  :style="{ color: $state.theme == 'red' ? '#BB1815' : '' }"
                >
                  {{ item.channelName }} {{ item.payAmt  }}
                </span>
              </span>
              <span
                :class="
                  item.orderStatus == 1
                    ? 'green pull-right'
                    : item.orderStatus == 2
                    ? 'red pull-right'
                    : 'red pull-right'
                "
              >
                <i
                  v-if="item.orderStatus == 1"
                  class="iconfont icon-tongguo4 animated bounceIn"
                >
                </i>
                <i
                  v-if="item.orderStatus == 0"
                  class="iconfont icon-dengdai animated bounceInDown"
                >
                </i>
                <i
                  v-if="item.orderStatus == 2"
                  class="iconfont icon-failure animated bounceInDown"
                >
                </i>
                <i
                  v-if="item.orderStatus == 3"
                  class="iconfont icon-iconfontweitongguo animated bounceInDown"
                >
                </i>
                <!-- 1 => 成功 2 失败 3取消 4 等待 -->
                {{
                  item.orderStatus == 1
                    ? $t("hj231")
                    : item.orderStatus == 2
                    ? $t("hj232")
                    : item.orderStatus == 3
                    ? $t("hj233")
                    : $t("hjshz")
                }}
              </span>
            </div>
            <div class="order-info">
              <div class="info-mix">
                <span class="info-item"
                  >{{ $t("订单号") }}:<b>{{ item.orderSn }}</b></span
                >
                <span class="info-item"
                  >{{ $t("时间") }}:
                  <b v-if="item.addTime"
                    >{{item.addTime}}
                  </b>
                  <b v-else> </b>
                </span>
              </div>
            </div>
          </div>
        </li>
      </ul>
      <div v-show="loading" class="load-all text-center">
        <mt-spinner type="fading-circle"></mt-spinner>
        loading...
      </div>
      <div v-show="!loading" class="load-all text-center">
        {{ $t("hj236") }}
      </div>
    </div>
  </div>
</template>
 
<script>
import { Toast } from "mint-ui";
import * as api from "@/axios/api";
 
export default {
  components: {},
  props: {},
  data() {
    return {
      loading: false,
      list: [],
      pageNum: 1,
      pageSize: 15,
      total: 0,
    };
  },
  watch: {},
  computed: {},
  created() {},
  mounted() {
    this.getListDetail();
  },
  methods: {
    async getListDetail() {
      let opt = {
        payChannel: "", // 支付方式
        orderStatus: "", // 订单状态
        pageNum: this.pageNum,
        pageSize: 15,
      };
      let data = await api.rechargeList(opt);
      if (data.status === 0) {
        data.data.list.forEach((element) => {
          this.list.push(element);
        });
        this.total = data.data.total;
      } else {
        Toast(data.msg);
      }
    },
    async loadMore() {
      if (this.list.length < 10 || this.total <= this.pageNum * this.pageNum) {
        return;
      }
      this.loading = true;
      // 加载下一页
      this.pageNum++;
      await this.getListDetail();
      this.loading = false;
    },
  },
};
</script>
<style lang="less" scoped>
.wrapper {
  padding-top: 0.9rem;
}
 
.table-list {
  // padding: 0.2rem 0;
 
  .list-body {
    padding: 0.1rem 0.3rem;
 
    .capital:nth-child(1) {
      border-top: 0.01rem solid #3f444a;
    }
 
    .capital {
      padding: 0.2rem;
      // border-radius: 0.2rem;
      border-bottom: 0.01rem solid #3f444a;
 
      div {
        line-height: 0.4rem;
      }
 
      .col-xs-4 {
        padding-left: 0;
        padding-right: 0;
      }
 
      .pro {
        color: #999;
      }
    }
  }
}
 
.payNumber {
  font-size: 0.24rem;
  font-weight: bold;
  span {
    font-family: lightnumber;
  }
}
/deep/.order-info-box {
  background-color: #16171d;
  padding: 0;
  .main {
    padding: 0.05rem 0.15rem;
    letter-spacing: 0;
    text-align: center;
    margin-right: 0.16rem;
    font-size: 0.24rem;
    border-radius: 3px;
    &.ali {
      background-color: #138eb4;
    }
    &.cart {
      background-color: #7266ba;
    }
    &.wechat {
      background-color: #009c46;
    }
  }
  .order-info {
    border-bottom: 1px solid #2e3237;
    padding-bottom: 0.3rem;
  }
  .order-title {
    border-bottom: none;
  }
  .info-mix {
    display: flex;
    font-size: 0.2rem;
    width: 100%;
    .info-item {
      margin-right: 0.2rem;
      color: #fff8;
    }
  }
}
.red-theme {
  .list-body {
    background-color: #fff;
  }
  .order-info-box {
    background-color: #fff;
    .order-info {
      border-bottom-color: #e9e9e9;
    }
  }
  .order-info-box .main.cart {
    color: #fff;
  }
  .payNumber {
    color: #000;
  }
  .order-info-box .info-mix .info-item {
    color: #666666;
  }
  .load-all {
    background-color: #fff;
  }
}
</style>