index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844
  1. <template>
  2. <view class="ps-wrapper">
  3. <view id="headerBox" ref="headerBox" :class="[mpCommonClass]" :style="{
  4. background: `url(${bgImg}) no-repeat center top`,
  5. backgroundSize: '100% 400rpx',
  6. backgroundColor: '#F7F7F7',
  7. }" class="header-box">
  8. <view>
  9. <view :height=" '1225rpx'" class="banner-container">
  10. <u-swiper :autoplay="true" :current="current" :height=" '1225rpx'" :list="bannerList" circular
  11. duration="1000" interval="5000" @change="(data) => (current = data.current)" @click="bannerClick">
  12. <template #indicator>
  13. <view class="custom-indicator">
  14. <text v-for="item in bannerList.length" v-show="bannerList.length > 0" :key="item"
  15. :class="{ 'banner-active': item === current }" class="custom-indicator-item"></text>
  16. </view>
  17. </template>
  18. </u-swiper>
  19. <view class="logo-search-container">
  20. <view class="centered-image">
  21. <van-image
  22. :src="logoImg"
  23. fit="contain"
  24. height="20px"
  25. width="83px"
  26. />
  27. </view>
  28. <view :style="{
  29. width: '75%',
  30. height: '100%',
  31. }" class="search-box" @click="toSearchList">
  32. <u-icon name="search" size="20"></u-icon>
  33. <text>请输入关键词</text>
  34. </view>
  35. </view>
  36. </view>
  37. <!-- 商品分类 -->
  38. <view class="goods-list">
  39. <view class="goods-list-item" @click="jumpPage('haowu')">
  40. <van-image
  41. height="136rpx"
  42. src="/static/hd1.png"
  43. width="84rpx"
  44. />
  45. <view style=" margin-top: 14rpx">芳香好物</view>
  46. </view>
  47. <view class="goods-list-item" @click="jumpPage()">
  48. <van-image
  49. height="136rpx"
  50. src="/static/hd2.png"
  51. width="84rpx"
  52. />
  53. <view style=" margin-top: 14rpx"> 芳香学院</view>
  54. </view>
  55. <view class="goods-list-item" @click="jumpPage()">
  56. <van-image
  57. height="136rpx"
  58. src="/static/hd3.png"
  59. width="84rpx"
  60. />
  61. <view style=" margin-top: 14rpx"> 芳香活动</view>
  62. </view>
  63. <view class="goods-list-item" @click="jumpPage()">
  64. <van-image
  65. height="136rpx"
  66. src="/static/hd5.png"
  67. width="84rpx"
  68. />
  69. <view style=" margin-top: 14rpx"> 芳香生活
  70. </view>
  71. </view>
  72. <view class="goods-list-item" @click="jumpPage()">
  73. <van-image
  74. height="136rpx"
  75. src="/static/hd4.png"
  76. width="84rpx"
  77. />
  78. <view style=" margin-top: 14rpx">陪伴营</view>
  79. </view>
  80. </view>
  81. <view class="biaoti">
  82. <van-image
  83. height="85.94rpx"
  84. src="/static/biaoti1.png"
  85. width="171.3rpx"
  86. />
  87. </view>
  88. <view class="content-box">
  89. <view :style="{width: '95%', margin: '0rpx auto', height: '378rpx' ,borderRadius: '24rpx 24rpx 24rpx 24rpx',backgroundColor: '#F2FAF2'}"
  90. @click="toHuodong()">
  91. <van-image
  92. height="280rpx"
  93. src="/static/hdlist1.png"
  94. width="100%"
  95. />
  96. <view>
  97. <van-row>
  98. <van-col span="16">
  99. <view class="huodongText">
  100. 芬芳小溪-健康生活态游园会
  101. </view>
  102. </van-col>
  103. <van-col span="8">
  104. <van-row>
  105. <van-col span="12">
  106. <view class="huodongText2">
  107. <van-image
  108. class="huodongText2-img"
  109. height="28rpx"
  110. src="/static/hdlist2.png" width="28rpx"
  111. />
  112. 500
  113. </view>
  114. </van-col>
  115. <van-col span="12">
  116. <view class="huodongText2">
  117. <van-image
  118. class="huodongText2-img"
  119. height="28rpx"
  120. src="/static/hdlist3.png" width="28rpx"
  121. />
  122. 160
  123. </view>
  124. </van-col>
  125. </van-row>
  126. </van-col>
  127. </van-row>
  128. </view>
  129. </view>
  130. <view class="biaoti">
  131. <van-image
  132. height="85.94rpx"
  133. src="/static/biaoti2.png"
  134. width="171.3rpx"
  135. />
  136. </view>
  137. <view
  138. :style="{width: '95%', margin: '0rpx auto'}">
  139. <view style="width: 100%;">
  140. <view v-for="(item, index) in goods_class" :key="index">
  141. <view style="margin-bottom: 24rpx" @click="toKecheng(item)">
  142. <van-image
  143. :src="item.cover"
  144. height="200rpx"
  145. width="100%"
  146. />
  147. </view>
  148. </view>
  149. </view>
  150. </view>
  151. <view class="biaoti">
  152. <van-image
  153. height="85.94rpx"
  154. src="/static/biaoti3.png"
  155. width="171.3rpx"
  156. />
  157. </view>
  158. <view
  159. :style="{width: '95%', margin: '0rpx auto'}">
  160. <CommercePart :data="commonDataList"></CommercePart>
  161. <!-- 赠品专区 -->
  162. <image v-if="giftBanner.pic" :src="giftBanner.pic" mode="aspectFill"
  163. style="width: 100%; height: 206rpx" @click="toSubpages('giftZone')">
  164. </image>
  165. </view>
  166. </view>
  167. </view>
  168. </view>
  169. <tabbarCom current="0"></tabbarCom>
  170. <van-toast id="van-toast"/>
  171. </view>
  172. </template>
  173. <script>
  174. import tabbarCom from "@/components/tabbar/tabbar.vue"
  175. import CommercePart from "@/components/CommercePart.vue";
  176. // import FlowPart from "@/components/FlowPart.vue";
  177. import {
  178. goodsList
  179. } from "./config";
  180. import {
  181. getBanner
  182. } from "@/common/api/home.js";
  183. import {
  184. getNewsList
  185. } from "@/common/api/news.js";
  186. import Toast from "wxcomponents/vant/dist/toast/toast";
  187. // 获取系统状态栏的高度
  188. let systemInfo = uni.getSystemInfoSync();
  189. let menuButtonInfo = {};
  190. // 如果是小程序,获取右上角胶囊的尺寸信息,避免导航栏右侧内容与胶囊重叠(支付宝小程序非本API,尚未兼容)
  191. // #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ
  192. menuButtonInfo = uni.getMenuButtonBoundingClientRect();
  193. // #endif
  194. export default {
  195. components: {
  196. tabbarCom,
  197. CommercePart
  198. },
  199. data() {
  200. return {
  201. bgImg: '',
  202. logoImg: '',
  203. shopName: '',
  204. shopShareImg: '',
  205. ponitsBanner: {}, // 积分兑换
  206. giftBanner: {}, // 赠品
  207. partGoodsList: [],
  208. msGoodsList: [],
  209. bannerList: [],
  210. topData: {
  211. top: 0,
  212. height: 0,
  213. },
  214. current: 0,
  215. titleTabCurrentIndex: 0,
  216. goodsList: goodsList,
  217. imageUrl: this.$C.imageUrl,
  218. userInfo: {},
  219. keyword: "",
  220. commonPage: {
  221. pageNum: 1,
  222. pageSize: 4,
  223. total: 0,
  224. },
  225. flowPage: {
  226. pageNum: 1,
  227. pageSize: 4,
  228. total: 0,
  229. },
  230. status: "loadmore",
  231. filterData: {},
  232. loadText: {
  233. loadmore: "点击加载更多",
  234. loading: "努力加载中",
  235. nomore: "没有更多了",
  236. },
  237. selectedType: "",
  238. activeTabStyle: {
  239. fontSize: "36rpx",
  240. fontWeight: "600",
  241. },
  242. mainHeightStyle: {},
  243. mainHeight: "",
  244. commonDataList: [],
  245. flowDataList: [],
  246. statusBarHeight: systemInfo.statusBarHeight,
  247. menuButtonInfo: menuButtonInfo,
  248. searchInputStyle: {
  249. backgroundColor: "transparent",
  250. color: "#1D161F",
  251. },
  252. prevData: [],
  253. advList: [],
  254. goods_class: [],
  255. sourceBanner: []
  256. };
  257. },
  258. computed: {
  259. // 导航栏内部盒子的样式
  260. navbarInnerStyle() {
  261. let style = {};
  262. // 导航栏宽度,如果在小程序下,导航栏宽度为胶囊的左边到屏幕左边的距离
  263. style.height = this.navbarHeight + "px";
  264. // // 如果是各家小程序,导航栏内部的宽度需要减少右边胶囊的宽度
  265. // #ifdef MP
  266. let rightButtonWidth = systemInfo.windowWidth - menuButtonInfo.left;
  267. style.marginRight = rightButtonWidth + "px";
  268. // #endif
  269. return style;
  270. },
  271. // 转换字符数值为真正的数值
  272. navbarHeight() {
  273. // #ifdef APP-PLUS || H5
  274. return this.height ? this.height : 44;
  275. // #endif
  276. // #ifdef MP
  277. // 小程序特别处理,让导航栏高度 = 胶囊高度 + 两倍胶囊顶部与状态栏底部的距离之差(相当于同时获得了导航栏底部与胶囊底部的距离)
  278. // 此方法有缺陷,暂不用(会导致少了几个px),采用直接固定值的方式
  279. // return menuButtonInfo.height + (menuButtonInfo.top - this.statusBarHeight) * 2;//导航高度
  280. let height = systemInfo.platform == "ios" ? 44 : 48;
  281. return this.height ? this.height : height;
  282. // #endif
  283. },
  284. token() {
  285. return this.$U.getStorage("token");
  286. },
  287. mpCommonClass() {
  288. console.log(this.$C)
  289. return this.$C.mpCommonClass || ''
  290. }
  291. },
  292. watch: {
  293. titleTabCurrentIndex() {
  294. if (this.titleTabCurrentIndex == 0) {
  295. this.getCommonData(true);
  296. } else {
  297. this.getFlowData(true);
  298. }
  299. },
  300. },
  301. onLoad() {
  302. this.getBanner();
  303. this.getNewsList();
  304. },
  305. onShow() {
  306. uni
  307. .createSelectorQuery()
  308. .in(this)
  309. .select("#headerBox")
  310. .boundingClientRect((data) => {
  311. let height = (data.height + 20) * 2 + "rpx";
  312. this.mainHeight = `calc(100vh - ${height})`;
  313. })
  314. .exec();
  315. const topData = uni.getMenuButtonBoundingClientRect();
  316. this.topData.top = topData.top;
  317. this.topData.height = topData.height;
  318. if (this.token) {
  319. this.userInfo = this.$U.getStorage("userInfo");
  320. }
  321. // this.getMsData()
  322. // this.getCommonData(true);
  323. },
  324. onReachBottom() {
  325. this.getCommonData();
  326. },
  327. onShareAppMessage(res) {
  328. if (res.from === 'button') { // 来自页面内分享按钮
  329. console.log(res.target)
  330. }
  331. let userInfo = uni.getStorageSync('userInfo')
  332. userInfo = userInfo && JSON.parse(userInfo) || {}
  333. let params = {}
  334. if (userInfo.id) {
  335. params = {
  336. id: userInfo.id
  337. }
  338. }
  339. return {
  340. title: this.shopName,
  341. path: `/pages/home/index${this.$stringPageOptions(params)}`,
  342. imageUrl: this.shopShareImg,
  343. }
  344. },
  345. onShareTimeline(res) {
  346. if (res.from === 'button') { // 来自页面内分享按钮
  347. console.log(res.target)
  348. }
  349. let userInfo = uni.getStorageSync('userInfo')
  350. userInfo = userInfo && JSON.parse(userInfo) || {}
  351. let params = {}
  352. if (userInfo.id) {
  353. params = {
  354. id: userInfo.id
  355. }
  356. }
  357. return {
  358. title: this.shopName,
  359. imageUrl: this.shopShareImg,
  360. path: `/pages/home/index${this.$stringPageOptions(params)}`
  361. }
  362. },
  363. methods: {
  364. toMsList() {
  365. uni.navigateTo({
  366. url: `/subPages/msGoodsList/msGoodsList`,
  367. });
  368. },
  369. toMsDetail(item) {
  370. // 秒杀详情
  371. uni.navigateTo({
  372. url: `/subPages/goodsDetail/goodsDetail?code=${item.id}&type=msGoods`,
  373. });
  374. },
  375. toDetails(item) {
  376. // 秒杀详情
  377. uni.navigateTo({
  378. url: `/subPages/goodsDetail/goodsDetail?code=${item.code}&type=common`,
  379. });
  380. },
  381. toSubpages(type) {
  382. if (type == "pointsZone") {
  383. uni.navigateTo({
  384. url: `/subPages/pointsZone/pointsZone?id=${this.ponitsBanner.pstn_id}`,
  385. });
  386. } else {
  387. uni.navigateTo({
  388. url: `/subPages/giftZone/giftZone?id=${this.giftBanner.pstn_id}`,
  389. });
  390. }
  391. },
  392. jumpPage(type) {
  393. if (type == "haowu") {
  394. uni.switchTab({
  395. url: '/pages/productCenter/productCenter',
  396. })
  397. } else {
  398. Toast('敬请期待');
  399. }
  400. },
  401. toHuodong(type) {
  402. Toast('敬请期待');
  403. },
  404. toKecheng(type) {
  405. Toast('敬请期待');
  406. },
  407. bannerClick(index) {
  408. const currentUrl = this.sourceBanner[index].pic_url
  409. if (currentUrl != '#') {
  410. uni.navigateTo({
  411. url: currentUrl
  412. })
  413. }
  414. },
  415. getBanner() {
  416. getBanner().then((res) => {
  417. const {
  418. slider = [],
  419. goods_class = [],
  420. goods_cate = [],
  421. goods_online = [],
  422. seckill_goods = [],
  423. integral_page = [],
  424. gifts_page = [],
  425. shop_name,
  426. shop_logo,
  427. shop_share_img,
  428. shop_bgimg
  429. } = res.data;
  430. const configs = uni.getStorageSync("configs");
  431. if (configs) {
  432. this.logoImg = configs.shop_logo
  433. this.bgImg = configs.shop_bgimg
  434. this.shopName = configs.shop_share_title
  435. this.shopShareImg = configs.shop_share_img
  436. } else {
  437. this.logoImg = shop_logo
  438. this.bgImg = shop_bgimg
  439. this.shopName = shop_name
  440. this.shopShareImg = shop_share_img
  441. }
  442. this.bannerList = slider.map(item => item.pic);
  443. this.sourceBanner = slider
  444. this.goodsList = goods_cate;
  445. this.commonDataList = goods_online;
  446. this.msGoodsList = seckill_goods;
  447. this.goods_class = goods_class;
  448. this.ponitsBanner = integral_page.length && integral_page[0];
  449. this.giftBanner = gifts_page.length && gifts_page[0];
  450. uni.setStorageSync('mpInfo', {
  451. shopName: this.shopName,
  452. shareImg: this.shopShareImg
  453. })
  454. });
  455. // const data = {
  456. // name: 'sliderread'
  457. // };
  458. // this.$api.getData(data)
  459. // .then((res) => {
  460. // uni.hideLoading();
  461. // console.log("getBanner==>", res.data)
  462. // if (res.data) {
  463. // this.bannerList = res.data;
  464. // } else {}
  465. // })
  466. // .catch(() => {
  467. // uni.hideLoading();
  468. // });
  469. },
  470. toSearchList() {
  471. uni.navigateTo({
  472. url: "/subPages/searchList/searchList",
  473. });
  474. },
  475. getMsData() {
  476. uni.showLoading({
  477. title: "加载中",
  478. });
  479. this.$api
  480. .getPSMsList()
  481. .then((res) => {
  482. uni.hideLoading();
  483. // this.msGoodsList = res.data && res.data.list || []
  484. })
  485. .catch(() => {
  486. uni.hideLoading();
  487. });
  488. },
  489. getNewsList() {
  490. getNewsList({
  491. cid: 1,
  492. page: 1,
  493. pageSize: 100,
  494. }).then(({
  495. data = {}
  496. }) => {
  497. this.advList = data.list || [];
  498. });
  499. },
  500. getCommonData(initFlag) {
  501. if (!initFlag) {
  502. if (
  503. this.commonPage.pageNum * this.commonPage.pageSize <
  504. this.commonPage.total
  505. ) {
  506. this.commonPage.pageNum++;
  507. } else {
  508. return;
  509. }
  510. } else {
  511. this.commonPage.pageNum = 1;
  512. this.commonPage.total = 0;
  513. this.commonDataList = [];
  514. }
  515. let sendData = {
  516. limit: this.commonPage.pageSize,
  517. page: this.commonPage.pageNum,
  518. };
  519. uni.showLoading({
  520. title: "加载中",
  521. });
  522. this.$api
  523. .getPSGoodsList(sendData)
  524. .then((res) => {
  525. uni.hideLoading();
  526. if (res.code == 1) {
  527. const {
  528. list = [], page = {}
  529. } = res.data;
  530. this.commonDataList = this.commonDataList.concat(list);
  531. this.commonPage.total = page.total;
  532. }
  533. })
  534. .catch((err) => {
  535. uni.hideLoading();
  536. });
  537. },
  538. getFlowData(initFlag) {
  539. if (!initFlag) {
  540. if (
  541. this.flowPage.pageNum * this.flowPage.pageSize <
  542. this.flowPage.total
  543. ) {
  544. this.flowPage.pageNum++;
  545. } else {
  546. return;
  547. }
  548. } else {
  549. this.flowPage.pageNum = 1;
  550. this.flowPage.total = 0;
  551. this.flowDataList = [];
  552. }
  553. let sendData = {
  554. limit: this.flowPage.pageSize,
  555. page: this.flowPage.pageNum,
  556. };
  557. uni.showLoading({
  558. title: "加载中",
  559. });
  560. this.$api
  561. .getFlowData(sendData)
  562. .then((res) => {
  563. uni.hideLoading();
  564. if (res.code == 1) {
  565. const {
  566. list = [], page = {}
  567. } = res.data;
  568. this.flowDataList = this.flowDataList.concat(list);
  569. this.flowPage.total = page.total;
  570. }
  571. })
  572. .catch((err) => {
  573. uni.hideLoading();
  574. });
  575. },
  576. searchChange() {
  577. },
  578. toDetail(item) {
  579. uni.navigateTo({
  580. url: "../../subPages/commerceDetail/commerceDetail?id=" + item.id,
  581. });
  582. },
  583. toList(item) {
  584. console.log("cateid=====>", item);
  585. uni.setStorageSync('currentCateid', item.id)
  586. uni.switchTab({
  587. url: `/pages/productCenter/productCenter?cateid=${item.id}`,
  588. });
  589. },
  590. handleAdv(index) {
  591. const activeAdv = this.advList[index];
  592. uni.navigateTo({
  593. url: `/pages/article/article?id=${activeAdv.id}`,
  594. });
  595. },
  596. },
  597. };
  598. </script>
  599. <style lang="scss" scoped>
  600. .ps-wrapper {
  601. background-color: $primary-bg-color;
  602. .adv-box {
  603. position: relative;
  604. // padding: 0 33rpx 20rpx;
  605. height: 64rpx;
  606. background-color: white;
  607. padding: 0 20rpx 0;
  608. border-radius: 16rpx;
  609. margin: 40rpx 0 20rpx;
  610. font-weight: 500;
  611. .adv-icon {
  612. position: absolute;
  613. left: 6rpx;
  614. top: 50%;
  615. transform: translateY(-50%);
  616. }
  617. ::v-deep {
  618. .u-notice__left-icon {
  619. width: 19px;
  620. .u-icon__icon {
  621. display: none;
  622. }
  623. }
  624. }
  625. }
  626. .custom-indicator {
  627. position: absolute;
  628. left: 0rpx;
  629. right: 0rpx;
  630. bottom: 29rpx;
  631. width: 712rpx;
  632. display: flex;
  633. margin: 0 20rpx 0 20rpx;
  634. flex-direction: row;
  635. justify-content: center;
  636. transform: translateX(-48rpx);
  637. .custom-indicator-item {
  638. width: 16rpx;
  639. height: 16rpx;
  640. margin: 0 6rpx;
  641. border-radius: 12rpx;
  642. background-color: #666666;
  643. }
  644. .banner-active {
  645. width: 48rpx;
  646. background-color: #222222;
  647. }
  648. }
  649. .slot-wrap {
  650. background-color: red;
  651. }
  652. .content-box {
  653. // overflow-y: auto;
  654. background-color: $primary-bg-color;
  655. padding: 20rpx 0 0;
  656. .part-box {
  657. background: linear-gradient(180deg, #fdd118 0%, #f7f7f7 100%);
  658. border-radius: 10rpx 10rpx 10rpx 10rpx;
  659. padding: 18rpx 14rpx;
  660. .part-list {
  661. display: flex !important;
  662. flex-direction: row !important;
  663. // justify-content: space-between;
  664. background-color: #fff;
  665. border-radius: 10rpx;
  666. padding: 15rpx 15rpx 30rpx;
  667. font-size: 24rpx;
  668. color: #1d161f;
  669. margin-top: 15rpx;
  670. &-item {
  671. width: calc(33% - 10rpx);
  672. margin-right: 10rpx;
  673. }
  674. }
  675. }
  676. }
  677. .header-box {
  678. width: 100%;
  679. .banner-container {
  680. position: relative;
  681. width: 100%;
  682. .logo-search-container {
  683. position: absolute;
  684. top: 12%;
  685. left: 0;
  686. width: 100%;
  687. display: flex;
  688. justify-content: space-between;
  689. align-items: center;
  690. padding: 0 20rpx;
  691. box-sizing: border-box;
  692. .search-box {
  693. margin: 0 auto 0rpx;
  694. height: 61rpx;
  695. background: rgba(255, 255, 255, 0.3);
  696. border-radius: 30rpx;
  697. opacity: 1;
  698. display: flex;
  699. align-items: center;
  700. flex-direction: row;
  701. text {
  702. font-size: 24rpx;
  703. font-family: PingFang SC-Regular, PingFang SC;
  704. font-weight: 400;
  705. color: #9D9D9D;
  706. line-height: 61rpx;
  707. margin-left: 11rpx;
  708. }
  709. }
  710. }
  711. .centered-image {
  712. display: flex;
  713. justify-content: center;
  714. align-items: center;
  715. height: 61rpx;
  716. }
  717. }
  718. .content {
  719. width: 100%;
  720. z-index: 50;
  721. // margin-top: -60rpx;s
  722. .title-tab {
  723. font-size: 34rpx;
  724. color: #aca9af;
  725. font-style: italic;
  726. font-weight: 700;
  727. margin-bottom: 26rpx;
  728. padding: 0 20rpx;
  729. &-item {
  730. margin-right: 30rpx;
  731. }
  732. &-actived {
  733. color: #000;
  734. }
  735. }
  736. }
  737. }
  738. .goods-list {
  739. display: flex;
  740. flex-wrap: wrap;
  741. justify-content: flex-start;
  742. background-color: #FFFFFF;;
  743. padding: 0 20rpx;
  744. padding-top: 40rpx;
  745. &-item {
  746. width: 20%;
  747. flex-shrink: 0;
  748. text-align: center;
  749. margin-bottom: 30rpx;
  750. color: #1d161f;
  751. font-size: 26rpx;
  752. }
  753. }
  754. .biaoti {
  755. width: 100%;
  756. height: 180rpx;
  757. display: flex;
  758. justify-content: center;
  759. align-items: center
  760. }
  761. .huodongText {
  762. font-family: PingFang SC, PingFang SC;
  763. font-weight: 400;
  764. font-size: 26rpx;
  765. color: #333333;
  766. line-height: 36rpx; // 修正拼写错误
  767. text-align: left; // 如果需要水平居中,可以改为 'center'
  768. font-style: normal;
  769. text-transform: none;
  770. height: 98rpx;
  771. display: flex; // 添加 flex 布局
  772. align-items: center; // 垂直居中
  773. margin-left: 30rpx; // 添加左边距
  774. }
  775. .huodongText2 {
  776. font-family: PingFang SC, PingFang SC;
  777. font-weight: 400;
  778. font-size: 20rpx;
  779. color: #666666;
  780. height: 98rpx;
  781. line-height: 28rpx;
  782. text-align: left;
  783. font-style: normal;
  784. display: flex; // 添加 flex 布局
  785. align-items: center; // 垂直居中
  786. text-transform: none;
  787. .huodongText2-img {
  788. margin-right: 15rpx;
  789. margin-left: 15rpx
  790. }
  791. }
  792. }
  793. </style>
  794. <style lang="scss">
  795. page {
  796. height: 100vh;
  797. }
  798. </style>