web_error.vue 824 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <template>
  2. <view>
  3. <view class="text-center text-bold text-xxl">{{msg}}</view>
  4. </view>
  5. </template>
  6. <script>
  7. export default {
  8. data() {
  9. return {
  10. code: 401,
  11. msg: '请求被拒绝',
  12. };
  13. },
  14. onLoad: function(option) {
  15. var self = this;
  16. self.code = this.Dever.data('web_error');
  17. switch (self.code) {
  18. case 401:
  19. self.msg = '请求被拒绝';
  20. console.error(self. msg + self.code)
  21. break;
  22. case 404:
  23. self.msg = '没有找到页面';
  24. console.error(self. msg + self.code)
  25. break;
  26. case 500:
  27. self.msg = '服务器500错误';
  28. console.error(self. msg + self.code)
  29. break;
  30. case 405:
  31. self.msg = '请求错误';
  32. console.error(self. msg + self.code)
  33. break;
  34. }
  35. },
  36. onShow: function() {},
  37. methods: {
  38. callback(e) {
  39. },
  40. }
  41. };
  42. </script>
  43. <style>
  44. </style>