index.vue 45 KB

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