index.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <template>
  2. <view class="content">
  3. <view class="header-box">
  4. <view class="status_bar"></view>
  5. <view class="title"><text>管配件,就用</text>修配一码通</view>
  6. </view>
  7. <view class="body-box">
  8. <!-- 滚动区域 -->
  9. <view class="scroll-list">
  10. <scrollBox :list="list"></scrollBox>
  11. </view>
  12. <!-- 保证金 -->
  13. <view class="notices flex align_center">
  14. <view><u-icon name="volume" color="#f2a557" :size="28" :margin-right='15'></u-icon> 您有一笔保证金待支付 ¥2,000.00</view> <text>立即支付>></text>
  15. </view>
  16. <!-- 名片 -->
  17. <view class="userCard flex align_center justify_between">
  18. <view class="userCard-info flex align_center justify_between">
  19. <view>
  20. <u-image v-if="!hasLogin" src="/static/def_personal_avatar.png" width="90" height="90"></u-image>
  21. <open-data v-else type="userAvatarUrl" class="user-photo"></open-data>
  22. </view>
  23. <view>
  24. <view>王杰</view>
  25. <view>宇博极速汽车维修养护中心</view>
  26. </view>
  27. </view>
  28. <view>
  29. <u-icon name="arrow-right"></u-icon>
  30. </view>
  31. </view>
  32. <!-- 扫描按钮 -->
  33. <view class="scanButton flex align_center" @click="openCamera">
  34. <u-icon name="scan" size="40"></u-icon><text class="ml10">扫描VIN</text>
  35. </view>
  36. <!-- 扫描记录 -->
  37. <u-cell-group :border="false">
  38. <u-cell-item title="扫描记录" :title-style="{fontSize:'1.1em'}" value="查看全部">
  39. <u-icon slot="icon" size="38" color="#00aaff" style="margin-right: 0.3em;" name="order"></u-icon>
  40. </u-cell-item>
  41. </u-cell-group>
  42. </view>
  43. <!-- 扫描记录 -->
  44. <view class="list-box">
  45. <u-cell-group :border="false">
  46. <u-cell-item v-for="item in 10" title="LBVNU79049SB81489" :title-style="{fontSize:'1em'}" value="宝马 54646d">
  47. <text slot="icon"></text>
  48. </u-cell-item>
  49. </u-cell-group>
  50. <view class="des">仅展示最近10条记录,点击“全部”查看更多</view>
  51. </view>
  52. </view>
  53. </template>
  54. <script>
  55. import {
  56. mapState,
  57. mapMutations
  58. } from 'vuex'
  59. import scrollBox from '@/components/scrollBox.vue'
  60. export default {
  61. components: {
  62. scrollBox
  63. },
  64. data() {
  65. return {
  66. list:[
  67. {
  68. userName: '一部'
  69. },
  70. {
  71. userName: '夏利我'
  72. },
  73. {
  74. userName: '离散'
  75. },
  76. {
  77. userName: '网络'
  78. },
  79. {
  80. userName: '撒打发'
  81. },
  82. {
  83. userName: 'ipho23'
  84. }
  85. ]
  86. }
  87. },
  88. computed: {
  89. ...mapState(['hasLogin'])
  90. },
  91. onLoad() {
  92. },
  93. methods: {
  94. openCamera(){
  95. uni.navigateTo({
  96. url: "/pages/scan-frame/scan-frame"
  97. })
  98. }
  99. }
  100. }
  101. </script>
  102. <style lang="less">
  103. .content {
  104. margin: 0;
  105. padding: 0;
  106. height: 100vh;
  107. display: flex;
  108. flex-direction: column;
  109. background-image: linear-gradient(#86defa 0%,#cdeff9 25%,#ffffff 40%);
  110. .header-box{
  111. padding: 0.3em 1em;
  112. .status_bar {
  113. height: var(--status-bar-height);
  114. width: 100%;
  115. }
  116. .title{
  117. padding-top: 0.4em;
  118. font-size: 1.5em;
  119. color: #000;
  120. text{
  121. color: #0077fd;
  122. }
  123. }
  124. }
  125. .body-box{
  126. flex-grow: 1;
  127. padding: 0.5em 1em;
  128. .notices{
  129. padding: 0.5em 0 1em;
  130. view{
  131. color: #f2a557;
  132. }
  133. text{
  134. color: #0077fd;
  135. margin-left: 1em;
  136. }
  137. }
  138. .userCard{
  139. padding:0.8em;
  140. background: #fff;
  141. border-radius: 1em;
  142. box-shadow: 0.2em 0.3em 0.8em #cdeff9;
  143. .userCard-info{
  144. > view{
  145. &:last-child{
  146. margin-left: 0.5em;
  147. >view{
  148. padding: 0.2em;
  149. }
  150. }
  151. }
  152. }
  153. }
  154. .scanButton{
  155. margin: 0.6em 0;
  156. padding: 0.5em;
  157. background: #1283d4;
  158. color: #fff;
  159. font-size: 1.5em;
  160. border-radius: 5em;
  161. justify-content: center;
  162. &:active{
  163. opacity: 0.8;
  164. }
  165. }
  166. .ml10{
  167. margin-left: 0.2em;
  168. }
  169. }
  170. .list-box{
  171. padding: 0 1em;
  172. overflow: auto;
  173. .des{
  174. text-align: center;
  175. padding: 1em 0;
  176. color: #999;
  177. font-size: 0.8em;
  178. }
  179. }
  180. }
  181. </style>