index.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <template>
  2. <view>
  3. <uni-nav-bar title="门店信息" backgroundColor='#03803B' color="#fff" left-icon="left" @clickLeft='goBack()'>
  4. <block slot="right">
  5. <view>
  6. <image class="nav-right" src="@/static/images/home/store/add.png" />
  7. </view>
  8. </block>
  9. </uni-nav-bar>
  10. <view style="background-color: #fff;">
  11. <uni-search-bar bgColor="#F6F6F6 " v-model="searchValue" placeholder="请输入客户名称">
  12. </uni-search-bar>
  13. </view>
  14. <view class="list">
  15. <view class="tab-bar-item" v-for="(item, index) in dataList" :key="index">
  16. <image class="icon" :src="item.url" />
  17. <view class="text">
  18. <view class="text_title">
  19. {{item.cname}}
  20. </view>
  21. <view class="text_content">
  22. <text style="color: #999999;">前置仓:</text>
  23. <text style="color: #6A6A6A" class='uni-lastmsg'>{{item.deliveryWarehouseName}}</text>
  24. <text style="color: #999999;margin-left: 66rpx;">价格:</text>
  25. <text style="color: #6A6A6A" class='uni-lastmsg2'>¥{{item.priceSystem}}</text>
  26. </view>
  27. <view class="text_foot">
  28. <text style="color: #999999;">电话:</text>
  29. <text style="color: #6A6A6A">{{item.tel}}</text>
  30. </view>
  31. </view>
  32. <view class="menu">
  33. <view class="">
  34. <image class="edit" src="@/static/images/home/store/edit.png" />
  35. </view>
  36. <view class="">
  37. <image class="QR" src="@/static/images/home/store/QR.png" />
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. </template>
  44. <script>
  45. import {
  46. getList
  47. } from '@/api/home/store.js'
  48. export default {
  49. data() {
  50. return {
  51. searchValue: null,
  52. page: {
  53. current: 1,
  54. size: 10,
  55. total: 0,
  56. },
  57. dataList: []
  58. }
  59. },
  60. onLoad() {
  61. this.getList()
  62. },
  63. methods: {
  64. getList() {
  65. const obj = {
  66. current: this.page.current,
  67. size: this.page.size
  68. }
  69. getList(obj).then(res => {
  70. this.dataList = res.data.records
  71. })
  72. },
  73. goBack() {
  74. uni.navigateBack({
  75. delta: 1,
  76. });
  77. }
  78. }
  79. }
  80. </script>
  81. <style lang="scss" scoped>
  82. .uni-lastmsg {
  83. width: 80rpx;
  84. white-space: nowrap;
  85. overflow: hidden;
  86. text-overflow: ellipsis;
  87. display: block;
  88. /* 需明确设置display */
  89. }
  90. .uni-lastmsg2 {
  91. width: 140rpx;
  92. white-space: nowrap;
  93. overflow: hidden;
  94. text-overflow: ellipsis;
  95. display: block;
  96. /* 需明确设置display */
  97. }
  98. .nav-right {
  99. width: 54rpx;
  100. height: 54rpx;
  101. }
  102. .list {
  103. width: 100%;
  104. .tab-bar-item {
  105. background-color: #fff;
  106. margin-top: 30rpx;
  107. padding: 30rpx 62rpx;
  108. display: flex;
  109. .icon {
  110. width: 140rpx;
  111. height: 140rpx;
  112. background: #909090;
  113. border-radius: 14rpx;
  114. }
  115. .text {
  116. padding: 10rpx 17rpx;
  117. .text_title {
  118. height: 25rpx;
  119. font-weight: 500;
  120. font-size: 26rpx;
  121. color: #6A6A6A;
  122. }
  123. .text_content {
  124. display: flex;
  125. margin-top: 16rpx
  126. }
  127. .text_foot {}
  128. }
  129. .menu {
  130. position: absolute;
  131. right: 62rpx;
  132. .edit {
  133. margin-top: 10rpx;
  134. width: 30rpx;
  135. height: 33rpx;
  136. }
  137. .QR {
  138. margin-top: 54rpx;
  139. width: 30rpx;
  140. height: 31rpx;
  141. }
  142. }
  143. }
  144. }
  145. </style>