myGroupDetail.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751
  1. <template>
  2. <view class="container">
  3. <view class="tui-goods-item">
  4. <image src="/static/images/mall/product/4.jpg" class="tui-goods-img"></image>
  5. <view class="tui-goods-center">
  6. <view class="tui-goods-name">欧莱雅(LOREAL)奇焕光彩粉嫩透亮修颜霜 30ml(欧莱雅彩妆 BB霜 粉BB 遮瑕疵 隔离)</view>
  7. <view class="tui-price__box">
  8. <view class="tui-goods-price">
  9. <view class="tui-size-24">¥</view>
  10. <view class="tui-price-large">118</view>
  11. <view class="tui-size-24">.00</view>
  12. <text>已拼2020件</text>
  13. </view>
  14. <view class="tui-price-tag">2人团</view>
  15. </view>
  16. </view>
  17. </view>
  18. <view class="tui-group__box tui-mtop__20">
  19. <tui-divider backgroundColor="#fff" width="70%" gradual v-if="status != 1">
  20. <view class="tui-divider__content">
  21. <image :src="webURL + 'img_invoice_success3x.png'" v-if="status == 2"></image>
  22. <text>{{ status == 2 ? '拼团成功' : '拼团失败' }}</text>
  23. </view>
  24. </tui-divider>
  25. <view class="tui-group__time" v-if="status != 1">开团时间:2020-09-01 12:30:10</view>
  26. <view class="tui-group__title" v-if="status == 1">
  27. <text>还差</text>
  28. <text class="tui-color__red">1</text>
  29. <text>人,赶快邀请好友来拼团吧</text>
  30. </view>
  31. <view class="tui-group-countdown" v-if="status == 1">
  32. <view class="tui-countdown-right">剩余</view>
  33. <tui-countdown :time="3800" scale colonColor="#EB0909" borderColor="#EB0909" color="#EB0909"></tui-countdown>
  34. <view class="tui-countdown-left">结束</view>
  35. </view>
  36. <view class="tui-user__box">
  37. <view class="tui-user__item">
  38. <view class="tui-avatar__box tui-size">
  39. <image class="tui-size" :src="webURL + 'mine_avatar_3x.jpg'"></image>
  40. <view class="tui-team__leader">团长</view>
  41. </view>
  42. <view class="tui-nickname">不许人间见白头</view>
  43. </view>
  44. <view class="tui-user__item" v-if="status != 2">
  45. <view class="tui-avatar__box tui-user__none">
  46. <image class="tui-size" :src="webURL + 'img_not_tuxedo.png'"></image>
  47. </view>
  48. <view class="tui-nickname">暂无</view>
  49. </view>
  50. <view class="tui-user__item" v-else>
  51. <view class="tui-avatar__box tui-size">
  52. <image class="tui-size" :src="webURL + 'mine_avatar_3x.jpg'"></image>
  53. </view>
  54. <view class="tui-nickname">小可爱本人</view>
  55. </view>
  56. </view>
  57. <view class="tui-btn__box">
  58. <tui-button type="danger" height="88rpx" shadow shape="circle">{{ status == 1 ? '邀请好友拼团' : '查看更多拼团商品' }}</tui-button>
  59. </view>
  60. </view>
  61. <!--拼团规则玩法介绍-->
  62. <view class="tui-group-rule tui-mtop__20" v-if="status == 1">
  63. <tui-list-cell padding="30rpx" :hover="false">
  64. <view class="tui-group__text tui-group__start tui-between">
  65. <view class="tui-group-title">开团时间</view>
  66. <view class="tui-sub__info">2020-09-01 12:30:01</view>
  67. </view>
  68. </tui-list-cell>
  69. <tui-list-cell padding="30rpx" arrow @click="showModal">
  70. <view class="tui-group__text tui-between">
  71. <view class="tui-group-title">拼团规则</view>
  72. <view class="tui-sub__info">拼团玩法介绍</view>
  73. </view>
  74. </tui-list-cell>
  75. <view class="tui-step__box">
  76. <view class="tui-step-item">
  77. <image :src="webURL + 'img_opengroup_3x.png'"></image>
  78. <view class="tui-step-text">团长开团</view>
  79. </view>
  80. <view class="tui-step-arrow">
  81. <image :src="webURL + 'img_arrow_3x.png'"></image>
  82. </view>
  83. <view class="tui-step-item">
  84. <image :src="webURL + 'img_invitefriends_3x.png'"></image>
  85. <view class="tui-step-text">邀请好友</view>
  86. </view>
  87. <view class="tui-step-arrow">
  88. <image :src="webURL + 'img_arrow_3x.png'"></image>
  89. </view>
  90. <view class="tui-step-item">
  91. <image :src="webURL + 'img_spellgroupsuccess_3x.png'"></image>
  92. <view class="tui-step-text">拼团成功</view>
  93. </view>
  94. <view class="tui-step-arrow">
  95. <image :src="webURL + 'img_arrow_3x.png'"></image>
  96. </view>
  97. <view class="tui-step-item">
  98. <image :src="webURL + 'img_tosend_3x.png'"></image>
  99. <view class="tui-step-text">等待发货</view>
  100. </view>
  101. </view>
  102. </view>
  103. <!--热销爆款-->
  104. <tui-divider width="50%" gradual><text class="tui-hot__title">热销爆品</text></tui-divider>
  105. <!--=======商品=======-->
  106. <view class="tui-product__box">
  107. <view class="tui-product-list">
  108. <view class="tui-product-container">
  109. <block v-for="(item, index) in goodsList" :key="index">
  110. <!--商品列表-->
  111. <view class="tui-pro-item" hover-class="tui-hover" :hover-start-time="150" @tap="detail">
  112. <image :src="'/static/images/mall/product/' + item.img + '.jpg'" class="tui-pro-img" mode="widthFix" />
  113. <view class="tui-pro-content">
  114. <view class="tui-pro-tit">{{ item.name }}</view>
  115. <view>
  116. <view class="tui-price__box">
  117. <view class="tui-price">
  118. <view class="tui-price__small">¥</view>
  119. <view class="tui-price__large">{{ item.sale }}</view>
  120. <view class="tui-price__small">.00</view>
  121. </view>
  122. <view class="tui-price__original">¥{{ item.factory }}.00</view>
  123. </view>
  124. <view class="tui-group-text">已有{{ item.payNum }}人拼团</view>
  125. <view class="tui-group-btn">
  126. <view class="tui-flex-btn tui-color-red">2人团</view>
  127. <view class="tui-flex-btn">去拼团</view>
  128. </view>
  129. </view>
  130. </view>
  131. </view>
  132. <!--商品列表-->
  133. </block>
  134. </view>
  135. <view class="tui-product-container">
  136. <block v-for="(item, index) in goodsList" :key="index">
  137. <!--商品列表-->
  138. <view class="tui-pro-item" hover-class="tui-hover" :hover-start-time="150" @tap="detail">
  139. <image :src="'/static/images/mall/product/' + item.img + '.jpg'" class="tui-pro-img" mode="widthFix" />
  140. <view class="tui-pro-content">
  141. <view class="tui-pro-tit">{{ item.name }}</view>
  142. <view>
  143. <view class="tui-price__box">
  144. <view class="tui-price">
  145. <view class="tui-price__small">¥</view>
  146. <view class="tui-price__large">{{ item.sale }}</view>
  147. <view class="tui-price__small">.00</view>
  148. </view>
  149. <view class="tui-price__original">¥{{ item.factory }}.00</view>
  150. </view>
  151. <view class="tui-group-text">已有{{ item.payNum }}人拼团</view>
  152. <view class="tui-group-btn">
  153. <view class="tui-flex-btn tui-color-red">2人团</view>
  154. <view class="tui-flex-btn">去拼团</view>
  155. </view>
  156. </view>
  157. </view>
  158. </view>
  159. <!--商品列表-->
  160. </block>
  161. </view>
  162. </view>
  163. </view>
  164. <!--=======商品 end=======-->
  165. <!--拼团玩法介绍-->
  166. <tui-modal :show="modal" shape="circle" padding="30rpx 40rpx" custom>
  167. <view class="tui-modal__title">拼团玩法</view>
  168. <view class="tui-modal__p">1.全民拼团,所有用户都可直接参团或开团;</view>
  169. <view class="tui-modal__p">2.拼团成功,指开团在规定时间内达到规定成团人数;</view>
  170. <view class="tui-modal__p">3.拼团失败,指开团后在规定时间内未能找到相应的人数的好友参团,该团失败,系统取消该团订单,退款原路退回。</view>
  171. <view class="tui-modal__btn">
  172. <tui-button type="danger" shape="circle" width="280rpx" height="68rpx" :size="26" @click="modal = false">我知道了</tui-button>
  173. </view>
  174. </tui-modal>
  175. </view>
  176. </template>
  177. <script>
  178. export default {
  179. data() {
  180. return {
  181. webURL: 'https://thorui.cn/images/mall/group/',
  182. modal: false,
  183. goodsList: [{
  184. img: 1,
  185. name: '欧莱雅(LOREAL)奇焕光彩粉嫩透亮修颜霜 30ml(欧莱雅彩妆 BB霜 粉BB 遮瑕疵 隔离)',
  186. sale: 599,
  187. factory: 899,
  188. payNum: 2342
  189. },
  190. {
  191. img: 2,
  192. name: '德国DMK进口牛奶 欧德堡(Oldenburger)超高温处理全脂纯牛奶1L*12盒',
  193. sale: 29,
  194. factory: 69,
  195. payNum: 999
  196. },
  197. {
  198. img: 3,
  199. name: '【第2支1元】柔色尽情丝柔口红唇膏女士不易掉色保湿滋润防水 珊瑚红',
  200. sale: 299,
  201. factory: 699,
  202. payNum: 666
  203. },
  204. {
  205. img: 4,
  206. name: '百雀羚套装女补水保湿护肤品',
  207. sale: 1599,
  208. factory: 2899,
  209. payNum: 236
  210. },
  211. {
  212. img: 5,
  213. name: '百草味 肉干肉脯 休闲零食 靖江精制猪肉脯200g/袋',
  214. sale: 599,
  215. factory: 899,
  216. payNum: 2399
  217. },
  218. {
  219. img: 6,
  220. name: '短袖睡衣女夏季薄款休闲家居服短裤套装女可爱韩版清新学生两件套 短袖粉色长颈鹿 M码75-95斤',
  221. sale: 599,
  222. factory: 899,
  223. payNum: 2399
  224. },
  225. {
  226. img: 1,
  227. name: '欧莱雅(LOREAL)奇焕光彩粉嫩透亮修颜霜',
  228. sale: 599,
  229. factory: 899,
  230. payNum: 2342
  231. },
  232. {
  233. img: 2,
  234. name: '德国DMK进口牛奶',
  235. sale: 29,
  236. factory: 69,
  237. payNum: 999
  238. },
  239. {
  240. img: 3,
  241. name: '【第2支1元】柔色尽情丝柔口红唇膏女士不易掉色保湿滋润防水 珊瑚红',
  242. sale: 299,
  243. factory: 699,
  244. payNum: 666
  245. },
  246. {
  247. img: 4,
  248. name: '百雀羚套装女补水保湿护肤品',
  249. sale: 1599,
  250. factory: 2899,
  251. payNum: 236
  252. }
  253. ],
  254. //1-拼团中 2-拼团成功 3-拼团失败
  255. status: 1
  256. };
  257. },
  258. onLoad(options) {
  259. this.status = options.status || 1;
  260. },
  261. methods: {
  262. showModal() {
  263. this.modal = true;
  264. },
  265. detail() {
  266. this.tui.href('/pages/groupDetail/groupDetail');
  267. }
  268. },
  269. /**
  270. * 页面相关事件处理函数--监听用户下拉动作
  271. */
  272. onPullDownRefresh: function() {
  273. setTimeout(() => {
  274. uni.stopPullDownRefresh()
  275. }, 200);
  276. },
  277. };
  278. </script>
  279. <style>
  280. .tui-goods-item {
  281. width: 100%;
  282. padding: 20rpx 25rpx;
  283. box-sizing: border-box;
  284. display: flex;
  285. justify-content: space-between;
  286. background-color: #fff;
  287. }
  288. .tui-goods-img {
  289. width: 180rpx;
  290. height: 180rpx;
  291. display: block;
  292. flex-shrink: 0;
  293. }
  294. .tui-goods-center {
  295. flex: 1;
  296. padding: 12rpx 12rpx;
  297. box-sizing: border-box;
  298. display: flex;
  299. flex-direction: column;
  300. justify-content: space-between;
  301. }
  302. .tui-goods-name {
  303. word-break: break-all;
  304. overflow: hidden;
  305. text-overflow: ellipsis;
  306. display: -webkit-box;
  307. -webkit-box-orient: vertical;
  308. -webkit-line-clamp: 2;
  309. font-size: 26rpx;
  310. line-height: 32rpx;
  311. }
  312. .tui-price__box {
  313. width: 100%;
  314. display: flex;
  315. align-items: center;
  316. justify-content: space-between;
  317. }
  318. .tui-goods-price {
  319. width: 100%;
  320. display: flex;
  321. align-items: flex-end;
  322. font-size: 24rpx;
  323. color: #eb0909;
  324. }
  325. .tui-goods-price text {
  326. font-size: 24rpx;
  327. line-height: 24rpx;
  328. color: #999;
  329. padding-left: 20rpx;
  330. }
  331. .tui-size-24 {
  332. font-size: 24rpx;
  333. line-height: 24rpx;
  334. }
  335. .tui-price-large {
  336. font-size: 32rpx;
  337. line-height: 30rpx;
  338. font-weight: 500;
  339. }
  340. .tui-price-tag {
  341. height: 38rpx;
  342. border: 1rpx solid #eb0909;
  343. border-radius: 6rpx;
  344. display: flex;
  345. align-items: center;
  346. justify-content: center;
  347. font-size: 24rpx;
  348. line-height: 24rpx;
  349. transform: scale(0.8);
  350. transform-origin: 100% center;
  351. border-radius: 6rpx;
  352. padding: 0 8rpx;
  353. color: #eb0909;
  354. flex-shrink: 0;
  355. }
  356. .tui-mtop__20 {
  357. margin-top: 20rpx;
  358. }
  359. .tui-divider__content {
  360. display: flex;
  361. align-items: center;
  362. }
  363. .tui-divider__content image {
  364. width: 36rpx;
  365. height: 36rpx;
  366. margin-right: 20rpx;
  367. }
  368. .tui-divider__content text {
  369. font-size: 34rpx;
  370. line-height: 34rpx;
  371. color: #000000;
  372. font-weight: bold;
  373. }
  374. .tui-group__time {
  375. font-size: 24rpx;
  376. font-weight: 400;
  377. color: #999;
  378. text-align: center;
  379. }
  380. .tui-group__box {
  381. width: 100%;
  382. padding: 50rpx 25rpx;
  383. box-sizing: border-box;
  384. background-color: #fff;
  385. }
  386. .tui-group__title {
  387. width: 100%;
  388. font-size: 34rpx;
  389. line-height: 34rpx;
  390. font-weight: 500;
  391. text-align: center;
  392. }
  393. .tui-color__red {
  394. color: #eb0909;
  395. }
  396. .tui-group-countdown {
  397. display: flex;
  398. align-items: center;
  399. justify-content: center;
  400. font-size: 24rpx;
  401. color: #666666;
  402. padding-top: 20rpx;
  403. }
  404. .tui-countdown-right {
  405. padding-right: 6rpx;
  406. }
  407. .tui-countdown-left {
  408. padding-left: 6rpx;
  409. }
  410. .tui-user__box {
  411. width: 100%;
  412. display: flex;
  413. align-items: center;
  414. justify-content: center;
  415. padding-top: 60rpx;
  416. }
  417. .tui-user__item {
  418. max-width: 128rpx;
  419. margin: 0 40rpx;
  420. }
  421. .tui-size {
  422. width: 100rpx;
  423. height: 100rpx;
  424. border-radius: 50%;
  425. }
  426. .tui-avatar__box {
  427. position: relative;
  428. border: 4rpx solid #eb0909;
  429. }
  430. .tui-user__none {
  431. width: 108rpx;
  432. height: 108rpx;
  433. border: 0;
  434. }
  435. .tui-avatar__box image {
  436. display: block;
  437. }
  438. .tui-team__leader {
  439. position: absolute;
  440. width: 64rpx;
  441. height: 28rpx;
  442. font-size: 24rpx;
  443. background-color: #eb0909;
  444. color: #fff;
  445. display: flex;
  446. align-items: center;
  447. justify-content: center;
  448. border-radius: 30px;
  449. left: 50%;
  450. top: -14rpx;
  451. transform: translateX(-50%);
  452. z-index: 10;
  453. }
  454. .tui-nickname {
  455. font-size: 24rpx;
  456. color: #999;
  457. white-space: nowrap;
  458. overflow: hidden;
  459. text-overflow: ellipsis;
  460. text-align: center;
  461. padding-top: 12rpx;
  462. }
  463. .tui-btn__box {
  464. padding-top: 60rpx;
  465. }
  466. .tui-group__text {
  467. width: 100%;
  468. display: flex;
  469. align-items: center;
  470. }
  471. .tui-group-title {
  472. font-size: 30rpx;
  473. line-height: 30rpx;
  474. padding-left: 16rpx;
  475. border-left: 2px solid #eb0909;
  476. box-sizing: border-box;
  477. }
  478. .tui-sub__info {
  479. font-size: 26rpx;
  480. padding-right: 30rpx;
  481. }
  482. .tui-group__start .tui-group-title {
  483. border-left: 0;
  484. padding-left: 0;
  485. }
  486. .tui-group__start .tui-sub__info {
  487. padding-right: 0;
  488. }
  489. .tui-step__box {
  490. width: 100%;
  491. height: 210rpx;
  492. background: #fff;
  493. padding: 0 60rpx;
  494. display: flex;
  495. align-items: center;
  496. justify-content: space-between;
  497. box-sizing: border-box;
  498. }
  499. .tui-step-item {
  500. display: flex;
  501. align-items: center;
  502. justify-content: center;
  503. flex-direction: column;
  504. font-size: 26rpx;
  505. color: #666666;
  506. }
  507. .tui-step-item image {
  508. width: 64rpx;
  509. height: 55rpx;
  510. flex-shrink: 0;
  511. }
  512. .tui-step-item image:first-child {
  513. width: 60rpx !important;
  514. }
  515. .tui-step-arrow {
  516. height: 90rpx;
  517. }
  518. .tui-step-arrow image {
  519. width: 11rpx;
  520. height: 20rpx;
  521. flex-shrink: 0;
  522. }
  523. .tui-step-text {
  524. line-height: 26rpx;
  525. padding-top: 24rpx;
  526. }
  527. .tui-between {
  528. justify-content: space-between;
  529. }
  530. /*拼团玩法介绍 modal*/
  531. .tui-modal__title {
  532. text-align: center;
  533. font-weight: bold;
  534. padding-bottom: 8rpx;
  535. }
  536. .tui-modal__p {
  537. font-size: 26rpx;
  538. color: #888;
  539. padding-top: 20rpx;
  540. }
  541. .tui-modal__btn {
  542. width: 100%;
  543. padding: 60rpx 0 20rpx;
  544. display: flex;
  545. justify-content: center;
  546. }
  547. .tui-hot__title {
  548. font-size: 30rpx;
  549. line-height: 30rpx;
  550. color: #333;
  551. font-weight: bold;
  552. }
  553. /*========商品 start======*/
  554. .tui-product__box {
  555. width: 100%;
  556. padding: 0 25rpx 60rpx 25rpx;
  557. box-sizing: border-box;
  558. }
  559. .tui-product-list {
  560. display: flex;
  561. justify-content: space-between;
  562. flex-direction: row;
  563. flex-wrap: wrap;
  564. box-sizing: border-box;
  565. }
  566. .tui-product-container {
  567. flex: 1;
  568. margin-right: 10rpx;
  569. }
  570. .tui-product-container:last-child {
  571. margin-right: 0;
  572. }
  573. .tui-pro-item {
  574. width: 100%;
  575. margin-bottom: 10rpx;
  576. background: #fff;
  577. box-sizing: border-box;
  578. border-radius: 12rpx;
  579. overflow: hidden;
  580. transition: all 0.15s ease-in-out;
  581. }
  582. .tui-pro-img {
  583. width: 100%;
  584. display: block;
  585. flex-shrink: 0;
  586. background-color: #f5f5f5;
  587. }
  588. .tui-proimg-list {
  589. width: 280rpx;
  590. height: 280rpx !important;
  591. flex-shrink: 0;
  592. border-radius: 12rpx;
  593. }
  594. .tui-pro-content {
  595. flex: 1;
  596. display: flex;
  597. flex-direction: column;
  598. justify-content: space-between;
  599. box-sizing: border-box;
  600. padding: 20rpx;
  601. }
  602. .tui-pro-tit {
  603. color: #2e2e2e;
  604. font-size: 26rpx;
  605. word-break: break-all;
  606. overflow: hidden;
  607. text-overflow: ellipsis;
  608. display: -webkit-box;
  609. -webkit-box-orient: vertical;
  610. -webkit-line-clamp: 2;
  611. }
  612. .tui-price__box {
  613. width: 100%;
  614. display: flex;
  615. align-items: center;
  616. padding-top: 12rpx;
  617. }
  618. .tui-price {
  619. display: flex;
  620. align-items: flex-end;
  621. color: #eb0909;
  622. }
  623. .tui-price__small {
  624. font-size: 24rpx;
  625. line-height: 24rpx;
  626. }
  627. .tui-price__large {
  628. font-size: 34rpx;
  629. line-height: 32rpx;
  630. font-weight: 600;
  631. }
  632. .tui-price__original {
  633. font-size: 24rpx;
  634. line-height: 24rpx;
  635. text-decoration: line-through;
  636. color: #999;
  637. padding-top: 10rpx;
  638. padding-left: 12rpx;
  639. }
  640. .tui-group-btn {
  641. max-width: 312rpx;
  642. height: 48rpx;
  643. border-radius: 6rpx;
  644. background: #eb0909;
  645. display: flex;
  646. align-items: center;
  647. padding: 4rpx;
  648. margin-top: 10rpx;
  649. box-sizing: border-box;
  650. }
  651. .tui-flex-btn {
  652. height: 100%;
  653. flex: 1;
  654. text-align: center;
  655. font-size: 26rpx;
  656. line-height: 26rpx;
  657. font-weight: 400;
  658. color: #fff;
  659. display: flex;
  660. align-items: center;
  661. justify-content: center;
  662. }
  663. .tui-flex-btn:first-child {
  664. background: #fff;
  665. }
  666. .tui-group-text {
  667. font-size: 25rpx;
  668. line-height: 25rpx;
  669. transform: scale(0.8);
  670. transform-origin: 0 center;
  671. padding-top: 30rpx;
  672. color: #999;
  673. }
  674. .tui-color-red {
  675. color: #eb0909;
  676. }
  677. /*======商品======= end*/
  678. </style>