complaintStatus.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <template>
  2. <view class="container">
  3. <!-- 图标区域 -->
  4. <img class="img" :src="status === '1' ? '../../static/index/success.png' : '../../static/index/fail.png'" />
  5. <view class="msg">{{ msg }}</view>
  6. <!-- 按钮区域 -->
  7. <view class="btn" @click="handleClickBtn">{{ btnMsg }}</view>
  8. </view>
  9. </template>
  10. <script>
  11. export default {
  12. data() {
  13. return {
  14. // 投诉是否成功
  15. status: null,
  16. // 投诉状态信息
  17. msg: '',
  18. // 按钮文字信息
  19. btnMsg: ''
  20. }
  21. },
  22. onLoad(options) {
  23. this.status = options.status
  24. if (this.status === '1') {
  25. uni.setNavigationBarTitle({
  26. title: '投诉成功'
  27. })
  28. this.msg = '投诉成功'
  29. this.btnMsg = '查看投诉进度'
  30. } else {
  31. uni.setNavigationBarTitle({
  32. title: '投诉失败'
  33. })
  34. this.msg = '投诉失败'
  35. this.btnMsg = '返回'
  36. }
  37. },
  38. methods: {
  39. handleClickBtn() {
  40. if (this.status === '1') {
  41. uni.reLaunch({
  42. url: '/pagesSub/myComplaint/myComplaint'
  43. })
  44. } else {
  45. uni.navigateBack(1)
  46. }
  47. }
  48. }
  49. }
  50. </script>
  51. <style lang="scss" scoped>
  52. .container {
  53. display: flex;
  54. flex-direction: column;
  55. align-items: center;
  56. min-height: 100vh;
  57. background-color: #fff;
  58. .img {
  59. margin-top: 80rpx;
  60. width: 134rpx;
  61. height: 134rpx;
  62. }
  63. .msg {
  64. margin-top: 40rpx;
  65. font-size: 32rpx;
  66. font-weight: bold;
  67. }
  68. .btn {
  69. margin-top: 87rpx;
  70. display: flex;
  71. justify-content: center;
  72. align-items: center;
  73. width: 330rpx;
  74. height: 84rpx;
  75. color: #fff;
  76. font-size: 28rpx;
  77. border-radius: 22rpx;
  78. background-color: #096562;
  79. }
  80. }
  81. </style>