product.vue 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413
  1. <template>
  2. <view class="container" id="productPage">
  3. <hx-navbar
  4. :fixed="true"
  5. :color="['#ffffff','#888888']"
  6. barPlaceholder="hidden"
  7. transparent="auto"
  8. :back="false"
  9. :rightSlot="false"
  10. :background-color="[255,255,255]"
  11. :pageScroll.sync="pageScroll">
  12. <block slot="left">
  13. <view class="ring" style="margin-left: 6px;font-weight: bold;" :style="showRing ? '' : 'background-color:#ffffff'" @click="backPage">
  14. <i class="hxicon-unfold"></i>
  15. </view>
  16. </block>
  17. <view class="ctn">
  18. <view class="tabs-box" style="background: none; width: auto;" :style="!showRing ? '' : 'display:none;'">
  19. <view class="" style="width: 210px;height: 100%;">
  20. <view class="hx-tabs">
  21. <view class="hx-tabs-item" v-for="(item,i) in tabs" :key="i" :class="{'hx-tabs-active': swiperCurrent == i}" @click="swiperChange(i,item.id)" >
  22. <text>{{item.name}}</text>
  23. </view>
  24. <view class="hx-tabs-slider-box" :style="{left:swiperCurrentSliderLeft + 'px'}">
  25. <view class="hx-tabs-slider"></view>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. <view class="leftBox">
  31. <view class="ring" :style="showRing ? '' : 'background-color:#ffffff'">
  32. <i class="hxicon-cart_fill_light"></i>
  33. </view>
  34. <view class="ring" :style="showRing ? '' : 'background-color:#ffffff'" @click="share">
  35. <i class="hxicon-more"></i>
  36. </view>
  37. </view>
  38. <view class="jrNull"></view>
  39. </view>
  40. </hx-navbar>
  41. <!-- 滑动图片 -->
  42. <view class="carousel">
  43. <swiper indicator-dots circular=true duration="400">
  44. <swiper-item class="swiper-item" v-for="(item,index) in goodsInfoData.banner_img" :key="index" @click="previewImg(item,goodsInfoData.banner_img)">
  45. <view class="image-wrapper">
  46. <image
  47. :src="item"
  48. class="loaded"
  49. mode="aspectFill"
  50. ></image>
  51. </view>
  52. </swiper-item>
  53. </swiper>
  54. </view>
  55. <!-- 只需要绑定购物车位置即可 -->
  56. <flyInCart ref="inCart" :cartBasketRect="cartBasketRect"></flyInCart>
  57. <view class="container-box introduce-section" >
  58. <text class="title">{{ goodsInfoData.name }}</text>
  59. <view class="tag-box">
  60. <block v-for="(item,i) in goodsInfoData.goods_tag" :key="i">
  61. <text class="tag-item" >{{item}}</text>
  62. </block>
  63. <!-- <text class="tag-item">香辣</text>
  64. <text class="tag-item">好吃</text> -->
  65. </view>
  66. <view class="bot-row">
  67. <text>月售{{ goodsInfoData.monthly_sales ? goodsInfoData.monthly_sales : 0 }}</text>
  68. <!-- <text>库存: 4690</text>
  69. <text>浏览量: 768</text> -->
  70. </view>
  71. </view>
  72. <view class="container-box shopping-cart" :class="{'barBorder':showBorder}">
  73. <view class="price-box" >
  74. <text class="price-tip">¥</text>
  75. <text class="price">{{ goodsInfoData.price }}</text>
  76. <block v-if="goodsInfoData.oldprice != 0 && goodsInfoData.oldprice > goodsInfoData.price">
  77. <text class="m-price" >¥{{ goodsInfoData.oldprice }}</text>
  78. <text class="coupon-tip" >{{(goodsInfoData.price/goodsInfoData.oldprice * 10).toFixed(1)}}折</text>
  79. </block>
  80. </view>
  81. <block v-if="goodsInfoData.form">
  82. <view class="add-btn" @click="showForm(goodsInfoData)">
  83. <i class="hxicon-add" id="eleAdd"></i>
  84. <text>选规格</text>
  85. <!-- #ifdef APP-PLUS || H5 -->
  86. <view class="num" v-if="getCartGoodsNum(currentGoodsData)">{{getCartGoodsNum(currentGoodsData)}}</view>
  87. <!-- #endif -->
  88. </view>
  89. </block>
  90. <block v-else>
  91. <block v-if="!currentGoodsData.number">
  92. <view class="add-btn" @click="formFirstAddGoods()">
  93. <i class="hxicon-add" id="eleAdd"></i>
  94. <text>加入购物车</text>
  95. </view>
  96. </block>
  97. <block v-else>
  98. <view class="btn-box">
  99. <view id="eleAdd" class="addEle_gg jumpPosition"></view>
  100. <hx-number-box @change="formAddGoodsChange" :value="currentGoodsData.number" :rowData="currentGoodsData" :clickTime="animaTime" @addChange="touchOnAddGoods('#eleAdd',currentGoodsData)"></hx-number-box>
  101. </view>
  102. </block>
  103. </block>
  104. </view>
  105. <view class="line-weight"></view>
  106. <!-- 分享 -->
  107. <view class="share-section" @click="share">
  108. <view class="share-icon">
  109. <text class="hxicon-favor_fill_light"></text>返
  110. </view>
  111. <text class="tit">该商品分享可领49减10红包</text>
  112. <text class="hxicon-mark"></text>
  113. <view class="share-btn">
  114. 立即分享
  115. <text class="hxicon-right"></text>
  116. </view>
  117. </view>
  118. <!-- <view class="c-list">
  119. <view class="c-row b-b" @click="toggleSpec">
  120. <text class="tit">购买类型</text>
  121. <view class="con">
  122. <text class="selected-text" v-for="(sItem, sIndex) in specSelected" :key="sIndex">
  123. {{sItem.name}}
  124. </text>
  125. </view>
  126. <text class="hxicon-right"></text>
  127. </view>
  128. </view>
  129. <view class="line-weight"></view> -->
  130. <!-- 详情 -->
  131. <view class="container-box">
  132. <view class="tabs-box" >
  133. <view class="" style="width: 210px;height: 100%;">
  134. <view class="hx-tabs">
  135. <view class="hx-tabs-item" v-for="(item,i) in tabs" :key="i" :class="{'hx-tabs-active': swiperCurrent == i}" @click="swiperChange(i,item.id)" >
  136. <text>{{item.name}}</text>
  137. </view>
  138. <view class="hx-tabs-slider-box" :style="{left:swiperCurrentSliderLeft + 'px'}">
  139. <view class="hx-tabs-slider"></view>
  140. </view>
  141. </view>
  142. </view>
  143. </view>
  144. <view class="info-box" id="detail">
  145. <view class="info-item" v-for="(item,i) in goodsInfoData.detail" :key="i">
  146. <text class="left">{{item.tit}}:</text>
  147. <text class="right">{{item.txt}}</text>
  148. </view>
  149. </view>
  150. </view>
  151. <view class="line-weight"></view>
  152. <!-- 评价 -->
  153. <view class="container-box eva-section" id="eva">
  154. <view class="e-header">
  155. <text class="tit">评价</text>
  156. <text class="hpd" v-if="goodsEvaData.praise/goodsEvaData.sum * 100 > 0">({{Math.round(goodsEvaData.praise/goodsEvaData.sum * 100)}}%好评度)</text>
  157. <text class="tip">{{goodsEvaData.sum ? goodsEvaData.sum : 0}}条评论</text>
  158. <text class="hxicon-right"></text>
  159. </view>
  160. <view class="eva-tag-box" v-if="goodsEvaData.eva_tag">
  161. <!-- 标签自定义 ;“有图 ,赞,踩” 三种标签一般评价都有-->
  162. <view class="tag-item" v-if="goodsEvaData.eva_tag.exist_pic > 0">有图 <text class="num">{{goodsEvaData.eva_tag.exist_pic}}</text></view>
  163. <view class="tag-item" v-if="goodsEvaData.eva_tag.appreciate > 0"><i class="hxicon-appreciate_fill_light"></i> <text class="num">{{goodsEvaData.eva_tag.appreciate}}</text></view>
  164. <view class="tag-item tread-bg" v-if="goodsEvaData.eva_tag.oppose > 0"><i class="hxicon-oppose_fill_light tread"></i> <text class="num">{{goodsEvaData.eva_tag.oppose}}</text></view>
  165. <view class="tag-item" v-for="(item,i) in goodsEvaData.eva_tag.other" :key="i">{{item}}</view>
  166. </view>
  167. <!-- 最好不要超过两条评价 -->
  168. <view class="eva-box" v-for="(item, i) in goodsEvaData.eva_list" :key="i">
  169. <image class="portrait" :src="item.avatar" mode="aspectFill"></image>
  170. <view class="right">
  171. <view class="bot">
  172. <text class="attr">{{item.name}}</text>
  173. <text class="time">{{item.time}}</text>
  174. </view>
  175. <view class="praise-box" v-if="item.point == 1">
  176. <i class="hxicon-appreciate_fill_light" ></i>
  177. <text class="praise-txt">攒了该商品</text>
  178. </view>
  179. <view class="praise-box" v-else-if="item.point == 2">
  180. <i class="hxicon-oppose_fill_light " :class="{tread:true}"></i>
  181. <text class="praise-txt">踩了该商品</text>
  182. </view>
  183. <text class="con">{{item.content}}</text>
  184. <view class="imgs" v-if="item.pic">
  185. <block v-for="(imgurl, index) in item.pic" :key="index">
  186. <view class="imgs-box"><image :src="imgurl" mode="widthFix" style="width: 100%;" @click="previewImg(imgurl,item.pic)"></image></view>
  187. </block>
  188. </view>
  189. </view>
  190. </view>
  191. <view class="eva-btn">
  192. <view class="avatar-box">
  193. <view class="avatar-item" v-for="(item, i) in goodsEvaData.eva_list" :key="i">
  194. <image :src="item.avatar" mode=""></image>
  195. </view>
  196. <view class="avatar-item">
  197. <i class="hxicon-more"></i>
  198. </view>
  199. </view>
  200. <text>{{goodsEvaData.sum}}条评价</text>
  201. <i class="hxicon-right"></i>
  202. </view>
  203. </view>
  204. <view class="line-weight"></view>
  205. <view class="detail-desc" id="coll">
  206. <view class="d-header">
  207. <text>图文详情</text>
  208. </view>
  209. <rich-text :nodes="goodsInfoData.desc"></rich-text>
  210. </view>
  211. <!-- 底部操作菜单 -->
  212. <!-- <view class="page-bottom">
  213. <navigator url="/pages/index/index" open-type="switchTab" class="p-b-btn">
  214. <text class="hxicon-home_fill_light"></text>
  215. <text>首页</text>
  216. </navigator>
  217. <navigator url="/pages/cart/cart" open-type="switchTab" class="p-b-btn">
  218. <text class="hxicon-cartfill"></text>
  219. <text>购物车</text>
  220. </navigator>
  221. <view class="p-b-btn" :class="{active: favorite}" @click="toFavorite">
  222. <text class="hxicon-likefill"></text>
  223. <text>收藏</text>
  224. </view>
  225. <view class="action-btn-group">
  226. <button type="primary" class=" action-btn no-border buy-now-btn" @click="buy">立即购买</button>
  227. <button type="primary" class=" action-btn no-border add-cart-btn">加入购物车</button>
  228. </view>
  229. </view> -->
  230. <!-- 购物车 -->
  231. <view class="foot" @touchmove.stop.prevent="mpClear" :style="{height: footHeight}" v-if="showFoot">
  232. <view class="zz" @click="hideShoppingCar"></view>
  233. <view class="btn-box">
  234. <view class="btn-box-left" @click="contact">
  235. <view class="imgBox">
  236. <image src="../../static/store/contact.png" mode=""></image>
  237. </view>
  238. <text>联系商家</text>
  239. </view>
  240. <view class="btn-box-line"></view>
  241. <view class="btn-box-center" @click="showShoppingCar">
  242. <view class="cart" :animation="cartAnimationData">
  243. <view class="tag cartNum" v-if="goodsTotalNumber>0">{{goodsTotalNumber}}</view>
  244. <image :src="goodsTotalNumber ? '/static/store/cart.png' : '/static/store/cart2.png'" mode=""></image>
  245. </view>
  246. <view class="priceBox">
  247. <view class="hx-txt-18 hx-color-white" v-if="goodsTotalPrice>0">
  248. ¥{{goodsTotalPrice}}
  249. </view>
  250. <view class="hx-txt-10 hx-color-gray">
  251. 另需配送费¥{{shippingDees}}
  252. </view>
  253. </view>
  254. </view>
  255. <view class="btn-box-right">
  256. <view class="jiesuan" v-if="goodsTotalPrice>0 && goodsTotalPrice >= startingPrice" @click="jiesuan">
  257. 去结算
  258. </view>
  259. <view class="pscj hx-txt-10 hx-color-gray" v-else>
  260. <text v-if="startingPrice>0">差¥{{-(goodsTotalPrice-startingPrice)}}起送</text>
  261. </view>
  262. </view>
  263. </view>
  264. <view class="cart-box" :style="{display: showCar ? 'flex' : 'none'}">
  265. <view class="box-container rebate-box" v-if="showDiscount">
  266. <text>已享100减25</text>
  267. </view>
  268. <view class="box-container operating-box">
  269. <view class="operating-box_right">
  270. </view>
  271. <view class="operating-box_left clear" @click="clearShoppingCart">
  272. <i class="hxicon-delete"></i>
  273. <text>清空购物车</text>
  274. </view>
  275. </view>
  276. <view class=" goods-box">
  277. <view class="" style="flex: 1;">
  278. <scroll-view scroll-y="true" class="goods-list-scroll" :scroll-top="carGoodsScrollTop">
  279. <view class="goods-list">
  280. <view class="box" v-for="rowData in shoppCart" :key="rowData.id" v-if="rowData.number>0">
  281. <view class="m-store-item">
  282. <view class="m-img">
  283. <image style="width: 100%;height: 100%;" :src="rowData.img" mode="aspectFit"></image>
  284. </view>
  285. <view class="m-text">
  286. <view class="m-title">
  287. {{rowData.name}}
  288. </view>
  289. <view class="m-descripe">
  290. {{rowData.current_form ? rowData.form.name + ":" + rowData.current_form.name : rowData.descripe}}
  291. </view>
  292. <view class="m-price-box" >
  293. <view class="symbol">¥</view>
  294. <view class="m-price">{{rowData.price}}</view>
  295. <view class="m-old-price" v-if="rowData.oldprice">
  296. <text>¥{{rowData.oldprice}}</text>
  297. </view>
  298. </view>
  299. <view class="m-distance" >
  300. <view :class="'addEle2_' + rowData.id" class="jumpPosition">
  301. </view>
  302. <hx-number-box @change="addGoodsChange" :value="rowData.number" :rowData="rowData" :clickTime="400" @addChange="touchOnAddGoods('.addEle2_' + rowData.id,rowData)"></hx-number-box>
  303. </view>
  304. </view>
  305. </view>
  306. </view>
  307. </view>
  308. </scroll-view>
  309. </view>
  310. </view>
  311. </view>
  312. </view>
  313. <!-- 多规格 -->
  314. <uni-popup ref="popup" type="center" @change="popupChange">
  315. <view class="form-main" v-if="currentGoodsData.name">
  316. <view class="form-main_ctn" @click.stop.prevent="mpClear" >
  317. <view class="godos_tit"><text>{{currentGoodsData.name}}</text></view>
  318. <view class="gg_tit">
  319. <text>{{currentGoodsData.form.name}}</text>
  320. </view>
  321. <view class="gg_box">
  322. <block v-for="(form_child,j) in currentGoodsData.form_child" :key="j" v-if="form_child.pid == currentGoodsData.form.id">
  323. <view class="item" :class="{'active': form_child.select}" @click="selectGoodsForm(currentGoodsData,form_child)">{{form_child.name}}</view>
  324. </block>
  325. </view>
  326. <view class="select_gg">
  327. <text class="lable">已选规格:</text>
  328. <view class="select_gg_box">
  329. <block v-for="(form_child,j) in currentGoodsData.form_child" :key="j" v-if="form_child.select == true">
  330. <view class="gg-item">
  331. <text>{{form_child.name}} </text>
  332. <text class="gg-item-cut">,</text>
  333. </view>
  334. </block>
  335. </view>
  336. </view>
  337. <view class="bottom">
  338. <view class="price_box">
  339. <text>¥</text>
  340. <block v-for="(form_child,j) in currentGoodsData.form_child" :key="j" v-if="form_child.select == true">
  341. <text class="price">{{form_child.price}}</text>
  342. </block>
  343. </view>
  344. <view class="form-btn-box">
  345. <block v-if="!currentGoodsData.number">
  346. <view id="ggAddBtn" class="add-btn" @click="formFirstAddGoods()">
  347. <i class="hxicon-add" id="eleAdd"></i>
  348. <text>加入购物车</text>
  349. </view>
  350. </block>
  351. <block v-else>
  352. <view class="addEle_gg jumpPosition"></view>
  353. <hx-number-box @change="formAddGoodsChange" :value="currentGoodsData.number" :rowData="currentGoodsData" :clickTime="animaTime + 200" @addChange="touchOnAddGoods('.addEle_gg',currentGoodsData)"></hx-number-box>
  354. </block>
  355. </view>
  356. </view>
  357. </view>
  358. <view class="close" @click="hiddenForm()">
  359. <i class="hxicon-close"></i>
  360. </view>
  361. </view>
  362. </uni-popup>
  363. <!-- 分享 -->
  364. <share
  365. ref="share"
  366. :contentHeight="580"
  367. :shareList="shareList"
  368. ></share>
  369. </view>
  370. </template>
  371. <script>
  372. import share from '@/components/hx-share/hx-share';
  373. import hxNavbar from '@/components/hx-navbar/hx-navbar.vue';
  374. import jumpBall from '@/components/hx-jump-ball/hx-jump-ball.vue';
  375. import hxNumberBox from "@/components/uni-number-box/uni-number-box.vue";
  376. // 加入购物车动画组件
  377. import flyInCart from '@/components/flyInCart.vue'
  378. //引入测试数据
  379. import testData from "@/common/testdata.js";
  380. var statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
  381. export default{
  382. components: {
  383. share,
  384. hxNumberBox,
  385. flyInCart,
  386. hxNavbar
  387. },
  388. data() {
  389. return {
  390. pageScroll: {},
  391. specClass: 'none',
  392. specSelected:[],
  393. //tabs
  394. tabs: [
  395. {name:'详情',id: 'detail'},
  396. {name:'评价',id: 'eva'},
  397. {name:'图文',id: 'coll'},
  398. ],
  399. swiperCurrent: 0,
  400. swiperCurrentSliderLeft: 0,
  401. showRing: true,
  402. showTabs: true,
  403. showBorder: false,
  404. favorite: true,
  405. //小球动画
  406. num:1,
  407. element: [],
  408. animaTime: 300,
  409. cartAnimation: {},
  410. cartAnimationData: {},
  411. //购物车
  412. shoppingCartAll:[],
  413. //商家信息
  414. storeData: [],
  415. //显示购物车
  416. showFoot:true,
  417. //配送费
  418. shippingDees: 0,
  419. //配送起步价
  420. startingPrice:10,
  421. //购物车商品价格合计
  422. goodsTotalPrice: 0,
  423. //购物车商品数量合计
  424. goodsTotalNumber: 0,
  425. //购物车
  426. shoppCart: [],
  427. //foot 高度
  428. footHeight: '0',
  429. //显示购物车
  430. showCar: false,
  431. //购物车中商品滚动条位置
  432. carGoodsScrollTop: 0,
  433. //购物车缓存 Storage 名称
  434. shoppingCartStorageName: 'shopping_cart',
  435. //购物车显示折扣
  436. showDiscount:true,
  437. //商品信息
  438. goodsInfoData: {},
  439. //商品评价
  440. goodsEvaData: {},
  441. //多规格当前产品
  442. currentGoodsData: {},
  443. //显示规格容器
  444. showFormBox: false,
  445. //显示规格动画
  446. formAnimationData:{},
  447. isBack: true,
  448. //购物车位置数据
  449. cartBasketRect:{},
  450. //分享
  451. shareList: [{
  452. type: 1,
  453. icon: '/static/shop/share_wechat.png',
  454. text: '微信好友'
  455. },
  456. {
  457. type: 2,
  458. icon: '/static/shop/share_moment.png',
  459. text: '朋友圈'
  460. },
  461. {
  462. type: 3,
  463. icon: '/static/shop/share_qq.png',
  464. text: 'QQ好友'
  465. },
  466. {
  467. type: 4,
  468. icon: '/static/shop/share_qqzone.png',
  469. text: 'QQ空间'
  470. }],
  471. };
  472. },
  473. async onLoad(options){
  474. let that = this;
  475. //接收传值,id里面放的是商品id
  476. let id = options.id;
  477. if(id){
  478. }
  479. //模拟请求数据
  480. uni.showLoading({
  481. title: '加载中'
  482. });
  483. setTimeout(()=>{
  484. //商家信息
  485. that.storeData = testData.storeData
  486. //商品信息
  487. that.goodsInfoData = testData.goodsInfo
  488. that.currentGoodsData = testData.goodsInfo
  489. let cartGoods = that.getStoreCart()
  490. //普通商品直接可以显示数量
  491. if(!that.currentGoodsData.form){
  492. for(let i in cartGoods){
  493. if(cartGoods[i].id == that.currentGoodsData.id){
  494. that.currentGoodsData.number = cartGoods[i].number
  495. break
  496. }
  497. }
  498. }
  499. //商品评价
  500. that.goodsEvaData = testData.goodsEva
  501. setTimeout(()=>{
  502. uni.hideLoading();
  503. },500)
  504. },1000)
  505. this.cartAnimation = uni.createAnimation({
  506. duration: 800,
  507. timingFunction: "ease",
  508. delay: 0
  509. });
  510. },
  511. onReady() {
  512. const that = this
  513. let q = uni.createSelectorQuery()
  514. setTimeout(function(){
  515. q.select('.cart').boundingClientRect(data => {
  516. that.cartBasketRect = data
  517. }).exec();
  518. },100)
  519. },
  520. onShow() {
  521. this.init();
  522. },
  523. //监听返回
  524. onBackPress(event) {
  525. if(!this.isBack){
  526. this.$refs.popup.close()
  527. return true
  528. }
  529. },
  530. //导航栏滑动时的操作
  531. onPageScroll(e) {
  532. let top = e.scrollTop
  533. let that = this
  534. that.pageScroll =e
  535. let view = uni.createSelectorQuery().select(".shopping-cart");
  536. view.fields({
  537. rect: true
  538. }, data => {
  539. if(data.top - statusBarHeight<= 44){
  540. that.showBorder = true;
  541. }else{
  542. that.showBorder = false;
  543. }
  544. }).exec();
  545. if(top < 120){
  546. that.showRing = true;
  547. }else{
  548. that.showRing = false;
  549. this.navSearchBgOpacity = 1
  550. this.navSearchColor = '#888888'
  551. }
  552. },
  553. methods:{
  554. init(){
  555. let that = this;
  556. let carts = uni.getStorageSync(that.shoppingCartStorageName) || [];
  557. //根据缓存数据 获取购物车中属于本商店的商品
  558. for(let i in carts){
  559. if(carts[i].store_idd == that.storeDatastore_idid){
  560. that.shoppCart = carts[i].shopping_cart;
  561. break;
  562. }
  563. }
  564. that.goodsTotalPrice = 0;
  565. that.goodsTotalNumber = 0;
  566. for(let i in that.shoppCart){
  567. //计算商品总价
  568. that.goodsTotalPrice += that.shoppCart[i].total
  569. //商品总数量
  570. that.goodsTotalNumber += that.shoppCart[i].number
  571. }
  572. //初始化起步价和配送费
  573. that.starting_price = that.storeData.starting_price;
  574. that.shipping_dees = that.storeData.shipping_dees;
  575. that.setLabelNumber();
  576. },
  577. popupChange(e){
  578. this.isBack = !e.show
  579. },
  580. //返回
  581. backPage(){
  582. var pages = getCurrentPages().length;
  583. console.log(pages);
  584. if(pages == 1){
  585. // uni.switchTab({
  586. // url: '/pages/index/index'
  587. // });
  588. uni.redirectTo({
  589. url: '/pages/index/index'
  590. });
  591. }else{
  592. uni.navigateBack({
  593. animationType:"zoom-in"
  594. });
  595. }
  596. },
  597. //tab 事件
  598. swiperChange(index,idName) {
  599. this.swiperCurrent = index;
  600. this.swiperCurrentSliderLeft= 70 * index;
  601. //滚动至指定位置
  602. //最终位置 = 目标节点坐标 - 目标节点坐标 - 状态栏高度 - 导航栏高度44 - 价格栏高度
  603. let view = uni.createSelectorQuery().select("#productPage");
  604. view.boundingClientRect(data => {
  605. let view2 = uni.createSelectorQuery().select("#" + idName);
  606. view2.boundingClientRect(data2 => {
  607. let view3 = uni.createSelectorQuery().select(".shopping-cart");
  608. view3.fields({
  609. size: true
  610. }, res => {
  611. uni.pageScrollTo({
  612. duration:300,
  613. scrollTop:data2.top - data.top - statusBarHeight - 44 - res.height
  614. })
  615. }).exec();
  616. }).exec();
  617. }).exec();
  618. },
  619. mpClear(e) {
  620. // TODO nvue 取消冒泡
  621. e.stopPropagation()
  622. },
  623. //显示购物车
  624. showShoppingCar(){
  625. if(this.goodsTotalNumber == 0){
  626. return;
  627. }
  628. this.footHeight = '100%';
  629. this.showCar = true;
  630. this.carGoodsScrollTop = 0;
  631. },
  632. //隐藏购物车
  633. hideShoppingCar(){
  634. this.footHeight = '0';
  635. this.showCar = false;
  636. },
  637. //清空该门店的购物车
  638. clearShoppingCart(){
  639. let that = this;
  640. that.shoppCart = [];
  641. that.storeData.shopping_cart = [];
  642. for(let i in that.shoppingCartAll){
  643. if(that.shoppingCartAll[i].store_idd == that.storeDatastore_idid){
  644. that.shoppingCartAll[i] = that.storeData
  645. }
  646. }
  647. uni.setStorageSync(that.shoppingCartStorageName,that.shoppingCartAll);
  648. for(let i in that.goodsList){
  649. that.goodsList[i].number = 0;
  650. }
  651. for(let i in that.categoryList){
  652. that.categoryList[i].number = 0;
  653. }
  654. //购物车商品价格合计
  655. that.goodsTotalPrice = 0;
  656. //购物车商品数量合计
  657. that.goodsTotalNumber = 0;
  658. that.hideShoppingCar();
  659. },
  660. //增加商品后的回调事件
  661. touchOnAddGoods(ele,data){
  662. // this.element = [ele,'.cart'];
  663. // this.num ++;
  664. const that = this;
  665. let q = uni.createSelectorQuery()
  666. q.select(ele).boundingClientRect(res => {
  667. console.log(res);
  668. that.$refs.inCart.addToCart(res,data.id);
  669. }).exec();
  670. },
  671. //新增商品
  672. storeAddGoods(number,rowData){
  673. var that = this;
  674. let shoppCart = [];
  675. let totalPrice = 0;
  676. let totalNumber = 0;
  677. let existedGoods = false;
  678. number = Number(number)
  679. let carts = uni.getStorageSync(that.shoppingCartStorageName) || [];
  680. //根据缓存数据 获取购物车中属于本商店的商品
  681. for(let i in carts){
  682. if(carts[i].store_id == that.storeData.store_id){
  683. shoppCart = carts[i].shopping_cart;
  684. break;
  685. }
  686. }
  687. //是否为有规格的商品
  688. let isFormGoods = false
  689. if(rowData.current_form){
  690. isFormGoods = true
  691. }
  692. let deleteGoods = null
  693. //检查该商品是否为第一次添加,
  694. for(var i in shoppCart){
  695. if(shoppCart[i].id == rowData.id){
  696. if(isFormGoods){
  697. //相同商品比较规格是否也相同
  698. if(shoppCart[i].current_form.id == rowData.current_form.id){
  699. existedGoods = true;
  700. }
  701. }else{
  702. existedGoods = true;
  703. }
  704. if(existedGoods){
  705. //在购物车中移除该商品
  706. if(number <= 0){
  707. deleteGoods = shoppCart[i];
  708. break;
  709. }
  710. if(isFormGoods){
  711. shoppCart[i].price = rowData.current_form.price
  712. shoppCart[i].oldprice = rowData.current_form.oldprice
  713. shoppCart[i].total = number * rowData.current_form.price
  714. }else{
  715. shoppCart[i].price = rowData.price
  716. shoppCart[i].total = number * rowData.price
  717. shoppCart[i].oldprice = rowData.oldprice
  718. }
  719. //非第一次添加,直接修改商品数量,并计算出单品合计
  720. shoppCart[i].number = rowData.number = number
  721. break;
  722. }
  723. }
  724. }
  725. //在购物车中移除该商品
  726. if(deleteGoods != null){
  727. if(!carts){
  728. return [];
  729. }
  730. //根据缓存数据 获取购物车中属于本商店的商品
  731. for(let i in carts){
  732. if(carts[i].store_id == that.storeData.store_id){
  733. var index = shoppCart.indexOf(deleteGoods);
  734. if (index > -1) {
  735. shoppCart.splice(index, 1);
  736. }
  737. carts[i].shopping_cart = shoppCart
  738. //计算总商品数量和总价
  739. for(var j in shoppCart){
  740. //总价
  741. totalPrice += shoppCart[j].total
  742. totalNumber += shoppCart[j].number
  743. }
  744. //更改商品列表中的已购买数量
  745. for(let j in that.goodsList){
  746. if(that.goodsList[j].id == rowData.id){
  747. that.goodsList[j] = rowData
  748. break;
  749. }
  750. }
  751. break;
  752. }
  753. }
  754. }else{
  755. //第一次添加
  756. if(!existedGoods){
  757. if(rowData.form){
  758. rowData.price = rowData.current_form.price
  759. rowData.oldprice = rowData.current_form.oldprice
  760. rowData.total = number * rowData.current_form.price
  761. }else{
  762. rowData.total = number * rowData.price
  763. }
  764. rowData.number = number;
  765. shoppCart.push(rowData);
  766. }
  767. //计算总商品数量和总价
  768. for(var i in shoppCart){
  769. //总价
  770. totalPrice += shoppCart[i].total
  771. totalNumber += shoppCart[i].number
  772. }
  773. that.storeData.shopping_cart = shoppCart;
  774. //门店第一次添加商品
  775. let isFirstAddGoods = true;
  776. for(let i in carts){
  777. if(carts[i].store_id == that.storeData.store_id){
  778. carts[i] = that.storeData
  779. isFirstAddGoods = false
  780. }
  781. }
  782. if(isFirstAddGoods === true){
  783. carts.push(that.storeData)
  784. }
  785. }
  786. that.shoppCart = shoppCart
  787. that.shoppingCartAll = carts
  788. that.currentGoodsData.number = number
  789. //购物车商品数据缓存至本地
  790. uni.setStorageSync(that.shoppingCartStorageName,carts);
  791. return {
  792. shoppCart: shoppCart,
  793. totalPrice: totalPrice,
  794. totalNumber: totalNumber
  795. }
  796. },
  797. //新增商品计算价格
  798. addGoodsChange(number,dataArr){
  799. number = Number(number)
  800. var that = this;
  801. let rowData = {
  802. id: dataArr.id,
  803. type_id: dataArr.type_id,
  804. name: dataArr.name,
  805. descripe: dataArr.descripe,
  806. img: dataArr.img,
  807. price: dataArr.price,
  808. oldprice: dataArr.oldprice,
  809. number: number
  810. }
  811. if(dataArr.form){
  812. rowData.form = dataArr.form
  813. rowData.form_child = dataArr.form_child
  814. rowData.current_form = dataArr.current_form
  815. }
  816. let res = that.storeAddGoods(number,rowData)
  817. console.log(res.totalPrice)
  818. if(res.totalPrice){
  819. that.goodsTotalPrice = res.totalPrice
  820. that.goodsTotalNumber = res.totalNumber
  821. if(that.goodsTotalNumber == 0){
  822. that.hideShoppingCar();
  823. }
  824. }
  825. return
  826. let shoppCart = this.shoppCart;
  827. let totalPrice = 0;
  828. let totalNumber = 0;
  829. let existedGoods = false;
  830. // //点击添加购物车时生效
  831. // if(status){
  832. // that.element = ['#eleAdd','.cart'];
  833. // that.num ++;
  834. // }
  835. //检查该商品是否为第一次添加,如果为第二次添加,则直接修改商品数量,并计算出合计
  836. for(var i in shoppCart){
  837. //非第一次添加
  838. if(shoppCart[i].id == rowData.id){
  839. //如果为加入购物车则为叠加
  840. if(status){
  841. number = shoppCart[i].number + number
  842. }
  843. shoppCart[i].number = rowData.number = number;
  844. shoppCart[i].total = number * shoppCart[i].price
  845. existedGoods = true;
  846. break;
  847. }
  848. }
  849. //第一次添加
  850. if(!existedGoods){
  851. rowData.number = number;
  852. rowData.total = number * rowData.price
  853. shoppCart.push(rowData);
  854. }
  855. //计算总商品数量和总价
  856. for(var i in shoppCart){
  857. //总价
  858. totalPrice += shoppCart[i].total
  859. totalNumber += shoppCart[i].number
  860. }
  861. //更改商品列表中的已购买数量
  862. for(let i in that.goodsList){
  863. if(that.goodsList[i].id == rowData.id){
  864. that.goodsList[i] = rowData
  865. break;
  866. }
  867. }
  868. that.shoppCart = shoppCart;
  869. that.goodsTotalPrice = totalPrice
  870. that.goodsTotalNumber = totalNumber
  871. //门店第一次添加该商品
  872. let isFirstAddGoods = true;
  873. that.storeData.shopping_cart = that.shoppCart;
  874. for(let i in that.shoppingCartAll){
  875. if(that.shoppingCartAll[i].store_id == that.storeData.store_id){
  876. that.shoppingCartAll[i] = that.storeData
  877. isFirstAddGoods = false
  878. }
  879. }
  880. that.setLabelNumber();
  881. if(isFirstAddGoods === true){
  882. that.shoppingCartAll.push(that.storeData)
  883. }
  884. if(that.goodsTotalNumber == 0){
  885. that.hideShoppingCar();
  886. }
  887. //购物车商品数据缓存至本地
  888. uni.setStorageSync(that.shoppingCartStorageName,that.shoppingCartAll);
  889. },
  890. //计算每类商品购买的总数
  891. setLabelNumber(){
  892. let that = this;
  893. //计算每一类购买商品的总数量
  894. for(let j in that.categoryList){
  895. let n = 0;
  896. for(var i in that.shoppCart){
  897. if(that.shoppCart[i].type_id == that.categoryList[j].id){
  898. n += that.shoppCart[i].number;
  899. }
  900. }
  901. that.categoryList[j].number = n;
  902. }
  903. },
  904. //去结算
  905. jiesuan(){
  906. this.navTo("/pages/order/preview?sid=" + this.storeData.store_id)
  907. },
  908. //联系商家
  909. contact(){
  910. uni.showModal({
  911. title:"",
  912. content:"联系商家"
  913. })
  914. },
  915. //预览图片
  916. previewImg(img,imgList){
  917. // 预览图片
  918. uni.previewImage({
  919. current: img,
  920. urls: imgList,
  921. indicator: "default",
  922. // longPressActions: {
  923. // itemList: ['发送给朋友', '保存图片', '收藏'],
  924. // success: function(data) {
  925. // //console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
  926. // },
  927. // fail: function(err) {
  928. // //console.log(err.errMsg);
  929. // }
  930. // }
  931. });
  932. },
  933. //-----------------------------------------------------------------------------------
  934. //显示 规格
  935. showForm(goods){
  936. var that = this;
  937. let goodsCart = that.getStoreCart();
  938. if(goodsCart){
  939. let currentGoods = null
  940. for(let i in goodsCart){
  941. if(goodsCart[i].id == goods.id){
  942. currentGoods = goodsCart[i]
  943. break
  944. }
  945. }
  946. if(currentGoods){
  947. let selectStatus = false
  948. for (let i in goods.form_child){
  949. if(goods.form_child[i].id == currentGoods.current_form.id){
  950. if(!selectStatus){
  951. goods.form_child[i].select = true
  952. goods.number = currentGoods.number
  953. selectStatus = true
  954. }else{
  955. goods.form_child[i].select = false
  956. }
  957. }else{
  958. goods.form_child[i].select = false
  959. }
  960. }
  961. }
  962. }
  963. that.currentGoodsData = goods
  964. that.$refs.popup.open()
  965. },
  966. //隐藏规格
  967. hiddenForm(){
  968. this.$refs.popup.close();
  969. },
  970. formFirstAddGoods(){
  971. let that = this
  972. that.formAddGoodsChange(1,that.currentGoodsData)
  973. that.touchOnAddGoods('#eleAdd',that.currentGoodsData)
  974. },
  975. //加入购物车
  976. formAddGoodsChange(number,goodsData){
  977. let that = this;
  978. if(number == 1){
  979. for(let i in goodsData.form_child){
  980. if(goodsData.form_child[i].select == true ){
  981. that.currentGoodsData.current_form = goodsData.form_child[i]
  982. break
  983. }
  984. }
  985. }
  986. that.addGoodsChange(number,that.currentGoodsData)
  987. },
  988. //选择规格
  989. selectGoodsForm(goods,formChild){
  990. let that = this
  991. let data = goods.form_child
  992. let n = 0
  993. for (var i in data){
  994. if(data[i].id == formChild.id){
  995. data[i].select = true
  996. }else{
  997. data[i].select = false
  998. }
  999. }
  1000. let goodsCart = that.getStoreCart();
  1001. if(goodsCart){
  1002. for(let i in goodsCart){
  1003. if(goodsCart[i].id == goods.id && goodsCart[i].current_form.id == formChild.id){
  1004. n = goodsCart[i].number
  1005. break;
  1006. }
  1007. }
  1008. }
  1009. goods.number = n
  1010. this.currentGoodsData = goods
  1011. },
  1012. //获取该商品在购物车的数量
  1013. getCartGoodsNum(goods){
  1014. let cart = this.getStoreCart()
  1015. let n = 0
  1016. if(cart){
  1017. for(let i in cart){
  1018. if(cart[i].id == goods.id){
  1019. n += cart[i].number
  1020. }
  1021. }
  1022. }
  1023. return n
  1024. },
  1025. //-----------------------------------------------------------------------------------
  1026. //获取门店购物车
  1027. getStoreCart(){
  1028. let that = this
  1029. let shoppCart = {}
  1030. let carts = uni.getStorageSync(that.shoppingCartStorageName) || [];
  1031. if(carts){
  1032. //根据缓存数据 获取购物车中属于本商店的商品
  1033. for(let i in carts){
  1034. if(carts[i].store_id == that.storeData.store_id){
  1035. shoppCart = carts[i].shopping_cart;
  1036. break;
  1037. }
  1038. }
  1039. }else{
  1040. that.storeData.shopping_cart = []
  1041. uni.setStorageSync(that.shoppingCartStorageName,that.storeData);
  1042. }
  1043. return shoppCart
  1044. },
  1045. //分享
  1046. share(){
  1047. this.$refs.share.toggleMask();
  1048. },
  1049. //收藏
  1050. toFavorite(){
  1051. this.favorite = !this.favorite;
  1052. },
  1053. buy(){
  1054. uni.navigateTo({
  1055. url: `/pages/shop/order/createOrder`
  1056. })
  1057. },
  1058. stopPrevent(){}
  1059. },
  1060. }
  1061. </script>
  1062. <style lang='scss'>
  1063. //主题颜色
  1064. $hx-theme-color: #FFC107;
  1065. $hx-theme-color-light: #FFEB3B;
  1066. page{
  1067. background: #ffffff;
  1068. padding-bottom: 160upx;
  1069. }
  1070. /*边框*/
  1071. .b-b:after,
  1072. .b-t:after {
  1073. position: absolute;
  1074. z-index: 3;
  1075. left: 0;
  1076. right: 0;
  1077. height: 0;
  1078. content: '';
  1079. transform: scaleY(.5);
  1080. border-bottom: 1px solid #E4E7ED;
  1081. }
  1082. .b-b:after {
  1083. bottom: 0;
  1084. }
  1085. .b-t:after {
  1086. top: 0;
  1087. }
  1088. .hx-txt-10{
  1089. font-size: 10px;
  1090. }
  1091. .hx-txt-12{
  1092. font-size: 12px;
  1093. }
  1094. .hx-txt-14{
  1095. font-size: 14px;
  1096. }
  1097. .hx-txt-16{
  1098. font-size: 16px;
  1099. }
  1100. .hx-txt-18{
  1101. font-size: 18px;
  1102. }
  1103. .hx-txt-22{
  1104. font-size: 22px;
  1105. }
  1106. .hx-color-gray{
  1107. color: #bbbbbb;
  1108. }
  1109. .hx-color-white{
  1110. color: #FFFFFF;
  1111. }
  1112. .hx-color-black{
  1113. color: #333333;
  1114. }
  1115. .hx-txt-weigth{
  1116. font-weight: bold;
  1117. }
  1118. .hx-mb-10{
  1119. margin-bottom: 10px;
  1120. }
  1121. .hx-mt-15{
  1122. margin-top: 15px;
  1123. }
  1124. .hx-shadow{
  1125. box-shadow: 0px 6upx 16upx rgba(173, 173, 173, 0.2);
  1126. }
  1127. .ring{
  1128. background-color: rgba(0, 0, 0, 0.3);
  1129. width: 28px;
  1130. height: 28px;
  1131. border-radius: 100%;
  1132. display: flex;
  1133. align-items: center;
  1134. justify-content: center;
  1135. font-size: 16px;
  1136. }
  1137. .ctn{
  1138. /* border: 1px solid #e3e3e3; */
  1139. width: 100%;
  1140. display: flex;
  1141. justify-content: flex-end;
  1142. overflow: hidden;
  1143. align-items: center;
  1144. .leftBox{
  1145. display: flex;
  1146. width: 60px;
  1147. justify-content: space-between;
  1148. flex: none;
  1149. margin: 0 8px;
  1150. align-items: center;
  1151. }
  1152. .jrNull{
  1153. /* #ifdef MP */
  1154. width: 95px;
  1155. flex: none;
  1156. /* #endif */
  1157. }
  1158. }
  1159. .barBorder{
  1160. box-shadow: 0 1px 6px #ccc;
  1161. border-top: 1px solid #f1f1f1;
  1162. }
  1163. .icon-right{
  1164. font-size: 16px;
  1165. color: #888;
  1166. }
  1167. .carousel {
  1168. height: 722upx;
  1169. position:relative;
  1170. swiper{
  1171. height: 100%;
  1172. }
  1173. .image-wrapper{
  1174. width: 100%;
  1175. height: 100%;
  1176. }
  1177. .swiper-item {
  1178. display: flex;
  1179. justify-content: center;
  1180. align-content: center;
  1181. height: 750upx;
  1182. overflow: hidden;
  1183. image {
  1184. width: 100%;
  1185. height: 100%;
  1186. }
  1187. }
  1188. }
  1189. .line-weight{
  1190. background-color: #efefef;
  1191. height: 10px;
  1192. }
  1193. .container-box{
  1194. background: #fff;
  1195. padding: 10px 15px;
  1196. }
  1197. /* 标题简介 */
  1198. .introduce-section{
  1199. padding-bottom: 0;
  1200. .title{
  1201. font-size: 32upx;
  1202. color: #303133;
  1203. height: 50upx;
  1204. line-height: 50upx;
  1205. font-weight: bold;
  1206. }
  1207. .tag-box{
  1208. display: flex;
  1209. align-items:baseline;
  1210. margin: 6px 0 4px;
  1211. flex-wrap: wrap;
  1212. .tag-item{
  1213. align-items: center;
  1214. padding: 2px 5px;
  1215. background: #efefef;
  1216. margin-bottom: 8px;
  1217. font-size: 10px;
  1218. margin-right: 10px;
  1219. border-radius: 3px;
  1220. color: #555555;
  1221. }
  1222. }
  1223. .bot-row{
  1224. display:flex;
  1225. align-items:center;
  1226. height: 20px;
  1227. font-size: 12px;
  1228. color: #909399;
  1229. text{
  1230. flex: 1;
  1231. }
  1232. }
  1233. }
  1234. /* 价格 */
  1235. .shopping-cart{
  1236. position: sticky;
  1237. top: calc(44px + var(--status-bar-height));
  1238. padding-top: 10px;
  1239. display: flex;
  1240. justify-content: space-between;
  1241. background: #ffffff;
  1242. z-index: 10;
  1243. .price-box{
  1244. display:flex;
  1245. align-items:baseline;
  1246. font-size: 12px;
  1247. color:#ff582b;
  1248. flex: 1;
  1249. .price{
  1250. font-size: 20px;
  1251. }
  1252. .m-price{
  1253. margin:0 6px;
  1254. color: #909399;
  1255. text-decoration: line-through;
  1256. font-size: 12px;
  1257. }
  1258. .coupon-tip{
  1259. align-items: center;
  1260. padding: 4upx 10upx;
  1261. background: #FF5722;
  1262. font-size: 12px;
  1263. color: #fff;
  1264. border-radius: 3px;
  1265. line-height: 1;
  1266. transform: translateY(-4upx);
  1267. }
  1268. }
  1269. .add-btn{
  1270. position: relative;
  1271. border-radius: 50px;
  1272. background-color: #ffce3c;
  1273. padding: 3px 10px;
  1274. display: flex;
  1275. height: 30px;
  1276. align-items: center;
  1277. i{
  1278. font-weight: bold;
  1279. margin-left: -4px;
  1280. margin-right: 3px;
  1281. }
  1282. text{
  1283. font-size: 14px;
  1284. font-weight: bold;
  1285. color: #363636;
  1286. }
  1287. .jumpPosition{
  1288. position: absolute;
  1289. right: 6px;
  1290. top: 11px;
  1291. }
  1292. .num{
  1293. position: absolute;
  1294. right: 0;
  1295. top: -10px;
  1296. width: 18px;
  1297. height: 18px;
  1298. line-height: 18px;
  1299. font-size: 10px;
  1300. color: #fff;
  1301. background-color: #ff5722;
  1302. text-align: center;
  1303. border-radius: 50%;
  1304. }
  1305. }
  1306. .btn-box{
  1307. position: relative;
  1308. border-radius: 50px;
  1309. padding: 3px 10px;
  1310. display: flex;
  1311. height: 30px;
  1312. align-items: center;
  1313. .jumpPosition{
  1314. position: absolute;
  1315. right: 16px;
  1316. top: 11px;
  1317. }
  1318. }
  1319. }
  1320. /* 分享 */
  1321. .share-section{
  1322. display:flex;
  1323. align-items:center;
  1324. color: #606266;
  1325. background: linear-gradient(to right, #fff8c3, #ffcc33);
  1326. padding: 12upx 30upx;
  1327. .share-icon{
  1328. display:flex;
  1329. align-items: center;
  1330. width: 38px;
  1331. height: 16px;
  1332. line-height: 1;
  1333. border: 1px solid #FF9800;
  1334. border-radius: 2px;
  1335. position: relative;
  1336. overflow: hidden;
  1337. font-size: 12px;
  1338. color: #FF5722;
  1339. &:after{
  1340. content: '';
  1341. width: 50upx;
  1342. height: 50upx;
  1343. border-radius: 50%;
  1344. left: -20upx;
  1345. top: -12upx;
  1346. position:absolute;
  1347. background: #FF9800;
  1348. }
  1349. }
  1350. .icon-favor_fill_light{
  1351. position:relative;
  1352. z-index: 1;
  1353. font-size: 24upx;
  1354. margin-left: 2upx;
  1355. margin-right: 10upx;
  1356. color: #fff;
  1357. line-height: 1;
  1358. }
  1359. .tit{
  1360. font-size: 14px;
  1361. margin-left:10upx;
  1362. }
  1363. .icon-mark{
  1364. padding: 10upx;
  1365. font-size: 30upx;
  1366. line-height: 1;
  1367. }
  1368. .share-btn{
  1369. flex: 1;
  1370. text-align: right;
  1371. font-size: 12px;
  1372. color: #FF5722;
  1373. }
  1374. .icon-right{
  1375. font-size: 12px;
  1376. margin-left: 4upx;
  1377. color: #fa436a;
  1378. }
  1379. }
  1380. .tabs-box{
  1381. width: 100%;
  1382. z-index: 10;
  1383. background-color: white;
  1384. height: 40px;
  1385. .hx-tabs{
  1386. position: relative;
  1387. display: flex;
  1388. height:100%;
  1389. &-item{
  1390. display: flex;
  1391. flex-direction: row;
  1392. justify-content: left;
  1393. align-items: center;
  1394. width: 70px;
  1395. color:#666666;
  1396. text{
  1397. font-size: 16px;
  1398. }
  1399. }
  1400. &-active{
  1401. color:#333333;
  1402. font-weight: bold;
  1403. }
  1404. &-slider-box{
  1405. position: absolute;
  1406. display: flex;
  1407. justify-content: left;
  1408. bottom: 0;
  1409. width: 70px;
  1410. }
  1411. &-slider{
  1412. display: flex;
  1413. background: #FFC107;
  1414. width: 20px;
  1415. height: 2px;
  1416. margin-left: 6px;
  1417. }
  1418. }
  1419. }
  1420. /* 详情 */
  1421. .info-box{
  1422. display: flex;
  1423. flex-direction: column;
  1424. padding-top: 12px;
  1425. .info-item{
  1426. display: flex;
  1427. flex-direction: row;
  1428. align-items: flex-start;
  1429. font-size: 14px;
  1430. margin-bottom: 6px;
  1431. .left{
  1432. color: #909399;
  1433. width: 84px;
  1434. }
  1435. .right{
  1436. color: #000000;
  1437. flex: 1;
  1438. }
  1439. }
  1440. }
  1441. .c-list{
  1442. font-size: 13px;
  1443. color: #606266;
  1444. background: #fff;
  1445. .c-row{
  1446. display:flex;
  1447. align-items:center;
  1448. padding: 20upx 30upx;
  1449. position:relative;
  1450. }
  1451. .tit{
  1452. width: 140upx;
  1453. }
  1454. .con{
  1455. flex: 1;
  1456. color: #303133;
  1457. .selected-text{
  1458. margin-right: 10upx;
  1459. }
  1460. }
  1461. .bz-list{
  1462. height: 40upx;
  1463. font-size: 13px;
  1464. color: #303133;
  1465. text{
  1466. display: inline-block;
  1467. margin-right: 30upx;
  1468. }
  1469. }
  1470. .con-list{
  1471. flex: 1;
  1472. display:flex;
  1473. flex-direction: column;
  1474. color: #303133;
  1475. line-height: 40upx;
  1476. }
  1477. .red{
  1478. color: #fa436a;
  1479. }
  1480. }
  1481. /* 评价 */
  1482. .eva-section{
  1483. display: flex;
  1484. flex-direction: column;
  1485. .e-header{
  1486. display: flex;
  1487. align-items: center;
  1488. height: 70upx;
  1489. font-size: 13px ;
  1490. color: #909399;
  1491. .tit{
  1492. font-size: 16px;
  1493. color: #303133;
  1494. margin-right: 6px;
  1495. font-weight: bold;
  1496. }
  1497. .hpd{
  1498. font-size: 12px;
  1499. transform: translateY(2px);
  1500. }
  1501. .tip{
  1502. flex: 1;
  1503. text-align: right;
  1504. }
  1505. .icon-right{
  1506. margin-left: 10upx;
  1507. }
  1508. }
  1509. .eva-tag-box{
  1510. display: flex;
  1511. align-items:baseline;
  1512. margin: 6px 0 6px;
  1513. flex-wrap: wrap;
  1514. .tag-item{
  1515. align-items: center;
  1516. padding: 4px 8px;
  1517. background: #fae196;
  1518. font-size: 10px;
  1519. margin-right: 10px;
  1520. margin-bottom: 10px;
  1521. border-radius: 3px;
  1522. color: #555555;
  1523. display: flex;
  1524. flex-direction: row;
  1525. i{
  1526. color: #F0AD4E;
  1527. font-size: 12px;
  1528. }
  1529. .tread{
  1530. color: #909399
  1531. }
  1532. .num{
  1533. margin-left: 6px;
  1534. }
  1535. }
  1536. .tread-bg{
  1537. background-color: #eeeeee !important;
  1538. }
  1539. }
  1540. .eva-btn{
  1541. margin:16px 0 6px;
  1542. background: #f6f6f6;
  1543. border-radius: 4px;
  1544. display: flex;
  1545. height: 36px;
  1546. justify-content: center;
  1547. align-items: center;
  1548. flex-direction: row;
  1549. font-size: 14px;
  1550. text{
  1551. margin-left: 10px;
  1552. margin-right: 6px;
  1553. }
  1554. .avatar-box{
  1555. display: flex;
  1556. flex-direction: row;
  1557. .avatar-item{
  1558. width: 20px;
  1559. height: 20px;
  1560. overflow: hidden;
  1561. border-radius: 100%;
  1562. background-color:#cfcfcf;
  1563. border: 0.5px solid #cccccc;
  1564. display: flex;
  1565. justify-content: center;
  1566. align-items: center;
  1567. margin-left: -5px;
  1568. z-index: 1;
  1569. image{
  1570. width: 20px;
  1571. height: 20px;
  1572. }
  1573. i{
  1574. color: #ffffff;
  1575. }
  1576. }
  1577. }
  1578. }
  1579. }
  1580. .eva-box{
  1581. display: flex;
  1582. padding: 10px 0;
  1583. border-bottom: 1px solid #f5f5f5;
  1584. .portrait{
  1585. flex-shrink: 0;
  1586. width: 80upx;
  1587. height: 80upx;
  1588. border-radius: 100px;
  1589. }
  1590. .right{
  1591. flex: 1;
  1592. display: flex;
  1593. flex-direction: column;
  1594. font-size: 14px;
  1595. color: #606266;
  1596. padding-left: 26upx;
  1597. .con{
  1598. font-size: 14px;
  1599. color: #303133;
  1600. padding: 10px 0 6px;
  1601. }
  1602. .bot{
  1603. display: flex;
  1604. justify-content: space-between;
  1605. font-size: 12px;
  1606. color:#909399;
  1607. }
  1608. .praise-box{
  1609. margin-top: 4px;
  1610. display: flex;
  1611. flex-direction: row;
  1612. [class*="hxicon-"]{
  1613. color: #F0AD4E;
  1614. margin-right: 6px;
  1615. }
  1616. .tread{
  1617. color: #909399;
  1618. }
  1619. .praise-txt{
  1620. color:#909399;
  1621. font-size: 12px;
  1622. }
  1623. }
  1624. .imgs {
  1625. display: flex;
  1626. flex-wrap: wrap;
  1627. padding-top: 4px;
  1628. .imgs-box {
  1629. width: 25%;
  1630. padding-right: 5px;
  1631. box-sizing: border-box;
  1632. image{
  1633. border-radius: 4px;
  1634. }
  1635. }
  1636. }
  1637. }
  1638. }
  1639. /* 详情 */
  1640. .detail-desc{
  1641. background: #fff;
  1642. margin-top: 16upx;
  1643. .d-header{
  1644. display: flex;
  1645. justify-content: center;
  1646. align-items: center;
  1647. height: 80upx;
  1648. font-size: 15px;
  1649. color: #303133;
  1650. position: relative;
  1651. text{
  1652. padding: 0 20upx;
  1653. background: #fff;
  1654. position: relative;
  1655. z-index: 1;
  1656. }
  1657. &:after{
  1658. position: absolute;
  1659. left: 50%;
  1660. top: 50%;
  1661. transform: translateX(-50%);
  1662. width: 300upx;
  1663. height: 0;
  1664. content: '';
  1665. border-bottom: 1px solid #ccc;
  1666. }
  1667. }
  1668. }
  1669. /* 弹出层 */
  1670. .popup {
  1671. position: fixed;
  1672. left: 0;
  1673. top: 0;
  1674. right: 0;
  1675. bottom: 0;
  1676. z-index: 99;
  1677. &.show {
  1678. display: block;
  1679. .mask{
  1680. animation: showPopup 0.2s linear both;
  1681. }
  1682. .layer {
  1683. animation: showLayer 0.2s linear both;
  1684. }
  1685. }
  1686. &.hide {
  1687. .mask{
  1688. animation: hidePopup 0.2s linear both;
  1689. }
  1690. .layer {
  1691. animation: hideLayer 0.2s linear both;
  1692. }
  1693. }
  1694. &.none {
  1695. display: none;
  1696. }
  1697. .mask{
  1698. position: fixed;
  1699. top: 0;
  1700. width: 100%;
  1701. height: 100%;
  1702. z-index: 1;
  1703. background-color: rgba(0, 0, 0, 0.4);
  1704. }
  1705. .layer {
  1706. position: fixed;
  1707. z-index: 99;
  1708. bottom: 0;
  1709. width: 100%;
  1710. min-height: 40vh;
  1711. border-radius: 10upx 10upx 0 0;
  1712. background-color: #fff;
  1713. .btn{
  1714. height: 66upx;
  1715. line-height: 66upx;
  1716. border-radius: 100upx;
  1717. background: #fa436a;
  1718. font-size: 15px;
  1719. color: #fff;
  1720. margin: 30upx auto 20upx;
  1721. }
  1722. }
  1723. @keyframes showPopup {
  1724. 0% {
  1725. opacity: 0;
  1726. }
  1727. 100% {
  1728. opacity: 1;
  1729. }
  1730. }
  1731. @keyframes hidePopup {
  1732. 0% {
  1733. opacity: 1;
  1734. }
  1735. 100% {
  1736. opacity: 0;
  1737. }
  1738. }
  1739. @keyframes showLayer {
  1740. 0% {
  1741. transform: translateY(120%);
  1742. }
  1743. 100% {
  1744. transform: translateY(0%);
  1745. }
  1746. }
  1747. @keyframes hideLayer {
  1748. 0% {
  1749. transform: translateY(0);
  1750. }
  1751. 100% {
  1752. transform: translateY(120%);
  1753. }
  1754. }
  1755. }
  1756. /* 底部操作菜单 */
  1757. .page-bottom{
  1758. position:fixed;
  1759. left: 30upx;
  1760. bottom:30upx;
  1761. z-index: 95;
  1762. display: flex;
  1763. justify-content: center;
  1764. align-items: center;
  1765. width: 690upx;
  1766. height: 100upx;
  1767. background: rgba(255,255,255,.9);
  1768. box-shadow: 0 0 20upx 0 rgba(0,0,0,.5);
  1769. border-radius: 16upx;
  1770. .p-b-btn{
  1771. display:flex;
  1772. flex-direction: column;
  1773. align-items: center;
  1774. justify-content: center;
  1775. font-size: 12px;
  1776. color: #606266;
  1777. width: 96upx;
  1778. height: 80upx;
  1779. [class*="hxicon-"]{
  1780. font-size: 40upx;
  1781. line-height: 48upx;
  1782. color: #909399;
  1783. }
  1784. &.active, &.active [class*="hxicon-"]{
  1785. color: #fa436a;
  1786. }
  1787. .icon-fenxiang2{
  1788. font-size: 42upx;
  1789. transform: translateY(-2upx);
  1790. }
  1791. .icon-likefill{
  1792. font-size: 46upx;
  1793. }
  1794. }
  1795. .action-btn-group{
  1796. display: flex;
  1797. height: 76upx;
  1798. border-radius: 100px;
  1799. overflow: hidden;
  1800. box-shadow: 0 20upx 40upx -16upx #fa436a;
  1801. box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
  1802. background: linear-gradient(to right, #ffac30,#fa436a,#F56C6C);
  1803. margin-left: 20upx;
  1804. position:relative;
  1805. &:after{
  1806. content: '';
  1807. position:absolute;
  1808. top: 50%;
  1809. right: 50%;
  1810. transform: translateY(-50%);
  1811. height: 28upx;
  1812. width: 0;
  1813. border-right: 1px solid rgba(255,255,255,.5);
  1814. }
  1815. .action-btn{
  1816. display:flex;
  1817. align-items: center;
  1818. justify-content: center;
  1819. width: 180upx;
  1820. height: 100%;
  1821. font-size: 14px ;
  1822. padding: 0;
  1823. border-radius: 0;
  1824. background: transparent;
  1825. }
  1826. }
  1827. }
  1828. /* foot */
  1829. .foot{
  1830. position: fixed;
  1831. display: flex;
  1832. z-index: 12;
  1833. justify-content:center;
  1834. align-items : center;
  1835. bottom: 0;
  1836. height: 100%;
  1837. width: 100%;
  1838. /*width: calc(100% - 32px);*/
  1839. .btn-box{
  1840. position:absolute;
  1841. display: flex;
  1842. bottom: 15px;
  1843. justify-content:center;
  1844. align-items : center;
  1845. margin:0;
  1846. height: 50px;
  1847. width: calc(100% - 32px);
  1848. z-index: 9;
  1849. &-left{
  1850. background: #222222;
  1851. border-top-left-radius:50px;
  1852. border-top-right-radius:9px;
  1853. border-bottom-left-radius:50px;
  1854. border-bottom-right-radius:9px;
  1855. padding-left: 6upx;
  1856. display: flex;
  1857. flex-direction:column;
  1858. justify-content:center;
  1859. align-self: center;
  1860. width: 70px;
  1861. height: 100%;
  1862. color: #f6d200;
  1863. text-align: center;
  1864. .imgBox{
  1865. display: flex;
  1866. text-align: center;
  1867. justify-content:center;
  1868. image{
  1869. width: 20px;
  1870. height: 20px;
  1871. }
  1872. }
  1873. text{
  1874. font-size: 20upx;
  1875. }
  1876. }
  1877. &-line{
  1878. background: #ffffff;
  1879. width: 2px;
  1880. height: 100%;
  1881. }
  1882. &-center{
  1883. height: 100%;
  1884. flex: auto;
  1885. display: flex;
  1886. justify-content:flex-start;
  1887. align-self: center;
  1888. align-items: center;
  1889. background: #222222;
  1890. border-top-left-radius:8upx;
  1891. border-bottom-left-radius:8upx;
  1892. padding-left: 10upx;
  1893. .cart{
  1894. position: relative;
  1895. width: 36px;
  1896. height: 36px;
  1897. image{
  1898. width: 100%;
  1899. height: 100%;
  1900. }
  1901. .tag{
  1902. position: absolute;
  1903. right: 12upx;
  1904. top: 16upx;
  1905. height: 18px;
  1906. width: 18px;
  1907. background-color: #ff4000;
  1908. color: #ffffff;
  1909. border-radius: 50%;
  1910. z-index: 1;
  1911. font-size: 10px;
  1912. text-align: center;
  1913. line-height: 18px;
  1914. }
  1915. }
  1916. .priceBox{
  1917. flex: auto;
  1918. }
  1919. }
  1920. &-right{
  1921. width: 70px;
  1922. height: 100%;
  1923. position: relative;
  1924. display: flex;
  1925. justify-content:flex-start;
  1926. align-self: center;
  1927. align-items: center;
  1928. .pscj{
  1929. width: 100%;
  1930. height: 100%;
  1931. border-top-right-radius:100upx;
  1932. border-bottom-right-radius:100upx;
  1933. background: #222222;
  1934. text-align: center;
  1935. display: flex;
  1936. justify-content:center;
  1937. align-self: center;
  1938. align-items: center;
  1939. }
  1940. .jiesuan{
  1941. width: 100%;
  1942. height: 100%;
  1943. font-size: 28upx;
  1944. border-top-right-radius:100upx;
  1945. border-bottom-right-radius:100upx;
  1946. text-align: center;
  1947. display: flex;
  1948. justify-content:center;
  1949. align-self: center;
  1950. align-items: center;
  1951. background: linear-gradient(45deg, $hx-theme-color-light, $hx-theme-color);
  1952. font-weight: bold;
  1953. color: #222222;
  1954. }
  1955. }
  1956. }
  1957. .zz{
  1958. position: absolute;
  1959. top: 0;
  1960. left: 0;
  1961. right: 0;
  1962. bottom: 0;
  1963. background-color: rgba(0,0,0,.7);
  1964. z-index: 1;
  1965. }
  1966. .cart-box{
  1967. display: flex;
  1968. justify-content: flex-start;
  1969. flex-flow: column;
  1970. background: #ffffff;
  1971. position: absolute;
  1972. bottom: 0;
  1973. z-index: 2;
  1974. max-height: 66%;
  1975. padding-bottom: 62px;
  1976. border-top-left-radius: 16px;
  1977. border-top-right-radius: 16px;
  1978. overflow: hidden;
  1979. width: 100%;
  1980. .rebate-box{
  1981. height: 30px;
  1982. background: #FFC107;
  1983. color: #FF9900;
  1984. text-align: center;
  1985. line-height: 30px;
  1986. font-size: 14px;
  1987. }
  1988. .box-container{
  1989. box-sizing: border-box;
  1990. padding:0 16px;
  1991. }
  1992. .operating-box{
  1993. font-size: 12px;
  1994. line-height: 40px;
  1995. height: 40px;
  1996. border-bottom: 1px solid #f6f6f6;
  1997. color: #666666;
  1998. display: flex;
  1999. flex-direction: row;
  2000. &_right{
  2001. flex: 1;
  2002. }
  2003. &_left{
  2004. display: flex;
  2005. flex-direction: row;
  2006. }
  2007. }
  2008. .goods-box{
  2009. height: 100%;
  2010. overflow: hidden;
  2011. flex: 1;
  2012. display: flex;
  2013. .goods-list-scroll{
  2014. height: 100%;
  2015. .goods-list{
  2016. width: 100%;
  2017. display: flex;
  2018. flex-wrap: wrap;
  2019. .box{
  2020. width: 100%;
  2021. border-bottom: 1px solid #f6f6f6;
  2022. box-sizing: border-box;
  2023. padding: 0 16px;
  2024. .m-store-item{
  2025. display: flex;
  2026. flex-direction: row;
  2027. width: 100%;
  2028. justify-content: space-between;
  2029. align-items: flex-end;
  2030. padding-top: 15px;
  2031. padding-bottom: 15px;
  2032. .m-img{
  2033. flex: 0 0 85px;
  2034. height: 85px;
  2035. background: #eee;
  2036. border-radius: 4px;
  2037. }
  2038. .m-text{
  2039. flex: 1;
  2040. position: relative;
  2041. height: 85px;
  2042. padding: 0 6px;
  2043. display: flex;
  2044. align-content: space-between;
  2045. flex-direction: column;
  2046. .m-title{
  2047. font-size: 16px;
  2048. color:#555555;
  2049. height: 21px;
  2050. font-weight: bold;
  2051. }
  2052. .m-descripe{
  2053. font-size: 12px;
  2054. color:#999999;
  2055. margin-top: 5px;
  2056. height: 35px;
  2057. }
  2058. .m-price-box{
  2059. height: 24px;
  2060. font-weight: bold;
  2061. display: flex;
  2062. flex-direction: row;
  2063. align-items: flex-end;
  2064. .symbol{
  2065. color:#ff582b;
  2066. font-size: 12px;
  2067. }
  2068. .m-price{
  2069. position: relative;
  2070. top: 2px;
  2071. font-size: 18px;
  2072. color:#ff582b;
  2073. }
  2074. .m-old-price{
  2075. margin-left: 3px;
  2076. display: flex;
  2077. flex-direction: row;
  2078. font-size: 10px;
  2079. color:#999999;
  2080. margin-top: 5upx;
  2081. text-decoration: line-through;
  2082. font-weight: normal;
  2083. }
  2084. }
  2085. .m-distance{
  2086. position: absolute;
  2087. right: 0;
  2088. bottom: -4px;
  2089. z-index: 16;
  2090. color:#b2b2b2;
  2091. font-size: 20upx;
  2092. text-align: right;
  2093. .jumpPosition{
  2094. position: absolute;
  2095. bottom: 23px;
  2096. right: 0;
  2097. z-index: 2;
  2098. width: 28px;
  2099. height: 28px;
  2100. }
  2101. }
  2102. }
  2103. }
  2104. }
  2105. }
  2106. }
  2107. }
  2108. }
  2109. }
  2110. .form-main{
  2111. display: flex;
  2112. flex-direction: column;
  2113. justify-content: left;
  2114. padding: 15px;
  2115. .form-main_ctn{
  2116. display: flex;
  2117. flex-direction: column;
  2118. justify-content: left;
  2119. padding: 23px 22px 22px 22px;
  2120. background-color: #fff;
  2121. border-radius: 8px;
  2122. .godos_tit{
  2123. margin-top: 4px;
  2124. margin-bottom: 6px;
  2125. font-size: 18px;
  2126. font-weight: bold;
  2127. color: #333;
  2128. }
  2129. .gg_tit{
  2130. margin-top: 8px;
  2131. font-size: 14px;
  2132. font-weight: bold;
  2133. color: #555;
  2134. }
  2135. .gg_box{
  2136. margin-top: 8px;
  2137. display: flex;
  2138. flex-direction: row;
  2139. flex-wrap: wrap;
  2140. font-size: 12;
  2141. color: #333;
  2142. .item{
  2143. margin-right: 14px;
  2144. margin-bottom: 14px;
  2145. border: 1px solid #f1f1f1;
  2146. border-radius: 4px;
  2147. padding: 4px 6px;
  2148. }
  2149. .item.active{
  2150. border-color: #ffe081;
  2151. background-color: #fff0b7;
  2152. }
  2153. }
  2154. .select_gg{
  2155. margin: 26px -12px 0;
  2156. padding: 6px 12px;
  2157. color: #999;
  2158. background-color: #f9f9f9;
  2159. display: flex;
  2160. flex-direction: row;
  2161. .lable{
  2162. }
  2163. .select_gg_box{
  2164. flex: 1;
  2165. display: flex;
  2166. flex-direction: row;
  2167. flex-wrap: wrap;
  2168. .gg-item{
  2169. color: #333;
  2170. .gg-item-cut{
  2171. margin-left: 3px;
  2172. margin-right: 3px;
  2173. }
  2174. }
  2175. .gg-item:last-child{
  2176. .gg-item-cut{
  2177. display: none;
  2178. }
  2179. }
  2180. }
  2181. }
  2182. .bottom{
  2183. position: relative;
  2184. display: flex;
  2185. flex-direction: row;
  2186. margin-top: 12px;
  2187. .price_box{
  2188. flex: 1;
  2189. lign-items: baseline;
  2190. color: #ff582b;
  2191. font-size: 14px;
  2192. position: relative;
  2193. top: 4px;
  2194. .price{
  2195. font-size: 24px;
  2196. }
  2197. }
  2198. .jumpPosition{
  2199. position: absolute;
  2200. right: 16px;
  2201. top: 2px;
  2202. }
  2203. .form-btn-box{
  2204. height: 30px;
  2205. line-height: 30px;
  2206. .add-btn{
  2207. border-radius: 50px;
  2208. background-color: #ffce3c;
  2209. padding: 0 12px;
  2210. display: flex;
  2211. height: 30px;
  2212. line-height: 30px;
  2213. align-items: center;
  2214. i{
  2215. font-weight: bold;
  2216. font-size: 18px;
  2217. margin-right: 3px;
  2218. margin-left: -4px;
  2219. }
  2220. text{
  2221. font-size: 14px;
  2222. font-weight: bold;
  2223. color: #363636;
  2224. }
  2225. }
  2226. }
  2227. }
  2228. }
  2229. .close{
  2230. position: absolute;
  2231. left: 50%;
  2232. margin-left: -20px;
  2233. bottom: -70px;
  2234. border-radius: 50%;
  2235. height: 40px;
  2236. width: 40px;
  2237. background-color: #fff;
  2238. opacity: 0.7;
  2239. text-align: center;
  2240. line-height: 43px;
  2241. i{
  2242. font-weight: bold;
  2243. font-size: 22px;
  2244. }
  2245. }
  2246. }
  2247. </style>