index.vue 56 KB

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