guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame^] | 1 | <template> |
| 2 | <view class="payResult"> |
| 3 | <view class="payResult-status" v-if="msg.billstatus ==2"> |
| 4 | <icon type="success" size="60" color="#3599FB"></icon> |
| 5 | <text class="payResult-status-text">支付成功</text> |
| 6 | </view> |
| 7 | <view class="payResult-status" v-if="msg.billstatus !=2"> |
| 8 | <icon type="warn" size="60"></icon> |
| 9 | <text class="payResult-status-text">支付失败</text> |
| 10 | </view> |
| 11 | <view class="payResult-money" v-if="msg.billstatus ==2"><text>-¥{{msg.amount?msg.amount:'0.00'}}</text></view> |
| 12 | <view class="payResult-msg"> |
| 13 | <u-cell-group> |
| 14 | <u-cell-item title="商户名" :value="msg.shopname?msg.shopname:'未知商户'" :arrow="false" bg-color="#FFFFFF"></u-cell-item> |
| 15 | <u-cell-item title="交易方式" :value="msg.billname?msg.billname:'未知方式'" :arrow="false" bg-color="#FFFFFF"></u-cell-item> |
| 16 | <u-cell-item title="交易时间" :value="msg.paytime?msg.paytime:'未知时间'" :arrow="false" bg-color="#FFFFFF"></u-cell-item> |
| 17 | <u-cell-item title="订单号" :value="msg.refno?msg.refno:'未知订单号'" :arrow="false" bg-color="#FFFFFF"></u-cell-item> |
| 18 | </u-cell-group> |
| 19 | </view> |
| 20 | <u-button class="btn":custom-style="btn" @tap="goBack">返回首页</u-button> |
| 21 | </view> |
| 22 | </template> |
| 23 | |
| 24 | <script> |
| 25 | export default { |
| 26 | data() { |
| 27 | return { |
| 28 | msg: {}, |
| 29 | btn: { |
| 30 | backgroundColor: ' #2FA8E1', |
| 31 | padding: '50rpx 0', |
| 32 | color: '#FFFFFF', |
| 33 | width: ' 600rpx', |
| 34 | fontSize: '30rpx', |
| 35 | border: '1px solid #2FA8E1', |
| 36 | marginTop: '50rpx' |
| 37 | } |
| 38 | } |
| 39 | }, |
| 40 | onLoad(options) { |
| 41 | let that = this; |
| 42 | if (options.data) { |
| 43 | let msg = JSON.parse(options.data); |
| 44 | msg.amount = msg.amount.toFixed(2); |
| 45 | that.msg = msg |
| 46 | } |
| 47 | }, |
| 48 | methods: { |
| 49 | goBack() { |
| 50 | uni.switchTab({ |
| 51 | url: '/pages/sub_tabbar/index' |
| 52 | }); |
| 53 | } |
| 54 | } |
| 55 | } |
| 56 | </script> |
| 57 | |
| 58 | <style lang="scss" scoped> |
| 59 | .payResult { |
| 60 | background-color: #FFFFFF; |
| 61 | height: 100vh; |
| 62 | box-sizing: border-box; |
| 63 | padding: 30rpx 0; |
| 64 | display: flex; |
| 65 | flex-direction: column; |
| 66 | &-status{ |
| 67 | display: flex; |
| 68 | justify-content: center; |
| 69 | align-items: center; |
| 70 | flex-direction: column; |
| 71 | &-text{ |
| 72 | font-size: 40rpx; |
| 73 | margin-top: 30rpx; |
| 74 | } |
| 75 | } |
| 76 | &-msg{ |
| 77 | margin-top: 50rpx; |
| 78 | } |
| 79 | } |
| 80 | </style> |