app-report-error.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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. success: function(res) {
  36. console.log(res);
  37. }
  38. });
  39. // #endif
  40. // #ifdef MP-ALIPAY
  41. my.setClipboard({
  42. text: this.content, // 剪贴板数据
  43. success: (res) => {
  44. console.log(res);
  45. },
  46. });
  47. // #endif
  48. },
  49. refreshPage() {
  50. this.$store.dispatch('gConfig/reportAndErrorB', false);
  51. }
  52. }
  53. }
  54. </script>
  55. <style scoped lang="scss">
  56. .app-view {
  57. width: 100%;
  58. height: 100%;
  59. background-color: rgba(0,0,0, .3);
  60. position: absolute;
  61. z-index: 1501;
  62. top: 0;
  63. }
  64. .app-spring-board {
  65. background-color: #ffffff;
  66. width: 80%;
  67. min-height: 20%;
  68. position: absolute;
  69. border-radius: #{10rpx};
  70. box-shadow: 0 0 #{2rpx} #000000;
  71. left: 50%;
  72. top: 50%;
  73. transform: translate(-50%, -90%);
  74. }
  75. .app-buttons {
  76. width:100%;
  77. height: #{100rpx};
  78. border: #{1rpx} solid #dddddd;
  79. }
  80. .app-button {
  81. width: 50%;
  82. }
  83. .button-border {
  84. border-left: #{1rpx} solid #dddddd;
  85. color: blue;
  86. }
  87. .app-button /deep/ form {
  88. display: block;
  89. width: 100%;
  90. height: 100%;
  91. }
  92. .app-button /deep/ button {
  93. display: block;
  94. width: 100%;
  95. height: 100%;
  96. text-align: center;
  97. line-height: #{100rpx};
  98. background-color: #ffffff;
  99. }
  100. .app-title {
  101. font-weight: bold;
  102. font-size: #{39rpx};
  103. text-align: center;
  104. height: #{70rpx};
  105. line-height: #{70rpx};
  106. margin-top: #{30rpx};
  107. }
  108. .app-content {
  109. padding-left: #{20rpx};
  110. padding-right: #{20rpx};
  111. text-align: center;
  112. margin-bottom: #{30rpx};
  113. font-size: #{38rpx};
  114. }
  115. </style>