index.vue 24 KB

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