yglist.vue 3.3 KB

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