paysuccess.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <template>
  2. <Container
  3. class="body-content"
  4. title="支付成功"
  5. bgColor="#f7f7f7"
  6. :onBack="onBack"
  7. :scrollStyle="{
  8. padding: 0
  9. }"
  10. >
  11. <view class="info-area">
  12. <image
  13. class="success-icon"
  14. src="https://openwork-oss.oss-cn-shenzhen.aliyuncs.com/uploads/question/2025/06/XTYZzM0uKjmKGV2cXN3QC5R1icHXmQDo10mUNZ6T.png"
  15. mode="aspectFill"
  16. ></image>
  17. </view>
  18. <view class="button-group">
  19. <view type="default" class="btn" @click="back">返回首页</view>
  20. </view>
  21. <view class="qr-code">
  22. <span>恭喜你成为VIP</span>
  23. <span>这是您的专属老师</span>
  24. <div class="card">
  25. <img :src="src" show-menu-by-longpress class="img" alt="">
  26. <span>可长按识别二维码</span>
  27. </div>
  28. </view>
  29. </Container>
  30. </template>
  31. <script setup>
  32. import Container from "../../components/Container/Container.vue";
  33. import { router } from "../../utils/router";
  34. import { ref } from "vue";
  35. const onBack = () => new Promise((resolve) => resolve("/pages/user/index"));
  36. const back = () => {
  37. router.switchTab("/pages/user/index");
  38. };
  39. const src = ref("https://openwork-oss.oss-cn-shenzhen.aliyuncs.com/uploads/question/2025/06/XTYZzM0uKjmKGV2cXN3QC5R1icHXmQDo10mUNZ6T.png");
  40. </script>
  41. <style scoped lang="scss">
  42. @import "@/uni.scss";
  43. .qr-code {
  44. width: 100%;
  45. height: 100%;
  46. margin-top: 20px;
  47. display: flex;
  48. flex-direction: column;
  49. align-items: center;
  50. color: $success;
  51. gap: 12rpx;
  52. .card {
  53. margin:10rpx auto 0;
  54. display: flex;
  55. align-items: center;
  56. justify-content: center;
  57. flex-direction: column;
  58. padding: 80rpx;
  59. background-color: #fff;
  60. gap: 40rpx;
  61. border-radius: 40rpx;
  62. width: calc(100% - 64rpx);
  63. box-sizing: border-box;
  64. color: #333;
  65. .img {
  66. width: 181px;
  67. height: 181px;
  68. }
  69. }
  70. }
  71. .success-icon {
  72. width: 180rpx;
  73. height: 180rpx;
  74. margin-bottom: 80rpx;
  75. margin-top: 50rpx;
  76. }
  77. /* 中间说明区域 */
  78. .info-area {
  79. flex: 2;
  80. text-align: center;
  81. margin: 0 20rpx;
  82. }
  83. .info-text {
  84. font-size: 28rpx;
  85. color: #666;
  86. }
  87. /* 底部按钮组 */
  88. .button-group {
  89. display: flex;
  90. flex-direction: column;
  91. justify-content: center;
  92. }
  93. .btn {
  94. border-radius: 40rpx;
  95. font-size: 32rpx;
  96. line-height: 84rpx;
  97. display: block;
  98. border: 1rpx solid green;
  99. text-align:center;
  100. width: 94%;
  101. margin: auto;
  102. }
  103. </style>