cart.vue 24 KB

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