error.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <template>
  2. <view class="error-box">
  3. <view class="error-content">
  4. <view class="error-icon">
  5. <text class="iconfont">
  6. &#xe678;
  7. </text>
  8. </view>
  9. <view class="error-text">
  10. {{errorMsg}}
  11. </view>
  12. <view class="error-but">
  13. <button @click="closeSys">退出程序</button>
  14. </view>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. name: "error",
  21. props: {},
  22. components: {},
  23. data() {
  24. return {
  25. errorMsg:'出错啦!~~'
  26. }
  27. },
  28. onLoad(query) {
  29. if(query.errorMsg!==undefined){
  30. this.errorMsg=decodeURI(query.errorMsg);
  31. }
  32. },
  33. mounted() {
  34. },
  35. methods: {
  36. closeSys(){
  37. let userAgent = navigator.userAgent;
  38. if (userAgent.indexOf('Firefox') !== -1 || userAgent.indexOf('Chrome') !== -1) return window.location.href = 'about: blank';
  39. return window.opener = null,window.open('about: blank', '_self'),window.close();
  40. }
  41. }
  42. }
  43. </script>
  44. <style scoped lang="scss">
  45. @import url("/components/static/css/en-common.css") ;
  46. .error-box{
  47. width: 100vw;
  48. height: 100vh;
  49. background: #131E30;
  50. .error-content{
  51. padding-top: 300rpx;
  52. .error-icon{
  53. text-align: center;
  54. text{
  55. font-size: 240rpx;
  56. color: #7388a7;
  57. }
  58. }
  59. .error-text{
  60. font-size: 32rpx;
  61. text-align: center;
  62. font-weight: 600;
  63. color: #7388a7;
  64. }
  65. .error-but{
  66. button{
  67. width: calc(100% - 60rpx);
  68. height: 82rpx;
  69. line-height: 82rpx;
  70. border: 0;
  71. border-radius: 6rpx;
  72. background: #3e526b;
  73. color: #FFFFFF;
  74. letter-spacing: 4rpx;
  75. margin-top: 40rpx;
  76. }
  77. }
  78. }
  79. }
  80. </style>