app-participant.vue 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  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>{{list.length}}人正在拼团,可以直接参与:</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" :class="theme + '-m-back ' + theme">
  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" :class="theme + '-m-back ' + theme">
  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">
  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. <view class="nickname">
  92. <text>{{list[item].nickname}}</text>
  93. <view class="app-gray">
  94. 剩余
  95. <app-surplus-time :surplus_date_time="list[item].surplus_date_time"></app-surplus-time>
  96. </view>
  97. </view>
  98. </view>
  99. <view class="dir-left-nowrap cross-center">
  100. <view class="app-text dir-top-nowrap main-between">
  101. <text class="app-red">还差{{list[item].surplus_people}}人成团</text>
  102. </view>
  103. <view class="app-go" :class="theme + '-m-back ' + theme">
  104. <app-jump-button form :url="`/plugins/pt/detail/detail?id=${list[item].id}`">
  105. 去拼团
  106. </app-jump-button>
  107. </view>
  108. </view>
  109. </view>
  110. </block>
  111. </template>
  112. <template v-if="list.length >= 2">
  113. <block v-for="(item, index) in 2" :key="index">
  114. <view class="app-item dir-left-nowrap main-between" >
  115. <view class="dir-left-nowrap cross-center">
  116. <image class="app-icon" :src="list[item].avatar"></image>
  117. <view class="nickname">
  118. <text>{{list[item].nickname}}</text>
  119. <view class="app-gray">
  120. 剩余
  121. <app-surplus-time :surplus_date_time="list[item].surplus_date_time"></app-surplus-time>
  122. </view>
  123. </view>
  124. </view>
  125. <view class="dir-left-nowrap cross-center">
  126. <view class="app-text dir-top-nowrap main-between">
  127. <view>还差<text class="app-red">{{list[item].surplus_people}}人</text>成团</view>
  128. </view>
  129. <view class="app-go" :class="theme + '-m-back ' + theme">
  130. <app-jump-button form :url="`/plugins/pt/detail/detail?id=${list[item].id}`">
  131. 去拼团
  132. </app-jump-button>
  133. </view>
  134. </view>
  135. </view>
  136. </block>
  137. </template>
  138. <!-- #endif -->
  139. </view>
  140. </view>
  141. </template>
  142. <script>
  143. import appSurplusTime from './app-surplus_time.vue';
  144. import appParticipantModel from './app-participant-model.vue';
  145. export default {
  146. name: 'app-participant',
  147. data() {
  148. return {
  149. ptBool: false,
  150. show: 0,
  151. selectAttr: {},
  152. attr: {},
  153. list: []
  154. }
  155. },
  156. props: {
  157. pintuan_list: {
  158. type: Array,
  159. default() {
  160. return [];
  161. }
  162. },
  163. theme: String
  164. },
  165. methods: {
  166. route_go() {
  167. uni.navigateTo({
  168. url: `/pages/rules/index?url=${encodeURIComponent(this.$api.pt.index)}&keys=${JSON.stringify(['setting', 'new_rules'])}`,
  169. });
  170. }
  171. },
  172. components: {
  173. 'app-surplus-time': appSurplusTime,
  174. 'app-participant-model': appParticipantModel
  175. },
  176. watch: {
  177. pintuan_list: {
  178. handler(data) {
  179. this.list = data;
  180. },
  181. immediate: true
  182. }
  183. }
  184. }
  185. </script>
  186. <style scoped lang="scss">
  187. .app-spec {
  188. padding: 20upx;
  189. height: #{160rpx};
  190. padding: #{16upx 60upx 10upx 60upx};
  191. background-color: white;
  192. .arrow {
  193. width: #{38upx};
  194. height: #{30upx};
  195. }
  196. .item {
  197. image {
  198. width: #{50upx};
  199. height: #{50upx};
  200. margin-bottom: #{10upx};
  201. }
  202. text {
  203. font-size: #{24upx};
  204. line-height: 1;
  205. color: #666666;
  206. margin-top: #{10upx};
  207. }
  208. }
  209. }
  210. .app-participant {
  211. width: 100%;
  212. margin-top: 24upx;
  213. .app-left {
  214. font-size: #{24rpx};
  215. color: #666666;
  216. }
  217. .app-right {
  218. width: #{134rpx};
  219. }
  220. .app-text {
  221. font-size: #{24rpx};
  222. color: #F2597D;
  223. }
  224. .app-icon {
  225. width: #{12rpx};
  226. height: #{22rpx};
  227. margin-left: #{12rpx};
  228. }
  229. .app-content {
  230. padding: 20upx;
  231. padding: #{0 24upx 20upx 24upx};
  232. box-sizing: border-box;
  233. margin-top: 24upx;
  234. background-color: white;
  235. }
  236. .app-peo-text {
  237. font-size: #{32rpx};
  238. color: #333;
  239. padding: #{24rpx} 0;
  240. box-sizing: border-box;
  241. border-bottom: 1rpx solid #f5f5f5;
  242. .app-icon {
  243. width: #{12rpx};
  244. height: #{22rpx};
  245. margin-left: #{12rpx};
  246. }
  247. .app-text {
  248. font-size: #{32rpx};
  249. color: #F2597D;
  250. }
  251. }
  252. .app-item {
  253. height: 100rpx;
  254. width: 100%;
  255. margin-bottom: 10rpx;
  256. border-bottom: 1rpx solid #f5f5f5;
  257. .app-icon {
  258. height: #{80rpx};
  259. width: #{80rpx};
  260. border-radius: 50%;
  261. margin-left: #{20rpx};
  262. }
  263. .nickname{
  264. text{
  265. font-size: #{28rpx};
  266. color: #353535;
  267. width: #{170rpx};
  268. word-break: break-all;
  269. text-overflow: ellipsis;
  270. display: -webkit-box;
  271. -webkit-box-orient: vertical;
  272. -webkit-line-clamp: 1;
  273. overflow: hidden;
  274. }
  275. .app-gray {
  276. color: #707070;
  277. margin-bottom: #{14rpx};
  278. font-size: 24rpx;
  279. }
  280. }
  281. .app-name {
  282. font-size: #{28rpx};
  283. color: #353535;
  284. width: #{170rpx};
  285. word-break: break-all;
  286. text-overflow: ellipsis;
  287. display: -webkit-box;
  288. -webkit-box-orient: vertical;
  289. -webkit-line-clamp: 1;
  290. overflow: hidden;
  291. margin-left: #{16rpx};
  292. }
  293. .app-go {
  294. font-size: 24rpx;
  295. text-align: center;
  296. margin-left: 16rpx;
  297. padding: 5rpx 10rpx;
  298. border-radius: 10rpx;
  299. background: #FED2D5;
  300. color: #E73E67;
  301. }
  302. .app-text {
  303. font-size: #{28rpx};
  304. width: #{200rpx};
  305. height: #{100rpx};
  306. display: flex;
  307. align-items: center;
  308. justify-content: center;
  309. color: #333333;
  310. view {
  311. word-break: break-all;
  312. text-overflow: ellipsis;
  313. display: -webkit-box;
  314. -webkit-box-orient: vertical;
  315. -webkit-line-clamp: 1;
  316. overflow: hidden;
  317. }
  318. .app-red {
  319. color: #DF4147;
  320. margin-top: #{14rpx};
  321. }
  322. .app-gray {
  323. color: #707070;
  324. margin-bottom: #{14rpx};
  325. }
  326. }
  327. }
  328. }
  329. </style>