groupMore.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <template>
  2. <view class="container">
  3. <view class="tui-group-box tui-top tui-btm">
  4. <tui-list-cell :hover="false">
  5. <view class="tui-group-header">
  6. <view class="tui-group-title">还差<text class="tui-color-red">1人</text>即可拼团成功</view>
  7. </view>
  8. </tui-list-cell>
  9. <view v-for="(item, index) in datalist" :key="index">
  10. <tui-list-cell :hover="false">
  11. <view class="tui-pro-item">
  12. <image :src="item.avatar || '/static/images/my/img_not_tuxedo.png'" class="tui-avatar">
  13. </image>
  14. <view class="tui-name">{{item.nickname}}</view>
  15. <view class="tui-pro__right tui-btn__box">
  16. <view>
  17. <tui-button type="danger" width="128rpx" height="52rpx" :size="24" shadow
  18. shape="circle">去参团</tui-button>
  19. </view>
  20. <view class="tui-group-countdown">
  21. <view class="tui-countdown-right">剩余</view>
  22. <tui-countdown :time="3800" scale colonColor="#EB0909" borderColor="#EB0909"
  23. color="#EB0909"></tui-countdown>
  24. <view class="tui-countdown-left">结束</view>
  25. </view>
  26. </view>
  27. </view>
  28. </tui-list-cell>
  29. </view>
  30. </view>
  31. <tui-divider gradual width="60%">没有更多了</tui-divider>
  32. </view>
  33. </template>
  34. <script>
  35. export default {
  36. data() {
  37. return {
  38. webURL: 'https://thorui.cn/images/mall/group/',
  39. datalist:[]
  40. }
  41. },
  42. onLoad(e) {
  43. var _this = this;
  44. _this.$request.post('tuanfound.list', {
  45. tuanid: e.tuanid,
  46. samkey: (new Date()).valueOf()
  47. }).then(res => {
  48. if (res.errno == 0) {
  49. _this.datalist = res.data;
  50. }
  51. })
  52. },
  53. methods: {},
  54. /**
  55. * 页面相关事件处理函数--监听用户下拉动作
  56. */
  57. onPullDownRefresh: function() {
  58. setTimeout(() => {
  59. uni.stopPullDownRefresh()
  60. }, 200);
  61. },
  62. }
  63. </script>
  64. <style>
  65. .tui-group-box {
  66. background: #fff;
  67. box-sizing: border-box;
  68. }
  69. .tui-group-header {
  70. padding: 0 48rpx 0 24rpx;
  71. display: flex;
  72. justify-content: space-between;
  73. align-items: center;
  74. color: #555555;
  75. font-size: 28rpx;
  76. }
  77. .tui-group-title {
  78. font-size: 32rpx;
  79. }
  80. .tui-color-red {
  81. color: #EB0909;
  82. }
  83. .tui-pro-item {
  84. display: flex;
  85. align-items: center;
  86. justify-content: space-between;
  87. padding: 12rpx 0;
  88. box-sizing: border-box;
  89. }
  90. .tui-name {
  91. white-space: nowrap;
  92. overflow: hidden;
  93. text-overflow: ellipsis;
  94. font-size: 28rpx;
  95. }
  96. .tui-avatar {
  97. width: 108rpx;
  98. height: 108rpx;
  99. flex-shrink: 0;
  100. margin-right: 20rpx;
  101. display: block;
  102. border-radius: 50%;
  103. }
  104. .tui-pro__right {
  105. width: 40%;
  106. height: 104rpx;
  107. display: flex;
  108. flex-direction: column;
  109. justify-content: space-between;
  110. }
  111. .tui-group-countdown {
  112. display: flex;
  113. align-items: center;
  114. font-size: 24rpx;
  115. color: #666666;
  116. white-space: nowrap;
  117. }
  118. .tui-btn__box {
  119. align-items: flex-end;
  120. flex: 1;
  121. }
  122. .tui-countdown-right {
  123. padding-right: 6rpx;
  124. }
  125. .tui-countdown-left {
  126. padding-left: 6rpx;
  127. }
  128. </style>