index.vue 46 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880
  1. <template>
  2. <view class="container">
  3. <!-- 小程序头部兼容 -->
  4. <!-- #ifdef MP -->
  5. <view class="input-box flex" @click="clickSearch">
  6. <view class=" input-content flex">
  7. <view class="iconfont iconsearch"></view>
  8. <view class="input"><input type="text" disabled placeholder="请输入搜索内容" /></view>
  9. </view>
  10. </view>
  11. <view class="mp-height"></view>
  12. <!-- #endif -->
  13. <!-- 头部轮播 -->
  14. <!-- <view class="carousel-section"> -->
  15. <!-- 标题栏和状态栏占位符 -->
  16. <!-- <view class="titleNview-placing"></view> -->
  17. <!-- 背景色区域 -->
  18. <!-- <view class="titleNview-background" :style="{ backgroundColor: '#5DBC7C' }"></view> -->
  19. <!-- <view class="titleNview-background" ></view>
  20. <swiper class="carousel" autoplay="true" duration="400" interval="5000" @change="swiperChange">
  21. <swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item" @click="bannerNavToUrl(item)"><image :src="item.pic" /></swiper-item>
  22. </swiper>
  23. </view> -->
  24. <view class="titleNview-placing"></view>
  25. <view class="swiper-wrapper">
  26. <swiper class="swiper" autoplay="true" duration="400" interval="5000" @change="swiperChange" circular>
  27. <swiper-item v-for="(item, index) in carouselList" :key="index" class="swiper-item" @click="bannerNavToUrl(item)"><image :src="item.pic" /></swiper-item>
  28. </swiper>
  29. </view>
  30. <!-- 自定义swiper指示器 -->
  31. <view class="swiper-dot">
  32. <template v-for="item in swiperLength">
  33. <view class="swiper-dots-item" :key="item" :class="{ action: swiperCurrent + 1 === item }"></view>
  34. </template>
  35. </view>
  36. <!-- 秒杀title -->
  37. <view class="m-tap">
  38. <image src="../../static/img/seckill.png" mode=""></image>
  39. <text class="iconfont iconenter" @click="loadMore('/pages/product/seckill')">更多</text>
  40. </view>
  41. <!-- 秒杀商品 -->
  42. <view class="sckill-wrapper">
  43. <scroll-view scroll-x="true" class="sckill">
  44. <view class="item-wrapper">
  45. <view class="goods-box">
  46. <view class="image-wrapper"><image src="../../static/img/good1.jpg" mode="scaleToFill"></image></view>
  47. <view class="good-title">麻辣砂锅麻辣麻辣砂锅麻辣</view>
  48. <view class="price">
  49. <view class="now-price">¥77</view>
  50. <view class="old-price">¥99</view>
  51. </view>
  52. </view>
  53. <view class="goods-box">
  54. <view class="image-wrapper"><image src="../../static/img/good1.jpg" mode="scaleToFill"></image></view>
  55. <view class="good-title">麻辣砂锅麻辣麻辣砂锅麻辣</view>
  56. <view class="price">
  57. <view class="now-price">¥77</view>
  58. <view class="old-price">¥99</view>
  59. </view>
  60. </view>
  61. <view class="goods-box">
  62. <view class="image-wrapper"><image src="../../static/img/good1.jpg" mode="scaleToFill"></image></view>
  63. <view class="good-title">麻辣砂锅麻辣麻辣砂锅麻辣</view>
  64. <view class="price">
  65. <view class="now-price">¥77</view>
  66. <view class="old-price">¥99</view>
  67. </view>
  68. </view>
  69. <view class="goods-box">
  70. <view class="image-wrapper"><image src="../../static/img/good1.jpg" mode="scaleToFill"></image></view>
  71. <view class="good-title">麻辣砂锅麻辣麻辣砂锅麻辣</view>
  72. <view class="price">
  73. <view class="now-price">¥77</view>
  74. <view class="old-price">¥99</view>
  75. </view>
  76. </view>
  77. </view>
  78. </scroll-view>
  79. </view>
  80. <!-- 超值拼团title -->
  81. <view class="m-tap">
  82. <image src="../../static/img/groupBooking.png" mode=""></image>
  83. <text class="iconfont iconenter" @click="loadMore('/pages/product/groupBooking/index')">更多</text>
  84. </view>
  85. <!-- 超值拼团商品 -->
  86. <view class="groupBooking-wrapper">
  87. <view class="spgood">
  88. <view class="left-wrapper"><image src="../../static/img/spimg1.jpg" mode="scaleToFill"></image></view>
  89. <view class="right-wrapper">
  90. <view class="right-title">湿热肝上火气肺痰煲汤材料</view>
  91. <view class="ex-addr">
  92. <image src="../../static/img/shop.png" mode="" class="name-img"></image>
  93. 子臣台州旗舰店
  94. <image src="../../static/img/point.png" mode="" class="point-img"></image>
  95. 200m
  96. </view>
  97. <view class="right-bottom">
  98. <view class="sp-price">
  99. <view class="now-price">¥ 77</view>
  100. <view class="old-price">¥ 99</view>
  101. </view>
  102. <view class="sp-btn">马上拼</view>
  103. </view>
  104. </view>
  105. </view>
  106. <view class="jg"></view>
  107. <view class="spgood">
  108. <view class="left-wrapper"><image src="../../static/img/spimg1.jpg" mode="scaleToFill"></image></view>
  109. <view class="right-wrapper">
  110. <view class="right-title">湿热肝上火气肺痰煲汤材料</view>
  111. <view class="ex-addr">
  112. <image src="../../static/img/shop.png" mode="" class="name-img"></image>
  113. 子臣台州旗舰店
  114. <image src="../../static/img/point.png" mode="" class="point-img"></image>
  115. 200m
  116. </view>
  117. <view class="right-bottom">
  118. <view class="sp-price">
  119. <view class="now-price">¥ 77</view>
  120. <view class="old-price">¥ 99</view>
  121. </view>
  122. <view class="sp-btn">马上拼</view>
  123. </view>
  124. </view>
  125. </view>
  126. <view class="jg"></view>
  127. <view class="spgood">
  128. <view class="left-wrapper"><image src="../../static/img/spimg1.jpg" mode="scaleToFill"></image></view>
  129. <view class="right-wrapper">
  130. <view class="right-title">湿热肝上火气肺痰煲汤材料</view>
  131. <view class="ex-addr">
  132. <image src="../../static/img/shop.png" mode="" class="name-img"></image>
  133. 子臣台州旗舰店
  134. <image src="../../static/img/point.png" mode="" class="point-img"></image>
  135. 200m
  136. </view>
  137. <view class="right-bottom">
  138. <view class="sp-price">
  139. <view class="now-price">¥ 77</view>
  140. <view class="old-price">¥ 99</view>
  141. </view>
  142. <view class="sp-btn">马上拼</view>
  143. </view>
  144. </view>
  145. </view>
  146. </view>
  147. <!-- 积分兑换title -->
  148. <view class="m-tap">
  149. <image src="../../static/img/exchange.png" mode=""></image>
  150. <text class="iconfont iconenter" @click="loadMore('/pages/product/pointsExchange')">更多</text>
  151. </view>
  152. <!-- 积分兑换商品 -->
  153. <view class="exchange-wrapper">
  154. <view class="exgood-wrapper">
  155. <view class="ex-img-wrapper"><image src="../../static/img/ex1.jpg" mode=""></image></view>
  156. <view class="exgood-title">湿热肝上火气肺痰煲湿热肝上火气肺痰煲</view>
  157. <view class="ex-addr">
  158. <image src="../../static/img/shop.png" mode="" class="name-img"></image>
  159. 子臣台州旗舰店
  160. <image src="../../static/img/point.png" mode="" class="point-img"></image>
  161. 200m
  162. </view>
  163. <view class="ex-price">
  164. ¥26+20
  165. <text class="tx1">积分</text>
  166. <text class="tx2">¥99</text>
  167. </view>
  168. <view class="bg"></view>
  169. </view>
  170. <view class="exgood-wrapper">
  171. <view class="ex-img-wrapper"><image src="../../static/img/ex1.jpg" mode=""></image></view>
  172. <view class="exgood-title">湿热肝上火气肺痰煲湿热肝上火气肺痰煲</view>
  173. <view class="ex-addr">
  174. <image src="../../static/img/shop.png" mode="" class="name-img"></image>
  175. 子臣台州旗舰店
  176. <image src="../../static/img/point.png" mode="" class="point-img"></image>
  177. 200m
  178. </view>
  179. <view class="ex-price">
  180. ¥26+20
  181. <text class="tx1">积分</text>
  182. <text class="tx2">¥99</text>
  183. </view>
  184. <view class="bg"></view>
  185. </view>
  186. </view>
  187. <!-- 分类 -->
  188. <view class="cate-section">
  189. <view class="cate-item">
  190. <image src="/static/icon/c3.png"></image>
  191. <text>联盟礼包</text>
  192. </view>
  193. <navigator url="/pages/product/groupBooking/index">
  194. <view class="cate-item">
  195. <image src="/static/icon/c5.png"></image>
  196. <text>超值拼团</text>
  197. </view>
  198. </navigator>
  199. <navigator url="/pages/product/seckill">
  200. <view class="cate-item">
  201. <image src="/static/icon/c7.png"></image>
  202. <text>限时秒杀</text>
  203. </view>
  204. </navigator>
  205. <navigator url="/pages/index/sign">
  206. <view class="cate-item">
  207. <image src="/static/icon/c8.png"></image>
  208. <text>每日签到</text>
  209. </view>
  210. </navigator>
  211. </view>
  212. <view class="ad-1"><image src="/static/temp/ad1.jpg" mode="scaleToFill"></image></view>
  213. <!-- 可领取优惠券 -->
  214. <!-- <scroll-view class="coupon-box clamp" :scroll-x="true">
  215. <view v-for="(item, index) in couponArray" :key="item.id" class="coupon-list">
  216. <view class="row flex">
  217. <view class="list-money flex">
  218. <image :src="item.is_use ? '/static/img/img02.png' : '/static/img/img03.png'" mode="scaleToFill"></image>
  219. <view class="list-money-text">
  220. <view class="tit" :class="{ noAction: item.is_use }">
  221. <text>{{ item.coupon_price }}</text>
  222. </view>
  223. </view>
  224. </view>
  225. <view class="list-interval position-relative">
  226. <view class="bottom"></view>
  227. <view class="top"></view>
  228. </view>
  229. <view class="row_list_right">
  230. <view class="right_top"><text class="right_title" :class="{ noAction: item.is_use }">满减券</text></view>
  231. <view class="right_time">
  232. <text>{{ item.use_min_price }}使用</text>
  233. </view>
  234. </view>
  235. <view class="right_use" :class="{ noAction: item.is_use }" @click="setCoupons(item)">
  236. <text>{{ item.is_use ? '已领取' : '立即领取' }}</text>
  237. </view>
  238. </view>
  239. </view>
  240. </scroll-view> -->
  241. <!-- 秒杀楼层 -->
  242. <seckill></seckill>
  243. <!-- 砍价 -->
  244. <view class="hot-goods">
  245. <view class="hot-headers flex-upDown-center">
  246. <!-- <image class="img" src="../../static/img/img44.png"></image> -->
  247. <view class="hot-title">超值砍价</view>
  248. <view><view class="more" @click.stop="navTo('/pages/activity/goods_bargain/index')">更多</view></view>
  249. </view>
  250. <view class="hot-lists" v-for="(baritem, barindex) in bargainlist" :key="barindex" @click.stop="navToDetailPages(baritem)">
  251. <view class="hot-produce">
  252. <view class="produce-image"><image :src="baritem.image"></image></view>
  253. <view class="produce-content">
  254. <view class="produce-price1 ">
  255. <view class="produce-name line2">{{ baritem.title }}</view>
  256. <!-- <view class="produce-info">
  257. 已抢
  258. <text style="color: #FF383E">{{ baritem.sales }}</text>
  259. 箱/仅剩
  260. <text style="color:#FF383E">{{ baritem.stock }}</text>
  261. </view> -->
  262. <view class="produce-center">
  263. <view class="kanjia_word">
  264. <view class="word-1">原价:¥{{ baritem.price }}</view>
  265. <view class="word-2">
  266. 砍后价
  267. <text style="font-size: 24rpx;"></text>
  268. <text style="font-size: 36rpx;">{{ baritem.min_price }}</text>
  269. </view>
  270. </view>
  271. <view
  272. class="kanjia_button flex-center"
  273. @tap.stop="openSubscribe('/pages/activity/goods_bargain_details/index?id=' + baritem.id + '&bargain=' + userInfo.uid)"
  274. >
  275. <view>查看详情</view>
  276. </view>
  277. </view>
  278. </view>
  279. </view>
  280. </view>
  281. </view>
  282. </view>
  283. <!-- 拼团楼层 -->
  284. <view class="recommend flex">
  285. <view class="recommend_list" @click="change(ls.id)" v-for="ls in recommend" :key="ls.re_title">
  286. <view class="re_title" v-bind:class="{ active_color: ls.id == checkid }">{{ ls.re_title }}</view>
  287. <view class="re_name" v-bind:class="{ active_color: ls.id == checkid }">{{ ls.re_name }}</view>
  288. <image class="selected_icon" v-bind:class="{ active: ls.id == checkid }" src="/static/img/img04.png"></image>
  289. </view>
  290. </view>
  291. <swiper id="list-box" @change="listChange" :style="{ height: swiperHeight + 'px' }" :current="checkid">
  292. <swiper-item>
  293. <!-- <scroll-view scroll-y="true" class="list-box-h"> -->
  294. <view class="guess-section">
  295. <view v-for="(item, index) in bastList" :key="index" class="guess-item" @click="navToDetailPage(item)">
  296. <view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
  297. <text class="title clamp margin-c-20">{{ item.store_name }}</text>
  298. <view class="cmy-hr"></view>
  299. <view class="price margin-c-20 flex">
  300. <view>
  301. <text class="font-size-sm "></text>
  302. {{ item.price }}
  303. </view>
  304. <view class="font-size-sm">
  305. <text class="font-color-gray">{{ item.sales }}人购买</text>
  306. </view>
  307. </view>
  308. </view>
  309. </view>
  310. <!-- </scroll-view> -->
  311. </swiper-item>
  312. <swiper-item>
  313. <scroll-view scroll-y="true" class="list-box-h">
  314. <view class="guess-section">
  315. <view v-for="(item, index) in goodsList" :key="index" class="guess-item" @click="navToDetailPage(item)">
  316. <view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
  317. <text class="title clamp margin-c-20">{{ item.store_name }}</text>
  318. <view class="cmy-hr"></view>
  319. <view class="price margin-c-20 flex">
  320. <view>
  321. <text class="font-size-sm "></text>
  322. {{ item.price }}
  323. </view>
  324. <view class="font-size-sm">
  325. <text class="font-color-gray">{{ item.sales }}人购买</text>
  326. </view>
  327. </view>
  328. </view>
  329. </view>
  330. </scroll-view>
  331. </swiper-item>
  332. <swiper-item>
  333. <scroll-view scroll-y="true">
  334. <view class="guess-section">
  335. <view v-for="(item, index) in bastBanner" :key="index" class="guess-item" @click="navToDetailPage(item)">
  336. <navigator :url="item.link">
  337. <view class="image-wrappe r"><image :src="item.image" mode="scaleToFill"></image></view>
  338. <text class="title clamp margin-c-20">{{ item.store_name }}</text>
  339. <view class="cmy-hr"></view>
  340. <view class="price margin-c-20 flex">
  341. <view>
  342. <text class="font-size-sm "></text>
  343. {{ item.price }}
  344. </view>
  345. <view class="font-size-sm">
  346. <text class="font-color-gray">库存{{ item.stock + item.unit_name }}</text>
  347. </view>
  348. </view>
  349. </navigator>
  350. </view>
  351. </view>
  352. </scroll-view>
  353. </swiper-item>
  354. </swiper>
  355. <!-- 精品 商品 -->
  356. <view class="f-header m-t">
  357. <view class="f-left-icon"></view>
  358. <view class="tit-box"><text class="tit">精品推荐</text></view>
  359. <navigator url="/pages/product/classify?type=1"><text class="iconfont iconenter">更多</text></navigator>
  360. </view>
  361. <view class="guess-section">
  362. <view v-for="(item, index) in bastList" :key="index" class="guess-item" @click="navToDetailPage(item)">
  363. <view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
  364. <text class="title clamp margin-c-20">{{ item.store_name }}</text>
  365. <view class="cmy-hr"></view>
  366. <view class="price margin-c-20 flex">
  367. <view>
  368. <text class="font-size-sm "></text>
  369. {{ item.price }}
  370. </view>
  371. <view class="font-size-sm">
  372. <text class="font-color-gray">{{ item.sales }}人购买</text>
  373. </view>
  374. </view>
  375. </view>
  376. </view>
  377. <!-- 最新 商品 -->
  378. <view class="f-header m-t">
  379. <view class="f-left-icon"></view>
  380. <view class="tit-box"><text class="tit">最新商品</text></view>
  381. <navigator url="/pages/product/classify?type=3"><text class="iconfont iconenter">更多</text></navigator>
  382. </view>
  383. <view class="guess-section">
  384. <view v-for="(item, index) in goodsList" :key="index" class="guess-item" @click="navToDetailPage(item)">
  385. <view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
  386. <text class="title clamp margin-c-20">{{ item.store_name }}</text>
  387. <view class="cmy-hr"></view>
  388. <view class="price margin-c-20 flex">
  389. <view>
  390. <text class="font-size-sm "></text>
  391. {{ item.price }}
  392. </view>
  393. <view class="font-size-sm">
  394. <text class="font-color-gray">{{ item.sales }}人购买</text>
  395. </view>
  396. </view>
  397. </view>
  398. </view>
  399. <!-- 促销 商品 -->
  400. <view class="f-header m-t">
  401. <view class="f-left-icon"></view>
  402. <view class="tit-box"><text class="tit">促销商品</text></view>
  403. <navigator url="/pages/product/classify?type=4"><text class="iconfont iconenter">更多</text></navigator>
  404. </view>
  405. <view class="guess-section">
  406. <view v-for="(item, index) in bastBanner" :key="index" class="guess-item" @click="navToDetailPage(item)">
  407. <view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
  408. <text class="title clamp margin-c-20">{{ item.store_name }}</text>
  409. <view class="cmy-hr"></view>
  410. <view class="price margin-c-20 flex">
  411. <view>
  412. <text class="font-size-sm "></text>
  413. {{ item.price }}
  414. </view>
  415. <view class="font-size-sm">
  416. <text class="font-color-gray">{{ item.sales }}人购买</text>
  417. </view>
  418. </view>
  419. </view>
  420. </view>
  421. <!-- 会员升级专区 -->
  422. <!-- <view class="f-header m-t">
  423. <view class="f-left-icon"></view>
  424. <view class="tit-box"><text class="tit">会员升级专区</text></view>
  425. <text class="iconfont iconenter">更多</text>
  426. </view> -->
  427. <!-- <view class="uservip flex">
  428. <image @error="onImageError('userServant', 0)" lazy-load :src="userServant[0].image" mode="aspectFill"></image>
  429. <view class="detail">
  430. <view class="title">满园春1999元会员升级礼包</view>
  431. <view class="icon">自营</view>
  432. <view class="flex price-box">
  433. <view class="price">
  434. <text class="font-size-sm"></text>
  435. 18888
  436. </view>
  437. <view class="text">115人购买</view>
  438. </view>
  439. </view>
  440. </view> -->
  441. <!-- 精品推荐 -->
  442. <!-- <view class="f-header m-t">
  443. <view class="f-left-icon"></view>
  444. <view class="tit-box"><text class="tit">精品推荐</text></view>
  445. <text class="iconfont iconenter">更多</text>
  446. </view> -->
  447. <!-- <view class="guess-section">
  448. <view v-for="(item, index) in goodsList" :key="index" class="guess-item" @click="navToDetailPage(item)">
  449. <view class="image-wrapper"><image @error="onImageError('goodsList', index)" lazy-load :src="item.image" mode="aspectFill"></image></view>
  450. <text class="title clamp margin-c-20">
  451. <text class="icon">自营</text>
  452. {{ item.title }}
  453. </text>
  454. <view class="hr"></view>
  455. <view class="price margin-c-20 flex">
  456. <view>
  457. <text class="font-size-sm "></text>
  458. {{ item.price }}
  459. </view>
  460. <view class="font-size-sm">
  461. <view class='detail'>
  462. <text class="icon">代理价</text>
  463. <text></text>
  464. </view>
  465. <view class="detail">
  466. <text class="font-color-yellow">会员价</text>
  467. <text class="font-color-yellow">7.5折</text>
  468. </view>
  469. </view>
  470. </view>
  471. <view class="tip">兑换价¥44+44积分</view>
  472. </view>
  473. </view> -->
  474. <view class="Mask" v-show="shareShow">
  475. <image @click="share" src="http://shicai.liuniu946.com/static/img/shareimg4.png"></image>
  476. <view class="Toshare" @click="Toshare"></view>
  477. <view class="Tocancel" @click="Tocancel"></view>
  478. </view>
  479. </view>
  480. </template>
  481. <script>
  482. import seckill from '../../components/seckill/seckill.vue';
  483. import { loadIndexs } from '@/api/index.js';
  484. import { getUserInfo } from '@/api/user.js';
  485. import { setCoupons } from '@/api/functionalUnit.js';
  486. import { getBargainList } from '@/api/product.js';
  487. import { interceptor } from '@/utils/loginUtils';
  488. import { mapState } from 'vuex';
  489. export default {
  490. components: {
  491. seckill
  492. },
  493. watch: {
  494. //自适应swiper高度
  495. checkid(newValue, oldValue) {
  496. let obj = this;
  497. if (newValue == 0) {
  498. let bHeight = Math.ceil(obj.bastList.length / 2);
  499. obj.swiperHeight = Math.ceil(obj.pageProportion * 520 * bHeight);
  500. }
  501. if (newValue == 1) {
  502. let bHeight = Math.ceil(obj.goodsList.length / 2);
  503. obj.swiperHeight = Math.ceil(obj.pageProportion * 520 * bHeight);
  504. }
  505. if (newValue == 2) {
  506. let bHeight = Math.ceil(obj.bastBanner.length / 2);
  507. obj.swiperHeight = Math.ceil(obj.pageProportion * 520 * bHeight);
  508. }
  509. },
  510. // 初次加载页面高度时修改页面高度
  511. bastList(newValue, oldValue) {
  512. let obj = this;
  513. let bHeight = Math.ceil(newValue.length / 2);
  514. obj.$nextTick(function() {
  515. uni.createSelectorQuery()
  516. .select('#list-box')
  517. .fields(
  518. {
  519. size: true
  520. },
  521. function(data) {
  522. obj.pageProportion = data.width / 750;
  523. obj.swiperHeight = Math.ceil(obj.pageProportion * 520 * bHeight);
  524. }
  525. )
  526. .exec();
  527. });
  528. }
  529. },
  530. data() {
  531. return {
  532. shareShow: false, //分享海报
  533. pageProportion: 0, //保存页面基于750宽度的比例
  534. swiperHeight: 0,
  535. checkid: 0,
  536. titleNViewBackground: '',
  537. swiperCurrent: 0,
  538. swiperLength: 0,
  539. bargainlist: [], //砍价商品
  540. carouselList: [], //轮播列表
  541. goodsList: [], //最新商品列表
  542. bastList: [], //精品推荐列表
  543. bastBanner: [], //促销商品列表
  544. menusList: [], //头部菜单
  545. page: 1,
  546. limit: 5,
  547. userServant: [
  548. {
  549. image: ''
  550. }
  551. ], //用户推广服务
  552. couponArray: [], //可领取优惠券
  553. recommend: [
  554. {
  555. id: 0,
  556. re_title: '精选',
  557. re_name: '为你推荐'
  558. },
  559. {
  560. id: 1,
  561. re_title: '最新',
  562. re_name: '最新好货优选'
  563. },
  564. {
  565. id: 2,
  566. re_title: '便宜好货',
  567. re_name: '90天便宜好货'
  568. }
  569. ],
  570. actTime: new Date()
  571. };
  572. },
  573. computed: {
  574. ...mapState(['loginInterceptor']),
  575. ...mapState('user', ['hasLogin', 'userInfo'])
  576. },
  577. onLoad: function(option) {
  578. // #ifndef MP
  579. if (option.spread) {
  580. // 存储其他邀请人
  581. uni.setStorageSync('spread', option.spread);
  582. }
  583. // #endif
  584. // #ifdef MP
  585. if (option.scene) {
  586. // 存储小程序邀请人
  587. uni.setStorage({
  588. key: 'spread_code',
  589. data: option.scene
  590. });
  591. }
  592. // #endif
  593. },
  594. onShow: function() {
  595. // 判断是否强制登录
  596. if (this.loginInterceptor && !this.hasLogin) {
  597. // 登录拦截
  598. interceptor();
  599. }
  600. this.loadData();
  601. this.getBargainList();
  602. },
  603. //下拉刷新
  604. onPullDownRefresh() {
  605. this.loadData();
  606. },
  607. // #ifndef MP
  608. // 监听导航栏输入框点击事件
  609. onNavigationBarSearchInputClicked(e) {
  610. //跳转到搜索页面
  611. this.clickSearch();
  612. },
  613. //点击导航栏 buttons 时触发
  614. onNavigationBarButtonTap(e) {
  615. const index = e.index;
  616. if (index === 0) {
  617. this.$api.msg('点击了扫描');
  618. } else if (index === 1) {
  619. // #ifdef APP-PLUS
  620. const pages = getCurrentPages();
  621. const page = pages[pages.length - 1];
  622. const currentWebview = page.$getAppWebview();
  623. currentWebview.hideTitleNViewButtonRedDot({
  624. index
  625. });
  626. // #endif
  627. uni.navigateTo({
  628. url: '/pages/user/notice'
  629. });
  630. }
  631. },
  632. // #endif
  633. methods: {
  634. //砍价商品推荐详情页
  635. navToDetailPages(item) {
  636. let id = item.product_id;
  637. //let type = 2;
  638. uni.navigateTo({
  639. url: '/pages/product/product?id=' + id
  640. });
  641. },
  642. openSubscribe: function(e) {
  643. let page = e;
  644. // #ifndef MP
  645. uni.navigateTo({
  646. url: page
  647. });
  648. // #endif
  649. // #ifdef MP
  650. uni.showLoading({
  651. title: '正在加载'
  652. });
  653. openBargainSubscribe()
  654. .then(res => {
  655. uni.hideLoading();
  656. uni.navigateTo({
  657. url: page
  658. });
  659. })
  660. .catch(err => {
  661. uni.hideLoading();
  662. });
  663. // #endif
  664. },
  665. getBargainList() {
  666. let that = this;
  667. getBargainList({
  668. page: that.page,
  669. limit: that.limit
  670. })
  671. .then(function(res) {
  672. that.$set(that, 'bargainlist', res.data.slice(0, 2));
  673. })
  674. .catch(res => {
  675. console.log(res, 'getBargainList');
  676. });
  677. },
  678. Mask() {
  679. this.MaskShow = false;
  680. this.shareShow = true;
  681. uni.setStorage({
  682. key: 'FirstEntry',
  683. data: true,
  684. success: function() {
  685. console.log(uni.getStorageSync('FirstEntry'), 'Mask');
  686. }
  687. });
  688. },
  689. Toshare() {
  690. if (this.userInfo == '') {
  691. getUserInfo({})
  692. .then(({ data }) => {
  693. this.setUserInfo(data);
  694. this.userInfo = data;
  695. })
  696. .catch(e => {});
  697. } else {
  698. this.shareShow = false;
  699. uni.navigateTo({
  700. url: '/pages/user/shareQrCode?spread=' + this.userInfo.uid
  701. });
  702. }
  703. },
  704. Tocancel() {
  705. this.shareShow = false;
  706. },
  707. // 监听切换事件
  708. listChange(e) {
  709. this.checkid = e.detail.current;
  710. },
  711. // 點擊搜索框
  712. clickSearch() {
  713. uni.navigateTo({
  714. url: '/pages/product/search'
  715. });
  716. },
  717. // 点击触发领取优惠券
  718. setCoupons(item) {
  719. // 判断是否已经领取了优惠券
  720. let obj = this;
  721. uni.showModal({
  722. title: '领取提示',
  723. content: '是否领取优惠券',
  724. success(e) {
  725. if (e.confirm) {
  726. setCoupons({
  727. couponId: item.id
  728. }).then(e => {
  729. item.is_use = true;
  730. uni.showToast({
  731. title: '领取成功',
  732. type: 'top',
  733. duration: 2000
  734. });
  735. });
  736. }
  737. }
  738. });
  739. },
  740. //商品种类切换
  741. change(item) {
  742. let id = item;
  743. this.checkid = id;
  744. if (this.checkid == 1) {
  745. // console.log(1);
  746. this.detail = this.selected_detail;
  747. } else if (this.checkid == 2) {
  748. // console.log(2);
  749. this.detail = this.new_product;
  750. } else {
  751. this.detail = this.cheap_good;
  752. }
  753. },
  754. // 监听图片加载完成
  755. onImageError(key, index) {
  756. this[key][index].image = '/static/error/errorImage.jpg';
  757. },
  758. // 请求载入数据
  759. async loadData() {
  760. loadIndexs({})
  761. .then(({ data }) => {
  762. console.log('index-data++++++++++++++++++',data)
  763. let goods = data.info;
  764. this.carouselList = data.banner;
  765. this.swiperLength = this.carouselList.length;
  766. this.menusList = data.menus;
  767. this.goodsList = goods.firstList; //最新商品
  768. this.bastList = goods.bastList; //精品推荐
  769. this.bastBanner = data.benefit; //促销单品
  770. this.$set(this, 'couponArray', data.couponList); //保存卡包券
  771. uni.stopPullDownRefresh();
  772. })
  773. .catch(e => {
  774. uni.stopPullDownRefresh();
  775. });
  776. },
  777. //轮播图切换修改背景色
  778. swiperChange(e) {
  779. const index = e.detail.current;
  780. this.swiperCurrent = index;
  781. this.titleNViewBackground = this.carouselList[index].background;
  782. },
  783. //详情页
  784. navToDetailPage(item) {
  785. let id = item.id;
  786. uni.navigateTo({
  787. url: '/pages/product/product?id=' + id
  788. });
  789. },
  790. // 轮播图跳转
  791. bannerNavToUrl(item) {
  792. // #ifdef H5
  793. if (item.wap_url.indexOf('http') > 0) {
  794. window.location.href = item.wap_url;
  795. }
  796. // #endif
  797. //测试数据没有写id,用title代替
  798. uni.navigateTo({
  799. url: item.wap_url
  800. });
  801. },
  802. loadMore(url) {
  803. console.log('加载更多');
  804. uni.navigateTo({
  805. url: url
  806. });
  807. }
  808. }
  809. };
  810. </script>
  811. <style lang="scss">
  812. .Mask {
  813. width: 100%;
  814. height: 100vh;
  815. position: fixed;
  816. z-index: 99999;
  817. background-color: rgba(0, 0, 0, 0.7);
  818. top: 0;
  819. image {
  820. width: 100%;
  821. height: 100vh;
  822. }
  823. }
  824. // 热销商品
  825. .hot-goods {
  826. margin: 0 25rpx;
  827. padding: 5rpx 25rpx 30rpx 25rpx;
  828. background-color: #fff;
  829. border-radius: 10rpx;
  830. .hot-headers {
  831. margin: 25rpx 0;
  832. width: 100%;
  833. display: flex;
  834. .img {
  835. width: 32rpx;
  836. height: 32rpx;
  837. margin-right: 10rpx;
  838. }
  839. .hot-title {
  840. font-size: 30rpx;
  841. margin-right: 15rpx;
  842. }
  843. .more {
  844. line-height: 1;
  845. padding: 5rpx 10rpx 5rpx 15rpx;
  846. text-align: center;
  847. font-size: 20rpx;
  848. border-radius: 15rpx;
  849. color: #ffffff;
  850. background: linear-gradient(90deg, rgba(250, 52, 38, 1) 0%, rgba(249, 30, 83, 1) 100%);
  851. image {
  852. width: 20rpx;
  853. height: 20rpx;
  854. }
  855. }
  856. }
  857. .hot-lists {
  858. line-height: 1;
  859. display: flex;
  860. .hot-produce {
  861. width: 100%;
  862. height: 260rpx;
  863. border-top: 1px solid #f0f0f0;
  864. display: flex;
  865. padding-top: 28rpx;
  866. .produce-image {
  867. width: 200rpx;
  868. height: 200rpx;
  869. image {
  870. width: 200rpx;
  871. height: 200rpx;
  872. border: 1px solid #f0f0f0;
  873. }
  874. }
  875. .produce-content {
  876. // flex-direction: column;
  877. margin-left: 30rpx;
  878. height: 200rpx;
  879. position: relative;
  880. width: calc(100% - 200rpx - 30rpx);
  881. .produce-name {
  882. font-size: 28rpx;
  883. font-weight: bold;
  884. line-height: 35rpx;
  885. color: #343434;
  886. }
  887. .produce-info {
  888. font-size: 20rpx;
  889. margin-top: 25rpx;
  890. }
  891. .produce-price {
  892. display: flex;
  893. align-items: flex-end;
  894. color: #ff383e;
  895. font-size: 24rpx;
  896. margin-top: 70rpx;
  897. font-weight: bold;
  898. text {
  899. font-size: 36rpx;
  900. }
  901. .produce-price-1 {
  902. font-size: 22rpx;
  903. font-weight: 500;
  904. text-decoration: line-through;
  905. color: rgba(170, 170, 170, 1);
  906. margin-left: 20rpx;
  907. }
  908. }
  909. .produce-price1 {
  910. height: 100%;
  911. letter-spacing: 3rpx;
  912. color: #ff383e;
  913. font-size: 24rpx;
  914. font-weight: bold;
  915. .produce-center {
  916. width: 100%;
  917. position: absolute;
  918. bottom: 0;
  919. display: flex;
  920. justify-content: space-between;
  921. align-items: center;
  922. .kanjia_word {
  923. .word-1 {
  924. font-size: 22rpx;
  925. color: #666666;
  926. }
  927. .word-2 {
  928. font-size: 28rpx;
  929. color: #ff383e;
  930. margin-top: 10rpx;
  931. }
  932. }
  933. .kanjia_button {
  934. height: 50rpx;
  935. width: 150rpx;
  936. border-radius: 25rpx;
  937. font-size: 26rpx;
  938. font-weight: 500;
  939. color: #ff383e;
  940. border: 1px solid rgba(255, 56, 62, 1);
  941. }
  942. }
  943. }
  944. }
  945. }
  946. }
  947. }
  948. /* #ifdef MP */
  949. .mp-height {
  950. height: 44px;
  951. }
  952. .input-box {
  953. position: fixed;
  954. top: 0;
  955. left: 0;
  956. width: 100%;
  957. padding: 25rpx;
  958. background-color: #ffffff;
  959. z-index: 999;
  960. height: 44px;
  961. .iconsearch {
  962. font-size: 50rpx;
  963. }
  964. .input-content {
  965. border-radius: 99rpx;
  966. flex-grow: 1;
  967. padding: 10rpx 30rpx;
  968. background-color: rgba(231, 231, 231, 0.7);
  969. .input {
  970. flex-grow: 1;
  971. input {
  972. font-size: $font-lg;
  973. }
  974. }
  975. }
  976. .input-button {
  977. padding-left: 20rpx;
  978. font-size: $font-lg;
  979. height: 100%;
  980. }
  981. }
  982. page {
  983. // background-color: red;
  984. .cate-section {
  985. position: relative;
  986. z-index: 5;
  987. border-radius: 16rpx 16rpx 0 0;
  988. margin-top: -20rpx;
  989. }
  990. .carousel-section {
  991. padding: 0;
  992. .titleNview-placing {
  993. padding-top: 0;
  994. height: 0;
  995. }
  996. .carousel {
  997. .carousel-item {
  998. padding: 0;
  999. }
  1000. }
  1001. .swiper-dots {
  1002. left: 45rpx;
  1003. bottom: 40rpx;
  1004. }
  1005. }
  1006. }
  1007. /* #endif */
  1008. page {
  1009. background: #f7f8f7;
  1010. }
  1011. .m-t {
  1012. margin-top: 16rpx;
  1013. }
  1014. /* 头部 轮播图 */
  1015. .carousel-section {
  1016. position: relative;
  1017. padding-top: 10px;
  1018. overflow: hidden;
  1019. .titleNview-placing {
  1020. height: var(--status-bar-height);
  1021. padding-top: 44px;
  1022. box-sizing: content-box;
  1023. }
  1024. .titleNview-background {
  1025. position: absolute;
  1026. top: 0;
  1027. left: 0;
  1028. width: 100%;
  1029. height: 426rpx;
  1030. transition: 0.4s;
  1031. }
  1032. .carousel {
  1033. width: 100%;
  1034. height: 240rpx;
  1035. .carousel-item {
  1036. width: 100%;
  1037. height: 100%;
  1038. padding: 0 28rpx;
  1039. overflow: hidden;
  1040. }
  1041. image {
  1042. width: 100%;
  1043. height: 100%;
  1044. border-radius: $border-radius-sm;
  1045. }
  1046. }
  1047. }
  1048. // .swiper-dots {
  1049. // display: flex;
  1050. // position: absolute;
  1051. // left: 60rpx;
  1052. // bottom: 15rpx;
  1053. // width: 72rpx;
  1054. // height: 36rpx;
  1055. // background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAABkCAYAAADDhn8LAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTMyIDc5LjE1OTI4NCwgMjAxNi8wNC8xOS0xMzoxMzo0MCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OTk4MzlBNjE0NjU1MTFFOUExNjRFQ0I3RTQ0NEExQjMiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OTk4MzlBNjA0NjU1MTFFOUExNjRFQ0I3RTQ0NEExQjMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6Q0E3RUNERkE0NjExMTFFOTg5NzI4MTM2Rjg0OUQwOEUiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6Q0E3RUNERkI0NjExMTFFOTg5NzI4MTM2Rjg0OUQwOEUiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4Gh5BPAAACTUlEQVR42uzcQW7jQAwFUdN306l1uWwNww5kqdsmm6/2MwtVCp8CosQtP9vg/2+/gY+DRAMBgqnjIp2PaCxCLLldpPARRIiFj1yBbMV+cHZh9PURRLQNhY8kgWyL/WDtwujjI8hoE8rKLqb5CDJaRMJHokC6yKgSCR9JAukmokIknCQJpLOIrJFwMsBJELFcKHwM9BFkLBMKFxNcBCHlQ+FhoocgpVwwnv0Xn30QBJGMC0QcaBVJiAMiec/dcwKuL4j1QMsVCXFAJE4s4NQA3K/8Y6DzO4g40P7UcmIBJxbEesCKWBDg8wWxHrAiFgT4fEGsB/CwIhYE+AeBAAdPLOcV8HRmWRDAiQVcO7GcV8CLM8uCAE4sQCDAlHcQ7x+ABQEEAggEEAggEEAggEAAgQACASAQQCCAQACBAAIBBAIIBBAIIBBAIABe4e9iAe/xd7EAJxYgEGDeO4j3EODp/cOCAE4sYMyJ5cwCHs4rCwI4sYBxJ5YzC84rCwKcXxArAuthQYDzC2JF0H49LAhwYUGsCFqvx5EF2T07dMaJBetx4cRyaqFtHJ8EIhK0i8OJBQxcECuCVutxJhCRoE0cZwMRyRcFefa/ffZBVPogePihhyCnbBhcfMFFEFM+DD4m+ghSlgmDkwlOgpAl4+BkkJMgZdk4+EgaSCcpVX7bmY9kgXQQU+1TgE0c+QJZUUz1b2T4SBbIKmJW+3iMj2SBVBWz+leVfCQLpIqYbp8b85EskIxyfIOfK5Sf+wiCRJEsllQ+oqEkQfBxmD8BBgA5hVjXyrBNUQAAAABJRU5ErkJggg==);
  1056. // background-size: 100% 100%;
  1057. // .num {
  1058. // width: 36rpx;
  1059. // height: 36rpx;
  1060. // border-radius: 50px;
  1061. // font-size: 24rpx;
  1062. // color: #fff;
  1063. // text-align: center;
  1064. // line-height: 36rpx;
  1065. // }
  1066. // .sign {
  1067. // position: absolute;
  1068. // top: 0;
  1069. // left: 50%;
  1070. // line-height: 36rpx;
  1071. // font-size: 12rpx;
  1072. // color: #fff;
  1073. // transform: translateX(-50%);
  1074. // }
  1075. // }
  1076. /* 分类 */
  1077. .cate-section {
  1078. display: flex;
  1079. justify-content: space-around;
  1080. align-items: center;
  1081. flex-wrap: wrap;
  1082. padding: 30rpx 22rpx;
  1083. .cate-item {
  1084. display: flex;
  1085. flex-direction: column;
  1086. align-items: center;
  1087. font-size: $font-sm + 2rpx;
  1088. color: $font-color-dark;
  1089. }
  1090. /* 原图标颜色太深,不想改图了,所以加了透明度 */
  1091. image {
  1092. width: 88rpx;
  1093. height: 88rpx;
  1094. margin-bottom: 14rpx;
  1095. border-radius: 50%;
  1096. opacity: 0.7;
  1097. }
  1098. }
  1099. // 中间广告图片
  1100. .ad-1 {
  1101. width: 100%;
  1102. height: 210rpx;
  1103. padding: 10rpx 0;
  1104. background: #fff;
  1105. image {
  1106. width: 100%;
  1107. height: 100%;
  1108. }
  1109. }
  1110. /*公用边框样式*/
  1111. %icon {
  1112. margin-right: 10rpx;
  1113. display: inline-block;
  1114. padding: 2rpx 10rpx;
  1115. border: 1rpx solid $color-yellow;
  1116. color: $color-yellow;
  1117. line-height: 1;
  1118. font-size: $font-base;
  1119. border-radius: 10rpx;
  1120. }
  1121. .f-header {
  1122. display: flex;
  1123. align-items: center;
  1124. height: 92rpx;
  1125. padding: 6rpx 30rpx 8rpx;
  1126. image {
  1127. flex-shrink: 0;
  1128. width: 80rpx;
  1129. height: 80rpx;
  1130. margin-right: 20rpx;
  1131. }
  1132. .tit-box {
  1133. @extend %font-title-box;
  1134. }
  1135. .tit {
  1136. @extend %font-title;
  1137. }
  1138. .iconenter {
  1139. font-size: $font-lg + 2rpx;
  1140. color: $font-color-light;
  1141. }
  1142. .f-left-icon {
  1143. @extend %f-left-icon;
  1144. }
  1145. .iconfont {
  1146. font-size: $font-sm - 2rpx;
  1147. }
  1148. }
  1149. // 会员升级礼包
  1150. .uservip {
  1151. border-radius: $border-radius-sm;
  1152. background-color: white;
  1153. box-shadow: $box-shadow;
  1154. height: 300rpx;
  1155. margin: 0 30rpx;
  1156. image {
  1157. height: 100%;
  1158. width: 300rpx;
  1159. }
  1160. .detail {
  1161. position: relative;
  1162. padding: 20rpx;
  1163. height: 100%;
  1164. .icon {
  1165. @extend %icon;
  1166. }
  1167. .price-box {
  1168. position: absolute;
  1169. bottom: 20rpx;
  1170. width: calc(100% - 40rpx);
  1171. .price {
  1172. font-size: $font-lg + 2rpx;
  1173. font-weight: bold;
  1174. color: $font-color-base;
  1175. }
  1176. .text {
  1177. color: $color-gray;
  1178. font-size: $font-sm;
  1179. }
  1180. }
  1181. .title {
  1182. font-size: $font-lg;
  1183. font-weight: bold;
  1184. }
  1185. }
  1186. }
  1187. /* 猜你喜欢 */
  1188. .guess-section {
  1189. display: flex;
  1190. flex-wrap: wrap;
  1191. padding: 0 30rpx;
  1192. .guess-item {
  1193. overflow: hidden;
  1194. display: flex;
  1195. flex-direction: column;
  1196. width: 48%;
  1197. margin-bottom: 4%;
  1198. border-radius: $border-radius-sm;
  1199. background-color: white;
  1200. box-shadow: $box-shadow;
  1201. &:nth-child(2n + 1) {
  1202. margin-right: 4%;
  1203. }
  1204. }
  1205. .image-wrapper {
  1206. width: 100%;
  1207. height: 330rpx;
  1208. border-radius: 3px;
  1209. overflow: hidden;
  1210. image {
  1211. width: 100%;
  1212. height: 100%;
  1213. opacity: 1;
  1214. }
  1215. }
  1216. .title {
  1217. font-size: $font-base;
  1218. color: $font-color-dark;
  1219. font-weight: bold;
  1220. line-height: 80rpx;
  1221. }
  1222. .price {
  1223. font-size: $font-lg;
  1224. color: $font-color-base;
  1225. font-weight: bold;
  1226. line-height: 1;
  1227. line-height: 80rpx;
  1228. }
  1229. .icon {
  1230. @extend %icon;
  1231. }
  1232. .detail {
  1233. line-height: 1;
  1234. }
  1235. .tip {
  1236. color: white;
  1237. background-color: $color-yellow;
  1238. line-height: 1.5;
  1239. font-size: $font-sm;
  1240. padding-left: 20rpx;
  1241. }
  1242. }
  1243. // 推荐
  1244. .recommend {
  1245. width: 95%;
  1246. height: 155rpx;
  1247. margin: 0rpx auto;
  1248. padding-top: 30rpx;
  1249. font-size: 26rpx;
  1250. text-align: center;
  1251. color: #333333;
  1252. align-items: flex-start;
  1253. .recommend_list {
  1254. width: 33%;
  1255. }
  1256. .re_title {
  1257. font-size: 32rpx;
  1258. font-weight: bold;
  1259. }
  1260. .re_name {
  1261. color: #999999;
  1262. padding-top: 10rpx;
  1263. }
  1264. .selected_icon {
  1265. width: 25rpx;
  1266. height: 10rpx;
  1267. margin: 0px auto;
  1268. display: none;
  1269. image {
  1270. width: 100%;
  1271. height: 100%;
  1272. }
  1273. }
  1274. .active {
  1275. display: block;
  1276. }
  1277. .active_color {
  1278. color: #dc4d46 !important;
  1279. }
  1280. }
  1281. // 列表
  1282. .list-box-h {
  1283. height: 1550rpx;
  1284. }
  1285. // 优惠券
  1286. .coupon-list {
  1287. display: inline-block;
  1288. }
  1289. .row {
  1290. border-radius: 15rpx;
  1291. margin: 25rpx;
  1292. height: 155rpx;
  1293. // width: 552rpx;
  1294. overflow: hidden;
  1295. background-color: #ffffff;
  1296. padding-right: 25rpx;
  1297. .list-interval {
  1298. border: 1px dashed $border-color-light;
  1299. height: 100%;
  1300. .top,
  1301. .bottom {
  1302. border-radius: 100rpx;
  1303. width: 30rpx;
  1304. height: 30rpx;
  1305. position: absolute;
  1306. background-color: $page-color-base;
  1307. right: -15rpx;
  1308. }
  1309. .top {
  1310. top: -18rpx;
  1311. }
  1312. .bottom {
  1313. bottom: -18rpx;
  1314. }
  1315. }
  1316. .list-money {
  1317. height: 100%;
  1318. min-width: 155rpx;
  1319. text-align: center;
  1320. image {
  1321. height: 100%;
  1322. width: 20rpx;
  1323. }
  1324. .list-money-text {
  1325. flex-grow: 1;
  1326. padding: 0 25rpx;
  1327. .tit {
  1328. text-align: center;
  1329. padding: 15rpx 0rpx;
  1330. font-size: 55rpx;
  1331. color: $color-red;
  1332. font-weight: bold;
  1333. &.noAction {
  1334. color: $font-color-light;
  1335. }
  1336. }
  1337. .price {
  1338. padding-bottom: 25rpx;
  1339. color: $font-color-light;
  1340. }
  1341. }
  1342. }
  1343. .row_list_right {
  1344. // flex-grow: 1;
  1345. min-width: 200rpx;
  1346. padding-left: 25rpx;
  1347. line-height: 1;
  1348. .right_time {
  1349. padding: 10rpx 0rpx;
  1350. color: $font-color-light;
  1351. font-size: $font-sm;
  1352. }
  1353. .right_top {
  1354. margin: 15rpx 0;
  1355. .right_name {
  1356. font-size: $font-base;
  1357. color: #bc253a;
  1358. font-weight: bold;
  1359. }
  1360. .right_title {
  1361. font-size: $font-base;
  1362. color: $font-base;
  1363. font-weight: bold;
  1364. &.noAction {
  1365. color: $font-color-light;
  1366. }
  1367. }
  1368. }
  1369. }
  1370. .right_use {
  1371. margin: 15rpx 0;
  1372. padding: 10rpx;
  1373. width: 160rpx;
  1374. text-align: center;
  1375. color: #fff;
  1376. background-color: #bc253a;
  1377. border-radius: 50rpx;
  1378. font-size: $font-sm;
  1379. &.noAction {
  1380. background-color: $font-color-light;
  1381. }
  1382. }
  1383. .iconlocation {
  1384. font-size: 36rpx;
  1385. color: $font-color-light;
  1386. }
  1387. }
  1388. .swiper-dot {
  1389. padding-top: 28rpx;
  1390. display: flex;
  1391. justify-content: center;
  1392. .swiper-dots-item {
  1393. width: 25rpx;
  1394. height: 8rpx;
  1395. border-radius: 4rpx 4rpx;
  1396. background-color: #cea19e;
  1397. margin: 0 16rpx;
  1398. // z-index: 999;
  1399. }
  1400. .action {
  1401. background-color: #901b21;
  1402. }
  1403. }
  1404. .m-tap {
  1405. height: 66rpx;
  1406. margin-top: 49rpx;
  1407. display: flex;
  1408. position: relative;
  1409. // align-content: center;
  1410. image {
  1411. // justify-items: center;
  1412. // align-items: center;
  1413. width: 295rpx;
  1414. height: 66rpx;
  1415. position: absolute;
  1416. left: 0;
  1417. right: 0;
  1418. margin: 0 auto;
  1419. }
  1420. .iconenter {
  1421. font-size: 26rpx;
  1422. color: $font-color-light;
  1423. position: absolute;
  1424. right: 25rpx;
  1425. top: 21rpx;
  1426. }
  1427. }
  1428. .sckill-wrapper {
  1429. width: 701rpx;
  1430. height: 293rpx;
  1431. background-image: url(../../static/img/sckillbg.png);
  1432. background-size: 100% 100%;
  1433. margin: 34rpx auto 37rpx;
  1434. padding: 31rpx 21rpx;
  1435. .sckill {
  1436. width: 659rpx;
  1437. height: 231rpx;
  1438. // background-color: #bfa;
  1439. // display: flex;
  1440. // flex-direction: row;
  1441. // flex-wrap: nowrap;
  1442. // overflow: hidden;
  1443. // margin: auto;
  1444. .item-wrapper {
  1445. display: flex;
  1446. .goods-box {
  1447. width: 192rpx;
  1448. height: 231rpx;
  1449. margin: 0 42rpx 0 0;
  1450. flex-shrink: 0;
  1451. .image-wrapper {
  1452. width: 192rpx;
  1453. height: 150rpx;
  1454. border-radius: 10rpx;
  1455. overflow: hidden;
  1456. image {
  1457. width: 100%;
  1458. height: 100%;
  1459. opacity: 1;
  1460. }
  1461. }
  1462. .good-title {
  1463. padding: 15rpx 0rpx 0rpx 6rpx;
  1464. font-size: 26rpx;
  1465. font-weight: 500;
  1466. color: #333333;
  1467. line-height: 26rpx;
  1468. opacity: 0.8;
  1469. white-space: nowrap;
  1470. overflow: hidden;
  1471. text-overflow: ellipsis;
  1472. }
  1473. .price {
  1474. display: flex;
  1475. height: 39rpx;
  1476. justify-content: space-between;
  1477. .now-price {
  1478. // padding-top:19rpx ;
  1479. font-size: 26rpx;
  1480. font-weight: bold;
  1481. color: #901b21;
  1482. line-height: 16rpx;
  1483. padding-left: 10rpx;
  1484. align-self: flex-end;
  1485. }
  1486. .old-price {
  1487. // padding-top:27rpx ;
  1488. align-self: flex-end;
  1489. font-size: 24rpx;
  1490. font-weight: 500;
  1491. text-decoration: line-through;
  1492. color: #9d9d9d;
  1493. line-height: 16rpx;
  1494. padding-right: 10rpx;
  1495. }
  1496. }
  1497. }
  1498. }
  1499. }
  1500. }
  1501. .groupBooking-wrapper {
  1502. width: 700rpx;
  1503. height: 781rpx;
  1504. padding: 30rpx 20rpx;
  1505. background-image: url(../../static/img/bg2.png);
  1506. background-size: 100% 100%;
  1507. margin: 35rpx auto 39rpx;
  1508. background-color: #fff;
  1509. .spgood {
  1510. width: 100%;
  1511. height: 200rpx;
  1512. // background-color: #4CD964;
  1513. display: flex;
  1514. .left-wrapper {
  1515. width: 200rpx;
  1516. height: 200rpx;
  1517. image {
  1518. width: 200rpx;
  1519. height: 200rpx;
  1520. border-radius: 20rpx;
  1521. }
  1522. }
  1523. .right-wrapper {
  1524. padding-left: 22rpx;
  1525. width: 100%;
  1526. height: 200rpx;
  1527. // background-color: red;
  1528. .right-title {
  1529. padding-top: 8rpx;
  1530. width: 100%;
  1531. // height: 29rpx;
  1532. font-size: 30rpx;
  1533. font-weight: bold;
  1534. color: #333333;
  1535. }
  1536. .right-addr {
  1537. margin-top: 18rpx;
  1538. display: flex;
  1539. .shop-img {
  1540. width: 26rpx;
  1541. height: 23rpx;
  1542. margin: 0 4rpx 0 0;
  1543. image {
  1544. width: 100%;
  1545. height: 100%;
  1546. }
  1547. }
  1548. .shop-name {
  1549. // height: 22rpx;
  1550. font-size: 22rpx;
  1551. font-weight: 500;
  1552. color: #dcb876;
  1553. }
  1554. .point-img {
  1555. width: 16rpx;
  1556. height: 23rpx;
  1557. margin: 0 4rpx 0 14rpx;
  1558. image {
  1559. width: 100%;
  1560. height: 21rpx;
  1561. }
  1562. }
  1563. .point-disc {
  1564. font-size: 24rpx;
  1565. font-weight: 500;
  1566. padding-top: 3rpx;
  1567. color: #dcb876;
  1568. }
  1569. }
  1570. .ex-addr {
  1571. margin-top: 16rpx;
  1572. padding-left: 22rpx;
  1573. height: 22rpx;
  1574. font-size: 22rpx;
  1575. font-weight: 500;
  1576. color: #dcb876;
  1577. image {
  1578. height: 22rpx;
  1579. }
  1580. .name-img {
  1581. // vertical-align: ;
  1582. width: 26rpx;
  1583. margin: 0 4rpx -3rpx 0;
  1584. }
  1585. .point-img {
  1586. width: 16rpx;
  1587. margin: 0 4rpx -3rpx 14rpx;
  1588. }
  1589. }
  1590. .right-bottom {
  1591. margin-top: 47rpx;
  1592. // justify-items: flex-end;
  1593. display: flex;
  1594. justify-content: space-between;
  1595. .sp-price {
  1596. height: 52rpx;
  1597. display: flex;
  1598. vertical-align: bottom;
  1599. line-height: 52rpx;
  1600. .now-price {
  1601. font-size: 30rpx;
  1602. font-weight: bold;
  1603. color: #901b21;
  1604. margin-right: 16rpx;
  1605. }
  1606. .old-price {
  1607. font-size: 22rpx;
  1608. font-weight: 500;
  1609. text-decoration: line-through;
  1610. color: #aaaaaa;
  1611. }
  1612. }
  1613. .sp-btn {
  1614. width: 137rpx;
  1615. height: 52rpx;
  1616. border-radius: 26rpx;
  1617. font-size: 26rpx;
  1618. text-align: center;
  1619. line-height: 52rpx;
  1620. font-weight: 400;
  1621. color: #ffffff;
  1622. background-color: #901b21;
  1623. }
  1624. }
  1625. }
  1626. }
  1627. .jg {
  1628. margin: 30rpx auto 29rpx;
  1629. width: 660rpx;
  1630. height: 1px;
  1631. background: #ecd49e;
  1632. opacity: 0.5;
  1633. }
  1634. }
  1635. .exchange-wrapper {
  1636. background-color: #fff;
  1637. width: 696rpx;
  1638. // height: 100rpx;
  1639. margin: 37rpx auto 39rpx;
  1640. // padding: 0 27rpx;
  1641. display: flex;
  1642. justify-content: space-between;
  1643. position: relative;
  1644. .exgood-wrapper {
  1645. width: 342rpx;
  1646. height: 540rpx;
  1647. box-shadow: 0px 4px 18px 0px rgba(144, 27, 33, 0.13);
  1648. .ex-img-wrapper {
  1649. width: 342rpx;
  1650. height: 338rpx;
  1651. image {
  1652. width: 100%;
  1653. height: 100%;
  1654. }
  1655. }
  1656. .exgood-title {
  1657. margin-top: 33rpx;
  1658. padding-left: 21rpx;
  1659. font-size: 30rpx;
  1660. font-weight: bold;
  1661. color: #333333;
  1662. white-space: nowrap;
  1663. overflow: hidden;
  1664. text-overflow: ellipsis;
  1665. }
  1666. .ex-addr {
  1667. margin-top: 16rpx;
  1668. padding-left: 22rpx;
  1669. height: 22rpx;
  1670. font-size: 22rpx;
  1671. font-weight: 500;
  1672. color: #dcb876;
  1673. image {
  1674. height: 22rpx;
  1675. }
  1676. .name-img {
  1677. width: 26rpx;
  1678. margin: 0 4rpx -3rpx 0;
  1679. }
  1680. .point-img {
  1681. width: 16rpx;
  1682. margin: 0 4rpx -3rpx 14rpx;
  1683. }
  1684. }
  1685. .ex-price {
  1686. margin-top: 17rpx;
  1687. padding-left: 22rpx;
  1688. font-size: 36rpx;
  1689. font-weight: bold;
  1690. color: #901b21;
  1691. vertical-align: bottom;
  1692. .tx1 {
  1693. font-size: 24rpx;
  1694. vertical-align: baseline;
  1695. position: relative;
  1696. top: -2rpx;
  1697. }
  1698. .tx2 {
  1699. margin-left: 9rpx;
  1700. font-size: 26rpx;
  1701. font-weight: 500;
  1702. text-decoration: line-through;
  1703. color: #9d9d9d;
  1704. line-height: 35rpx;
  1705. }
  1706. }
  1707. .bg {
  1708. position: absolute;
  1709. top: 0;
  1710. width: 342rpx;
  1711. height: 540rpx;
  1712. background-image: url(../../static/img/bg3.png);
  1713. background-size: 100% 100%;
  1714. }
  1715. }
  1716. }
  1717. .titleNview-placing {
  1718. height: var(--status-bar-height);
  1719. padding-top: 44px;
  1720. box-sizing: content-box;
  1721. }
  1722. .swiper-wrapper {
  1723. width: 720rpx;
  1724. height: 370rpx;
  1725. border-radius: 15rpx;
  1726. // background-color: #bfa;
  1727. overflow: hidden;
  1728. margin: 0 auto;
  1729. .swiper {
  1730. width: 100%;
  1731. height: 370rpx;
  1732. .swiper-item {
  1733. width: 100%;
  1734. height: 100%;
  1735. // box-sizing: content-box;
  1736. padding:0 10rpx;
  1737. image {
  1738. width: 100%;
  1739. height: 100%;
  1740. border-radius: $border-radius-sm;
  1741. }
  1742. }
  1743. }
  1744. }
  1745. .container {
  1746. // background-color: red;
  1747. background-image: url(../../static/img/main_bg.png);
  1748. background-size: 100%;
  1749. }
  1750. </style>