1
0

app-participant-model.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. <template>
  2. <view class="app-participant-model">
  3. <view class="app-content">
  4. <view class="app-top dir-top-nowrap">
  5. <text class="app-title">正在拼团</text>
  6. <text class="app-description">仅显示10条正在拼团信息</text>
  7. <image class="app-icon" src="../../../static/image/icon/close.png" @click="close()"></image>
  8. </view>
  9. <!-- #ifdef MP-ALIPAY -->
  10. <scroll-view class="app-scroll" scroll-y>
  11. <block v-for="(item, index) in 10" :key="index">
  12. <template v-if="item <= pintuan_list.length">
  13. <view class="app-item dir-left-nowrap cross-center">
  14. <image class="app-avatar" :src="pintuan_list[item-1].avatar"></image>
  15. <view class="app-content-text dir-top-nowrap">
  16. <view class="app-top-name-people dir-left-nowrap">
  17. <text class="app-name">{{pintuan_list[item-1].nickname}}</text>
  18. <text class="app-people">还差{{pintuan_list[item-1].surplus_people}}人</text>
  19. </view>
  20. <view class="app-time cross-center">
  21. <text>剩余</text>
  22. <app-surplus-time :surplus_date_time="pintuan_list[item-1].surplus_date_time"></app-surplus-time>
  23. </view>
  24. </view>
  25. <view class="app-go" :class="theme+ '-m-back '+ theme">
  26. <app-jump-button form :url="`/plugins/pt/detail/detail?id=${pintuan_list[item-1].id}`">
  27. 去参团
  28. </app-jump-button>
  29. </view>
  30. </view>
  31. </template>
  32. </block>
  33. </scroll-view>
  34. <!-- #endif -->
  35. <!-- #ifndef MP-ALIPAY -->
  36. <scroll-view class="app-scroll" scroll-y>
  37. <block v-for="(item, index) in 10" :key="index">
  38. <template v-if="item < pintuan_list.length">
  39. <view class="app-item dir-left-nowrap cross-center">
  40. <image class="app-avatar" :src="pintuan_list[item].avatar"></image>
  41. <view class="app-content-text dir-top-nowrap">
  42. <view class="app-top-name-people dir-left-nowrap">
  43. <text class="app-name">{{pintuan_list[item].nickname}}</text>
  44. <text class="app-people">还差{{pintuan_list[item].surplus_people}}人</text>
  45. </view>
  46. <view class="app-time cross-center">
  47. <text>剩余</text>
  48. <app-surplus-time :surplus_date_time="pintuan_list[item].surplus_date_time"></app-surplus-time>
  49. </view>
  50. </view>
  51. <view class="app-go" :class="theme+ '-m-back '+ theme">
  52. <app-jump-button form :url="`/plugins/pt/detail/detail?id=${pintuan_list[item].id}`">
  53. 去参团
  54. </app-jump-button>
  55. </view>
  56. </view>
  57. </template>
  58. </block>
  59. </scroll-view>
  60. <!-- #endif -->
  61. </view>
  62. </view>
  63. </template>
  64. <script>
  65. import appSurplusTime from './app-surplus_time.vue';
  66. export default {
  67. name: 'app-participant-model',
  68. props: {
  69. pintuan_list: {
  70. type: Array,
  71. default() {
  72. return [];
  73. }
  74. },
  75. value: {
  76. type: Boolean
  77. },
  78. theme: String
  79. },
  80. data() {
  81. return {
  82. tpBool: this.value,
  83. }
  84. },
  85. methods: {
  86. close() {
  87. this.tpBool = false;
  88. this.$emit('input', this.tpBool);
  89. }
  90. },
  91. components: {
  92. 'app-surplus-time': appSurplusTime,
  93. }
  94. }
  95. </script>
  96. <style scoped lang="scss">
  97. .app-participant-model {
  98. position: fixed;
  99. top: 0;
  100. left: 0;
  101. z-index: 16000;
  102. width: #{750rpx};
  103. height: 100%;
  104. background-color:rgba(127,127,127, 0.3);
  105. .app-content {
  106. width: #{650rpx};
  107. border-radius: #{16rpx};
  108. background-color: white;
  109. position: absolute;
  110. top: 50%;
  111. left: 50%;
  112. transform: translate(-50%, -50%);
  113. padding-bottom: #{40rpx};
  114. .app-top {
  115. border-bottom: #{1rpx} solid #e2e2e2;
  116. padding-bottom: #{24rpx};
  117. padding-top: #{32rpx};
  118. text-align: center;
  119. .app-title {
  120. font-size: #{32rpx};
  121. color: #353535;
  122. }
  123. .app-description {
  124. font-size: #{24rpx};
  125. color: #999999;
  126. margin-top: #{12rpx};
  127. }
  128. .app-icon {
  129. position: absolute;
  130. top: #{24rpx};
  131. right: #{24rpx};
  132. width: #{30rpx};
  133. height: #{30rpx};
  134. }
  135. }
  136. .app-scroll {
  137. width: #{650rpx};
  138. max-height: #{540rpx};
  139. padding: #{14rpx} #{24rpx} 0 #{24rpx};
  140. .app-item {
  141. width: #{650-48rpx};
  142. height: #{100rpx};
  143. margin-bottom: #{10rpx};
  144. background-color: #f6f6f6;
  145. border-bottom-left-radius: #{8rpx};
  146. border-top-left-radius: #{8rpx};
  147. position: relative;
  148. .app-avatar {
  149. margin-left: #{20rpx};
  150. width: #{80rpx};
  151. height: #{80rpx};
  152. border-radius: 50%;
  153. }
  154. .app-content-text {
  155. width: #{338rpx};
  156. height: #{100rpx};
  157. padding-left: #{24rpx};
  158. .app-top-name-people {
  159. margin-top: #{13rpx};
  160. }
  161. .app-time {
  162. font-size: #{24rpx};
  163. color: #666666;
  164. margin-top: #{12rpx};
  165. }
  166. .app-name {
  167. font-size: #{28rpx};
  168. color: #353535;
  169. width: #{118rpx};
  170. word-break: break-all;
  171. text-overflow: ellipsis;
  172. display: -webkit-box;
  173. -webkit-box-orient: vertical;
  174. -webkit-line-clamp: 1;
  175. overflow: hidden;
  176. }
  177. .app-people {
  178. margin-left: #{20rpx};
  179. font-size: #{24rpx};
  180. color: #ff4544;
  181. }
  182. }
  183. .app-go {
  184. width: #{140rpx};
  185. height: #{100rpx};
  186. line-height: #{100rpx};
  187. color: #ffffff;
  188. font-size: #{24rpx};
  189. text-align: center;
  190. position:absolute;
  191. right: 0;
  192. }
  193. }
  194. }
  195. }
  196. }
  197. </style>