shop_error.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <template>
  2. <view class="wrap">
  3. <view class="header">
  4. <view class="back"></view>
  5. <view class="error_class">
  6. <view class="error_class_header">
  7. <view class="error_title">
  8. 出错类型
  9. <view class="line"></view>
  10. </view>
  11. </view>
  12. <view class="error">
  13. <view v-for="item,index in error_list" :key="index"
  14. :class="['error_one',isshow === index?'active':'']"
  15. @tap="changeActive(item)">{{item.title}}</view>
  16. </view>
  17. </view>
  18. <view class="back"></view>
  19. </view>
  20. <messageError v-if="isshow == 0" :storeid="storeid" :type="type"></messageError>
  21. <noBussiness v-else :storeid="storeid" :type="type"></noBussiness>
  22. </view>
  23. </template>
  24. <script>
  25. import messageError from "@/components/message_error/message_error";
  26. import noBussiness from "@/components/no_bussiness/no_bussiness";
  27. export default {
  28. data() {
  29. return {
  30. error_list:[
  31. {index:0, id: 1, title:'信息错误'},
  32. {index:1, id: 2, title:'不营业'}
  33. ],
  34. isshow:0,//导航栏显示
  35. storeid:'',
  36. type:'信息错误',//报错类型
  37. }
  38. },
  39. onLoad(options) {
  40. console.log(options);
  41. this.storeid = options.id;
  42. },
  43. components:{
  44. messageError,
  45. noBussiness
  46. },
  47. methods: {
  48. changeActive(item){
  49. this.isshow = item.index;
  50. this.type = item.title
  51. }
  52. }
  53. }
  54. </script>
  55. <style scoped>
  56. .back{
  57. width:100%;
  58. height:20rpx;
  59. background-color: #F7F7F7;
  60. border-top:1px solid #f2f2f2;
  61. box-sizing: border-box;
  62. }
  63. .error_class{
  64. width:100%;
  65. overflow: hidden;
  66. }
  67. .error_class_header{
  68. padding-left: 30rpx;
  69. box-sizing: border-box;
  70. }
  71. .error_title{
  72. font-size: 32rpx;
  73. color:#222222;
  74. font-weight: bold;
  75. margin-top:32rpx;
  76. position: relative;
  77. padding-left: 14rpx;
  78. }
  79. .line{
  80. width:6rpx;
  81. height:30rpx;
  82. background-color: #E77817;
  83. position: absolute;
  84. top:6rpx;
  85. left:0rpx;
  86. }
  87. .error{
  88. width:100%;
  89. padding:0 48rpx;
  90. box-sizing: border-box;
  91. overflow: hidden;
  92. margin-top:40rpx;
  93. padding-bottom: 40rpx;
  94. }
  95. .error_one{
  96. width:calc(50% - 11rpx);
  97. height:72rpx;
  98. background:rgba(255,255,255,1);
  99. border-radius:2rpx;
  100. border:2rpx solid rgba(207,207,207,1);
  101. text-align: center;
  102. line-height: 72rpx;
  103. display: inline-block;
  104. box-sizing: border-box;
  105. margin-right: 11rpx;
  106. font-size: 28rpx;
  107. color:#222222;
  108. }
  109. .error_one:nth-child(2){
  110. margin-right: 0;
  111. margin-left: 11rpx;
  112. }
  113. .active{
  114. background:rgba(250,225,203,1);
  115. border:1px solid rgba(231,120,23,1);
  116. color:#E77817;
  117. }
  118. </style>