app-participant.vue 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. <template>
  2. <view class="app-participant">
  3. <view v-if="ptBool">
  4. <app-participant-model :theme="theme" v-model="ptBool" :pintuan_list="list"></app-participant-model>
  5. </view>
  6. <view class="app-spec dir-left-nowrap main-between cross-center" @click="route_go">
  7. <view class="item dir-top-nowrap main-center cross-center">
  8. <image src="../image/pay.png"></image>
  9. <text>支付开团</text>
  10. </view>
  11. <image class="arrow" src="../image/arrow.png"></image>
  12. <view class="item dir-top-nowrap main-center cross-center">
  13. <image src="../image/invite.png"></image>
  14. <text>邀请好友</text>
  15. </view>
  16. <image class="arrow" src="../image/arrow.png"></image>
  17. <view class="item dir-top-nowrap main-center cross-center">
  18. <image src="../image/ship.png"></image>
  19. <text>成功发货</text>
  20. </view>
  21. <image class="arrow" src="../image/arrow.png"></image>
  22. <view class="item dir-top-nowrap main-center cross-center">
  23. <image src="../image/refund.png"></image>
  24. <text>失败退款</text>
  25. </view>
  26. </view>
  27. <view class="app-content" v-if="list.length > 0">
  28. <view class="app-peo-text dir-left-nowrap main-between cross-center">
  29. <text>以下小伙伴正在发起拼团,您可以直接参与:</text>
  30. <view>
  31. <app-form-id @click="ptBool = true">
  32. <text class="app-text">查看更多</text>
  33. <image class="app-icon" src="../../../static/image/icon/arrow-right.png"></image>
  34. </app-form-id>
  35. </view>
  36. </view>
  37. <!-- #ifdef MP-ALIPAY -->
  38. <template v-if="list.length === 1">
  39. <block v-for="(item, index) in 1" :key="index">
  40. <view class="app-item dir-left-nowrap main-between" >
  41. <view class="dir-left-nowrap cross-center">
  42. <image class="app-icon" :src="list[item-1].avatar"></image>
  43. <text class="app-name">{{list[item-1].nickname}}</text>
  44. </view>
  45. <view class="dir-left-nowrap cross-center">
  46. <view class="app-text dir-top-nowrap main-between">
  47. <text class="app-red">还差{{list[item-1].surplus_people}}人成团</text>
  48. <view class="app-gray">
  49. <app-surplus-time :surplus_date_time="list[item-1].surplus_date_time"></app-surplus-time>
  50. </view>
  51. </view>
  52. <view class="app-go" :style="{'background-color': theme.background}">
  53. <app-jump-button form :url="`/plugins/pt/detail/detail?id=${list[item-1].id}`">
  54. 去参团
  55. </app-jump-button>
  56. </view>
  57. </view>
  58. </view>
  59. </block>
  60. </template>
  61. <template v-if="list.length >= 2">
  62. <block v-for="(item, index) in 2" :key="index">
  63. <view class="app-item dir-left-nowrap main-between" >
  64. <view class="dir-left-nowrap cross-center">
  65. <image class="app-icon" :src="list[item-1].avatar"></image>
  66. <text class="app-name">{{list[item-1].nickname}}</text>
  67. </view>
  68. <view class="dir-left-nowrap cross-center">
  69. <view class="app-text dir-top-nowrap main-between">
  70. <text class="app-red">还差{{list[item-1].surplus_people}}人成团</text>
  71. <view class="app-gray">
  72. <app-surplus-time :surplus_date_time="list[item-1].surplus_date_time"></app-surplus-time>
  73. </view>
  74. </view>
  75. <view class="app-go" :style="{'background-color': theme.background}">
  76. <app-jump-button form :url="`/plugins/pt/detail/detail?id=${list[item-1].id}`">
  77. 去参团
  78. </app-jump-button>
  79. </view>
  80. </view>
  81. </view>
  82. </block>
  83. </template>
  84. <!-- #endif -->
  85. <!-- #ifndef MP-ALIPAY -->
  86. <template v-if="list.length === 1 && list">
  87. <block v-for="(item, index) in 1" :key="index">
  88. <view class="app-item dir-left-nowrap main-between" >
  89. <view class="dir-left-nowrap cross-center">
  90. <image class="app-icon" :src="list[item].avatar"></image>
  91. <text class="app-name">{{list[item].nickname}}</text>
  92. </view>
  93. <view class="dir-left-nowrap cross-center">
  94. <view class="app-text dir-top-nowrap main-between">
  95. <text class="app-red">还差{{list[item].surplus_people}}人成团</text>
  96. <view class="app-gray">
  97. <app-surplus-time :surplus_date_time="list[item].surplus_date_time"></app-surplus-time>
  98. </view>
  99. </view>
  100. <view class="app-go" :style="{'background-color': theme.background}">
  101. <app-jump-button form :url="`/plugins/pt/detail/detail?id=${list[item].id}`">
  102. 去参团
  103. </app-jump-button>
  104. </view>
  105. </view>
  106. </view>
  107. </block>
  108. </template>
  109. <template v-if="list.length >= 2 && list">
  110. <block v-for="(item, index) in 2" :key="index">
  111. <view class="app-item dir-left-nowrap main-between" >
  112. <view class="dir-left-nowrap cross-center">
  113. <image class="app-icon" :src="list[item].avatar"></image>
  114. <text class="app-name">{{list[item].nickname}}</text>
  115. </view>
  116. <view class="dir-left-nowrap cross-center">
  117. <view class="app-text dir-top-nowrap main-between">
  118. <text class="app-red">还差{{list[item].surplus_people}}人成团</text>
  119. <view class="app-gray">
  120. <app-surplus-time :surplus_date_time="list[item].surplus_date_time"></app-surplus-time>
  121. </view>
  122. </view>
  123. <view class="app-go" :style="{'background-color': theme.background}">
  124. <app-jump-button form :url="`/plugins/pt/detail/detail?id=${list[item].id}`">
  125. 去参团
  126. </app-jump-button>
  127. </view>
  128. </view>
  129. </view>
  130. </block>
  131. </template>
  132. <!-- #endif -->
  133. </view>
  134. </view>
  135. </template>
  136. <script>
  137. import appSurplusTime from './app-surplus_time.vue';
  138. import appParticipantModel from './app-participant-model.vue';
  139. export default {
  140. name: 'app-participant',
  141. data() {
  142. return {
  143. ptBool: false,
  144. show: 0,
  145. selectAttr: {},
  146. attr: {},
  147. list: []
  148. }
  149. },
  150. props: {
  151. pintuan_list: {
  152. type: Array,
  153. default() {
  154. return [];
  155. }
  156. },
  157. theme: Object
  158. },
  159. methods: {
  160. route_go() {
  161. uni.navigateTo({
  162. url: `/pages/rules/index?url=${encodeURIComponent(this.$api.pt.index)}&keys=${JSON.stringify(['setting', 'new_rules'])}`,
  163. });
  164. }
  165. },
  166. components: {
  167. 'app-surplus-time': appSurplusTime,
  168. 'app-participant-model': appParticipantModel
  169. },
  170. watch: {
  171. pintuan_list: {
  172. handler(data) {
  173. this.list = data;
  174. },
  175. immediate: true
  176. }
  177. }
  178. }
  179. </script>
  180. <style scoped lang="scss">
  181. .app-spec {
  182. height: #{160rpx};
  183. padding: #{16upx 60upx 10upx 60upx};
  184. .arrow {
  185. width: #{38upx};
  186. height: #{30upx};
  187. }
  188. .item {
  189. image {
  190. width: #{50upx};
  191. height: #{50upx};
  192. margin-bottom: #{10upx};
  193. }
  194. text {
  195. font-size: #{24upx};
  196. line-height: 1;
  197. color: #666666;
  198. margin-top: #{10upx};
  199. }
  200. }
  201. }
  202. .app-participant {
  203. width: #{702rpx};
  204. background-color: white;
  205. padding: 20upx;
  206. margin: 24upx 24upx 0 24upx;
  207. border-radius: 15upx;
  208. .app-left {
  209. font-size: #{24rpx};
  210. color: #666666;
  211. }
  212. .app-right {
  213. width: #{134rpx};
  214. }
  215. .app-text {
  216. font-size: #{24rpx};
  217. color: #999999;
  218. }
  219. .app-icon {
  220. width: #{12rpx};
  221. height: #{22rpx};
  222. margin-left: #{12rpx};
  223. }
  224. .app-content {
  225. padding: #{0 24upx 20upx 24upx};
  226. box-sizing: border-box;
  227. }
  228. .app-peo-text {
  229. font-size: #{24rpx};
  230. color: #666666;
  231. padding: #{24rpx} 0;
  232. box-sizing: border-box;
  233. .app-icon {
  234. width: #{12rpx};
  235. height: #{22rpx};
  236. margin-left: #{12rpx};
  237. }
  238. .app-text {
  239. font-size: #{24rpx};
  240. color: #999999;
  241. }
  242. }
  243. .app-item {
  244. height: #{100rpx};
  245. background-color: #f6f6f6;
  246. width: #{614rpx};
  247. border-bottom-left-radius: #{8rpx};
  248. border-top-left-radius: #{8rpx};
  249. margin-bottom: #{10rpx};
  250. .app-icon {
  251. height: #{80rpx};
  252. width: #{80rpx};
  253. border-radius: 50%;
  254. margin-left: #{20rpx};
  255. }
  256. .app-name {
  257. font-size: #{28rpx};
  258. color: #353535;
  259. width: #{170rpx};
  260. word-break: break-all;
  261. text-overflow: ellipsis;
  262. display: -webkit-box;
  263. -webkit-box-orient: vertical;
  264. -webkit-line-clamp: 1;
  265. overflow: hidden;
  266. margin-left: #{16rpx};
  267. }
  268. .app-go {
  269. width: #{140rpx};
  270. height: #{100rpx};
  271. font-size: #{24rpx};
  272. text-align: center;
  273. color: #ffffff;
  274. margin-left: #{16rpx};
  275. }
  276. .app-text {
  277. font-size: #{24rpx};
  278. width: #{178rpx};
  279. height: #{100rpx};
  280. text {
  281. word-break: break-all;
  282. text-overflow: ellipsis;
  283. display: -webkit-box;
  284. -webkit-box-orient: vertical;
  285. -webkit-line-clamp: 1;
  286. overflow: hidden;
  287. }
  288. .app-red {
  289. color: #ff5c5c;
  290. margin-top: #{14rpx};
  291. }
  292. .app-gray {
  293. color: #707070;
  294. margin-bottom: #{14rpx};
  295. }
  296. }
  297. }
  298. }
  299. </style>