vipDetail.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. <template>
  2. <view class="content">
  3. <view class="background">
  4. <image src="../../static/merchant/vipbackground.png" mode=""></image>
  5. <view class="title">
  6. {{number}}
  7. <text class="ren"></text>
  8. </view>
  9. </view>
  10. <scroll-view scroll-y="true" class="scroll-wrapper" :style="{'height': height}">
  11. <!-- 空白页 -->
  12. <empty v-if=" loaded && vipList.length == 0"></empty>
  13. <view class="vip-wrapper">
  14. <view class="vip" v-for="item in vipList">
  15. <view class="img">
  16. <image :src="item.image" mode=""></image>
  17. </view>
  18. <view class="vip-content">
  19. <view class="left">
  20. <view class="top">
  21. <view class="name">
  22. {{item.name}}
  23. </view>
  24. <view class="nameplate">
  25. </view>
  26. </view>
  27. <view class="bottom">
  28. {{item.phone}}
  29. </view>
  30. </view>
  31. <view class="right">
  32. 消费:¥{{item.money}}
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. <uni-load-more :status="loadingType"></uni-load-more>
  38. </scroll-view>
  39. <!-- <view class="vip-box">
  40. </view> -->
  41. </view>
  42. </template>
  43. <script>
  44. import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
  45. import empty from '@/components/empty';
  46. export default {
  47. components: {
  48. empty,
  49. uniLoadMore
  50. },
  51. data() {
  52. return {
  53. loadingType: 'more',
  54. loaded: true,
  55. height: '',
  56. number: 199, //人数
  57. vipList: [
  58. {
  59. image: "../../static/error/missing-face.png",
  60. name: "强爹",
  61. phone: 19211111111,
  62. money: 1200
  63. },
  64. {
  65. image: "../../static/error/missing-face.png",
  66. name: "强爹",
  67. phone: 19211111111,
  68. money: 1200
  69. },
  70. {
  71. image: "../../static/error/missing-face.png",
  72. name: "强爹",
  73. phone: 19211111111,
  74. money: 1200
  75. },
  76. {
  77. image: "../../static/error/missing-face.png",
  78. name: "强爹",
  79. phone: 19211111111,
  80. money: 1200
  81. },
  82. {
  83. image: "../../static/error/missing-face.png",
  84. name: "强爹",
  85. phone: 19211111111,
  86. money: 1200
  87. },
  88. {
  89. image: "../../static/error/missing-face.png",
  90. name: "强爹",
  91. phone: 19211111111,
  92. money: 1200
  93. },
  94. {
  95. image: "../../static/error/missing-face.png",
  96. name: "强爹",
  97. phone: 19211111111,
  98. money: 1200
  99. },
  100. {
  101. image: "../../static/error/missing-face.png",
  102. name: "强爹",
  103. phone: 19211111111,
  104. money: 1200
  105. },
  106. {
  107. image: "../../static/error/missing-face.png",
  108. name: "强爹",
  109. phone: 19211111111,
  110. money: 1200
  111. }
  112. ]
  113. };
  114. },
  115. onReady(res) {
  116. var _this = this;
  117. uni.getSystemInfo({
  118. success: resu => {
  119. const query = uni.createSelectorQuery();
  120. query.select('.scroll-wrapper').boundingClientRect();
  121. query.exec(function(res) {
  122. console.log(res, 'ddddddddddddd');
  123. _this.height = resu.windowHeight - res[0].top + 'px';
  124. console.log('打印页面的剩余高度', _this.height);
  125. });
  126. },
  127. fail: res => {}
  128. });
  129. },
  130. }
  131. </script>
  132. <style lang="scss">
  133. .background {
  134. display: flex;
  135. justify-content: center;
  136. position: relative;
  137. width: 100%;
  138. height: 360rpx;
  139. image {
  140. width: 100%;
  141. height: 100%;
  142. }
  143. }
  144. .title {
  145. position: absolute;
  146. text-align: center;
  147. line-height: 360rpx;
  148. font-size: 72rpx;
  149. font-family: PingFang SC;
  150. font-weight: bold;
  151. color: #FFFFFF;
  152. .ren {
  153. font-size: 36rpx;
  154. font-family: PingFang SC;
  155. font-weight: bold;
  156. color: #FFFFFF;
  157. line-height: 43rpx;
  158. }
  159. }
  160. .scroll-wrapper {
  161. }
  162. .vip-wrapper {
  163. padding: 0 26rpx 0 23rpx;
  164. background-color: #fff;
  165. }
  166. .vip {
  167. border-top: 1rpx solid #E3E3E3;
  168. display: flex;
  169. align-items: center;
  170. .img {
  171. margin: 0 20rpx;
  172. width: 80rpx;
  173. height: 80rpx;
  174. border-radius: 50%;
  175. image {
  176. width: 100%;
  177. height: 100%;
  178. }
  179. }
  180. .vip-content {
  181. margin: 30rpx 0;
  182. display: flex;
  183. justify-content: space-between;
  184. width: 580rpx;
  185. display: flex;
  186. align-items: center;
  187. .left {
  188. display: flex;
  189. flex-direction: column;
  190. .top {
  191. display: flex;
  192. .name {
  193. font-size: 30rpx;
  194. font-family: PingFangSC;
  195. font-weight: 500;
  196. color: #3F454B;
  197. }
  198. .nameplate {}
  199. }
  200. .bottom {
  201. font-size: 22rpx;
  202. font-family: PingFang SC;
  203. font-weight: 400;
  204. color: #999999;
  205. }
  206. }
  207. .right {
  208. font-size: 30rpx;
  209. font-family: PingFang SC;
  210. font-weight: bold;
  211. color: #FF6F0F;
  212. }
  213. }
  214. }
  215. </style>