cart.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911
  1. <template>
  2. <view class="container cart clearfix">
  3. <tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading ="true" :loadingType="9"></tui-skeleton>
  4. <view class="container-cart-main tui-skeleton">
  5. <view v-if="!isEmpty" class="container-cart">
  6. <scroll-view class="cart-content" scroll-y @scrolltolower="toLower">
  7. <view class="goods-list">
  8. <view v-for="(item, index) in goodsList" :key="index" class="goods-item">
  9. <view class="shoptitle">
  10. <!--选择商店的全部商品 :disabled="isNnder"-->
  11. <view class="checkbox-box" @click.stop="checkShop(item)">
  12. <button class="checkbox iconfont"
  13. :class="[item.checked ?'icon-gouxuanl':'icon-weigouxuan']">
  14. </button>
  15. </view>
  16. <view class="text">{{item.name}}</view>
  17. </view>
  18. <view class="productlist">
  19. <view class="goods-pros"
  20. v-for="(pros,idx) in item.productsList"
  21. :key="idx"
  22. >
  23. <view class="goods-pros-t">
  24. <!--选择商品-->
  25. <view class="checkbox-box" @click.stop="ischeck(item,pros,idx)">
  26. <button class="checkbox iconfont"
  27. :class="[pros.productsChecked ?'icon-gouxuanl':'icon-weigouxuan']">
  28. </button>
  29. </view>
  30. <view class="pros-img" @click.stop="navToListPage(pros.productID)"><image :src="pros.mainImage ? pros.mainImage :''" alt="" /></view>
  31. <view class="pros-product">
  32. <view class="producttitle" @click.stop="navToListPage(pros.id)" >
  33. {{pros.name}}
  34. </view>
  35. <view class="productspec">规格:{{pros.unit ? pros.unit : ''}}</view>
  36. <view class="productprice">
  37. <!--使用过滤器对总价改变-->
  38. <view class="price"><text>¥</text>
  39. {{pros.retailPrice ? pros.retailPrice.toFixed(2) : ''}}
  40. </view>
  41. <view class="count" :class="[isshowDelbtn ? 'none':'show']">
  42. <view class="number-box">
  43. <view class="iconfont icon-jianhao" @click="changeCountSub(item,pros)"></view>
  44. <input class="btn-input" type="number" maxlength='4' v-model="pros.productCount" @blur="changeNnmber($event,item,pros)">
  45. <view class="iconfont icon-jiahao" @click="changeCountAdd(item,pros)"></view>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. <view class="goods-pros-b" :class="[isshowDelbtn ? 'none':'show']" >
  54. <view class="sum">合计:<text class="money"><text class="money-sign">¥</text>{{item.totalPrice.toFixed(2)}}</text></view>
  55. </view>
  56. </view>
  57. </view>
  58. <!--加载loadding-->
  59. <tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
  60. <tui-nomore :visible="!pullUpOn" bgcolor="#F7F7F7" :text='nomoreText'></tui-nomore>
  61. <!--加载loadding-->
  62. </scroll-view>
  63. <!-- 脚部菜单 -->
  64. <view class="footer">
  65. <view class="footer-le">
  66. <view class="foot-check checkbox-box" @tap.stop="checkAll()">
  67. <button class="checkbox iconfont" :class="[isCheckAll?'icon-gouxuan':'icon-weigouxuan']"></button>
  68. <view class="text">全选</view>
  69. </view>
  70. <view class="foot-check-delbtn">
  71. <button class="delBtn" @tap.stop="showDelManager">删除</button>
  72. </view>
  73. <view class="sum">总价:<text class="money-sign">¥</text><text class="money">{{allPrice.toFixed(2)}}</text></view>
  74. </view>
  75. <view v-if="!isshowDelbtn" class="footer-ri" >
  76. <view class="btn" @tap="toConfirmation">去结算({{allCount}})</view>
  77. </view>
  78. <view v-else class="footer-del">
  79. <view class="btn btn-cancel" @tap.stop="hideDelManage">取消</view>
  80. <view class="btn btn-confirm" @tap.stop="deleteList">删除</view>
  81. </view>
  82. </view>
  83. </view>
  84. <view v-if="isEmpty" class="cart-content empty">
  85. <view class="empty-container">
  86. <image class="empty-container-image" src="https://img.caimei365.com/group1/M00/03/71/Cmis2F3wna6AWdWzAAGlgAP0das422.png" mode="aspectFit"></image>
  87. <text class="error-text">购物车空空如也~</text>
  88. </view>
  89. </view>
  90. </view>
  91. <!-- 透明模态层 -->
  92. <modal-layer v-if='modallayer'></modal-layer>
  93. </view>
  94. </template>
  95. <script>
  96. import tuiSkeleton from "@/components/tui-skeleton/tui-skeleton"
  97. import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
  98. import tuiNomore from "@/components/tui-components/nomore/nomore"
  99. import modalLayer from "@/components/modal-layer"
  100. import { mapState,mapMutations } from 'vuex';
  101. import { getSellerShoppingInfo,sellerAddProductNum, deleteSellerCart } from "@/api/seller.js"
  102. export default{
  103. components:{
  104. tuiSkeleton,
  105. tuiLoadmore,
  106. tuiNomore,
  107. modalLayer
  108. },
  109. data(){
  110. return{
  111. clubId:'', //机构ID
  112. serviceProviderId:'',//协销ID
  113. isStock:'',
  114. goodsList:[], //购物车的商品
  115. delGoodsList:'',//要删除的商品
  116. setGoodData:'', //确认订单的商品
  117. isCheckAll:false,//是否全选
  118. allPrice:0,//所有价格
  119. allCount:0,//被选中的产品数量
  120. isNnder:true,
  121. isModallayer:false,
  122. skeletonShow:true,
  123. isshowDelbtn:false,
  124. isDisabled: false, // 供应商/店铺全选是否禁用状态
  125. isEmpty:false,//显示空购物车
  126. scrollHeight: 'auto',
  127. nomoreText: '上拉显示更多',
  128. hasNextPage: false,
  129. loadding: false,
  130. pullUpOn: true,
  131. pullFlag: true,
  132. pageSize: 10,
  133. pageNum: 1,
  134. }
  135. },
  136. onLoad(){
  137. this.setScrollHeight();
  138. },
  139. computed: {
  140. ...mapState(['hasLogin','userInfo'])
  141. },
  142. filters:{//单件商品的价格 × 数量
  143. totalprice(val,count){
  144. return (val * count).toFixed(2)
  145. }
  146. },
  147. methods:{
  148. initData(){
  149. this.isModallayer = false //遮罩层 防止多次点击
  150. this.skeletonShow = true //预加载圆圈
  151. this.isCheckAll=false//是否全选
  152. this.$api.getStorage().then((resolve) => {
  153. this.serviceProviderId = resolve.serviceProviderID;
  154. this.initGetCartGoodsList();
  155. })
  156. },
  157. initLogin(){
  158. this.$api.redirectTo('/pages/login/login-accont?type=4')
  159. },
  160. setScrollHeight() {
  161. // 窗口高度-footer高度
  162. const {windowHeight, pixelRatio} = uni.getSystemInfoSync();
  163. setTimeout(()=> {
  164. const query = uni.createSelectorQuery().in(this);
  165. query.selectAll('.footer').boundingClientRect();
  166. query.exec(res => {
  167. this.windowHeight = windowHeight;
  168. if(res[0][0]) {
  169. this.scrollHeight = windowHeight - res[0][0].height;
  170. }
  171. })
  172. }, 500)
  173. },
  174. initGetCartGoodsList(){//初始化购物车 index:1
  175. let params = {clubId:this.clubId,serviceProviderId:this.serviceProviderId,pageNum:1,pageSize:this.pageSize}
  176. getSellerShoppingInfo(params).then(response =>{
  177. this.skeletonShow = false
  178. this.$store.commit('updateAllNum',response.data.cartQuantity)
  179. const resultsData = response.data.pageDate;
  180. if(resultsData.results&&resultsData.results.length > 0){
  181. this.isEmpty =false
  182. this.hasNextPage = resultsData.hasNextPage;
  183. this.goodsList = resultsData.results;
  184. this.goodsList.forEach((item,index) => {
  185. let productsListLength = item.productsList.length,
  186. invalidLength = 0;
  187. item.productsList.forEach(pros => {
  188. pros.shopID = item.shopID;
  189. })
  190. })
  191. this.pullFlag = false;
  192. setTimeout(()=>{this.pullFlag = true;},500)
  193. if(this.hasNextPage){
  194. this.pullUpOn = false
  195. this.nomoreText = '上拉显示更多'
  196. }else{
  197. if(this.goodsList.length < 4){
  198. this.pullUpOn = true
  199. }else{
  200. this.pullUpOn = false
  201. this.nomoreText = '已至底部'
  202. }
  203. }
  204. } else {
  205. this.goodsList = [];
  206. this.isEmpty =true
  207. }
  208. }).catch(response =>{
  209. this.$util.msg(response.msg,2000);
  210. })
  211. },
  212. getOnReachBottomData(){//上拉加载
  213. this.pageNum+=1
  214. let params = {clubId:this.clubId,serviceProviderId:this.serviceProviderId,pageNum:this.pageNum,pageSize:this.pageSize}
  215. getSellerShoppingInfo(params).then(response =>{
  216. let resultsData = response.data.pageDate
  217. this.hasNextPage = resultsData.hasNextPage;
  218. this.goodsList = this.goodsList.concat(resultsData.results)
  219. this.pullFlag = false;// 防上拉暴滑
  220. setTimeout(()=>{this.pullFlag = true;},500)
  221. if(this.hasNextPage){
  222. this.pullUpOn = false
  223. this.nomoreText = '上拉显示更多'
  224. }else{
  225. this.loadding = false
  226. this.pullUpOn = false
  227. this.nomoreText = '已至底部'
  228. }
  229. }).catch(response =>{
  230. this.$util.msg(response.msg,2000);
  231. })
  232. },
  233. ischeck(item,pro){//为未选中的时候改变为true,反之为true
  234. pro.productsChecked = !pro.productsChecked;
  235. this.updateProductCheckedAllBtn(item);
  236. this.updateCheckAllBtn();
  237. },
  238. updateProductCheckedAllBtn(item) {// 单独每个供应商的勾选判断
  239. let productsList = item.productsList,
  240. productsCheckedLength = 0,
  241. disabledLength = 0;
  242. if(this.isshowDelbtn) {
  243. productsList.forEach(pros => {
  244. if(pros.productsChecked) {
  245. productsCheckedLength++;
  246. }
  247. })
  248. } else {
  249. productsList.forEach(pros => {
  250. if(pros.productsChecked) {
  251. productsCheckedLength++;
  252. }
  253. })
  254. }
  255. item.checked = productsCheckedLength === productsList.length - disabledLength;
  256. },
  257. updateCheckAllBtn() {// 全选勾选判断
  258. let goodsCheckedLength = 0,
  259. disabledListLength = 0,
  260. goodsList = this.goodsList;
  261. goodsList.forEach(item => {
  262. if(item.checked) {
  263. goodsCheckedLength++;
  264. }
  265. })
  266. this.isCheckAll = goodsCheckedLength === goodsList.length - disabledListLength;
  267. },
  268. checkShop(item){//与单选商品类似
  269. item.checked = !item.checked;
  270. this.setProductChecked(item);
  271. this.updateCheckAllBtn();
  272. },
  273. setProductChecked(item) {
  274. let products = item.productsList;
  275. products.forEach(pros=>{
  276. if(item.checked) {
  277. // 有效
  278. this.isNnder = false;
  279. pros.productsChecked = true;
  280. } else {
  281. pros.productsChecked = false;
  282. }
  283. })
  284. },
  285. updateBothCheckBtn() {
  286. if(this.isshowDelbtn) {
  287. // 当管理删除按钮出现时,失效的商品可被选择
  288. this.goodsList.forEach((item)=>{
  289. item.checked = this.isCheckAll;
  290. this.setProductChecked(item);
  291. })
  292. } else {
  293. this.goodsList.forEach((item)=>{
  294. item.checked = this.isCheckAll;
  295. this.setProductChecked(item);
  296. })
  297. }
  298. },
  299. checkAll(){//全选方法内调用方法
  300. this.isCheckAll = !this.isCheckAll;
  301. this.updateBothCheckBtn();
  302. },
  303. totalShopPeice(){//每次所属会所下的商品增减重新计算合计价格&减去含有下架的商品
  304. let prosPrice=0;
  305. let validPrice =0;
  306. let validList=[];
  307. let productsList=[];
  308. this.goodsList.map((item,index)=>{
  309. productsList=item.productsList;
  310. prosPrice=productsList.reduce((p,e)=>p+e.retailPrice*e.productCount,0);
  311. productsList.forEach(pros =>{
  312. item.totalPrice = prosPrice
  313. })
  314. })
  315. },
  316. totalPeice(){ //计算总价格,每次调用此方法,将初始值为0,遍历价格并累加
  317. this.allPrice = 0
  318. let prosPrice=0;
  319. let validPrice=0;
  320. let validList =[];
  321. let productsList =[];
  322. this.goodsList.forEach((item,index)=>{
  323. productsList=item.productsList;
  324. productsList.forEach(pros=>{
  325. if(pros.productsChecked){
  326. prosPrice+=pros.retailPrice*pros.productCount;
  327. this.allPrice = prosPrice
  328. }
  329. })
  330. })
  331. },
  332. totalCount(){//计算总数量
  333. this.allCount = 0
  334. let prosAllCount=0
  335. let validCount = 0
  336. let validList =[];
  337. let productsList =[];
  338. this.goodsList.forEach(item=>{
  339. productsList = item.productsList
  340. productsList.forEach(pros=>{
  341. if(pros.productsChecked){
  342. prosAllCount+=parseInt(pros.productCount);
  343. this.allCount = prosAllCount
  344. }
  345. })
  346. })
  347. },
  348. changeCountAdd(item,pros){//商品数量加加
  349. pros.productCount++
  350. this.processActivityPrice(pros)
  351. this.isStock =false
  352. this.updateShoppogNum(pros)
  353. this.totalShopPeice();
  354. },
  355. changeCountSub(item,pros){//商品数量减减
  356. if(pros.productCount<=pros.minBuyNumber){
  357. pros.productCount= pros.minBuyNumber
  358. this.$util.msg(`该商品最小起订量为${pros.minBuyNumber}`,2000);
  359. return
  360. }else{
  361. pros.productCount--
  362. this.processActivityPrice(pros)
  363. }
  364. this.updateShoppogNum(pros)
  365. this.totalShopPeice();
  366. },
  367. changeNnmber(e,item,pros){//输入商品数量更新
  368. let _value = e.detail.value;
  369. if(!this.$api.isNumber(_value)){
  370. pros.productCount = pros.minBuyNumber
  371. }else if(_value < pros.minBuyNumber){
  372. this.$util.msg(`该商品最小起订量为${pros.minBuyNumber}`,2000);
  373. pros.productCount = pros.minBuyNumber
  374. }else{
  375. pros.productCount = e.detail.value
  376. this.processActivityPrice(pros)
  377. }
  378. this.updateShoppogNum(pros)
  379. this.totalShopPeice();
  380. },
  381. processActivityPrice(pros){//单独处理活动价格和阶梯价格
  382. let ladderPriceList = pros.ladderPriceList;
  383. if(pros.ladderPriceFlag == '0' || pros.actFlag == 1){
  384. pros.retailPrice = pros.retailPrice
  385. }else{
  386. ladderPriceList.forEach((item,index)=>{
  387. if(pros.productCount>=item.buyNum){
  388. pros.retailPrice = item.buyPrice
  389. }
  390. })
  391. }
  392. },
  393. updateShoppogNum(pros){//加减购物车商品更新到后台
  394. let params ={id:pros.sellerCartId,productID:pros.productID,num:pros.productCount}
  395. sellerAddProductNum(params).then(response =>{
  396. this.isshowDelbtn = false;
  397. this.initGetCartGoodsList();
  398. }).catch(response =>{
  399. this.$util.msg(response.msg,2000);
  400. })
  401. },
  402. toConfirmation(){//跳转确认订单页面
  403. let setGoodsList=[];
  404. this.goodsList.forEach(res=>{
  405. let products = res.productsList
  406. products.forEach(pros=>{
  407. if(pros.productsChecked){
  408. setGoodsList.push(pros.productID)
  409. }
  410. })
  411. })
  412. if(setGoodsList == ''){
  413. this.$util.msg("请先选择结算商品~",2000);
  414. return
  415. }else{
  416. /**
  417. * @获取勾选的商品ID拼接字符串逗号隔开,最后一个逗号去掉
  418. * @获取勾选的商品分类ID拼接字符串格式逗号隔开,最后一个逗号去掉
  419. */
  420. let productID = '';
  421. this.goodsList.forEach(el=>{
  422. el.productsList.forEach(pros=>{
  423. if(pros.productsChecked){
  424. productID += pros.productID+','
  425. }
  426. })
  427. })
  428. let cartPramsData={
  429. clubId:this.clubId,
  430. allPrice:this.allPrice,
  431. allCount:this.allCount,
  432. productID:productID.substring(0,productID.lastIndexOf(',')),
  433. productCount:''
  434. }
  435. this.$api.navigateTo(`/market/pages/order/create-order?data=${JSON.stringify({data:cartPramsData})}`)
  436. }
  437. },
  438. showDelManager(){//显示删除商品管理
  439. this.isshowDelbtn = true;
  440. this.isNnder = true;
  441. if(this.isCheckAll) {
  442. this.updateBothCheckBtn();
  443. } else {
  444. this.updateCheckAllBtn();
  445. }
  446. },
  447. hideDelManage(){//隐藏删除商品管理
  448. this.isshowDelbtn = false;
  449. if(this.isCheckAll) {
  450. this.updateBothCheckBtn();
  451. } else {
  452. this.updateCheckAllBtn();
  453. }
  454. },
  455. deleteList(){//删除购物车商品
  456. this.delGoodsList=[];
  457. this.goodsList.forEach(delitem=>{
  458. let products = delitem.productsList
  459. products.forEach(pros=>{
  460. if(pros.productsChecked){
  461. this.delGoodsList += pros.sellerCartId+','
  462. }
  463. })
  464. })
  465. if(this.delGoodsList.length == 0){
  466. this.$util.msg("请选择要删除的商品~",2000);
  467. return
  468. }else{
  469. this.$util.modal('','确定删除选中的商品吗?','确定','取消',true,() =>{
  470. deleteSellerCart({sellerCartIds:this.delGoodsList}).then(response =>{
  471. this.$util.msg('删除成功',2000);
  472. setTimeout(()=>{
  473. this.isshowDelbtn = false;
  474. this.initGetCartGoodsList();
  475. },2000)
  476. }).catch(response =>{
  477. this.$util.msg(response.msg,2000)
  478. })
  479. })
  480. }
  481. },
  482. goNavto(url){
  483. uni.navigateTo ({
  484. url
  485. })
  486. },
  487. navToListPage(id){
  488. this.isModallayer = true;
  489. this.$api.navigateTo(`/pages/goods/product?id=${id}`)
  490. }
  491. },
  492. watch:{//深度监听所有数据,每次改变重新计算总价和总数
  493. goodsList:{
  494. deep:true,
  495. handler(val,oldval){
  496. this.totalPeice()
  497. this.totalCount()
  498. }
  499. }
  500. },
  501. onReachBottom() {
  502. if(this.hasNextPage){
  503. this.loadding = true
  504. this.pullUpOn = true
  505. this.getOnReachBottomData()
  506. }
  507. },
  508. onPullDownRefresh() {//下拉刷新
  509. this.initGetCartGoodsList()
  510. uni.stopPullDownRefresh()
  511. },
  512. onShow(){
  513. this.$api.getComStorage('orderUserInfo').then((resolve) =>{
  514. this.clubId = resolve.clubID
  515. this.initData()
  516. })
  517. }
  518. }
  519. </script>
  520. <style lang="scss">
  521. page{
  522. background: #f7f7f7;
  523. }
  524. .cart-content{
  525. position: relative;
  526. padding-bottom:74rpx;
  527. }
  528. .container-cart-main.none{
  529. display: none;
  530. }
  531. .container-cart-main.show{
  532. display: block;
  533. }
  534. .cart-content.empty.none{
  535. display: none;
  536. }
  537. .cart-content.empty.show{
  538. display: block;
  539. }
  540. .container-cart.show{
  541. display: block;
  542. }
  543. .container-cart.none{
  544. display: none;
  545. }
  546. .empty-container.none{
  547. display: none;
  548. }
  549. .empty-container.show{
  550. display: flex;
  551. }
  552. .checkbox-box{
  553. display: flex;
  554. align-items: center;
  555. .checkbox{
  556. display: flex;
  557. margin: 0;
  558. padding: 0;
  559. display: flex;
  560. flex-direction: column;
  561. align-items: center;
  562. box-sizing: border-box;
  563. text-align: center;
  564. text-decoration: none;
  565. border-radius: 0;
  566. -webkit-tap-highlight-color: transparent;
  567. overflow: hidden;
  568. background-color:#FFFFFF;
  569. font-size: 36rpx;
  570. color:$color-system;
  571. }
  572. &.disabled{
  573. .checkbox{
  574. color:#999999
  575. }
  576. }
  577. .text{
  578. font-size: $font-size-24;
  579. margin-left: 10rpx;
  580. }
  581. }
  582. .goods-list{
  583. width: 100%;
  584. height: auto;
  585. border-top: 1px solid #EBEBEB;
  586. background-color: #F7F7F7;
  587. .goods-item{
  588. width: 702rpx;
  589. padding: 0 24rpx;
  590. background: #FFFFFF;
  591. margin-bottom: 24rpx;
  592. }
  593. .shoptitle{
  594. display: flex;
  595. align-items: center;
  596. height: 80rpx;
  597. // border-bottom: 1px solid #EBEBEB;
  598. line-height: 80rpx;
  599. .checkbox-box{
  600. padding: 10rpx;
  601. }
  602. .text{
  603. margin-left: 37rpx;
  604. font-size: $font-size-28;
  605. color: $text-color;
  606. text-align: left;
  607. font-weight: bold;
  608. }
  609. }
  610. .goods-pros{
  611. width: 100%;
  612. height: auto;
  613. }
  614. .goods-pros-t{
  615. display: flex;
  616. align-items: center;
  617. width: 100%;
  618. height: 217rpx;
  619. padding:0 0 26rpx 0;
  620. .checkbox-box{
  621. padding: 10rpx
  622. }
  623. .pros-img{
  624. width: 210rpx;
  625. height: 100%;
  626. border-radius: 10rpx;
  627. margin:0 26rpx 0 38rpx;
  628. border:1px solid #f3f3f3;
  629. image{
  630. width: 100%;
  631. height: 100%;
  632. border-radius: 10rpx;
  633. }
  634. }
  635. }
  636. .goods-pros-b{
  637. width:622rpx;
  638. margin-left: 84rpx;
  639. height: 40rpx;
  640. padding:0 0 26rpx 0;
  641. // border-top: 1px solid #EBEBEB;
  642. &.show{
  643. display: block;
  644. }
  645. &.none{
  646. display: none;
  647. }
  648. .sum{
  649. font-size: $font-size-28;
  650. line-height: 40rpx;
  651. color: $text-color;
  652. display: flex;
  653. justify-content: flex-end;
  654. .money{
  655. color: #FF2A2A;
  656. font-size: $font-size-28;
  657. }
  658. .money-sign{
  659. font-size: $font-size-24;
  660. color: #FF2A2A;
  661. }
  662. }
  663. }
  664. .pros-product{
  665. width: 386rpx;
  666. height: 100%;
  667. line-height: 36rpx;
  668. font-size: $font-size-26;
  669. position: relative;
  670. .producttitle{
  671. width: 100%;
  672. display: inline-block;
  673. height: auto;
  674. text-overflow:ellipsis;
  675. display: -webkit-box;
  676. word-break: break-all;
  677. -webkit-box-orient: vertical;
  678. -webkit-line-clamp: 2;
  679. overflow: hidden;
  680. margin-bottom: 8rpx;
  681. .no-text{
  682. display: inline-block;
  683. height:36rpx;
  684. padding: 0 12rpx;
  685. line-height: 36rpx;
  686. background:linear-gradient(315deg,rgba(231,0,0,1) 0%,rgba(255,104,1,1) 100%);
  687. border-radius:18rpx;
  688. text-align: center;
  689. color: #FFFFFF;
  690. font-size: $font-size-24;
  691. margin-right: 24rpx;
  692. }
  693. }
  694. .productspec{
  695. height: 36rpx;
  696. color: #999999;
  697. }
  698. .productprice{
  699. height: 48rpx;
  700. position: absolute;
  701. width: 100%;
  702. bottom: 0;
  703. .price{
  704. line-height: 48rpx;
  705. font-size: $font-size-28;
  706. width: 48%;
  707. color: #FF2A2A;
  708. float: left;
  709. &.disabled{
  710. color: #999999;
  711. }
  712. .money-sign{
  713. font-size: $font-size-24;
  714. color: #FF2A2A;
  715. }
  716. }
  717. .count{
  718. height: 100%;
  719. float: right;
  720. position: relative;
  721. &.show{
  722. display: block;
  723. }
  724. &.none{
  725. display: none;
  726. }
  727. .number-box{
  728. display: flex;
  729. justify-content: center;
  730. align-items: center;
  731. .iconfont{
  732. font-size: $font-size-24;
  733. padding:0 20rpx;
  734. color: $text-color;
  735. text-align: center;
  736. line-height: 48rpx;
  737. font-weight: bold;
  738. }
  739. .btn-input{
  740. width: 62rpx;
  741. height: 48rpx;
  742. line-height: 48rpx;
  743. background: #F8F8F8;
  744. border-radius: 4rpx;
  745. text-align: center;
  746. font-size: $font-size-24;
  747. }
  748. }
  749. .uni-numbox{
  750. position: absolute;
  751. left: 45rpx;
  752. bottom: 0;
  753. .uni-numbox-minus, .uni-numbox-plus{
  754. width: 50rpx;
  755. line-height: 40rpx;
  756. }
  757. .uni-numbox-value {
  758. font-size: $font-size-28;
  759. width: 60rpx;
  760. }
  761. }
  762. }
  763. }
  764. }
  765. }
  766. .footer{
  767. width: 100%;
  768. background-color: #FFFFFF;
  769. height: 110rpx;
  770. position: fixed;
  771. bottom: 0rpx;
  772. z-index: 10;
  773. .footer-le{
  774. width: 490rpx;
  775. height: 100%;
  776. padding:0 30rpx;
  777. float: left;
  778. .text{
  779. font-weight: bold;
  780. }
  781. .foot-check{
  782. width: 100rpx;
  783. float: left;
  784. line-height: 110rpx;
  785. font-size: $font-size-24;
  786. .checkbox{
  787. width: 40rpx;
  788. text-align: center;
  789. }
  790. .text{
  791. width: 60rpx;
  792. float: right;
  793. }
  794. }
  795. .foot-check-delbtn{
  796. float: left;
  797. .delBtn{
  798. margin: 0;
  799. padding: 0;
  800. display: flex;
  801. flex-direction: column;
  802. align-items: center;
  803. box-sizing: border-box;
  804. font-size: $font-size-24;
  805. text-align: center;
  806. text-decoration: none;
  807. border-radius: 0;
  808. -webkit-tap-highlight-color: transparent;
  809. overflow: hidden;
  810. background-color:#FFFFFF;
  811. color: #FF2A2A;
  812. padding: 0 24rpx;
  813. display: flex;
  814. justify-content: center;
  815. align-items: center;
  816. line-height: 110rpx;
  817. font-weight: bold;
  818. &.none{
  819. display: none;
  820. }
  821. }
  822. }
  823. .sum{
  824. font-size: $font-size-28;
  825. line-height: 110rpx;
  826. color: $text-color;
  827. display: flex;
  828. justify-content: flex-end;
  829. .money{
  830. color: #FF2A2A;
  831. }
  832. .money-sign{
  833. font-size: $font-size-24;
  834. color: #FF2A2A;
  835. }
  836. }
  837. }
  838. .footer-ri{
  839. width: 200rpx;
  840. height: 100%;
  841. background:linear-gradient(135deg,rgba(242,143,49,1) 0%,rgba(225,86,22,1) 100%);
  842. float: right;
  843. display: flex;
  844. justify-content: space-between;
  845. align-items: center;
  846. z-index: 999;
  847. &.none{
  848. display: none;
  849. }
  850. .btn{
  851. width: 200rpx;
  852. height: 100%;
  853. font-size: $font-size-28;
  854. line-height: 110rpx;
  855. color: #FFFFFF;
  856. display: flex;
  857. justify-content: center;
  858. align-items: center;
  859. }
  860. }
  861. .footer-del{
  862. width: 400rpx;
  863. height: 100%;
  864. position: absolute;
  865. padding-left: 200rpx;
  866. background: #FFFFFF;
  867. right: 0;
  868. top: 0;
  869. z-index: 1000;
  870. &.show{
  871. animation: showDelbtn 0s linear both;
  872. }
  873. &.none{
  874. animation: hideDelbtn 0s linear both;
  875. }
  876. .btn{
  877. width: 50%;
  878. height: 100%;
  879. line-height: 110rpx;
  880. font-size: $font-size-28;
  881. color: #FFFFFF;
  882. text-align: center;
  883. float: left;
  884. }
  885. .btn.btn-cancel{
  886. background:#EEC1AB;
  887. }
  888. .btn.btn-confirm{
  889. background:#FF2A2A;
  890. }
  891. @keyframes showDelbtn {
  892. 0% {
  893. transform: translateX(0);
  894. }
  895. 100% {
  896. transform: translateX(-100%);
  897. }
  898. }
  899. @keyframes hideDelbtn {
  900. 0% {
  901. transform: translateX(-100%);
  902. }
  903. 100% {
  904. transform: translateX(0);
  905. }
  906. }
  907. }
  908. }
  909. </style>