index.vue 45 KB

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