index2.vue 22 KB

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