doum
2026-06-18 93de43267e1663031fe5dc2f5ae40d128a182a76
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
<template>
  <view class="cu-result cu-page--with-fab">
    <view :class="['cu-result__icon', success ? 'cu-result__icon--ok' : 'cu-result__icon--fail']">
      {{ success ? '✓' : '✕' }}
    </view>
    <view class="cu-result__title">{{ success ? '支付成功' : '支付失败' }}</view>
    <view class="cu-result__sub">
      {{ success ? (type === 'bill' ? '账单支付成功,感谢您的缴费' : '充值成功,预计 10 分钟内到账') : '请稍后重试,或联系管理员处理' }}
    </view>
    <view class="cu-btn cu-btn--primary" @click="goRecord">{{ type === 'bill' ? '查看账单明细' : '查看充值记录' }}</view>
    <view class="cu-btn" @click="goHome">返回主页</view>
    <cu-workbench-fab />
  </view>
</template>
 
<script>
export default {
  data () { return { success: false, type: 'recharge', orderNo: '', billId: '' } },
  onLoad (q) {
    this.success = q.success === '1'
    this.type = q.type || 'recharge'
    this.orderNo = q.orderNo || ''
    this.billId = q.billId || ''
  },
  methods: {
    goRecord () {
      const url = this.type === 'bill' && this.billId
        ? `/pages/customer/bill/detail?id=${this.billId}`
        : '/pages/customer/recharge/record'
      uni.redirectTo({ url })
    },
    goHome () { uni.reLaunch({ url: '/pages/customer/index' }) }
  }
}
</script>