index.vue 23 KB

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