index.vue 25 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048
  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="item.appletAudit == 0">
  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. }
  287. },
  288. onShow() {
  289. // let lon = uni.getStorageSync('lon');
  290. // let lat = uni.getStorageSync('lat');
  291. // if (!lon || !lat) {
  292. // uni.getLocation({
  293. // type: "gcj02",
  294. // success: (res) => {
  295. // if (res.errMsg === 'getLocation:ok') {
  296. // uni.setStorageSync('lon', res.longitude);
  297. // uni.setStorageSync('lat', res.latitude);
  298. // } else {
  299. // tools.error('位置授权失败,请检查是否开始授权')
  300. // }
  301. // },
  302. // fail: (res) => {
  303. // tools.error('位置授权失败,请检查是否开始授权')
  304. // },
  305. // })
  306. // }
  307. let school_id = uni.getStorageSync('school_id');
  308. let operate_id = uni.getStorageSync('operate_id');
  309. let school_name = uni.getStorageSync('school_name');
  310. if (!school_id || !operate_id) {
  311. setTimeout(() => {
  312. uni.reLaunch({
  313. url: '/pages-address/select-school?type=1'
  314. })
  315. }, 1000)
  316. } else {
  317. this.schoolData.school_name = school_name;
  318. }
  319. this.commonApplet()
  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.navList.forEach((v, k) => {
  375. v.appletAudit = 0
  376. if (v.type == 8 || v.type == 9 || v.type == 10 || v.type == 11) {
  377. v.appletAudit = res.data
  378. }
  379. })
  380. }
  381. })
  382. },
  383. getHeight() {
  384. // 创建选择器对象
  385. const query = uni.createSelectorQuery().in(this);
  386. // 选择我们想要的元素
  387. query.select('.index-search').boundingClientRect(data => {
  388. // data是选中元素的大小及位置信息
  389. if (data) {
  390. // 元素的高度
  391. this.indexSearchHeight = data.height;
  392. console.log('元素的高度:', this.indexSearchHeight);
  393. }
  394. }).exec(); // 执行选择器查询
  395. },
  396. change(e) {
  397. this.current = e.detail.current
  398. },
  399. bannerClock(item) {
  400. if (item.type == 1) {
  401. // 外卖首页
  402. uni.navigateTo({
  403. url: '/pages-takeout/takeout'
  404. })
  405. } else if (item.type == 2) {
  406. if (item.to_id != 0) {
  407. // 外卖商家
  408. uni.navigateTo({
  409. url: '/pages-takeout/shop?shop_id=' + item.to_id
  410. })
  411. } else {
  412. // 外卖首页
  413. uni.navigateTo({
  414. url: '/pages-takeout/takeout'
  415. })
  416. }
  417. } else if (item.type == 3) {
  418. // 代取页
  419. uni.navigateTo({
  420. url: '/pages-takeout/replace-take'
  421. })
  422. } else if (item.type === 4) {
  423. // 团购页
  424. uni.navigateTo({
  425. url: '/pages-buy/group'
  426. })
  427. } else if (item.type === 5) {
  428. // 票务页
  429. uni.navigateTo({
  430. url: '/pages-buy/ticket'
  431. })
  432. } else if (item.type === 6) {
  433. // 干洗页
  434. uni.navigateTo({
  435. url: '/pages-buy/dry-clean'
  436. })
  437. } else if (item.type === 7) {
  438. // 校友圈
  439. uni.navigateTo({
  440. url: '/pages-school/school-circle'
  441. })
  442. } else if (item.type === 8) {
  443. // 骑手申请页
  444. uni.navigateTo({
  445. url: '/pages-my/rider-recruit'
  446. })
  447. }
  448. },
  449. receive(item, index) {
  450. receiveCoupon({
  451. grant_id: item.grant_id,
  452. coupon_id: item.coupon_id
  453. }).then((res) => {
  454. if (res.code == 1) {
  455. tools.success(res.msg)
  456. this.couponData.splice(index, 1)
  457. if (this.couponData.length <= 0) {
  458. this.gbPOp()
  459. }
  460. } else {
  461. tools.error(res.msg)
  462. }
  463. })
  464. },
  465. couponHome() {
  466. let operate_id = uni.getStorageSync('operate_id');
  467. couponHome({
  468. operate_id: operate_id
  469. }).then((res) => {
  470. if (res.code == 1) {
  471. if (res.data.length > 0) {
  472. uni.hideTabBar()
  473. this.couponData = res.data
  474. this.$refs.popup.open()
  475. }
  476. }
  477. })
  478. },
  479. gbPOp() {
  480. uni.showTabBar()
  481. this.$refs.popup.close()
  482. },
  483. getBanner() {
  484. getBanner().then((res) => {
  485. if (res.code === 1) {
  486. this.bannerList = res.data;
  487. }
  488. })
  489. },
  490. getNotice() {
  491. getNotice().then((res) => {
  492. if (res.code === 1) {
  493. this.noticeList = res.data;
  494. }
  495. })
  496. },
  497. getSeckillGoods() {
  498. let operate_id = uni.getStorageSync('operate_id');
  499. getSeckillGoods({
  500. operate_id: operate_id
  501. }).then((res) => {
  502. if (res.code === 1) {
  503. this.seckillGoodsList = res.data
  504. }
  505. })
  506. },
  507. getTakeaway() {
  508. getTakeaway().then((res) => {
  509. if (res.code === 1) {
  510. this.typeList = res.data;
  511. this.typeList.unshift({
  512. name: "全部",
  513. id: 0
  514. })
  515. }
  516. })
  517. },
  518. getGoodsList() {
  519. let operate_id = uni.getStorageSync('operate_id');
  520. getGoodsList({
  521. page: this.page,
  522. operate_id: operate_id,
  523. category_id: this.category_id
  524. }).then((res) => {
  525. if (res.code === 1) {
  526. this.goodsList = [...this.goodsList, ...res.data.items];
  527. this.total = res.data.total;
  528. }
  529. })
  530. },
  531. selectType(id) {
  532. if (this.category_id != id) {
  533. this.category_id = id;
  534. this.page = 1;
  535. this.goodsList = [];
  536. this.getGoodsList();
  537. }
  538. },
  539. toUrl(type) {
  540. if (type === 1) {
  541. // 去搜索
  542. uni.navigateTo({
  543. url: '/pages/index/search-record'
  544. })
  545. } else if (type === 2) {
  546. // 去外卖
  547. uni.navigateTo({
  548. url: '/pages-takeout/takeout'
  549. })
  550. } else if (type === 3) {
  551. // 去代取
  552. uni.navigateTo({
  553. url: '/pages-takeout/replace-take'
  554. })
  555. } else if (type === 4) {
  556. // 去票务
  557. uni.navigateTo({
  558. url: '/pages-buy/ticket'
  559. })
  560. } else if (type === 5) {
  561. // 去团购
  562. uni.navigateTo({
  563. url: '/pages-buy/group'
  564. })
  565. } else if (type === 6) {
  566. // 去干洗
  567. uni.navigateTo({
  568. url: '/pages-buy/dry-clean'
  569. })
  570. } else if (type === 7) {
  571. // 去校友圈
  572. uni.navigateTo({
  573. url: '/pages-school/school-circle'
  574. })
  575. } else if (type === 8) {
  576. // 去实习岗位
  577. uni.navigateTo({
  578. url: '/pages-position/Internship-position'
  579. })
  580. } else {
  581. tools.error('暂未开放')
  582. }
  583. },
  584. toSelectSchool() {
  585. uni.navigateTo({
  586. url: '/pages-address/select-school?type=1'
  587. })
  588. },
  589. toShop(item) {
  590. const operate_id = uni.getStorageSync('operate_id')
  591. shopInfo({
  592. operate_id: operate_id,
  593. shop_id: item.shop_id
  594. }).then((res) => {
  595. if (res.code == 1) {
  596. uni.navigateTo({
  597. url: '/pages-takeout/shop?shop_id=' + item.shop_id
  598. })
  599. } else {
  600. tools.error(res.msg)
  601. }
  602. })
  603. },
  604. toNoticeDet(item) {
  605. uni.navigateTo({
  606. url: '/pages-my/notice/info?id=' + item.id
  607. })
  608. },
  609. },
  610. }
  611. </script>
  612. <style lang="scss" scoped>
  613. .spike-box {
  614. padding: 24rpx 24rpx 0;
  615. }
  616. .wh32 {
  617. width: 32rpx;
  618. height: 32rpx;
  619. }
  620. .nav-z {
  621. position: relative;
  622. z-index: 1 !important;
  623. }
  624. .wh-40 {
  625. width: 40rpx;
  626. height: 40rpx;
  627. }
  628. .item-box {
  629. margin-bottom: 20rpx;
  630. }
  631. .item-box:last-child {
  632. margin: 0;
  633. }
  634. .roll-pop {
  635. position: relative;
  636. width: 100vw;
  637. // height: 1000rpx;
  638. .tc-top {
  639. width: 100%;
  640. height: 202rpx;
  641. }
  642. .tc-bot {
  643. width: 100%;
  644. height: 178rpx;
  645. }
  646. .pop-gb {
  647. width: 56rpx;
  648. height: 56rpx;
  649. position: absolute;
  650. bottom: -65rpx;
  651. left: calc((100% - 28rpx) / 2);
  652. }
  653. }
  654. .coupon-box {
  655. width: 100%;
  656. // min-height: 590rpx;
  657. padding: 0 82rpx 0 92rpx;
  658. box-sizing: border-box;
  659. position: relative;
  660. .tc-content {
  661. position: absolute;
  662. left: 0;
  663. top: 0;
  664. width: 100%;
  665. height: 100%;
  666. }
  667. }
  668. .index-box {
  669. .maxw-220 {
  670. max-width: 220rpx;
  671. }
  672. position: relative;
  673. .bg-img {
  674. width: 100%;
  675. height: 930rpx;
  676. position: absolute;
  677. top: 0;
  678. left: 0;
  679. z-index: -2;
  680. }
  681. .nav-icon {
  682. width: 32rpx;
  683. height: 32rpx;
  684. }
  685. .index-box-1 {
  686. width: 100%;
  687. // height: 3000rpx;
  688. .swiper {
  689. width: 702rpx;
  690. height: 220rpx;
  691. border-radius: 20rpx;
  692. .swiper-item {
  693. width: 702rpx;
  694. height: 220rpx;
  695. border-radius: 20rpx;
  696. }
  697. }
  698. .nav-list {
  699. padding: 0 22rpx;
  700. .nav-list-item {
  701. margin-right: 52rpx;
  702. margin-bottom: 16rpx;
  703. image {
  704. width: 88rpx;
  705. height: 88rpx;
  706. margin: 0 auto;
  707. }
  708. }
  709. .nav-list-item:nth-child(7) {
  710. margin-right: 42rpx !important;
  711. }
  712. .nav-list-item:nth-child(8) {
  713. margin-right: 46rpx !important;
  714. }
  715. .nav-list-item:nth-child(9) {
  716. margin-right: 44rpx !important;
  717. }
  718. .nav-list-item:nth-child(5),
  719. .nav-list-item:nth-child(10) {
  720. margin-right: 0;
  721. }
  722. }
  723. .msg-box {
  724. width: 100%;
  725. height: 66rpx;
  726. background: #F7F8FC;
  727. border-radius: 12rpx;
  728. padding: 0 14rpx;
  729. .image-1 {
  730. width: 72rpx;
  731. height: 32rpx;
  732. margin-right: 10rpx;
  733. }
  734. .image-2 {
  735. width: 40rpx;
  736. height: 40rpx;
  737. margin-left: auto;
  738. }
  739. .box-1 {
  740. width: 50rpx;
  741. height: 26rpx;
  742. border-radius: 2rpx;
  743. border: 2rpx solid #41ABF5;
  744. text-align: center;
  745. line-height: 26rpx;
  746. margin-right: 10rpx;
  747. }
  748. .tz-swiper {
  749. width: 444rpx;
  750. height: 66rpx;
  751. .tz-swiper-item {
  752. width: 444rpx;
  753. height: 66rpx;
  754. line-height: 66rpx;
  755. color: #666;
  756. font-size: 30rpx;
  757. }
  758. }
  759. }
  760. .xsms-box {
  761. .image-title {
  762. width: 100%;
  763. height: 92rpx;
  764. }
  765. .xsms-box-list-f {
  766. width: 100%;
  767. height: 310rpx;
  768. background: linear-gradient(180deg, #ABDEFE 4%, #C9EAFF 30%, #C9EAFF 100%);
  769. border-radius: 0rpx 0rpx 20rpx 20rpx;
  770. }
  771. .xsms-box-list {
  772. white-space: nowrap;
  773. .xsms-box-list-item:last-child {
  774. margin-right: 0;
  775. }
  776. .xsms-box-list-item {
  777. width: 180rpx;
  778. height: 300rpx;
  779. background: #FFFFFF;
  780. border-radius: 8rpx;
  781. margin-right: 8rpx;
  782. position: relative;
  783. display: inline-block;
  784. .xsms-box-list-item-img-1 {
  785. width: 164rpx;
  786. height: 175rpx;
  787. border-radius: 9rpx;
  788. }
  789. .xsms-box-list-item-img-2 {
  790. position: absolute;
  791. width: 62rpx;
  792. height: 36rpx;
  793. right: 0;
  794. bottom: 8rpx;
  795. }
  796. }
  797. }
  798. }
  799. .type-list-box {
  800. position: sticky;
  801. left: 0;
  802. // top: calc(var(BarH)px + 93rpx);
  803. // top: calc(86px + 93rpx);
  804. padding: 24rpx;
  805. overflow-x: scroll;
  806. z-index: 50;
  807. .type-item-box {
  808. margin-right: 16rpx;
  809. padding: 0 24rpx;
  810. // min-width: 300rpx;
  811. height: 56rpx;
  812. line-height: 56rpx;
  813. border-radius: 200rpx;
  814. text-align: center;
  815. font-size: 28rpx;
  816. }
  817. .type-item-box:last-child {
  818. margin-right: 0;
  819. }
  820. .s-type {
  821. color: #fff;
  822. font-weight: 600;
  823. background: linear-gradient(280deg, #44B1F7 0%, #96D6F4 100%);
  824. }
  825. .n-type {
  826. color: #666;
  827. background-color: #fff;
  828. }
  829. }
  830. .goos-list-box {
  831. width: 100%;
  832. min-height: 100rpx;
  833. background: #FFFFFF;
  834. box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(51, 51, 51, 0.1);
  835. border-radius: 20rpx;
  836. margin-bottom: 20rpx;
  837. .goods-items-list {
  838. width: 530rpx;
  839. overflow-y: scroll;
  840. .goods-items-list-box {
  841. width: 140rpx;
  842. margin-right: 16rpx;
  843. image {
  844. width: 140rpx;
  845. height: 140rpx;
  846. border-radius: 12rpx
  847. }
  848. }
  849. }
  850. .left-img-box {
  851. width: 100rpx;
  852. height: 100rpx;
  853. margin-right: 16rpx;
  854. position: relative;
  855. .left-img {
  856. width: 100rpx;
  857. height: 100rpx;
  858. border-radius: 12rpx;
  859. }
  860. .status-box {
  861. position: absolute;
  862. bottom: 0;
  863. left: 0;
  864. width: 100%;
  865. padding: 4rpx 0;
  866. text-align: center;
  867. background: rgba(0, 0, 0, 0.5);
  868. font-size: 17rpx;
  869. border-radius: 0 0 12rpx 12rpx;
  870. }
  871. }
  872. .img-x {
  873. width: 24rpx;
  874. height: 24rpx;
  875. }
  876. .right-box-title {
  877. width: 438rpx;
  878. }
  879. .right-box-title-img {
  880. width: 32rpx;
  881. height: 32rpx;
  882. margin-left: auto;
  883. }
  884. .quan-list {
  885. .quan-list-1 {
  886. width: 32rpx;
  887. height: 34rpx;
  888. background: #FB3D03;
  889. border-radius: 5rpx 0rpx 0rpx 5rpx;
  890. text-align: center;
  891. line-height: 34rpx;
  892. }
  893. .quan-list-2 {
  894. box-sizing: border-box;
  895. height: 34rpx;
  896. line-height: 34rpx;
  897. padding: 0 4rpx;
  898. border-radius: 0 5rpx 5rpx 0;
  899. border: 1rpx solid #FB3D03;
  900. text-align: center;
  901. }
  902. }
  903. }
  904. }
  905. .index-search {
  906. position: sticky;
  907. left: 0;
  908. z-index: 10;
  909. padding: 0 24rpx 20rpx 24rpx;
  910. .index-search-box {
  911. width: 100%;
  912. height: 72rpx;
  913. padding: 0 6rpx 0 24rpx;
  914. border-radius: 200rpx;
  915. border: 2rpx solid #4FB3EF;
  916. .index-search-box-buttom {
  917. width: 120rpx;
  918. height: 60rpx;
  919. background: linear-gradient(90deg, #57CAFF 0%, #41ABF5 100%);
  920. border-radius: 200rpx;
  921. margin-left: auto;
  922. line-height: 60rpx;
  923. text-align: center;
  924. }
  925. }
  926. }
  927. }
  928. .item-hr {
  929. width: 0px;
  930. height: auto;
  931. border-right: 1rpx dashed #FB7850;
  932. }
  933. .item-hr-two {
  934. width: 0px;
  935. height: auto;
  936. border-right: 1rpx dashed #999;
  937. }
  938. .item-left {
  939. width: 171rpx;
  940. height: auto;
  941. padding: 20rpx 18rpx;
  942. box-sizing: border-box;
  943. position: relative;
  944. border-radius: 0 20rpx 20rpx 0;
  945. }
  946. .ball {
  947. width: 24rpx;
  948. height: 24rpx;
  949. border-radius: 50%;
  950. position: absolute;
  951. top: -12rpx;
  952. left: -12rpx;
  953. background: #fff;
  954. z-index: 2;
  955. }
  956. .ball-two {
  957. width: 24rpx;
  958. height: 24rpx;
  959. border-radius: 50%;
  960. position: absolute;
  961. background: #fff;
  962. z-index: 10;
  963. bottom: -12rpx;
  964. left: -12rpx;
  965. }
  966. .item-right {
  967. padding: 24rpx;
  968. box-sizing: border-box;
  969. border-radius: 20rpx 0 0 20rpx;
  970. position: relative;
  971. }
  972. .but-box {
  973. width: 136rpx;
  974. height: 48rpx;
  975. line-height: 48rpx;
  976. text-align: center;
  977. background: linear-gradient(225deg, #FB3D03 0%, #FF6901 100%);
  978. border-radius: 200rpx;
  979. }
  980. </style>