index.vue 44 KB

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