index.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772
  1. <template>
  2. <view v-if="pageShow" class="page"
  3. :class="bgTabVal==2?'fullsize noRepeat':bgTabVal==1?'repeat ysize':'noRepeat ysize'" :style="[pageStyle]">
  4. <view :style="colorStyle">
  5. <view class="index">
  6. <!-- 自定义样式 -->
  7. <block v-for="(item, index) in styleConfig" :key="index">
  8. <homeComb v-if="item.name == 'homeComb'" :dataConfig="item" @bindSortId="bindSortId"
  9. :isScrolled="isScrolled"></homeComb>
  10. <headerSerch v-if="item.name == 'headerSerch'" :dataConfig="item"></headerSerch>
  11. <shortVideo v-if="item.name == 'shortVideo'" :dataConfig="item"></shortVideo>
  12. <userInfor v-if="item.name == 'userInfor'" :dataConfig="item" @changeLogin="changeLogin">
  13. </userInfor>
  14. <newVip v-if="item.name == 'newVip'" :dataConfig="item"></newVip>
  15. <!-- 文章列表 -->
  16. <articleList v-if="item.name == 'articleList'" :dataConfig="item"></articleList>
  17. <bargain v-if="item.name == 'bargain'" :dataConfig="item" @changeBarg="changeBarg"></bargain>
  18. <blankPage v-if="item.name == 'blankPage'" :dataConfig="item"></blankPage>
  19. <combination v-if="item.name == 'combination'" :dataConfig="item">
  20. </combination>
  21. <!-- 优惠券 -->
  22. <coupon v-if="item.name == 'coupon'" :dataConfig="item" @changeLogin="changeLogin"></coupon>
  23. <!-- 客户服务 -->
  24. <customerService v-if="item.name == 'customerService'" :dataConfig="item">
  25. </customerService>
  26. <!-- 商品列表 -->
  27. <goodList v-if="item.name == 'goodList'" :dataConfig="item" @detail="goDetail"></goodList>
  28. <guide v-if="item.name == 'guide'" :dataConfig="item"></guide>
  29. <!-- 直播模块 -->
  30. <!-- #ifdef MP-WEIXIN -->
  31. <liveBroadcast v-if="item.name == 'liveBroadcast'" :dataConfig="item"></liveBroadcast>
  32. <!-- #endif -->
  33. <menus v-if="item.name == 'menus'" :dataConfig="item"></menus>
  34. <!-- 实时消息 -->
  35. <news v-if="item.name == 'news'" :dataConfig="item"></news>
  36. <!-- 图片库 -->
  37. <pictureCube v-if="item.name == 'pictureCube'" :dataConfig="item">
  38. </pictureCube>
  39. <!-- 促销列表 -->
  40. <promotionList v-if="item.name == 'promotionList'" :dataConfig="item" @detail="goDetail"
  41. :productVideoStatus='product_video_status'>
  42. </promotionList>
  43. <richText v-if="item.name == 'richText'" :dataConfig="item"></richText>
  44. <seckill v-if="item.name == 'seckill'" :dataConfig="item"></seckill>
  45. <!-- 轮播图-->
  46. <swiperBg v-if="item.name == 'swiperBg'" :dataConfig="item"></swiperBg>
  47. <swipers v-if="item.name == 'swipers'" :dataConfig="item"></swipers>
  48. <!-- 顶部选项卡 -->
  49. <tabNav v-if="item.name == 'tabNav'" :dataConfig="item" @bindHeight="bindHeighta"
  50. @bindSortId="bindSortId" :isFixed="isFixed"></tabNav>
  51. <!-- 标题 -->
  52. <titles v-if="item.name == 'titles'" :dataConfig="item"></titles>
  53. <ranking v-if="item.name == 'ranking'" :dataConfig="item"></ranking>
  54. <presale v-if="item.name == 'presale'" :dataConfig="item"></presale>
  55. <pointsMall v-if="item.name == 'pointsMall'" :dataConfig="item"></pointsMall>
  56. <videos v-if="item.name == 'videos'" :dataConfig="item"></videos>
  57. <signIn v-if="item.name == 'signIn'" :dataConfig="item"></signIn>
  58. <hotspot v-if="item.name == 'hotspot'" :dataConfig="item"></hotspot>
  59. <follow v-if="item.name == 'follow'" :dataConfig="item"></follow>
  60. </block>
  61. <!-- 分类商品模块 -->
  62. <!-- #ifndef APP-PLUS -->
  63. <view class="sort-product px-20" v-if="sortList.children && sortList.children.length">
  64. <!-- #endif -->
  65. <!-- #ifdef APP-PLUS -->
  66. <!-- 商品排序 -->
  67. <view class="sort-product px-20" :style="{ marginTop: sortMpTop + 'px' }"
  68. v-if="sortList.children && sortList.children.length">
  69. <!-- #endif -->
  70. <waterfallsFlow ref="waterfallsFlow" :wfList="goodList" @itemTap="goDetail"></waterfallsFlow>
  71. <Loading :loaded="loaded" :loading="loading"></Loading>
  72. <view v-if="goodList.length == 0 && loaded" class="sort-scroll rd-16rpx">
  73. <view class="empty-box pb-24">
  74. <image :src="imgHost + '/statics/images/no-thing.png'"></image>
  75. <view class="tips">暂无商品,去看点别的吧</view>
  76. </view>
  77. </view>
  78. </view>
  79. <view class="uni-p-b-98"></view>
  80. <pageFooter></pageFooter>
  81. </view>
  82. </view>
  83. </view>
  84. </template>
  85. <script>
  86. const app = getApp();
  87. import colors from "@/mixins/color";
  88. import couponWindow from '@/components/couponWindow/index'
  89. import {
  90. getCouponV2,
  91. getCouponNewUser
  92. } from '@/api/api.js'
  93. import {
  94. getShare
  95. } from '@/api/public.js';
  96. // #ifdef H5
  97. import {
  98. silenceAuth
  99. } from '@/api/public.js';
  100. // #endif
  101. import userInfor from '@/pages/index/components/userInfor';
  102. import homeComb from '@/pages/index/components/homeComb';
  103. import newVip from '@/pages/index/components/newVip';
  104. import shortVideo from '@/pages/index/components/shortVideo';
  105. import headerSerch from '@/pages/index/components/headerSerch';
  106. import swipers from '@/pages/index/components/swipers';
  107. import coupon from '@/pages/index/components/coupon';
  108. import articleList from '@/pages/index/components/articleList';
  109. import bargain from '@/pages/index/components/bargain';
  110. import blankPage from '@/pages/index/components/blankPage';
  111. import combination from '@/pages/index/components/combination';
  112. import customerService from '@/pages/index/components/customerService';
  113. import goodList from '@/pages/index/components/goodList';
  114. import guide from '@/pages/index/components/guide';
  115. import liveBroadcast from '@/pages/index/components/liveBroadcast';
  116. import menus from '@/pages/index/components/menus';
  117. import news from '@/pages/index/components/news';
  118. import pictureCube from '@/pages/index/components/pictureCube';
  119. import promotionList from '@/pages/index/components/promotionList';
  120. import richText from '@/pages/index/components/richText';
  121. import seckill from '@/pages/index/components/seckill';
  122. import swiperBg from '@/pages/index/components/swiperBg';
  123. import tabNav from '@/pages/index/components/tabNav';
  124. import titles from '@/pages/index/components/titles';
  125. import ranking from '@/pages/index/components/ranking';
  126. import presale from '@/pages/index/components/presale'
  127. import pointsMall from '@/pages/index/components/pointsMall';
  128. import videos from '@/pages/index/components/videos';
  129. import signIn from '@/pages/index/components/signIn';
  130. import hotspot from '@/pages/index/components/hotspot';
  131. import follow from '@/pages/index/components/follow';
  132. import waterfallsFlow from "@/components/WaterfallsFlow/WaterfallsFlow.vue";
  133. // #ifdef MP
  134. import {
  135. getTemlIds
  136. } from '@/api/api.js';
  137. import {
  138. SUBSCRIBE_MESSAGE,
  139. TIPS_KEY
  140. } from '@/config/cache';
  141. // #endif
  142. import {
  143. mapGetters
  144. } from 'vuex';
  145. import {
  146. getDiy,
  147. getDiyVersion
  148. } from '@/api/api.js';
  149. import {
  150. getCategoryList,
  151. getProductslist,
  152. getProductHot,
  153. } from '@/api/store.js';
  154. import {
  155. goShopDetail
  156. } from '@/libs/order.js';
  157. import {
  158. toLogin
  159. } from '@/libs/login.js';
  160. import {
  161. HTTP_REQUEST_URL
  162. } from '@/config/app';
  163. import pageFooter from '@/components/pageFooter/index.vue'
  164. import recommend from '@/components/recommend';
  165. import Loading from '@/components/Loading/index.vue';
  166. export default {
  167. computed: {
  168. pageStyle() {
  169. return {
  170. backgroundColor: this.bgColor,
  171. backgroundImage: this.bgPic ? `url(${this.bgPic})` : '',
  172. minHeight: this.windowHeight + 'px'
  173. }
  174. },
  175. ...mapGetters(['isLogin', 'uid']),
  176. },
  177. mixins: [colors],
  178. components: {
  179. recommend,
  180. Loading,
  181. pageFooter,
  182. couponWindow,
  183. homeComb,
  184. newVip,
  185. userInfor,
  186. shortVideo,
  187. headerSerch,
  188. swipers,
  189. coupon,
  190. articleList,
  191. bargain,
  192. blankPage,
  193. combination,
  194. customerService,
  195. goodList,
  196. guide,
  197. liveBroadcast,
  198. menus,
  199. pictureCube,
  200. news,
  201. promotionList,
  202. richText,
  203. seckill,
  204. swiperBg,
  205. tabNav,
  206. titles,
  207. ranking,
  208. presale,
  209. pointsMall,
  210. videos,
  211. signIn,
  212. hotspot,
  213. follow,
  214. waterfallsFlow
  215. },
  216. data() {
  217. return {
  218. styleConfig: [],
  219. loading: false,
  220. loadend: false,
  221. loadTitle: '加载更多', //提示语
  222. page: 1,
  223. limit: this.$config.LIMIT,
  224. numConfig: 0,
  225. code: '',
  226. isCouponShow: false,
  227. couponObj: {},
  228. couponObjs: {},
  229. shareInfo: {},
  230. footConfig: {},
  231. pageId: '',
  232. sortMpTop: 0,
  233. bgColor: '',
  234. bgPic: '',
  235. bgTabVal: '',
  236. pageShow: true,
  237. windowHeight: 0,
  238. isShowAuth: false,
  239. isScrolled: false,
  240. sortList: '',
  241. sortAll: [],
  242. isSortType: 0,
  243. hostProduct: [],
  244. hotScroll: false,
  245. hotPage: 1,
  246. hotLimit: 10,
  247. curSort: 0,
  248. loaded: false,
  249. goodPage: 1,
  250. goodList: [],
  251. sid: 0,
  252. imgHost: HTTP_REQUEST_URL,
  253. product_video_status: false
  254. };
  255. },
  256. onLoad(options) {
  257. let that = this
  258. this.$nextTick(function() {
  259. uni.getSystemInfo({
  260. success: function(res) {
  261. that.windowHeight = res.windowHeight;
  262. }
  263. });
  264. })
  265. const {
  266. state,
  267. scope
  268. } = options;
  269. this.pageId = options.id
  270. // #ifdef MP
  271. if (options.scene) {
  272. let value = that.$util.getUrlParams(decodeURIComponent(options.scene));
  273. this.pageId = value.id
  274. }
  275. // #endif
  276. uni.setNavigationBarTitle({
  277. title: '专题栏'
  278. });
  279. // #ifdef APP-PLUS
  280. this.sortMpTop = -50
  281. // #endif
  282. this.diyData();
  283. // #ifdef H5
  284. this.setOpenShare();
  285. // #endif
  286. // #ifdef MP || APP-PLUS
  287. this.getTemlIds();
  288. // #endif
  289. getShare().then(res => {
  290. this.shareInfo = res.data;
  291. })
  292. },
  293. onUnload() {
  294. // 清除监听
  295. uni.$off('activeFn');
  296. },
  297. watch: {
  298. isLogin: {
  299. deep: true, //深度监听设置为 true
  300. handler: function(newV, oldV) {
  301. // 优惠券弹窗
  302. var newDates = new Date().toLocaleDateString();
  303. if (newV) {
  304. try {
  305. var oldDate = uni.getStorageSync('oldDate') || ''
  306. } catch {}
  307. if (oldDate != newDates) {
  308. this.getCoupon();
  309. }
  310. }
  311. }
  312. }
  313. },
  314. onShow() {
  315. uni.removeStorageSync('form_type_cart');
  316. // 优惠券弹窗
  317. var newDates = new Date().toLocaleDateString();
  318. if (this.isLogin) {
  319. try {
  320. var oldDate = uni.getStorageSync('oldDate') || ''
  321. } catch {}
  322. if (oldDate != newDates) {
  323. this.getCoupon();
  324. }
  325. let oldUser = uni.getStorageSync('oldUser') || 0;
  326. if (!oldUser) {
  327. this.getCouponOnce();
  328. }
  329. }
  330. },
  331. mounted() {},
  332. methods: {
  333. // 分类点击
  334. changeSort(item, index) {
  335. if (this.curSort == index) return;
  336. this.curSort = index;
  337. this.sid = item.id;
  338. this.goodList = [];
  339. this.goodPage = 1;
  340. this.loaded = false;
  341. this.getGoodsList();
  342. },
  343. /**
  344. * @param data {
  345. classPage: 0 分类id
  346. microPage: 0 微页面id
  347. type: 1 0 商品分类 1 微页面
  348. }*/
  349. bindSortId(data) {
  350. this.styleConfig = [];
  351. if (data.type == 1) {
  352. this.getProductList(data.classPage);
  353. } else {
  354. this.sortList = [];
  355. this.getMicroPage(data.microPage, true);
  356. }
  357. },
  358. /**
  359. * 获取DIY
  360. * @param {number} id
  361. * @param {boolean} type 区分是否是微页面
  362. */
  363. getMicroPage(id, type) {
  364. let that = this;
  365. that.styleConfig = []
  366. uni.showLoading({
  367. title: '加载中...'
  368. });
  369. getDiy(id).then(res => {
  370. uni.hideLoading();
  371. let data = res.data;
  372. that.styleConfig = that.objToArr(res.data.value);
  373. that.styleConfig.forEach((item, index) => {
  374. if (['headerSerch', 'homeComb'].includes(item.name)) {
  375. that.styleConfig.splice(index, 1);
  376. }
  377. });
  378. }).catch(err => {
  379. return that.$util.Tips({
  380. title: err
  381. });
  382. uni.hideLoading();
  383. });
  384. },
  385. getProductList(data) {
  386. this.curSort = 0;
  387. this.loaded = false;
  388. if (this.sortAll.length > 0) {
  389. this.sortAll.forEach((el, index) => {
  390. if (el.id == data) {
  391. this.$set(this, 'sortList', el);
  392. this.sid = el.children.length ? el.children[0].id : '';
  393. }
  394. });
  395. this.goodList = [];
  396. this.goodPage = 1;
  397. this.$nextTick(() => {
  398. if (this.sortList != '') this.getGoodsList();
  399. });
  400. } else {
  401. getCategoryList().then(res => {
  402. this.sortAll = res.data;
  403. res.data.forEach((el, index) => {
  404. if (el.id == data) {
  405. this.sortList = el;
  406. this.sid = el.children.length ? el.children[0].id : '';
  407. }
  408. });
  409. this.goodList = [];
  410. this.goodPage = 1;
  411. this.$nextTick(() => {
  412. if (this.sortList != '') this.getGoodsList();
  413. });
  414. });
  415. }
  416. },
  417. // 商品列表
  418. getGoodsList() {
  419. if (this.loading || this.loaded) return;
  420. this.loading = true;
  421. getProductslist({
  422. sid: this.sid,
  423. keyword: '',
  424. priceOrder: '',
  425. salesOrder: '',
  426. news: 0,
  427. page: this.goodPage,
  428. limit: 10,
  429. cid: this.sortList.id
  430. }).then(res => {
  431. this.loading = false;
  432. this.loaded = res.data.length < 10;
  433. this.goodPage++;
  434. this.goodList = this.goodList.concat(res.data);
  435. });
  436. },
  437. /**
  438. * 获取我的推荐
  439. */
  440. get_host_product: function() {
  441. let that = this;
  442. if (that.hotScroll) return;
  443. getProductHot(that.hotPage, that.hotLimit).then(res => {
  444. that.hotPage++;
  445. that.hotScroll = res.data.length < that.hotLimit;
  446. that.hostProduct = that.hostProduct.concat(res.data);
  447. });
  448. },
  449. // 新用户优惠券
  450. getCouponOnce() {
  451. getCouponNewUser().then(res => {
  452. this.couponObjs = res.data;
  453. });
  454. },
  455. couponCloses() {
  456. this.couponObjs.show = false;
  457. try {
  458. uni.setStorageSync('oldUser', 1);
  459. } catch (e) {
  460. }
  461. },
  462. // 优惠券弹窗
  463. getCoupon() {
  464. getCouponV2().then(res => {
  465. this.couponObj = res.data
  466. if (res.data.list.length > 0) {
  467. this.isCouponShow = true
  468. }
  469. })
  470. },
  471. // 优惠券弹窗关闭
  472. couponClose() {
  473. this.isCouponShow = false
  474. try {
  475. uni.setStorageSync('oldDate', new Date().toLocaleDateString());
  476. } catch {}
  477. },
  478. // #ifdef H5
  479. // 获取url后面的参数
  480. getQueryString(name) {
  481. var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
  482. var reg_rewrite = new RegExp("(^|/)" + name + "/([^/]*)(/|$)", "i");
  483. var r = window.location.search.substr(1).match(reg);
  484. var q = window.location.pathname.substr(1).match(reg_rewrite);
  485. if (r != null) {
  486. return unescape(r[2]);
  487. } else if (q != null) {
  488. return unescape(q[2]);
  489. } else {
  490. return null;
  491. }
  492. },
  493. // #endif
  494. // #ifdef MP || APP-PLUS
  495. getTemlIds() {
  496. let messageTmplIds = wx.getStorageSync(SUBSCRIBE_MESSAGE);
  497. if (!messageTmplIds) {
  498. getTemlIds().then(res => {
  499. if (res.data) wx.setStorageSync(SUBSCRIBE_MESSAGE, JSON.stringify(res.data));
  500. });
  501. }
  502. },
  503. // #endif
  504. // 对象转数组
  505. objToArr(data) {
  506. const keys = Object.keys(data)
  507. keys.sort((a, b) => a - b)
  508. const m = keys.map(key => data[key]);
  509. return m;
  510. },
  511. setDiyData(data) {
  512. // let data = res.data;
  513. if (data.length == 0) {
  514. return this.$util.Tips({
  515. title: '暂无数据'
  516. }, {
  517. tab: 3
  518. })
  519. }
  520. if (data.is_bg_color) {
  521. this.bgColor = data.color_picker
  522. }
  523. if (data.is_bg_pic) {
  524. this.bgPic = data.bg_pic
  525. this.bgTabVal = data.bg_tab_val
  526. }
  527. this.pageShow = data.is_show
  528. uni.setNavigationBarTitle({
  529. title: data.title
  530. })
  531. let temp = []
  532. let lastArr = this.objToArr(data.value)
  533. lastArr.forEach((item, index, arr) => {
  534. if (item.isHide !== '1') {
  535. temp.push(item);
  536. }
  537. });
  538. this.styleConfig = temp;
  539. },
  540. getDiyData() {
  541. getDiy(this.pageId).then(res => {
  542. uni.setStorageSync('specialDiyData', JSON.stringify(res.data));
  543. this.setDiyData(res.data);
  544. });
  545. },
  546. diyData() {
  547. let that = this;
  548. let diyData = uni.getStorageSync('specialDiyData');
  549. if (diyData) {
  550. getDiyVersion(this.pageId).then(res => {
  551. let diyVersion = uni.getStorageSync('specialDiyVersion');
  552. if ((res.data.version + this.pageId) === diyVersion) {
  553. this.setDiyData(JSON.parse(diyData));
  554. } else {
  555. uni.setStorageSync('specialDiyVersion', (res.data.version + this.pageId));
  556. this.getDiyData();
  557. }
  558. });
  559. } else {
  560. this.getDiyData();
  561. }
  562. },
  563. changeBarg(item) {
  564. if (!this.isLogin) {
  565. toLogin()
  566. } else {
  567. uni.navigateTo({
  568. url: `/pages/activity/goods_bargain_details/index?id=${item.id}&spid=${this.uid}`
  569. });
  570. }
  571. },
  572. goDetail(item) {
  573. goShopDetail(item, this.uid).then(res => {
  574. uni.navigateTo({
  575. url: `/pages/goods_details/index?id=${item.id}`
  576. });
  577. });
  578. },
  579. // #ifdef H5
  580. // 微信分享;
  581. setOpenShare: function() {
  582. let that = this;
  583. if (that.$wechat.isWeixin()) {
  584. getShare().then(res => {
  585. let data = res.data.data;
  586. let configAppMessage = {
  587. desc: data.synopsis,
  588. title: data.title,
  589. link: location.href,
  590. imgUrl: data.img
  591. };
  592. that.$wechat.wechatEvevt(['updateAppMessageShareData', 'updateTimelineShareData'],
  593. configAppMessage);
  594. });
  595. }
  596. }
  597. // #endif
  598. },
  599. onReachBottom: function() {},
  600. onPageScroll(e) {
  601. if (e.scrollTop > 10) {
  602. this.isScrolled = true;
  603. } else {
  604. this.isScrolled = false;
  605. }
  606. uni.$emit('scroll');
  607. },
  608. //#ifdef MP || APP-PLUS
  609. onShareAppMessage() {
  610. return {
  611. title: this.shareInfo.title,
  612. path: '/pages/index/index',
  613. imageUrl: this.storeInfo.img,
  614. };
  615. },
  616. //#endif
  617. };
  618. </script>
  619. <style lang="scss">
  620. .sort-scroll {
  621. background-color: #fff;
  622. }
  623. .empty-box {
  624. text-align: center;
  625. padding-top: 50rpx;
  626. .tips {
  627. color: #aaa;
  628. font-size: 26rpx;
  629. }
  630. image {
  631. width: 414rpx;
  632. height: 304rpx;
  633. }
  634. }
  635. .sort-product {
  636. margin-top: 20rpx;
  637. .sort-box {
  638. display: flex;
  639. width: 100%;
  640. border-radius: 16rpx;
  641. padding: 30rpx 0;
  642. .sort-item {
  643. width: 20%;
  644. display: flex;
  645. flex-direction: column;
  646. align-items: center;
  647. justify-content: center;
  648. flex-shrink: 0;
  649. image {
  650. width: 90rpx;
  651. height: 90rpx;
  652. border-radius: 50%;
  653. }
  654. .txt {
  655. color: #272727;
  656. font-size: 24rpx;
  657. margin-top: 10rpx;
  658. overflow: hidden;
  659. white-space: nowrap;
  660. text-overflow: ellipsis;
  661. width: 140rpx;
  662. text-align: center;
  663. }
  664. .pictrues {
  665. width: 90rpx;
  666. height: 90rpx;
  667. background: #f8f8f8;
  668. border-radius: 50%;
  669. margin: 0 auto;
  670. }
  671. .icon-gengduo1 {
  672. color: #333;
  673. }
  674. &.on {
  675. .txt {
  676. color: #fc4141;
  677. }
  678. image {
  679. border: 1px solid #fc4141;
  680. }
  681. }
  682. }
  683. }
  684. .product-list {
  685. display: flex;
  686. flex-wrap: wrap;
  687. justify-content: space-between;
  688. margin-top: 30rpx;
  689. padding: 0 20rpx;
  690. .product-item {
  691. position: relative;
  692. width: 344rpx;
  693. background: #fff;
  694. border-radius: 10rpx;
  695. margin-bottom: 20rpx;
  696. overflow: hidden;
  697. .pictrue {
  698. position: relative;
  699. }
  700. image {
  701. width: 100%;
  702. height: 344rpx;
  703. border-radius: 10rpx 10rpx 0 0;
  704. }
  705. .info {
  706. padding: 14rpx 16rpx;
  707. .title {
  708. font-size: 28rpx;
  709. }
  710. .price-box {
  711. font-size: 34rpx;
  712. font-weight: 700;
  713. margin-top: 8px;
  714. color: #fc4141;
  715. text {
  716. font-size: 26rpx;
  717. }
  718. }
  719. }
  720. }
  721. }
  722. }
  723. .page {
  724. padding-bottom: 50px;
  725. }
  726. .ysize {
  727. background-size: 100%;
  728. }
  729. .fullsize {
  730. background-size: 100% 100%;
  731. }
  732. .repeat {
  733. background-repeat: repeat;
  734. }
  735. .noRepeat {
  736. background-repeat: no-repeat;
  737. }
  738. </style>