index.vue 62 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940
  1. <template>
  2. <view :style="colorStyle">
  3. <skeleton :show="showSkeleton" :isNodes="isNodes" ref="skeleton" loading="chiaroscuro" selector="skeleton"
  4. bgcolor="#FFF"></skeleton>
  5. <view class="product-con skeleton" :style="{visibility: showSkeleton ? 'hidden' : 'visible'}">
  6. <view>
  7. <view class="w-full fixed-lt z-99" :style="[navBarStyle]">
  8. <view class="w-full px-20 h-80 flex-between-center">
  9. <!-- #ifdef MP -->
  10. <view class="fixed flex-center opac" :style="[menuButtonStyle]">
  11. <!-- #endif -->
  12. <!-- #ifndef MP -->
  13. <view class="menu_box flex-center opac">
  14. <!-- #endif -->
  15. <image src="@/static/img/back_icon.png" class="w-32 h-32" @tap="goPage(3)"></image>
  16. <text class="menu_line"></text>
  17. <image src="@/static/img/menu_icon.png" class="w-32 h-32" @tap="moreNav"></image>
  18. </view>
  19. <!-- #ifdef MP -->
  20. <view class="fixed rd-50-p111- flex-center opac"
  21. :style="[shareButtonStyle]"
  22. @tap="listenerActionSheet">
  23. <!-- #endif -->
  24. <!-- #ifndef MP -->
  25. <view class="w-60 h-60 rd-50-p111- flex-center opac" @tap="listenerActionSheet">
  26. <!-- #endif -->
  27. <image src="@/static/img/share_icon.png" class="w-32 h-32"></image>
  28. </view>
  29. </view>
  30. </view>
  31. <homeList
  32. :navH="46 + sysHeight"
  33. :currentPage="currentPage"
  34. :sysHeight="sysHeight"
  35. :openNavList="diyProduct.navList"></homeList>
  36. <view>
  37. <!-- 商品轮播图 -->
  38. <productConSwiper
  39. class="skeleton-rect"
  40. :autoHeight="diyProduct.pictureConfig"
  41. :showDot="diyProduct.swiperDot"
  42. :imgUrls="productSwiper"
  43. :videoline="productVideoLink"
  44. @videoPause="videoPause"
  45. ></productConSwiper>
  46. <view class="activity-card seckill-card rd-t-40rpx relative w-full h-152 flex justify-between"
  47. :style="{backgroundImage:infoCardBg}" v-if="type == 1">
  48. <view class="flex items-baseline text--w111-fff mt-8">
  49. <text class="fs-28 fw-600 lh-40rpx pr-16">秒杀价</text>
  50. <baseMoney :money="attribute.productSelect.price" symbolSize="32" integerSize="56" decimalSize="32" color="#ffffff"></baseMoney>
  51. <baseMoney :money="storeInfo.ot_price" symbolSize="32" integerSize="32" decimalSize="32" line color="#ffffff" class="ml-14"></baseMoney>
  52. </view>
  53. <view class="flex-col">
  54. <text class="fs-20 text--w111-fff lh-28rpx text-center pb-4">距秒杀结束还剩</text>
  55. <countDown
  56. :is-day="false"
  57. tip-text=" "
  58. day-text=" "
  59. hour-text=":"
  60. minute-text=":"
  61. second-text=" "
  62. :datatime="datatime"
  63. bgColor="#ffffff"
  64. colors="#e93323"
  65. ></countDown>
  66. </view>
  67. </view>
  68. <view class="activity-card rd-t-40rpx relative w-full h-152 flex justify-between"
  69. :style="{backgroundImage:infoCardBg}" v-if="type == 3">
  70. <view class="flex items-baseline text--w111-fff mt-8">
  71. <text class="fs-28 fw-600 lh-40rpx pr-16">拼团价</text>
  72. <baseMoney :money="attribute.productSelect.price" symbolSize="32" integerSize="56" decimalSize="32" color="#ffffff"></baseMoney>
  73. <baseMoney
  74. :money="storeInfo.product_price"
  75. symbolSize="32"
  76. integerSize="32"
  77. decimalSize="32"
  78. line color="#ffffff"
  79. class="ml-14"></baseMoney>
  80. </view>
  81. <view class="pink-badge mt-10 flex-center fs-26 fw-500">{{storeInfo.people}}人团</view>
  82. </view>
  83. <view class="activity-card rd-t-40rpx relative w-full h-152 flex justify-between"
  84. :style="{backgroundImage:infoCardBg}" v-if="type == 6">
  85. <view class="flex items-baseline text--w111-fff mt-8">
  86. <text class="fs-28 fw-600 lh-40rpx pr-16">预售价</text>
  87. <baseMoney :money="attribute.productSelect.price" symbolSize="32" integerSize="56" decimalSize="32" color="#ffffff"></baseMoney>
  88. <baseMoney :money="storeInfo.ot_price" symbolSize="32" integerSize="32" decimalSize="32" line color="#ffffff" class="ml-14"></baseMoney>
  89. </view>
  90. </view>
  91. <!-- 商品介绍卡片 -->
  92. <view class="info_card rd-40rpx relative" :style="{marginTop: type ==1 || type == 3 || type == 6 ? '-52rpx' : ''}">
  93. <view class="px-32">
  94. <view class="w-full pt-36">
  95. <!-- 骨架屏展示 -->
  96. <view v-if="showSkeleton">
  97. <view class="w-full h-46 skeleton-rect mt-20" ></view>
  98. <view class="mt-24 flex">
  99. <view class="w-200 h-46 skeleton-rect"></view>
  100. <view class="w-100 h-46 skeleton-rect ml-24"></view>
  101. </view>
  102. <view class="mt-24 flex-between-center">
  103. <view class="w-200 h-46 skeleton-rect"></view>
  104. <view class="w-200 h-46 skeleton-rect"></view>
  105. <view class="w-200 h-46 skeleton-rect"></view>
  106. </view>
  107. <view class="mt-24 flex-between-center">
  108. <view class="w-96 h-46 skeleton-rect"></view>
  109. <view class="flex-1 h-46 skeleton-rect ml-22"></view>
  110. </view>
  111. <view class="mt-24 flex-between-center">
  112. <view class="w-96 h-46 skeleton-rect"></view>
  113. <view class="flex-1 h-46 skeleton-rect ml-22"></view>
  114. </view>
  115. <view class="mt-24 flex-between-center">
  116. <view class="w-96 h-46 skeleton-rect"></view>
  117. <view class="flex-1 h-46 skeleton-rect ml-22"></view>
  118. </view>
  119. <view class="mt-24 flex">
  120. <view class="w-400 h-200 skeleton-rect"></view>
  121. <view class="w-400 h-200 skeleton-rect ml-24"></view>
  122. </view>
  123. </view>
  124. <!-- sku小图 -->
  125. <view class="flex mb-32" v-if="skuArr.length && skuArr.length > 1">
  126. <view class="flex-1 flex-center">
  127. <view :class="isSwiper ? 'active_pic' : 'scroll_pic'" @tap="selectSwiper">
  128. <image :src="storeInfo.image"></image>
  129. </view>
  130. <view class="w-76 h-80 flex-col flex-center fs-22 text--w111-333 lh-30rpx">
  131. <text>{{skuArr.length}}款</text>
  132. <text>可选</text>
  133. </view>
  134. </view>
  135. <scroll-view scroll-x="true" scroll-with-animation
  136. class="white-nowrap vertical-middle w-530" show-scrollbar="false">
  137. <view class="flex w-full">
  138. <view class="inline-block mr-16"
  139. :class="item.suk == attrValue && !isSwiper ? 'active_pic' : 'scroll_pic'"
  140. v-for="(item, index) in skuArr" :key="index"
  141. @tap="changeAttrPic(item,index)">
  142. <image :src="item.small_image"></image>
  143. </view>
  144. </view>
  145. </scroll-view>
  146. </view>
  147. <view class="flex-y-center font-red mb-24" :class="skuArr.length && skuArr.length > 1 ? 'mt-44' : ''"
  148. v-if="type == 4">
  149. <text class="lh-40rpx fs-40 SemiBold pl-8">{{attribute.productSelect.integral}}</text>
  150. <text class="fs-36 fw-500 pingfang pl-4">积分</text>
  151. <text class="fs-28 lh-40rpx px-8 text--w111-666">+</text>
  152. <text class="lh-40rpx fs-40 SemiBold">{{attribute.productSelect.price}}</text>
  153. <text class="fs-36 fw-500 pingfang pl-4">元</text>
  154. </view>
  155. <!-- 商品名称 -->
  156. <view class="fs-30 text--w111-333 fw-500 lh-42rpx"
  157. :class="skuArr.length && skuArr.length > 1 ? 'mt-32' : ''"
  158. >{{ storeInfo.title || storeInfo.store_name }}</view>
  159. <!-- 预售信息 -->
  160. <view class="mt-16 fs-24 lh-36rpx" v-if="type == 6">
  161. <view>预售时间: {{storeInfo.presale_start_time}} ~ {{storeInfo.presale_end_time}}</view>
  162. <view class="mt-12">预售结束后{{ storeInfo.presale_day }}天内发货</view>
  163. </view>
  164. <!-- 库存销量 -->
  165. <view class="flex-between-center mt-20 text--w111-999 fs-22 lh-30rpx">
  166. <text>原价:{{ storeInfo.ot_price || storeInfo.product_price }}</text>
  167. <text>限量:{{ storeInfo.quota_show || storeInfo.stock }}</text>
  168. <text v-if="type == 4">已兑换:{{ storeInfo.sales}}</text>
  169. <text v-else-if="type == 6">已预定:{{ storeInfo.sales}}</text>
  170. <text v-else>销量:{{ storeInfo.sales}}</text>
  171. </view>
  172. <!-- 商品标签 -->
  173. <view class="flex items-end flex-wrap mt-24 w-full"
  174. v-if="storeInfo.store_label && storeInfo.store_label.length">
  175. <BaseTag
  176. :text="label.label_name"
  177. :color="label.color"
  178. :background="label.bg_color"
  179. :borderColor="label.border_color"
  180. :circle="label.border_color ? true : false"
  181. :imgSrc="label.icon"
  182. size="middle"
  183. v-for="(label, idx) in storeInfo.store_label" :key="idx"></BaseTag>
  184. </view>
  185. </view>
  186. </view>
  187. </view>
  188. <view class="px-20">
  189. <!-- 活动 SKU选择 服务保障 -->
  190. <view class="rd-24rpx bg--w111-fff mt-20">
  191. <view class="flex-between-center h-100 px-20" @tap="selecAttr"
  192. v-if="attribute.productAttr.length">
  193. <view class="flex-y-center">
  194. <text class="fs-26 text--w111-888">选择</text>
  195. <view class="ml-32 text--w111-333 fs-26 w-560 line1">{{ attrValue }}</view>
  196. </view>
  197. <text class="iconfont icon-ic_rightarrow fs-24 text--w111-666"></text>
  198. </view>
  199. <view class="flex-between-center h-100 px-20" v-if="storeInfo.ensure && storeInfo.ensure.length"
  200. @tap="()=>{showServiceDrawer = true}">
  201. <view class="flex-y-center">
  202. <text class="fs-26 text--w111-888">服务</text>
  203. <view class="ml-32 text--w111-333 fs-26 w-524 line1">
  204. <text v-for="(label,i) in storeInfo.ensure" :key="i">{{label.name}}.</text>
  205. </view>
  206. </view>
  207. <text class="iconfont icon-ic_rightarrow fs-24 text--w111-666"></text>
  208. </view>
  209. <view class="flex-between-center h-100 px-20"
  210. v-if="storeInfo.specs && storeInfo.specs.length"
  211. @tap="seeSpecs">
  212. <view class="flex-y-center">
  213. <text class="fs-26 text--w111-888">参数</text>
  214. <view class="ml-32 text--w111-333 fs-26 w-524 line1">{{specsInfo.specsTitle}}</view>
  215. </view>
  216. <text class="iconfont icon-ic_rightarrow fs-24 text--w111-666"></text>
  217. </view>
  218. <view class="acea-row row-between h-146 pl-20 pr-20 pt-30" v-if="isMention && Object.keys(storeList).length" @tap="showStoreList">
  219. <view class="acea-row">
  220. <text class="fs-26 text--w111-888">门店</text>
  221. <view class="ml-32 text--w111-333 fs-26 w-524 line1">
  222. <view class="fs-26"><text class="iconfont icon-ic_mall fs-30 mr-12"></text>{{storeList.name}}</view>
  223. <view class="fs-22 text--w111-666 mt-18 line1">{{ storeList.address }}{{ ", " + storeList.detailed_address }}</view>
  224. </view>
  225. </view>
  226. <text class="iconfont icon-ic_rightarrow fs-24 text--w111-666"></text>
  227. </view>
  228. </view>
  229. <!-- 拼团详情 -->
  230. <view class="rd-24rpx bg--w111-fff mt-20 p-24" :class="pink.length?'':'pb-0'" v-if="type == 3">
  231. <view class="flex fs-24 notice pb-24" :class="pink.length?'border-bottom':''">
  232. <text class="text-red">已拼{{pink_ok_sum}}{{storeInfo.unit_name || ''}}</text>丨
  233. <view class='swiper'>
  234. <swiper :indicator-dots="false" autoplay interval="2500" duration="500"
  235. vertical="true" circular="true">
  236. <block v-for="(item,index) in itemNew" :key='index'>
  237. <swiper-item>
  238. <view class='line1'>{{item}}</view>
  239. </swiper-item>
  240. </block>
  241. </swiper>
  242. </view>
  243. </view>
  244. <view class="mt-38" v-if="pink.length">
  245. <view class="flex-between-center pink-cell" v-for='(item,index) in pink' :key='index'>
  246. <view class="flex-1 flex-y-center">
  247. <image :src='item.avatar' class="w-64 h-64 rd-50-p111-"></image>
  248. <view class="flex-y-center fs-26 pl-24">
  249. <text>还差 <text class="text-red">{{item.count}}</text>人,</text>
  250. <text class="pl-8">还剩</text>
  251. <count-down
  252. :is-day="false"
  253. tip-text=" "
  254. day-text=" "
  255. hour-text=":"
  256. minute-text=":"
  257. second-text=" "
  258. colors="#333"
  259. dotColor="#333"
  260. :datatime="item.stop_time">
  261. </count-down>
  262. </view>
  263. </view>
  264. <view class="w-120 h-56 rd-30rpx bg-red flex-center text--w111-fff fs-24"
  265. @tap="spellBnt(item)">去拼团</view>
  266. </view>
  267. </view>
  268. </view>
  269. <!-- 拼团玩法 -->
  270. <view class="rd-24rpx bg--w111-fff mt-20 pt-32 pl-24 pr-24 pb-32" v-if="type == 3">
  271. <view class="flex-between-center">
  272. <text class="fs-30 fw-500 lh-42rpx">拼团玩法</text>
  273. </view>
  274. <view class="flex-between-center mt-38 px-28">
  275. <view class="w-118 flex-col flex-center">
  276. <view class="w-80 h-80 rd-50-p111- bg-primary-light flex-center mb-24">
  277. <text class="iconfont icon-ic_user fs-44 text-red"></text>
  278. </view>
  279. <text class="fs-26 lh-36rpx">开团/参团</text>
  280. </view>
  281. <image class="dot-line" src="@/static/img/arrow.png"></image>
  282. <view class="w-118 flex-col flex-center">
  283. <view class="w-80 h-80 rd-50-p111- bg-primary-light flex-center mb-24">
  284. <text class="iconfont icon-ic_invite fs-44 text-red"></text>
  285. </view>
  286. <text class="fs-26 lh-36rpx">邀请好友</text>
  287. </view>
  288. <image class="dot-line" src="@/static/img/arrow.png"></image>
  289. <view class="w-118 flex-col flex-center">
  290. <view class="w-80 h-80 rd-50-p111- bg-primary-light flex-center mb-24">
  291. <text class="iconfont icon-ic_box fs-44 text-red"></text>
  292. </view>
  293. <text class="fs-26 lh-36rpx">满员发货</text>
  294. </view>
  295. </view>
  296. </view>
  297. <!-- 评价卡片 -->
  298. <view class="rd-24rpx bg--w111-fff mt-20 py-32"
  299. v-if="replyCount"
  300. @tap="goPage(1,'/pages/goods/goods_comment_list/index?product_id=' + storeInfo.product_id)">
  301. <view class="px-20 flex-between-center">
  302. <view>
  303. <text class="text--w111-333 fs-30 fw-500">评价</text>
  304. <text class="fs-24 text--w111-666 pl-8">({{replyCount}})</text>
  305. </view>
  306. <view class="flex-y-center">
  307. <text class="fs-28 text-red">99.0%</text>
  308. <text class="fs-24 text--w111-999 pr-12">好评率</text>
  309. <text class="iconfont icon-ic_rightarrow fs-24 text--w111-666"></text>
  310. </view>
  311. </view>
  312. <!-- 滑动内容 -->
  313. <block v-if="replyCount">
  314. <userEvaluation :reply="reply" @changeLogin="changeLogin" :fromTo="1"></userEvaluation>
  315. </block>
  316. </view>
  317. <!-- 底部操作按钮 -->
  318. <view class="page_footer bg--w111-fff-s111-80 w-full z-99 fixed-lb pb-safe">
  319. <view class="w-full h-104 pl-32 pr-20 flex">
  320. <view class="flex">
  321. <view class="flex-col flex-center mr-38" @tap="goPage(2,'/pages/index/index')"
  322. v-if="diyProduct.menuList.includes(3)">
  323. <text class="iconfont icon-ic_mall fs-40"></text>
  324. <text class="fs-18">首页</text>
  325. </view>
  326. <view class="flex-col flex-center mr-38" @tap="listenerActionSheet"
  327. v-if="diyProduct.menuList.includes(4)">
  328. <text class="iconfont icon-ic_transmit1 fs-40"></text>
  329. <text class="fs-18">分享</text>
  330. </view>
  331. <!-- #ifdef MP -->
  332. <button class="flex-col flex-center mr-38 bg-transparent" hover-class='none' open-type='contact'
  333. v-if="diyProduct.menuList.includes(0) && routineContact">
  334. <text class="iconfont icon-ic_customerservice fs-40"></text>
  335. <text class="fs-18">客服</text>
  336. </button>
  337. <button class="flex-col flex-center mr-38 bg-transparent" hover-class='none'
  338. v-else-if="diyProduct.menuList.includes(0) && !routineContact" @tap="goGoodCall">
  339. <text class="iconfont icon-ic_customerservice fs-40"></text>
  340. <text class="fs-18">客服</text>
  341. </button>
  342. <!-- #endif -->
  343. <!-- #ifdef H5 || APP-PLUS -->
  344. <view class="flex-col flex-center mr-38" v-if="diyProduct.menuList.includes(0)"
  345. @tap="goGoodCall">
  346. <text class="iconfont icon-ic_customerservice fs-40"></text>
  347. <text class="fs-18">客服</text>
  348. </view>
  349. <!-- #endif -->
  350. <view class="flex-col flex-center mr-38" @tap="setCollect" v-if="diyProduct.menuList.includes(1)">
  351. <text class="iconfont fs-40" :class="storeInfo.userCollect ? 'icon-ic_star1' : 'icon-ic_star'"></text>
  352. <text class="fs-18">收藏</text>
  353. </view>
  354. <view class="flex-col flex-center mr-38" @tap="goPage(2,'/pages/order_addcart/order_addcart')"
  355. v-if="diyProduct.menuList.includes(2)">
  356. <text class="iconfont icon-ic_ShoppingCart fs-40"></text>
  357. <text class="fs-18 white-nowrap">购物车</text>
  358. </view>
  359. </view>
  360. <!-- 秒杀下单按钮 -->
  361. <view class="flex-1 grid-column-2 self-center grid-gap-16rpx" v-if="type == 1">
  362. <view class="h-72 flex-center join_cart rd-36px text--w111-fff fs-26" @tap="openAlone">单独购买</view>
  363. <view class="h-72 flex-center bg-red rd-36px text--w111-fff fs-26"
  364. v-if="status == 1 && attribute.productSelect.quota > 0 && attribute.productSelect.stock > 0" @tap="goCat">立即购买</view>
  365. <view class="h-72 flex-center bg-hui rd-36px text--w111-fff fs-26"
  366. v-if="[1,3].includes(status) && attribute.productSelect.quota <= 0 || attribute.productSelect.stock <= 0">已售罄</view>
  367. <view class="h-72 flex-center bg-hui rd-36px text--w111-fff fs-26"
  368. v-if="[0,2].includes(status)">{{status == 2 ? '未开始' : '已结束'}}</view>
  369. </view>
  370. <!-- 拼团下单按钮 -->
  371. <view class="flex-1 grid-column-2 self-center grid-gap-16rpx" v-if="type == 3">
  372. <view class="h-72 flex-center join_cart rd-36px text--w111-fff fs-26" @tap="openAlone">单独购买</view>
  373. <view class="h-72 flex-center bg-red rd-36px text--w111-fff fs-26"
  374. v-if=" attribute.productSelect.quota > 0 && attribute.productSelect.stock > 0" @tap="goCat">立即开团</view>
  375. <view class="h-72 flex-center bg-hui rd-36px text--w111-fff fs-26"
  376. v-if="attribute.productSelect.quota <= 0 || attribute.productSelect.stock <= 0">已售罄</view>
  377. </view>
  378. <!-- 积分下单按钮 -->
  379. <view class="flex-between-center flex-1" v-if="type == 4">
  380. <view class="w-460 h-72 flex-center bg-red rd-36px text--w111-fff fs-26"
  381. v-if="attribute.productSelect.quota > 0 && attribute.productSelect.stock > 0" @tap="goCat">立即兑换</view>
  382. <view class="w-460 h-72 flex-center bg-hui rd-36px text--w111-fff fs-26"
  383. v-else>已售罄</view>
  384. </view>
  385. <!-- 预售按钮 -->
  386. <view class="flex-between-center flex-1" v-if="type == 6">
  387. <view class="w-460 h-72 flex-center bg-hui rd-36px text--w111-fff fs-26"
  388. v-if="[1,3].includes(storeInfo.presale_pay_status)">{{storeInfo.presale_pay_status === 1?'未开始':'已结束'}}</view>
  389. <view class="w-460 h-72 flex-center bg-red rd-36px text--w111-fff fs-26"
  390. v-else-if="attribute.productSelect.stock > 0" @tap="goCat">立即购买</view>
  391. <view class="w-460 h-72 flex-center bg-hui rd-36px text--w111-fff fs-26"
  392. v-else>已售罄</view>
  393. </view>
  394. <!-- 新人专享按钮 -->
  395. <view class="flex-between-center flex-1" v-if="type == 7">
  396. <view class="w-460 h-72 flex-center bg-red rd-36px text--w111-fff fs-26"
  397. v-if="attribute.productSelect.stock > 0" @tap="goCat">立即购买</view>
  398. <view class="w-460 h-72 flex-center bg-hui rd-36px text--w111-fff fs-26"
  399. v-else>已售罄</view>
  400. </view>
  401. </view>
  402. </view>
  403. <view class="rd-24rpx bg--w111-fff mt-20" id="past3">
  404. <view class="fs-30 lh-40rpx fw-500 flex-center py-32">商品详情</view>
  405. <view class="conter">
  406. <!-- #ifndef APP-PLUS -->
  407. <jyf-parser :html="storeInfo.description" ref="article" :tag-style="tagStyle"></jyf-parser>
  408. <!-- #endif -->
  409. <!-- #ifdef APP-PLUS -->
  410. <view v-html="storeInfo.description"></view>
  411. <!-- #endif -->
  412. </view>
  413. </view>
  414. <view class="pb-safe h-200"></view>
  415. <!-- sku弹窗 -->
  416. <product-window
  417. ref='productWindow'
  418. :attr='attribute'
  419. :limitNum="1"
  420. :cusPreviewImg="1"
  421. :productId="type==1?storeInfo.id:storeInfo.product_id"
  422. :type="type"
  423. isExtends
  424. :storeId='storeId'
  425. @myevent="onMyEvent"
  426. @ChangeAttr="ChangeAttr"
  427. @ChangeCartNum="ChangeCartNum"
  428. @attrVal="attrVal"
  429. @iptCartNum="iptCartNum"
  430. @getImg="showImg"
  431. @deliveryFun="deliveryFun"
  432. @onAddressId="onAddressId"
  433. @onstoreId="onstoreId"
  434. @onConfirm="onConfirm"></product-window>
  435. <cusPreviewImg ref="cusPreviewImg" :list="skuArr" @changeSwitch="changeSwitch"></cusPreviewImg>
  436. <!-- #ifdef H5 || APP-PLUS -->
  437. <zb-code ref="qrcode" :show="codeShow" :cid="cid" :val="codeVal" :size="size" :unit="unit"
  438. :background="background" :foreground="foreground" :pdground="pdground" :icon="codeIcon"
  439. :iconSize="iconsize" :onval="onval" :loadMake="loadMake" @result="qrR" />
  440. <!-- #endif -->
  441. <!-- 分享按钮 -->
  442. <view class="generate-posters" :class="posters ? 'on' : ''">
  443. <view class="generateCon acea-row row-middle">
  444. <!-- #ifdef H5 -->
  445. <button class="item" hover-class="none" v-if="weixinStatus === true"
  446. @tap="H5ShareBox = true">
  447. <view class="pictrue">
  448. <image src="../../../static/images/weixin.png"></image>
  449. </view>
  450. <view class="">分享给好友</view>
  451. </button>
  452. <!-- #endif -->
  453. <!-- #ifdef MP -->
  454. <button class="item" open-type="share" hover-class="none">
  455. <view class="pictrue">
  456. <image src="../../../static/images/weixin.png"></image>
  457. </view>
  458. <view class="">分享给好友</view>
  459. </button>
  460. <!-- #endif -->
  461. <!-- #ifdef APP-PLUS -->
  462. <view class="item" @tap="appShare('WXSceneSession')">
  463. <view class="pictrue">
  464. <image src="../../../static/images/weixin.png"></image>
  465. </view>
  466. <view class="">分享给好友</view>
  467. </view>
  468. <view class="item" @tap="appShare('WXSenceTimeline')">
  469. <view class="pictrue">
  470. <!-- <image src="./static/weixinCircle.png"></image> -->
  471. </view>
  472. <view class="">分享朋友圈</view>
  473. </view>
  474. <!-- #endif -->
  475. <view class="item" @tap="getpreviewImage">
  476. <view class="pictrue">
  477. <image src="../../../static/images/changan.png"></image>
  478. </view>
  479. <view class="">预览发图</view>
  480. </view>
  481. <!-- #ifndef H5 -->
  482. <button class="item" hover-class="none" @tap="savePosterPath">
  483. <view class="pictrue">
  484. <image src="../../../static/images/haibao.png"></image>
  485. </view>
  486. <view class="">保存海报</view>
  487. </button>
  488. <!-- #endif -->
  489. </view>
  490. <view class="generateClose flex-center" @tap="posterImageClose">取消</view>
  491. </view>
  492. <div class="fixed-center" v-if="posters && !posterImageStatus">
  493. <image class="poster-loading" :src="imgHost + '/statics/images/poster_loading.png'" mode="widthFix" ></image>
  494. </div>
  495. <!-- 海报展示 -->
  496. <view class="poster-mask" v-if="posterImageStatus || posters"></view>
  497. <view class="poster-pop" v-if="posterImageStatus">
  498. <image :src="posterImage"></image>
  499. </view>
  500. <canvas class="canvas" canvas-id="myCanvas" v-if="canvasStatus"></canvas>
  501. <!-- 发送给朋友图片 -->
  502. <view class="share-box" v-if="H5ShareBox">
  503. <image :src="imgHost + '/statics/images/share-info.png'" @tap="H5ShareBox = false">
  504. </image>
  505. </view>
  506. </view>
  507. </view>
  508. </view>
  509. </view>
  510. <specs :specsInfo="specsInfo" @myevent="mySpecs"></specs>
  511. <base-drawer mode="bottom" :visible="showServiceDrawer" background-color="transparent" mask maskClosable @close="()=>{showServiceDrawer = false}">
  512. <view class="w-full bg--w111-fff rd-t-40rpx py-32">
  513. <view class="text-center fs-32 text--w111-333 fw-500">服务</view>
  514. <view class="mt-64 px-32">
  515. <view class="mb-38" v-for="(item,index) in storeInfo.ensure" :key="index">
  516. <view class="flex-y-center">
  517. <image class="w-34 h-34" :src="item.image"></image>
  518. <text class="pl-12 text--w111-333 fs-28 fw-500">{{item.name}}</text>
  519. </view>
  520. <view class="mt-6 pl-40 fs-22 text--w111-999"> {{item.desc}} </view>
  521. </view>
  522. </view>
  523. <view class="mx-20 pb-safe">
  524. <view class="mt-52 h-72 flex-center rd-36px bg-red fs-26 text--w111-fff" @tap="showServiceDrawer = false">确定</view>
  525. </view>
  526. </view>
  527. </base-drawer>
  528. </view>
  529. </template>
  530. <script>
  531. const app = getApp();
  532. let sysHeight = uni.getSystemInfoSync().statusBarHeight;
  533. import zbCode from '@/components/zb-code/zb-code.vue'
  534. import {
  535. mapGetters
  536. } from "vuex";
  537. import {
  538. getSeckillDetail,
  539. activityCodeApi,
  540. seckillQRCode,
  541. getCombinationDetail,
  542. getIntegralProductDetail
  543. } from '@/api/activity.js';
  544. import {
  545. postCartAdd,
  546. collectAdd,
  547. collectDel,
  548. newcomerDetail,
  549. getProductDetail
  550. } from '@/api/store.js';
  551. import specs from '@/components/specs/index.vue';
  552. import productConSwiper from '@/components/productConSwiper/index.vue'
  553. import productWindow from '@/components/productWindow/index.vue'
  554. import userEvaluation from '@/components/userEvaluation/index.vue'
  555. import kefuIcon from '@/components/kefuIcon';
  556. import cusPreviewImg from '@/components/cusPreviewImg';
  557. import homeList from '@/components/homeList'
  558. import parser from "@/components/jyf-parser/jyf-parser";
  559. import countDown from '@/components/countDown';
  560. import baseDrawer from '@/components/tui-drawer/tui-drawer.vue';
  561. import { imageBase64 } from "@/api/public";
  562. import { toLogin } from '@/libs/login.js';
  563. import { silenceBindingSpread } from "@/utils";
  564. import { getUserInfo } from '@/api/user.js';
  565. import { TOKENNAME, HTTP_REQUEST_URL } from '@/config/app.js';
  566. import {Debounce} from '@/utils/validate.js'
  567. export default {
  568. computed:{
  569. infoCardBg(){
  570. if(this.type == 1){
  571. return 'url('+this.imgHost+'/statics/images/product/seckill_background.png'+')'
  572. }else if(this.type == 3){
  573. return 'url('+this.imgHost+'/statics/images/product/pink_background.png'+')'
  574. }else if(this.type == 6){
  575. return 'url('+this.imgHost+'/statics/images/product/presell_background.png'+')'
  576. }
  577. },
  578. navBarStyle(){
  579. return {
  580. background: this.pageScrollStatus ? '#fff' : 'transparent',
  581. paddingTop: (this.sysHeight) * 2 + 'rpx'
  582. }
  583. },
  584. // #ifdef MP
  585. shareButtonStyle(){
  586. let res = wx.getMenuButtonBoundingClientRect();
  587. return {
  588. width: res.height + 'px',
  589. height: res.height + 'px',
  590. top: res.top + 'px',
  591. left: (res.left - 38) + 'px'
  592. }
  593. },
  594. menuButtonStyle(){
  595. let res = wx.getMenuButtonBoundingClientRect();
  596. return {
  597. width: res.width + 'px',
  598. height: res.height + 'px',
  599. top: res.top + 'px',
  600. left: '11px',
  601. borderRadius: res.height + 'px',
  602. }
  603. },
  604. // #endif
  605. ...mapGetters(['isLogin','diyProduct']),
  606. },
  607. data() {
  608. return {
  609. colorStyle:'--view-theme: #e93323;--view-priceColor:#e93323;--view-minorColorT:rgba(233, 51, 35, 0.1);--view-bntColor:#FE960F;',
  610. showSkeleton: true, //骨架屏显示隐藏
  611. isNodes: 0, //控制什么时候开始抓取元素节点,只要数值改变就重新抓取
  612. dataShow: 0,
  613. id: 0,
  614. time: 0,
  615. countDownHour: "00",
  616. countDownMinute: "00",
  617. countDownSecond: "00",
  618. storeInfo: {
  619. brand_name:''
  620. },
  621. attribute: {
  622. cartAttr: false,
  623. productAttr: [],
  624. productSelect: {},
  625. deliveryType:[],
  626. isType:0,
  627. relation_id:0
  628. },
  629. productValue: [],
  630. isOpen: false,
  631. attr: '请选择',
  632. attrValue: '',
  633. status: 1,
  634. isAuto: false,
  635. isShowAuth: false,
  636. iShidden: false,
  637. limitNum: 1, //限制本属性产品的个数;
  638. iSplus: false,
  639. replyCount: 0, //总评论数量
  640. reply: [], //评论列表
  641. replyChance: 0,
  642. navH: "",
  643. opacity: 0,
  644. scrollY: 0,
  645. topArr: [],
  646. toView: '',
  647. height: 0,
  648. heightArr: [],
  649. lock: false,
  650. scrollTop: 0,
  651. tagStyle: {
  652. img: 'width:100%;display:block;',
  653. table: 'width:100%',
  654. video: 'width:100%'
  655. },
  656. datatime: 0,
  657. navActive: 0,
  658. posters: false,
  659. weixinStatus: false,
  660. posterImageStatus: false,
  661. canvasStatus: false, //海报绘图标签
  662. storeImage: '', //海报产品图
  663. PromotionCode: '', //二维码图片
  664. posterImage: '', //海报路径
  665. posterbackgd: '/static/images/posterbackgd.png',
  666. actionSheetHidden: false,
  667. cart_num: '',
  668. homeTop: 20,
  669. returnShow: true,
  670. H5ShareBox: false, //公众号分享图片
  671. routineContact: 0,
  672. siteName:'', //商城名称
  673. themeColor:'#e93323',
  674. fontColor:'#e93323',
  675. skuArr:[],
  676. //二维码参数
  677. codeShow: false,
  678. cid: '1',
  679. codeVal: "", // 要生成的二维码值
  680. size: 200, // 二维码大小
  681. unit: 'upx', // 单位
  682. background: '#FFF', // 背景色
  683. foreground: '#000', // 前景色
  684. pdground: '#000', // 角标色
  685. codeIcon: '', // 二维码图标
  686. iconsize: 40, // 二维码图标大小
  687. lv: 3, // 二维码容错级别 , 一般不用设置,默认就行
  688. onval: true, // val值变化时自动重新生成二维码
  689. loadMake: true, // 组件加载完成后自动生成二维码
  690. base64Show: 0,
  691. shareQrcode: 0,
  692. followCode:'',
  693. selectSku:{},
  694. currentPage:false,
  695. sysHeight: sysHeight,
  696. isMention: false, //是否存在到店自提
  697. imgHost:HTTP_REQUEST_URL,
  698. addressId:'',
  699. store_id :'',
  700. delivery_type:0,
  701. store_name:'',
  702. storeList:{},
  703. posterTitle:'',
  704. good_list:[],
  705. pageScrollStatus:false,
  706. showServiceDrawer: false,
  707. time_id: '',
  708. type: '', //活动类型
  709. itemNew: [],
  710. pink_ok_sum: 0,
  711. pink: [],
  712. promotions_type:0,
  713. isSwiper: true, //默认展示轮播图
  714. productSwiper: [], //轮播图复制空间
  715. productVideoLink:'',
  716. isDown: false,
  717. specsInfo: {
  718. show: false,
  719. specs: [],
  720. specsTitle:''
  721. },
  722. storeId:0 //跳转门店列表切换时获取门店id
  723. }
  724. },
  725. components: {
  726. zbCode,
  727. productConSwiper,
  728. 'productWindow': productWindow,
  729. userEvaluation,
  730. kefuIcon,
  731. cusPreviewImg,
  732. "jyf-parser": parser,
  733. countDown,
  734. homeList,
  735. baseDrawer,
  736. specs
  737. },
  738. onLoad(options) {
  739. let that = this;
  740. // #ifdef MP
  741. //扫码携带参数处理
  742. if (options.scene) {
  743. let value = this.$util.getUrlParams(decodeURIComponent(options.scene));
  744. if (value.id) {
  745. this.id = value.id;
  746. } else {
  747. this.showSkeleton = false;
  748. return this.$util.Tips({
  749. title: '缺少参数无法查看商品'
  750. }, {
  751. tab: 3,
  752. url: 1
  753. });
  754. }
  755. //记录推广人uid
  756. if (value.spid) app.globalData.spid = value.spid;
  757. this.type = value.type;
  758. this.getActivityDetail();
  759. }
  760. // #endif
  761. if (options.id) {
  762. this.id = options.id;
  763. if (options.spid) app.globalData.spid = options.spid;
  764. }
  765. if(options.type && !options.scene){
  766. this.type = options.type;
  767. }
  768. this.time_id = options.time_id ? options.time_id : '';
  769. this.promotions_type = options.promotions_type || 0;
  770. this.getActivityDetail();
  771. this.$nextTick(() => {
  772. // #ifdef MP
  773. const menuButton = uni.getMenuButtonBoundingClientRect();
  774. const query = uni.createSelectorQuery().in(this);
  775. query
  776. .select('#home')
  777. .boundingClientRect(data => {
  778. this.homeTop = menuButton.top * 2 + menuButton.height - data.height;
  779. })
  780. .exec();
  781. // #endif
  782. })
  783. if(this.isLogin){
  784. silenceBindingSpread()
  785. }
  786. },
  787. onReady(){
  788. this.isNodes++;
  789. // #ifdef H5
  790. this.codeVal = window.location.origin + '/pages/activity/goods_details/index?id=' + this.id +
  791. '&spid=' + this.$store.state.app.uid + '&type=' + this.type
  792. // #endif
  793. // #ifdef APP-PLUS
  794. this.codeVal = HTTP_REQUEST_URL + '/pages/activity/goods_details/index?id=' + this.id +
  795. '&spid=' + this.$store.state.app.uid + '&type=' + this.type
  796. // #endif
  797. },
  798. onShow(){
  799. uni.removeStorageSync('form_type_cart');
  800. },
  801. mounted(){
  802. uni.$on('activeFn', data => {
  803. if(data){
  804. this.storeList = data;
  805. this.storeId = data.id;
  806. }
  807. // let id = data.id;
  808. // this.store_id = id;
  809. // this.$refs.productWindow.getList(id);
  810. })
  811. },
  812. methods: {
  813. mySpecs() {
  814. this.$set(this.specsInfo, 'show', false);
  815. },
  816. // 获取配送方式
  817. deliveryFun(e){
  818. this.delivery_type = e;
  819. },
  820. // 获取配送地址id
  821. onAddressId(row){
  822. this.addressId=row.id
  823. },
  824. // 获取自提地址id
  825. onstoreId(row) {
  826. this.storeList = row;
  827. this.store_id = row.id;
  828. this.store_name = row.name;
  829. },
  830. /*
  831. * 跳转门店列表
  832. */
  833. showStoreList: function() {
  834. let id = this.storeInfo.pid?this.storeInfo.pid:this.storeInfo.id
  835. uni.navigateTo({
  836. url:'/pages/store/list/index?type=1&isCollage=1&storeId='+this.storeList.id+'&product_id='+id
  837. })
  838. },
  839. changeLogin(){
  840. toLogin()
  841. },
  842. seeSpecs() {
  843. this.specsInfo.show = true;
  844. },
  845. moreNav(){
  846. this.currentPage = !this.currentPage
  847. },
  848. //点击sku图片打开轮播图
  849. showImg(index){
  850. this.$refs.cusPreviewImg.open(this.selectSku.suk)
  851. },
  852. //滑动轮播图选择商品
  853. changeSwitch(e){
  854. let productSelect = this.skuArr[e];
  855. this.$set(this,'selectSku',productSelect);
  856. var skuList = productSelect.suk.split(',');
  857. skuList.forEach((i,index)=>{
  858. this.$set(this.attribute.productAttr[index],'index',skuList[index]);
  859. })
  860. if (productSelect) {
  861. this.$set(this.attribute.productSelect, "image", productSelect.image);
  862. this.$set(this.attribute.productSelect, "price", productSelect.price);
  863. this.$set(this.attribute.productSelect, "stock", productSelect.stock);
  864. this.$set(this.attribute.productSelect, "unique", productSelect.unique);
  865. this.$set(this.attribute.productSelect, "cart_num", 1);
  866. this.$set(this.attribute.productSelect, "quota", productSelect.quota);
  867. this.$set(this.attribute.productSelect, "quota_show", productSelect.quota_show);
  868. this.$set(this, "attrValue", productSelect.suk);
  869. this.attrTxt = "已选择"
  870. }
  871. },
  872. qrR(res) {
  873. // #ifdef H5
  874. if(!this.$wechat.isWeixin() || this.shareQrcode != '1'){
  875. this.PromotionCode = res;
  876. this.followCode = ''
  877. }
  878. // #endif
  879. // #ifdef APP-PLUS
  880. this.PromotionCode = res;
  881. // #endif
  882. },
  883. // 图片预览;
  884. getpreviewImage: function() {
  885. if(this.posterImage){
  886. let photoList = [];
  887. photoList.push(this.posterImage)
  888. uni.previewImage({
  889. urls: photoList,
  890. current: this.posterImage
  891. });
  892. }else{
  893. his.$util.Tips({
  894. title: '您的海报尚未生成'
  895. });
  896. }
  897. },
  898. // app分享
  899. // #ifdef APP-PLUS
  900. appShare(scene) {
  901. let that = this
  902. let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
  903. let curRoute = routes[routes.length - 1].$page.fullPath // 获取当前页面路由,也就是最后一个打开的页面路由
  904. uni.share({
  905. provider: "weixin",
  906. scene: scene,
  907. type: 0,
  908. href: `${HTTP_REQUEST_URL}${curRoute}`,
  909. title: that.storeInfo.title,
  910. summary: that.storeInfo.info,
  911. imageUrl: that.storeInfo.small_image,
  912. success: function(res) {
  913. uni.showToast({
  914. title: '分享成功',
  915. icon: 'success'
  916. })
  917. // that.posters = false;
  918. },
  919. fail: function(err) {
  920. uni.showToast({
  921. title: '分享失败',
  922. icon: 'none',
  923. duration: 2000
  924. })
  925. // that.posters = false;
  926. }
  927. });
  928. },
  929. // #endif
  930. /**
  931. * 购物车手动填写
  932. *
  933. */
  934. iptCartNum(e) {
  935. this.$set(this.attribute.productSelect, 'cart_num', e);
  936. this.$set(this, "cart_num", e);
  937. },
  938. getActivityDetail() {
  939. let that = this;
  940. let funApi = '';
  941. if (that.type == 1) {
  942. // 秒杀活动
  943. funApi = getSeckillDetail(that.id, {time_id: that.time_id});
  944. } else if(that.type == 3){
  945. // 拼团活动
  946. funApi = getCombinationDetail(that.id);
  947. } else if(that.type == 4){
  948. // 积分兑换(仅限平台商品)
  949. funApi = getIntegralProductDetail(that.id);
  950. } else if(that.type == 6){
  951. //预售商品
  952. funApi = getProductDetail(that.id);
  953. }else if(that.type == 7){
  954. // 新人专享(仅限平台商品))
  955. funApi = newcomerDetail(that.id)
  956. }
  957. funApi.then(res => {
  958. this.$set(this.attribute, 'isType', res.data.storeInfo.type);
  959. this.$set(this.attribute, 'relation_id', res.data.storeInfo.relation_id);
  960. this.dataShow = 1;
  961. this.storeInfo = res.data.storeInfo;
  962. this.$set(this,'productSwiper', res.data.storeInfo.slider_image || res.data.storeInfo.images);
  963. this.$set(this,'productVideoLink',res.data.storeInfo.video_link);
  964. let specsTitle = [];
  965. this.storeInfo.specs.forEach(res => {
  966. specsTitle.push(res.name)
  967. })
  968. this.$set(this.specsInfo, 'specsTitle', specsTitle.join(' · '));
  969. this.$set(this.specsInfo, 'specs', this.storeInfo.specs);
  970. this.posterTitle = res.data.product_poster_title || '';
  971. if(this.type == 1){
  972. this.datatime = Number(res.data.storeInfo.last_time);
  973. this.status = res.data.storeInfo.status;
  974. }else if(this.type== 3){
  975. this.itemNew = res.data.pink_ok_list;
  976. this.pink_ok_sum = res.data.pink_ok_sum;
  977. this.pink = res.data.pink;
  978. }
  979. this.attribute.productAttr = res.data.productAttr;
  980. if (res.data.storeInfo.delivery_type.indexOf('2') != -1) {
  981. that.$set(that, 'isMention', true);
  982. }
  983. this.productValue = res.data.productValue;
  984. for(let key in res.data.productValue){
  985. let obj = res.data.productValue[key];
  986. that.skuArr.push(obj)
  987. }
  988. that.selectSku = that.skuArr[0];
  989. res.data.storeInfo.delivery_type.sort((x,y)=>x - y);
  990. that.$set(that.attribute, 'deliveryType', res.data.storeInfo.delivery_type);
  991. this.attribute.productSelect.num = res.data.storeInfo.num || 0;
  992. this.attribute.productSelect.once_num = res.data.storeInfo.once_num || 0;
  993. this.replyCount = res.data.replyCount;
  994. this.reply = res.data.reply;
  995. this.replyChance = res.data.replyChance;
  996. this.shareQrcode = res.data.share_qrcode;
  997. that.routineContact = Number(res.data.routine_contact_type);
  998. that.siteName = res.data.site_name;
  999. // #ifdef H5
  1000. that.storeImage = that.storeInfo.image;
  1001. if(this.$wechat.isWeixin() && this.shareQrcode=='1'){
  1002. // this.getImageBase64(1);
  1003. that.downloadFilePromotionCode();
  1004. }else{
  1005. that.getImageBase64();
  1006. }
  1007. that.setShare();
  1008. // #endif
  1009. if (this.isLogin) {
  1010. // #ifdef MP
  1011. that.downloadFilePromotionCode();
  1012. // #endif
  1013. }
  1014. // #ifndef H5
  1015. that.downloadFilestoreImage();
  1016. // #endif
  1017. that.DefaultSelect();
  1018. that.preloadImage();
  1019. if(this.type == 1){
  1020. app.globalData.openPages = `/pages/activity/goods_details/index?id=${this.id}&type=1&time_id=${this.time_id}&spid=${this.storeInfo.uid}`
  1021. }else{
  1022. app.globalData.openPages = `/pages/activity/goods_details/index?id=${this.id}&type=${this.type}`
  1023. }
  1024. setTimeout(() => {
  1025. that.showSkeleton = false
  1026. }, 300)
  1027. }).catch(err => {
  1028. that.$util.Tips({
  1029. title: err
  1030. }, {
  1031. tab: 3
  1032. })
  1033. });
  1034. },
  1035. preloadImage: function () {
  1036. // 预加载海报生成动图
  1037. let that = this;
  1038. uni.downloadFile({
  1039. url: that.imgHost + '/statics/images/poster_loading.png',
  1040. success: function (res) {
  1041. // 图片下载成功,可以暂存图片路径或进行其他操作
  1042. console.log('Image preloaded:', res.tempFilePath);
  1043. },
  1044. });
  1045. },
  1046. setShare: function() {
  1047. this.$wechat.isWeixin() &&
  1048. this.$wechat.wechatEvevt([
  1049. "updateAppMessageShareData",
  1050. "updateTimelineShareData",
  1051. "onMenuShareAppMessage",
  1052. "onMenuShareTimeline"
  1053. ], {
  1054. desc: this.storeInfo.info,
  1055. title: this.storeInfo.title,
  1056. link: location.href,
  1057. imgUrl: this.storeInfo.image
  1058. }).then(res => {}).catch(err => {});
  1059. },
  1060. /**
  1061. * 默认选中属性
  1062. *
  1063. */
  1064. DefaultSelect: function() {
  1065. let self = this
  1066. let productAttr = self.attribute.productAttr;
  1067. let value = [];
  1068. if(this.type == 6 || this.type == 7){
  1069. for (var key in this.productValue) {
  1070. if (this.productValue[key].stock > 0) {
  1071. value = this.attribute.productAttr.length ? key.split(",") : [];
  1072. break;
  1073. }
  1074. }
  1075. }else{
  1076. for (var key in this.productValue) {
  1077. if (this.productValue[key].quota > 0) {
  1078. value = this.attribute.productAttr.length ? key.split(",") : [];
  1079. break;
  1080. }
  1081. }
  1082. }
  1083. for (let i = 0; i < productAttr.length; i++) {
  1084. this.$set(productAttr[i], "index", value[i]);
  1085. }
  1086. //sort();排序函数:数字-英文-汉字;
  1087. let productSelect = this.productValue[value.join(",")];
  1088. self.$set(self.attribute.productSelect,"store_name",self.storeInfo.title);
  1089. if (productSelect && productAttr.length) {
  1090. self.$set(self.attribute.productSelect, "image", productSelect.image);
  1091. self.$set(self.attribute.productSelect, "price", productSelect.price);
  1092. self.$set(self.attribute.productSelect, "stock", productSelect.stock);
  1093. self.$set(self.attribute.productSelect, "unique", productSelect.unique);
  1094. self.$set(self.attribute.productSelect, "quota", productSelect.quota);
  1095. self.$set(self.attribute.productSelect, "quota_show", productSelect.quota_show);
  1096. self.$set(self.attribute.productSelect, "cart_num", 1);
  1097. if(this.type == 4){
  1098. this.$set(this.attribute.productSelect, "integral", productSelect.integral);
  1099. }
  1100. self.$set(self, "attrValue", value.join(","));
  1101. self.attrValue = value.join(",")
  1102. } else if (!productSelect && productAttr.length) {
  1103. self.$set(self.attribute.productSelect, "image", self.storeInfo.image);
  1104. self.$set(self.attribute.productSelect, "price", self.storeInfo.price);
  1105. self.$set(self.attribute.productSelect, "quota", 0);
  1106. self.$set(self.attribute.productSelect, "quota_show", 0);
  1107. self.$set(self.attribute.productSelect, "stock", 0);
  1108. self.$set(self.attribute.productSelect, "unique", "");
  1109. self.$set(self.attribute.productSelect, "cart_num", 0);
  1110. if(this.type == 4){
  1111. this.$set(this.attribute.productSelect, "integral", this.storeInfo.integral);
  1112. }
  1113. self.$set(self, "attrValue", "");
  1114. self.$set(self, "attrTxt", "请选择");
  1115. } else if (!productSelect && !productAttr.length) {
  1116. self.$set(self.attribute.productSelect, "image", self.storeInfo.image);
  1117. self.$set(self.attribute.productSelect, "price", self.storeInfo.price);
  1118. self.$set(self.attribute.productSelect, "stock", self.storeInfo.stock);
  1119. self.$set(self.attribute.productSelect, "quota", self.storeInfo.quota || 0);
  1120. self.$set(self.attribute.productSelect,"unique",self.storeInfo.unique || "");
  1121. self.$set(self.attribute.productSelect, "cart_num", 1);
  1122. if(this.type == 4){
  1123. this.$set(this.attribute.productSelect, "integral", this.storeInfo.integral);
  1124. }
  1125. self.$set(self, "attrValue", "");
  1126. self.$set(self, "attrTxt", "请选择");
  1127. }
  1128. },
  1129. selecAttr: function() {
  1130. if(!this.isLogin){
  1131. toLogin();
  1132. return
  1133. }
  1134. if((this.storeInfo.delivery_type[0] == 2 || this.storeInfo.delivery_type[0] == 3) && !uni.getStorageSync('refuseLocation')){
  1135. this.$refs.productWindow.showLocation();
  1136. }
  1137. this.currentPage = false;
  1138. this.attribute.cartAttr = true
  1139. },
  1140. onMyEvent: function() {
  1141. this.$set(this.attribute, 'cartAttr', false);
  1142. this.$set(this, 'isOpen', false);
  1143. },
  1144. /**
  1145. * 购物车数量加和数量减
  1146. *
  1147. */
  1148. ChangeCartNum: function(changeValue) {
  1149. if (changeValue) {
  1150. this.attribute.productSelect.cart_num++;
  1151. }else{
  1152. this.attribute.productSelect.cart_num--;
  1153. }
  1154. },
  1155. selectSwiper(){
  1156. this.isSwiper = true;
  1157. this.$set(this,'productSwiper', this.storeInfo.slider_image || this.storeInfo.images);
  1158. this.$set(this,'productVideoLink',this.storeInfo.video_link);
  1159. },
  1160. changeAttrPic(item,index){
  1161. this.isSwiper = false;
  1162. this.ChangeAttr(item.suk);
  1163. this.changeSwitch(index);
  1164. this.$set(this,'productVideoLink','');
  1165. this.$set(this,'productSwiper', [item.image]);
  1166. },
  1167. attrVal(val) {
  1168. this.attribute.productAttr[val.indexw].index = this.attribute.productAttr[val.indexw].attr_values[val
  1169. .indexn];
  1170. },
  1171. onConfirm(){
  1172. this.$set(this.attribute, 'cartAttr', false);
  1173. this.isOpen = true;
  1174. if(this.cartType == 'cart'){
  1175. this.goCat(undefined,'cart');
  1176. }else{
  1177. this.goCat(true,'buy');
  1178. }
  1179. },
  1180. /**
  1181. * 属性变动赋值
  1182. *
  1183. */
  1184. ChangeAttr: function(res) {
  1185. this.$set(this, 'cart_num', 1);
  1186. let productSelect = this.productValue[res];
  1187. this.$set(this, "selectSku", productSelect);
  1188. if (productSelect) {
  1189. this.$set(this.attribute.productSelect, "image", productSelect.image);
  1190. this.$set(this.attribute.productSelect, "price", productSelect.price);
  1191. this.$set(this.attribute.productSelect, "stock", productSelect.stock);
  1192. this.$set(this.attribute.productSelect, "unique", productSelect.unique);
  1193. this.$set(this.attribute.productSelect, "cart_num", 1);
  1194. this.$set(this.attribute.productSelect, "quota", productSelect.quota);
  1195. this.$set(this.attribute.productSelect, "quota_show", productSelect.quota_show);
  1196. this.$set(this, "attrValue", res);
  1197. if(this.type == 4){
  1198. this.$set(this.attribute.productSelect, "integral", productSelect.integral);
  1199. }
  1200. this.attrTxt = "已选择"
  1201. } else {
  1202. this.$set(this.attribute.productSelect, "image", this.storeInfo.image);
  1203. this.$set(this.attribute.productSelect, "price", this.storeInfo.price);
  1204. this.$set(this.attribute.productSelect, "stock", 0);
  1205. this.$set(this.attribute.productSelect, "unique", "");
  1206. this.$set(this.attribute.productSelect, "cart_num", 0);
  1207. this.$set(this.attribute.productSelect, "quota", 0);
  1208. this.$set(this.attribute.productSelect, "quota_show", 0);
  1209. if(this.type == 4){
  1210. this.$set(this.attribute.productSelect, "integral", this.storeInfo.integral);
  1211. }
  1212. this.$set(this, "attrValue", "");
  1213. this.attrTxt = "已选择"
  1214. }
  1215. },
  1216. setCollect: Debounce(function() {
  1217. let that = this;
  1218. if (this.isLogin === false) {
  1219. toLogin();
  1220. } else {
  1221. let that = this;
  1222. if (this.storeInfo.userCollect) {
  1223. collectDel(this.type == 6 ? this.id : this.storeInfo.product_id).then(res => {
  1224. that.$set(that.storeInfo, 'userCollect', !that.storeInfo.userCollect);
  1225. return that.$util.Tips({
  1226. title: res.msg
  1227. });
  1228. });
  1229. } else {
  1230. collectAdd(this.type == 6 ? this.id : this.storeInfo.product_id).then(res => {
  1231. that.$set(that.storeInfo, 'userCollect', !that.storeInfo.userCollect);
  1232. return that.$util.Tips({
  1233. title: res.msg
  1234. });
  1235. });
  1236. }
  1237. }
  1238. }),
  1239. /*
  1240. * 单独购买
  1241. */
  1242. openAlone: Debounce(function() {
  1243. uni.navigateTo({
  1244. url: `/pages/goods_details/index?id=${this.storeInfo.product_id}`
  1245. })
  1246. }),
  1247. /*
  1248. * 下订单
  1249. */
  1250. goCat: function() {
  1251. if(this.isLogin){
  1252. if((this.storeInfo.delivery_type[0] == 2 || this.storeInfo.delivery_type[0] == 3) && !uni.getStorageSync('refuseLocation')){
  1253. this.$refs.productWindow.showLocation();
  1254. }
  1255. var that = this;
  1256. that.currentPage = false;
  1257. var productSelect = this.productValue[this.attrValue];
  1258. //打开属性
  1259. if (this.isOpen)
  1260. this.attribute.cartAttr = true
  1261. else
  1262. this.attribute.cartAttr = !this.attribute.cartAttr
  1263. //只有关闭属性弹窗时进行加入购物车
  1264. if (this.attribute.cartAttr === true && this.isOpen == false) return this.isOpen = true
  1265. //如果有属性,没有选择,提示用户选择
  1266. if (this.attribute.productAttr.length && productSelect === undefined && this.isOpen == true) return app
  1267. .$util.Tips({
  1268. title: '请选择属性'
  1269. });
  1270. postCartAdd({
  1271. productId: that.type == 6 ? that.id : that.storeInfo.product_id,
  1272. secKillId: that.type== 1 ? that.id : '', //秒杀活动传值
  1273. combinationId: that.type== 3 ? that.id : '', //拼团活动传值
  1274. storeIntegralId: that.type == 4 ? that.id : '', //积分兑换传值
  1275. newcomerId: that.type == 7 ? that.id : '', //新人专享传值
  1276. cartNum: that.attribute.productSelect.cart_num,
  1277. uniqueId: productSelect !== undefined ? productSelect.unique : '',
  1278. 'new': 1,
  1279. store_id:this.store_id,
  1280. addressId:this.addressId,
  1281. delivery_type:this.delivery_type
  1282. }).then(res => {
  1283. this.isOpen = false
  1284. let id = that.type == 1?that.id:that.storeInfo.product_id
  1285. uni.navigateTo({
  1286. url: '/pages/goods/order_confirm/index?new=1&cartId=' + res.data.cartId+'&delivery_type='+that.delivery_type+'&addressId='+that.addressId+'&store_id='+that.store_id+'&store_name='+that.store_name+'&product_id=' + id
  1287. });
  1288. }).catch(err => {
  1289. return this.$util.Tips({
  1290. title: err
  1291. });
  1292. });
  1293. }else{
  1294. toLogin()
  1295. }
  1296. },
  1297. /**
  1298. * 分享打开
  1299. *
  1300. */
  1301. listenerActionSheet: function() {
  1302. this.currentPage = false
  1303. if (this.isLogin === false) {
  1304. toLogin()
  1305. } else {
  1306. // #ifdef H5
  1307. if (this.$wechat.isWeixin() === true) {
  1308. this.weixinStatus = true;
  1309. }
  1310. // #endif
  1311. this.posters = true;
  1312. this.goPoster();
  1313. }
  1314. },
  1315. // 分享关闭
  1316. listenerActionClose: function() {
  1317. this.posters = false;
  1318. },
  1319. //隐藏海报
  1320. posterImageClose: function() {
  1321. this.posterImageStatus = false;
  1322. this.posters = false;
  1323. },
  1324. //替换安全域名
  1325. setDomain: function(url) {
  1326. url = url ? url.toString() : '';
  1327. //本地调试打开,生产请注销
  1328. if (url.indexOf("https://") > -1) return url;
  1329. else return url.replace('http://', 'https://');
  1330. },
  1331. //获取海报产品图
  1332. downloadFilestoreImage: function() {
  1333. let that = this;
  1334. uni.downloadFile({
  1335. url: that.setDomain(that.storeInfo.image),
  1336. success: function(res) {
  1337. that.storeImage = res.tempFilePath;
  1338. that.base64Show = 1;
  1339. },
  1340. fail: function() {
  1341. return that.$util.Tips({
  1342. title: ''
  1343. });
  1344. that.storeImage = '';
  1345. },
  1346. });
  1347. },
  1348. /**
  1349. * 获取产品分销二维码
  1350. * @param function successFn 下载完成回调
  1351. *
  1352. */
  1353. downloadFilePromotionCode: function(successFn) {
  1354. let that = this,data = {};
  1355. if(this.type == 1){
  1356. data = {
  1357. time:this.datatime,
  1358. status:this.status
  1359. };
  1360. }
  1361. activityCodeApi(this.type,this.id, data).then(res => {
  1362. uni.downloadFile({
  1363. // #ifdef H5
  1364. url: that.setDomain(res.data.wechatUrl ? res.data.wechatUrl : ''),
  1365. // #endif
  1366. // #ifdef MP
  1367. url: that.setDomain(res.data.routineUrl ? res.data.routineUrl : ''),
  1368. // #endif
  1369. success: function(res) {
  1370. that.$set(that, 'isDown', false);
  1371. if (typeof successFn == 'function')
  1372. successFn && successFn(res.tempFilePath);
  1373. else
  1374. that.$set(that, 'PromotionCode', res.tempFilePath);
  1375. },
  1376. fail: function() {
  1377. that.$set(that, 'isDown', false);
  1378. that.$set(that, 'PromotionCode', '');
  1379. },
  1380. });
  1381. }).catch(err => {
  1382. that.$set(that, 'isDown', false);
  1383. that.$set(that, 'PromotionCode', '');
  1384. });
  1385. },
  1386. getImageBase64: function(type) {
  1387. let that = this;
  1388. imageBase64(that.storeImage,that.followCode)
  1389. .then(res => {
  1390. that.storeImage = res.data.image;
  1391. if(type){
  1392. that.PromotionCode = res.data.code;
  1393. }
  1394. that.base64Show = 1;
  1395. })
  1396. .catch(() => {});
  1397. },
  1398. /**
  1399. * 生成海报
  1400. */
  1401. goPoster: function() {
  1402. let that = this;
  1403. // that.posters = false;
  1404. that.$set(that, 'canvasStatus', true);
  1405. let arr2 = [that.posterbackgd, that.storeImage, that.PromotionCode];
  1406. // #ifdef MP
  1407. if(that.PromotionCode==''&&!that.isDown){
  1408. return that.$util.Tips({
  1409. title: '小程序二维码需要发布正式版后才能获取到'
  1410. },function(){
  1411. that.posters = false;
  1412. });
  1413. }
  1414. // #endif
  1415. if (that.isDown) return that.$util.Tips({
  1416. title: '正在下载海报,请稍后再试!'
  1417. },function(){
  1418. that.posters = false;
  1419. });
  1420. uni.getImageInfo({
  1421. src: that.PromotionCode,
  1422. success() {
  1423. let storeName = that.type == 6 || that.type == 7 ? that.storeInfo.store_name : that.storeInfo.title;
  1424. if (arr2[2] == '') {
  1425. //海报二维码不存在则从新下载
  1426. that.downloadFilePromotionCode(function(msgPromotionCode) {
  1427. arr2[2] = msgPromotionCode;
  1428. if (arr2[2] == '')
  1429. return that.$util.Tips({
  1430. title: '海报二维码生成失败!'
  1431. });
  1432. that.$nextTick(()=>{
  1433. setTimeout(()=>{
  1434. that.$util.PosterCanvas(that.fontColor, that.themeColor, that.siteName, arr2, storeName,
  1435. that.storeInfo.price, that.storeInfo.ot_price,that.posterTitle,
  1436. function(tempFilePath) {
  1437. that.$set(that, 'posterImage', tempFilePath);
  1438. that.$set(that, 'posterImageStatus', true);
  1439. that.$set(that, 'canvasStatus', false);
  1440. that.$set(that, 'actionSheetHidden', !that
  1441. .actionSheetHidden);
  1442. });
  1443. },1000)
  1444. })
  1445. });
  1446. } else {
  1447. //生成推广海报
  1448. that.$nextTick(function(){
  1449. setTimeout(()=>{
  1450. that.$util.PosterCanvas(that.fontColor, that.themeColor, that.siteName, arr2, storeName, that.storeInfo.price, that
  1451. .storeInfo.ot_price,that.posterTitle,
  1452. function(tempFilePath) {
  1453. that.$set(that, 'posterImage', tempFilePath);
  1454. that.$set(that, 'posterImageStatus', true);
  1455. that.$set(that, 'canvasStatus', false);
  1456. that.$set(that, 'actionSheetHidden', !that.actionSheetHidden);
  1457. });
  1458. },1000)
  1459. })
  1460. }
  1461. },
  1462. });
  1463. },
  1464. /*
  1465. * 保存到手机相册
  1466. */
  1467. // #ifdef MP
  1468. savePosterPath: function() {
  1469. let that = this;
  1470. uni.getSetting({
  1471. success(res) {
  1472. if (!res.authSetting['scope.writePhotosAlbum']) {
  1473. uni.authorize({
  1474. scope: 'scope.writePhotosAlbum',
  1475. success() {
  1476. uni.saveImageToPhotosAlbum({
  1477. filePath: that.posterImage,
  1478. success: function(res) {
  1479. that.posterImageClose();
  1480. that.$util.Tips({
  1481. title: '保存成功',
  1482. icon: 'success'
  1483. });
  1484. },
  1485. fail: function(res) {
  1486. that.$util.Tips({
  1487. title: '保存失败'
  1488. });
  1489. }
  1490. })
  1491. }
  1492. })
  1493. } else {
  1494. uni.saveImageToPhotosAlbum({
  1495. filePath: that.posterImage,
  1496. success: function(res) {
  1497. that.posterImageClose();
  1498. that.$util.Tips({
  1499. title: '保存成功',
  1500. icon: 'success'
  1501. });
  1502. },
  1503. fail: function(res) {
  1504. that.$util.Tips({
  1505. title: '保存失败'
  1506. });
  1507. },
  1508. })
  1509. }
  1510. }
  1511. })
  1512. },
  1513. // #endif
  1514. //#ifdef APP-PLUS
  1515. savePosterPath() {
  1516. let that = this
  1517. uni.saveImageToPhotosAlbum({
  1518. filePath: that.posterImage,
  1519. success: function(res) {
  1520. that.posterImageClose();
  1521. that.$util.Tips({
  1522. title: '保存成功',
  1523. icon: 'success'
  1524. });
  1525. },
  1526. fail: function(res) {
  1527. that.$util.Tips({
  1528. title: '保存失败'
  1529. });
  1530. }
  1531. });
  1532. },
  1533. // #endif
  1534. setShareInfoStatus: function() {
  1535. let data = this.storeInfo;
  1536. let href = location.href;
  1537. if (this.$wechat.isWeixin()) {
  1538. this.posters = true;
  1539. getUserInfo().then(res => {
  1540. href =
  1541. href.indexOf("?") === -1 ?
  1542. href + "?spid=" + res.data.uid :
  1543. href + "&spid=" + res.data.uid;
  1544. let configAppMessage = {
  1545. desc: data.store_info,
  1546. title: data.store_name,
  1547. link: href,
  1548. imgUrl: data.image
  1549. };
  1550. this.$wechat.wechatEvevt(["updateAppMessageShareData", "updateTimelineShareData"],
  1551. configAppMessage)
  1552. });
  1553. }
  1554. },
  1555. goPage(type, url){
  1556. if(type == 1){
  1557. uni.navigateTo({
  1558. url
  1559. })
  1560. }else if(type == 2){
  1561. uni.switchTab({
  1562. url
  1563. })
  1564. }else if(type == 3){
  1565. uni.navigateBack();
  1566. }
  1567. },
  1568. spellBnt(item) {
  1569. if (this.isLogin) {
  1570. uni.navigateTo({
  1571. url: '/pages/activity/goods_combination_status/index?id=' + item.id
  1572. })
  1573. } else {
  1574. toLogin()
  1575. }
  1576. },
  1577. goGoodCall() {
  1578. getUserInfo().then(res => {
  1579. let userInfo = res.data;
  1580. let url = `/pages/extension/customer_list/chat?productId=${this.storeInfo.product_id}`;
  1581. let obj = {
  1582. store_name: this.storeInfo.store_name,
  1583. path: `/pages/activity/goods_details/index?id=${this.storeInfo.id}&type=${this.type}`,
  1584. image:this.storeInfo.image
  1585. }
  1586. this.$util.getCustomer(userInfo,url,obj,1)
  1587. })
  1588. },
  1589. },
  1590. onPageScroll(object) {
  1591. this.$set(this,'currentPage',false);
  1592. if (object.scrollTop > 340) {
  1593. this.pageScrollStatus = true;
  1594. } else if (object.scrollTop < 340) {
  1595. this.pageScrollStatus = false;
  1596. }
  1597. },
  1598. //#ifdef MP
  1599. onShareAppMessage() {
  1600. return {
  1601. title: this.storeInfo.title,
  1602. path: app.globalData.openPages,
  1603. imageUrl: this.storeInfo.image
  1604. };
  1605. },
  1606. onShareTimeline() {
  1607. let that = this;
  1608. return {
  1609. title: that.storeInfo.title,
  1610. imageUrl: that.storeInfo.image,
  1611. path: app.globalData.openPages,
  1612. };
  1613. },
  1614. //#endif
  1615. }
  1616. </script>
  1617. <style lang="scss">
  1618. /deep/uni-video {
  1619. width: 100% !important;
  1620. }
  1621. /deep/video {
  1622. width: 100% !important;
  1623. }
  1624. /deep/ .styleAll{
  1625. display: inline-block;
  1626. min-width: 34rpx;
  1627. height: 36rpx;
  1628. border-radius: 8rpx;
  1629. text-align: center;
  1630. line-height: 36rpx;
  1631. font-size: 28rpx;
  1632. font-family:'Regular';
  1633. padding: 0 2rpx;
  1634. }
  1635. .pink-cell{
  1636. /deep/ .styleAll{
  1637. font-size: 26rpx;
  1638. font-family: unset;
  1639. height: unset;
  1640. line-height: unset;
  1641. }
  1642. /deep/ .timeTxt{
  1643. margin: 0;
  1644. }
  1645. }
  1646. .seckill-card /deep/ .timeTxt{
  1647. padding: 0 6rpx;
  1648. }
  1649. .z-99{
  1650. z-index: 99;
  1651. }
  1652. .menu_box{
  1653. width: 154rpx;
  1654. height: 58rpx;
  1655. border-radius: 29rpx;
  1656. z-index: 999;
  1657. }
  1658. .menu_line{
  1659. width: 1px;
  1660. height: 30rpx;
  1661. background: #B3B3B3;
  1662. }
  1663. .opac{
  1664. background-color: rgba(255,255,255,0.6);
  1665. border: 1rpx solid rgba(0,0,0,0.1);
  1666. justify-content: space-evenly;
  1667. }
  1668. .info_card {
  1669. background: linear-gradient(180deg, #ffffff 0%, #ffffff 54%, rgba(255, 255, 255, 0) 100%);
  1670. margin-top: -32rpx;
  1671. }
  1672. .seckill-card{
  1673. padding: 16rpx 20rpx 0 40rpx !important;
  1674. }
  1675. .activity-card{
  1676. margin-top: -34rpx;
  1677. background-size: cover;
  1678. background-repeat: no-repeat;
  1679. padding: 16rpx 40rpx 0 40rpx;
  1680. }
  1681. .top52{
  1682. margin-top: -52rpx !important;
  1683. }
  1684. .pink-badge{
  1685. width: 110rpx;
  1686. height: 48rpx;
  1687. background-color: rgba(255,255,255,0.9);
  1688. border-radius: 24rpx 0 24rpx 0;
  1689. color: #e93323;
  1690. }
  1691. .text-red{
  1692. color: #e93323;
  1693. }
  1694. .pink-cell ~ .pink-cell{
  1695. margin-top: 64rpx;
  1696. }
  1697. .dot-line{
  1698. width: 76rpx;
  1699. height: 12rpx;
  1700. margin-bottom: 66rpx;
  1701. }
  1702. .bg--w111-484643{
  1703. background: linear-gradient(90deg, #484643 0%, #1F1B17 100%);
  1704. }
  1705. .text--w111-FDDAA4{
  1706. color: #FDDAA4;
  1707. }
  1708. .svip_rd{
  1709. border-radius: 14rpx 0 8rpx 14rpx;
  1710. }
  1711. .break_word {
  1712. overflow-wrap: break-word;
  1713. white-space: normal;
  1714. }
  1715. .white-nowrap {
  1716. white-space: nowrap;
  1717. }
  1718. .w-530{
  1719. width: 530rpx;
  1720. }
  1721. .w-524{
  1722. width: 524rpx;
  1723. }
  1724. .w-76{
  1725. width: 76rpx;
  1726. }
  1727. .active_pic {
  1728. display: flex;
  1729. justify-content: center;
  1730. align-items: center;
  1731. background-color: #fff;
  1732. border-radius: 16rpx;
  1733. border: 1px solid #333;
  1734. padding: 4rpx;
  1735. image {
  1736. width: 68rpx;
  1737. height: 68rpx;
  1738. border-radius: 12rpx;
  1739. }
  1740. }
  1741. .scroll_pic {
  1742. height:80rpx;
  1743. image {
  1744. width: 80rpx;
  1745. height: 80rpx;
  1746. border-radius: 16rpx;
  1747. }
  1748. }
  1749. .icon-ic_star1{
  1750. color: #e93323;
  1751. }
  1752. .font-red{
  1753. color: #e93323;
  1754. }
  1755. .bg-red{
  1756. background-color: #e93323;
  1757. }
  1758. .join_cart{
  1759. background-color: #FAAD14;
  1760. }
  1761. .bg-primary-light{
  1762. background: rgba(233, 51, 35, 0.1);
  1763. }
  1764. .recommend_pro ~ .recommend_pro{
  1765. margin-left: 38rpx;
  1766. }
  1767. .page_footer{
  1768. backdrop-filter: blur(10px);
  1769. border-top: 1px solid #f5f5f5;
  1770. }
  1771. .bg-transparent{
  1772. background: transparent;
  1773. }
  1774. .generate-posters {
  1775. width: 100%;
  1776. background-color: #fff;
  1777. position: fixed;
  1778. left: 0;
  1779. bottom: 0;
  1780. z-index: 388;
  1781. transform: translate3d(0, 100%, 0);
  1782. transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
  1783. border-top: 1rpx solid #eee;
  1784. border-radius: 20rpx 20rpx 0 0;
  1785. .generateCon {
  1786. height: 220rpx;
  1787. }
  1788. .generateClose {
  1789. width: 654rpx;
  1790. height: 72rpx;
  1791. background: #F5F5F5;
  1792. border-radius: 36rpx;
  1793. font-size: 26rpx;
  1794. font-weight: 500;
  1795. margin: 0 auto 40rpx;
  1796. }
  1797. .item {
  1798. .pictrue {
  1799. width: 86rpx;
  1800. height: 86rpx;
  1801. border-radius: 50%;
  1802. margin: 0 auto 12rpx auto;
  1803. image {
  1804. width: 100%;
  1805. height: 100%;
  1806. border-radius: 50%;
  1807. }
  1808. }
  1809. }
  1810. }
  1811. .generate-posters.on {
  1812. transform: translate3d(0, 0, 0);
  1813. }
  1814. .generate-posters .item {
  1815. flex: 1;
  1816. text-align: center;
  1817. font-size: 24rpx;
  1818. }
  1819. .canvas {
  1820. z-index: 300;
  1821. width: 750px;
  1822. height: 1300px;
  1823. position: relative;
  1824. bottom: -10000rpx;
  1825. }
  1826. .poster-mask{
  1827. position: fixed;
  1828. top: 0;
  1829. left: 0;
  1830. right: 0;
  1831. bottom: 0;
  1832. background-color: rgba(0,0,0,0.8);
  1833. z-index: 30;
  1834. backdrop-filter: blur(5px);
  1835. }
  1836. .poster-loading{
  1837. position: relative;
  1838. width: 100%;
  1839. z-index: 31;
  1840. }
  1841. .fixed-center{
  1842. position: fixed;
  1843. top: 0;
  1844. left: 0;
  1845. right: 0;
  1846. bottom: 0;
  1847. z-index: 40;
  1848. }
  1849. .poster-pop {
  1850. width: 460rpx;
  1851. height: 800rpx;
  1852. position: fixed;
  1853. left: 50%;
  1854. transform: translateX(-50%);
  1855. z-index: 399;
  1856. top: 50%;
  1857. margin-top: -559rpx;
  1858. }
  1859. .poster-pop image {
  1860. width: 100%;
  1861. height: 100%;
  1862. display: block;
  1863. border-radius: 18rpx;
  1864. }
  1865. .poster-pop .close {
  1866. width: 46rpx;
  1867. height: 75rpx;
  1868. position: fixed;
  1869. right: 0;
  1870. top: -73rpx;
  1871. display: block;
  1872. }
  1873. .poster-pop .save-poster {
  1874. background-color: #df2d0a;
  1875. font-size: :22rpx;
  1876. color: #fff;
  1877. text-align: center;
  1878. height: 76rpx;
  1879. line-height: 76rpx;
  1880. width: 100%;
  1881. }
  1882. .poster-pop .keep {
  1883. color: #fff;
  1884. text-align: center;
  1885. font-size: 25rpx;
  1886. margin-top: 10rpx;
  1887. }
  1888. .conter {
  1889. display: block;
  1890. overflow: auto;
  1891. }
  1892. .conter img {
  1893. display: block;
  1894. }
  1895. .notice .swiper {
  1896. width: 360rpx;
  1897. overflow: hidden;
  1898. margin-left: 8rpx;
  1899. }
  1900. .notice .swiper swiper {
  1901. height: 30rpx;
  1902. width: 100%;
  1903. overflow: hidden;
  1904. font-size: 24rpx;
  1905. color: #282828;
  1906. }
  1907. .SemiBold{
  1908. font-family: 'SemiBold';
  1909. }
  1910. .border-bottom{
  1911. border-bottom: 1rpx solid #eee;
  1912. }
  1913. </style>