index.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041
  1. <template>
  2. <view class="home">
  3. <zs-banner :city="city" position></zs-banner>
  4. <view class="login-home" >
  5. <!-- 登录显示的套餐列表 -->
  6. <view class="discount-list">
  7. <view class="discount-item" v-for="(item,index) in discountsList" :key="index" @click="goDetail(index)">
  8. <image class="icon" :src="item.icon" mode=""></image>
  9. <view class="title">{{item.title}}</view>
  10. <view class="tag" v-if="item.tag">
  11. {{item.tag}}
  12. </view>
  13. </view>
  14. </view>
  15. <view class="recommend-box">
  16. <view class="top-box">
  17. <view class="title">
  18. 天天特惠
  19. </view>
  20. <view class="type-box">
  21. <image class="hot" src="../../static/hot-white.png" mode=""></image>
  22. <view class="type">
  23. 今日超低价
  24. </view>
  25. </view>
  26. </view>
  27. <view class="recommend">
  28. <view class="recommend-item">
  29. <view class="image-box">
  30. <image class="image" src="https://img2.baidu.com/it/u=2852595632,3564235706&fm=253&fmt=auto&app=138&f=JPEG?w=750&h=500" mode=""></image>
  31. <view class="btn-box">
  32. <view class="desc">
  33. 满200享7折
  34. </view>
  35. <view class="btn">
  36. 整点开抢
  37. </view>
  38. </view>
  39. </view>
  40. </view>
  41. <view class="recommend-item">
  42. <view class="image-box">
  43. <image class="image" src="https://img0.baidu.com/it/u=2490196579,2804013959&fm=253&fmt=auto&app=138&f=JPEG?w=743&h=500" mode=""></image>
  44. <view class="btn-box">
  45. <view class="desc">
  46. 满200享7折
  47. </view>
  48. <view class="btn">
  49. 整点开抢
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. <view class="content">
  57. <!-- 分类 -->
  58. <scroll-view scroll-x enable-flex class="tab-group" style="white-space: nowrap;">
  59. <view class="tab-item" :class="[tab == 0?'active':'']" @click="handleTab(0)">
  60. <view class="tab-title">
  61. 热门推荐
  62. </view>
  63. <view class="sub-title">
  64. 优选好物
  65. </view>
  66. </view>
  67. <view class="tab-item" :class="[tab == 1?'active':'']" @click="handleTab(1)">
  68. <view class="tab-title jiayou">
  69. 加油充电
  70. </view>
  71. <view class="sub-title">
  72. 折上再减
  73. </view>
  74. </view>
  75. <view class="tab-item" :class="[tab == 2?'active':'']" @click="handleTab(2)">
  76. <view class="tab-title">
  77. 医疗健康
  78. </view>
  79. <view class="sub-title">
  80. 折上再减
  81. </view>
  82. </view>
  83. <view class="tab-item" :class="[tab == 3?'active':'']" @click="handleTab(3)">
  84. <view class="tab-title">
  85. 酒店住宿
  86. </view>
  87. <view class="sub-title">
  88. 折上再减
  89. </view>
  90. </view>
  91. </scroll-view>
  92. <!-- 列表 -->
  93. <zs-list class="store-box" mt="0" @load="loadMore" :status="status">
  94. <view class="left">
  95. <view class="left-frist">
  96. <view class="top-box">
  97. <view class="title">
  98. 天天低价
  99. </view>
  100. <view class="type-box">
  101. <image class="hot" src="../../static/hot-white.png" mode=""></image>
  102. <view class="type">
  103. 今日超低价
  104. </view>
  105. </view>
  106. </view>
  107. <view class="image-box">
  108. <image class="image" src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2F45f7efd9-3760-4fa0-8cf0-79ca4b44d017%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1695803683&t=09678f8c997578d3e8101dd2b0a597e8" mode=""></image>
  109. <view class="btn-box">
  110. <view class="btn">
  111. </view>
  112. <view class="desc">
  113. 满200享7折
  114. </view>
  115. </view>
  116. </view>
  117. </view>
  118. <view class="store-item" v-for="(item,index) in list" :key="index" @click="goShopDetail(item)">
  119. <zs-img v-if="index == 0" :src="item.src" border="border1" width="335rpx" height="335rpx" mode="" ></zs-img>
  120. <zs-img v-else :src="item.src" :border="index<3?(index%2 == 0? 'border2':'border3'):''" width="335rpx" height="335rpx" mode="" ></zs-img>
  121. <view class="info">
  122. <view class="title">
  123. {{item.title}}
  124. </view>
  125. <view class="address">
  126. <image class="position" src="../../static/position.png" mode=""></image>
  127. {{item.distance}}km
  128. </view>
  129. <image v-if="index==0" class="hot-icon" src="../../static/hot1.png" mode=""></image>
  130. </view>
  131. </view>
  132. </view>
  133. <view class="right">
  134. <view class="store-item frist" @click="goShopDetail(list1[0])">
  135. <zs-img :src="list1[0].src" width="335rpx" height="322rpx" mode="" ></zs-img>
  136. <view class="info">
  137. <view class="title">
  138. {{list1[0].title}}
  139. </view>
  140. <view class="tags">
  141. <view class="tag-item">
  142. <view class="label">
  143. </view>
  144. <view class="value">
  145. 满200享8折
  146. </view>
  147. </view>
  148. </view>
  149. </view>
  150. </view>
  151. <view v-if="index!=0" class="store-item" v-for="(item,index) in list1" :key="index" @click="goShopDetail(item)">
  152. <zs-img :src="item.src" :border="index<3?(index%2 == 0? 'border3':'border2'):''" width="335rpx" height="335rpx" mode="" ></zs-img>
  153. <view class="info">
  154. <view class="title">
  155. {{item.title}}
  156. </view>
  157. <view class="address">
  158. <image class="position" src="../../static/position.png" mode=""></image>
  159. {{item.distance}}km
  160. </view>
  161. </view>
  162. </view>
  163. </view>
  164. </zs-list>
  165. </view>
  166. </view>
  167. <!-- 登录 -->
  168. <!-- <view class="login-btn" v-if="isLogin !== 1">
  169. <button class="btn" type="default" @click="handleLogin">注册/登录</button>
  170. </view> -->
  171. <!-- <view class="fixed-btn" @click="handleMore" v-if="!userId">
  172. <view class="">
  173. 更多
  174. </view>
  175. <view class="">
  176. 套餐
  177. </view>
  178. </view> -->
  179. </view>
  180. </template>
  181. <script>
  182. import {
  183. getUserDetail,
  184. getScheme
  185. } from '@/api/common.js'
  186. // 腾讯地图
  187. var QQMapWX = require('../../libs/qqmap-wx-jssdk.min.js');
  188. var qqmapsdk = new QQMapWX({key:'KX5BZ-B64RC-RO62W-AMWAZ-VVTC3-YAFXF'});
  189. export default {
  190. data() {
  191. return {
  192. show: false,
  193. loading: true,
  194. isLogin: 0,
  195. userId: '',
  196. tab: 0,
  197. search: '', //搜索框
  198. status: 'more',
  199. city:'成都',
  200. latitude : '',
  201. longitude:'',
  202. discountsList: [ //优惠列表
  203. {
  204. icon: require('../../static/type1.png'),
  205. title: '加油充电',
  206. tag:'大额券'
  207. },
  208. {
  209. icon: require('../../static/type2.png'),
  210. title: '酒店民宿',
  211. tag:'天天领'
  212. },
  213. {
  214. icon: require('../../static/type3.png'),
  215. title: '景区门票',
  216. tag:''
  217. },
  218. {
  219. icon: require('../../static/type4.png'),
  220. title: '餐饮美食',
  221. tag:''
  222. },
  223. {
  224. icon: require('../../static/type5.png'),
  225. title: '慧研学',
  226. tag:''
  227. },
  228. {
  229. icon: require('../../static/type6.png'),
  230. title: '超市购物',
  231. tag:'1元购'
  232. },
  233. {
  234. icon: require('../../static/type7.png'),
  235. title: '代驾',
  236. tag:''
  237. },
  238. {
  239. icon: require('../../static/type8.png'),
  240. title: '健身运动',
  241. tag:'特惠'
  242. },
  243. {
  244. icon: require('../../static/type9.png'),
  245. title: '医疗健康',
  246. tag:''
  247. },
  248. {
  249. icon: require('../../static/type10.png'),
  250. title: '家政服务',
  251. tag:'特惠'
  252. },
  253. ],
  254. list: [{
  255. src: 'https://t7.baidu.com/it/u=2204874366,1447142724&fm=193&f=GIF',
  256. title: 'V9健身房',
  257. distance: 13.62
  258. },
  259. {
  260. src: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fss2.meipian.me%2Fusers%2F159660028%2Fb327e4a2a3e1473a82e2a53b5a5d2db2.jpeg%3Fmeipian-raw%2Fbucket%2Fivwen%2Fkey%2FdXNlcnMvMTU5NjYwMDI4L2IzMjdlNGEyYTNlMTQ3M2E4MmUyYTUzYjVhNWQyZGIyLmpwZWc%3D%2Fsign%2Fcec9ce1dfb5e0c3e627e30fb099899da.jpg&refer=http%3A%2F%2Fss2.meipian.me&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1693560973&t=7b7dfb1cbf6a6759e70f868c894888c9',
  261. title: '万安加油站(中石化)',
  262. distance: 13.62
  263. },
  264. {
  265. id: 2,
  266. src:'https://img2.baidu.com/it/u=242243300,1128843585&fm=253&fmt=auto&app=138&f=JPEG?w=696&h=500',
  267. title: '泊斯曼酒店',
  268. distance: 5.23,
  269. },
  270. {
  271. id: 3,
  272. src:'https://img-md.veimg.cn/meadinindex/img5/2021/11/69F51D249ADA446EB5507352AA4ABD6E.jpg',
  273. title: '贵阳万丽酒店',
  274. distance: 5.23,
  275. },
  276. {
  277. id: 2,
  278. src:'https://img2.baidu.com/it/u=242243300,1128843585&fm=253&fmt=auto&app=138&f=JPEG?w=696&h=500',
  279. title: '泊斯曼酒店',
  280. distance: 5.23,
  281. },
  282. ],
  283. list1: [
  284. {
  285. id: 3,
  286. src:'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2Fc7481b97-86a3-4aba-8d2c-d3c84d7ce831%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1695542967&t=fe7462e4fc56e50b98013b198043278d',
  287. title: '黄果树瀑布',
  288. distance: 5.23,
  289. },
  290. {
  291. id: 3,
  292. src:'https://alipic.lanhuapp.com/XDSlicePNGMAXdb1c28750d2e8f45e7509c176f186600d2bafe09de15a8107b168c078801e1e7.png',
  293. title: '微笑牙科诊所',
  294. distance: 5.23,
  295. },
  296. {
  297. id: 2,
  298. src:'https://img2.baidu.com/it/u=242243300,1128843585&fm=253&fmt=auto&app=138&f=JPEG?w=696&h=500',
  299. title: '泊斯曼酒店',
  300. distance: 5.23,
  301. },
  302. {
  303. id: 3,
  304. src:'https://img-md.veimg.cn/meadinindex/img5/2021/11/69F51D249ADA446EB5507352AA4ABD6E.jpg',
  305. title: '贵阳万丽酒店',
  306. distance: 5.23,
  307. },
  308. {
  309. id: 2,
  310. src:'https://img2.baidu.com/it/u=242243300,1128843585&fm=253&fmt=auto&app=138&f=JPEG?w=696&h=500',
  311. title: '泊斯曼酒店',
  312. distance: 5.23,
  313. },
  314. ]
  315. }
  316. },
  317. watch: {
  318. show(val) {
  319. if (val) {
  320. this.$nextTick(() => {
  321. // this.$refs.uForm.setRules(this.rules)
  322. })
  323. }
  324. },
  325. tab(val){
  326. if (val == 0) {
  327. this.list =[{
  328. src: 'https://mstatic.gzstv.com/media/images/2021/06/09/w1nrZC8_x-PQ.jpg',
  329. title: '万安加油站(中石化)',
  330. distance: 13.62
  331. },
  332. {
  333. src: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fss2.meipian.me%2Fusers%2F159660028%2Fb327e4a2a3e1473a82e2a53b5a5d2db2.jpeg%3Fmeipian-raw%2Fbucket%2Fivwen%2Fkey%2FdXNlcnMvMTU5NjYwMDI4L2IzMjdlNGEyYTNlMTQ3M2E4MmUyYTUzYjVhNWQyZGIyLmpwZWc%3D%2Fsign%2Fcec9ce1dfb5e0c3e627e30fb099899da.jpg&refer=http%3A%2F%2Fss2.meipian.me&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1693560973&t=7b7dfb1cbf6a6759e70f868c894888c9',
  334. title: '万安加油站(中石化)',
  335. distance: 13.62
  336. },
  337. {
  338. id: 2,
  339. src:'https://img-md.veimg.cn/meadinindex/img5/2021/11/69F51D249ADA446EB5507352AA4ABD6E.jpg',
  340. title: '泊斯曼酒店',
  341. distance: 5.23,
  342. },
  343. {
  344. id: 3,
  345. src:'https://file.gzl.cn/group1/M00/32/54/wKkBH1_7uBKAaWm1AAMJ4gwToRo237.jpg',
  346. title: '贵阳万丽酒店',
  347. distance: 5.23,
  348. },
  349. ]
  350. } else if (val == 1) {
  351. this.list = [
  352. {
  353. id: 2,
  354. title: '老贵阳牛肉粉(友怡路店)',
  355. src:'https://alipic.lanhuapp.com/XDSlicePNGMAXd4e61a1529e3eb31b8c043a65c2e8a1f3cd13c0da50ac3107d471c6777b667a6.png',
  356. isLike: false,
  357. price: 6.25,
  358. desc: '购物9折起',
  359. distance: 5.23,
  360. latitude: 26.652284,
  361. longitude: 106.626597,
  362. address: '贵州省贵阳市观山湖区诚信北路8号'
  363. },
  364. {
  365. id: 1,
  366. title: '黔诚酸汤牛肉(甲秀楼店)',
  367. src:'https://alipic.lanhuapp.com/XDSlicePNGMAXa74cfc58f9a54990e0a1e804e763563f4521e3ec1dc948005893ae57a451e506.png',
  368. isLike: true,
  369. price: 6.5,
  370. desc: '购物9折起',
  371. distance: 2.94,
  372. latitude: 26.577315,
  373. longitude: 106.696473,
  374. address: '贵州省贵阳市南明区中山南路58号中山公馆2期'
  375. },
  376. {
  377. id: 2,
  378. title: '毛辣果(护国路店)',
  379. src:'https://alipic.lanhuapp.com/XDSlicePNGMAXf9cdc403cc6f4e7873202d8c6dae02be4872c20630de6fedc0da7648ab28d354.png',
  380. isLike: false,
  381. price: 6.25,
  382. desc: '购物9折起',
  383. distance: 5.23,
  384. latitude: 26.652284,
  385. longitude: 106.626597,
  386. address: '贵州省贵阳市观山湖区诚信北路8号'
  387. },
  388. ]
  389. } else if (val == 2) {
  390. this.list = [
  391. {
  392. id: 2,
  393. title: '海天星辰大药房',
  394. src:'https://img0.baidu.com/it/u=3833239224,203518028&fm=253&fmt=auto&app=138&f=JPEG?w=962&h=437',
  395. isLike: false,
  396. price: 6.25,
  397. desc: '购物9折起',
  398. distance: 5.23,
  399. latitude: 26.652284,
  400. longitude: 106.626597,
  401. address: '贵州省贵阳市观山湖区诚信北路8号'
  402. },
  403. {
  404. id: 1,
  405. src:'https://img1.baidu.com/it/u=2524636074,1628913937&fm=253&fmt=auto&app=138&f=JPEG?w=704&h=500',
  406. title: '泉源堂智慧药房',
  407. isLike: true,
  408. price: 6.5,
  409. desc: '购物9折起',
  410. distance: 2.94,
  411. latitude: 26.577315,
  412. longitude: 106.696473,
  413. address: '贵州省贵阳市南明区中山南路58号中山公馆2期'
  414. },
  415. {
  416. id: 2,
  417. title: '叮当快药',
  418. src:'https://img0.baidu.com/it/u=11997160,2930303799&fm=253&fmt=auto&app=120&f=JPEG?w=800&h=500',
  419. isLike: false,
  420. price: 6.25,
  421. desc: '购物9折起',
  422. distance: 5.23,
  423. latitude: 26.652284,
  424. longitude: 106.626597,
  425. address: '贵州省贵阳市观山湖区诚信北路8号'
  426. },
  427. ]
  428. } else if (val == 3) {
  429. this.list = [
  430. {
  431. id: 2,
  432. title: '贵阳万国艺术酒店',
  433. src:'https://dimg04.c-ctrip.com/images/0202w120008v2aba15BD3_R_600_400_R5_D.jpg',
  434. isLike: false,
  435. price: 6.25,
  436. desc: '购物9折起',
  437. distance: 5.23,
  438. latitude: 26.652284,
  439. longitude: 106.626597,
  440. address: '贵州省贵阳市观山湖区诚信北路8号'
  441. },
  442. {
  443. id: 1,
  444. src:'https://ak-d.tripcdn.com/images/0223x1200084a4izh65B9_R_600_400_R5_D.jpg',
  445. title: '漫居酒店',
  446. isLike: true,
  447. price: 6.5,
  448. desc: '购物9折起',
  449. distance: 2.94,
  450. latitude: 26.577315,
  451. longitude: 106.696473,
  452. address: '贵州省贵阳市南明区中山南路58号中山公馆2期'
  453. },
  454. {
  455. id: 2,
  456. title: '泊斯曼酒店',
  457. src:'https://img-md.veimg.cn/meadinindex/img5/2021/11/69F51D249ADA446EB5507352AA4ABD6E.jpg',
  458. isLike: false,
  459. price: 6.25,
  460. desc: '购物9折起',
  461. distance: 5.23,
  462. latitude: 26.652284,
  463. longitude: 106.626597,
  464. address: '贵州省贵阳市观山湖区诚信北路8号'
  465. },
  466. ]
  467. }
  468. }
  469. },
  470. onLoad() {
  471. if (uni.getStorageSync('token')) {
  472. this.getUserDetail()
  473. }
  474. this.getCity()
  475. },
  476. onShow() {
  477. this.isLogin = uni.getStorageSync('token')
  478. if(!this.isLogin) {
  479. uni.navigateTo({
  480. url:'./visitorIndex'
  481. })
  482. }
  483. this.show = false
  484. this.city = uni.getStorageSync('city')
  485. },
  486. onHide() {
  487. this.show = false
  488. },
  489. methods: {
  490. getCity(){
  491. this.city = '定位中'
  492. let that = this
  493. uni.getLocation({
  494. type: 'wgs84',
  495. geocode: true,
  496. success: (res) => {
  497. console.log("获取经纬度成功");
  498. this.latitude = res.latitude;
  499. this.longitude = res.longitude;
  500. },
  501. fail: () => {
  502. console.log("获取经纬度失败");
  503. },
  504. complete: () => {
  505. // 解析地址
  506. qqmapsdk.reverseGeocoder({
  507. location: {
  508. latitude: this.latitude,
  509. longitude: this.longitude
  510. },
  511. success: function(res) {
  512. console.log("解析地址成功");
  513. // 市
  514. that.city = res.result.ad_info.city.slice(0,2);
  515. uni.setStorageSync('city',that.city)
  516. },
  517. fail: function(res) {
  518. this.city = '定位失败'
  519. },
  520. complete: function(res) {
  521. console.log(res);
  522. }
  523. })
  524. }
  525. })
  526. },
  527. handleTab(index) {
  528. this.tab = index
  529. },
  530. getScheme() {
  531. getScheme().then(res => {
  532. console.log(res);
  533. })
  534. },
  535. // 跳转优惠详情
  536. goDetail(type) {
  537. if(type == 4){
  538. uni.navigateTo({
  539. url: `../../study/index`
  540. })
  541. }else{
  542. uni.navigateTo({
  543. url: `../../detail/discountsDetail/index?type=${type}`
  544. })
  545. }
  546. },
  547. goShopDetail(item) {
  548. uni.setStorageSync('shopInfo', JSON.stringify(item))
  549. uni.navigateTo({
  550. url: `../../detail/shopDetail/shopDetail`
  551. })
  552. },
  553. handleLogin() {
  554. this.show = true
  555. },
  556. // 更多套餐
  557. handleMore() {
  558. uni.navigateTo({
  559. // url:'../../login/login/login'
  560. url: '../../combo/combo/combo'
  561. })
  562. },
  563. // 获取用户详情
  564. getUserDetail() {
  565. getUserDetail().then(res => {
  566. uni.setStorageSync('userInfo', JSON.stringify(res.content))
  567. })
  568. },
  569. loadMore() {
  570. // this.status = 'loading'
  571. // setTimeout(() => {
  572. // this.status = 'more'
  573. // this.list = this.list.concat([{
  574. // src: 'https://img1.baidu.com/it/u=384382004,2638328762&fm=253&fmt=auto&app=138&f=JPEG?w=667&h=500',
  575. // title: '万安加油站(中石化)',
  576. // distance: 13.62
  577. // }, {
  578. // src: 'https://img1.baidu.com/it/u=1281595595,1208289696&fm=253&fmt=auto&app=138&f=JPEG?w=667&h=500',
  579. // title: '万安加油站(中石化)',
  580. // distance: 13.62
  581. // }])
  582. // }, 1000)
  583. },
  584. }
  585. }
  586. </script>
  587. <style lang="scss">
  588. .home {
  589. // padding-bottom:120rpx;
  590. background: linear-gradient(180deg, #FFFFFF 0%, #DCE8FF 100%);
  591. .card-title {
  592. display: flex;
  593. justify-content: center;
  594. .title {
  595. font-size: 32rpx;
  596. text-align: center;
  597. color: #fff;
  598. width: 210rpx;
  599. line-height: 64rpx;
  600. background: linear-gradient(360deg, #3074F8 0%, #568FFF 100%);
  601. border-radius: 0rpx 0rpx 24rpx 24rpx;
  602. }
  603. }
  604. .login-home {
  605. // background: linear-gradient(178deg, #FFFFFF 0%, #F9F9F9 100%);
  606. background: #F9F9F9;
  607. .discount-list {
  608. display: flex;
  609. flex-wrap: wrap;
  610. margin-top: 20rpx;
  611. padding: 30rpx 0;
  612. background: #fff;
  613. border-radius: 0rpx 0rpx 32rpx 32rpx;
  614. .discount-item {
  615. width: 20%;
  616. display: flex;
  617. flex-direction: column;
  618. align-items: center;
  619. margin-bottom: 40rpx;
  620. position: relative;
  621. .icon {
  622. width: 80rpx;
  623. height: 80rpx;
  624. }
  625. .title {
  626. font-size: 26rpx;
  627. margin-top: 10rpx;
  628. }
  629. .tag{
  630. position: absolute;
  631. top: -14rpx;
  632. left: 66rpx;
  633. // background: #FC1F1B;
  634. color: #fff;
  635. font-size: 18rpx;
  636. line-height: -14rpx;
  637. height: 34rpx;
  638. padding: 0 10rpx;
  639. border-radius: 17rpx;
  640. width: fit-content;
  641. background: url('../../static/tag.png') no-repeat;
  642. background-size: 100% 34rpx;
  643. }
  644. }
  645. }
  646. .recommend-box{
  647. margin: 0 20rpx;
  648. background: linear-gradient(180deg, #FE574C 0%, #FE2A5C 100%);
  649. border-radius: 16rpx;
  650. box-shadow: inset 0rpx 6rpx 12rpx 2rpx rgba(255,255,255,0.16);
  651. .top-box{
  652. display: flex;
  653. align-items: center;
  654. justify-content: space-between;
  655. margin: 0 20rpx;
  656. padding-top: 20rpx;
  657. .title{
  658. color: #fff;
  659. font-size: 26rpx;
  660. }
  661. .type-box{
  662. display: flex;
  663. align-items: center;
  664. padding: 0 16rpx;
  665. height: 40rpx;
  666. line-height: 40rpx;
  667. border-radius: 20rpx;
  668. background: rgba(255, 255, 255, 0.18);
  669. .hot{
  670. width: 16.7rpx;
  671. height: 21.7rpx;
  672. }
  673. .type{
  674. font-size: 20rpx;
  675. font-weight: 400;
  676. color: #FFFFFF;
  677. margin-left: 6rpx;
  678. }
  679. }
  680. }
  681. .recommend{
  682. display: flex;
  683. justify-content: space-between;
  684. .recommend-item{
  685. width: 355rpx;
  686. height: 245rpx;
  687. box-sizing: border-box;
  688. display: flex;
  689. flex-direction: column;
  690. align-items: center;
  691. .image-box{
  692. position: relative;
  693. margin-top: 20rpx;
  694. width: 312rpx;
  695. .image{
  696. width: 312rpx;
  697. height: 200rpx;
  698. border-radius: 16rpx;
  699. }
  700. .btn-box{
  701. position: absolute;
  702. left: 10rpx;
  703. bottom: 30rpx;
  704. display: flex;
  705. align-items: center;
  706. .desc{
  707. font-size: 24rpx;
  708. font-weight: 400;
  709. color: #FFFFFF;
  710. }
  711. .btn{
  712. height: 36rpx;
  713. line-height: 36rpx;
  714. padding: 0 14rpx;
  715. background: $uni-color-primary;
  716. border-radius: 8rpx;
  717. color: #FFFFFF;
  718. font-size: 20rpx;
  719. margin-left: 10rpx;
  720. }
  721. }
  722. }
  723. }
  724. }
  725. }
  726. .content{
  727. background: #fff;
  728. border-radius: 16rpx 16rpx 0 0;
  729. }
  730. .tab-group {
  731. display: flex;
  732. margin: 30rpx 0;
  733. height: 90rpx;
  734. .tab-item {
  735. padding: 0 20rpx;
  736. text-align: center;
  737. display: flex;
  738. flex-direction: column;
  739. align-items: center;
  740. flex: 1;
  741. .tab-title.jiayou{
  742. color: #3074F8;
  743. }
  744. .tab-title{
  745. font-size: 32rpx;
  746. font-family: PingFang SC-Bold, PingFang SC;
  747. font-weight: bold;
  748. color: #707070;
  749. }
  750. .sub-title{
  751. font-size: 24rpx;
  752. font-family: PingFang SC-Regular, PingFang SC;
  753. font-weight: 400;
  754. color: #999999;
  755. margin-top: 10rpx;
  756. }
  757. }
  758. .active {
  759. font-weight: bold;
  760. .tab-title{
  761. color: #0F0F0F;
  762. }
  763. .sub-title{
  764. color: #fff;
  765. // background: $uni-color-primary;
  766. background: linear-gradient(90deg, #FF4A39 0%, #FFA770 100%);
  767. width: 124rpx;
  768. line-height: 40rpx;
  769. border-radius: 20rpx;
  770. }
  771. }
  772. }
  773. .zs-list {
  774. display: flex;
  775. flex-wrap: wrap;
  776. justify-content: space-between;
  777. padding: 0 30rpx;
  778. .left{
  779. .left-frist{
  780. padding: 15rpx;
  781. border-radius: 16rpx;
  782. width: 332rpx;
  783. height: 284rpx;
  784. box-sizing: border-box;
  785. background: linear-gradient(180deg, #FFDEDE 0%, #FFFFFF 100%);
  786. box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0,0,0,0.16);
  787. margin-bottom: 25rpx;
  788. .top-box{
  789. display: flex;
  790. align-items: center;
  791. justify-content: space-between;
  792. .title{
  793. color: #0F0F0F;
  794. font-size: 26rpx;
  795. }
  796. .type-box{
  797. display: flex;
  798. align-items: center;
  799. padding: 0 16rpx;
  800. height: 40rpx;
  801. line-height: 40rpx;
  802. border-radius: 20rpx;
  803. background: linear-gradient(90deg, #FE574C 0%, #FE2A5C 100%);
  804. .hot{
  805. width: 16.7rpx;
  806. height: 21.7rpx;
  807. }
  808. .type{
  809. font-size: 20rpx;
  810. font-weight: 400;
  811. color: #FFFFFF;
  812. margin-left: 6rpx;
  813. }
  814. }
  815. }
  816. .image-box{
  817. position: relative;
  818. margin-top: 20rpx;
  819. .image{
  820. width: 302rpx;
  821. height: 182rpx;
  822. border-radius: 16rpx;
  823. }
  824. .btn-box{
  825. position: absolute;
  826. left: 0;
  827. bottom: 10rpx;
  828. display: flex;
  829. align-items: center;
  830. .desc{
  831. font-size: 24rpx;
  832. font-weight: 400;
  833. color: #FFFFFF;
  834. margin-left: 10rpx;
  835. }
  836. .btn{
  837. height: 36rpx;
  838. line-height: 36rpx;
  839. padding: 0 14rpx;
  840. background: $uni-color-primary;
  841. border-radius: 8rpx;
  842. color: #FFFFFF;
  843. font-size: 20rpx;
  844. }
  845. }
  846. }
  847. }
  848. }
  849. .right{
  850. .frist{
  851. border: 1px solid #FF612E;
  852. .info{
  853. background: #FF612E;
  854. color: #fff;
  855. .address{
  856. color: #fff;
  857. }
  858. }
  859. }
  860. }
  861. .store-item {
  862. width: 335rpx;
  863. margin-bottom: 25rpx;
  864. box-shadow: 0rpx 0rpx 24rpx 2rpx rgba(0, 0, 0, 0.08);
  865. border-radius: 16rpx;
  866. background: #fff;
  867. .icon {
  868. width: 100%;
  869. height: 300rpx;
  870. border-radius: 16rpx 16rpx 0 0;
  871. }
  872. .info {
  873. padding: 20rpx;
  874. background: #fff;
  875. border-radius: 0 0 16rpx 16rpx;
  876. position: relative;
  877. .hot-icon{
  878. position: absolute;
  879. bottom: 20rpx;
  880. right: 25rpx;
  881. width: 44.6rpx;
  882. height: 48.6rpx;
  883. }
  884. .title {
  885. font-weight: bold;
  886. width: 100%;
  887. white-space: nowrap;
  888. text-overflow: ellipsis;
  889. overflow: hidden;
  890. }
  891. .tags{
  892. display: flex;
  893. align-items: center;
  894. .tag-item{
  895. line-height: 50rpx;
  896. border-radius: 8rpx;
  897. padding: 6rpx 0;
  898. font-size: 24rpx;
  899. margin-left: 10rpx;
  900. display: flex;
  901. .label{
  902. background: #FFF;
  903. color: #FE5B47;
  904. padding: 0 10rpx;
  905. border-radius: 8rpx 0 0 8rpx;
  906. }
  907. .value{
  908. color: #FFF;
  909. background: rgba(255, 255, 255, .2);
  910. padding: 0 14rpx;
  911. border-radius: 0 8rpx 8rpx 0;
  912. }
  913. }
  914. }
  915. .address {
  916. display: flex;
  917. align-items: center;
  918. margin-top: 15rpx;
  919. color: #999;
  920. .position{
  921. width: 25rpx;
  922. height: 29rpx;
  923. margin-right: 8rpx;
  924. }
  925. }
  926. }
  927. }
  928. }
  929. }
  930. .login-btn {
  931. position: fixed;
  932. bottom: 0%;
  933. left: 0;
  934. width: 100%;
  935. background: #fff;
  936. padding: 25rpx 0;
  937. .btn {
  938. width: 440rpx;
  939. line-height: 120rpx;
  940. background: rgb(222, 134, 143);
  941. border-radius: 60rpx;
  942. color: #fff;
  943. font-size: 16px;
  944. }
  945. }
  946. .fixed-btn {
  947. position: fixed;
  948. right: 0;
  949. top: 50%;
  950. width: 86rpx;
  951. height: 150rpx;
  952. line-height: 60rpx;
  953. padding: 35rpx 10rpx 0;
  954. text-align: center;
  955. border-radius: 45px;
  956. background: royalblue;
  957. white-space: pre-wrap;
  958. color: #fff;
  959. }
  960. }
  961. </style>