cart.vue 24 KB

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