index.vue 54 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024
  1. <template name="navbars">
  2. <view>
  3. <tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading ="true" :loadingType="5"></tui-skeleton>
  4. <view class="container-cart-main tui-skeleton" :style="{paddingTop:isshowDelbtn ? '0rpx':'80rpx'}">
  5. <template v-if="pathType == 0">
  6. <view class="foot-check-delbtn" v-if="!isshowDelbtn && goodsList.length>0">
  7. <view class="foot-text">共<text>{{kindCount}}</text>件商品</view>
  8. <view class="delBtn" @tap.stop="showDelManager">删除</view>
  9. </view>
  10. </template>
  11. <template v-else>
  12. <view class="foot-check-delbtn" v-if="!isshowDelbtn && goodsList.length>0" :style="{top:CustomBar+'px'}">
  13. <view class="foot-text">共<text>{{kindCount}}</text>件商品</view>
  14. <view class="delBtn" @tap.stop="showDelManager">删除</view>
  15. </view>
  16. </template>
  17. <view v-if="!isEmpty" class="container-cart">
  18. <view class="cart-content" :style="{paddingBottom :isIphoneX ? '130rpx' : '100rpx'}">
  19. <view class="goods-list">
  20. <view v-for="(item, index) in goodsList" :key="index" class="goods-item clearfix">
  21. <view class="shoptitle">
  22. <!--选择商店的全部商品"-->
  23. <view class="checkbox-box" @click.stop="checkShop(item)">
  24. <view class="checkbox iconfont" :class="[item.checked ?'icon-yixuanze':'icon-weixuanze']"></view>
  25. </view>
  26. <view v-if="item.promotions" class="floor-item-act">
  27. <view class="floor-tags" @click.stop="clickPopupShow(item,2)">{{item.promotions.name}}</view>
  28. </view>
  29. <view class="text">{{item.name}}</view>
  30. <view class="text-coupon" @click="showPopup(0)">领券</view>
  31. </view>
  32. <view class="productlist">
  33. <view class="goods-pros" v-for="(pros,idx) in item.cartList" :key="idx" >
  34. <view class="goods-pros-t">
  35. <!--选择商品-->
  36. <view class="checkbox-box" @click.stop="ischeck(item,pros)">
  37. <view class="checkbox iconfont" :class="[pros.productsChecked ? 'icon-yixuanze':'icon-weixuanze']"></view>
  38. </view>
  39. <view class="pros-img" @click.stop="navToListPage(pros.productId)" ><image :src="pros.image ? pros.image:''" alt="" /></view>
  40. <view class="pros-product">
  41. <view class="producttitle" @click.stop="navToListPage(pros.productId)" >{{pros.name}}</view>
  42. <view class="productspec">规格:{{pros.unit ? pros.unit : ''}}</view>
  43. <view class="productprice">
  44. <!--使用过滤器对总价改变-->
  45. <view class="price" :class="PromotionsFormat(pros.promotions) ? 'disabled' : ''">
  46. <text>¥</text>
  47. {{ (PromotionsFormat(pros.promotions) ? pros.originalPrice : pros.price) | NumFormat }}
  48. </view>
  49. <view class="count" v-if="pros.validFlag == 2 " :class="[isshowDelbtn ? 'none':'show']">
  50. <text class="count-tips" v-if="pros.number<pros.min">起订量:{{pros.min}}</text>
  51. <text class="count-tips step" v-if="pros.isStep">购买量必须为起订量的整数倍</text>
  52. <view class="number-box">
  53. <view class="iconfont icon-jianhao" @click="changeCountSub(item,pros)"></view>
  54. <input class="btn-input" type="number" maxlength='4' v-model="pros.number" @blur="changeNnmber($event,item,pros)" @focus="changeInput(pros)">
  55. <view class="iconfont icon-jiahao" @click="changeCountAdd(item,pros)"></view>
  56. </view>
  57. </view>
  58. </view>
  59. <view v-show="pros.actStatus==1" class="floor-item-act">
  60. <view v-if="PromotionsFormat(pros.promotions)" class="floor-tags" @click.stop="clickPopupShow(pros,1)">
  61. {{pros.promotions.name}}
  62. <text v-if ="pros.promotions!=null && pros.promotions.type!=3">
  63. :¥{{ pros.promotions == null ? '0.00' : pros.promotions.touchPrice | NumFormat}}
  64. </text>
  65. </view>
  66. <view v-else-if="pros.promotions.type!=3" class="floor-tags" @click.stop="clickPopupShow(pros,2)">{{pros.promotions.name}}</view>
  67. </view>
  68. <view v-if="pros.actStatus == null && pros.ladderFlag == 1" class="floor-item-act">
  69. <view class="floor-tags" @click.stop="clickPopupShow(pros,2)">阶梯价格</view>
  70. </view>
  71. </view>
  72. </view>
  73. </view>
  74. </view>
  75. <view class="goods-pros-b clearfix" :class="[isshowDelbtn ? 'none':'show']" >
  76. <view class="sum-none" v-if="item.reducedPrice>0">
  77. <text class="money-sign">¥</text>
  78. <text class="money">{{ item.totalOriginalPrice | NumFormat }}</text>
  79. <text class="money-reduced">减<text>¥{{ item.reducedPrice | NumFormat}}</text></text>
  80. </view>
  81. <view class="sum">合计:<text class="money"><text class="money-sign">¥</text>{{item.totalPrice | NumFormat}}</text></view>
  82. </view>
  83. </view>
  84. </view>
  85. <view class="failure-list" v-if="failureList.length>0">
  86. <view class="failure-title">
  87. <view class="title-txt">失效商品<text>{{failureList.length}}件</text></view>
  88. <view class="title-btn" @click.stop="deletefailureList"><text class="butto">清空失效商品</text></view>
  89. </view>
  90. <view class="productlist">
  91. <view class="goods-pros" v-for="(failure,failureIdx) in failureList" :key="failureIdx" >
  92. <view class="goods-pros-t" @click.stop="failureToProduct(failure)">
  93. <!--选择商品-->
  94. <view class="checkbox-box" @click.stop="ischeckFailure(failure)" v-if="isshowDelbtn">
  95. <button class="checkbox iconfont"
  96. :class="[ failure.productsChecked ? 'icon-yixuanze':'icon-weixuanze']">
  97. </button>
  98. </view>
  99. <text class="img-tip">失效</text>
  100. <view class="pros-img">
  101. <image :src="failure.image ? failure.image:''" alt="" />
  102. </view>
  103. <view class="pros-product">
  104. <view class="producttitle">{{failure.name}}</view>
  105. <view class="productspec">规格:{{failure.unit ? failure.unit : ''}}</view>
  106. <view class="productstate">{{failureStateText(failure.status)}}</view>
  107. </view>
  108. <view class="pros-marks" v-if="failure.isFailureLayer"></view>
  109. </view>
  110. </view>
  111. </view>
  112. </view>
  113. </view>
  114. <!-- 脚部菜单 -->
  115. <template v-if="pathType == 0">
  116. <view class="footer">
  117. <view class="footer-le">
  118. <view class="foot-check checkbox-box" @tap.stop="checkAll()">
  119. <button class="checkbox iconfont" :class="[isCheckAll?'icon-yixuanze':'icon-weixuanze']"></button>
  120. <view class="text">全选</view>
  121. </view>
  122. <view class="sum">
  123. <view class="sum-price" :class="reducedPrice == 0 ? 'none' : ''">
  124. 总价:<text class="money-sign">¥</text><text class="money">{{allPrice | NumFormat}}</text>
  125. </view>
  126. <view class="sum-none" v-if="reducedPrice>0">
  127. <!-- <text class="money-sign">¥</text> -->
  128. <!-- <text class="money">{{ totalOriginalPrice | NumFormat }}</text> -->
  129. <text class="money-reduced">共减<text>¥{{ reducedPrice | NumFormat}}</text></text>
  130. <text class="money-popup" @click="showPopup(1)">优惠明细<text class="iconfont icon-xiangshangjiantou"></text></text>
  131. </view>
  132. </view>
  133. </view>
  134. <view v-if="!isshowDelbtn" class="footer-ri" >
  135. <view class="btn hanld-btn" @tap="toConfirmation">去结算({{allCount}})</view>
  136. </view>
  137. <view v-else class="footer-del">
  138. <view class="btn btn-cancel" @tap.stop="hideDelManage">取消</view>
  139. <view class="btn btn-confirm" @tap.stop="deleteList">删除</view>
  140. </view>
  141. </view>
  142. </template>
  143. <template v-else>
  144. <view class="footer" :style="{paddingBottom :isIphoneX ? '68rpx' : '0rpx'}">
  145. <view class="footer-le">
  146. <view class="foot-check checkbox-box" @tap.stop="checkAll()">
  147. <button class="checkbox iconfont" :class="[isCheckAll?'icon-yixuanze':'icon-weixuanze']"></button>
  148. <view class="text">全选</view>
  149. </view>
  150. <view class="sum">
  151. <view class="sum-price" :class="reducedPrice == 0 ? 'none' : ''">
  152. 总价:<text class="money-sign">¥</text><text class="money">{{allPrice | NumFormat}}</text>
  153. </view>
  154. <view class="sum-none" v-if="reducedPrice>0">
  155. <!-- <text class="money-sign">¥</text> -->
  156. <!-- <text class="money">{{ totalOriginalPrice | NumFormat }}</text> -->
  157. <text class="money-reduced">共减<text>¥{{ reducedPrice | NumFormat}}</text></text>
  158. <text class="money-popup" @click="showPopup(1)">优惠明细<text class="iconfont icon-xiangshangjiantou"></text></text>
  159. </view>
  160. </view>
  161. </view>
  162. <view v-if="!isshowDelbtn" class="footer-ri" >
  163. <view class="btn hanld-btn" @tap="toConfirmation">去结算({{allCount}})</view>
  164. </view>
  165. <view v-else class="footer-del">
  166. <view class="btn btn-cancel" @tap.stop="hideDelManage">取消</view>
  167. <view class="btn btn-confirm" @tap.stop="deleteList">删除</view>
  168. </view>
  169. </view>
  170. </template>
  171. </view>
  172. <view v-else class="cart-content empty">
  173. <view class="empty-container">
  174. <image class="empty-container-image" src="https://img.caimei365.com/group1/M00/03/71/Cmis2F3wna6AWdWzAAGlgAP0das422.png" mode="aspectFit"></image>
  175. <text class="error-text">购物车空空如也,快去商城逛逛吧~</text>
  176. <view class="login-btn" @click="goIndex">去商城</view>
  177. </view>
  178. </view>
  179. </view>
  180. <!-- 促销活动弹窗 -->
  181. <activi-popup :product="handlerPros" :popupShow="popupShow"></activi-popup>
  182. <!-- 透明模态层 -->
  183. <modal-layer v-if='modallayer'></modal-layer>
  184. <!-- 优惠券 -->
  185. <tui-bottom-popup :radius="true" :show="popupShow0" @close="hidePopup(0)">
  186. <view class="tui-popup-box clearfix">
  187. <view class="title">优惠券</view>
  188. <view class="tui-popup-close" @click="hidePopup(0)">
  189. <text class="iconfont icon-iconfontguanbi"></text>
  190. </view>
  191. <view class="tui-popup-tabs">
  192. <coupon-tabs :tabs="navbar"
  193. :currentTab="currentTab>2?0:currentTab"
  194. @change="couponChange"
  195. :itemWidth="(100/navbar.length)+'%'"
  196. selectedColor="#e15616"
  197. sliderBgColor="#e15616">
  198. </coupon-tabs>
  199. </view>
  200. <div class="tui-popup-main coupon">
  201. <scroll-view class="tui-popup-scroll" scroll-y="true">
  202. <view v-for="(coupon,index) in dataList" :key="index" :id="coupon.id" class="coupon-list">
  203. <view class="list-cell-le">
  204. <view class="coupon-maxMoney">
  205. <text class="small">¥</text>
  206. {{ coupon.maxMoney }}
  207. </view>
  208. <view class="coupon-minMoney">
  209. 满{{ coupon.minMoney }}可用
  210. </view>
  211. </view>
  212. <view class="list-cell-ri">
  213. <view class="list-cell-top">
  214. <view class="list-cell-type">
  215. <view class="list-cell-tags">
  216. <text class="tags">{{ coupon.couponType | TypeFormat }}</text>
  217. </view>
  218. <view class="list-cell-texts" :class="currentTab == 1 || currentTab == 2 ? 'none' : ''">
  219. <text v-if="coupon.useType == 1">{{ coupon.useType | TypeFormatText }}</text>
  220. <text v-if="coupon.useType == 2">{{ coupon.useType | TypeFormatText }}</text>
  221. <text v-if="coupon.useType == 3">{{ coupon.useType | TypeFormatText }}{{ coupon.couponText }}的商品</text>
  222. </view>
  223. </view>
  224. <view class="list-cell-btn">
  225. <view class="icon-used">
  226. <view class="icon-used-btn receive" v-if="currentTab == 0" @click="receiveCoupon(coupon)">领取</view>
  227. <view class="icon-used-btn make" v-if="currentTab == 1">已领取</view>
  228. </view>
  229. </view>
  230. </view>
  231. <view class="list-cell-time">{{ coupon.couponTime }}</view>
  232. </view>
  233. </view>
  234. </scroll-view>
  235. </div>
  236. </view>
  237. </tui-bottom-popup>
  238. <!-- 优惠明细 -->
  239. <tui-bottom-popup :radius="true" :show="popupShow1" @close="hidePopup(1)">
  240. <view class="tui-popup-box clearfix">
  241. <view class="title">优惠明细</view>
  242. <view class="tui-popup-close" @click="hidePopup(1)">
  243. <text class="iconfont icon-iconfontguanbi"></text>
  244. </view>
  245. <div class="tui-popup-main coupon">
  246. <view class="tui-popup-coupon">
  247. <view class="tui-popup-h1">
  248. <view class="tui-popup-text left">商品总额</view>
  249. <view class="tui-popup-text right bold">¥4500.00</view>
  250. </view>
  251. <view class="tui-popup-h1">
  252. <view class="tui-popup-text left">促销满减</view>
  253. <view class="tui-popup-text right bold red">¥500.00</view>
  254. </view>
  255. <view class="tui-popup-h1">
  256. <view class="tui-popup-text left">优惠券</view>
  257. <view class="tui-popup-text right bold red">¥100.00</view>
  258. </view>
  259. <view class="tui-popup-h1">
  260. <view class="tui-popup-text left bold">共减</view>
  261. <view class="tui-popup-text right bold red">¥600.00</view>
  262. </view>
  263. <view class="tui-popup-h1">
  264. <view class="tui-popup-text left bold">总计</view>
  265. <view class="tui-popup-text right bold">¥3900.00</view>
  266. </view>
  267. </view>
  268. </div>
  269. </view>
  270. </tui-bottom-popup>
  271. </view>
  272. </template>
  273. <script>
  274. import authorize from '@/common/config/authorize.js'
  275. import tuiSkeleton from "@/components/tui-skeleton/tui-skeleton"
  276. import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
  277. import tuiNomore from "@/components/tui-components/nomore/nomore"
  278. import activiPopup from "@/components/cm-module/productDetails/cm-activipopu"
  279. import couponTabs from '@/components/cm-module/coupon/tui-tabs.vue'
  280. import modalLayer from "@/components/modal-layer"
  281. import { mapState,mapMutations } from 'vuex';
  282. export default{
  283. name:"cartComponents",
  284. props:{
  285. pathType:{
  286. type:Number
  287. }
  288. },
  289. components:{
  290. tuiSkeleton,
  291. tuiLoadmore,
  292. tuiNomore,
  293. activiPopup,
  294. couponTabs,
  295. modalLayer
  296. },
  297. data() {
  298. return{
  299. CustomBar:this.CustomBar,// 顶部导航栏高度
  300. isIphoneX:this.$store.state.isIphoneX,
  301. userID:'',
  302. alertType:'',
  303. isStock:'',
  304. handlerPros:{},//监听单挑促销商品
  305. failureList:[], //失效商品列表
  306. goodsList:[], //购物车的商品
  307. promotionsList:[],//促销列表
  308. delGoodsList:'',//要删除的商品
  309. setGoodData:'', //确认订单的商品
  310. isCheckAll:false,//是否全选
  311. kindCount:0,//购物车宝贝数量
  312. allPrice:0,//所有价格
  313. totalOriginalPrice:0,//所有原价价
  314. reducedPrice:0,//满减
  315. allCount:0,//被选中的产品数量
  316. isModallayer:false,
  317. skeletonShow:true,
  318. isshowDelbtn:false,
  319. isDisabled: false, // 供应商/店铺全选是否禁用状态
  320. isNoConfim:false,
  321. isEmpty:false,//显示空购物车
  322. scrollHeight: 'auto',
  323. nomoreText: '上拉显示更多',
  324. hasNextPage: false,
  325. loadding: false,
  326. pullUpOn: true,
  327. pullFlag: true,
  328. pageSize: 10,
  329. pageNum: 1,
  330. submitIds:[],
  331. popupShow:false,
  332. popupShow0:false,
  333. popupShow1:false,
  334. currentTab: 0,
  335. navbar: [
  336. { name: "未领取",num:3 },
  337. { name: "已领取",num:4 }
  338. ],
  339. dataList:[
  340. {
  341. maxMoney:5000,
  342. minMoney:1000,
  343. couponType:1,
  344. couponTime:'2021.06.28~2021.07.28',
  345. couponText:'华熙生物技术有限公司',
  346. useType:1,
  347. couponBtnType:0
  348. },
  349. {
  350. maxMoney:2000,
  351. minMoney:200,
  352. couponType:2,
  353. couponTime:'2021.06.28~2021.07.28',
  354. couponText:'华熙生物技术有限公司',
  355. useType:2,
  356. couponBtnType:0
  357. },
  358. {
  359. maxMoney:4000,
  360. minMoney:800,
  361. couponType:3,
  362. couponTime:'2021.06.28~2021.07.28',
  363. couponText:'华熙生物技术有限公司',
  364. useType:3,
  365. couponBtnType:0
  366. },
  367. {
  368. maxMoney:6000,
  369. minMoney:1000,
  370. couponType:4,
  371. couponTime:'2021.06.28~2021.07.28',
  372. couponText:'华熙生物技术有限公司',
  373. useType:1,
  374. couponBtnType:0
  375. },
  376. {
  377. maxMoney:6000,
  378. minMoney:1000,
  379. couponType:5,
  380. couponTime:'2021.06.28~2021.07.28',
  381. couponText:'华熙生物技术有限公司',
  382. useType:2,
  383. couponBtnType:0
  384. }
  385. ],
  386. }
  387. },
  388. created(){
  389. this.setScrollHeight();
  390. console.log('pathType',this.pathType)
  391. if(this.hasLogin){
  392. this.initData()
  393. }else{
  394. this.initLogin()
  395. }
  396. },
  397. computed: {
  398. ...mapState(['hasLogin','userInfo','isWxAuthorize'])
  399. },
  400. watch:{//深度监听所有数据,每次改变重新计算总价和总数
  401. goodsList:{
  402. deep:true,
  403. handler(val,oldval){
  404. this.totalPeice()
  405. this.totalCount()
  406. }
  407. }
  408. },
  409. filters:{
  410. NumFormat(value) {//处理金额
  411. return Number(value).toFixed(2);
  412. },
  413. totalprice(val,count){//单件商品的价格 × 数量
  414. return (val * count).toFixed(2)
  415. },
  416. TypeFormat:function(value) {
  417. switch (value) {
  418. case 1:
  419. return '活动券';
  420. break;
  421. case 2:
  422. return '品类券';
  423. break;
  424. case 3:
  425. return '店铺券';
  426. break;
  427. case 4:
  428. return '专享券';
  429. break;
  430. case 5:
  431. return '新用户券';
  432. break;
  433. }
  434. },
  435. TypeFormatText:function(value) {
  436. switch (value) {
  437. case 1:
  438. return '全商城商品通用';
  439. break;
  440. case 2:
  441. return '仅限购买仪器类商品';
  442. break;
  443. case 3:
  444. return '仅可购买店铺';
  445. break;
  446. }
  447. }
  448. },
  449. methods:{
  450. initData(){
  451. this.isModallayer = false //遮罩层 防止多次点击
  452. this.skeletonShow = true //预加载圆圈
  453. this.isCheckAll=false//是否全选
  454. this.submitIds = []
  455. this.$api.getStorage().then((resolve) => {
  456. this.userID = resolve.userId;
  457. this.initGetCartGoodsList();
  458. })
  459. },
  460. initLogin(){
  461. this.$api.redirectTo('/pages/login/login?type=4')
  462. },
  463. clickPopupShow(pros,type){
  464. this.popupShow = true;
  465. this.handlerPros = pros;
  466. },
  467. setScrollHeight() {
  468. // 窗口高度-footer高度
  469. const {windowHeight, pixelRatio} = uni.getSystemInfoSync();
  470. setTimeout(()=> {
  471. const query = uni.createSelectorQuery().in(this);
  472. query.selectAll('.footer').boundingClientRect();
  473. query.exec(res => {
  474. this.windowHeight = windowHeight;
  475. if(res[0][0]) {
  476. this.scrollHeight = windowHeight - res[0][0].height;
  477. }
  478. })
  479. }, 500)
  480. },
  481. initGetCartGoodsList(){//初始化购物车 index:1
  482. this.ProductService.QueryShoppingCartList({userId:this.userID}).then(response =>{
  483. this.skeletonShow = false
  484. let data = response.data
  485. this.kindCount = data.kindCount
  486. this.promotionsList = data.promotions
  487. this.$store.commit('updateAllNum',data.kindCount)
  488. if( data.list.length > 0 || data.invalid.length > 0){
  489. this.isEmpty =false
  490. }else{
  491. this.isEmpty =true
  492. }
  493. if(data.list && data.list.length > 0 ){
  494. this.goodsList = data.list;
  495. this.goodsList.forEach((item,index) => {
  496. item.cartList.forEach(pros => {
  497. pros.shopID = item.shopID;
  498. pros.isStep = false
  499. if(pros.step === 2){
  500. if(pros.number % pros.min != 0){
  501. pros.number = pros.min
  502. this.totalShopPeice()
  503. this.updateShoppogNum(pros)
  504. }
  505. }
  506. })
  507. })
  508. this.totalShopPeice()
  509. } else {
  510. this.goodsList = [];
  511. }
  512. if( data.invalid && data.invalid.length > 0){
  513. let newFailureList = [],isFailureLayer;
  514. data.invalid.forEach((failure,index) => {
  515. if(failure.status == 1 || failure.status == 2) {
  516. isFailureLayer = true
  517. }else{
  518. isFailureLayer = false
  519. }
  520. newFailureList.push(Object.assign({},failure,{isFailureLayer:isFailureLayer}))
  521. })
  522. this.failureList = newFailureList
  523. } else {
  524. this.failureList = [];
  525. }
  526. }).catch(error =>{
  527. this.$util.msg(error.msg,2000);
  528. })
  529. },
  530. ischeckFailure(failure){
  531. failure.productsChecked = !failure.productsChecked
  532. this.updateCheckAllBtn()
  533. },
  534. ischeck(item,pro){//为未选中的时候改变为true,反之为true
  535. pro.productsChecked = !pro.productsChecked;
  536. if(pro.productsChecked) {
  537. if(!this.submitIds.includes(pro.productID*1)){
  538. this.submitIds.push(pro.productID);
  539. }
  540. } else {
  541. var lent = this.submitIds.indexOf(pro.productID*1);
  542. if(lent >=0 ){
  543. this.submitIds.splice(lent, 1);
  544. }
  545. }
  546. this.updateProductCheckedAllBtn(item);
  547. this.updateCheckAllBtn();
  548. },
  549. updateProductCheckedAllBtn(item) {// 单独每个供应商的勾选判断
  550. let productsList = item.cartList,
  551. productsCheckedLength = 0,
  552. disabledLength = 0;
  553. if(this.isshowDelbtn) {
  554. productsList.forEach(pros => {
  555. if(pros.productsChecked) {
  556. productsCheckedLength++;
  557. }
  558. })
  559. } else {
  560. productsList.forEach(pros => {
  561. if(pros.productsChecked) {
  562. productsCheckedLength++;
  563. }
  564. })
  565. }
  566. item.checked = productsCheckedLength === productsList.length;
  567. },
  568. updateCheckAllBtn() {// 全选勾选判断
  569. let goodsCheckedLength = 0,
  570. goodsList = this.goodsList,
  571. failureList = this.failureList;
  572. goodsList.forEach(item => {
  573. if(item.checked) {
  574. goodsCheckedLength++;
  575. }
  576. })
  577. failureList.forEach(failureItem=>{
  578. if(failureItem.productsChecked){
  579. goodsCheckedLength++;
  580. }
  581. })
  582. if(this.isshowDelbtn){
  583. this.isCheckAll = goodsCheckedLength === goodsList.length + failureList.length;
  584. }else{
  585. this.isCheckAll = goodsCheckedLength === goodsList.length;
  586. }
  587. },
  588. checkShop(item){//与单选商品类似
  589. item.checked = !item.checked;
  590. this.setProductChecked(item);
  591. this.updateCheckAllBtn();
  592. },
  593. setProductChecked(item) {
  594. item.cartList.forEach(pros=>{
  595. if(item.checked) {
  596. pros.productsChecked = true;
  597. if(!this.submitIds.includes(pros.productId*1)){
  598. this.submitIds.push(pros.productId);
  599. }
  600. } else {
  601. pros.productsChecked = false;
  602. var lent = this.submitIds.indexOf(pros.productId*1);
  603. if(lent >=0 ){
  604. this.submitIds.splice(lent, 1);
  605. }
  606. }
  607. })
  608. },
  609. updateBothCheckBtn() {
  610. if(this.isshowDelbtn) {
  611. // 当管理删除按钮出现时,失效的商品可被选择
  612. this.goodsList.forEach((item)=>{
  613. item.checked = this.isCheckAll;
  614. this.setProductChecked(item);
  615. })
  616. //删除按钮 全选包括失效商品勾选
  617. this.failureList.forEach(failureItem=>{
  618. failureItem.productsChecked = this.isCheckAll;
  619. })
  620. } else {
  621. this.goodsList.forEach((item)=>{
  622. item.checked = this.isCheckAll && !item.isDisabled;
  623. this.setProductChecked(item);
  624. })
  625. }
  626. },
  627. checkAll(){//全选方法内调用方法
  628. this.isCheckAll = !this.isCheckAll;
  629. if(!this.isCheckAll){
  630. this.popupShow1 = false
  631. }
  632. this.updateBothCheckBtn();
  633. },
  634. totalShopPeice(){//每次所属会所下的商品增减重新计算合计价格&减去含有下架的商品
  635. let touchPrice = 0;
  636. let reducedPrice = 0;//商铺合计满减价
  637. this.goodsList.map((item,index)=>{
  638. //计算店铺满减后店铺合计
  639. if(item.promotions && item.promotions.mode == 2){
  640. let prosPrice=0;
  641. let totalOriginalPrice = 0;//商铺合计原价
  642. item.cartList.forEach(pros=>{
  643. prosPrice += pros.price*pros.number
  644. totalOriginalPrice += pros.originalPrice*pros.number
  645. })
  646. if(prosPrice >= item.promotions.touchPrice){
  647. item.totalPrice = prosPrice - item.promotions.reducedPrice
  648. item.reducedPrice = item.promotions.reducedPrice
  649. item.totalOriginalPrice = totalOriginalPrice
  650. }else{
  651. item.reducedPrice = 0 //统计合计价格
  652. item.totalPrice = prosPrice
  653. }
  654. }else{//以下为计算除店铺满减以外的单品满减以及正常商品合计
  655. let _totalPrice = 0;
  656. let _reducedPrice = 0;
  657. let _totalOriginalPrice =0;
  658. item.cartList.forEach(pros=>{
  659. let _price = pros.price*pros.number
  660. _totalOriginalPrice += pros.price*pros.number;
  661. if(pros.promotions && pros.promotions.type != 2 && pros.promotions.mode == 2){
  662. if(_price >= pros.promotions.touchPrice){
  663. _price = _price - pros.promotions.reducedPrice
  664. _reducedPrice += pros.promotions.reducedPrice
  665. }
  666. _totalPrice += _price
  667. }else{
  668. _reducedPrice = 0;
  669. _totalPrice += pros.price*pros.number;
  670. }
  671. })
  672. item.reducedPrice = _reducedPrice
  673. item.totalOriginalPrice = _totalOriginalPrice
  674. item.totalPrice = _totalPrice
  675. }
  676. })
  677. },
  678. totalPeice(){//计算总价格,每次调用此方法,将初始值为0,遍历价格并累加
  679. let totalPrice = 0;
  680. let reducedPrice = 0;
  681. let originalPrice = 0;
  682. this.goodsList.forEach((item,index)=>{
  683. let supplierPrice = 0;
  684. let supplierReducedPrice = 0;
  685. item.totalprice = 0;
  686. item.reducedprice = 0;
  687. item.originalprice = 0;
  688. item.cartList.forEach(pros=>{
  689. if(pros.productsChecked){
  690. supplierPrice += pros.price*pros.number;
  691. // 单品满减
  692. if(pros.promotions && pros.promotions.type*1===1 && pros.promotions.mode*1===2){
  693. // 单品满减-重新计算供应商总价/满减金额
  694. if(pros.price*pros.number >= pros.promotions.touchPrice){
  695. supplierPrice -= pros.promotions.reducedPrice;
  696. supplierReducedPrice += pros.promotions.reducedPrice;
  697. }
  698. }
  699. }
  700. })
  701. // 店铺满减
  702. if(item.promotions && item.promotions.mode*1===2){
  703. // 店铺满减-计算供应商总价/满减金额
  704. if(supplierPrice >= item.promotions.touchPrice){
  705. supplierPrice -= item.promotions.reducedPrice;
  706. supplierReducedPrice += item.promotions.reducedPrice;
  707. }
  708. }
  709. item.totalprice = supplierPrice;
  710. item.reducedprice = supplierReducedPrice;
  711. item.originalprice = (supplierPrice+supplierReducedPrice);
  712. totalPrice += item.totalprice;
  713. reducedPrice += item.reducedprice;
  714. originalPrice += item.originalprice;
  715. })
  716. //总促销计算
  717. this.promotionsList.forEach(promotions =>{
  718. // 凑单满减
  719. if(promotions.mode*1===2 && promotions.type*1===2){
  720. let total = 0;
  721. promotions.productList.forEach(pros=>{
  722. if (this.submitIds.includes(pros.productId*1)){
  723. total += pros.number * pros.price;
  724. }
  725. });
  726. if(total>=promotions.touchPrice){
  727. totalPrice -= promotions.reducedPrice;
  728. reducedPrice += promotions.reducedPrice;
  729. }
  730. }
  731. });
  732. //最后统计商品原价
  733. this.totalOriginalPrice = originalPrice;
  734. //最后满减金额 = 店铺减去金额 + 单品减去金额 + 凑单减去金额
  735. this.reducedPrice = reducedPrice;
  736. //最终合计价格 = 店铺满减合计 + 单品满减 + 正常合计 + 凑单满减
  737. this.allPrice = totalPrice ;
  738. },
  739. totalCount(){//计算总数量
  740. this.allCount = 0
  741. let prosAllCount=0
  742. let validCount = 0
  743. let validList =[];
  744. let productsList =[];
  745. this.goodsList.forEach(item=>{
  746. productsList = item.cartList
  747. productsList.forEach(pros=>{
  748. if(pros.productsChecked){
  749. prosAllCount+=parseInt(pros.number);
  750. this.allCount = prosAllCount
  751. }
  752. })
  753. })
  754. },
  755. changeCountAdd(item,pros){//商品数量加加
  756. if(pros.step === 2){
  757. pros.isStep = false
  758. pros.number += pros.min
  759. this.processActivityPrice(pros)
  760. this.isStock = false
  761. }else{
  762. pros.number++
  763. this.processActivityPrice(pros)
  764. this.isStock = false
  765. }
  766. this.updateShoppogNum(pros)
  767. this.totalShopPeice();
  768. },
  769. changeCountSub(item,pros){//商品数量减减
  770. if(pros.number<=pros.min){
  771. pros.number= pros.min
  772. this.$util.msg(`该商品最小起订量为${pros.min}`,2000);
  773. return
  774. }else{
  775. if(pros.step === 2){
  776. pros.isStep = false
  777. pros.number -= pros.min
  778. }else{
  779. pros.number--
  780. }
  781. this.processActivityPrice(pros)
  782. }
  783. this.updateShoppogNum(pros)
  784. this.totalShopPeice();
  785. },
  786. changeInput(pros){//输入商品数量更新
  787. pros.isStep = false
  788. },
  789. changeNnmber(e,item,pros){//输入商品数量更新
  790. let _value = Number(e.detail.value);
  791. if(!this.$api.isNumber(_value)){
  792. pros.number = pros.min
  793. }else if(_value < pros.min){
  794. this.$util.msg(`该商品最小起订量为${pros.min}`,2000);
  795. pros.number = pros.min
  796. }else if(_value % pros.min != 0){
  797. pros.isStep = true
  798. pros.number = pros.min
  799. }else{
  800. pros.isStep = false
  801. pros.number = e.detail.value
  802. this.processActivityPrice(pros)
  803. }
  804. this.updateShoppogNum(pros)
  805. this.totalShopPeice();
  806. },
  807. processActivityPrice(pros){//单独处理活动价格和阶梯价格
  808. let ladderPriceList = pros.ladderPrices;
  809. if(pros.ladderFlag == '0' || pros.actStatus == 1){
  810. pros.price = pros.price
  811. }else{
  812. ladderPriceList.forEach((item,index)=>{
  813. if(pros.number>=item.buyNum){
  814. pros.price = item.buyPrice
  815. }
  816. })
  817. }
  818. },
  819. updateShoppogNum(pros){//加减购物车商品更新到后台
  820. let params ={userID:this.userID,productID:pros.productId,productCount:pros.number}
  821. this.ProductService.ShoppingCartUpdate(params).then(response =>{
  822. this.isshowDelbtn = false;
  823. this.initGetCartGoodsList();
  824. }).catch(error =>{
  825. this.$util.msg(error.msg,2000);
  826. })
  827. },
  828. toConfirmation(){//跳转确认订单页面
  829. let setGoodsList=[];
  830. this.goodsList.forEach(res=>{
  831. let products = res.cartList
  832. products.forEach(pros=>{
  833. if(pros.productsChecked){
  834. setGoodsList.push(pros.productId)
  835. }
  836. })
  837. })
  838. if(setGoodsList == ''){
  839. this.$util.msg("请先选择结算商品~",2000);
  840. return
  841. }else{
  842. this.isNoConfim = false
  843. this.goodsList.forEach(el=>{
  844. el.cartList.forEach(pros=>{
  845. if(pros.productsChecked){
  846. if(pros.number<pros.min){
  847. this.isNoConfim = true
  848. }
  849. }
  850. })
  851. })
  852. if(this.isNoConfim){
  853. this.$util.modal('','有商品的购买量没达到最小起订量,请修改数量后再次提交结算','去修改','',false,() =>{})
  854. return;
  855. }
  856. let productID = '';
  857. this.goodsList.forEach(el=>{//获取勾选的商品ID拼接字符串逗号隔开,最后一个逗号去掉
  858. el.cartList.forEach(pros=>{
  859. if(pros.productsChecked){
  860. productID += pros.productId+','
  861. }
  862. })
  863. })
  864. let cartPramsData={
  865. allPrice:this.allPrice,
  866. allCount:this.allCount,
  867. productID:productID.substring(0,productID.lastIndexOf(',')),
  868. productCount:''
  869. }
  870. // 友盟埋点购物车去结算点击事件
  871. if(process.env.NODE_ENV != 'development'){
  872. this.$uma.trackEvent('Um_Event_shoppingCartConfirmOrder', {
  873. Um_Key_PageName: '去结算',
  874. Um_Key_SourcePage: '底部菜单购物车',
  875. })
  876. }
  877. this.$api.navigateTo(`/pages/user/order/create-order?data=${JSON.stringify({data:cartPramsData})}`)
  878. }
  879. },
  880. showDelManager(){//显示删除商品管理
  881. this.isshowDelbtn = true;
  882. if(this.isCheckAll) {
  883. this.updateBothCheckBtn();
  884. } else {
  885. this.goodsList.forEach(item => {
  886. if(item.checked) {
  887. item.cartList.forEach(pros => {
  888. pros.productsChecked = true;
  889. })
  890. }
  891. })
  892. this.updateCheckAllBtn();
  893. }
  894. // 失效也被勾选
  895. this.failureList.forEach(failureItem => {
  896. if(failureItem.isFailureLayer){
  897. failureItem.isFailureLayer = false
  898. }
  899. })
  900. },
  901. hideDelManage(){//隐藏删除商品管理
  902. this.isshowDelbtn = false;
  903. let isFailureLayer,newFailureList =[];
  904. if(this.isCheckAll) {
  905. this.updateBothCheckBtn();
  906. } else {
  907. // 失效商品取消勾选
  908. this.goodsList.forEach(item => {
  909. if(item.isDisabled) {
  910. item.checked = false;
  911. }
  912. item.cartList.forEach(pros => {
  913. if(pros.validFlag == 3) {
  914. pros.productsChecked = false;
  915. }
  916. })
  917. })
  918. this.updateCheckAllBtn();
  919. }
  920. this.failureList.forEach((failure,index) => {
  921. if(failure.failureState == 1 || failure.failureState == 2) {
  922. isFailureLayer = true
  923. }else{
  924. isFailureLayer = false
  925. }
  926. newFailureList.push(Object.assign({},failure,{isFailureLayer:isFailureLayer}))
  927. })
  928. this.failureList = newFailureList;
  929. },
  930. deleteList(){//删除购物车商品
  931. this.delGoodsList=[];
  932. this.goodsList.forEach(delitem=>{
  933. let products = delitem.cartList
  934. products.forEach(pros=>{
  935. if(pros.productsChecked){
  936. this.delGoodsList += pros.productId+','
  937. }
  938. })
  939. })
  940. this.failureList.forEach(failure=>{
  941. if(failure.productsChecked){
  942. this.delGoodsList += failure.productId+','
  943. }
  944. })
  945. if(this.delGoodsList.length == 0){
  946. this.$util.msg("请选择要删除的商品~",2000);
  947. return
  948. }else{
  949. this.$util.modal('','确定删除选中的商品吗?','确定','取消',true,() =>{
  950. this.ProductService.ShoppingCartDelete({userID:this.userID,productIDs:this.delGoodsList}).then(response =>{
  951. this.$util.msg('删除成功',2000);
  952. setTimeout(()=>{
  953. this.isshowDelbtn = false;
  954. this.initGetCartGoodsList();
  955. },2000)
  956. }).catch(error =>{
  957. this.$util.msg(error.msg,2000)
  958. })
  959. })
  960. }
  961. },
  962. deletefailureList(){
  963. this.failureList.forEach(failure=>{ this.delGoodsList += failure.productId+',' })
  964. this.$util.modal('','确定清空全部失效商品吗?','确定','取消',true,() =>{
  965. this.ProductService.ShoppingCartDelete({userID:this.userID,productIDs:this.delGoodsList}).then(response =>{
  966. this.$util.msg('删除成功',2000);
  967. setTimeout(()=>{
  968. this.isshowDelbtn = false;
  969. this.initGetCartGoodsList();
  970. },2000)
  971. }).catch(error =>{
  972. this.$util.msg(error.msg,2000)
  973. })
  974. })
  975. },
  976. goIndex(){
  977. uni.switchTab({
  978. url: '/pages/tabBar/home/index'
  979. });
  980. },
  981. goNavto(url){
  982. uni.navigateTo ({
  983. url
  984. })
  985. },
  986. navToListPage(id){
  987. this.isModallayer = true;
  988. this.$api.navigateTo(`/pages/goods/product?id=${id}`)
  989. },
  990. failureToProduct(failure){
  991. if(failure.status == 1){
  992. this.$util.msg('商品已丢失,不能查看',2000)
  993. return
  994. }else if(failure.status == 2){
  995. this.$util.msg('商品已停售,不能查看',2000)
  996. return
  997. }else{
  998. this.isModallayer = true;
  999. this.$api.navigateTo(`/pages/goods/product?id=${failure.productId}`)
  1000. }
  1001. },
  1002. failureStateText(state){
  1003. let stateText = '',
  1004. stateTextObject={
  1005. 1:'商品已丢失',
  1006. 2:'商品已停售',
  1007. 3:'商品已下架',
  1008. 4:'商品已售罄',
  1009. 5:'价格仅会员可见,您不能购买',
  1010. 6:'未公开价格',
  1011. 7:'库存不足'
  1012. }
  1013. Object.keys(stateTextObject).forEach(key => {
  1014. if(key == state){
  1015. stateText = stateTextObject[key]
  1016. }
  1017. })
  1018. return stateText;
  1019. },
  1020. setHeaderBtnPosi(){
  1021. // 获得胶囊按钮位置信息
  1022. let headerBtnPosi = uni.getMenuButtonBoundingClientRect();
  1023. return headerBtnPosi
  1024. },
  1025. setSysteminfo(){
  1026. let systeminfo;
  1027. uni.getSystemInfo({ // 获取设备信息
  1028. success: (res) => {
  1029. systeminfo = res
  1030. },
  1031. })
  1032. return systeminfo
  1033. },
  1034. PromotionsFormat(promo){//促销活动类型数据处理
  1035. if(promo!=null){
  1036. if(promo.type == 1 && promo.mode == 1){
  1037. return true
  1038. }else{
  1039. return false
  1040. }
  1041. }
  1042. return false
  1043. },
  1044. showPopup(index){// 显示popup弹窗
  1045. switch(index){
  1046. case 0:
  1047. this.popupShow0 = true
  1048. break;
  1049. case 1:
  1050. this.popupShow1 = true
  1051. break;
  1052. }
  1053. },
  1054. hidePopup(index){// 隐藏popup弹窗
  1055. switch(index){
  1056. case 0:
  1057. this.popupShow0 = false
  1058. break;
  1059. case 1:
  1060. this.popupShow1 = false
  1061. break;
  1062. }
  1063. },
  1064. couponChange(e) {
  1065. this.currentTab = e.index
  1066. console.log('currentTab',this.currentTab)
  1067. switch(this.currentTab){
  1068. case 0:
  1069. this.listClass = 'list-used'
  1070. break;
  1071. case 1:
  1072. this.listClass = 'list-none'
  1073. break;
  1074. case 2:
  1075. this.listClass = 'list-none'
  1076. break;
  1077. }
  1078. }
  1079. }
  1080. }
  1081. </script>
  1082. <style lang="scss">
  1083. page{
  1084. background: #f7f7f7;
  1085. height: auto;
  1086. }
  1087. .cart-content{
  1088. position: relative;
  1089. }
  1090. .container-cart-main.none{
  1091. display: none;
  1092. }
  1093. .container-cart-main.show{
  1094. display: block;
  1095. }
  1096. .cart-content.empty.none{
  1097. display: none;
  1098. }
  1099. .cart-content.empty.show{
  1100. display: block;
  1101. }
  1102. .container-cart.show{
  1103. display: block;
  1104. }
  1105. .container-cart.none{
  1106. display: none;
  1107. }
  1108. .empty-container.none{
  1109. display: none;
  1110. }
  1111. .empty-container.show{
  1112. display: flex;
  1113. }
  1114. .foot-check-delbtn{
  1115. width: 100%;
  1116. height: 80rpx;
  1117. position: fixed;
  1118. top: 0;
  1119. left: 0;
  1120. box-sizing: border-box;
  1121. padding: 15rpx 24rpx;
  1122. background-color: #F7F7F7;
  1123. z-index: 990;
  1124. .foot-text{
  1125. font-size: $font-size-26;
  1126. height: 50rpx;
  1127. line-height: 50rpx;
  1128. color:#666666;
  1129. float: left;
  1130. padding-left: 10rpx;
  1131. text{
  1132. margin: 0 6rpx;
  1133. }
  1134. }
  1135. .delBtn{
  1136. width: 100rpx;
  1137. display: inline-block;
  1138. padding: 0 15rpx;
  1139. font-size: $font-size-26;
  1140. height: 50rpx;
  1141. line-height: 50rpx;
  1142. border-radius: 30rpx;
  1143. background:#FFFFFF;
  1144. border: 1px solid #e15616;
  1145. color: #E15616;
  1146. float: right;
  1147. text-align: center;
  1148. &.none{
  1149. display: none;
  1150. }
  1151. }
  1152. }
  1153. .checkbox-box{
  1154. display: flex;
  1155. align-items: center;
  1156. .checkbox{
  1157. display: flex;
  1158. margin: 0;
  1159. padding: 5rpx;
  1160. display: flex;
  1161. flex-direction: column;
  1162. align-items: center;
  1163. box-sizing: border-box;
  1164. text-align: center;
  1165. text-decoration: none;
  1166. border-radius: 0;
  1167. -webkit-tap-highlight-color: transparent;
  1168. overflow: hidden;
  1169. background-color:#FFFFFF;
  1170. font-size: 36rpx;
  1171. color:#999999;
  1172. &.icon-yixuanze{
  1173. color: $color-system;
  1174. }
  1175. }
  1176. &.disabled{
  1177. .checkbox{
  1178. color:#999999
  1179. }
  1180. }
  1181. .text{
  1182. font-size: $font-size-24;
  1183. margin-left: 10rpx;
  1184. }
  1185. }
  1186. .goods-list{
  1187. width: 100%;
  1188. height: auto;
  1189. background-color: #F7F7F7;
  1190. .goods-item{
  1191. width: 702rpx;
  1192. padding: 0 24rpx;
  1193. background: #FFFFFF;
  1194. margin-bottom: 24rpx;
  1195. }
  1196. .shoptitle{
  1197. height: 80rpx;
  1198. line-height: 80rpx;
  1199. .checkbox-box{
  1200. float: left;
  1201. height: 80rpx;
  1202. line-height: 80rpx;
  1203. display: inline-block;
  1204. box-sizing: border-box;
  1205. margin-left: 10rpx;
  1206. }
  1207. .text{
  1208. width: 400rpx;
  1209. float: left;
  1210. display: block;
  1211. overflow: hidden;
  1212. text-overflow:ellipsis;
  1213. white-space: nowrap;
  1214. line-height: 80rpx;
  1215. margin-left: 20rpx;
  1216. font-size: $font-size-28;
  1217. color: $text-color;
  1218. text-align: left;
  1219. font-weight: bold;
  1220. }
  1221. .text-coupon{
  1222. float: right;
  1223. line-height: 80rpx;
  1224. font-size: $font-size-30;
  1225. color: #e15616;
  1226. }
  1227. .floor-item-act{
  1228. width: 120rpx;
  1229. height: 80rpx;
  1230. text-align: center;
  1231. box-sizing: border-box;
  1232. float: left;
  1233. padding: 24rpx 0;
  1234. margin-left: 20rpx;
  1235. .floor-tags{
  1236. height: 28rpx;
  1237. border-radius: 6rpx;
  1238. background-color: #FFFFFF;
  1239. line-height: 28rpx;
  1240. color: $color-system;
  1241. text-align: center;
  1242. display: inline-block;
  1243. padding:0 16rpx;
  1244. font-size: $font-size-20;
  1245. border: 1px solid #E15616;
  1246. float: right;
  1247. }
  1248. }
  1249. }
  1250. .goods-pros{
  1251. width: 100%;
  1252. height: auto;
  1253. margin-bottom: 20rpx;
  1254. }
  1255. .goods-pros-t{
  1256. display: flex;
  1257. align-items: center;
  1258. width: 100%;
  1259. height: 210rpx;
  1260. padding:0 0 26rpx 0;
  1261. .checkbox-box{
  1262. padding: 10rpx;
  1263. }
  1264. .pros-img{
  1265. width: 210rpx;
  1266. height: 100%;
  1267. border-radius: 10rpx;
  1268. margin:0 20rpx;
  1269. border:1px solid #f3f3f3;
  1270. image{
  1271. width: 100%;
  1272. height: 100%;
  1273. border-radius: 10rpx;
  1274. }
  1275. }
  1276. }
  1277. .goods-pros-b{
  1278. width:100%;
  1279. height: auto;
  1280. padding:0 0 24rpx 0;
  1281. box-sizing: border-box;
  1282. &.show{
  1283. display: block;
  1284. }
  1285. &.none{
  1286. display: none;
  1287. }
  1288. .sum-none{
  1289. width: 100%;
  1290. height: 48rpx;
  1291. line-height: 48rpx;
  1292. color: $text-color;
  1293. float: left;
  1294. text-align: right;
  1295. .money{
  1296. font-size: $font-size-26;
  1297. color: #999999;
  1298. text-decoration: line-through;
  1299. }
  1300. .money-sign{
  1301. font-size: $font-size-26;
  1302. color: #999999;
  1303. text-decoration: line-through;
  1304. }
  1305. .money-reduced{
  1306. margin-left: 10rpx;
  1307. font-size: $font-size-26;
  1308. color: $color-system;
  1309. .iconfont{
  1310. font-size: $font-size-34;
  1311. }
  1312. }
  1313. }
  1314. .sum{
  1315. width: 100%;
  1316. height: 40rpx;
  1317. font-size: $font-size-26;
  1318. line-height: 40rpx;
  1319. color: $text-color;
  1320. float: left;
  1321. display: flex;
  1322. justify-content: flex-end;
  1323. font-weight: bold;
  1324. .money{
  1325. color: #FF2A2A;
  1326. font-size: $font-size-26;
  1327. }
  1328. .money-sign{
  1329. font-size: $font-size-24;
  1330. color: #FF2A2A;
  1331. }
  1332. }
  1333. }
  1334. .pros-product{
  1335. width: 416rpx;
  1336. height: 100%;
  1337. line-height: 36rpx;
  1338. font-size: $font-size-28;
  1339. position: relative;
  1340. .producttitle{
  1341. width: 100%;
  1342. display: inline-block;
  1343. height: auto;
  1344. text-overflow:ellipsis;
  1345. display: -webkit-box;
  1346. word-break: break-all;
  1347. -webkit-box-orient: vertical;
  1348. -webkit-line-clamp: 2;
  1349. overflow: hidden;
  1350. margin-bottom: 15rpx;
  1351. .no-text{
  1352. display: inline-block;
  1353. height:36rpx;
  1354. padding: 0 12rpx;
  1355. line-height: 36rpx;
  1356. background:linear-gradient(315deg,rgba(231,0,0,1) 0%,rgba(255,104,1,1) 100%);
  1357. border-radius:18rpx;
  1358. text-align: center;
  1359. color: #FFFFFF;
  1360. font-size:$font-size-28;
  1361. margin-right: 24rpx;
  1362. }
  1363. }
  1364. .productspec{
  1365. height: 36rpx;
  1366. color: #999999;
  1367. font-size: $font-size-26;
  1368. }
  1369. .productprice{
  1370. width: 100%;
  1371. height: 48rpx;
  1372. margin: 30rpx 0 0 0;
  1373. .price{
  1374. line-height: 48rpx;
  1375. font-size: $font-size-26;
  1376. width: 48%;
  1377. color: #FF2A2A;
  1378. float: left;
  1379. font-weight: bold;
  1380. &.disabled{
  1381. color: #999999;
  1382. text-decoration: line-through;
  1383. }
  1384. .money-sign{
  1385. font-size: $font-size-24;
  1386. color: #FF2A2A;
  1387. }
  1388. }
  1389. .count{
  1390. height: 100%;
  1391. float: right;
  1392. position: relative;
  1393. &.show{
  1394. display: block;
  1395. }
  1396. &.none{
  1397. display: none;
  1398. }
  1399. .count-tips{
  1400. width: auto;
  1401. display: inline-block;
  1402. padding: 0 15rpx;
  1403. line-height: 44rpx;
  1404. height: 44rpx;
  1405. border-radius: 22rpx;
  1406. background: $btn-confirm;
  1407. font-size: $font-size-24;
  1408. text-align: center;
  1409. color: #FFFFFF;
  1410. position: absolute;
  1411. top:-60rpx;
  1412. left: -5rpx;
  1413. z-index: 5;
  1414. &.step{
  1415. left:-217rpx
  1416. }
  1417. &::before{
  1418. content: "";
  1419. position: absolute;
  1420. bottom: -30rpx;
  1421. right: 15rpx;
  1422. z-index:1;
  1423. width: 0;
  1424. height: 0;
  1425. border-width: 18rpx;
  1426. border-style: solid;
  1427. border-color:$color-system transparent transparent transparent;
  1428. }
  1429. }
  1430. .number-box{
  1431. display: flex;
  1432. justify-content: center;
  1433. align-items: center;
  1434. border: 2rpx solid #ffe6dc;
  1435. border-radius: 30rpx;
  1436. .iconfont{
  1437. font-size: $font-size-24;
  1438. padding:0 18rpx;
  1439. color: #999999;
  1440. text-align: center;
  1441. line-height: 48rpx;
  1442. font-weight: bold;
  1443. background: #fef6f3;
  1444. &.icon-jianhao{
  1445. border-radius: 30rpx 0 0 30rpx;
  1446. }
  1447. &.icon-jiahao{
  1448. border-radius: 0 30rpx 30rpx 0;
  1449. }
  1450. }
  1451. .btn-input{
  1452. width: 62rpx;
  1453. height: 48rpx;
  1454. line-height: 48rpx;
  1455. background: #fff;
  1456. border-radius: 4rpx;
  1457. text-align: center;
  1458. font-size: $font-size-24;
  1459. }
  1460. }
  1461. .uni-numbox{
  1462. position: absolute;
  1463. left: 45rpx;
  1464. bottom: 0;
  1465. .uni-numbox-minus, .uni-numbox-plus{
  1466. width: 50rpx;
  1467. line-height: 40rpx;
  1468. }
  1469. .uni-numbox-value {
  1470. font-size: $font-size-28;
  1471. width: 60rpx;
  1472. }
  1473. }
  1474. }
  1475. }
  1476. .floor-item-act{
  1477. width: 100%;
  1478. height: 56rpx;
  1479. text-align: center;
  1480. box-sizing: border-box;
  1481. float: left;
  1482. padding:0 0 10rpx 0;
  1483. margin-left: 10rpx;
  1484. .floor-tags{
  1485. height: 28rpx;
  1486. border-radius: 6rpx;
  1487. background-color: #FFFFFF;
  1488. line-height: 28rpx;
  1489. color: $color-system;
  1490. text-align: center;
  1491. display: inline-block;
  1492. padding:0 16rpx;
  1493. font-size: $font-size-20;
  1494. border: 1px solid #E15616;
  1495. float: left;
  1496. }
  1497. }
  1498. }
  1499. }
  1500. .failure-list{
  1501. width: 702rpx;
  1502. height: auto;
  1503. padding: 0 24rpx;
  1504. margin-top: 20rpx;
  1505. background: #FFFFFF;
  1506. .failure-title{
  1507. width: 100%;
  1508. height: 82rpx;
  1509. line-height: 82rpx;
  1510. font-size: $font-size-28;
  1511. border-bottom: 1px solid #EBEBEB;
  1512. .title-txt{
  1513. float: left;
  1514. color:#666666;
  1515. text-align: left;
  1516. }
  1517. .title-btn{
  1518. float: right;
  1519. color: $color-system;
  1520. text-align: right;
  1521. line-height: 80rpx;
  1522. .butto{
  1523. display: inline-block;
  1524. padding: 0 15rpx;
  1525. font-size: $font-size-26;
  1526. height: 50rpx;
  1527. line-height: 50rpx;
  1528. border-radius: 30rpx;
  1529. background:#FFFFFF;
  1530. // border: 1px solid #C9C9C9;
  1531. // color: #999999;
  1532. margin-top: 15rpx;
  1533. }
  1534. }
  1535. }
  1536. .productlist{
  1537. padding-top: 10rpx;
  1538. .goods-pros{
  1539. width: 100%;
  1540. height: auto;
  1541. padding: 20rpx 0;
  1542. }
  1543. .goods-pros-t{
  1544. display: flex;
  1545. align-items: center;
  1546. width: 100%;
  1547. height: 210rpx;
  1548. position: relative;
  1549. .img-tip{
  1550. display: block;
  1551. width: 72rpx;
  1552. height: 36rpx;
  1553. line-height: 36rpx;
  1554. font-size: $font-size-24;
  1555. text-align: center;
  1556. color: #FFFFFF;
  1557. border-radius: 24rpx;
  1558. background:rgba(51,51,51,0.3);
  1559. // position: absolute;
  1560. // left: 0;
  1561. // top: 0;
  1562. }
  1563. .checkbox-box{
  1564. padding: 10rpx;
  1565. }
  1566. .pros-img{
  1567. width: 180rpx;
  1568. height: 100%;
  1569. border-radius: 10rpx;
  1570. margin:0 20rpx;
  1571. border:1px solid #f3f3f3;
  1572. position: relative;
  1573. image{
  1574. width: 100%;
  1575. height: 100%;
  1576. border-radius: 10rpx;
  1577. }
  1578. }
  1579. .pros-marks{
  1580. width: 730rpx; height: 250rpx;
  1581. z-index: 90;
  1582. background: rgba(0,0,0,.05);
  1583. position: absolute;
  1584. left:-20rpx;
  1585. top: -20rpx;
  1586. }
  1587. }
  1588. .goods-pros-b{
  1589. width:622rpx;
  1590. margin-left: 84rpx;
  1591. height: 40rpx;
  1592. padding:0 0 26rpx 0;
  1593. // border-top: 1px solid #EBEBEB;
  1594. &.show{
  1595. display: block;
  1596. }
  1597. &.none{
  1598. display: none;
  1599. }
  1600. .sum{
  1601. font-size: $font-size-28;
  1602. line-height: 40rpx;
  1603. color: $text-color;
  1604. display: flex;
  1605. justify-content: flex-end;
  1606. .money{
  1607. color: #FF2A2A;
  1608. font-size: $font-size-28;
  1609. }
  1610. .money-sign{
  1611. font-size: $font-size-24;
  1612. color: #FF2A2A;
  1613. }
  1614. }
  1615. }
  1616. .pros-product{
  1617. width: 402rpx;
  1618. height: 100%;
  1619. line-height: 36rpx;
  1620. font-size: $font-size-28;
  1621. position: relative;
  1622. .producttitle{
  1623. width: 100%;
  1624. display: inline-block;
  1625. height: auto;
  1626. text-overflow:ellipsis;
  1627. display: -webkit-box;
  1628. word-break: break-all;
  1629. -webkit-box-orient: vertical;
  1630. -webkit-line-clamp: 2;
  1631. overflow: hidden;
  1632. margin-bottom: 8rpx;
  1633. .no-text{
  1634. display: inline-block;
  1635. height:36rpx;
  1636. padding: 0 12rpx;
  1637. line-height: 36rpx;
  1638. background:linear-gradient(315deg,rgba(231,0,0,1) 0%,rgba(255,104,1,1) 100%);
  1639. border-radius:18rpx;
  1640. text-align: center;
  1641. color: #FFFFFF;
  1642. font-size: $font-size-28;
  1643. margin-right: 24rpx;
  1644. }
  1645. }
  1646. .productspec{
  1647. height: 36rpx;
  1648. color: #999999;
  1649. font-size: $font-size-26;
  1650. margin-top: 20rpx;
  1651. }
  1652. .productstate{
  1653. font-size: $font-size-28;
  1654. height: 44rpx;
  1655. color: #FF2A2A;
  1656. position: absolute;
  1657. bottom: 0;
  1658. left: 0;
  1659. }
  1660. }
  1661. }
  1662. }
  1663. .tui-popup-box {
  1664. position: relative;
  1665. box-sizing: border-box;
  1666. min-height: 220rpx;
  1667. padding:24rpx 24rpx 0 24rpx;
  1668. .tui-popup-close{
  1669. width: 90rpx;
  1670. height: 90rpx;
  1671. position: absolute;
  1672. right: 0;
  1673. top: 24rpx;
  1674. line-height: 90rpx;
  1675. text-align: center;
  1676. color: #b2b2b2;
  1677. .icon-iconfontguanbi{
  1678. font-size: $font-size-40;
  1679. }
  1680. }
  1681. .title{
  1682. font-size: $font-size-34;
  1683. color: $text-color;
  1684. line-height: 88rpx;
  1685. text-align: center;
  1686. float: left;
  1687. width: 100%;
  1688. height: 88rpx;
  1689. font-weight: bold;
  1690. }
  1691. .tui-popup-main{
  1692. width: 100%;
  1693. float: left;
  1694. &.coupon{
  1695. padding-bottom: 40rpx;
  1696. }
  1697. .tui-popup-scroll{
  1698. width: 100%;
  1699. height: 600rpx;
  1700. .coupon-list{
  1701. width: 100%;
  1702. height: 200rpx;
  1703. margin-top: 24rpx;
  1704. box-sizing: border-box;
  1705. background: url(https://static.caimei365.com/app/img/icon/icon-coupon-uesb@2x.png);
  1706. background-size: cover;
  1707. &:last-child{
  1708. margin-bottom: 24rpx;
  1709. }
  1710. .list-cell-le{
  1711. width: 224rpx;
  1712. height: 100%;
  1713. box-sizing: border-box;
  1714. padding: 37rpx 0;
  1715. float: left;
  1716. .coupon-maxMoney{
  1717. width: 100%;
  1718. height: 78rpx;
  1719. line-height: 78rpx;
  1720. font-size: 56rpx;
  1721. color: #FFFFFF;
  1722. text-align: center;
  1723. .small{
  1724. font-size: $font-size-24;
  1725. }
  1726. }
  1727. .coupon-minMoney{
  1728. width: 100%;
  1729. height: 33rpx;
  1730. line-height: 33rpx;
  1731. font-size: $font-size-24;
  1732. color: #FFFFFF;
  1733. text-align: center;
  1734. }
  1735. }
  1736. .list-cell-ri{
  1737. width: 478rpx;
  1738. height: 100%;
  1739. box-sizing: border-box;
  1740. padding: 20rpx 24rpx 0 24rpx;
  1741. float: right;
  1742. .list-cell-top{
  1743. width: 100%;
  1744. height: 121rpx;
  1745. float: left;
  1746. border-bottom: 1px solid #e1e1e1;
  1747. .list-cell-type{
  1748. width: 286rpx;
  1749. height: 100%;
  1750. float: left;
  1751. .list-cell-tags{
  1752. width: 100%;
  1753. height: 32rpx;
  1754. margin-bottom: 7rpx;
  1755. .tags{
  1756. display: inline-block;
  1757. padding: 0 10rpx;
  1758. height: 32rpx;
  1759. line-height: 32rpx;
  1760. background-color: #ffdcce;
  1761. color: #f94b4b;
  1762. font-size: $font-size-20;
  1763. border-radius: 8rpx;
  1764. text-align: center;
  1765. float: left;
  1766. }
  1767. }
  1768. .list-cell-texts{
  1769. width: 100%;
  1770. height: auto;
  1771. line-height:35rpx;
  1772. text-overflow:ellipsis;
  1773. display: -webkit-box;
  1774. word-break: break-all;
  1775. -webkit-box-orient: vertical;
  1776. -webkit-line-clamp: 2;
  1777. overflow: hidden;
  1778. font-size: 26rpx;
  1779. color: #333333;
  1780. }
  1781. }
  1782. .list-cell-btn{
  1783. width: 128rpx;
  1784. height: 100%;
  1785. float: right;
  1786. .icon-used{
  1787. width: 100%;
  1788. height: 100%;
  1789. box-sizing: border-box;
  1790. padding-top: 57rpx;
  1791. .icon-used-btn{
  1792. width: 128rpx;
  1793. height: 48rpx;
  1794. border-radius: 28rpx;
  1795. line-height: 48rpx;
  1796. font-size: $font-size-26;
  1797. text-align: center;
  1798. &.receive{
  1799. background-image: linear-gradient(270deg, #f94b4b 0%, #feb673 100%);;
  1800. color: #FFFFFF;
  1801. }
  1802. &.make{
  1803. border: solid 1px #f94b4b;
  1804. color: #f94b4b;
  1805. }
  1806. }
  1807. }
  1808. }
  1809. }
  1810. .list-cell-time{
  1811. width: 100%;
  1812. height: 58rpx;
  1813. line-height: 58rpx;
  1814. text-align: left;
  1815. font-size: $font-size-20;
  1816. color: #999999;
  1817. }
  1818. }
  1819. }
  1820. }
  1821. .tui-popup-coupon{
  1822. width: 100%;
  1823. height: 500rpx;
  1824. box-sizing: border-box;
  1825. padding:30rpx 20rpx;
  1826. .tui-popup-h1{
  1827. width: 100%;
  1828. height: 66rpx;
  1829. display: flex;
  1830. align-items: center;
  1831. .tui-popup-text{
  1832. flex: 1;
  1833. height: 66rpx;
  1834. line-height: 66rpx;
  1835. font-size: $font-size-30;
  1836. color: #333333;
  1837. &.red{
  1838. color: #f94b4b;
  1839. }
  1840. &.bold{
  1841. font-weight: bold;
  1842. }
  1843. &.left{
  1844. text-align: left;
  1845. }
  1846. &.right{
  1847. text-align: right;
  1848. }
  1849. }
  1850. }
  1851. }
  1852. }
  1853. }
  1854. .footer{
  1855. width: 100%;
  1856. background-color: #FFFFFF;
  1857. height: 110rpx;
  1858. position: fixed;
  1859. bottom: 0rpx;
  1860. z-index: 990;
  1861. .footer-le{
  1862. width: 520rpx;
  1863. height: 100%;
  1864. padding-left: 24rpx;
  1865. float: left;
  1866. box-sizing: border-box;
  1867. .foot-check{
  1868. width: 100rpx;
  1869. float: left;
  1870. line-height: 110rpx;
  1871. font-size: $font-size-24;
  1872. .checkbox{
  1873. width: 40rpx;
  1874. text-align: center;
  1875. }
  1876. .text{
  1877. width: 60rpx;
  1878. float: right;
  1879. }
  1880. }
  1881. .sum{
  1882. width: 360rpx;
  1883. height: 110rpx;
  1884. float: right;
  1885. box-sizing: border-box;
  1886. padding: 10rpx;
  1887. .sum-none{
  1888. width: 100%;
  1889. height: 45rpx;
  1890. line-height: 45rpx;
  1891. color: $text-color;
  1892. float: left;
  1893. text-align: left;
  1894. .money{
  1895. font-size: $font-size-24;
  1896. color: #999999;
  1897. text-decoration: line-through;
  1898. }
  1899. .money-sign{
  1900. font-size: $font-size-24;
  1901. color: #999999;
  1902. text-decoration: line-through;
  1903. }
  1904. .money-reduced{
  1905. margin-left: 10rpx;
  1906. font-size: $font-size-24;
  1907. color: #FF2A2A;
  1908. }
  1909. .money-popup{
  1910. height: 45rpx;
  1911. line-height: 45rpx;
  1912. display: inline-block;
  1913. float: right;
  1914. font-size: $font-size-24;
  1915. color: #FF2A2A;
  1916. .icon-xiangshangjiantou{
  1917. font-size: $font-size-30;
  1918. margin-left: 5rpx;
  1919. }
  1920. }
  1921. }
  1922. .sum-price{
  1923. width: 100%;
  1924. height: 45rpx;
  1925. line-height: 45rpx;
  1926. font-size: $font-size-30;
  1927. color: $text-color;
  1928. float: left;
  1929. font-weight: normal;
  1930. text-align: left;
  1931. &.none{
  1932. height: 90rpx;
  1933. line-height: 90rpx;
  1934. }
  1935. .money{
  1936. color: #FF2A2A;
  1937. }
  1938. .money-sign{
  1939. font-size: $font-size-24;
  1940. color: #FF2A2A;
  1941. }
  1942. }
  1943. }
  1944. }
  1945. .footer-ri{
  1946. width: 230rpx;
  1947. height: 100%;
  1948. float: right;
  1949. display: flex;
  1950. justify-content: space-between;
  1951. align-items: center;
  1952. z-index: 999;
  1953. box-sizing: border-box;
  1954. padding: 13rpx 15rpx 13rpx 5rpx;
  1955. &.none{
  1956. display: none;
  1957. }
  1958. .btn{
  1959. width: 200rpx;
  1960. height: 100%;
  1961. background:linear-gradient(135deg,rgba(242,143,49,1) 0%,rgba(225,86,22,1) 100%);
  1962. font-size: $font-size-28;
  1963. line-height: 84rpx;
  1964. color: #FFFFFF;
  1965. display: flex;
  1966. border-radius: 42rpx;
  1967. justify-content: center;
  1968. align-items: center;
  1969. }
  1970. }
  1971. .footer-del{
  1972. width: 400rpx;
  1973. height: 110rpx;
  1974. position: absolute;
  1975. padding-left: 200rpx;
  1976. background: #FFFFFF;
  1977. right: 0;
  1978. top: 0;
  1979. z-index: 1000;
  1980. &.show{
  1981. animation: showDelbtn 0s linear both;
  1982. }
  1983. &.none{
  1984. animation: hideDelbtn 0s linear both;
  1985. }
  1986. .btn{
  1987. width: 50%;
  1988. height: 100%;
  1989. line-height: 110rpx;
  1990. font-size: $font-size-28;
  1991. color: #FFFFFF;
  1992. text-align: center;
  1993. float: left;
  1994. }
  1995. .btn.btn-cancel{
  1996. background:#EEC1AB;
  1997. }
  1998. .btn.btn-confirm{
  1999. background:#FF2A2A;
  2000. }
  2001. @keyframes showDelbtn {
  2002. 0% {
  2003. transform: translateX(0);
  2004. }
  2005. 100% {
  2006. transform: translateX(-100%);
  2007. }
  2008. }
  2009. @keyframes hideDelbtn {
  2010. 0% {
  2011. transform: translateX(-100%);
  2012. }
  2013. 100% {
  2014. transform: translateX(0);
  2015. }
  2016. }
  2017. }
  2018. }
  2019. </style>