official.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. <template>
  2. <view class="content">
  3. <view class="gq-list">
  4. <view class="gq-item" v-for="item in list" @click="gotoDetail(item)">
  5. <view class="gq-logo">
  6. <image :src="item.avatar" mode="" class=""></image>
  7. </view>
  8. <view class="store-name ellipsis">
  9. {{item.staffName}}
  10. </view>
  11. <view class="info">
  12. <view class="info-tit">
  13. 职务:
  14. </view>
  15. <view class="info-val">
  16. {{item.departmentName}}
  17. </view>
  18. </view>
  19. <view class="info">
  20. <view class="info-tit">
  21. 工号:
  22. </view>
  23. <view class="info-val">
  24. {{item.staffCode}}
  25. </view>
  26. </view>
  27. <!-- <view class="info">
  28. <view class="info-tit">
  29. 业务:
  30. </view>
  31. <view class="info-val">
  32. 创始人
  33. </view>
  34. </view> -->
  35. </view>
  36. </view>
  37. <u-loadmore :status="loadingType" />
  38. </view>
  39. </template>
  40. <script>
  41. export default {
  42. data() {
  43. return {
  44. type: '',
  45. list: [],
  46. loadingType: 'loadmore',
  47. page: 1,
  48. limit: 12,
  49. typename: ''
  50. }
  51. },
  52. onLoad(opt) {
  53. if (opt.type) {
  54. this.type = opt.type
  55. if (this.type == 1) {
  56. uni.setNavigationBarTitle({
  57. title: '高管'
  58. })
  59. this.typename = 'getAllygList'
  60. } else if (this.type == 2) {
  61. uni.setNavigationBarTitle({
  62. title: '员工'
  63. })
  64. this.typename = 'getAllygList'
  65. } else if (this.type == 3) {
  66. uni.setNavigationBarTitle({
  67. title: '共享股东商家'
  68. })
  69. this.typename = 'getAllygList'
  70. }
  71. this.getList()
  72. }
  73. },
  74. onShow() {
  75. },
  76. onReachBottom() {
  77. this.getList()
  78. },
  79. onReady() {
  80. },
  81. methods: {
  82. navto(url) {
  83. uni.navigateTo({
  84. url
  85. })
  86. },
  87. gotoDetail() {
  88. // 员工详情
  89. if (this.type == 2) {
  90. this.navto('/pagesT/unit/ygdetail')
  91. }
  92. },
  93. getList() {
  94. let that = this
  95. if (that.loadingType == 'nomore' || that.loadingType == 'loading') {
  96. return
  97. }
  98. that.loadingType = 'loading'
  99. this.$u.api[that.typename]({
  100. page: that.page,
  101. pagesize: that.limit
  102. }).then(res => {
  103. console.log(res)
  104. that.list = that.list.concat(res.data)
  105. that.page++
  106. if (res.data.length == that.limit) {
  107. that.loadingType = 'loadmore'
  108. } else {
  109. that.loadingType = 'nomore'
  110. }
  111. })
  112. }
  113. }
  114. }
  115. </script>
  116. <style lang="scss">
  117. .gq-list {
  118. display: flex;
  119. flex-wrap: wrap;
  120. justify-content: flex-start;
  121. // justify-content: space-between;
  122. padding: 20rpx 0 20rpx 20rpx;
  123. }
  124. .gq-item {
  125. margin: 0 0 20rpx 14rpx;
  126. width: 227rpx;
  127. height: 351rpx;
  128. background: #FFFFFF;
  129. box-shadow: 0px 5rpx 5rpx 0px rgba(35, 24, 21, 0.06);
  130. border-radius: 10rpx;
  131. display: flex;
  132. flex-direction: column;
  133. align-items: center;
  134. justify-content: space-between;
  135. padding: 30rpx 14rpx 20rpx;
  136. .gq-logo {
  137. width: 140rpx;
  138. height: 140rpx;
  139. border-radius: 50%;
  140. border: 1px solid #262261;
  141. display: flex;
  142. justify-content: center;
  143. align-items: center;
  144. image {
  145. width: 135rpx;
  146. height: 135rpx;
  147. background-color: #eee;
  148. border-radius: 50%;
  149. }
  150. }
  151. .store-name {
  152. padding-top: 10rpx;
  153. text-align: center;
  154. width: 100%;
  155. font-size: 26rpx;
  156. font-weight: 500;
  157. color: #262261;
  158. overflow: hidden;
  159. }
  160. .info {
  161. width: 100%;
  162. display: flex;
  163. padding: 5rpx 0;
  164. .info-tit {
  165. font-size: 18rpx;
  166. flex-shrink: 0;
  167. }
  168. .info-val {
  169. text-align: center;
  170. font-size: 20rpx;
  171. width: 140rpx;
  172. border-bottom: 1px #C7C7C7 solid;
  173. }
  174. }
  175. }
  176. </style>