index.vue 22 KB

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