cart.vue 24 KB

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