home.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869
  1. <template>
  2. <view class="index" :style="{ backgroundImage: `url(${bgImage.image1})` }">
  3. <view class="top-box" :class="showTopSearch ? '' : 'hide'">
  4. <view :style="[{ height: `${statusBarHeight}px` }]"></view>
  5. <view class="title" :style="[{ height: `${menuButtonHeight}px` }]">
  6. <text class="titlt-txt">商城</text>
  7. </view>
  8. <view class="input-box">
  9. <view
  10. class="status-bar"
  11. :style="[{ height: `${statusBarHeight}px` }]"
  12. @click="searchClick"
  13. ></view>
  14. <view class="input-placeholder" @click="searchClick"
  15. >请输入检索关键字</view
  16. >
  17. <text class="iconfont2 msgCenter" @click="goToMsg()">
  18. <!-- &#xe67c; -->
  19. <uv-icon name="chat" color="#ffffff" size="28"></uv-icon>
  20. <text v-if="msgCenter == 0 ? false : msgCenter">{{ msgCenter }}</text>
  21. </text>
  22. </view>
  23. </view>
  24. <view class="u-skeleton">
  25. <view
  26. class="swiper u-skeleton-rect"
  27. :class="showTopSearch ? '' : 'mt120'"
  28. v-if="(shopBanner && shopBanner.length > 0) || skeletonShow"
  29. >
  30. <view class="uni-margin-wrap">
  31. <swiper
  32. class="swiper"
  33. :indicator-dots="true"
  34. :autoplay="true"
  35. :interval="2000"
  36. :duration="1000"
  37. circular="false"
  38. >
  39. <swiper-item
  40. v-for="item in skeletonShow ? 1 : shopBanner"
  41. :key="item.id"
  42. >
  43. <view class="swiper-item" @click="$mUtil.imgLink(item)">
  44. <image
  45. class="bannersize"
  46. :src="`${item.image}`"
  47. mode="aspectFill"
  48. ></image>
  49. </view>
  50. </swiper-item>
  51. </swiper>
  52. </view>
  53. </view>
  54. <!-- 首页一级分类 -->
  55. <div class="one-cate">
  56. <!-- cateList.slice(0,4) -->
  57. <div
  58. class="item"
  59. v-for="item in skeletonShow ? 4 : cateList"
  60. @click="jumpHxCate(item, 0)"
  61. :key="item.id"
  62. >
  63. <!-- ?x-oss-process=style/w_350 -->
  64. <image
  65. class="u-skeleton-fillet"
  66. mode="widthFix "
  67. :src="`${item.icon}`"
  68. >
  69. </image>
  70. <div class="word u-skeleton-fillet u-font26">
  71. {{ item.name || "加载中" }}
  72. </div>
  73. </div>
  74. </div>
  75. <view
  76. v-if="(homeBanner1 && homeBanner1.image) || skeletonShow"
  77. class="banner1Cls"
  78. @click="$mUtil.imgLink(homeBanner1)"
  79. >
  80. <!-- ?x-oss-process=style/w_350 -->
  81. <image
  82. class="font u-skeleton-fillet"
  83. :src="`${homeBanner1.image}`"
  84. mode=""
  85. ></image>
  86. </view>
  87. <!-- 惠选专区 hxCateList-->
  88. <ChoiceZone
  89. :hxCateList="hxCateList"
  90. :skeletonShow="skeletonShow"
  91. @jumpHxCate="jumpHxCate"
  92. />
  93. <!-- 限时秒杀 -->
  94. <Seckill
  95. :skeletonShow="skeletonShow"
  96. :itemsDis2="itemsDis2"
  97. :activeBannerIndex2="activeBannerIndex2"
  98. @goDetail="goDetail"
  99. @imgActiveFun2="imgActiveFun2"
  100. @goProductDetails="goProductDetails"
  101. />
  102. <!-- 拼团购 -->
  103. <GroupBuy
  104. :groupList="groupList"
  105. :skeletonShow="skeletonShow"
  106. :bgImage="bgImage.image2"
  107. @goDetail="goDetail"
  108. @goProductDetails="goProductDetails"
  109. />
  110. <!-- 热门推荐 -->
  111. <HotRecommend
  112. :recommendList="recommendList"
  113. :skeletonShow="skeletonShow"
  114. :bgImage="bgImage.image3"
  115. @goDetail="goDetail"
  116. @goProductDetails="goProductDetails"
  117. />
  118. <!-- 本月热销 -->
  119. <MonthlyBestSeller
  120. :hotList="hotList"
  121. :skeletonShow="skeletonShow"
  122. :bgImage="bgImage.image4"
  123. :itemsDis="itemsDis"
  124. :lineList="lineList"
  125. :activeBannerIndex="activeBannerIndex"
  126. @goDetail="goDetail"
  127. @goProductDetails="goProductDetails"
  128. @imgActiveFun="imgActiveFun"
  129. />
  130. <!-- 猜你喜欢 -->
  131. <GuessYouLike
  132. :goodsList="goodsList"
  133. :skeletonShow="skeletonShow"
  134. :bgImage="bgImage.image5"
  135. :status="status"
  136. @goDetail="goDetail"
  137. @goProductDetails="goProductDetails"
  138. />
  139. <view class="cart-entrance" @click="toCartPage()">
  140. <!-- <image :src="imgUrl + '/static/czd/car.png'" alt=""></image> -->
  141. <uv-icon name="shopping-cart" color="#000" size="32"></uv-icon>
  142. </view>
  143. <uv-skeleton
  144. :loading="skeletonShow"
  145. :animation="true"
  146. bgColor="#FFF"
  147. ></uv-skeleton>
  148. </view>
  149. </view>
  150. </template>
  151. <script setup>
  152. import { ref, reactive, onMounted, getCurrentInstance } from "vue";
  153. import {
  154. onLoad,
  155. onShow,
  156. onPullDownRefresh,
  157. onReachBottom,
  158. onPageScroll,
  159. onShareAppMessage,
  160. } from "@dcloudio/uni-app";
  161. import { getAdList_Api, getQuickLinkList_Api } from "@/api/index.js";
  162. import { shopProductList_Api } from "@/api/shop.js";
  163. import { messageUnreadNum_Api } from "@/api/userInfo.js";
  164. import ChoiceZone from "./components/ChoiceZone.vue";
  165. import Seckill from "./components/Seckill.vue";
  166. import GroupBuy from "./components/GroupBuy.vue";
  167. import HotRecommend from "./components/HotRecommend.vue";
  168. import MonthlyBestSeller from "./components/MonthlyBestSeller.vue";
  169. import GuessYouLike from "./components/GuessYouLike.vue";
  170. import utils from "@/util/index.js";
  171. // 响应式数据
  172. const statusBarHeight = ref(uni.getSystemInfoSync().statusBarHeight);
  173. const menuButtonHeight = ref(0);
  174. try {
  175. menuButtonHeight.value = uni.getSystemInfoSync().menuButtonHeight + 10;
  176. } catch (error) {
  177. console.log(error);
  178. }
  179. const showTopSearch = ref(true);
  180. const keyWord = ref("");
  181. const groupList = ref([]); //团购
  182. const hotList = ref([]); //本月热销
  183. const recommendList = ref([]); //推荐
  184. const shopBanner = ref([]); //轮播图
  185. const goodsList = ref([]); //猜你喜欢
  186. const itemsDis = ref(1);
  187. const activeBannerIndex = ref(0);
  188. const page = ref(1);
  189. const status = ref("more");
  190. const msgCenter = ref(null);
  191. const cateList = ref([]); // 一级分类
  192. const hxCateList = ref([]);
  193. const lineList = ref(0);
  194. const homeBanner1 = ref({});
  195. const skeletonShow = ref(true);
  196. // 背景图片
  197. const bgImage = reactive({
  198. // image1: "/static/home/home_bg1.png",
  199. // image2: "/static/home/home_bg2.png",
  200. // image3: "/static/home/home_bg3.png",
  201. // image4: "/static/home/home_bg4.png",
  202. // image5: "/static/home/home_bg5.png",
  203. image1:
  204. "https://chaonong-shop.oss-cn-beijing.aliyuncs.com/20260104/fc2943f1d3894cf6aebe9a4ed5455cec.png", // 顶部背景图
  205. image2:
  206. "https://chaonong-shop.oss-cn-beijing.aliyuncs.com/20260104/c99cd4841fca414bbc5bc0bb21b6e0f3.png", // 拼团购背景图
  207. image3:
  208. "https://chaonong-shop.oss-cn-beijing.aliyuncs.com/20260104/21296e0cec1e49e6aa44bca3d7758362.png", // 热门推荐背景图
  209. image4:
  210. "https://chaonong-shop.oss-cn-beijing.aliyuncs.com/20260104/afc6def5b92a41eaa243c557d73b588c.png", // 本月热销背景图
  211. image5:
  212. "https://chaonong-shop.oss-cn-beijing.aliyuncs.com/20260104/67d5c6eebace46f1abd3435352561968.png", // 猜你喜欢背景图
  213. });
  214. // 方法定义
  215. const getHomeBanner1 = () => {
  216. getAdList_Api("home_ad").then((res) => {
  217. if (res && res.data && res.data.length > 0) {
  218. homeBanner1.value = res.data[0];
  219. // console.log("homeBanner1", homeBanner1.value);
  220. }
  221. });
  222. };
  223. const init = () => {
  224. page.value = 1;
  225. getAll();
  226. getOneCate();
  227. // getHxCateList();
  228. };
  229. // 跳转消息页面
  230. const goToMsg = () => {
  231. if (!utils.isLoginTo(true)) {
  232. uni.navigateTo({
  233. url: "/pages/user/myMsg",
  234. });
  235. }
  236. };
  237. const searchClick = () => {
  238. uni.navigateTo({
  239. url: "/pages/research/homepage/search",
  240. });
  241. };
  242. const goProductDetails = (url) => {
  243. uni.navigateTo({
  244. url: url,
  245. });
  246. };
  247. const getAll = () => {
  248. // rest();
  249. getBanner();
  250. // seckillList();
  251. // getgroupList();
  252. recommend();
  253. hotSale();
  254. // guessLike();
  255. };
  256. /**获得消息数量 */
  257. const getmessageNum = () => {
  258. let token = uni.getStorageSync("apiToken");
  259. if (token) {
  260. messageUnreadNum_Api().then((res) => {
  261. if (res && res.code == 200) {
  262. msgCenter.value = res.data;
  263. }
  264. });
  265. } else {
  266. msgCenter.value = 0;
  267. }
  268. };
  269. // 一级分类
  270. const getOneCate = () => {
  271. getQuickLinkList_Api("home").then((res) => {
  272. if (res && res.code == 200) {
  273. cateList.value = res.data || [];
  274. // console.log("cateList", cateList.value);
  275. }
  276. });
  277. };
  278. const getHxCateList = () => {
  279. uni.$uv.$http.get("/hxcategory/home/recommend/4").then((res) => {
  280. if (res && res.code == 200) {
  281. hxCateList.value = res.list;
  282. }
  283. });
  284. };
  285. const jumpHxCate = (item, area_feature) => {
  286. let url = `/pages/freeCollection/index`;
  287. if (area_feature == 0) {
  288. url += `?categoryId=${item.id}&title=${item.name}`;
  289. } else {
  290. url += `?hxCategoryId=${item.id}&title=${item.name}`;
  291. }
  292. uni.navigateTo({
  293. url: url,
  294. });
  295. };
  296. /**轮播图 */
  297. const getBanner = () => {
  298. getAdList_Api("home_banner")
  299. .then((res) => {
  300. uni.stopPullDownRefresh();
  301. if (res && res.code == 200) {
  302. shopBanner.value = res.data || [];
  303. }
  304. })
  305. .catch((err) => {
  306. console.log("err");
  307. console.log(err);
  308. });
  309. };
  310. const imgActiveFun = (e) => {
  311. activeBannerIndex.value = e.detail.current;
  312. };
  313. /**团购 */
  314. const getgroupList = () => {
  315. uni.$uv.$http
  316. .get(
  317. `/groupbuy/activitygoods/will-you-spell`,
  318. {
  319. limit: 10,
  320. page: 1,
  321. },
  322. false
  323. )
  324. .then((res) => {
  325. if (res && res.code == 200) {
  326. if (res.list.length > 0) {
  327. groupList.value = res.list;
  328. }
  329. }
  330. });
  331. };
  332. /**热门推荐 */
  333. const recommend = () => {
  334. shopProductList_Api({
  335. limit: 6,
  336. recommendStatus: 1,
  337. }).then((res) => {
  338. if (res && res.code == 200) {
  339. recommendList.value = res.data;
  340. }
  341. });
  342. };
  343. /**本月热销 */
  344. const hotSale = () => {
  345. shopProductList_Api({
  346. limit: 12,
  347. hot: 1,
  348. }).then((res) => {
  349. if (res && res.code == 200) {
  350. let list = res.data || [];
  351. hotList.value = res.data;
  352. if (hotList.value.length > 2) {
  353. lineList.value = hotList.value.length - 2;
  354. }
  355. if (list.length <= 3) {
  356. itemsDis.value = list.length;
  357. }
  358. if (list.length > 3 && list.length <= 6) {
  359. itemsDis.value = 3;
  360. }
  361. if (list.length > 6 && list.length <= 9) {
  362. itemsDis.value = 3;
  363. }
  364. if (list.length > 9 && list.length <= 12) {
  365. itemsDis.value = 3;
  366. }
  367. }
  368. });
  369. };
  370. /**猜你喜欢 */
  371. const guessLike = () => {
  372. keyWord.value = uni.getStorageSync("history")
  373. ? uni.getStorageSync("history").join(",")
  374. : "";
  375. uni.$uv.$http
  376. .get(
  377. `/goods/smart`,
  378. {
  379. page: page.value,
  380. limit: 6,
  381. keywords: keyWord.value,
  382. },
  383. false
  384. )
  385. .then((res) => {
  386. if (res && res.code == 200) {
  387. goodsList.value =
  388. page.value == 1
  389. ? res.page.list
  390. : goodsList.value.concat(res.page.list);
  391. if (res.page.totalPage <= res.page.currPage) {
  392. status.value = "noMore";
  393. } else {
  394. status.value = "more";
  395. }
  396. skeletonShow.value = false;
  397. }
  398. });
  399. };
  400. const goDetail = (url, isNeedLogin, tabShow = false) => {
  401. if ((isNeedLogin && uni.getStorageSync("apiToken") == "") || null) {
  402. uni.$uv.toast("请先登录");
  403. return false;
  404. }
  405. if (tabShow) {
  406. uni.switchTab({
  407. url: url,
  408. });
  409. } else {
  410. uni.navigateTo({
  411. url: url,
  412. });
  413. }
  414. };
  415. /**重置数据*/
  416. const rest = () => {
  417. goodsList.value = [];
  418. shopBanner.value = [];
  419. recommendList.value = [];
  420. hotList.value = [];
  421. groupList.value = [];
  422. };
  423. const toCartPage = () => {
  424. uni.switchTab({
  425. url: "/pages/tabtar/shoppingCart",
  426. });
  427. };
  428. // 生命周期钩子
  429. onLoad(() => {
  430. skeletonShow.value = false;
  431. init();
  432. getHomeBanner1();
  433. });
  434. onShow(() => {
  435. getmessageNum();
  436. });
  437. onPullDownRefresh(() => {
  438. return;
  439. page.value = 1;
  440. getAll();
  441. getOneCate();
  442. getHxCateList();
  443. getHomeBanner1();
  444. setTimeout(() => {
  445. uni.stopPullDownRefresh();
  446. }, 300);
  447. });
  448. onReachBottom(() => {
  449. return;
  450. if (status.value == "more") {
  451. page.value++;
  452. guessLike();
  453. }
  454. });
  455. onPageScroll((e) => {
  456. //nvue暂不支持滚动监听,可用bindingx代替
  457. if (e.scrollTop > uni.upx2px(49 + 30)) {
  458. showTopSearch.value = false;
  459. } else {
  460. showTopSearch.value = true;
  461. }
  462. });
  463. onShareAppMessage((res) => {
  464. let user = uni.getStorageSync("personal");
  465. if (res.from === "button") {
  466. // 来自页面内分享按钮
  467. console.log(res.target);
  468. }
  469. return {
  470. title: "商城",
  471. path: `/pages/index/lidaPage?shareId=${user.id || ""}`,
  472. };
  473. });
  474. </script>
  475. <style scoped lang="scss">
  476. .swiper {
  477. width: 690rpx;
  478. height: 370rpx !important;
  479. // border-radius: 20rpx;
  480. overflow: hidden;
  481. margin: 0 auto;
  482. ::v-deep .uni-swiper-dot {
  483. width: 16rpx !important;
  484. height: 6rpx;
  485. border-radius: 4rpx !important;
  486. background-color: #ffffff !important;
  487. opacity: 0.5;
  488. }
  489. ::v-deep .uni-swiper-dot-active {
  490. width: 32rpx !important;
  491. height: 6rpx;
  492. border-radius: 4rpx !important;
  493. background-color: #ffffff !important;
  494. opacity: 1;
  495. }
  496. }
  497. ::v-deep.hx-navbar__content__main_search_hxicon {
  498. span {
  499. font-size: 30rpx;
  500. }
  501. }
  502. ::v-deep.hx-navbar__content__main_search_input {
  503. background-color: #4a705e;
  504. }
  505. .one-cate {
  506. display: flex;
  507. // width: 750rpx;
  508. flex-wrap: wrap;
  509. justify-content: space-between;
  510. padding: 0 31rpx;
  511. margin-top: 30rpx;
  512. color: #373737;
  513. .item {
  514. width: 120rpx;
  515. text-align: center;
  516. // margin-right: 40rpx;
  517. // &:last-child {
  518. // margin-right: 0;
  519. // }
  520. image {
  521. width: 94rpx !important;
  522. height: 94rpx !important;
  523. }
  524. .word {
  525. // margin-top: 17rpx;
  526. overflow: hidden;
  527. text-overflow: ellipsis;
  528. white-space: nowrap;
  529. }
  530. }
  531. .item:first-child {
  532. margin-left: 0;
  533. }
  534. .item:nth-child(5n + 1) {
  535. margin-left: 0;
  536. }
  537. }
  538. .bannersize {
  539. display: block;
  540. overflow: hidden;
  541. width: 100%;
  542. height: 100%;
  543. border-radius: 10rpx;
  544. }
  545. .classlist {
  546. margin: 30rpx;
  547. display: flex;
  548. justify-content: space-between;
  549. color: #373737;
  550. .item {
  551. width: 120rpx;
  552. text-align: center;
  553. // margin-right: 38rpx;
  554. // &:last-child {
  555. // margin-right: 0;
  556. // }
  557. .img-box {
  558. width: 100%;
  559. // height: 110rpx;
  560. display: flex;
  561. align-items: center;
  562. justify-content: center;
  563. image {
  564. width: 70rpx;
  565. height: 70rpx;
  566. margin-bottom: 8rpx;
  567. }
  568. text {
  569. font-size: 70rpx;
  570. }
  571. .word {
  572. overflow: hidden;
  573. text-overflow: ellipsis;
  574. white-space: nowrap;
  575. }
  576. .alarmClock {
  577. color: #eb963a;
  578. }
  579. .spell {
  580. color: #4581f6;
  581. }
  582. .integral {
  583. color: #4ea700;
  584. }
  585. .discounts {
  586. color: #f55f40;
  587. }
  588. .activeRegion {
  589. color: #4581f6;
  590. }
  591. }
  592. .font {
  593. // margin-top: 17rpx;
  594. }
  595. .imgbox {
  596. display: flex;
  597. justify-content: center;
  598. align-items: center;
  599. width: 100%;
  600. // height: 110rpx;
  601. image {
  602. width: 70rpx;
  603. height: 70rpx !important;
  604. margin-bottom: 8rpx;
  605. }
  606. }
  607. }
  608. }
  609. .swiper {
  610. // margin-top: 105rpx;
  611. height: 360rpx;
  612. .swiper-item {
  613. width: 100%;
  614. height: 100%;
  615. }
  616. }
  617. .index {
  618. position: relative;
  619. background-color: #f5f5f5;
  620. overflow-x: hidden;
  621. background-repeat: no-repeat;
  622. background-size: 100% 509rpx;
  623. }
  624. .cart-entrance {
  625. position: fixed;
  626. right: 30rpx;
  627. bottom: 180rpx;
  628. width: 50px;
  629. height: 50px;
  630. background-size: 100% 100%;
  631. border-radius: 50%;
  632. filter: drop-shadow(1px 2px 4px rgba(26, 58, 70, 0.3));
  633. background-color: #fff;
  634. display: flex;
  635. align-items: center;
  636. justify-content: center;
  637. image {
  638. width: 55%;
  639. height: 55%;
  640. margin-right: 5rpx;
  641. }
  642. }
  643. .top-box {
  644. width: 100%;
  645. &.hide {
  646. background: #069d4d;
  647. }
  648. .title {
  649. display: flex;
  650. justify-content: center;
  651. align-items: center;
  652. position: relative;
  653. margin: 0 auto;
  654. // height: 45rpx;
  655. padding: 0 30rpx;
  656. font-size: 36rpx;
  657. font-family: PingFang SC, PingFang SC-Bold;
  658. font-weight: 700;
  659. color: #fff;
  660. // line-height: 45rpx;
  661. text-align: center;
  662. image {
  663. width: 41rpx;
  664. height: 31rpx;
  665. margin-right: 4rpx;
  666. }
  667. .titlt-txt {
  668. font-size: 36rpx;
  669. }
  670. }
  671. .input-box {
  672. display: flex;
  673. justify-content: space-between;
  674. align-items: center;
  675. position: sticky;
  676. top: 0;
  677. z-index: 100;
  678. width: 100%;
  679. padding: 23rpx 30rpx 30rpx;
  680. box-sizing: border-box;
  681. .text {
  682. margin-right: 20rpx;
  683. margin-left: 0rpx;
  684. font-weight: 500;
  685. font-size: 28rpx;
  686. color: #aed8b9;
  687. }
  688. .input-placeholder {
  689. // flex: 1;
  690. box-sizing: border-box;
  691. display: inline-block;
  692. vertical-align: middle;
  693. width: 630rpx;
  694. height: 70rpx;
  695. line-height: 66rpx;
  696. // background: rgba(2,81,43,0.3);
  697. background: rgba(255, 255, 255, 0.3);
  698. padding-left: 80rpx;
  699. // color: #666666;
  700. background: rgba(255, 255, 255, 0.3);
  701. // background-image: url("/static/czd/search.png");
  702. background-size: 40rpx 40rpx;
  703. background-position: 24rpx 50%;
  704. background-repeat: no-repeat;
  705. border: 1rpx solid rgba(255, 255, 255, 0.36);
  706. border-radius: 36rpx;
  707. }
  708. text {
  709. margin-left: 10rpx;
  710. display: inline-block;
  711. vertical-align: middle;
  712. font-size: 42rpx;
  713. font-weight: 400;
  714. text-align: right;
  715. color: #ffffff;
  716. line-height: 42rpx;
  717. &.iconfont2 {
  718. font-size: 55rpx;
  719. }
  720. }
  721. .msgCenter {
  722. position: relative;
  723. text {
  724. min-width: 50rpx;
  725. font-size: 20rpx;
  726. color: #ffffff;
  727. font-weight: 400;
  728. padding: 0 4rpx;
  729. background-color: #ff0000;
  730. border-radius: 13rpx;
  731. border: 2rpx solid #fff;
  732. text-align: center;
  733. position: absolute;
  734. left: 10rpx;
  735. top: -30rpx;
  736. line-height: normal;
  737. }
  738. }
  739. }
  740. .input-placeholder {
  741. color: #fee3cf;
  742. opacity: 0.74;
  743. font-size: 28rpx;
  744. font-family: PingFang SC, PingFang SC-Regular;
  745. font-weight: 400;
  746. text-align: left;
  747. line-height: 70rpx;
  748. }
  749. }
  750. .top-box.hide {
  751. position: fixed;
  752. z-index: 9999;
  753. }
  754. .notice-box {
  755. height: 92rpx;
  756. font-size: 28rpx;
  757. margin-bottom: 0;
  758. ::v-deep .uni-noticebar-icon {
  759. width: 40rpx;
  760. // background-image: url('/static/home/noticebar-icon.png');
  761. background-size: cover;
  762. color: transparent !important;
  763. }
  764. }
  765. .mt120 {
  766. margin-top: 240rpx;
  767. }
  768. .banner1Cls {
  769. text-align: center;
  770. margin-top: 20rpx;
  771. image {
  772. width: 690rpx;
  773. height: 200rpx;
  774. }
  775. }
  776. </style>