index.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. <template>
  2. <div class="page">
  3. <div class="page-content">
  4. <div class="title">设备认证信息</div>
  5. <template v-if="!isAuth">
  6. <div class="tip">抱歉,您暂未认证设备</div>
  7. <div class="btn">去认证</div>
  8. </template>
  9. <div class="device-list" v-else>
  10. <div class="device" @click="toDetail">
  11. <div class="cover">
  12. <img src="https://picsum.photos/120/120" alt="" />
  13. </div>
  14. <div class="content">
  15. <div class="name">B-BEAUTY童颜皮肤管理(海宁店)</div>
  16. <div class="sncode">SN码:SN********5666</div>
  17. </div>
  18. </div>
  19. <div class="device">
  20. <div class="cover">
  21. <img src="https://picsum.photos/120/120" alt="" />
  22. </div>
  23. <div class="content">
  24. <div class="name">B-BEAUTY童颜皮肤管理(海宁店)</div>
  25. <div class="sncode">SN码:SN********5666</div>
  26. </div>
  27. </div>
  28. </div>
  29. </div>
  30. </div>
  31. </template>
  32. <script>
  33. import { mapGetters } from 'vuex'
  34. export default {
  35. layout: 'app-ross',
  36. data() {
  37. return {
  38. isAuth: false,
  39. }
  40. },
  41. computed: {
  42. ...mapGetters(['routePrefix']),
  43. },
  44. methods: {
  45. toDetail() {
  46. this.$router.push(`${this.routePrefix}/center/device/detail`)
  47. },
  48. },
  49. }
  50. </script>
  51. <style lang="scss" scoped>
  52. @mixin ellipsis($line: 1) {
  53. overflow: hidden;
  54. text-overflow: ellipsis;
  55. display: -webkit-box;
  56. -webkit-line-clamp: $line;
  57. -webkit-box-orient: vertical;
  58. }
  59. @media screen and (min-width: 768px) {
  60. .page-content {
  61. width: 1000px;
  62. margin: 0 auto;
  63. .title {
  64. font-size: 24px;
  65. text-align: center;
  66. font-weight: bold;
  67. padding: 60px 0;
  68. }
  69. .tip {
  70. font-size: 16px;
  71. color: #b2b2b2;
  72. margin-top: 200px;
  73. margin-bottom: 24px;
  74. text-align: center;
  75. }
  76. .btn {
  77. width: 98px;
  78. height: 36px;
  79. background: #f3920d;
  80. border-radius: 4px;
  81. text-align: center;
  82. line-height: 36px;
  83. color: #fff;
  84. font-size: 16px;
  85. margin: 0 auto;
  86. cursor: pointer;
  87. }
  88. .device-list {
  89. display: flex;
  90. justify-content: space-between;
  91. align-items: center;
  92. .device {
  93. width: 490px;
  94. height: 136px;
  95. background: #f3f5f6;
  96. border-radius: 8px;
  97. display: flex;
  98. align-items: center;
  99. box-sizing: border-box;
  100. padding: 16px;
  101. cursor: pointer;
  102. .cover {
  103. img {
  104. display: block;
  105. width: 106px;
  106. height: 106px;
  107. }
  108. }
  109. .content {
  110. width: 320px;
  111. margin-left: 16px;
  112. .name {
  113. font-size: 18px;
  114. color: #282828;
  115. font-weight: bold;
  116. margin-bottom: 24px;
  117. @include ellipsis(1);
  118. }
  119. .sncode {
  120. font-size: 16px;
  121. color: #666666;
  122. }
  123. }
  124. }
  125. }
  126. }
  127. }
  128. @media screen and (max-width: 768px) {
  129. .page-content {
  130. .title {
  131. font-size: 4.2vw;
  132. text-align: center;
  133. font-weight: bold;
  134. padding: 8vw 0;
  135. }
  136. .tip {
  137. font-size: 3vw;
  138. color: #b2b2b2;
  139. margin-top: 60vw;
  140. margin-bottom: 4.8vw;
  141. text-align: center;
  142. }
  143. .btn {
  144. width: 36vw;
  145. height: 8.8vw;
  146. background: #f3920d;
  147. border-radius: 0.4vw;
  148. text-align: center;
  149. line-height: 8.8vw;
  150. color: #fff;
  151. font-size: 3.4vw;
  152. margin: 0 auto;
  153. }
  154. .device-list {
  155. padding: 0 3.2vw;
  156. .device {
  157. height: 26vw;
  158. background: #f3f5f6;
  159. border-radius: 0.8vw;
  160. display: flex;
  161. align-items: center;
  162. box-sizing: border-box;
  163. padding: 3.2vw;
  164. margin-bottom: 3.2vw;
  165. cursor: pointer;
  166. .cover {
  167. img {
  168. display: block;
  169. width: 19.6vw;
  170. height: 19.6vw;
  171. }
  172. }
  173. .content {
  174. width: 59vw;
  175. margin-left: 3.2vw;
  176. .name {
  177. font-size: 3.6vw;
  178. color: #282828;
  179. font-weight: bold;
  180. margin-bottom: 3.2vw;
  181. @include ellipsis(1);
  182. }
  183. .sncode {
  184. font-size: 3.6vw;
  185. color: #666666;
  186. }
  187. }
  188. }
  189. }
  190. }
  191. }
  192. </style>