wzp
2025-05-06 dc0579496b9c858806a606523397cd43ee6217ba
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
<template>
  <div class="app-container">
    <div v-if="!validated" class="loading-container">
      <el-alert
        :title="errorMessage || '正在加载支付数据...'"
        :type="errorMessage ? 'error' : 'info'"
        :closable="false"
        show-icon>
      </el-alert>
    </div>
    <div v-else>
      <el-card class="box-card">
        <div slot="header" class="clearfix">
          <span>支付信息详情</span>
        </div>
        <el-descriptions :column="1" border>
          <el-descriptions-item label="支付金额">
            {{ payAmount }} 元
          </el-descriptions-item>
          <el-descriptions-item label="订单号">
            {{ orderNo }}
          </el-descriptions-item>
          <el-descriptions-item label="交易流水号">
            {{ transactionNo }}
          </el-descriptions-item>
          <el-descriptions-item label="支付方式">
            {{ payType }}
          </el-descriptions-item>
        </el-descriptions>
      </el-card>
    </div>
  </div>
</template>
 
<script>
export default {
  name: 'PayInfoTest',
  data() {
    return {
      validated: false,
      errorMessage: '',
      payAmount: '',
      orderNo: '',
      transactionNo: '',
      payType: ''
    }
  },
  created() {
    this.initData();
  },
  methods: {
    initData() {
      // 从URL参数中获取数据
      const query = this.$route.query;
      
      // 设置数据,使用空字符串作为默认值
      this.payAmount = query.PayMoney || '0';
      this.orderNo = query.ServiceOrdID || '--';
      this.transactionNo = query.DispatchOrdID || '--';
      this.payType = query.payType === '微信' ? '微信' : 
                     query.payType === '支付宝' ? '支付宝' : '--';
      
      // 直接显示数据,不做必填校验
      this.validated = true;
    }
  }
}
</script>
 
<style scoped>
.loading-container {
  margin: 20px;
  text-align: center;
}
.box-card {
  margin: 20px;
}
</style>