cart.vue 24 KB

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