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. <image class="wh32" src="@/static/img/index/ss.png" mode=""></image>
  23. <view class="fs-28 fc-9 ml-10">搜索店铺名称或者商品名称</view>
  24. <view class="fs-28 fc-f index-search-box-buttom">搜索</view>
  25. </view>
  26. </view>
  27. <view class="index-box-1 ">
  28. <!-- 轮播 -->
  29. <view class="box-border-box plr-24 mb-32">
  30. <uni-swiper-dot :info="bannerList" mode="dot" :dotsStyles="dotStyle" :current="current">
  31. <swiper class="swiper" @change="change">
  32. <swiper-item v-for="(item,i) in bannerList" :key="i">
  33. <image class="swiper-item" :src="item.image" mode="aspectFill" @click="bannerClock(item)">
  34. </image>
  35. </swiper-item>
  36. </swiper>
  37. </uni-swiper-dot>
  38. </view>
  39. <!-- 导航 -->
  40. <view class="box-border-box plr-24">
  41. <view class="nav-list flex-wrap-wrap box-border-box mb-22">
  42. <view class="nav-list-item" v-for="(item,i) in navList" :key="i" @click="toUrl(item.type)" v-show="item.appletAudit == 0">
  43. <view class="">
  44. <image :src="item.img" mode="scaleToFill"></image>
  45. <view class="fs-26 fc-3 text-align-center">{{item.name}}</view>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. <!-- 通知 -->
  51. <view class="box-border-box plr-24">
  52. <view class="msg-box align-items-center box-border-box">
  53. <image class="image-1" src="@/static/img/index/index-tz.png" mode="scaleToFill"></image>
  54. <view class="box-1 fs-20 fc-41ABF5">公告</view>
  55. <swiper class="tz-swiper" :vertical="true" circular :autoplay="true" :interval="3000"
  56. :duration="500">
  57. <swiper-item v-for="(item,i) in noticeList" :key="i" @click="toNoticeDet(item)">
  58. <view class="tz-swiper-item">{{item.title}}</view>
  59. </swiper-item>
  60. </swiper>
  61. <!-- <image class="image-2" src="@/static/img/toRight.png" mode="scaleToFill"></image> -->
  62. </view>
  63. </view>
  64. <!-- 限时秒杀 -->
  65. <view class="spike-box box-border-box" v-if="seckillGoodsList.length > 0">
  66. <view class="xsms-box mb-32">
  67. <image class="image-title" src="@/static/img/index/index-xsms.png" mode="scaleToFill"></image>
  68. <view class="xsms-box-list-f box-border-box plr-12">
  69. <scroll-view class="xsms-box-list display-flex" scroll-x="true">
  70. <view class="xsms-box-list-item box-border-box p-8" v-for="(item,i) in seckillGoodsList"
  71. :key="i" @click="toShop(item)">
  72. <image class="xsms-box-list-item-img-1 mb-4" :src="item.goods_image" mode="aspectFill">
  73. </image>
  74. <view class="text-overflow-ellipsis-one fs-26 mb-32">{{item.goods_name}}</view>
  75. <view class="mb-4">
  76. <span class="fs-20 fw-b fc-FB3D03">¥</span><span
  77. class="fs-32 fw-b fc-FB3D03">{{item.seckill_money}}</span>
  78. </view>
  79. <!-- <view class="fs-20 fc-9 text-line-through">¥{{item.line_price}}</view> -->
  80. <image class="xsms-box-list-item-img-2" src="@/static/img/index/index-q.png"
  81. mode="scaleToFill"></image>
  82. </view>
  83. </scroll-view>
  84. </view>
  85. </view>
  86. </view>
  87. <!-- 类型选择 -->
  88. <view class="type-list-box display-flex bgc-F5F4F9" :style="{'top': (BarH+indexSearchHeight) + 'px'}">
  89. <view class="type-item-box view-nowrap" :class="category_id==item.id?'s-type':'n-type'"
  90. v-for="(item,i) in typeList" :key="i" @click="selectType(item.id)">{{item.name}}</view>
  91. </view>
  92. <!-- 商品列表 -->
  93. <view class="" v-if="goodsList.length<=0">
  94. <enBlankVue></enBlankVue>
  95. </view>
  96. <view class="box-border-box plr-24" v-else>
  97. <view class="goos-list-box box-border-box p-24 display-flex" v-for="(item,i) in goodsList" :key="i"
  98. @click="toShop(item)">
  99. <view class="left-img-box">
  100. <image class="left-img" :src="item.shop_logo" mode="aspectFill"></image>
  101. <view class="status-box fc-f" v-if="item.status != 1">
  102. 休息中
  103. </view>
  104. </view>
  105. <view class="flex-1">
  106. <view class="align-items-center mb-8">
  107. <view class="right-box-title fs-32 fw-600 text-overflow-ellipsis-one">{{item.shop_name}}
  108. </view>
  109. <image class="right-box-title-img" src="@/static/img/toRight.png" mode=""></image>
  110. </view>
  111. <view class="align-items-center mb-12">
  112. <image class="img-x mr-12" src="@/static/img/index/index-x.png" mode=""></image>
  113. <view class="fs-26 fw-600 fc-FF7F00 mr-12">{{item.shop_score}}分</view>
  114. <view class="fc-6 fs-24 mr-12">| 预计{{item.delivery_time}}分钟 |</view>
  115. <view class="fc-6 fs-24 mr-12">{{item.shop_sales}}人购买</view>
  116. </view>
  117. <view class="align-items-center flex-wrap-wrap">
  118. <view class="quan-list align-items-center mr-12 mb-16" v-for="(info1,index1) in item.coupon"
  119. :key="index1">
  120. <view class="quan-list-1 fs-24 fc-f">券</view>
  121. <view class="quan-list-2 fs-24 fc-FB3D03">{{info1.money}}元</view>
  122. </view>
  123. </view>
  124. <view class="goods-items-list display-flex">
  125. <view class="goods-items-list-box" v-for="(info2,index2) in item.goods" :key="index2">
  126. <image class="mb-12" :src="info2.goods_image" mode="aspectFill"></image>
  127. <view class="mb-8 fw-600 text-overflow-ellipsis-one fs-26">{{info2.goods_name}}</view>
  128. <view class="">
  129. <span class="fs-24 fc-FB3D03">¥</span>
  130. <span class="fs-32 fc-FB3D03 fw-b">{{info2.price}}</span>
  131. </view>
  132. </view>
  133. </view>
  134. </view>
  135. </view>
  136. </view>
  137. </view>
  138. <uni-popup ref="popup" type="center" border-radius="10px 10px 10px 10px" :is-mask-click="false">
  139. <view class="roll-pop">
  140. <!-- <image class="lq-bg" src="@/static/img/index/lq-bg.png" mode=""></image> -->
  141. <image class="tc-top" src="@/static/img/index/tc-top.png" mode=""></image>
  142. <view class="coupon-box">
  143. <image class="tc-content" src="@/static/img/index/tc-content.png" mode=""></image>
  144. <view class="item-box display-flex" v-for="(item,index) in couponData" :key="index">
  145. <view class="item-right flex-direction flex-justify-center flex-1 bgc-FCE7E2">
  146. <view class="fs-28 mb-12 ticket-name text-overflow-ellipsis fc-3 fw-600">
  147. {{item.name}}
  148. </view>
  149. <view class="fs-22 fc-6 mb-12">
  150. 有效时间:{{item.time_type_str}}
  151. </view>
  152. <view class="fs-22 fc-6">
  153. 券类型:{{item.scene == 1?'外卖卷':'代取卷'}}
  154. </view>
  155. </view>
  156. <view class="item-hr"></view>
  157. <view class="item-left flex-direction align-items-center flex-justify-center bgc-FCE7E2">
  158. <view class="align-items-center">
  159. <view class="fs-24 fw-600 fc-FB3D03">¥</view>
  160. <view class="fs-48 fw-600 fc-FB3D03">{{item.money}}</view>
  161. </view>
  162. <view class="fs-22 fc-6 mb-4">
  163. 需满{{item.full_money}}元
  164. </view>
  165. <view class="but-box fs-26 fc-f" @click="receive(item,index)">立即领取</view>
  166. <view class="ball"></view>
  167. <view class="ball-two"></view>
  168. </view>
  169. </view>
  170. </view>
  171. <image class="tc-bot" src="@/static/img/index/tc-bot.png" mode=""></image>
  172. <uni-icons @click="gbPOp" class="pop-gb" color='#fff' type="close" size="30"></uni-icons>
  173. </view>
  174. </uni-popup>
  175. </view>
  176. </template>
  177. <script>
  178. import enBlankVue from "@/components/en-utils/en-blank/en-blank.vue";
  179. import tools from "@/service/tools";
  180. import {
  181. getNotice,
  182. getBanner,
  183. commonApplet
  184. } from '@/api/common.js';
  185. import {
  186. getSeckillGoods
  187. } from '@/api/seckill.js'
  188. import {
  189. getTakeaway
  190. } from '@/api/category.js';
  191. import {
  192. getGoodsList
  193. } from '@/api/goods.js';
  194. import {
  195. couponHome,
  196. receiveCoupon
  197. } from '@/api/coupon.js'
  198. import {
  199. shopInfo
  200. } from "@/api/shop.js"
  201. export default {
  202. components: {
  203. enBlankVue
  204. },
  205. data() {
  206. return {
  207. BarH: 0,
  208. bgckgroundBox: 'transparent',
  209. bgckgroundSearch: '',
  210. bgckgroundType: '',
  211. navList: [{
  212. name: "外卖",
  213. img: require('@/static/img/index/index-wm.png'),
  214. type: 2
  215. },
  216. {
  217. name: "代取",
  218. img: require('@/static/img/index/index-dq.png'),
  219. type: 3
  220. },
  221. {
  222. name: "校友圈",
  223. img: require('@/static/img/index/index-xyq.png'),
  224. type: 7
  225. },
  226. {
  227. name: "团购",
  228. img: require('@/static/img/index/index-tg.png'),
  229. type: 5
  230. },
  231. {
  232. name: "票务",
  233. img: require('@/static/img/index/index-pw.png'),
  234. type: 4
  235. },
  236. {
  237. name: "干洗",
  238. img: require('@/static/img/index/index-gx.png'),
  239. type: 6
  240. },
  241. {
  242. name: "租凭",
  243. img: require('@/static/img/index/index-zp.png'),
  244. type: 9
  245. },
  246. {
  247. name: "二手市场",
  248. img: require('@/static/img/index/index-esss.png'),
  249. type: 10
  250. },
  251. {
  252. name: "回收",
  253. img: require('@/static/img/index/index-hs.png'),
  254. type: 11
  255. },
  256. {
  257. name: "实习岗位",
  258. img: require('@/static/img/index/index-sxgw.png'),
  259. type: 8
  260. },
  261. ],
  262. schoolData: {
  263. school_name: '',
  264. },
  265. noticeList: [],
  266. bannerList: [],
  267. seckillGoodsList: [],
  268. typeList: [], //分类数组
  269. category_id: 0, //分类id
  270. goodsList: [],
  271. total: 0,
  272. page: 1,
  273. couponData: [],
  274. indexSearchHeight: '',
  275. dotStyle: {
  276. width: 6,
  277. bottom: 6,
  278. backgroundColor: 'rgba(51, 51, 51,0.3)',
  279. border: '1px rgba(51, 51, 51,0.3) solid',
  280. color: '#fff',
  281. selectedBackgroundColor: 'rgba(79, 179, 239,0.9)',
  282. selectedBorder: '1px rgba(0,0,0,0) solid'
  283. },
  284. current: 0
  285. }
  286. },
  287. onShow() {
  288. // let lon = uni.getStorageSync('lon');
  289. // let lat = uni.getStorageSync('lat');
  290. // if (!lon || !lat) {
  291. // uni.getLocation({
  292. // type: "gcj02",
  293. // success: (res) => {
  294. // if (res.errMsg === 'getLocation:ok') {
  295. // uni.setStorageSync('lon', res.longitude);
  296. // uni.setStorageSync('lat', res.latitude);
  297. // } else {
  298. // tools.error('位置授权失败,请检查是否开始授权')
  299. // }
  300. // },
  301. // fail: (res) => {
  302. // tools.error('位置授权失败,请检查是否开始授权')
  303. // },
  304. // })
  305. // }
  306. let school_id = uni.getStorageSync('school_id');
  307. let operate_id = uni.getStorageSync('operate_id');
  308. let school_name = uni.getStorageSync('school_name');
  309. if (!school_id || !operate_id) {
  310. setTimeout(() => {
  311. uni.reLaunch({
  312. url: '/pages-address/select-school?type=1'
  313. })
  314. }, 1000)
  315. } else {
  316. this.schoolData.school_name = school_name;
  317. }
  318. this.commonApplet()
  319. this.getBanner();
  320. this.getNotice();
  321. this.getSeckillGoods();
  322. this.getTakeaway();
  323. let userToken = uni.getStorageSync('token')
  324. if (userToken) {
  325. this.couponHome()
  326. }
  327. uni.removeStorageSync('orderInfoType')
  328. },
  329. onLoad() {
  330. this.page = 1;
  331. this.goodsList = [];
  332. this.getGoodsList();
  333. },
  334. mounted() {
  335. this.getHeight()
  336. },
  337. onPageScroll(e) {
  338. if (e.scrollTop > 1) {
  339. this.bgckgroundBox = '#fff';
  340. this.bgckgroundSearch = '#fff';
  341. if (e.scrollTop > 500) {
  342. this.bgckgroundType = '#fff';
  343. } else {
  344. this.bgckgroundType = '';
  345. }
  346. } else {
  347. this.bgckgroundBox = 'transparent';
  348. this.bgckgroundSearch = '';
  349. this.bgckgroundType = '';
  350. }
  351. },
  352. onReachBottom() {
  353. if (this.goodsList.length < this.total) {
  354. this.page += 1;
  355. this.getGoodsList();
  356. }
  357. },
  358. created() {
  359. uni.getSystemInfo({
  360. success: (e) => {
  361. let statusBarH = e.statusBarHeight + 10
  362. let custom = 0;
  363. custom = wx.getMenuButtonBoundingClientRect()
  364. let customBarH = custom.height;
  365. this.BarH = statusBarH + customBarH;
  366. }
  367. })
  368. },
  369. methods: {
  370. commonApplet() {
  371. commonApplet().then((res) => {
  372. if (res.code == 1) {
  373. this.navList.forEach((v, k) => {
  374. v.appletAudit = 0
  375. if (v.type == 8 || v.type == 9 || v.type == 10 || v.type == 11) {
  376. v.appletAudit = res.data
  377. }
  378. })
  379. }
  380. })
  381. },
  382. getHeight() {
  383. // 创建选择器对象
  384. const query = uni.createSelectorQuery().in(this);
  385. // 选择我们想要的元素
  386. query.select('.index-search').boundingClientRect(data => {
  387. // data是选中元素的大小及位置信息
  388. if (data) {
  389. // 元素的高度
  390. this.indexSearchHeight = data.height;
  391. console.log('元素的高度:', this.indexSearchHeight);
  392. }
  393. }).exec(); // 执行选择器查询
  394. },
  395. change(e) {
  396. this.current = e.detail.current
  397. },
  398. bannerClock(item) {
  399. if (item.type == 1) {
  400. // 外卖首页
  401. uni.navigateTo({
  402. url: '/pages-takeout/takeout'
  403. })
  404. } else if (item.type == 2) {
  405. if (item.to_id != 0) {
  406. // 外卖商家
  407. uni.navigateTo({
  408. url: '/pages-takeout/shop?shop_id=' + item.to_id
  409. })
  410. } else {
  411. // 外卖首页
  412. uni.navigateTo({
  413. url: '/pages-takeout/takeout'
  414. })
  415. }
  416. } else if (item.type == 3) {
  417. // 代取页
  418. uni.navigateTo({
  419. url: '/pages-takeout/replace-take'
  420. })
  421. } else if (item.type === 4) {
  422. // 团购页
  423. uni.navigateTo({
  424. url: '/pages-buy/group'
  425. })
  426. } else if (item.type === 5) {
  427. // 票务页
  428. uni.navigateTo({
  429. url: '/pages-buy/ticket'
  430. })
  431. } else if (item.type === 6) {
  432. // 干洗页
  433. uni.navigateTo({
  434. url: '/pages-buy/dry-clean'
  435. })
  436. } else if (item.type === 7) {
  437. // 校友圈
  438. uni.navigateTo({
  439. url: '/pages-school/school-circle'
  440. })
  441. } else if (item.type === 8) {
  442. // 骑手申请页
  443. uni.navigateTo({
  444. url: '/pages-my/rider-recruit'
  445. })
  446. }
  447. },
  448. receive(item, index) {
  449. receiveCoupon({
  450. grant_id: item.grant_id,
  451. coupon_id: item.coupon_id
  452. }).then((res) => {
  453. if (res.code == 1) {
  454. tools.success(res.msg)
  455. this.couponData.splice(index, 1)
  456. if (this.couponData.length <= 0) {
  457. this.gbPOp()
  458. }
  459. } else {
  460. tools.error(res.msg)
  461. this.couponData.splice(index, 1)
  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. width: 20%;
  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>