nowList.vue 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421
  1. <template>
  2. <view class="other">
  3. <view class="other-1">大家还在拼</view>
  4. <view class="preferred_item" v-for="item in recommendedlist" @click.stop="ToKaiTuan(item)">
  5. <view class="flex_item" style="overflow: hidden;">
  6. <view class="tlist-img">
  7. <view class="leftImgIcon">AA团</view>
  8. <!-- <view class="leftImgIcon" v-if="sid == 129">达人团</view> -->
  9. <view class="img"><image :src="item.image" mode="scaleToFill"></image></view>
  10. </view>
  11. <view class="tlist-img " v-for="imgItem in item.images">
  12. <view class="img"><image :src="imgItem" mode="scaleToFill"></image></view>
  13. </view>
  14. </view>
  15. <view class="goods_name">
  16. <view class="goods_title flex_item">
  17. <view class="text">{{ item.min_people }}人团</view>
  18. <view class="title">{{ item.title }}</view>
  19. </view>
  20. <view class="goods-height">
  21. <!-- <view class="goods_num clamp">{{ item.info }}</view> -->
  22. <view class="flex goods-peplo">
  23. <view class="goods-tip flex_item">
  24. <view class="peplo">库存剩{{ item.percent | parseIntTo }}%</view>
  25. <view class="make">{{ item.mark }}</view>
  26. </view>
  27. <view class="right flex_item">
  28. <image src="/static/icon/hot.png" mode="aspectFill"></image>
  29. <text>已拼{{ item.sales }}份</text>
  30. </view>
  31. </view>
  32. </view>
  33. <view class="price flex">
  34. <view class="price_list">
  35. <view class="price-red">
  36. <text>单人仅付:</text>
  37. <text class="moneyIcon">¥</text>
  38. <text class="money">{{ item.price }}</text>
  39. <text class="moneyType">/{{ item.unit_name }}</text>
  40. <!-- <text class="outMoney">¥{{ item.product_price }}</text> -->
  41. </view>
  42. </view>
  43. <view class="img position-relative" @click.stop="ToKaiTuan(item)">去开团</view>
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. </template>
  49. <script>
  50. export default {
  51. props: {
  52. recommendedlist: {
  53. type: Array,
  54. default: function() {
  55. return {
  56. };
  57. }
  58. }
  59. },
  60. data() {
  61. return {};
  62. },
  63. filters: {
  64. parseIntTo(percent) {
  65. percent = +percent * 100;
  66. if (percent % 1 === 0) {
  67. return percent;
  68. } else {
  69. percent = percent.toFixed(1);
  70. return percent;
  71. }
  72. }
  73. },
  74. methods: {
  75. // 去开团
  76. ToKaiTuan(item) {
  77. console.log(8754847)
  78. let id = item.id;
  79. uni.navigateTo({
  80. url: '/pages/product/productGroup?id=' + id
  81. });
  82. },
  83. }
  84. };
  85. </script>
  86. <style lang="scss">
  87. .other{
  88. .other-1{
  89. font-size:27rpx;
  90. color:#333333;
  91. line-height: 55rpx;
  92. }
  93. .preferred_item {
  94. width: 100%;
  95. height: 100%;
  96. padding: 25rpx 25rpx;
  97. position: relative;
  98. background-color: #FFFFFF;
  99. border-radius: 15rpx;
  100. margin-bottom: 15rpx;
  101. .tlist-img {
  102. width: 225rpx;
  103. position: relative;
  104. margin-right: 15rpx;
  105. .leftImgIcon {
  106. position: absolute;
  107. top: 0;
  108. left: 0;
  109. font-size: 22rpx;
  110. font-family: PingFangSC;
  111. color: rgba(148, 71, 34, 1);
  112. background: rgba(254, 242, 111, 1);
  113. z-index: 99;
  114. border-radius: 5rpx;
  115. padding: 5rpx 10rpx;
  116. }
  117. .img {
  118. width: 210rpx;
  119. height: 210rpx;
  120. image {
  121. width: 100%;
  122. height: 100%;
  123. border-radius: 20rpx;
  124. }
  125. }
  126. .stock {
  127. margin-top: 13rpx;
  128. font-size: 26rpx;
  129. background: #fff1ee;
  130. width: 100%;
  131. color: #fb4912;
  132. padding: 6rpx 0;
  133. border-radius: 5rpx;
  134. justify-content: center;
  135. align-items: center;
  136. position: absolute;
  137. left: 0;
  138. bottom: 0;
  139. .img {
  140. width: 20rpx;
  141. height: 20rpx;
  142. flex-shrink: 0;
  143. }
  144. .stock-num {
  145. padding-left: 7rpx;
  146. font-size: 22rpx;
  147. border-radius: 5rpx;
  148. height: 32rpx;
  149. line-height: 32rpx;
  150. }
  151. }
  152. }
  153. .goods_name {
  154. .goods_title {
  155. padding-top: 15rpx;
  156. color:rgba(0,0,0,1);
  157. // white-space: nowrap;
  158. // overflow: hidden;
  159. // text-overflow: ellipsis;
  160. font-size:32rpx;
  161. color: $font-color-dark;
  162. // height: 70rpx;
  163. align-items: baseline;
  164. .text{
  165. border-radius: 8rpx;
  166. border: 2rpx solid #FF1A27;
  167. color: #FF1A27;
  168. padding:0rpx 10rpx;
  169. font-size: 26rpx !important;
  170. margin-right: 15rpx;
  171. }
  172. .title {
  173. width: 80%;
  174. overflow : hidden;
  175. text-overflow: ellipsis;
  176. display: -webkit-box;
  177. -webkit-line-clamp: 2;
  178. -webkit-box-orient: vertical;
  179. }
  180. }
  181. .goods-height {
  182. min-height: 60rpx;
  183. }
  184. .goods_num {
  185. font-size: 26rpx;
  186. color: #8f8f97;
  187. padding-bottom: 15rpx;
  188. }
  189. .goods-peplo {
  190. height: 45rpx;
  191. margin-top: 15rpx;
  192. .right {
  193. color:#8e8e8e;
  194. font-size: 24rpx;
  195. width:195rpx;
  196. image {
  197. width: 30rpx;
  198. height: 33rpx;
  199. margin-right: 15rpx;
  200. }
  201. }
  202. .goods-tip {
  203. .peplo {
  204. background:linear-gradient(14deg,rgba(255,116,37,1),rgba(255,30,41,1));
  205. padding: 5rpx 10rpx;
  206. color: #ffffff;
  207. border-top-left-radius:8rpx;
  208. border-bottom-left-radius: 8rpx;
  209. }
  210. .make {
  211. background-color: #fef26f;
  212. color: #944722;
  213. border-top-right-radius: 8rpx;
  214. border-bottom-right-radius: 8rpx;
  215. }
  216. .make,
  217. .peplo {
  218. font-size: $font-sm;
  219. padding: 5rpx 10rpx;
  220. }
  221. }
  222. }
  223. .price {
  224. font-size: 28rpx;
  225. position: relative;
  226. padding-top: 15rpx;
  227. .price_list {
  228. .price-red {
  229. font-size: 30rpx !important;
  230. font-family: Source Han Sans CN;
  231. color: rgba(253, 27, 42, 1);
  232. font-size: $font-base;
  233. font-weight: bold;
  234. .moneyIcon {
  235. font-weight: normal !important;
  236. }
  237. .money {
  238. font-size: 58rpx;
  239. }
  240. .moneyType {
  241. font-weight: 400;
  242. }
  243. .outMoney {
  244. font-weight: 400;
  245. text-decoration: line-through;
  246. color: rgba(142, 142, 142, 1);
  247. }
  248. }
  249. .price-green {
  250. color: #2dbd59;
  251. font-size: 26rpx !important;
  252. font-weight: bold;
  253. text {
  254. background: linear-gradient(45deg, rgba(21, 197, 52, 1), rgba(21, 197, 52, 1));
  255. color: #ffffff;
  256. padding: 0rpx 10rpx;
  257. border-radius: 7rpx;
  258. font-size: 24rpx !important;
  259. margin-left: 15rpx;
  260. }
  261. }
  262. }
  263. .img {
  264. width: 265rpx;
  265. height: 74rpx;
  266. line-height: 74rpx;
  267. // background:linear-gradient(14deg,rgba(255,116,37,1),rgba(255,30,41,1));
  268. background: linear-gradient(270deg, rgba(181,116,242, 1) 0%, rgba(139,86,254, 1) 100%);
  269. border-radius: 99rpx;
  270. color: #ffffff;
  271. font-size: $font-lg;
  272. text-align: center;
  273. }
  274. .img1{
  275. background-color: #D3D3D3;
  276. width: 265rpx;
  277. height: 74rpx;
  278. line-height: 74rpx;
  279. border-radius: 99rpx;
  280. color: #ffffff;
  281. font-size: $font-lg;
  282. text-align: center;
  283. }
  284. .tomorrow {
  285. background: #29a66e;
  286. color: #ffffff;
  287. border-radius: 25rpx;
  288. padding: 10rpx 25rpx;
  289. }
  290. }
  291. }
  292. }
  293. .other-2{
  294. width: 100%;
  295. background:#ffffff;
  296. padding: 10rpx 15rpx ;
  297. border-radius: 20rpx;
  298. .content-row{
  299. padding: 10rpx 0;
  300. .row-1{
  301. width: 210rpx;
  302. position: relative;
  303. margin-right: 20rpx;
  304. text-align: center;
  305. .row-1-1{
  306. text-align: center;
  307. height:40rpx;
  308. background:#fff1ee;
  309. border-radius:6rpx;
  310. font-size:22rpx;
  311. font-weight:500;
  312. color:#fb4912;
  313. line-height:40rpx;
  314. image{
  315. width: 23rpx;
  316. height: 23rpx;
  317. margin-right: 5rpx;
  318. }
  319. }
  320. .img1{
  321. width:170rpx;
  322. height:170rpx;
  323. border-radius:10rpx;
  324. }
  325. .img2{
  326. position: absolute;
  327. top: 0;
  328. left: 16rpx;
  329. width:80rpx;
  330. height:32rpx;
  331. border-radius:5px;
  332. }
  333. }
  334. .row-2{
  335. padding: 20rpx 0 20rpx 0;
  336. width:calc(100% - 210rpx);
  337. position: relative;
  338. border-bottom: 1px solid #EAEAEA;
  339. .word-1{
  340. font-size:32rpx;
  341. font-weight:bold;
  342. color:#141821;
  343. margin-left: 10rpx;
  344. overflow: hidden;
  345. text-overflow: ellipsis;
  346. white-space: nowrap;
  347. }
  348. .word-2{
  349. margin-top: 10rpx;
  350. font-size:24rpx;
  351. color:#979797;
  352. }
  353. .word-3{
  354. margin-top: 10rpx;
  355. position: relative;
  356. font-size:20rpx;
  357. color:#ffffff;
  358. image{
  359. width: 235rpx;
  360. height: 50rpx;
  361. }
  362. .word-3-1{
  363. position: absolute;
  364. top:8px;
  365. left:2px;
  366. width: 230rpx;
  367. text-align: center;
  368. .word-3-1-1{
  369. display: inline-block;
  370. color:#FD1B2A;
  371. width: 50%;
  372. }
  373. }
  374. }
  375. .word-4{
  376. margin-top: 15rpx;
  377. font-size:23rpx;
  378. color:#fd1b2a;
  379. margin-left: 10rpx;
  380. text{
  381. font-size:23rpx;
  382. font-weight:bold;
  383. }
  384. .word-4-1{
  385. font-size:36rpx;
  386. }
  387. }
  388. .word-5{
  389. margin-top: 15rpx;
  390. font-size:21rpx;
  391. color:#868686;
  392. }
  393. .button{
  394. width:145rpx;
  395. height:60rpx;
  396. background:linear-gradient(14deg,#ff7425,#ff1e29);
  397. border-radius:30rpx;
  398. font-size:27rpx;
  399. font-weight:bold;
  400. color:#ffffff;
  401. line-height:60rpx;
  402. text-align: center;
  403. position: absolute;
  404. bottom: 20rpx;
  405. right: 0;
  406. }
  407. }
  408. }
  409. }
  410. }
  411. </style>