error.vue 2.4 KB

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