error.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. </Container>
  19. </template>
  20. <script setup>
  21. import Container from "../../components/Container/Container.vue";
  22. import { router } from "../../utils/router";
  23. const onBack = () => new Promise((resolve) => resolve("/pages/user/index"));
  24. const back = () => {
  25. router.switchTab("/pages/user/index");
  26. };
  27. </script>
  28. <style scoped lang="scss">
  29. .success-icon {
  30. width: 180rpx;
  31. height: 180rpx;
  32. margin-bottom: 80rpx;
  33. margin-top: 50rpx;
  34. }
  35. /* 中间说明区域 */
  36. .info-area {
  37. flex: 2;
  38. text-align: center;
  39. margin: 0 20rpx;
  40. }
  41. .info-text {
  42. font-size: 28rpx;
  43. color: #666;
  44. }
  45. /* 底部按钮组 */
  46. .button-group {
  47. display: flex;
  48. flex-direction: column;
  49. justify-content: center;
  50. }
  51. .btn {
  52. border-radius: 40rpx;
  53. font-size: 32rpx;
  54. line-height: 84rpx;
  55. display: block;
  56. border: 1rpx solid green;
  57. text-align: center;
  58. width: 94%;
  59. margin: auto;
  60. }
  61. </style>