cart.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844
  1. <template>
  2. <view class="container">
  3. <view class="no-goods" v-if="goodsList.list.length<1">
  4. <view class="title-box">
  5. 购物车空空如也~
  6. </view>
  7. <view class="to-index-btn" :style="'background:'+ pagestyleconfig.appstylecolor" @tap="toIndexPage">
  8. 去逛逛
  9. </view>
  10. </view>
  11. <view v-if="goodsList.list.length>0">
  12. <!-- #ifdef MP || H5-->
  13. <view class="tui-edit-goods">
  14. <view>购物车商品</view>
  15. <view>
  16. <tui-button v-if="goodsList.saveHidden" type="gray" :plain="true" shape="circle" width="160rpx"
  17. height="60rpx" :size="24" @click="editTap">编辑商品</tui-button>
  18. <tui-button v-if="!goodsList.saveHidden" type="gray" :plain="true" shape="circle" width="160rpx"
  19. height="60rpx" :size="24" @click="saveTap">完成</tui-button>
  20. </view>
  21. </view>
  22. <!-- #endif -->
  23. <checkbox-group @change="selectChange">
  24. <view class="tui-cart-cell tui-mtop" v-for="(item,index) in goodsList.list" :key="index">
  25. <tui-swipe-action :actions="actions" @click="delItem" :params="item">
  26. <template v-slot:content>
  27. <view class="tui-goods-item">
  28. <label class="tui-checkbox">
  29. <checkbox :value="item.id" :data-id="index" :checked="item.active"
  30. color="#fff"></checkbox>
  31. </label>
  32. <image :src="item.pic" class="tui-goods-img" />
  33. <view class="tui-goods-info">
  34. <view class="tui-goods-title">
  35. {{item.name}}
  36. </view>
  37. <view class="tui-goods-model" v-if="item.label">
  38. <view class="tui-model-text">{{item.label}}</view>
  39. </view>
  40. <view class="tui-price-box">
  41. <view class="tui-goods-price">¥{{item.price}}</view>
  42. <tui-numberbox :value="item.number" :height="36" :width="64" :min="1"
  43. :index="item.cart_id" @change="changeNum"></tui-numberbox>
  44. </view>
  45. </view>
  46. </view>
  47. </template>
  48. </tui-swipe-action>
  49. </view>
  50. </checkbox-group>
  51. <!--tabbar-->
  52. <view class="settlement">
  53. <view class="tui-checkAll">
  54. <checkbox-group @change="bindAllSelect">
  55. <label class="tui-checkbox">
  56. <checkbox :checked="goodsList.allSelect" color="#fff"></checkbox>
  57. <text class="tui-checkbox-pl">全选</text>
  58. </label>
  59. </checkbox-group>
  60. <view class="tui-total-price" v-if="!goodsList.noSelect">合计:<text
  61. class="tui-bold">¥{{goodsList.totalPrice}}</text>
  62. </view>
  63. </view>
  64. <view>
  65. <button @click="toPayOrder" :disabled="goodsList.noSelect" v-if="goodsList.saveHidden" class="settlementbutt" :style="'background:'+ pagestyleconfig.appstylecolor">去结算({{goodsList.number}})</button>
  66. <tui-button @click="deleteSelected" :disabled="goodsList.noSelect" width="200rpx" height="70rpx"
  67. :size="30" type="black" shape="circle" :plain="true" v-else>
  68. 删除</tui-button>
  69. </view>
  70. </view>
  71. </view>
  72. <!--猜你喜欢-->
  73. <block v-if="recommendgoods.length>0">
  74. <tui-divider :size="28" :bold="true" color="#333" width="50%">
  75. <tui-icon name="like" :size="18" color="#e41f19"></tui-icon>
  76. <text class="tui-youlike">猜你喜欢</text>
  77. </tui-divider>
  78. <view class="tui-product-list">
  79. <view class="tui-product-container">
  80. <block v-for="(item, index) in recommendgoods" :key="index">
  81. <!--商品列表-->
  82. <view class="tui-pro-item" hover-class="hover" :hover-start-time="150"
  83. @tap="navigateTo('/pages/goodsDetail/goodsDetail?id='+item.id)">
  84. <image :src="item.pic" class="tui-pro-img" mode="widthFix" />
  85. <view class="tui-pro-content">
  86. <view class="tui-pro-tit">{{ item.name }}</view>
  87. <view>
  88. <view class="tui-pro-price">
  89. <text v-if="item.is_points_goods==1" class="tui-sale-price">{{lang.points}}:{{ item.pay_points }}</text>
  90. <text v-if="item.is_points_goods!=1" class="tui-sale-price">¥{{ item.price }}</text>
  91. <text v-if="item.costs>0" class="tui-factory-price">¥{{ item.costs }}</text>
  92. </view>
  93. <view class="tui-pro-pay">{{ item.sale_count }}人付款</view>
  94. </view>
  95. </view>
  96. </view>
  97. </block>
  98. </view>
  99. </view>
  100. </block>
  101. <!--加载loadding-->
  102. <tui-loadmore v-if="loadding" :index="3" type="red"></tui-loadmore>
  103. <tui-tabbar :current="current">
  104. </tui-tabbar>
  105. </view>
  106. </template>
  107. <script>
  108. export default {
  109. data() {
  110. return {
  111. lang:{},
  112. current: '',
  113. pagestyleconfig: [],
  114. totalPrice1: 0,
  115. cartIds: [], //购物车id
  116. actions: [{
  117. name: '删除',
  118. color: '#fff',
  119. fontsize: 28,
  120. width: 64,
  121. background: '#F82400'
  122. }],
  123. recommendgoods: [],
  124. pageIndex: 1,
  125. loadding: false,
  126. pullUpOn: true,
  127. islogin: 1, //是否要需要登录,需要在onLoad加截 app.page.onLoad(this,e);
  128. goodsList: {
  129. saveHidden: true,
  130. number: 0,
  131. totalPrice: 0,
  132. totalPayPoints: 0,
  133. allSelect: true,
  134. noSelect: false,
  135. list: [],
  136. bottommenulist: []
  137. },
  138. }
  139. },
  140. filters: {
  141. getPrice(price) {
  142. price = price || 0;
  143. return price.toFixed(2)
  144. }
  145. },
  146. onLoad: function(e) {
  147. let _this = this;
  148. // #ifdef MP-WEIXIN
  149. this.current = "/" + this.__route__;
  150. // #endif
  151. //#ifdef H5
  152. this.current = this.$route.path;
  153. //#endif
  154. _this.$request.get('Lang.getlang').then(res => {
  155. if (res.errno == 0) {
  156. _this.lang = res.data;
  157. }
  158. });
  159. _this.$request.post('config', {
  160. mo: 'pagestyle'
  161. }).then(res => {
  162. if (res.errno == 0) {
  163. _this.pagestyleconfig = res.data;
  164. }
  165. });
  166. _this.$request.get('Goods.recommend').then(res => {
  167. if (res.errno == 0) {
  168. _this.recommendgoods = res.data;
  169. }
  170. });
  171. },
  172. onShow: function() {
  173. var _this = this;
  174. _this.getcarlist()
  175. },
  176. methods: {
  177. getcarlist: function() {
  178. var _this = this;
  179. var shopList = [];
  180. // 获取购物车数据
  181. _this.$request.get('cart.list', {
  182. samkey: (new Date()).valueOf(),
  183. showLoading:true,
  184. }).then(function(res) {
  185. var shopCarInfoMem = res.data;
  186. //console.log(shopCarInfoMem);
  187. if (shopCarInfoMem && shopCarInfoMem.shopList) {
  188. shopList = shopCarInfoMem.shopList
  189. }
  190. _this.goodsList.list = shopList;
  191. _this.setGoodsList(_this.getSaveHide(), _this.allSelect());
  192. })
  193. },
  194. changeNum: function(e) {
  195. var _this = this
  196. _this.$request.post('cart.quantity', {
  197. id: e.index,
  198. uptype: 'jia',
  199. quantity: e.value,
  200. samkey: (new Date()).valueOf()
  201. }).then(function(res) {
  202. _this.getcarlist();
  203. })
  204. },
  205. toIndexPage: function() {
  206. this.sam.navigateTo('/pages/index/index');
  207. },
  208. navigateTo: function(url) {
  209. this.sam.navigateTo(url)
  210. },
  211. delItem: function(e) {
  212. var _this = this;
  213. _this.$request.post('cart.del', {
  214. id: e.item.cart_id
  215. }).then(function(res) {
  216. _this.getcarlist();
  217. })
  218. },
  219. selectChange: function(e) {
  220. this.cartIds = e.detail.value;
  221. this.goodsList.list.map(item => {
  222. //如果购物车id为数字统一转成字符串
  223. if (this.cartIds.indexOf(item.id.toString())>-1) {
  224. item.active = true;
  225. } else {
  226. item.active = false;
  227. }
  228. })
  229. this.setGoodsList(this.getSaveHide(), this.allSelect());
  230. },
  231. allSelect: function() {
  232. var list = this.goodsList.list;
  233. var allSelect = false;
  234. for (var i = 0; i < list.length; i++) {
  235. var curItem = list[i];
  236. if (curItem.active) {
  237. allSelect = true;
  238. } else {
  239. allSelect = false;
  240. break;
  241. }
  242. }
  243. return allSelect;
  244. },
  245. setGoodsList: function(saveHidden, allSelect) {
  246. var list = this.goodsList.list;
  247. var number = 0;
  248. var total = 0;
  249. let totalPayPoints = 0;
  250. var noSelect = 0;
  251. for (var i = 0; i < list.length; i++) {
  252. var curItem = list[i];
  253. if (curItem.active) {
  254. number += parseInt(curItem.number);
  255. total += parseFloat(curItem.price) * curItem.number;
  256. totalPayPoints += curItem.points * curItem.number;
  257. } else {
  258. noSelect++;
  259. }
  260. }
  261. total = parseFloat(total.toFixed(2)); //js浮点计算bug,取两位小数精度
  262. if (noSelect == list.length) {
  263. noSelect = true;
  264. } else {
  265. noSelect = false;
  266. }
  267. this.goodsList = {
  268. saveHidden: saveHidden,
  269. number: number,
  270. totalPrice: total,
  271. allSelect: allSelect,
  272. noSelect: noSelect,
  273. list: list,
  274. totalPayPoints: totalPayPoints
  275. };
  276. var shopCarInfo = {};
  277. shopCarInfo.shopList = list;
  278. uni.setStorage({
  279. key: "shopCarInfo",
  280. data: shopCarInfo
  281. })
  282. },
  283. bindAllSelect: function() {
  284. var currentAllSelect = this.goodsList.allSelect;
  285. var list = this.goodsList.list;
  286. if (currentAllSelect) {
  287. for (var i = 0; i < list.length; i++) {
  288. var curItem = list[i];
  289. curItem.active = false;
  290. }
  291. } else {
  292. for (var i = 0; i < list.length; i++) {
  293. var curItem = list[i];
  294. curItem.active = true;
  295. }
  296. }
  297. this.setGoodsList(this.getSaveHide(), !currentAllSelect);
  298. },
  299. editTap: function() {
  300. this.goodsList.list.map(item => {
  301. item.active = false;
  302. })
  303. this.setGoodsList(!this.getSaveHide(), this.allSelect());
  304. },
  305. saveTap: function() {
  306. this.goodsList.list.map(item => {
  307. item.active = true;
  308. })
  309. this.setGoodsList(!this.getSaveHide(), this.allSelect());
  310. },
  311. getSaveHide: function() {
  312. return this.goodsList.saveHidden;
  313. },
  314. deleteSelected: function() {
  315. var _this = this;
  316. var list = this.goodsList.list;
  317. var ids = '';
  318. for (let i = 0; i < list.length; i++) {
  319. let curItem = list[i];
  320. if (curItem.active) {
  321. ids = ids + curItem.cart_id + ',';
  322. }
  323. }
  324. //console.log(ids);
  325. _this.$request.post('cart.del', {
  326. ids: ids
  327. }).then(function(res) {
  328. _this.getcarlist();
  329. })
  330. /*
  331. list = list.filter(function(curGoods) {
  332. return !curGoods.active;
  333. });
  334. this.setGoodsList(this.getSaveHide(), this.allSelect());
  335. */
  336. },
  337. toPayOrder: function() {
  338. uni.showLoading();
  339. var _this = this;
  340. if (this.goodsList.noSelect) {
  341. uni.hideLoading();
  342. return;
  343. }
  344. // 重新计算价格,判断库存
  345. var shopList = [];
  346. var shopCarInfoMem = uni.getStorageSync('shopCarInfo');
  347. if (shopCarInfoMem && shopCarInfoMem.shopList) {
  348. // shopList = shopCarInfoMem.shopList
  349. shopList = shopCarInfoMem.shopList.filter(entity => {
  350. return entity.active;
  351. });
  352. }
  353. if (shopList.length == 0) {
  354. uni.hideLoading();
  355. return;
  356. }
  357. var isFail = false;
  358. var doneNumber = 0;
  359. var needDoneNUmber = shopList.length;
  360. for (let i = 0; i < shopList.length; i++) {
  361. if (isFail) {
  362. uni.hideLoading();
  363. return;
  364. }
  365. let carShopBean = shopList[i];
  366. //console.log(carShopBean);
  367. // 获取价格和库存
  368. _this.$request.post('cart.check', {
  369. goodsId: carShopBean.goodsId,
  370. number: carShopBean.number,
  371. sku: carShopBean.sku
  372. }).then(function(res) {
  373. doneNumber++;
  374. if (carShopBean.sku) {
  375. if (!res.data.sku || res.data.sku == "") {
  376. uni.showModal({
  377. title: '提示',
  378. content: carShopBean.name + ' 商品已失效,请重新购买',
  379. showCancel: false
  380. })
  381. isFail = true;
  382. uni.hideLoading();
  383. return;
  384. }
  385. }
  386. if (Number(res.data.stores) < Number(carShopBean.number)) {
  387. uni.showModal({
  388. title: '提示',
  389. content: carShopBean.name + ' 库存不足,请重新购买',
  390. showCancel: false
  391. })
  392. isFail = true;
  393. uni.hideLoading();
  394. return;
  395. }
  396. if (res.data.price != carShopBean.price) {
  397. uni.showModal({
  398. title: '提示',
  399. content: carShopBean.name + '价格有调整,请重新购买',
  400. showCancel: false
  401. })
  402. isFail = true;
  403. uni.hideLoading();
  404. return;
  405. }
  406. if (needDoneNUmber == doneNumber) {
  407. if (!isFail) {
  408. _this.navigateToPayOrder();
  409. }
  410. }
  411. })
  412. }
  413. },
  414. navigateToPayOrder: function() {
  415. uni.hideLoading();
  416. this.sam.navigateTo('/pagesA/submitOrder/submitOrder');
  417. }
  418. },
  419. /**
  420. * 页面相关事件处理函数--监听用户下拉动作
  421. */
  422. onPullDownRefresh: function() {
  423. setTimeout(() => {
  424. uni.stopPullDownRefresh()
  425. }, 200);
  426. },
  427. onNavigationBarButtonTap(e) {
  428. this.goodsList.saveHidden = !this.goodsList.saveHidden;
  429. let text = this.goodsList.saveHidden ? "完成" : "编辑";
  430. // #ifdef APP-PLUS
  431. let webView = this.$mp.page.$getAppWebview();
  432. webView.setTitleNViewButtonStyle(0, {
  433. text: text
  434. });
  435. // #endif
  436. }
  437. }
  438. </script>
  439. <style>
  440. .container {
  441. padding-bottom: 120rpx;
  442. }
  443. .no-goods {
  444. padding-bottom: 230rpx;
  445. }
  446. .title-box {
  447. width: 100%;
  448. padding-top: 330rpx;
  449. text-align: center;
  450. font-size: 28rpx;
  451. color: #999;
  452. background: url(/static/images/icon-cart.png) no-repeat center 205rpx;
  453. background-size: 100rpx auto;
  454. margin-bottom: 50rpx;
  455. }
  456. .to-index-btn {
  457. color: #fff;
  458. border-radius: 6px;
  459. margin-left: auto;
  460. margin-right: auto;
  461. width: 300rpx;
  462. height: 70rpx;
  463. line-height: 70rpx;
  464. text-align: center;
  465. font-size: 28rpx;
  466. }
  467. .tui-mtop {
  468. margin-top: 24rpx;
  469. }
  470. .tui-edit-goods {
  471. width: 100%;
  472. border-radius: 12rpx;
  473. overflow: hidden;
  474. padding: 24rpx 30rpx 0 30rpx;
  475. box-sizing: border-box;
  476. display: flex;
  477. justify-content: space-between;
  478. align-items: center;
  479. color: #333;
  480. font-size: 24rpx;
  481. }
  482. .tui-goods-num {
  483. font-weight: bold;
  484. color: #e41f19;
  485. }
  486. .tui-cart-cell {
  487. width: 100%;
  488. border-radius: 12rpx;
  489. background: #FFFFFF;
  490. padding: 40rpx 0;
  491. overflow: hidden;
  492. }
  493. .tui-goods-item {
  494. display: flex;
  495. padding: 0 30rpx;
  496. box-sizing: border-box;
  497. }
  498. .tui-checkbox {
  499. min-width: 70rpx;
  500. display: flex;
  501. align-items: center;
  502. }
  503. /* #ifdef MP-WEIXIN */
  504. .tui-checkbox .wx-checkbox-input {
  505. width: 40rpx;
  506. height: 40rpx;
  507. margin-right: 0 !important;
  508. border-radius: 50% !important;
  509. transform: scale(0.8);
  510. border-color: #d1d1d1 !important;
  511. }
  512. .tui-checkbox .wx-checkbox-input.wx-checkbox-input-checked {
  513. background: #eb0909;
  514. width: 44rpx !important;
  515. height: 44rpx !important;
  516. border: none;
  517. }
  518. /* #endif */
  519. /* #ifndef MP-WEIXIN */
  520. >>>.tui-checkbox .uni-checkbox-input {
  521. width: 40rpx;
  522. height: 40rpx;
  523. margin-right: 0 !important;
  524. border-radius: 50% !important;
  525. transform: scale(0.8);
  526. border-color: #d1d1d1 !important;
  527. }
  528. >>>.tui-checkbox .uni-checkbox-input.uni-checkbox-input-checked {
  529. background: #eb0909;
  530. width: 45rpx !important;
  531. height: 45rpx !important;
  532. border: none;
  533. }
  534. /* #endif */
  535. .tui-goods-img {
  536. width: 180rpx;
  537. height: 180rpx !important;
  538. border-radius: 12rpx;
  539. flex-shrink: 0;
  540. display: block;
  541. }
  542. .tui-goods-info {
  543. width: 100%;
  544. padding-left: 20rpx;
  545. display: flex;
  546. flex-direction: column;
  547. align-items: flex-start;
  548. justify-content: space-between;
  549. box-sizing: border-box;
  550. overflow: hidden;
  551. }
  552. .tui-goods-title {
  553. white-space: normal;
  554. word-break: break-all;
  555. overflow: hidden;
  556. text-overflow: ellipsis;
  557. display: -webkit-box;
  558. -webkit-box-orient: vertical;
  559. -webkit-line-clamp: 2;
  560. font-size: 24rpx;
  561. color: #333;
  562. }
  563. .tui-goods-model {
  564. max-width: 100%;
  565. color: #333;
  566. background: #F5F5F5;
  567. border-radius: 40rpx;
  568. display: flex;
  569. align-items: center;
  570. justify-content: space-between;
  571. padding: 0 16rpx;
  572. box-sizing: border-box;
  573. }
  574. .tui-model-text {
  575. max-width: 100%;
  576. transform: scale(0.9);
  577. transform-origin: 0 center;
  578. font-size: 24rpx;
  579. line-height: 32rpx;
  580. white-space: nowrap;
  581. overflow: hidden;
  582. text-overflow: ellipsis;
  583. }
  584. .tui-price-box {
  585. width: 100%;
  586. display: flex;
  587. align-items: flex-end;
  588. justify-content: space-between;
  589. }
  590. .tui-goods-price {
  591. font-size: 34rpx;
  592. font-weight: 500;
  593. color: #e41f19;
  594. }
  595. .tui-scale {
  596. transform: scale(0.8);
  597. transform-origin: 100% 100%;
  598. }
  599. .tui-activity {
  600. font-size: 24rpx;
  601. display: flex;
  602. align-items: center;
  603. justify-content: space-between;
  604. padding: 0 30rpx 20rpx 100rpx;
  605. box-sizing: border-box;
  606. }
  607. .tui-buy {
  608. display: flex;
  609. align-items: center
  610. }
  611. .tui-bold {
  612. font-weight: bold;
  613. }
  614. .tui-sub-info {
  615. max-width: 532rpx;
  616. font-size: 24rpx;
  617. line-height: 24rpx;
  618. padding: 20rpx 30rpx 10rpx 30rpx;
  619. box-sizing: border-box;
  620. color: #333;
  621. transform: scale(0.8);
  622. transform-origin: 100% center;
  623. white-space: nowrap;
  624. overflow: hidden;
  625. text-overflow: ellipsis;
  626. margin-left: auto
  627. }
  628. .tui-invalid-text {
  629. width: 66rpx;
  630. margin-right: 4rpx;
  631. text-align: center;
  632. font-size: 24rpx;
  633. color: #fff;
  634. background: rgba(0, 0, 0, .3);
  635. transform: scale(0.8);
  636. transform-origin: center center;
  637. border-radius: 4rpx;
  638. flex-shrink: 0;
  639. }
  640. .tui-gray {
  641. color: #B2B2B2 !important;
  642. }
  643. .tui-goods-invalid {
  644. color: #555;
  645. font-size: 24rpx;
  646. }
  647. .tui-flex-center {
  648. align-items: center !important;
  649. }
  650. .tui-invalid-ptop {
  651. padding-top: 40rpx;
  652. }
  653. .settlement {
  654. width: 100%;
  655. height: 100rpx;
  656. background: #fff;
  657. position: fixed;
  658. left: 0;
  659. bottom: 160rpx;
  660. /* #ifdef H5 */
  661. bottom: 200rpx;
  662. /* #endif */
  663. display: flex;
  664. align-items: center;
  665. justify-content: space-between;
  666. padding: 0 30rpx;
  667. box-sizing: border-box;
  668. font-size: 24rpx;
  669. z-index: 9999;
  670. }
  671. .settlement::before {
  672. content: '';
  673. width: 100%;
  674. border-bottom: 1rpx solid #d9d9d9;
  675. position: absolute;
  676. top: 0;
  677. left: 0;
  678. -webkit-transform: scaleY(0.5);
  679. transform: scaleY(0.5);
  680. }
  681. .tui-checkAll {
  682. display: flex;
  683. align-items: center;
  684. }
  685. .tui-checkbox-pl {
  686. padding-left: 12rpx;
  687. }
  688. .tui-total-price {
  689. padding-left: 30rpx;
  690. font-size: 30rpx !important;
  691. }
  692. /*猜你喜欢*/
  693. .tui-youlike {
  694. padding-left: 12rpx
  695. }
  696. .tui-product-list {
  697. display: flex;
  698. justify-content: space-between;
  699. flex-direction: row;
  700. flex-wrap: wrap;
  701. box-sizing: border-box;
  702. padding: 10rpx;
  703. padding-bottom: 100rpx;
  704. }
  705. .tui-product-container {
  706. width: 100%;
  707. display: flex;
  708. flex-direction: row;
  709. flex-wrap: wrap;
  710. }
  711. .tui-pro-item {
  712. background: #fff;
  713. box-sizing: border-box;
  714. overflow: hidden;
  715. border-radius: 12rpx;
  716. width: 48%;
  717. margin-left: 1%;
  718. margin-right: 1%;
  719. margin-bottom: 2%;
  720. }
  721. .tui-pro-img {
  722. width: 100%;
  723. display: block;
  724. }
  725. .tui-pro-content {
  726. display: flex;
  727. flex-direction: column;
  728. justify-content: space-between;
  729. box-sizing: border-box;
  730. padding: 20rpx;
  731. }
  732. .tui-pro-tit {
  733. color: #2e2e2e;
  734. font-size: 26rpx;
  735. word-break: break-all;
  736. overflow: hidden;
  737. text-overflow: ellipsis;
  738. display: -webkit-box;
  739. -webkit-box-orient: vertical;
  740. -webkit-line-clamp: 2;
  741. }
  742. .tui-pro-price {
  743. padding-top: 18rpx;
  744. }
  745. .tui-sale-price {
  746. font-size: 34rpx;
  747. font-weight: 500;
  748. color: #e41f19;
  749. }
  750. .tui-factory-price {
  751. font-size: 24rpx;
  752. color: #a0a0a0;
  753. text-decoration: line-through;
  754. padding-left: 12rpx;
  755. }
  756. .tui-pro-pay {
  757. padding-top: 10rpx;
  758. font-size: 24rpx;
  759. color: #656565;
  760. }
  761. .no-select {
  762. background-color: #ccc;
  763. }
  764. .settlementbutt{
  765. width: 200rpx;
  766. font-size: 30rpx;
  767. height: 72rpx;
  768. line-height: 72rpx;
  769. border-radius: 98rpx;
  770. color: #fff;
  771. }
  772. </style>