app-report-error.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <template>
  2. <view class="app-view">
  3. <view class="app-spring-board dir-top-nowrap main-justify-between">
  4. <view class="app-text">
  5. <view class="app-title">网络错误</view>
  6. <view class="app-content">{{content}}</view>
  7. </view>
  8. <view class="app-buttons dir-left-nowrap ">
  9. <app-form-button @handleClick="copyText" class="app-button">复制错误</app-form-button>
  10. <app-form-button @handleClick="refreshPage" class="app-button button-border" color="#7e8dae">刷新页面</app-form-button>
  11. </view>
  12. </view>
  13. </view>
  14. </template>
  15. <script>
  16. import appFormButton from '../app-form-id/app-form-id.vue';
  17. export default {
  18. name: 'app-prompt-dialog',
  19. components: {
  20. "app-form-button": appFormButton,
  21. },
  22. props: {
  23. content: String,
  24. },
  25. computed: {},
  26. methods: {
  27. handleClick(boolean) {
  28. this.$emit('toastModelClick', boolean);
  29. },
  30. copyText() {
  31. this.$store.dispatch('gConfig/reportAndErrorB', false);
  32. // #ifndef MP-ALIPAY
  33. uni.setClipboardData({
  34. data: this.content
  35. });
  36. // #endif
  37. // #ifdef MP-ALIPAY
  38. my.setClipboard({
  39. text: this.content // 剪贴板数据
  40. });
  41. // #endif
  42. },
  43. refreshPage() {
  44. this.$store.dispatch('gConfig/reportAndErrorB', false);
  45. }
  46. }
  47. }
  48. </script>
  49. <style scoped lang="scss">
  50. .app-view {
  51. width: 100%;
  52. height: 100%;
  53. background-color: rgba(0,0,0, .3);
  54. position: absolute;
  55. z-index: 1501;
  56. top: 0;
  57. }
  58. .app-spring-board {
  59. background-color: #ffffff;
  60. width: 80%;
  61. min-height: 20%;
  62. position: absolute;
  63. border-radius: #{10rpx};
  64. box-shadow: 0 0 #{2rpx} #000000;
  65. left: 50%;
  66. top: 50%;
  67. transform: translate(-50%, -90%);
  68. }
  69. .app-buttons {
  70. width:100%;
  71. height: #{100rpx};
  72. border: #{1rpx} solid #dddddd;
  73. }
  74. .app-button {
  75. width: 50%;
  76. }
  77. .button-border {
  78. border-left: #{1rpx} solid #dddddd;
  79. color: blue;
  80. }
  81. .app-button /deep/ form {
  82. display: block;
  83. width: 100%;
  84. height: 100%;
  85. }
  86. .app-button /deep/ button {
  87. display: block;
  88. width: 100%;
  89. height: 100%;
  90. text-align: center;
  91. line-height: #{100rpx};
  92. background-color: #ffffff;
  93. }
  94. .app-title {
  95. font-weight: bold;
  96. font-size: #{39rpx};
  97. text-align: center;
  98. height: #{70rpx};
  99. line-height: #{70rpx};
  100. margin-top: #{30rpx};
  101. }
  102. .app-content {
  103. padding-left: #{20rpx};
  104. padding-right: #{20rpx};
  105. text-align: center;
  106. margin-bottom: #{30rpx};
  107. font-size: #{38rpx};
  108. }
  109. </style>