product.vue 49 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006
  1. <template>
  2. <view :class="['qn-page-' + theme]">
  3. <u-navbar :is-back="false" title-color="#000000" :title-bold="true" title-size="36" :title="goods_detail.title">
  4. <view class="back-icon ibonfont ibonfanhui" @click="back"></view>
  5. </u-navbar>
  6. <block v-if="goods_detail.id">
  7. <!-- 底部菜单 -->
  8. <view class="footer">
  9. <view class="icons">
  10. <view class="box" @click="goPage('/pages/index/index', 'switchTab')">
  11. <view class="icon ibonfont ibonhome"></view>
  12. <view class="text">首页</view>
  13. </view>
  14. <view class="box" @click="goPage('/pages/cart/cart', 'switchTab')">
  15. <u-badge v-if="cartNum > 0" type="error" :offset="[-18, -24]" :count="cartNum"></u-badge>
  16. <view class="icon ibonfont iboncart"></view>
  17. <view class="text">购物车</view>
  18. </view>
  19. <!-- #ifdef MP-WEIXIN -->
  20. <view class="box" @click="shareGoods">
  21. <view class="icon ibonfont ibonfenxiang2"></view>
  22. <view class="text">分享</view>
  23. </view>
  24. <!-- #endif -->
  25. </view>
  26. <block v-if="goods_detail.isDistribution === 4 && goods_detail.inventorTotal <= 0">
  27. <view v-if="!(goods_detail.inventorTotal - 0) || goods_detail.inventorTotal - 0 <= 0" class="btn">
  28. <view class="buy primary-bg" style="background-color: #666666 !important;">补货中</view>
  29. </view>
  30. </block>
  31. <view v-else class="btn">
  32. <view class="buy primary-fu-bg" @click="openaddcartPop('btn')">立即购买</view>
  33. <view class="buy primary-bg" @click="openaddcartPop('btn')">加入购物车</view>
  34. </view>
  35. </view>
  36. <!-- 商品主图轮播 -->
  37. <view class="swiper-box">
  38. <swiper circular="true" autoplay="true" @change="swiperChange">
  39. <swiper-item v-for="(item, index) in imgList" :key="index">
  40. <image :src="item" mode="aspectFit" @click="previewImage(index)"></image>
  41. </swiper-item>
  42. </swiper>
  43. <view class="indicator">{{ currentSwiper + 1 }}/{{ imgList.length }}</view>
  44. </view>
  45. <!-- 标题 价格 -->
  46. <view class="goods-info">
  47. <!-- 限时秒杀 -->
  48. <view class="price-view clearfix active-view" v-if="now_sku_data.isActivity === 5">
  49. <view class="float_left active-left">
  50. <view class="active-left-top">
  51. <block v-if="!showGoodsPrice">
  52. <view style="display: inline-block;">
  53. <text class="rmb-ic">¥</text>
  54. <!-- 选择规格 -->
  55. <view v-if="now_sku_data.id" style="display: inline-block;">
  56. <rich-text v-if="now_sku_data.havActivity === 5"
  57. :nodes="$_utils.splitPrice(now_sku_data.activity.activityPrice, 12)">
  58. </rich-text>
  59. <rich-text v-else-if="now_sku_data.enabledLadder === 1"
  60. :nodes="$_utils.splitPrice(ladderPriceChange(), 12)"></rich-text>
  61. <rich-text v-else :nodes="$_utils.splitPrice(now_sku_data.salePrice, 12)">
  62. </rich-text>
  63. </view>
  64. <!-- 没有选择规格 -->
  65. <block v-else>
  66. <view style="display: inline-block;" v-if="goods_detail.isEq === 4">
  67. <rich-text :nodes="$_utils.splitPrice(goods_detail.minSalePrice, 12)">
  68. </rich-text>
  69. </view>
  70. <view v-else style="display: inline-block;">
  71. <rich-text :nodes="$_utils.splitPrice(goods_detail.maxSalePrice, 12)">
  72. </rich-text>
  73. </view>
  74. </block>
  75. </view>
  76. <text class="market-price">¥{{ goods_detail.maxMarketPrice }}</text>
  77. </block>
  78. <view style="display: inline-block;" class="showGoodsPrice" v-else>{{ showGoodsPrice }}</view>
  79. </view>
  80. <view class="goods-num">
  81. <view class="num-li" v-if="base_set_info.isSalesNum === 5">
  82. 已售{{ now_sku_data.realSalesNum || goods_detail.realSalesNum }}</view>
  83. <view class="num-li" v-if="base_set_info.stockDisplay !== 4">
  84. 库存
  85. <block v-if="base_set_info.stockDisplay === 5">
  86. <text
  87. v-if="goods_detail.isEq !== 5">{{ (now_sku_data.inventory || goods_detail.inventory) >= 1 ? '有货' : '库存不足' }}</text>
  88. <text v-else>{{ eq_sku_jian.inventory >= 1 ? '有货' : '库存不足' }}</text>
  89. </block>
  90. <!-- 抄码商品直接展示辅助单位的库存 -->
  91. <text v-if="base_set_info.stockDisplay === 6">
  92. {{ goods_detail.isEq === 5 ? Math.floor(eq_sku_jian.otherNum) : Math.floor(now_sku_data.inventory || goods_detail.inventory) }}
  93. </text>
  94. </view>
  95. </view>
  96. </view>
  97. <view class="float_right active-right clearfix">
  98. <view class="ac-r-left float_left">
  99. <view class="active-ic">
  100. <text class="ibonfont ibonshijian"></text>
  101. <text>限时秒杀</text>
  102. </view>
  103. <view class="active-desc">
  104. 每人限购{{ now_sku_data.activity.limitNum }}{{ now_sku_data.unitName }}</view>
  105. </view>
  106. <view class="ac-r-right float_right">
  107. <view class="time-title">距离结束时间</view>
  108. <view class="count-down">
  109. <block v-if="phaseTime.day > 0">
  110. <text class="day-num">{{ phaseTime.day }}</text>
  111. <text class="day-text">天</text>
  112. </block>
  113. <u-count-down height="40" color="#ffffff" separator-size="36" font-size="26"
  114. border-color="#000000" bg-color="#000000" separator-color="#000000"
  115. :timestamp="phaseTime.second" :show-days="false"></u-count-down>
  116. </view>
  117. </view>
  118. </view>
  119. </view>
  120. <!-- 商品信息 -->
  121. <view class="price-view primary-bg clearfix" v-else>
  122. <view class="price-out">
  123. <block v-if="!showGoodsPrice">
  124. <view style="display: inline-block;">
  125. <text class="rmb-ic">¥</text>
  126. <!-- 选择规格 -->
  127. <view v-if="now_sku_data.id" style="display: inline-block;">
  128. <rich-text v-if="now_sku_data.havActivity === 5"
  129. :nodes="$_utils.splitPrice(now_sku_data.activity.activityPrice, 12)">
  130. </rich-text>
  131. <rich-text v-else-if="now_sku_data.enabledLadder === 1"
  132. :nodes="$_utils.splitPrice(ladderPriceChange(), 12)"></rich-text>
  133. <rich-text v-else :nodes="$_utils.splitPrice(now_sku_data.salePrice, 12)">
  134. </rich-text>
  135. </view>
  136. <!-- 没有选择规格 -->
  137. <block v-else>
  138. <view style="display: inline-block;" v-if="goods_detail.isEq === 4">
  139. <rich-text :nodes="$_utils.splitPrice(goods_detail.minSalePrice, 12)">
  140. </rich-text>
  141. </view>
  142. <view v-else style="display: inline-block;">
  143. <rich-text :nodes="$_utils.splitPrice(goods_detail.maxSalePrice, 12)">
  144. </rich-text>
  145. </view>
  146. </block>
  147. </view>
  148. <view class="vip-price clearfix" v-if="goods_detail.minMemberPrice > 0 && !now_sku_data.id">
  149. <view class="price-text">
  150. ¥{{ goods_detail.isEq === 5 ? goods_detail.maxMemberPrice : goods_detail.minMemberPrice }}
  151. </view>
  152. <view class="price-bs">vip</view>
  153. </view>
  154. <block v-else>
  155. <view class="vip-price clearfix" v-if="now_sku_data.memberPrice > 0">
  156. <view class="price-text">¥{{ now_sku_data.memberPrice }}</view>
  157. <view class="price-bs">vip</view>
  158. </view>
  159. </block>
  160. </block>
  161. <view style="display: inline-block;" class="showGoodsPrice" v-else>{{ showGoodsPrice }}</view>
  162. <view class="market-price">¥{{ goods_detail.maxMarketPrice }}</view>
  163. </view>
  164. <view class="right-view">
  165. <view class="goods-num">
  166. <view class="num-li" v-if="base_set_info.isSalesNum === 5">
  167. 已售{{ now_sku_data.realSalesNum || goods_detail.realSalesNum }}</view>
  168. <view class="num-li" v-if="base_set_info.stockDisplay !== 4">
  169. 库存
  170. <!-- 抄码商品直接展示辅助单位的库存 -->
  171. <block v-if="base_set_info.stockDisplay === 5">
  172. <text
  173. v-if="goods_detail.isEq !== 5">{{ (now_sku_data.inventory || goods_detail.inventory) > 0 ? '有货' : '库存不足' }}</text>
  174. <text v-else>{{ eq_sku_jian.inventory >= 1 ? '有货' : '库存不足' }}</text>
  175. </block>
  176. <text v-if="base_set_info.stockDisplay === 6">
  177. {{ goods_detail.isEq === 5 ? Math.floor(eq_sku_jian.otherNum) : Math.floor(now_sku_data.inventory || goods_detail.inventory) }}
  178. </text>
  179. </view>
  180. </view>
  181. </view>
  182. </view>
  183. <view class="goods-info-main">
  184. <view class="lap-info" v-if="false">
  185. <view class="lap-li" v-for="(item, index) in now_sku_data.ladderPrice" :key="index">
  186. <view class="laprice-text">
  187. <text class="rmb-icon">¥</text>
  188. <text>{{ item.price }}</text>
  189. </view>
  190. <view class="laprice-goods-num" v-if="index + 1 === now_sku_data.ladderPrice.length">
  191. ≥{{ item.from }}{{ now_sku_data.unitName }}</view>
  192. <view class="laprice-goods-num" v-else>
  193. {{ item.from }}~{{ item.to }}{{ now_sku_data.unitName }}</view>
  194. </view>
  195. </view>
  196. <view class="clearfix top-title">
  197. <view class="title float_left ellipsis">
  198. <view class="goods-brand primary-bg" v-if="goods_detail.isEq === 5">抄码</view>
  199. <view class="goods-brand primary-bg" v-if="goods_detail.brandName">
  200. {{ goods_detail.brandName }}</view>
  201. {{ goods_detail.title || '' }}
  202. </view>
  203. <view @click="collectGoods" class="float_right collection-btn">
  204. <view><text
  205. :class="[goods_detail.isCollect ? 'ibonjiarushoucang1 primary-color' : 'ibonjiarushoucang']"
  206. class="ibonfont"></text></view>
  207. <view>{{ goods_detail.isCollect ? '已收藏' : '加入收藏' }}</view>
  208. </view>
  209. </view>
  210. <view class="describe ellipsis">{{ goods_detail.describe }}</view>
  211. <!-- 活动 -->
  212. <view class="active-box" v-if="now_sku_data.isActivity === 5">
  213. <view class="row">
  214. <view class="text">活动</view>
  215. <view class="content">
  216. <view class="ac-li">
  217. <view class="ac-label">限时秒杀</view>
  218. <view class="ac-activityTitle">{{ now_sku_data.activity.title }}</view>
  219. <view class="ac-value">
  220. 商品活动数量
  221. <text class="ac-p">{{ now_sku_data.activity.activityNum }}</text>
  222. {{ now_sku_data.unitName }}
  223. </view>
  224. </view>
  225. </view>
  226. </view>
  227. </view>
  228. </view>
  229. </view>
  230. <!--规则选择 -->
  231. <view class="info-box" style="margin-top: 0;">
  232. <view class="row" v-if="goods_detail.unitData.length > 1">
  233. <view class="text">换算</view>
  234. <view class="content">
  235. <block v-for="(item, index) in goods_detail.unitData" :key="index">
  236. <view v-if="item.isMaster === 4" class="conversion">
  237. <text
  238. v-if="goods_detail.isEq === 5">1{{ item.unitName }}≈{{ item.conversion }}{{ goods_detail.unitName }}</text>
  239. <text
  240. v-else>1{{ item.unitName }}={{ item.conversion }}{{ goods_detail.unitName }}</text>
  241. </view>
  242. </block>
  243. </view>
  244. </view>
  245. <view class="row" @click="openaddcartPop">
  246. <view class="text">已选</view>
  247. <view class="content">
  248. <text v-if="!now_sku_data.id" class="no-sel">请选择规格</text>
  249. <view v-else>
  250. <text>{{ buy_num }}{{ now_sku_data.unitName }};</text>
  251. <block v-for="(item, index) in now_sku_data.specGroup" :key="index">
  252. <text v-if="index > 0" style="padding: 0 10upx;">/</text>
  253. <text>{{ item.specValueName }}</text>
  254. </block>
  255. <text v-if="goods_detail.isEq === 5">{{ unitsalePrice }}元/{{ eq_sku_kg.unitName }}</text>
  256. </view>
  257. </view>
  258. <view class="arrow">
  259. <view class="icon ibonfont ibonjinru"></view>
  260. </view>
  261. </view>
  262. <view class="row" v-if="goods_detail.expressType === 1">
  263. <view class="text">运费</view>
  264. <view class="content">
  265. <text>包邮</text>
  266. <!-- <text>{{ goods_detail.expressFee > 0 ? goods_detail.expressFee + '元' : '免运费' }}</text> -->
  267. <!-- <text style="font-size: 24rpx;">(请以提交订单为准)</text> -->
  268. </view>
  269. </view>
  270. <view class="row" @click="openService" v-if="goods_detail.support.length">
  271. <view class="text">服务</view>
  272. <view class="content">
  273. <view class="service-li" v-for="(item, index) in goods_detail.support" :key="index">
  274. <text v-if="!item.Icon"
  275. class="ibonfont ibonjiarushoucang primary-color service-icon"></text>
  276. <image v-else class="icon" :src="item.Icon" mode="aspectFill"></image>
  277. <text>{{ item.servicesName }}</text>
  278. </view>
  279. </view>
  280. <view class="arrow">
  281. <view class="icon ibonfont ibonjinru"></view>
  282. </view>
  283. </view>
  284. </view>
  285. <!-- 组合套餐 -->
  286. <view class="info-box" v-if="total > 0 && isLogin && combinedPackage.length > 0">
  287. <view class="row">
  288. <view class="text">组合套餐</view>
  289. <view class="content">
  290. <text>{{ total }}组套餐,最多可省¥{{ combinedPackage[0].originPrice - combinedPackage[0].price - 0 }}</text>
  291. </view>
  292. </view>
  293. <view class="group-ul" v-for="(item, index) in combinedPackage" :key="index">
  294. <view class="group-li clearfix" @click="goPage('/pageT/goodsGroup/goodsGroupDetail?id=' + item.id)">
  295. <view class="float_left">
  296. <scroll-view scroll-x="true" class="left-scroll">
  297. <view class="goods-ul">
  298. <block v-for="(item1, index1) in item.goodsData" :key="index1">
  299. <view class="goods-li">
  300. <image :src="item1.images[0]" mode="aspectFill"></image>
  301. <view class="goods-name ellipsis">{{ item1.title }}</view>
  302. </view>
  303. <view class="plus-icon" v-if="index1 !== item.goodsData.length - 1">
  304. <u-icon name="plus" color="#cecece" size="28"></u-icon>
  305. </view>
  306. </block>
  307. </view>
  308. </scroll-view>
  309. </view>
  310. <view class="float_left dy-icon"><text class="ibonfont ibonicon"></text></view>
  311. <view class="float_left price-right">
  312. <view class="group-price">
  313. <text>套餐价</text>
  314. <text class="primary-color">¥{{ item.price - 0 }}</text>
  315. </view>
  316. <view class="save-price primary-color">可省¥{{ item.originPrice - item.price - 0 }}</view>
  317. <view class="buy-btn primary-bg">立即购买</view>
  318. </view>
  319. </view>
  320. </view>
  321. <view class="setMeal_more" @click="is_setMeal_show = true">
  322. <text style="margin-right: 10rpx;">查看更多套餐</text>
  323. <u-icon name="arrow-right" size="24"></u-icon>
  324. </view>
  325. </view>
  326. <!-- 详情 -->
  327. <view class="description">
  328. <view class="title">———— 商品详情 ————</view>
  329. <view class="content">
  330. <u-parse :html="goods_detail.content || goods_detail.description"></u-parse>
  331. </view>
  332. </view>
  333. </block>
  334. <u-popup mode="bottom" v-model="sharePop">
  335. <view class="share-tit">分享</view>
  336. <view class="share-ul">
  337. <!-- #ifdef MP -->
  338. <view class="share-li">
  339. <button class="share-btn" open-type="share">
  340. <view class="icon-view">
  341. <u-icon name="weixin-fill" top="12" color="#ffffff" size="60"></u-icon>
  342. </view>
  343. <view class="share-btn-label">分享给好友</view>
  344. </button>
  345. </view>
  346. <!-- #endif -->
  347. <view class="share-li" @click="generatePoster">
  348. <button class="share-btn">
  349. <view class="icon-view">
  350. <u-icon name="photo-fill" top="12" color="#ffffff" size="60"></u-icon>
  351. </view>
  352. <view class="share-btn-label">生成分享海报</view>
  353. </button>
  354. </view>
  355. </view>
  356. <view class="share-cancel" @click="cancelPop">取消分享</view>
  357. </u-popup>
  358. <!-- 商品服务 -->
  359. <u-popup mode="bottom" v-model="service_pop" border-radius="12" closeable close-icon-color="#222222">
  360. <view class="service-pop">
  361. <view class="title">商品服务</view>
  362. <view class="service-ul">
  363. <view class="service-li ellipsis" v-for="(item, index) in goods_detail.support" :key="index">
  364. <view>
  365. <text v-if="!item.Icon" class="ibonfont ibonjiarushoucang primary-color"></text>
  366. <image v-else class="icon" :src="item.Icon" mode="aspectFill"></image>
  367. <text class="text">{{ item.servicesName }}</text>
  368. </view>
  369. <view class="desc ellipsis">{{ item.describe }}</view>
  370. </view>
  371. </view>
  372. <view class="primary-btn confirm-btn" @click="cancelService">确定</view>
  373. </view>
  374. </u-popup>
  375. <!-- 海报 -->
  376. <u-popup class="no-pop-bg" v-model="canvasPop" mode="center" :border-radius="12" :mask-close-able="false">
  377. <view v-if="imgList.length && QrSrc && is_poster">
  378. <wm-poster :Width="600" :imgSrc="imgList[0]" :QrSrc="QrSrc" :Title="goods_detail.title"
  379. :PriceTxt="!showGoodsPrice ? '¥' + goods_detail.salePrice : ''"
  380. :OriginalTxt="!showGoodsPrice ? '¥' + goods_detail.marketPrice : ''" @saveImage="saveImage"
  381. @cancelImg="cancelImg"></wm-poster>
  382. </view>
  383. </u-popup>
  384. <!-- 加载动画 -->
  385. <!-- 加入购物车弹窗 -->
  386. <AddCardModel :isList="false" :selAddress="now_sel_address" @buyNumchange="buyNumchange" @skuChange="skuChange"
  387. @close="is_add_show = false" @change="closeaddcartPop" :skuId="skuId" :isShow="is_add_show"
  388. :goodsId="goods_id" />
  389. <setMealMore :goods_id="goods_id" :shopId="goods_detail.shopId" :isShow="is_setMeal_show"
  390. @close="is_setMeal_show = false" />
  391. </view>
  392. </template>
  393. <script>
  394. import wmPoster from '../components/wm-poster/wm-poster.vue';
  395. import webUrl from '../../config.js';
  396. import AddCardModel from '@/components/AddCardModel';
  397. import setMealMore from '@/components/setMealMore';
  398. export default {
  399. components: {
  400. wmPoster,
  401. AddCardModel,
  402. setMealMore
  403. },
  404. computed: {
  405. cartNum() {
  406. return this.$store.state.cartNum;
  407. },
  408. showGoodsPrice() {
  409. if (this.$store.state.baseSet.goodsPrice === 5 && this.$common.isLogin()) {
  410. return '';
  411. } else if (!this.$common.isLogin() && this.$store.state.baseSet.goodsPrice === 4) {
  412. return '请登录';
  413. } else if (this.$store.state.userStatus.enableStatus === 4 && this.$store.state.baseSet.goodsPrice === 4) {
  414. return '已禁用';
  415. } else if (this.$store.state.userStatus.status !== 2 && this.$store.state.baseSet.goodsPrice === 4) {
  416. if (this.$store.state.userStatus.status === 0) {
  417. return '待审核';
  418. } else if (this.$store.state.userStatus.status === 1) {
  419. return '审核中';
  420. } else if (this.$store.state.userStatus.status === 3) {
  421. return '已驳回';
  422. }
  423. } else {
  424. return '';
  425. }
  426. },
  427. isLogin() {
  428. return this.$store.state.hasLogin;
  429. },
  430. // 辅助单位价格
  431. unitsalePrice() {
  432. if (this.goods_detail.isEq === 5) {
  433. if (this.eq_sku_kg.enabledLadder !== 1) {
  434. return this.eq_sku_kg.salePrice;
  435. } else {
  436. const unitnum = this.buy_num * Number(this.now_sku_data.conversion);
  437. const priceData = this.eq_sku_kg.ladderPrice.find(item => {
  438. return unitnum > item.from && unitnum <= item.to;
  439. });
  440. return priceData ? priceData.price : 0;
  441. }
  442. } else {
  443. return this.eq_sku_kg.salePrice;
  444. }
  445. }
  446. },
  447. data() {
  448. return {
  449. eq_sku_kg: {}, // 抄码商品kg
  450. eq_sku_jian: {}, // 抄码商品辅助单位
  451. //轮播图下标
  452. currentSwiper: 0,
  453. service_pop: false,
  454. sharePop: false, // 分享弹窗
  455. canvasPop: false, // 海报弹窗
  456. now_sel_address: {},
  457. is_not_express: true, // 当前选择区域是否能够配送
  458. address_data: {}, // 客户地址数据
  459. not_dispatch_areas: {}, // 该商品不能配送区域
  460. is_add_show: false,
  461. is_poster: false,
  462. buy_num: 1,
  463. discountList: [],
  464. activity: [],
  465. maskState: false,
  466. indicatorDots: true, //是否显示面板指示点
  467. autoplay: true, //是否自动切换
  468. interval: 2000,
  469. duration: 500,
  470. goods_detail: {},
  471. goods_id: '',
  472. unit_list: [],
  473. uni_index: 0,
  474. specClass: 'none',
  475. specSelected: [],
  476. specList: [],
  477. isCollect: false,
  478. imgList: [],
  479. phaseTime: {
  480. second: 0,
  481. day: 0
  482. },
  483. coupon_price: '', //领券活动价格
  484. skuId: '', //商品的规格
  485. source: 5,
  486. QrSrc: '',
  487. base_set_info: {},
  488. spec_id_group: [],
  489. now_sku_data: {},
  490. startDeliveryPrice: 0,
  491. isSalesNum: 4, // 起送价
  492. pageName: '', // 启动页标示
  493. is_setMeal_show: false, //组合套餐弹窗
  494. combinedPackage: [],
  495. total: 0,
  496. shopId: ''
  497. };
  498. },
  499. onShow() {
  500. if (this.now_sel_address.provinceCode) {
  501. this.address_data = this.now_sel_address;
  502. if (this.not_dispatch_areas.areas) {
  503. if (this.address_data.districtCode) {
  504. this.is_not_express = this.not_dispatch_areas.areas.indexOf(parseInt(this.address_data
  505. .districtCode)) === -1;
  506. } else if (this.address_data.cityCode) {
  507. this.is_not_express = this.not_dispatch_areas.citys.indexOf(parseInt(this.address_data
  508. .cityCode)) === -1;
  509. } else {
  510. this.is_not_express = this.not_dispatch_areas.provinces.indexOf(parseInt(this.address_data
  511. .provinceCode)) === -1;
  512. }
  513. }
  514. }
  515. },
  516. onShareAppMessage() {
  517. return {
  518. title: this.goods_detail.title,
  519. path: `/pagesT/product/product?id=${this.goods_id}&businessmanId=${this.$store.state.userStatus.id || ''}`,
  520. imageUrl: this.imgList[0],
  521. success: res => {
  522. console.log(res);
  523. }
  524. };
  525. },
  526. // #ifdef MP-WEIXIN
  527. // 分享到朋友圈
  528. onShareTimeline(obj) {
  529. console.log('分享到朋友圈::', obj);
  530. },
  531. // 收藏小程序
  532. onAddToFavorites() {},
  533. // #endif
  534. watch: {
  535. async '$store.state.locationObj'(val) {
  536. if (JSON.stringify(val) === '{}') {
  537. this.getAuthorizeInfo();
  538. return;
  539. }
  540. await this.getGoodsDetail();
  541. await this.getQrSrc();
  542. },
  543. isLogin() {
  544. this.getGoodsDetail();
  545. }
  546. },
  547. async onLoad(options) {
  548. if (options.pageName) {
  549. this.pageName = options.pageName;
  550. }
  551. // 起送价
  552. this.startDeliveryPrice = this.$store.state.baseSet.startDeliveryPrice || 0;
  553. // #ifdef MP-WEIXIN
  554. // 小程序的原生菜单中显示分享按钮
  555. uni.showShareMenu({
  556. withShareTicket: false,
  557. menus: ['shareAppMessage', 'shareTimeline']
  558. });
  559. // 获取小程序分销商参数
  560. if (options.businessmanId) {
  561. this.$store.commit('commit_businessmanId', options.businessmanId);
  562. this.relationshipBusinessman(options.businessmanId);
  563. }
  564. // #endif
  565. // 接收传值
  566. if (options.id) {
  567. this.goods_id = options.id;
  568. } else {
  569. // 扫码进入
  570. const scene = decodeURIComponent(options.scene);
  571. this.goods_id = scene;
  572. }
  573. if (options.skuId) {
  574. this.skuId = parseInt(options.skuId);
  575. }
  576. // this.goods_id = 78;
  577. this.spec_id_group[0] = this.goods_id;
  578. this.base_set_info = this.$store.state.baseSet;
  579. if (JSON.stringify(this.$store.state.locationObj) === '{}') {
  580. this.getAuthorizeInfo();
  581. return;
  582. }
  583. this.getGoodsDetail();
  584. if (this.isLogin) {
  585. this.address_data = this.$store.state.nowAddress;
  586. if (this.address_data.provinceCode) {
  587. if (this.not_dispatch_areas.areas) {
  588. if (this.address_data.districtCode) {
  589. this.is_not_express = this.not_dispatch_areas.areas.indexOf(parseInt(this.address_data
  590. .districtCode)) === -1;
  591. } else if (this.address_data.cityCode) {
  592. this.is_not_express = this.not_dispatch_areas.citys.indexOf(parseInt(this.address_data
  593. .cityCode)) === -1;
  594. } else {
  595. this.is_not_express = this.not_dispatch_areas.provinces.indexOf(parseInt(this.address_data
  596. .provinceCode)) === -1;
  597. }
  598. }
  599. } else {
  600. await this.getAllShippingAddress();
  601. }
  602. }
  603. await this.getQrSrc();
  604. },
  605. methods: {
  606. openService() {
  607. this.service_pop = true;
  608. },
  609. // 商品服务弹窗
  610. cancelService() {
  611. this.service_pop = false;
  612. },
  613. // 获取地址列表
  614. getAllShippingAddress() {
  615. this.$u.api
  616. .getAllShippingAddress({
  617. page: 1,
  618. pageSize: 10
  619. })
  620. .then(({
  621. data
  622. }) => {
  623. if (data.length) {
  624. const address = data.find(item => item.defaultStatus === 5) || data[0];
  625. this.address_data = {
  626. provinceCode: address.provinceCode,
  627. cityCode: address.cityCode,
  628. districtCode: address.districtCode,
  629. provinceName: address.area.provinceName,
  630. cityName: address.area.cityName,
  631. districtName: address.area.districtName
  632. };
  633. this.$store.commit('commit_nowAddress', this.address_data);
  634. if (this.not_dispatch_areas.areas) {
  635. if (this.address_data.districtCode) {
  636. this.is_not_express = this.not_dispatch_areas.areas.indexOf(parseInt(this
  637. .address_data.districtCode)) === -1;
  638. } else if (this.address_data.cityCode) {
  639. this.is_not_express = this.not_dispatch_areas.citys.indexOf(parseInt(this
  640. .address_data.cityCode)) === -1;
  641. } else {
  642. this.is_not_express = this.not_dispatch_areas.provinces.indexOf(parseInt(this
  643. .address_data.provinceCode)) === -1;
  644. }
  645. }
  646. }
  647. });
  648. },
  649. // 修改购买金额
  650. buyNumchange(val) {
  651. this.buy_num = val;
  652. },
  653. // 切换商品规格属性
  654. skuChange(val) {
  655. this.now_sku_data = val;
  656. if (this.now_sku_data.activity && this.now_sku_data.activity.activityId) {
  657. let nowData = parseInt(new Date().getTime() / 1000);
  658. if (this.now_sku_data.activity.endTime && this.now_sku_data.activity.endTime - nowData > 0) {
  659. let totalSecond = this.now_sku_data.activity.endTime - nowData;
  660. this.phaseTime = {
  661. second: totalSecond % 86400,
  662. day: totalSecond <= 0 ? 0 : parseInt(totalSecond / 86400)
  663. };
  664. }
  665. }
  666. },
  667. // 收藏商品
  668. collectGoods() {
  669. if (!this.isLogin) {
  670. this.$api.msg('请登录');
  671. return;
  672. }
  673. if (this.goods_detail.isCollect) {
  674. this.goods_detail.isCollect = false;
  675. } else {
  676. this.goods_detail.isCollect = true;
  677. }
  678. this.$u.api.collectGoods(this.goods_id).then(res => {
  679. if (!this.goods_detail.isCollect) {
  680. this.$api.msg('已取消收藏');
  681. } else {
  682. this.$api.msg('已收藏');
  683. }
  684. });
  685. },
  686. getQrSrc() {
  687. // #ifdef MP-TOUTIAO
  688. let pathT = 'pagesT/product/product?id=' + this.goods_id;
  689. pathT = encodeURIComponent(pathT);
  690. this.$u.api
  691. .byteCreateQRCode({
  692. path: pathT,
  693. params: this.goods_id,
  694. appname: 'toutiao'
  695. })
  696. .then(data => {
  697. this.QrSrc = data.data.indexOf('https') > -1 ? data.data : webUrl.QRC_SRC + data.data;
  698. });
  699. // #endif
  700. // #ifdef MP-WEIXIN || H5
  701. let pathS = 'pagesT/product/product';
  702. this.$u.api
  703. .createwxaqrcode({
  704. path: pathS,
  705. params: this.goods_id
  706. })
  707. .then(data => {
  708. this.QrSrc = data.data.indexOf('https') > -1 ? data.data : webUrl.QRC_SRC + data.data;
  709. console.log(this.QrSrc);
  710. });
  711. // #endif
  712. },
  713. handelImg(url) {
  714. if (url.indexOf('?imageView2/2/w/750/h/750') > -1) {
  715. return url.replace('?imageView2/2/w/750/h/750', '');
  716. } else if (url.indexOf('?imageView2/2/w/750') > -1) {
  717. return url.replace('?imageView2/2/w/750', '');
  718. } else {
  719. return url;
  720. }
  721. },
  722. generatePoster() {
  723. // this.is_poster = true;
  724. // this.canvasPop = true;
  725. // this.sharePop = false;
  726. const pramas = {
  727. id: this.goods_detail.id,
  728. priceShop: '¥' + this.goods_detail.maxMarketPrice,
  729. headImgs: this.goods_detail.images.map(item => this.handelImg(item)),
  730. goodsImg: this.handelImg(this.goods_detail.images[0]),
  731. goodsName: this.goods_detail.title,
  732. goodsPrice: '¥' + this.goods_detail.minSalePrice,
  733. mainLogo: '',
  734. recommendCodeGoods: this.QrSrc,
  735. share: {
  736. shareContent: this.$store.state.baseSet.shop || '',
  737. shareImg: this.handelImg(this.goods_detail.images[0]),
  738. shareTitle: this.goods_detail.title,
  739. shareUrl: this.handelImg(this.goods_detail.images[0])
  740. }
  741. };
  742. uni.setStorageSync('posterData',pramas)
  743. uni.navigateTo({
  744. url: '/pagesT/product/goodsPoster'
  745. });
  746. },
  747. saveImage() {
  748. this.canvasPop = false;
  749. },
  750. cancelImg() {
  751. this.is_poster = false;
  752. this.canvasPop = false;
  753. },
  754. shareGoods() {
  755. this.sharePop = true;
  756. },
  757. //App分享为微信小程序(App中分享一个内容到微信好友,对方微信中呈现的是一个小程序卡片)
  758. shareFriend() {
  759. const path = '/pagesT/product/product?id=' + this.goods_id;
  760. uni.share({
  761. provider: 'weixin',
  762. scene: 'WXSceneSession',
  763. type: 5,
  764. imageUrl: this.imgList[0],
  765. title: this.goods_detail.title,
  766. miniProgram: {
  767. id: 'gh_16db94f79967', //微信小程序原始ID
  768. path: path,
  769. type: 0,
  770. webUrl: ''
  771. },
  772. success: ret => {
  773. console.log(JSON.stringify(ret));
  774. }
  775. });
  776. },
  777. // 分享弹窗关闭
  778. cancelPop() {
  779. this.sharePop = false;
  780. },
  781. // 如果是阶梯价
  782. ladderPriceChange() {
  783. return this.now_sku_data.ladderPrice.find(ladder => (this.buy_num || 1) >= ladder.from && (this.buy_num ||
  784. 1) <= ladder.to).price;
  785. },
  786. // 请求商品品详情
  787. async getGoodsDetail() {
  788. this.$u.api
  789. .getGoodsDetail(this.goods_id)
  790. .then(({
  791. data
  792. }) => {
  793. uni.setNavigationBarTitle({
  794. title: data.title
  795. });
  796. this.imgList = data.images;
  797. data.specGroup = data.specGroup.map(item => {
  798. return {
  799. ...item,
  800. params: item.params.map(itemP => {
  801. return {
  802. ...itemP,
  803. isdisabled: true
  804. };
  805. })
  806. };
  807. });
  808. this.goods_detail = data;
  809. // 抄码商品获取 KG 数据
  810. if (data.isEq === 5) {
  811. this.eq_sku_kg = data.specMultiple.find(item => item.isMaster === 5);
  812. this.eq_sku_jian = data.specMultiple.find(item => item.isMaster === 4);
  813. }
  814. this.not_dispatch_areas = data.express.ruleData.not_dispatch_areas;
  815. if (this.skuId) {
  816. // 如果已有选中的skuId 根据ID匹配对应规格数据
  817. const specMultiple = data.specMultiple.find(item => item.id === parseInt(this.skuId));
  818. if (specMultiple.isSale !== 4) {
  819. this.now_sku_data = specMultiple;
  820. }
  821. } else if (data.specMultiple.length === 1 && data.specMultiple[0].isSale !== 4) {
  822. this.now_sku_data = data.specMultiple[0];
  823. } else {
  824. // 如果当前商品是非抄码商品 默认选中默认规格
  825. if (data.isEq === 4) {
  826. const specMultiple = data.specMultiple.find(item => item.isDefault === 5);
  827. if (specMultiple && specMultiple.isSale !== 4) {
  828. this.now_sku_data = specMultiple;
  829. }
  830. } else {
  831. // 抄码商品默认选中一个
  832. const specMultiple = data.specMultiple.find(item => item.isMaster === 4);
  833. if (specMultiple && specMultiple.isSale !== 4) {
  834. this.now_sku_data = specMultiple;
  835. }
  836. }
  837. }
  838. if (this.now_sku_data.activity && this.now_sku_data.activity.activityId) {
  839. let nowData = parseInt(new Date().getTime() / 1000);
  840. if (this.now_sku_data.activity.endTime && this.now_sku_data.activity.endTime -
  841. nowData > 0) {
  842. let totalSecond = this.now_sku_data.activity.endTime - nowData;
  843. this.phaseTime = {
  844. second: totalSecond % 86400,
  845. day: totalSecond <= 0 ? 0 : parseInt(totalSecond / 86400)
  846. };
  847. }
  848. }
  849. // 获取该商品的组合套餐
  850. if (this.isLogin) {
  851. this.listsApiComBinPackage();
  852. }
  853. })
  854. .catch(err => {
  855. setTimeout(() => {
  856. uni.navigateBack();
  857. }, 1500);
  858. });
  859. },
  860. //分享
  861. share() {
  862. this.$refs.share.toggleMask();
  863. },
  864. openaddcartPop(type) {
  865. if (!this.is_not_express) return;
  866. this.is_add_show = true;
  867. },
  868. // 关闭加入购物车弹窗
  869. closeaddcartPop(obj) {
  870. if (!obj.show) {
  871. this.is_add_show = false;
  872. }
  873. },
  874. previewImage(index) {
  875. let urls = JSON.parse(JSON.stringify(this.imgList));
  876. if (index > 0) {
  877. urls.unshift(urls[index]);
  878. }
  879. uni.previewImage({
  880. urls: urls,
  881. longPressActions: {
  882. itemList: ['发送给朋友', '保存图片', '收藏'],
  883. success: data => {
  884. console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
  885. },
  886. fail: err => {
  887. console.log(err.errMsg);
  888. }
  889. }
  890. });
  891. },
  892. //轮播图指示器
  893. swiperChange(event) {
  894. this.currentSwiper = event.detail.current;
  895. },
  896. back() {
  897. if (this.pageName) {
  898. this.goPage('/pages/index/index', 'switchTab');
  899. } else {
  900. uni.navigateBack();
  901. }
  902. },
  903. // 获取该商品的组合套餐
  904. listsApiComBinPackage() {
  905. if (!this.goods_detail.shopId) return;
  906. this.$u.api
  907. .listsApiComBinPackage({
  908. page: 1,
  909. pageSize: 10,
  910. shopId: this.goods_detail.shopId,
  911. goodsId: this.goods_id
  912. })
  913. .then(({
  914. data
  915. }) => {
  916. this.shopId = this.goods_detail.shopId;
  917. this.combinedPackage = data;
  918. this.total = data.length;
  919. });
  920. },
  921. // #ifdef MP
  922. // 添加分销上下级关系 source: 1:首次点击链接 2:首次下单 3:首次付款'
  923. async relationshipBusinessman(businessmanId) {
  924. console.log('上级ID', businessmanId);
  925. if (!this.$store.state.hasLogin) {
  926. // 没有登录不请求接口
  927. return;
  928. }
  929. await this.$u.api.relationshipBusinessman({
  930. businessmanId: businessmanId,
  931. source: 1
  932. });
  933. console.log('上下:', data.data);
  934. }
  935. // #endif
  936. }
  937. };
  938. </script>
  939. <style lang="scss">
  940. @keyframes showPopup {
  941. 0% {
  942. opacity: 0;
  943. }
  944. 100% {
  945. opacity: 1;
  946. }
  947. }
  948. @keyframes hidePopup {
  949. 0% {
  950. opacity: 1;
  951. }
  952. 100% {
  953. opacity: 0;
  954. }
  955. }
  956. @keyframes showLayer {
  957. 0% {
  958. transform: translateY(0);
  959. }
  960. 100% {
  961. transform: translateY(-100%);
  962. }
  963. }
  964. @keyframes hideLayer {
  965. 0% {
  966. transform: translateY(-100%);
  967. }
  968. 100% {
  969. transform: translateY(0);
  970. }
  971. }
  972. .icon {
  973. font-size: 26upx;
  974. }
  975. .back-icon {
  976. font-size: 36rpx;
  977. padding-left: 24rpx;
  978. color: #2a2a2a;
  979. }
  980. .swiper-box {
  981. background-color: #ffffff;
  982. position: relative;
  983. width: 100%;
  984. height: 100vw;
  985. swiper {
  986. width: 100%;
  987. height: 100vw;
  988. swiper-item {
  989. image {
  990. width: 100%;
  991. height: 100vw;
  992. background-color: #f5f5f5;
  993. }
  994. }
  995. }
  996. .indicator {
  997. display: flex;
  998. justify-content: center;
  999. align-items: center;
  1000. padding: 0 25upx;
  1001. height: 40upx;
  1002. border-radius: 4upx;
  1003. font-size: 22upx;
  1004. position: absolute;
  1005. bottom: 50upx;
  1006. right: 30upx;
  1007. color: #fff;
  1008. background-color: rgba(0, 0, 0, 0.2);
  1009. }
  1010. }
  1011. .goods-info {
  1012. overflow: hidden;
  1013. transform: translateY(-36rpx);
  1014. .seckill-view {
  1015. padding: 0 20upx;
  1016. height: 80upx;
  1017. line-height: 80upx;
  1018. background: linear-gradient(to right, #ff3859, #ff2d2e);
  1019. color: #ffffff;
  1020. .ibonxianshimiaosha {
  1021. font-size: 36rpx;
  1022. }
  1023. }
  1024. .price-view {
  1025. padding: 0 30rpx;
  1026. height: 152rpx;
  1027. background-color: #fa6400;
  1028. color: #ffffff;
  1029. border-radius: 48rpx 48rpx 0 0;
  1030. position: relative;
  1031. .price-out {
  1032. position: absolute;
  1033. top: 50%;
  1034. transform: translateY(calc(-50% - 16rpx));
  1035. font-size: 48rpx;
  1036. font-family: DIN-Medium;
  1037. .rmb-ic {
  1038. font-size: 24rpx;
  1039. }
  1040. .market-price {
  1041. text-decoration: line-through;
  1042. font-size: 24upx;
  1043. color: #ffffff;
  1044. opacity: 0.6;
  1045. font-weight: 400;
  1046. }
  1047. .vip-price {
  1048. display: inline-block;
  1049. margin-left: 20rpx;
  1050. line-height: 32rpx;
  1051. height: 32rpx;
  1052. border-radius: 4rpx;
  1053. overflow: hidden;
  1054. font-family: DINPro-Regular;
  1055. .price-text {
  1056. float: left;
  1057. min-width: 80rpx;
  1058. text-align: center;
  1059. vertical-align: middle;
  1060. font-size: 20rpx;
  1061. color: #ffdfa2;
  1062. background: linear-gradient(270deg, #1e5657 0%, #0d2b2c 100%);
  1063. padding: 0 8rpx;
  1064. }
  1065. .price-bs {
  1066. text-align: center;
  1067. float: left;
  1068. vertical-align: middle;
  1069. width: 32rpx;
  1070. background-color: #ffdfa2;
  1071. font-size: 20rpx;
  1072. color: #2c7564;
  1073. }
  1074. }
  1075. }
  1076. .right-view {
  1077. position: absolute;
  1078. right: 30rpx;
  1079. top: calc(50% - 16rpx);
  1080. transform: translateY(-50%);
  1081. font-size: 24rpx;
  1082. .goods-num {
  1083. text-align: right;
  1084. .num-li {
  1085. display: inline-block;
  1086. font-weight: 400;
  1087. margin-left: 20rpx;
  1088. }
  1089. }
  1090. }
  1091. }
  1092. .active-view {
  1093. padding: 0;
  1094. overflow: hidden;
  1095. // 限时秒杀样式
  1096. .active-left {
  1097. padding-left: 30rpx;
  1098. width: 270rpx;
  1099. line-height: normal;
  1100. padding-top: 20rpx;
  1101. .goods-num {
  1102. height: 28rpx;
  1103. line-height: 28rpx;
  1104. display: flex;
  1105. .num-li {
  1106. font-weight: 400;
  1107. margin-right: 20rpx;
  1108. font-size: 20rpx;
  1109. }
  1110. }
  1111. .market-price {
  1112. text-decoration: line-through;
  1113. font-size: 24upx;
  1114. color: #ffffff;
  1115. opacity: 0.6;
  1116. font-weight: 400;
  1117. }
  1118. }
  1119. .active-right {
  1120. padding-right: 30rpx;
  1121. width: 480rpx;
  1122. background-color: #e02020;
  1123. height: 150rpx;
  1124. padding-left: 28rpx;
  1125. padding-top: 20rpx;
  1126. .ac-r-left {
  1127. .active-ic {
  1128. height: 32rpx;
  1129. line-height: 32rpx;
  1130. font-size: 32rpx;
  1131. font-weight: bold;
  1132. .ibonshijian {
  1133. font-size: 32rpx;
  1134. font-weight: normal;
  1135. margin-right: 6rpx;
  1136. }
  1137. }
  1138. .active-desc {
  1139. height: 32rpx;
  1140. line-height: 32rpx;
  1141. font-size: 24rpx;
  1142. margin-top: 15rpx;
  1143. }
  1144. }
  1145. .ac-r-right {
  1146. text-align: center;
  1147. .time-title {
  1148. font-size: 24rpx;
  1149. margin-bottom: 8rpx;
  1150. }
  1151. .count-down {
  1152. font-family: DIN-Medium;
  1153. .day-num {
  1154. height: 40rpx;
  1155. padding: 0 4rpx;
  1156. display: inline-block;
  1157. background-color: #000000;
  1158. color: #ffffff;
  1159. border-radius: 6rpx;
  1160. text-align: center;
  1161. line-height: 40rpx;
  1162. font-size: 28rpx;
  1163. }
  1164. .day-text {
  1165. display: inline-block;
  1166. line-height: 40rpx;
  1167. color: #ffffff;
  1168. font-size: 24rpx;
  1169. margin: 0 8rpx;
  1170. }
  1171. }
  1172. }
  1173. }
  1174. }
  1175. .goods-info-main {
  1176. transform: translateY(-32rpx);
  1177. padding: 30rpx;
  1178. background: #ffffff;
  1179. border-radius: 32rpx 32rpx 8rpx 8rpx;
  1180. .lap-info {
  1181. display: flex;
  1182. font-size: 24upx;
  1183. .lap-li {
  1184. text-align: center;
  1185. flex: 3;
  1186. padding: 0 20upx;
  1187. .laprice-text {
  1188. font-size: 28upx;
  1189. font-weight: 600;
  1190. color: #ff4d01;
  1191. }
  1192. .laprice-goods-num {
  1193. color: #333333;
  1194. }
  1195. }
  1196. }
  1197. .top-title {
  1198. .title {
  1199. width: 594rpx;
  1200. font-size: 32rpx;
  1201. letter-spacing: 1px;
  1202. color: #2a2a2a;
  1203. font-weight: 500;
  1204. .goods-brand {
  1205. letter-spacing: 0;
  1206. font-weight: 400;
  1207. padding: 0 16upx;
  1208. height: 40rpx;
  1209. line-height: 40rpx;
  1210. border-radius: 40rpx;
  1211. font-size: 24rpx;
  1212. font-weight: 500;
  1213. display: inline-block;
  1214. color: #ffffff;
  1215. margin-right: 16rpx;
  1216. }
  1217. }
  1218. .collection-btn {
  1219. text-align: center;
  1220. font-size: 20rpx;
  1221. .ibonfont {
  1222. font-size: 40rpx;
  1223. }
  1224. }
  1225. }
  1226. .describe {
  1227. font-size: 28rpx;
  1228. color: #9a9a9a;
  1229. padding-top: 20rpx;
  1230. font-weight: 500;
  1231. color: #e02020;
  1232. }
  1233. .active-box {
  1234. margin-top: 40rpx;
  1235. .row {
  1236. width: 100%;
  1237. display: flex;
  1238. align-items: center;
  1239. position: relative;
  1240. .text {
  1241. font-size: 28upx;
  1242. color: #9a9a9a;
  1243. margin-right: 40upx;
  1244. }
  1245. .content {
  1246. .ac-li {
  1247. margin-bottom: 10upx;
  1248. .ac-label {
  1249. background-color: #fa6400;
  1250. padding: 0 16upx;
  1251. height: 40rpx;
  1252. line-height: 40rpx;
  1253. border-radius: 40rpx;
  1254. font-size: 20rpx;
  1255. font-weight: 500;
  1256. display: inline-block;
  1257. color: #ffffff;
  1258. margin-right: 16rpx;
  1259. }
  1260. .ac-activityTitle {
  1261. display: inline-block;
  1262. font-size: 24upx;
  1263. }
  1264. .ac-value {
  1265. font-size: 24upx;
  1266. padding-top: 10rpx;
  1267. .ac-p {
  1268. color: $price-color;
  1269. }
  1270. }
  1271. }
  1272. }
  1273. }
  1274. }
  1275. }
  1276. }
  1277. .info-box {
  1278. padding: 16rpx 30upx;
  1279. background-color: #fff;
  1280. border-radius: 12upx;
  1281. transform: translateY(-48rpx);
  1282. margin-top: 16rpx;
  1283. .row {
  1284. width: 100%;
  1285. display: flex;
  1286. align-items: center;
  1287. position: relative;
  1288. line-height: 80rpx;
  1289. .text {
  1290. font-size: 28upx;
  1291. color: #9a9a9a;
  1292. margin-right: 40upx;
  1293. }
  1294. .content {
  1295. .conversion {
  1296. display: inline-block;
  1297. margin-right: 10rpx;
  1298. }
  1299. .no-sel {
  1300. color: #9a9a9a;
  1301. }
  1302. .service-li {
  1303. display: inline-block;
  1304. font-size: 22rpx;
  1305. color: #6c6c6c;
  1306. margin-left: 20rpx;
  1307. -webkit-line-clamp: 1;
  1308. .service-icon {
  1309. font-size: 28rpx;
  1310. margin-right: 12rpx;
  1311. }
  1312. .icon {
  1313. width: 28rpx;
  1314. height: 28rpx;
  1315. border-radius: 4rpx;
  1316. margin-right: 12rpx;
  1317. }
  1318. }
  1319. }
  1320. .arrow {
  1321. position: absolute;
  1322. right: 0;
  1323. .icon {
  1324. color: #afafaf;
  1325. }
  1326. }
  1327. }
  1328. }
  1329. .group-ul {
  1330. .group-li {
  1331. background-color: #ffffff;
  1332. border-radius: 12rpx;
  1333. margin-bottom: 20rpx;
  1334. .float_left {
  1335. .left-scroll {
  1336. width: 430rpx;
  1337. white-space: nowrap;
  1338. .goods-li {
  1339. display: inline-block;
  1340. vertical-align: middle;
  1341. margin-right: 5px;
  1342. image {
  1343. display: block;
  1344. width: 150rpx;
  1345. height: 150rpx;
  1346. border-radius: 10rpx;
  1347. margin: 0 auto;
  1348. }
  1349. text-align: center;
  1350. .goods-name {
  1351. width: 150rpx;
  1352. height: 36rpx;
  1353. line-height: 36rpx;
  1354. margin-top: 10rpx;
  1355. font-size: 24rpx;
  1356. -webkit-line-clamp: 1;
  1357. }
  1358. }
  1359. .plus-icon {
  1360. vertical-align: middle;
  1361. display: inline-block;
  1362. line-height: 150rpx;
  1363. padding: 0 10rpx;
  1364. height: 200rpx;
  1365. }
  1366. }
  1367. }
  1368. .dy-icon {
  1369. padding: 0 10rpx;
  1370. line-height: 150rpx;
  1371. padding: 0 10rpx;
  1372. height: 200rpx;
  1373. color: #cecece;
  1374. .ibonicon {
  1375. font-size: 26rpx;
  1376. }
  1377. }
  1378. .price-right {
  1379. color: #666666;
  1380. font-size: 24rpx;
  1381. text-align: center;
  1382. width: 190rpx;
  1383. .group-price {
  1384. font-family: DIN-Medium;
  1385. .primary-color {
  1386. font-weight: 700;
  1387. font-size: 28rpx;
  1388. }
  1389. }
  1390. .save-price {
  1391. font-family: DIN-Medium;
  1392. padding: 10rpx 0;
  1393. }
  1394. .buy-btn {
  1395. line-height: 56rpx;
  1396. height: 56rpx;
  1397. border-radius: 8rpx;
  1398. text-align: center;
  1399. color: #ffffff;
  1400. width: 150rpx;
  1401. margin: 10rpx auto 0;
  1402. }
  1403. }
  1404. }
  1405. }
  1406. .setMeal_more {
  1407. color: #999;
  1408. text-align: center;
  1409. font-size: 24rpx;
  1410. }
  1411. .description {
  1412. padding-bottom: 100upx;
  1413. .title {
  1414. width: 100%;
  1415. height: 80upx;
  1416. display: flex;
  1417. justify-content: center;
  1418. align-items: center;
  1419. font-size: 26upx;
  1420. color: #999;
  1421. }
  1422. }
  1423. .footer {
  1424. position: fixed;
  1425. bottom: 0upx;
  1426. width: 100%;
  1427. padding: 12upx 30rpx;
  1428. background-color: #ffffff;
  1429. z-index: 2;
  1430. display: flex;
  1431. justify-content: space-between;
  1432. align-items: center;
  1433. box-shadow: 0px -3rpx 32rpx 0px rgba(156, 170, 175, 0.16);
  1434. .icons {
  1435. height: 74upx;
  1436. .box {
  1437. height: 64upx;
  1438. margin-left: 32rpx;
  1439. display: inline-block;
  1440. text-align: center;
  1441. position: relative;
  1442. .icon {
  1443. font-size: 36upx;
  1444. color: #000000;
  1445. }
  1446. .text {
  1447. display: flex;
  1448. justify-content: center;
  1449. width: 100%;
  1450. font-size: 20upx;
  1451. color: #3c3c3c;
  1452. padding-top: 5rpx;
  1453. }
  1454. &:first-child {
  1455. margin-left: 10rpx;
  1456. padding-right: 24rpx;
  1457. position: relative;
  1458. &::after {
  1459. position: absolute;
  1460. top: 10rpx;
  1461. right: 0;
  1462. content: ' ';
  1463. display: inline-block;
  1464. width: 1px;
  1465. height: 48rpx;
  1466. background: #d8d8d8;
  1467. border-radius: 2rpx;
  1468. }
  1469. }
  1470. }
  1471. }
  1472. .btn {
  1473. overflow: hidden;
  1474. .buy {
  1475. border-radius: 8upx;
  1476. height: 74upx;
  1477. width: 190upx;
  1478. color: #ffffff;
  1479. display: inline-block;
  1480. line-height: 74upx;
  1481. text-align: center;
  1482. font-size: 28upx;
  1483. &:first-child {
  1484. margin-right: 10rpx;
  1485. }
  1486. }
  1487. }
  1488. }
  1489. .popup {
  1490. position: fixed;
  1491. top: 0;
  1492. width: 100%;
  1493. height: 100%;
  1494. z-index: 20;
  1495. display: none;
  1496. .mask {
  1497. position: fixed;
  1498. top: 0;
  1499. width: 100%;
  1500. height: 100%;
  1501. z-index: 21;
  1502. background-color: rgba(0, 0, 0, 0.6);
  1503. }
  1504. .layer {
  1505. position: fixed;
  1506. z-index: 22;
  1507. bottom: -70%;
  1508. width: 100%;
  1509. padding: 0 4%;
  1510. height: 70%;
  1511. border-radius: 20upx 20upx 0 0;
  1512. background-color: #fff;
  1513. display: flex;
  1514. flex-wrap: wrap;
  1515. align-content: space-between;
  1516. .content {
  1517. width: 100%;
  1518. padding: 20upx 0;
  1519. }
  1520. .btn {
  1521. width: 100%;
  1522. height: 100upx;
  1523. .button {
  1524. width: 100%;
  1525. height: 80upx;
  1526. border-radius: 40upx;
  1527. color: #fff;
  1528. display: flex;
  1529. align-items: center;
  1530. justify-content: center;
  1531. background-color: #f47952;
  1532. font-size: 28upx;
  1533. }
  1534. }
  1535. }
  1536. &.show {
  1537. display: block;
  1538. .mask {
  1539. animation: showPopup 0.2s linear both;
  1540. }
  1541. .layer {
  1542. animation: showLayer 0.2s linear both;
  1543. }
  1544. }
  1545. &.hide {
  1546. display: block;
  1547. .mask {
  1548. animation: hidePopup 0.2s linear both;
  1549. }
  1550. .layer {
  1551. animation: hideLayer 0.2s linear both;
  1552. }
  1553. }
  1554. &.none {
  1555. display: none;
  1556. }
  1557. &.service {
  1558. .row {
  1559. margin: 30upx 0;
  1560. .title {
  1561. font-size: 30upx;
  1562. margin: 10upx 0;
  1563. }
  1564. .description {
  1565. font-size: 28upx;
  1566. color: #999;
  1567. }
  1568. }
  1569. }
  1570. &.spec {
  1571. .title {
  1572. font-size: 30upx;
  1573. margin: 30upx 0;
  1574. }
  1575. .sp {
  1576. display: flex;
  1577. view {
  1578. font-size: 28upx;
  1579. padding: 5upx 20upx;
  1580. border-radius: 8upx;
  1581. margin: 0 30upx 20upx 0;
  1582. background-color: #f6f6f6;
  1583. &.on {
  1584. padding: 3upx 18upx;
  1585. border: solid 1upx #f47925;
  1586. }
  1587. }
  1588. }
  1589. .length {
  1590. margin-top: 30upx;
  1591. border-top: solid 1upx #aaa;
  1592. display: flex;
  1593. justify-content: space-between;
  1594. align-items: center;
  1595. padding-top: 20upx;
  1596. .text {
  1597. font-size: 30upx;
  1598. }
  1599. .number {
  1600. display: flex;
  1601. justify-content: center;
  1602. align-items: center;
  1603. .input {
  1604. width: 80upx;
  1605. height: 60upx;
  1606. margin: 0 10upx;
  1607. background-color: #f3f3f3;
  1608. display: flex;
  1609. justify-content: center;
  1610. align-items: center;
  1611. text-align: center;
  1612. input {
  1613. width: 80upx;
  1614. height: 60upx;
  1615. display: flex;
  1616. justify-content: center;
  1617. align-items: center;
  1618. text-align: center;
  1619. font-size: 26upx;
  1620. }
  1621. }
  1622. .sub,
  1623. .add {
  1624. width: 60upx;
  1625. height: 60upx;
  1626. background-color: #f3f3f3;
  1627. border-radius: 5upx;
  1628. .icon {
  1629. font-size: 30upx;
  1630. width: 60upx;
  1631. height: 60upx;
  1632. display: flex;
  1633. justify-content: center;
  1634. align-items: center;
  1635. }
  1636. }
  1637. }
  1638. }
  1639. }
  1640. }
  1641. .share {
  1642. display: none;
  1643. &.show {
  1644. display: block;
  1645. .mask {
  1646. animation: showPopup 0.15s linear both;
  1647. }
  1648. .layer {
  1649. animation: showLayer 0.15s linear both;
  1650. }
  1651. }
  1652. &.hide {
  1653. display: block;
  1654. .mask {
  1655. animation: hidePopup 0.15s linear both;
  1656. }
  1657. .layer {
  1658. animation: hideLayer 0.15s linear both;
  1659. }
  1660. }
  1661. &.none {
  1662. display: none;
  1663. }
  1664. .mask {
  1665. background-color: rgba(0, 0, 0, 0.5);
  1666. position: fixed;
  1667. width: 100%;
  1668. height: 100%;
  1669. top: 0;
  1670. z-index: 11;
  1671. }
  1672. .layer {
  1673. width: 92%;
  1674. position: fixed;
  1675. z-index: 12;
  1676. padding: 0 4%;
  1677. top: 100%;
  1678. background-color: rgba(255, 255, 255, 0.9);
  1679. .list {
  1680. width: 100%;
  1681. display: flex;
  1682. padding: 10upx 0 30upx 0;
  1683. .box {
  1684. width: 25%;
  1685. display: flex;
  1686. justify-content: center;
  1687. flex-wrap: wrap;
  1688. image {
  1689. width: 13.8vw;
  1690. height: 13.8vw;
  1691. }
  1692. .title {
  1693. margin-top: 10upx;
  1694. display: flex;
  1695. justify-content: center;
  1696. width: 100%;
  1697. font-size: 26upx;
  1698. }
  1699. }
  1700. }
  1701. .btn {
  1702. width: 100%;
  1703. height: 100upx;
  1704. display: flex;
  1705. justify-content: center;
  1706. align-items: center;
  1707. font-size: 28upx;
  1708. border-top: solid 1upx #666666;
  1709. }
  1710. .h1 {
  1711. width: 100%;
  1712. height: 80upx;
  1713. display: flex;
  1714. justify-content: center;
  1715. align-items: center;
  1716. font-size: 34upx;
  1717. }
  1718. }
  1719. }
  1720. .coupon-box {
  1721. .row {
  1722. .content {
  1723. .coupon-li {
  1724. display: inline-block;
  1725. width: 120upx;
  1726. background-color: $price-color;
  1727. color: #ffffff;
  1728. line-height: 30upx;
  1729. font-size: 18upx;
  1730. text-align: center;
  1731. }
  1732. }
  1733. }
  1734. }
  1735. .share-tit {
  1736. line-height: 80upx;
  1737. text-align: center;
  1738. font-size: 32upx;
  1739. }
  1740. .share-cancel {
  1741. line-height: 80upx;
  1742. text-align: center;
  1743. font-size: 28upx;
  1744. border-top: 1px solid #f4f4f4;
  1745. }
  1746. .share-ul {
  1747. display: flex;
  1748. padding: 50upx 0;
  1749. .share-li {
  1750. flex: 3;
  1751. .share-btn {
  1752. background-color: #ffffff;
  1753. font-size: 26upx;
  1754. &::after {
  1755. border: 0 none;
  1756. }
  1757. .icon-view {
  1758. display: inline-block;
  1759. width: 100upx;
  1760. height: 100upx;
  1761. border-radius: 100%;
  1762. background-color: #18b566;
  1763. line-height: 100upx;
  1764. text-align: center;
  1765. margin-bottom: 10upx;
  1766. }
  1767. }
  1768. }
  1769. }
  1770. .poster-view {
  1771. // width: 600upx;
  1772. // margin: 0 auto;
  1773. }
  1774. .service-box {
  1775. .content {
  1776. width: 560rpx;
  1777. -webkit-line-clamp: 1;
  1778. .service-li {
  1779. display: inline-block;
  1780. color: #666666;
  1781. font-size: 24rpx;
  1782. margin-right: 30rpx;
  1783. .icon {
  1784. width: 50rpx;
  1785. height: 50rpx;
  1786. border-radius: 4rpx;
  1787. }
  1788. .ibonfont {
  1789. margin-right: 10rpx;
  1790. font-size: 24rpx;
  1791. color: $uni-color-primary;
  1792. }
  1793. }
  1794. }
  1795. }
  1796. .service-pop {
  1797. .title {
  1798. line-height: 100rpx;
  1799. height: 100rpx;
  1800. font-size: 32rpx;
  1801. text-align: center;
  1802. color: #222;
  1803. }
  1804. .service-ul {
  1805. padding: 0 30rpx;
  1806. max-height: 430rpx;
  1807. overflow-y: auto;
  1808. width: 100%;
  1809. .service-li {
  1810. font-size: 28rpx;
  1811. padding: 24rpx 0;
  1812. .icon {
  1813. width: 32rpx;
  1814. height: 32rpx;
  1815. border-radius: 4rpx;
  1816. margin-right: 20rpx;
  1817. }
  1818. .ibonfont {
  1819. font-size: 32rpx;
  1820. color: $uni-color-primary;
  1821. margin-right: 20rpx;
  1822. }
  1823. .desc {
  1824. padding-left: 54rpx;
  1825. padding-top: 10rpx;
  1826. font-size: 24rpx;
  1827. color: #999999;
  1828. }
  1829. }
  1830. }
  1831. .confirm-btn {
  1832. height: 80rpx;
  1833. line-height: 80rpx;
  1834. text-align: center;
  1835. color: #ffffff;
  1836. background-color: $uni-color-primary;
  1837. margin-top: 30rpx;
  1838. }
  1839. }
  1840. </style>