404.vue 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <view>
  3. <view class="main">
  4. <view><image src="../../static/404.png"></image></view>
  5. <view class="tip">{{ErrorTip}}</view>
  6. <view><button type="primary" @click="goHome" class="index">返回首页</button></view>
  7. </view>
  8. </view>
  9. </template>
  10. <script>
  11. export default {
  12. data(){
  13. return{
  14. ErrorTip:''
  15. }
  16. },
  17. methods: {
  18. goHome(){
  19. this.$utils.switchTab("index/index");
  20. }
  21. },
  22. onLoad(options) {
  23. this.ErrorTip=options.error
  24. }
  25. }
  26. </script>
  27. <style lang="scss" scoped>
  28. .main{
  29. width: 563rpx;
  30. display: flex;
  31. flex-direction: column;
  32. margin: 0 auto;
  33. text-align: center;
  34. font-size: 32rpx;
  35. color: #1D2129;
  36. padding-top: 100rpx;
  37. image{
  38. width: 563rpx;
  39. }
  40. .tip{
  41. margin-bottom: 60rpx;
  42. }
  43. .index{
  44. width: 400rpx;
  45. height: 88rpx;
  46. background: #58BE6B;
  47. border-radius: 58rpx 58rpx 58rpx 58rpx;
  48. opacity: 1;
  49. font-size: 32rpx;
  50. color: #fff;
  51. font-weight: 600;
  52. line-height: 88rpx;
  53. font-family: Noto Sans SC-Regular, Noto Sans SC;
  54. }
  55. }
  56. </style>