order-success.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <template>
  2. <view class="order-success">
  3. <image class="success-icon" src="../static/success.png" mode="widthFix"></image>
  4. <text class="success-title">订单提交成功</text>
  5. <text class="success-message">您的订单已提交,书嗨稍后将安排快递上门取书!</text>
  6. <view class="button-group">
  7. <u-button class="notify-button" :custom-style="{borderColor: '#07c160',width:'235rpx',
  8. color: '#07c160'}" type="default" @click="goHome">返回首页</u-button>
  9. <!-- <u-button class="notify-button" :custom-style="{borderColor: '#07c160',width:'235rpx',
  10. color: '#07c160'}" type="default" @click="notifyStatusChange">状态变更通知</u-button> -->
  11. <u-button :custom-style="{background: '#07c160',width:'235rpx',
  12. color: '#ffffff'}" class="view-order-button" type="primary" @click="viewOrder">查看订单</u-button>
  13. </view>
  14. </view>
  15. </template>
  16. <script>
  17. export default {
  18. methods: {
  19. notifyStatusChange() {
  20. // 处理状态变更通知逻辑
  21. console.log('状态变更通知')
  22. },
  23. viewOrder() {
  24. uni.navigateTo({
  25. url: "/pages-mine/pages/order-page?status=-1"
  26. })
  27. },
  28. goHome() {
  29. uni.switchTab({
  30. url: "/pages/home/index"
  31. })
  32. }
  33. }
  34. }
  35. </script>
  36. <style lang="scss" scoped>
  37. .order-success {
  38. display: flex;
  39. flex-direction: column;
  40. align-items: center;
  41. background-color: #ffffff;
  42. padding: 34rpx 0 44rpx 0;
  43. .success-icon {
  44. width: 200rpx;
  45. height: 200rpx;
  46. }
  47. .success-title {
  48. font-family: PingFang SC;
  49. font-weight: 400;
  50. font-size: 40rpx;
  51. color: #333333;
  52. line-height: 107rpx;
  53. }
  54. .success-message {
  55. font-family: PingFang SC;
  56. font-weight: 400;
  57. font-size: 28rpx;
  58. color: #999999;
  59. margin-bottom: 40rpx;
  60. }
  61. .button-group {
  62. display: flex;
  63. justify-content: center;
  64. gap: 70rpx;
  65. }
  66. }
  67. </style>