index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044
  1. <template>
  2. <view class="index-box">
  3. <image class="bg-img" src="@/static/img/index/index-bg.png" mode="scaleToFill"></image>
  4. <view class="nav-z">
  5. <Nav class="" :leftShow='false' :customNav='true' :bgckgroundBox='bgckgroundBox'>
  6. <template>
  7. <view slot="custom" class="align-items-center" @click="toSelectSchool()">
  8. <!-- <uni-icons type="location-filled" size="20"></uni-icons> -->
  9. <image class="wh-40" src="@/static/img/index/dw.png" mode=""></image>
  10. <view class="fs-32 maxw-220 fw-600 ml-10 text-overflow-ellipsis-one">
  11. {{schoolData.school_name||''}}
  12. </view>
  13. <image class="nav-icon ml-10" src="@/static/img/index/index-right.png" mode="aspectFit"></image>
  14. </view>
  15. </template>
  16. </Nav>
  17. </view>
  18. <!-- 搜索 -->
  19. <view class="index-search box-border-box mt-4" @click="toUrl(1)"
  20. :style="[{'top': BarH + 'px','background':bgckgroundSearch}]">
  21. <view class="index-search-box box-border-box align-items-center">
  22. <!-- <uni-icons type="search" size="20" color="#000"></uni-icons> -->
  23. <image class="wh32" src="@/static/img/index/ss.png" mode=""></image>
  24. <view class="fs-28 fc-9 ml-10">搜索店铺名称或者商品名称</view>
  25. <view class="fs-28 fc-f index-search-box-buttom">搜索</view>
  26. </view>
  27. </view>
  28. <view class="index-box-1 ">
  29. <!-- 轮播 -->
  30. <view class="box-border-box plr-24 mb-32">
  31. <uni-swiper-dot :info="bannerList" mode="dot" :dotsStyles="dotStyle" :current="current">
  32. <swiper class="swiper" @change="change">
  33. <swiper-item v-for="(item,i) in bannerList" :key="i">
  34. <image class="swiper-item" :src="item.image" mode="aspectFill" @click="bannerClock(item)">
  35. </image>
  36. </swiper-item>
  37. </swiper>
  38. </uni-swiper-dot>
  39. </view>
  40. <!-- 导航 -->
  41. <view class="box-border-box plr-24">
  42. <view class="nav-list flex-wrap-wrap box-border-box mb-22">
  43. <view class="nav-list-item" v-for="(item,i) in navList" :key="i" @click="toUrl(item.type)">
  44. <view class="" v-if="(appletAudit != 1 && item.type != 11) && (appletAudit != 1 && item.type != 10) && (appletAudit != 1 && item.type != 9) && (appletAudit != 1 && item.type != 8)">
  45. <image :src="item.img" mode="scaleToFill"></image>
  46. <view class="fs-26 fc-3 text-align-center">{{item.name}}</view>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. <!-- 通知 -->
  52. <view class="box-border-box plr-24">
  53. <view class="msg-box align-items-center box-border-box">
  54. <image class="image-1" src="@/static/img/index/index-tz.png" mode="scaleToFill"></image>
  55. <view class="box-1 fs-20 fc-41ABF5">公告</view>
  56. <swiper class="tz-swiper" :vertical="true" circular :autoplay="true" :interval="3000"
  57. :duration="500">
  58. <swiper-item v-for="(item,i) in noticeList" :key="i" @click="toNoticeDet(item)">
  59. <view class="tz-swiper-item">{{item.title}}</view>
  60. </swiper-item>
  61. </swiper>
  62. <!-- <image class="image-2" src="@/static/img/toRight.png" mode="scaleToFill"></image> -->
  63. </view>
  64. </view>
  65. <!-- 限时秒杀 -->
  66. <view class="spike-box box-border-box" v-if="seckillGoodsList.length > 0">
  67. <view class="xsms-box mb-32">
  68. <image class="image-title" src="@/static/img/index/index-xsms.png" mode="scaleToFill"></image>
  69. <view class="xsms-box-list-f box-border-box plr-12">
  70. <scroll-view class="xsms-box-list display-flex" scroll-x="true">
  71. <view class="xsms-box-list-item box-border-box p-8" v-for="(item,i) in seckillGoodsList"
  72. :key="i" @click="toShop(item)">
  73. <image class="xsms-box-list-item-img-1 mb-4" :src="item.goods_image" mode="aspectFill">
  74. </image>
  75. <view class="text-overflow-ellipsis-one fs-26 mb-4">{{item.goods_name}}</view>
  76. <view class="mb-4">
  77. <span class="fs-20 fw-b fc-FB3D03">¥</span><span
  78. class="fs-32 fw-b fc-FB3D03">{{item.seckill_money}}</span>
  79. </view>
  80. <view class="fs-20 fc-9 text-line-through">¥{{item.line_price}}</view>
  81. <image class="xsms-box-list-item-img-2" src="@/static/img/index/index-q.png"
  82. mode="scaleToFill"></image>
  83. </view>
  84. </scroll-view>
  85. </view>
  86. </view>
  87. </view>
  88. <!-- 类型选择 -->
  89. <view class="type-list-box display-flex bgc-F5F4F9" :style="{'top': (BarH+indexSearchHeight) + 'px'}">
  90. <view class="type-item-box view-nowrap" :class="category_id==item.id?'s-type':'n-type'"
  91. v-for="(item,i) in typeList" :key="i" @click="selectType(item.id)">{{item.name}}</view>
  92. </view>
  93. <!-- 商品列表 -->
  94. <view class="" v-if="goodsList.length<=0">
  95. <enBlankVue></enBlankVue>
  96. </view>
  97. <view class="box-border-box plr-24" v-else>
  98. <view class="goos-list-box box-border-box p-24 display-flex" v-for="(item,i) in goodsList" :key="i"
  99. @click="toShop(item)">
  100. <view class="left-img-box">
  101. <image class="left-img" :src="item.shop_logo" mode="aspectFill"></image>
  102. <view class="status-box fc-f" v-if="item.status != 1">
  103. 休息中
  104. </view>
  105. </view>
  106. <view class="flex-1">
  107. <view class="align-items-center mb-8">
  108. <view class="right-box-title fs-32 fw-600 text-overflow-ellipsis-one">{{item.shop_name}}
  109. </view>
  110. <image class="right-box-title-img" src="@/static/img/toRight.png" mode=""></image>
  111. </view>
  112. <view class="align-items-center mb-12">
  113. <image class="img-x mr-12" src="@/static/img/index/index-x.png" mode=""></image>
  114. <view class="fs-26 fw-600 fc-FF7F00 mr-12">{{item.shop_score}}分</view>
  115. <view class="fc-6 fs-24 mr-12">| 预计{{item.delivery_time}}分钟 |</view>
  116. <view class="fc-6 fs-24 mr-12">{{item.shop_sales}}人购买</view>
  117. </view>
  118. <view class="align-items-center flex-wrap-wrap">
  119. <view class="quan-list align-items-center mr-12 mb-16" v-for="(info1,index1) in item.coupon"
  120. :key="index1">
  121. <view class="quan-list-1 fs-24 fc-f">券</view>
  122. <view class="quan-list-2 fs-24 fc-FB3D03">{{info1.money}}元</view>
  123. </view>
  124. </view>
  125. <view class="goods-items-list display-flex">
  126. <view class="goods-items-list-box" v-for="(info2,index2) in item.goods" :key="index2">
  127. <image class="mb-12" :src="info2.goods_image" mode="aspectFill"></image>
  128. <view class="mb-8 fw-600 text-overflow-ellipsis-one fs-26">{{info2.goods_name}}</view>
  129. <view class="">
  130. <span class="fs-24 fc-FB3D03">¥</span>
  131. <span class="fs-32 fc-FB3D03 fw-b">{{info2.price}}</span>
  132. </view>
  133. </view>
  134. </view>
  135. </view>
  136. </view>
  137. </view>
  138. </view>
  139. <uni-popup ref="popup" type="center" border-radius="10px 10px 10px 10px" :is-mask-click="false">
  140. <view class="roll-pop">
  141. <!-- <image class="lq-bg" src="@/static/img/index/lq-bg.png" mode=""></image> -->
  142. <image class="tc-top" src="@/static/img/index/tc-top.png" mode=""></image>
  143. <view class="coupon-box">
  144. <image class="tc-content" src="@/static/img/index/tc-content.png" mode=""></image>
  145. <view class="item-box display-flex" v-for="(item,index) in couponData" :key="index">
  146. <view class="item-right flex-direction flex-justify-center flex-1 bgc-FCE7E2">
  147. <view class="fs-28 mb-12 ticket-name text-overflow-ellipsis fc-3 fw-600">
  148. {{item.name}}
  149. </view>
  150. <view class="fs-22 fc-6 mb-12">
  151. 有效时间:{{item.time_type_str}}
  152. </view>
  153. <view class="fs-22 fc-6">
  154. 券类型:{{item.scene == 1?'外卖卷':'代取卷'}}
  155. </view>
  156. </view>
  157. <view class="item-hr"></view>
  158. <view class="item-left flex-direction align-items-center flex-justify-center bgc-FCE7E2">
  159. <view class="align-items-center">
  160. <view class="fs-24 fw-600 fc-FB3D03">¥</view>
  161. <view class="fs-48 fw-600 fc-FB3D03">{{item.money}}</view>
  162. </view>
  163. <view class="fs-22 fc-6 mb-4">
  164. 需满{{item.full_money}}元
  165. </view>
  166. <view class="but-box fs-26 fc-f" @click="receive(item,index)">立即领取</view>
  167. <view class="ball"></view>
  168. <view class="ball-two"></view>
  169. </view>
  170. </view>
  171. </view>
  172. <image class="tc-bot" src="@/static/img/index/tc-bot.png" mode=""></image>
  173. <uni-icons @click="gbPOp" class="pop-gb" color='#fff' type="close" size="30"></uni-icons>
  174. </view>
  175. </uni-popup>
  176. </view>
  177. </template>
  178. <script>
  179. import enBlankVue from "@/components/en-utils/en-blank/en-blank.vue";
  180. import tools from "@/service/tools";
  181. import {
  182. getNotice,
  183. getBanner,
  184. commonApplet
  185. } from '@/api/common.js';
  186. import {
  187. getSeckillGoods
  188. } from '@/api/seckill.js'
  189. import {
  190. getTakeaway
  191. } from '@/api/category.js';
  192. import {
  193. getGoodsList
  194. } from '@/api/goods.js';
  195. import {
  196. couponHome,
  197. receiveCoupon
  198. } from '@/api/coupon.js'
  199. import {
  200. shopInfo
  201. } from "@/api/shop.js"
  202. export default {
  203. components: {
  204. enBlankVue
  205. },
  206. data() {
  207. return {
  208. BarH: 0,
  209. bgckgroundBox: 'transparent',
  210. bgckgroundSearch: '',
  211. bgckgroundType: '',
  212. navList: [{
  213. name: "外卖",
  214. img: require('@/static/img/index/index-wm.png'),
  215. type: 2
  216. },
  217. {
  218. name: "代取",
  219. img: require('@/static/img/index/index-dq.png'),
  220. type: 3
  221. },
  222. {
  223. name: "校友圈",
  224. img: require('@/static/img/index/index-xyq.png'),
  225. type: 7
  226. },
  227. {
  228. name: "团购",
  229. img: require('@/static/img/index/index-tg.png'),
  230. type: 5
  231. },
  232. {
  233. name: "票务",
  234. img: require('@/static/img/index/index-pw.png'),
  235. type: 4
  236. },
  237. {
  238. name: "干洗",
  239. img: require('@/static/img/index/index-gx.png'),
  240. type: 6
  241. },
  242. {
  243. name: "租凭",
  244. img: require('@/static/img/index/index-zp.png'),
  245. type: 9
  246. },
  247. {
  248. name: "二手市场",
  249. img: require('@/static/img/index/index-esss.png'),
  250. type: 10
  251. },
  252. {
  253. name: "回收",
  254. img: require('@/static/img/index/index-hs.png'),
  255. type: 11
  256. },
  257. {
  258. name: "实习岗位",
  259. img: require('@/static/img/index/index-sxgw.png'),
  260. type: 8
  261. },
  262. ],
  263. schoolData: {
  264. school_name: '',
  265. },
  266. noticeList: [],
  267. bannerList: [],
  268. seckillGoodsList: [],
  269. typeList: [], //分类数组
  270. category_id: 0, //分类id
  271. goodsList: [],
  272. total: 0,
  273. page: 1,
  274. couponData: [],
  275. indexSearchHeight: '',
  276. dotStyle: {
  277. width: 6,
  278. bottom: 6,
  279. backgroundColor: 'rgba(51, 51, 51,0.3)',
  280. border: '1px rgba(51, 51, 51,0.3) solid',
  281. color: '#fff',
  282. selectedBackgroundColor: 'rgba(79, 179, 239,0.9)',
  283. selectedBorder: '1px rgba(0,0,0,0) solid'
  284. },
  285. current: 0,
  286. appletAudit: ''
  287. }
  288. },
  289. onShow() {
  290. // let lon = uni.getStorageSync('lon');
  291. // let lat = uni.getStorageSync('lat');
  292. // if (!lon || !lat) {
  293. // uni.getLocation({
  294. // type: "gcj02",
  295. // success: (res) => {
  296. // if (res.errMsg === 'getLocation:ok') {
  297. // uni.setStorageSync('lon', res.longitude);
  298. // uni.setStorageSync('lat', res.latitude);
  299. // } else {
  300. // tools.error('位置授权失败,请检查是否开始授权')
  301. // }
  302. // },
  303. // fail: (res) => {
  304. // tools.error('位置授权失败,请检查是否开始授权')
  305. // },
  306. // })
  307. // }
  308. let school_id = uni.getStorageSync('school_id');
  309. let operate_id = uni.getStorageSync('operate_id');
  310. let school_name = uni.getStorageSync('school_name');
  311. if (!school_id || !operate_id) {
  312. setTimeout(() => {
  313. uni.reLaunch({
  314. url: '/pages-address/select-school?type=1'
  315. })
  316. }, 1000)
  317. } else {
  318. this.schoolData.school_name = school_name;
  319. }
  320. this.getBanner();
  321. this.getNotice();
  322. this.getSeckillGoods();
  323. this.getTakeaway();
  324. let userToken = uni.getStorageSync('token')
  325. if (userToken) {
  326. this.couponHome()
  327. }
  328. uni.removeStorageSync('orderInfoType')
  329. },
  330. onLoad() {
  331. this.page = 1;
  332. this.goodsList = [];
  333. this.getGoodsList();
  334. },
  335. mounted() {
  336. this.getHeight()
  337. },
  338. onPageScroll(e) {
  339. if (e.scrollTop > 1) {
  340. this.bgckgroundBox = '#fff';
  341. this.bgckgroundSearch = '#fff';
  342. if (e.scrollTop > 500) {
  343. this.bgckgroundType = '#fff';
  344. } else {
  345. this.bgckgroundType = '';
  346. }
  347. } else {
  348. this.bgckgroundBox = 'transparent';
  349. this.bgckgroundSearch = '';
  350. this.bgckgroundType = '';
  351. }
  352. },
  353. onReachBottom() {
  354. if (this.goodsList.length < this.total) {
  355. this.page += 1;
  356. this.getGoodsList();
  357. }
  358. },
  359. created() {
  360. uni.getSystemInfo({
  361. success: (e) => {
  362. let statusBarH = e.statusBarHeight + 10
  363. let custom = 0;
  364. custom = wx.getMenuButtonBoundingClientRect()
  365. let customBarH = custom.height;
  366. this.BarH = statusBarH + customBarH;
  367. }
  368. })
  369. },
  370. methods: {
  371. commonApplet() {
  372. commonApplet().then((res) => {
  373. if (res.code == 1) {
  374. this.appletAudit = res.data
  375. }
  376. })
  377. },
  378. getHeight() {
  379. // 创建选择器对象
  380. const query = uni.createSelectorQuery().in(this);
  381. // 选择我们想要的元素
  382. query.select('.index-search').boundingClientRect(data => {
  383. // data是选中元素的大小及位置信息
  384. if (data) {
  385. // 元素的高度
  386. this.indexSearchHeight = data.height;
  387. console.log('元素的高度:', this.indexSearchHeight);
  388. }
  389. }).exec(); // 执行选择器查询
  390. },
  391. change(e) {
  392. this.current = e.detail.current
  393. },
  394. bannerClock(item) {
  395. if (item.type == 1) {
  396. // 外卖首页
  397. uni.navigateTo({
  398. url: '/pages-takeout/takeout'
  399. })
  400. } else if (item.type == 2) {
  401. if (item.to_id != 0) {
  402. // 外卖商家
  403. uni.navigateTo({
  404. url: '/pages-takeout/shop?shop_id=' + item.to_id
  405. })
  406. } else {
  407. // 外卖首页
  408. uni.navigateTo({
  409. url: '/pages-takeout/takeout'
  410. })
  411. }
  412. } else if (item.type == 3) {
  413. // 代取页
  414. uni.navigateTo({
  415. url: '/pages-takeout/replace-take'
  416. })
  417. } else if (item.type === 4) {
  418. // 团购页
  419. uni.navigateTo({
  420. url: '/pages-buy/group'
  421. })
  422. } else if (item.type === 5) {
  423. // 票务页
  424. uni.navigateTo({
  425. url: '/pages-buy/ticket'
  426. })
  427. } else if (item.type === 6) {
  428. // 干洗页
  429. uni.navigateTo({
  430. url: '/pages-buy/dry-clean'
  431. })
  432. } else if (item.type === 7) {
  433. // 校友圈
  434. uni.navigateTo({
  435. url: '/pages-school/school-circle'
  436. })
  437. } else if (item.type === 8) {
  438. // 骑手申请页
  439. uni.navigateTo({
  440. url: '/pages-my/rider-recruit'
  441. })
  442. }
  443. },
  444. receive(item, index) {
  445. receiveCoupon({
  446. grant_id: item.grant_id,
  447. coupon_id: item.coupon_id
  448. }).then((res) => {
  449. if (res.code == 1) {
  450. tools.success(res.msg)
  451. this.couponData.splice(index, 1)
  452. if (this.couponData.length <= 0) {
  453. this.gbPOp()
  454. }
  455. } else {
  456. tools.error(res.msg)
  457. }
  458. })
  459. },
  460. couponHome() {
  461. let operate_id = uni.getStorageSync('operate_id');
  462. couponHome({
  463. operate_id: operate_id
  464. }).then((res) => {
  465. if (res.code == 1) {
  466. if (res.data.length > 0) {
  467. uni.hideTabBar()
  468. this.couponData = res.data
  469. this.$refs.popup.open()
  470. }
  471. }
  472. })
  473. },
  474. gbPOp() {
  475. uni.showTabBar()
  476. this.$refs.popup.close()
  477. },
  478. getBanner() {
  479. getBanner().then((res) => {
  480. if (res.code === 1) {
  481. this.bannerList = res.data;
  482. }
  483. })
  484. },
  485. getNotice() {
  486. getNotice().then((res) => {
  487. if (res.code === 1) {
  488. this.noticeList = res.data;
  489. }
  490. })
  491. },
  492. getSeckillGoods() {
  493. let operate_id = uni.getStorageSync('operate_id');
  494. getSeckillGoods({
  495. operate_id: operate_id
  496. }).then((res) => {
  497. if (res.code === 1) {
  498. this.seckillGoodsList = res.data
  499. }
  500. })
  501. },
  502. getTakeaway() {
  503. getTakeaway().then((res) => {
  504. if (res.code === 1) {
  505. this.typeList = res.data;
  506. this.typeList.unshift({
  507. name: "全部",
  508. id: 0
  509. })
  510. }
  511. })
  512. },
  513. getGoodsList() {
  514. let operate_id = uni.getStorageSync('operate_id');
  515. getGoodsList({
  516. page: this.page,
  517. operate_id: operate_id,
  518. category_id: this.category_id
  519. }).then((res) => {
  520. if (res.code === 1) {
  521. this.goodsList = [...this.goodsList, ...res.data.items];
  522. this.total = res.data.total;
  523. }
  524. })
  525. },
  526. selectType(id) {
  527. if (this.category_id != id) {
  528. this.category_id = id;
  529. this.page = 1;
  530. this.goodsList = [];
  531. this.getGoodsList();
  532. }
  533. },
  534. toUrl(type) {
  535. if (type === 1) {
  536. // 去搜索
  537. uni.navigateTo({
  538. url: '/pages/index/search-record'
  539. })
  540. } else if (type === 2) {
  541. // 去外卖
  542. uni.navigateTo({
  543. url: '/pages-takeout/takeout'
  544. })
  545. } else if (type === 3) {
  546. // 去代取
  547. uni.navigateTo({
  548. url: '/pages-takeout/replace-take'
  549. })
  550. } else if (type === 4) {
  551. // 去票务
  552. uni.navigateTo({
  553. url: '/pages-buy/ticket'
  554. })
  555. } else if (type === 5) {
  556. // 去团购
  557. uni.navigateTo({
  558. url: '/pages-buy/group'
  559. })
  560. } else if (type === 6) {
  561. // 去干洗
  562. uni.navigateTo({
  563. url: '/pages-buy/dry-clean'
  564. })
  565. } else if (type === 7) {
  566. // 去校友圈
  567. uni.navigateTo({
  568. url: '/pages-school/school-circle'
  569. })
  570. } else if (type === 8) {
  571. // 去实习岗位
  572. uni.navigateTo({
  573. url: '/pages-position/Internship-position'
  574. })
  575. } else {
  576. tools.error('暂未开放')
  577. }
  578. },
  579. toSelectSchool() {
  580. uni.navigateTo({
  581. url: '/pages-address/select-school?type=1'
  582. })
  583. },
  584. toShop(item) {
  585. const operate_id = uni.getStorageSync('operate_id')
  586. shopInfo({
  587. operate_id: operate_id,
  588. shop_id: item.shop_id
  589. }).then((res) => {
  590. if (res.code == 1) {
  591. uni.navigateTo({
  592. url: '/pages-takeout/shop?shop_id=' + item.shop_id
  593. })
  594. } else {
  595. tools.error(res.msg)
  596. }
  597. })
  598. },
  599. toNoticeDet(item) {
  600. uni.navigateTo({
  601. url: '/pages-my/notice/info?id=' + item.id
  602. })
  603. },
  604. },
  605. }
  606. </script>
  607. <style lang="scss" scoped>
  608. .spike-box {
  609. padding: 24rpx 24rpx 0;
  610. }
  611. .wh32 {
  612. width: 32rpx;
  613. height: 32rpx;
  614. }
  615. .nav-z {
  616. position: relative;
  617. z-index: 1 !important;
  618. }
  619. .wh-40 {
  620. width: 40rpx;
  621. height: 40rpx;
  622. }
  623. .item-box {
  624. margin-bottom: 20rpx;
  625. }
  626. .item-box:last-child {
  627. margin: 0;
  628. }
  629. .roll-pop {
  630. position: relative;
  631. width: 100vw;
  632. // height: 1000rpx;
  633. .tc-top {
  634. width: 100%;
  635. height: 202rpx;
  636. }
  637. .tc-bot {
  638. width: 100%;
  639. height: 178rpx;
  640. }
  641. .pop-gb {
  642. width: 56rpx;
  643. height: 56rpx;
  644. position: absolute;
  645. bottom: -65rpx;
  646. left: calc((100% - 28rpx) / 2);
  647. }
  648. }
  649. .coupon-box {
  650. width: 100%;
  651. // min-height: 590rpx;
  652. padding: 0 82rpx 0 92rpx;
  653. box-sizing: border-box;
  654. position: relative;
  655. .tc-content {
  656. position: absolute;
  657. left: 0;
  658. top: 0;
  659. width: 100%;
  660. height: 100%;
  661. }
  662. }
  663. .index-box {
  664. .maxw-220 {
  665. max-width: 220rpx;
  666. }
  667. position: relative;
  668. .bg-img {
  669. width: 100%;
  670. height: 930rpx;
  671. position: absolute;
  672. top: 0;
  673. left: 0;
  674. z-index: -2;
  675. }
  676. .nav-icon {
  677. width: 32rpx;
  678. height: 32rpx;
  679. }
  680. .index-box-1 {
  681. width: 100%;
  682. // height: 3000rpx;
  683. .swiper {
  684. width: 702rpx;
  685. height: 220rpx;
  686. border-radius: 20rpx;
  687. .swiper-item {
  688. width: 702rpx;
  689. height: 220rpx;
  690. border-radius: 20rpx;
  691. }
  692. }
  693. .nav-list {
  694. padding: 0 22rpx;
  695. .nav-list-item {
  696. margin-right: 52rpx;
  697. margin-bottom: 16rpx;
  698. image {
  699. width: 88rpx;
  700. height: 88rpx;
  701. margin: 0 auto;
  702. }
  703. }
  704. .nav-list-item:nth-child(7) {
  705. margin-right: 42rpx !important;
  706. }
  707. .nav-list-item:nth-child(8) {
  708. margin-right: 46rpx !important;
  709. }
  710. .nav-list-item:nth-child(9) {
  711. margin-right: 44rpx !important;
  712. }
  713. .nav-list-item:nth-child(5),
  714. .nav-list-item:nth-child(10) {
  715. margin-right: 0;
  716. }
  717. }
  718. .msg-box {
  719. width: 100%;
  720. height: 66rpx;
  721. background: #F7F8FC;
  722. border-radius: 12rpx;
  723. padding: 0 14rpx;
  724. .image-1 {
  725. width: 72rpx;
  726. height: 32rpx;
  727. margin-right: 10rpx;
  728. }
  729. .image-2 {
  730. width: 40rpx;
  731. height: 40rpx;
  732. margin-left: auto;
  733. }
  734. .box-1 {
  735. width: 50rpx;
  736. height: 26rpx;
  737. border-radius: 2rpx;
  738. border: 2rpx solid #41ABF5;
  739. text-align: center;
  740. line-height: 26rpx;
  741. margin-right: 10rpx;
  742. }
  743. .tz-swiper {
  744. width: 444rpx;
  745. height: 66rpx;
  746. .tz-swiper-item {
  747. width: 444rpx;
  748. height: 66rpx;
  749. line-height: 66rpx;
  750. color: #666;
  751. font-size: 30rpx;
  752. }
  753. }
  754. }
  755. .xsms-box {
  756. .image-title {
  757. width: 100%;
  758. height: 92rpx;
  759. }
  760. .xsms-box-list-f {
  761. width: 100%;
  762. height: 310rpx;
  763. background: linear-gradient(180deg, #ABDEFE 4%, #C9EAFF 30%, #C9EAFF 100%);
  764. border-radius: 0rpx 0rpx 20rpx 20rpx;
  765. }
  766. .xsms-box-list {
  767. white-space: nowrap;
  768. .xsms-box-list-item:last-child {
  769. margin-right: 0;
  770. }
  771. .xsms-box-list-item {
  772. width: 180rpx;
  773. height: 300rpx;
  774. background: #FFFFFF;
  775. border-radius: 8rpx;
  776. margin-right: 8rpx;
  777. position: relative;
  778. display: inline-block;
  779. .xsms-box-list-item-img-1 {
  780. width: 164rpx;
  781. height: 175rpx;
  782. border-radius: 9rpx;
  783. }
  784. .xsms-box-list-item-img-2 {
  785. position: absolute;
  786. width: 62rpx;
  787. height: 36rpx;
  788. right: 0;
  789. bottom: 8rpx;
  790. }
  791. }
  792. }
  793. }
  794. .type-list-box {
  795. position: sticky;
  796. left: 0;
  797. // top: calc(var(BarH)px + 93rpx);
  798. // top: calc(86px + 93rpx);
  799. padding: 24rpx;
  800. overflow-x: scroll;
  801. z-index: 50;
  802. .type-item-box {
  803. margin-right: 16rpx;
  804. padding: 0 24rpx;
  805. // min-width: 300rpx;
  806. height: 56rpx;
  807. line-height: 56rpx;
  808. border-radius: 200rpx;
  809. text-align: center;
  810. font-size: 28rpx;
  811. }
  812. .type-item-box:last-child {
  813. margin-right: 0;
  814. }
  815. .s-type {
  816. color: #fff;
  817. font-weight: 600;
  818. background: linear-gradient(280deg, #44B1F7 0%, #96D6F4 100%);
  819. }
  820. .n-type {
  821. color: #666;
  822. background-color: #fff;
  823. }
  824. }
  825. .goos-list-box {
  826. width: 100%;
  827. min-height: 100rpx;
  828. background: #FFFFFF;
  829. box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(51, 51, 51, 0.1);
  830. border-radius: 20rpx;
  831. margin-bottom: 20rpx;
  832. .goods-items-list {
  833. width: 530rpx;
  834. overflow-y: scroll;
  835. .goods-items-list-box {
  836. width: 140rpx;
  837. margin-right: 16rpx;
  838. image {
  839. width: 140rpx;
  840. height: 140rpx;
  841. border-radius: 12rpx
  842. }
  843. }
  844. }
  845. .left-img-box {
  846. width: 100rpx;
  847. height: 100rpx;
  848. margin-right: 16rpx;
  849. position: relative;
  850. .left-img {
  851. width: 100rpx;
  852. height: 100rpx;
  853. border-radius: 12rpx;
  854. }
  855. .status-box {
  856. position: absolute;
  857. bottom: 0;
  858. left: 0;
  859. width: 100%;
  860. padding: 4rpx 0;
  861. text-align: center;
  862. background: rgba(0, 0, 0, 0.5);
  863. font-size: 17rpx;
  864. border-radius: 0 0 12rpx 12rpx;
  865. }
  866. }
  867. .img-x {
  868. width: 24rpx;
  869. height: 24rpx;
  870. }
  871. .right-box-title {
  872. width: 438rpx;
  873. }
  874. .right-box-title-img {
  875. width: 32rpx;
  876. height: 32rpx;
  877. margin-left: auto;
  878. }
  879. .quan-list {
  880. .quan-list-1 {
  881. width: 32rpx;
  882. height: 34rpx;
  883. background: #FB3D03;
  884. border-radius: 5rpx 0rpx 0rpx 5rpx;
  885. text-align: center;
  886. line-height: 34rpx;
  887. }
  888. .quan-list-2 {
  889. box-sizing: border-box;
  890. height: 34rpx;
  891. line-height: 34rpx;
  892. padding: 0 4rpx;
  893. border-radius: 0 5rpx 5rpx 0;
  894. border: 1rpx solid #FB3D03;
  895. text-align: center;
  896. }
  897. }
  898. }
  899. }
  900. .index-search {
  901. position: sticky;
  902. left: 0;
  903. z-index: 10;
  904. padding: 0 24rpx 20rpx 24rpx;
  905. .index-search-box {
  906. width: 100%;
  907. height: 72rpx;
  908. padding: 0 6rpx 0 24rpx;
  909. border-radius: 200rpx;
  910. border: 2rpx solid #4FB3EF;
  911. .index-search-box-buttom {
  912. width: 120rpx;
  913. height: 60rpx;
  914. background: linear-gradient(90deg, #57CAFF 0%, #41ABF5 100%);
  915. border-radius: 200rpx;
  916. margin-left: auto;
  917. line-height: 60rpx;
  918. text-align: center;
  919. }
  920. }
  921. }
  922. }
  923. .item-hr {
  924. width: 0px;
  925. height: auto;
  926. border-right: 1rpx dashed #FB7850;
  927. }
  928. .item-hr-two {
  929. width: 0px;
  930. height: auto;
  931. border-right: 1rpx dashed #999;
  932. }
  933. .item-left {
  934. width: 171rpx;
  935. height: auto;
  936. padding: 20rpx 18rpx;
  937. box-sizing: border-box;
  938. position: relative;
  939. border-radius: 0 20rpx 20rpx 0;
  940. }
  941. .ball {
  942. width: 24rpx;
  943. height: 24rpx;
  944. border-radius: 50%;
  945. position: absolute;
  946. top: -12rpx;
  947. left: -12rpx;
  948. background: #fff;
  949. z-index: 2;
  950. }
  951. .ball-two {
  952. width: 24rpx;
  953. height: 24rpx;
  954. border-radius: 50%;
  955. position: absolute;
  956. background: #fff;
  957. z-index: 10;
  958. bottom: -12rpx;
  959. left: -12rpx;
  960. }
  961. .item-right {
  962. padding: 24rpx;
  963. box-sizing: border-box;
  964. border-radius: 20rpx 0 0 20rpx;
  965. position: relative;
  966. }
  967. .but-box {
  968. width: 136rpx;
  969. height: 48rpx;
  970. line-height: 48rpx;
  971. text-align: center;
  972. background: linear-gradient(225deg, #FB3D03 0%, #FF6901 100%);
  973. border-radius: 200rpx;
  974. }
  975. </style>