index.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005
  1. <template>
  2. <view>
  3. <view class="page-index" :class="{ bgf: navIndex > 0 }">
  4. <view class="header">
  5. <view class="serch-wrapper flex">
  6. <view class="logo">
  7. <image :src="logoUrl" mode=""></image>
  8. </view>
  9. <navigator
  10. url="/pages/goods_search/index"
  11. class="input"
  12. hover-class="none"
  13. ><text class="iconfont icon-xiazai5"></text> 搜索商品</navigator
  14. >
  15. </view>
  16. </view>
  17. <!-- 快捷入口 -->
  18. <div class="top-bg-box">
  19. <view class="nav-list">
  20. <navigator
  21. class="item"
  22. :url="item.url"
  23. v-for="item in navMenus"
  24. :key="item.type"
  25. >
  26. <uni-icons
  27. :size="item.size"
  28. customPrefix="iconfont"
  29. :type="item.icon"
  30. ></uni-icons>
  31. <view class="txt">{{ item.name }}</view>
  32. </navigator>
  33. </view>
  34. <UserGrowthPanel />
  35. </div>
  36. <!-- <up-sticky :offsetTop="stickyTop" customNavHeight="62px"> -->
  37. <view class="sticky-box">
  38. <view class="scroll-view_H">
  39. <view class="tab nav-bd" id="tab_list">
  40. <view
  41. id="tab_item"
  42. :class="{ active: listActive == index }"
  43. class="item"
  44. v-for="(item, index) in goodsNavs"
  45. :key="index"
  46. @click="ProductNavTab(item, index)"
  47. >
  48. <uni-icons
  49. customPrefix="iconfont"
  50. :color="listActive == index ? '#CD9933' : '#000'"
  51. :type="item.icon"
  52. :size="item.size"
  53. ></uni-icons>
  54. <!-- <i class="item-icon iconfont" :class="item.icon"></i> -->
  55. <view class="txt">{{ item.name }}</view>
  56. <!-- <view class="label">{{ item.info }}</view> -->
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. <!-- </up-sticky> -->
  62. <!-- 首发新品 -->
  63. <view class="index-product-wrapper" :class="iSshowH ? 'on' : ''">
  64. <view
  65. class="list-box animated"
  66. :class="goodsList.length > 0 ? 'fadeIn on' : ''"
  67. >
  68. <view
  69. class="item"
  70. v-for="(item, index) in goodsList"
  71. :key="index"
  72. @click="goDetail(item)"
  73. >
  74. <view class="pictrue">
  75. <image :src="item.image" mode=""></image>
  76. </view>
  77. <view class="text-info">
  78. <view class="title line2"
  79. ><text class="tip">现货</text>{{ item.storeName }}</view
  80. >
  81. <view class="bottom-row">
  82. <text class="price">工费: {{ item.price }}/克</text>
  83. <text class="sales"
  84. >已售{{
  85. Number(item.sales || 0) + Number(item.ficti || 0)
  86. }}件</text
  87. >
  88. <!-- <view class="txt">券</view> -->
  89. </view>
  90. </view>
  91. </view>
  92. </view>
  93. <view class="loadingicon acea-row row-center-wrapper" v-if="goodScroll">
  94. <text
  95. class="loading iconfont icon-jiazai"
  96. :hidden="loading == false"
  97. ></text>
  98. </view>
  99. <view class="no-data" v-if="isNoDataState">
  100. <img src="/static/images/noShopper.png" />
  101. </view>
  102. <view class="mores-txt flex" v-if="!goodScroll && !isNoDataState">
  103. <text>我是有底线的</text>
  104. </view>
  105. </view>
  106. <!-- </view> -->
  107. </view>
  108. <drag-button
  109. :isDock="true"
  110. :existTabBar="true"
  111. @btnClick="btnClick"
  112. />
  113. </view>
  114. </template>
  115. <script setup>
  116. // 测试拖拽
  117. import dragButton from "@/components/drag-button/drag-button.vue";
  118. import { onLoad, onShow } from "@dcloudio/uni-app";
  119. import { ref, onMounted, computed, getCurrentInstance } from "vue";
  120. import Auth from "@/libs/wechat";
  121. import Cache from "@/utils/cache";
  122. import { getIndexData, getCoupons, setCouponReceive } from "@/api/api.js";
  123. import { getShare, kefuConfig } from "@/api/public.js";
  124. import UserGrowthPanel from "@/components/UserGrowthPanel";
  125. import { getGroomList as getGroomListApi } from "@/api/store.js";
  126. import { goShopDetail } from "@/libs/order.js";
  127. import { silenceBindingSpread } from "@/utils";
  128. import { useAppStore } from "@/stores/app";
  129. const appStore = useAppStore();
  130. const app = getApp();
  131. const instance = getCurrentInstance();
  132. const navH = ref("");
  133. const marTop = ref(0);
  134. const searchH = ref(0);
  135. const loading = ref(false);
  136. // Authorization
  137. const isShowAuth = ref(false);
  138. const iShidden = ref(false);
  139. const window = ref(false);
  140. // Navigation and Tabs
  141. const navIndex = ref(0);
  142. const ProductNavindex = ref(0);
  143. const listActive = ref(0);
  144. const tabsScrollLeft = ref(0);
  145. const scrollLeft = ref(0);
  146. const lineStyle = ref({});
  147. const duration = ref(0.2);
  148. // Home Page Data
  149. const logoUrl = ref("");
  150. const site_name = ref("");
  151. const imgUrls = ref([]);
  152. const menus = ref([]);
  153. const roll = ref([]);
  154. const explosiveMoney = ref([]);
  155. const goodType = ref(1);
  156. const goodScroll = ref(true);
  157. const iSshowH = ref(false);
  158. const stickyTop = ref(0);
  159. const navMenus = ref([
  160. {
  161. name: "商城订单",
  162. icon: "icon-wodedingdan1",
  163. type: 1,
  164. url: "/pages/order_list/index",
  165. size: 25,
  166. },
  167. {
  168. name: "购物车",
  169. icon: "icon-gouwuche",
  170. type: 2,
  171. url: "/pages/order_addcart/order_addcart",
  172. size: 26,
  173. },
  174. {
  175. name: "卡卷包",
  176. icon: "icon-kabao",
  177. type: 3,
  178. url: "/pages/users/user_coupon/index",
  179. size: 28,
  180. },
  181. {
  182. name: "客服消息",
  183. icon: "icon-xiaoxi",
  184. type: 4,
  185. url: "/pages/users/customer_service_message/index",
  186. size: 26,
  187. },
  188. ]);
  189. // const primaryGoldColor =
  190. // Product Lists
  191. const sortProduct = ref([]);
  192. const goodsList = ref([]);
  193. const goodsNavs = ref([
  194. { name: "新品推荐", type: 1, icon: "icon-xinpintuijian", size: 25 },
  195. { name: "黄金金条", type: 2, icon: "icon-touzijintiao1", size: 25 },
  196. { name: "黄金首饰", type: 3, icon: "icon-huangjinshoushi", size: 25 },
  197. { name: "其他", type: 4, icon: "icon-a-ziyuan97", size: 22 },
  198. ]);
  199. // Pagination
  200. const params = ref({
  201. page: 1,
  202. limit: 10,
  203. });
  204. const hotScroll = ref(false);
  205. const headerHeight = ref(0);
  206. // Other
  207. const couponList = ref([]);
  208. const configApi = ref({});
  209. // pinia
  210. const isLogin = appStore.isLogin;
  211. const uid = appStore.uidComputed;
  212. const arrTemp = [
  213. "beforePay",
  214. "afterPay",
  215. "refundApply",
  216. "beforeRecharge",
  217. "createBargain",
  218. "pink",
  219. ];
  220. // Coupon Functions
  221. const getCoupon = async (id, index) => {
  222. try {
  223. await setCouponReceive(id);
  224. couponList.value[index].isUse = true;
  225. uni.showToast({ title: "领取成功" });
  226. } catch (err) {
  227. uni.showToast({ title: err.message, icon: "none" });
  228. }
  229. };
  230. // Tab Navigation Functions
  231. const clickSort = (index) => {
  232. listActive.value = index;
  233. };
  234. const scroll = (e) => {
  235. scrollLeft.value = e.detail.scrollLeft || 0;
  236. };
  237. // Home Page Data Functions
  238. const getIndexConfig = async () => {
  239. try {
  240. loading.value = true;
  241. const res = await getIndexData();
  242. uni.setNavigationBarTitle({ title: "首页" });
  243. logoUrl.value = res.data.logoUrl;
  244. site_name.value = "首页";
  245. imgUrls.value = res.data.banner;
  246. menus.value = res.data.menus;
  247. roll.value = res.data.roll || [];
  248. // #ifdef H5
  249. appStore.SET_CHATURL(res.data.yzfUrl);
  250. Cache.set("chatUrl", res.data.yzfUrl);
  251. // #endif
  252. const iconTypes = [
  253. "icon-shouye",
  254. "icon-shouye",
  255. "icon-shouye",
  256. "icon-shouye",
  257. ];
  258. explosiveMoney.value = res.data.explosiveMoney.map((v, i) => ({
  259. ...v,
  260. icon: iconTypes[i] || "icon-shouye",
  261. }));
  262. await getGroomList();
  263. await shareApi();
  264. await getcouponList();
  265. } catch (err) {
  266. console.error(err);
  267. } finally {
  268. loading.value = false;
  269. }
  270. };
  271. const btnClick = () => {
  272. // uni.navigateTo({ url: "/pages/index/mindex" });
  273. };
  274. const getcouponList = async () => {
  275. try {
  276. const res = await getCoupons({ page: 1, limit: 6 });
  277. couponList.value = res.data;
  278. // #ifdef MP
  279. uni.getSetting({
  280. success(res) {
  281. window.value =
  282. !res.authSetting["scope.userInfo"] && couponList.value.length
  283. ? true
  284. : false;
  285. iShidden.value = res.authSetting["scope.userInfo"];
  286. },
  287. });
  288. // #endif
  289. // #ifndef MP
  290. window.value = isLogin ? false : res.data.length ? true : false;
  291. // #endif
  292. } catch (err) {
  293. uni.showToast({ title: err.message, icon: "none" });
  294. }
  295. };
  296. const shareApi = async () => {
  297. try {
  298. const res = await getShare();
  299. configApi.value = res.data;
  300. // #ifdef H5
  301. setOpenShare(res.data);
  302. // #endif
  303. } catch (err) {
  304. console.error(err);
  305. }
  306. };
  307. const getChatUrL = async () => {
  308. try {
  309. const res = await kefuConfig();
  310. appStore.SET_CHATURL(res.data.yzfUrl);
  311. Cache.set("chatUrl", res.data.yzfUrl);
  312. } catch (err) {
  313. console.error(err);
  314. }
  315. };
  316. const setOpenShare = (data) => {
  317. if (Auth.isWeixin()) {
  318. const configAppMessage = {
  319. desc: data.synopsis,
  320. title: data.title,
  321. link: location.href,
  322. imgUrl: data.img,
  323. };
  324. Auth.wechatEvevt(
  325. ["updateAppMessageShareData", "updateTimelineShareData"],
  326. configAppMessage
  327. );
  328. }
  329. };
  330. // Authorization
  331. const authColse = (e) => {
  332. isShowAuth.value = e;
  333. };
  334. // Product Navigation
  335. const ProductNavTab = (item, index) => {
  336. listActive.value = index;
  337. goodType.value = item.type;
  338. ProductNavindex.value = index;
  339. goodsList.value = [];
  340. params.value.page = 1;
  341. goodScroll.value = true;
  342. getGroomList(true);
  343. };
  344. // Product Details
  345. const goDetail = async (item) => {
  346. if (item.activityH5 && item.activityH5.type === "2" && !isLogin) {
  347. toLogin();
  348. } else {
  349. await goShopDetail(item, uid);
  350. uni.navigateTo({ url: `/pages/goods_details/index?id=${item.id}` });
  351. }
  352. };
  353. const godDetail = async (item) => {
  354. await goShopDetail(item, uid);
  355. uni.navigateTo({ url: `/pages/goods_details/index?id=${item.id}` });
  356. };
  357. const isNoDataState = computed(() => {
  358. return goodsList.value.length === 0 && !loading.value;
  359. });
  360. // Product Lists
  361. const getGroomList = async (onloadH = false) => {
  362. if (!goodScroll.value) return;
  363. if (onloadH) iSshowH.value = true;
  364. try {
  365. loading.value = true;
  366. const { data } = await getGroomListApi(goodType.value, params.value);
  367. iSshowH.value = false;
  368. goodScroll.value =
  369. data.list.length > 0 && data.list.length >= params.value.limit;
  370. params.value.page++;
  371. goodsList.value = goodsList.value.concat(data.list);
  372. } catch (err) {
  373. console.error(err);
  374. } finally {
  375. loading.value = false;
  376. }
  377. };
  378. const get_host_product = async () => {
  379. if (hotScroll.value) return;
  380. try {
  381. loading.onMounted(() => {});
  382. } catch (err) {
  383. console.error(err);
  384. } finally {
  385. loading.value = false;
  386. }
  387. };
  388. onLoad((option) => {
  389. uni.getSystemInfo({
  390. success(res) {
  391. appStore.SYSTEM_PLATFORM(res.platform);
  392. },
  393. });
  394. // uni.getLocation({
  395. // type: "gcj02",
  396. // altitude: true,
  397. // geocode: true,
  398. // success: (res) => {
  399. // try {
  400. // uni.setStorageSync("user_latitude", res.latitude);
  401. // uni.setStorageSync("user_longitude", res.longitude);
  402. // } catch {}
  403. // },
  404. // });
  405. navH.value = app.globalData.navHeight;
  406. // #ifndef MP
  407. navH.value = 0;
  408. // #endif
  409. isLogin && silenceBindingSpread();
  410. getIndexConfig();
  411. });
  412. onShow(() => {
  413. uni.setNavigationBarTitle({ title: site_name.value });
  414. });
  415. onMounted(() => {
  416. // #ifdef H5
  417. const appSearchH = uni.createSelectorQuery().select(".serch-wrapper");
  418. appSearchH
  419. .boundingClientRect((data) => {
  420. searchH.value = data.height;
  421. })
  422. .exec();
  423. // #endif
  424. const query = uni.createSelectorQuery().in(instance.proxy);
  425. query.select(".header").boundingClientRect((data) => {
  426. headerHeight.value = Math.ceil(data.height);
  427. });
  428. query
  429. .select(".sticky-box")
  430. .boundingClientRect((data) => {
  431. // marTop.value = Util.pxToRpx(data.height);
  432. // stickyTop.value = data.height;
  433. // console.log({ data });
  434. marTop.value = data.height + 5;
  435. })
  436. .exec();
  437. });
  438. // #ifdef MP
  439. const onShareAppMessage = () => {
  440. return {
  441. title: configApi.value.title,
  442. imageUrl: configApi.value.img,
  443. desc: configApi.value.synopsis,
  444. path: "/pages/index/index",
  445. };
  446. };
  447. // #endif
  448. const onReachBottom = () => {
  449. if (navIndex.value === 0) {
  450. if (params.value.page !== 1) {
  451. getGroomList();
  452. }
  453. } else {
  454. if (sortProduct.value.length > 0) {
  455. // get_product_list();
  456. } else {
  457. get_host_product();
  458. }
  459. }
  460. };
  461. </script>
  462. <style>
  463. page {
  464. display: flex;
  465. flex-direction: column;
  466. height: 100%;
  467. /* #ifdef H5 */
  468. background-color: #fff;
  469. /* #endif */
  470. }
  471. </style>
  472. <style lang="scss" scoped>
  473. .couponIndex {
  474. width: auto;
  475. height: 238rpx;
  476. background-image: url("~@/static/images/yhjsy.png");
  477. background-size: 100% 100%;
  478. padding-left: 42rpx;
  479. margin-bottom: 30rpx;
  480. .titBox {
  481. padding: 47rpx 0;
  482. text-align: center;
  483. height: 100%;
  484. .tit1 {
  485. color: #ffebd2;
  486. font-size: 34rpx;
  487. font-weight: 600;
  488. }
  489. .tit2 {
  490. color: #ffebd2;
  491. font-size: 22rpx;
  492. margin: 10rpx 0 26rpx 0;
  493. }
  494. .tit3 {
  495. color: #ffdaaf;
  496. font-size: 24rpx;
  497. .iconfont {
  498. font-size: 20rpx;
  499. }
  500. }
  501. }
  502. .listBox {
  503. padding: 14rpx 0;
  504. .listActive {
  505. background-image: url("~@/static/images/lingyhj.png");
  506. background-size: 100% 100%;
  507. }
  508. .listHui {
  509. background-image: url("~@/static/images/weiling.png");
  510. background-size: 100% 100%;
  511. }
  512. .list {
  513. width: 170rpx;
  514. height: 210rpx;
  515. padding: 16rpx 0;
  516. text-align: center;
  517. margin-left: 24rpx;
  518. .tit {
  519. font-size: 18rpx;
  520. padding: 0 26rpx;
  521. }
  522. .titActive {
  523. color: #c99959;
  524. }
  525. .price {
  526. font-size: 46rpx;
  527. font-weight: 900;
  528. margin-top: 4rpx;
  529. }
  530. .pricehui {
  531. color: #b2b2b2;
  532. }
  533. .fonthui {
  534. background-color: #f5f5f5 !important;
  535. }
  536. .yuan {
  537. font-size: 24rpx;
  538. }
  539. .ling {
  540. font-size: 24rpx;
  541. margin-top: 9.5rpx;
  542. width: 102rpx;
  543. height: 36rpx;
  544. line-height: 36rpx;
  545. background-color: #ffe5c7;
  546. border-radius: 28rpx;
  547. margin: auto;
  548. }
  549. .priceM {
  550. color: #ffdaaf;
  551. font-size: 22rpx;
  552. margin-top: 14rpx;
  553. }
  554. }
  555. }
  556. }
  557. .sticky-box {
  558. margin: 0 40rpx;
  559. display: flex;
  560. // position: -webkit-sticky;
  561. // position: sticky;
  562. z-index: 99;
  563. flex-direction: row;
  564. // margin: 0px;
  565. // background: #fff;
  566. padding: 30rpx 0;
  567. .active {
  568. color: #cd9933;
  569. }
  570. .nav-bd {
  571. display: flex;
  572. align-items: center;
  573. justify-content: space-between;
  574. .item {
  575. display: flex;
  576. flex-direction: column;
  577. align-items: center;
  578. justify-content: center;
  579. .txt {
  580. font-size: 28rpx;
  581. color: #282828;
  582. }
  583. .label {
  584. display: flex;
  585. align-items: center;
  586. justify-content: center;
  587. width: 124rpx;
  588. height: 32rpx;
  589. margin-top: 5rpx;
  590. font-size: 24rpx;
  591. color: #999;
  592. }
  593. &.active {
  594. color: $theme-color;
  595. .txt {
  596. color: $theme-color;
  597. }
  598. .label {
  599. background: linear-gradient(90deg, $bg-star 0%, $bg-end 100%);
  600. border-radius: 16rpx;
  601. color: #fff;
  602. }
  603. }
  604. }
  605. }
  606. }
  607. .listAll {
  608. width: 20%;
  609. text-indent: 62rpx;
  610. font-size: 30rpx;
  611. border-left: 1px #eee solid;
  612. margin: 1% 0;
  613. padding: 5rpx;
  614. position: relative;
  615. image {
  616. position: absolute;
  617. left: 20rpx;
  618. top: 8rpx;
  619. }
  620. }
  621. .tab {
  622. position: relative;
  623. display: flex;
  624. font-size: 28rpx;
  625. white-space: nowrap;
  626. &__item {
  627. flex: 1;
  628. padding: 0 20rpx;
  629. text-align: center;
  630. height: 60rpx;
  631. line-height: 60rpx;
  632. color: #666;
  633. &.active {
  634. color: #09c2c9;
  635. }
  636. }
  637. }
  638. .tab__line {
  639. display: block;
  640. height: 6rpx;
  641. position: absolute;
  642. bottom: 0;
  643. left: 0;
  644. z-index: 1;
  645. border-radius: 3rpx;
  646. position: relative;
  647. background: #2fc6cd;
  648. }
  649. .scroll-view_H {
  650. /* 文本不会换行,文本会在在同一行上继续,直到遇到 <br> 标签为止。 */
  651. white-space: nowrap;
  652. width: 100%;
  653. }
  654. .privacy-wrapper {
  655. z-index: 999;
  656. position: fixed;
  657. left: 0;
  658. top: 0;
  659. width: 100%;
  660. height: 100%;
  661. background: #7f7f7f;
  662. .privacy-box {
  663. position: absolute;
  664. left: 50%;
  665. top: 50%;
  666. transform: translate(-50%, -50%);
  667. width: 560rpx;
  668. padding: 50rpx 45rpx 0;
  669. background: #fff;
  670. border-radius: 20rpx;
  671. .title {
  672. text-align: center;
  673. font-size: 32rpx;
  674. text-align: center;
  675. color: #333;
  676. font-weight: 700;
  677. }
  678. .content {
  679. margin-top: 20rpx;
  680. line-height: 1.5;
  681. font-size: 26rpx;
  682. color: #666;
  683. text-indent: 54rpx;
  684. i {
  685. font-style: normal;
  686. color: $theme-color;
  687. }
  688. }
  689. .btn-box {
  690. margin-top: 40rpx;
  691. text-align: center;
  692. font-size: 30rpx;
  693. .btn-item {
  694. height: 82rpx;
  695. line-height: 82rpx;
  696. background: linear-gradient(90deg, #f67a38 0%, #f11b09 100%);
  697. color: #fff;
  698. border-radius: 41rpx;
  699. }
  700. .btn {
  701. padding: 30rpx 0;
  702. }
  703. }
  704. }
  705. }
  706. .page-index {
  707. // display: flex;
  708. // flex-direction: column;
  709. // min-height: 100vh;
  710. position: relative;
  711. z-index: 1;
  712. // background: linear-gradient(180deg, #fff 0%, #f5f5f5 100%);
  713. // background-color: transparent;
  714. }
  715. .header {
  716. position: sticky;
  717. top: 0;
  718. z-index: 200000;
  719. width: 100%;
  720. background-color: $header-color;
  721. padding: 28rpx 30rpx;
  722. .serch-wrapper {
  723. margin-top: var(--status-bar-height);
  724. align-items: center;
  725. /* #ifdef MP-WEIXIN */
  726. width: 75%;
  727. /* #endif */
  728. .logo {
  729. width: 118rpx;
  730. height: 42rpx;
  731. margin-right: 24rpx;
  732. }
  733. image {
  734. width: 118rpx;
  735. height: 42rpx;
  736. }
  737. .input {
  738. display: flex;
  739. align-items: center;
  740. width: 546rpx;
  741. height: 58rpx;
  742. padding: 0 0 0 30rpx;
  743. background: rgba(247, 247, 247, 1);
  744. border: 1px solid rgba(241, 241, 241, 1);
  745. border-radius: 29rpx;
  746. color: #bbbbbb;
  747. font-size: 26rpx;
  748. .iconfont {
  749. margin-right: 20rpx;
  750. font-size: 26rpx;
  751. color: #666666;
  752. }
  753. }
  754. }
  755. .tabNav {
  756. padding-top: 24rpx;
  757. }
  758. }
  759. .page_content {
  760. padding: 0 30rpx;
  761. }
  762. .index-product-wrapper {
  763. padding: 0 30rpx;
  764. margin-bottom: 110rpx;
  765. &.on {
  766. min-height: 1500rpx;
  767. }
  768. .list-box {
  769. display: flex;
  770. flex-wrap: wrap;
  771. justify-content: space-between;
  772. .item {
  773. width: 335rpx;
  774. margin-bottom: 20rpx;
  775. background-color: #fff;
  776. border-radius: 10rpx;
  777. overflow: hidden;
  778. display: flex;
  779. flex-direction: column;
  780. justify-content: space-between;
  781. .pictrue {
  782. position: relative;
  783. image {
  784. width: 100%;
  785. height: 330rpx;
  786. }
  787. }
  788. .text-info {
  789. padding: 10rpx 20rpx 15rpx;
  790. .title {
  791. color: #222222;
  792. .tip {
  793. font-size: 22rpx;
  794. padding: 0 2px;
  795. margin-right: 4rpx;
  796. border: 1px solid #b4b4b4;
  797. background-color: $theme-color;
  798. border-radius: 4rpx;
  799. color: #fff;
  800. position: relative;
  801. bottom: 4rpx;
  802. }
  803. }
  804. .bottom-row {
  805. color: $theme-color;
  806. display: flex;
  807. justify-content: space-between;
  808. align-items: center;
  809. font-size: 28rpx;
  810. margin: 10rpx 0 0;
  811. .price {
  812. padding-bottom: 4rpx;
  813. font-weight: 800;
  814. white-space: nowrap;
  815. }
  816. .sales {
  817. color: #b4b4b4;
  818. font-size: 22rpx;
  819. white-space: nowrap;
  820. }
  821. }
  822. }
  823. }
  824. &.on {
  825. display: flex;
  826. }
  827. }
  828. }
  829. .top-bg-box {
  830. overflow: hidden;
  831. background-image: linear-gradient(
  832. to bottom,
  833. $header-color 0%,
  834. $header-color 10%,
  835. #f0dab2 50%,
  836. transparent 100%
  837. );
  838. }
  839. .nav-list {
  840. width: 100%;
  841. display: flex;
  842. justify-content: space-between;
  843. align-items: center;
  844. padding: 0 40rpx 0;
  845. margin: 25rpx 0;
  846. .item {
  847. text-align: center;
  848. }
  849. }
  850. .no-data {
  851. margin: 150rpx auto 0;
  852. text-align: center;
  853. img {
  854. width: 65%;
  855. height: auto;
  856. }
  857. }
  858. .mores-txt {
  859. width: 100%;
  860. align-items: center;
  861. justify-content: center;
  862. height: 70rpx;
  863. color: #999;
  864. font-size: 24rpx;
  865. .iconfont {
  866. margin-top: 2rpx;
  867. font-size: 20rpx;
  868. }
  869. }
  870. .menu-txt {
  871. font-size: 24rpx;
  872. color: #454545;
  873. }
  874. .stats {
  875. position: absolute;
  876. left: 0px;
  877. top: 0px;
  878. z-index: 2000000;
  879. width: 750rpx;
  880. height: var(--status-bar-height);
  881. background: #ffffff;
  882. }
  883. </style>