index.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <view class="payment-completed-container">
  3. <!-- <view style="padding: 30upx 20upx;color: #000000;">
  4. <JHeader width="50" height="50" title="商品评价"></JHeader>
  5. </view> -->
  6. <view style="display: flex;flex-direction: column;align-items: center;">
  7. <view style="margin-top: 20vh;">
  8. <BeeIcon v-if="state === 'success'" name="circle-fill" :size="76" color="#95ec69"></BeeIcon>
  9. <BeeIcon v-else-if="state === 'fail'" name="close-fill" :size="76" color="#eb0909"></BeeIcon>
  10. </view>
  11. <view style="margin-top: 5vh;font-size: 46upx;font-weight: bold;">
  12. <text v-if="state === 'success'">支付成功</text>
  13. <text v-else-if="state === 'fail'">支付失败</text>
  14. </view>
  15. <view style="margin-top: 25vh;">
  16. <tui-button
  17. v-if="state === 'success'" type="gray-primary" width="280rpx" height="72rpx"
  18. style="color: #1ab113!important;border-radius: 4rpx;" bold @click="handelClickBack"
  19. >
  20. 回到首页
  21. </tui-button>
  22. <tui-button
  23. v-else-if="state === 'fail'" type="danger" width="280rpx" height="72rpx"
  24. plain
  25. style="border-radius: 4rpx;" bold @click="handelClickBack"
  26. >
  27. 回到首页
  28. </tui-button>
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. import { J_PAY_ORDER } from '../../../config/constant'
  35. export default {
  36. name: 'PaymentCompleted',
  37. components: {},
  38. data() {
  39. return {
  40. state: ''
  41. }
  42. },
  43. onLoad(options) {
  44. uni.removeStorageSync(J_PAY_ORDER)
  45. console.log(options.state)
  46. this.state = options.state || 'success'
  47. },
  48. mounted() {
  49. },
  50. methods: {
  51. handelClickBack() {
  52. this.$switchTab('/pages/tabbar/index/index')
  53. }
  54. }
  55. }
  56. </script>
  57. <style lang="less" scoped>
  58. .payment-completed-container {
  59. min-height: 100vh;
  60. width: 100%;
  61. padding: 0 26upx;
  62. background: #ffffff;
  63. box-sizing: border-box;
  64. }
  65. </style>