You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
1.5 KiB

3 years ago
  1. <template>
  2. <uni-popup ref="uniPopup" type="bottom">
  3. <view class="content column">
  4. <image class="icon" src="/static/icon/success.png"></image>
  5. <text class="price">支付金额{{ price }}</text>
  6. <text class="tip">{{ tip }}</text>
  7. <view class="btn center" @click="confirm">
  8. <text>{{ btnText }}</text>
  9. </view>
  10. </view>
  11. </uni-popup>
  12. </template>
  13. <script>
  14. export default {
  15. data() {
  16. return {
  17. }
  18. },
  19. props: {
  20. price: {
  21. type: Number,
  22. default: 0
  23. },
  24. tip: {
  25. type: String,
  26. default: '订单支付成功'
  27. },
  28. btnText: {
  29. type: String,
  30. default: '查看订单'
  31. }
  32. },
  33. methods: {
  34. open(){
  35. this.$refs.uniPopup.open();
  36. },
  37. close(){
  38. this.$refs.uniPopup.close();
  39. },
  40. confirm(){
  41. this.$emit('onConfirm');
  42. }
  43. }
  44. }
  45. </script>
  46. <style scoped lang="scss">
  47. .content{
  48. align-items: center;
  49. width: 100vw;
  50. height: calc(100vh - var(--window-top));
  51. padding-top: 100rpx;
  52. background-color: #fff;
  53. .icon{
  54. margin-bottom: 70rpx;
  55. width: 155rpx;
  56. height: 190rpx;
  57. }
  58. .price{
  59. font-size: 44rpx;
  60. color: #333;
  61. }
  62. .tip{
  63. font-size: 28rpx;
  64. color: #999;
  65. margin-top: 30rpx;
  66. }
  67. .btn {
  68. position: absolute;
  69. left: 150rpx;
  70. bottom: 150rpx;
  71. width: 450rpx;
  72. height: 88rpx;
  73. font-size: 32rpx;
  74. color: #fff;
  75. letter-spacing: 1px;
  76. border-radius: 100rpx;
  77. background-color: $base-color;
  78. }
  79. }
  80. </style>