index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893
  1. <template>
  2. <view :class="bgTabVal==2?'fullsize noRepeat':bgTabVal==1?'repeat ysize':'noRepeat ysize'"
  3. :style="'overflow-x:hidden;background-color:'+bgColor+';background-image: url('+bgPic+');min-height:'+windowHeight+'px;'">
  4. <skeleton :show="showSkeleton" :isNodes="isNodes" ref="skeleton" loading="chiaroscuro" selector="skeleton" bgcolor="#FFF"></skeleton>
  5. <view v-if="!errorNetwork" :style="{visibility: showSkeleton ? 'hidden' : 'visible'}">
  6. <view class="page-index skeleton">
  7. <block>
  8. <!-- #ifdef H5 -->
  9. <view v-for="(item, index) in styleConfig" :key="index">
  10. <block v-if="item.name != 'headerSerch' && item.name != 'tabNav'">
  11. <component
  12. :is="item.name"
  13. :index="index"
  14. :isFixed="isFixed"
  15. :dataConfig="item"
  16. :tempArr="tempArr"
  17. :userInfo="userInfo"
  18. :tabTitle="navTop"
  19. :merId="mer_id"
  20. :navIndex="navIndex"
  21. :communityStatus="community_status"
  22. @detail="goDetail"
  23. ></component>
  24. </block>
  25. <block v-if="item.name == 'headerSerch'">
  26. <headerSerch
  27. :is="'headerSerch'"
  28. :isFixed="isFixed"
  29. :dataConfig="item"
  30. :tempArr="tempArr"
  31. :userInfo="userInfo"
  32. :tabTitle="navTop"
  33. :merId="mer_id"
  34. @detail="goDetail"
  35. ></headerSerch>
  36. </block>
  37. <block v-if="item.name == 'tabNav'">
  38. <tabNav
  39. :is="'tabNav'"
  40. :isFixed="isFixed"
  41. :dataConfig="item"
  42. :tempArr="tempArr"
  43. :merId="mer_id"
  44. :userInfo="userInfo"
  45. :tabTitle="navTop"
  46. @detail="goDetail"
  47. ></tabNav>
  48. </block>
  49. </view>
  50. <!-- #endif -->
  51. <!-- #ifdef MP || APP-PLUS-->
  52. <block v-for="(item, index) in styleConfig" :key="index" >
  53. <view v-show="navIndex == 0">
  54. <activeParty v-if="item.name == 'activeParty'" :merId="mer_id" :dataConfig="item"></activeParty>
  55. <articleList v-if="item.name == 'articleList'" :merId="mer_id" :dataConfig="item"></articleList>
  56. <bargain v-if="item.name == 'bargain'" :merId="mer_id" :dataConfig="item"></bargain>
  57. <blankPage v-if="item.name == 'blankPage'" :merId="mer_id" :dataConfig="item"></blankPage>
  58. <combination v-if="item.name == 'combination'" :merId="mer_id" :dataConfig="item"></combination>
  59. <topic v-if="item.name == 'topic'" :merId="mer_id" :dataConfig="item"></topic>
  60. <coupon v-if="item.name == 'coupon'" :merId="mer_id" :dataConfig="item"></coupon>
  61. <customerService v-if="item.name == 'customerService'" :merId="mer_id" :dataConfig="item"></customerService>
  62. <goodList v-if="item.name == 'goodList'" :merId="mer_id" :dataConfig="item" @detail="goDetail"></goodList>
  63. <guide v-if="item.name == 'guide'" :merId="mer_id" :dataConfig="item"></guide>
  64. <liveBroadcast v-if="item.name == 'liveBroadcast'" :merId="mer_id" :dataConfig="item"></liveBroadcast>
  65. <menus v-if="item.name == 'menus'" :merId="mer_id" :dataConfig="item"></menus>
  66. <news v-if="item.name == 'news'" :merId="mer_id" :dataConfig="item"></news>
  67. <presellList v-if="item.name == 'presellList'" :merId="mer_id" :dataConfig="item"></presellList>
  68. <promotionList v-if="item.name == 'promotionList'" :merId="mer_id" :dataConfig="item" :tempArr="tempArr" @detail="goDetail"></promotionList>
  69. <richText v-if="item.name == 'richText'" :merId="mer_id" :dataConfig="item"></richText>
  70. <seckill v-if="item.name == 'seckill'" :merId="mer_id" :dataConfig="item"></seckill>
  71. <swiperBg v-if="item.name == 'swiperBg'" :merId="mer_id" :dataConfig="item"></swiperBg>
  72. <pictureCube v-if="item.name == 'pictureCube'" :merId="mer_id" :dataConfig="item"></pictureCube>
  73. <swipers v-if="item.name == 'swipers'" :merId="mer_id" :dataConfig="item"></swipers>
  74. <titles v-if="item.name == 'titles'" :merId="mer_id" :dataConfig="item"></titles>
  75. </view>
  76. <headerSerch v-if="item.name == 'headerSerch'" :merId="mer_id" :dataConfig="item" :userInfo="userInfo"></headerSerch>
  77. <tabNav v-if="item.name == 'tabNav'" :merId="mer_id" :dataConfig="item" class="tabNav" :tabTitle="navTop"
  78. :isFixed="isFixed"></tabNav>
  79. </block>
  80. <!-- #endif -->
  81. <view>
  82. <view class="loadingicon acea-row row-center-wrapper" v-if="tempArr.length && styleConfig[styleConfig.length - 1].name == 'promotionList'">
  83. <text class="loading iconfont icon-jiazai" :hidden="loading == false"></text>
  84. {{ loadTitle }}
  85. </view>
  86. </view>
  87. </block>
  88. </view>
  89. </view>
  90. </view>
  91. </template>
  92. <script>
  93. // +----------------------------------------------------------------------
  94. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  95. // +----------------------------------------------------------------------
  96. // | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
  97. // +----------------------------------------------------------------------
  98. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  99. // +----------------------------------------------------------------------
  100. // | Author: CRMEB Team <admin@crmeb.com>
  101. // +----------------------------------------------------------------------
  102. var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
  103. let app = getApp();
  104. import { getUserInfo } from '@/api/user.js';
  105. import { getDiy, getIndexData, getAppVersion } from '@/api/api.js';
  106. // #ifdef MP-WEIXIN
  107. import { getTemlIds } from '@/api/api.js';
  108. import { SUBSCRIBE_MESSAGE, TIPS_KEY } from '@/config/cache';
  109. // #endif
  110. import { getShare, follow } from '@/api/public.js';
  111. import { goShopDetail } from '@/libs/order.js';
  112. import { mapGetters } from 'vuex';
  113. import { getProductslist, getMerProductHot, getStoreCategory } from '@/api/store.js';
  114. import { initiateAssistApi } from '@/api/activity.js';
  115. import { spread } from '@/api/user.js';
  116. import mConfig from './component/index.js';
  117. // #ifdef MP || APP-PLUS
  118. import activeParty from '../index/component/activeParty';
  119. import headerSerch from '../index/component/headerSerch';
  120. import coupon from '../index/component/coupon';
  121. import bargain from '../index/component/bargain';
  122. import blankPage from '../index/component/blankPage';
  123. import combination from '../index/component/combination';
  124. import customerService from '../index/component/customerService';
  125. import goodList from '../index/component/goodList';
  126. import guide from '../index/component/guide';
  127. import liveBroadcast from '../index/component/liveBroadcast';
  128. import menus from '../index/component/menus';
  129. import news from '../index/component/news';
  130. import topic from '../index/component/topic';
  131. import presellList from '../index/component/presellList';
  132. import richText from '../index/component/richText';
  133. import seckill from '../index/component/seckill';
  134. import swiperBg from '../index/component/swiperBg';
  135. import pictureCube from '../index/component/pictureCube'
  136. import tabNav from '../index/component/tabNav';
  137. import titles from '../index/component/titles';
  138. // #endif
  139. import { silenceBindingSpread, configMap } from '@/utils';
  140. import history from '@/mixins/history';
  141. import shareScence from '@/libs/spread';
  142. import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
  143. import { toLogin } from '@/libs/login.js';
  144. export default {
  145. computed: configMap({hide_mer_status:0,community_status:0,share_title:''},
  146. mapGetters(['isLogin', 'uid'])),
  147. mixins: [history],
  148. components: {
  149. easyLoadimage,
  150. ...mConfig,
  151. // #ifdef MP || APP-PLUS
  152. activeParty,
  153. headerSerch,
  154. bargain,
  155. coupon,
  156. blankPage,
  157. combination,
  158. customerService,
  159. goodList,
  160. liveBroadcast,
  161. menus,
  162. news,
  163. topic,
  164. presellList,
  165. richText,
  166. seckill,
  167. swiperBg,
  168. pictureCube,
  169. tabNav,
  170. titles
  171. // #endif
  172. },
  173. data() {
  174. return {
  175. styleConfig: [],
  176. showSkeleton: true, //骨架屏显示隐藏
  177. isNodes: 0, //控制什么时候开始抓取元素节点,只要数值改变就重新抓取
  178. errorNetwork: false,
  179. ad: {home_ad_pic: ''},
  180. userInfo: {},
  181. loading: false,
  182. statusBarHeight: statusBarHeight,
  183. navTop: [],
  184. subscribe: false,
  185. itemNew: [],
  186. menus: [{url:'',pic:'',id: '',name:''},{url:'',pic:'',id: '',name:''},{url:'',pic:'',id: '',name:''},{url:'',pic:'',id: '',name:''},{url:'',pic:'',id: '',name:''},{url:'',pic:'',id: '',name:''},{url:'',pic:'',id: '',name:''},{url:'',pic:'',id: '',name:''},{url:'',pic:'',id: '',name:''},{url:'',pic:'',id: '',name:''}],
  187. window: false,
  188. iShidden: false,
  189. couponList: [],
  190. lovely: [],
  191. marTop: 0,
  192. datatime: 0,
  193. mer_id: '',
  194. loadend: false,
  195. loading: false,
  196. loadTitle: '加载更多',
  197. sortProduct: [],
  198. where: {
  199. pid: 0,
  200. page: 1,
  201. limit: 6
  202. },
  203. hostProduct: [],
  204. hotPage: 1,
  205. hotLimit: 30,
  206. hotScroll: true,
  207. hotLoading: false,
  208. hotTitle: '加载更多',
  209. prodeuctTop: 0,
  210. pinkInfo: '',
  211. searchH: 0,
  212. domOffsetTop: 50,
  213. // #ifdef APP-PLUS || MP
  214. isFixed: true,
  215. // #endif
  216. // #ifdef H5
  217. isFixed: false,
  218. // #endif
  219. goodScroll: true, //精品推荐开关
  220. params: {
  221. //精品推荐分页
  222. page: 1,
  223. limit: 10
  224. },
  225. tempArr: [], //精品推荐临时数组
  226. numConfig: 0,
  227. swiperCur: 0,
  228. brandList: [],
  229. d: '',
  230. h: '',
  231. m: '',
  232. s: '',
  233. sum_h: '',
  234. sortMarTop: 0,
  235. // #ifdef MP || APP-PLUS
  236. mpHeight: 108,
  237. // #endif
  238. // #ifndef MP || APP-PLUS
  239. mpHeight: 0,
  240. // #endif
  241. currSpid: '',
  242. mer_id: '',
  243. navIndex: 0,
  244. _options:{},
  245. activity_banner: true,
  246. activityData: [],
  247. isHeaderSerch: false,
  248. bgColor: '',
  249. bgPic: '',
  250. bgTabVal: '',
  251. windowHeight: 0,
  252. };
  253. },
  254. /**
  255. * 用户点击右上角分享
  256. */
  257. // #ifdef MP
  258. onShareAppMessage: function() {
  259. let that = this;
  260. wx.showShareMenu({
  261. withShareTicket: true,
  262. menus: ['shareAppMessage', 'shareTimeline']
  263. });
  264. return {
  265. title: that.share_title,
  266. path: '/pages/store/home/index?id='+ that.mer_id +'&spid='+ that.uid
  267. };
  268. },
  269. onShareTimeline: function() {
  270. let that = this;
  271. return {
  272. title: that.share_title,
  273. query: {
  274. spid: that.uid
  275. },
  276. imageUrl: ''
  277. };
  278. },
  279. // #endif
  280. onLoad(options) {
  281. let that = this;
  282. this._options = options;
  283. this.mer_id = this._options.id
  284. // #ifdef APP-PLUS
  285. const pages = getCurrentPages();
  286. const page = pages[pages.length - 1];
  287. this.isSupport = !this.isSupport;
  288. // #endif
  289. that.$nextTick(function() {
  290. uni.getSystemInfo({
  291. success: function(res) {
  292. that.windowHeight = res.windowHeight;
  293. }
  294. });
  295. })
  296. this.pageLoad(options);
  297. setTimeout(() => {
  298. this.isNodes++;
  299. }, 100);
  300. },
  301. onShow() {
  302. },
  303. onHide() {
  304. },
  305. onReady() {
  306. },
  307. watch: {
  308. },
  309. onPullDownRefresh(){
  310. setTimeout(()=> {
  311. uni.stopPullDownRefresh();
  312. }, 100);
  313. },
  314. methods: {
  315. pageLoad(options){
  316. let that = this;
  317. if (options.spid) {
  318. that.currSpid = options.spid;
  319. app.globalData.spid = options.spid;
  320. }
  321. // #ifdef MP
  322. if (options.scene) {
  323. let value = that.$util.getUrlParams(decodeURIComponent(options.scene));
  324. if (value.id) options.id = value.id;
  325. //记录推广人uid
  326. if (value.spid) {
  327. that.currSpid = value.spid;
  328. app.globalData.spid = value.spid;
  329. }
  330. }
  331. // #endif
  332. shareScence(that.currSpid, that.isLogin);
  333. this.isLogin && silenceBindingSpread();
  334. this.getIndexConfig()
  335. Promise.all([
  336. this.diyData()
  337. ]);
  338. if (this.isLogin) {
  339. this.getUserInfo();
  340. }
  341. },
  342. // 对象转数组
  343. objToArr(data) {
  344. let obj = Object.keys(data).sort();
  345. let m = obj.map(key => data[key]);
  346. return m;
  347. },
  348. diyData() {
  349. let that = this;
  350. getDiy({id: this.mer_id, version: '221'}).then(res => {
  351. setTimeout(() => {
  352. that.isNodes++;
  353. }, 0);
  354. that.errorNetwork = false
  355. let data = res.data;
  356. if (data.is_bg_color) {
  357. that.bgColor = data.color_picker
  358. }
  359. if (data.is_bg_pic) {
  360. that.bgPic = data.bg_pic
  361. that.bgTabVal = data.bg_tab_val
  362. }
  363. uni.setNavigationBarTitle({
  364. title: res.data.title
  365. });
  366. if(!res.data.value || res.data.value==""){
  367. uni.redirectTo({
  368. url: '/pages/store/home/index?id=' + that.mer_id
  369. });
  370. }else{
  371. that.styleConfig = that.objToArr(res.data.value);
  372. that.styleConfig.forEach((item, index, arr) => {
  373. if (item.name == 'headerSerch') {
  374. that.isHeaderSerch = true
  375. }
  376. });
  377. }
  378. }).catch(err => {
  379. uni.showToast({
  380. title: err,
  381. icon: 'none'
  382. });
  383. });
  384. },
  385. // 菜单详情
  386. goMenuDetail(item) {
  387. if (item.url == '/pages/goods_cate/goods_cate') {
  388. let data = this.$util.stringIntercept(item.url, 1, '\?');
  389. data = this.$util.stringIntercept(data, 1, '\=');
  390. uni.setStorageSync('storeIndex', data);
  391. uni.switchTab({
  392. url: '/pages/goods_cate/goods_cate'
  393. });
  394. } else {
  395. uni.navigateTo({
  396. url: item.url
  397. });
  398. }
  399. },
  400. goDetails(item) {
  401. goShopDetail(item, this.uid).then(res => {
  402. if (this.isLogin) {
  403. initiateAssistApi(item.activity_id)
  404. .then(res => {
  405. let id = res.data.product_assist_set_id;
  406. uni.hideLoading();
  407. uni.navigateTo({
  408. url: '/pages/activity/assist_detail/index?id=' + id
  409. });
  410. })
  411. .catch(err => {
  412. uni.showToast({
  413. title: err,
  414. icon: 'none'
  415. });
  416. });
  417. } else {
  418. toLogin()
  419. }
  420. });
  421. },
  422. /**
  423. * 获取个人用户信息
  424. */
  425. getUserInfo: function() {
  426. let that = this;
  427. getUserInfo().then(res => {
  428. that.userInfo = res.data;
  429. });
  430. },
  431. //分类产品
  432. get_product_list: function() {
  433. let that = this;
  434. // if (!that.loadend) return;
  435. if (that.loading) return;
  436. that.loading = true;
  437. that.loadTitle = '';
  438. getProductslist(that.where)
  439. .then(res => {
  440. let list = res.data.list;
  441. let productList = that.$util.SplitArray(list, that.sortProduct);
  442. let loadend = list.length < that.where.limit;
  443. that.loadend = loadend;
  444. that.loading = false;
  445. that.loadTitle = loadend ? '已全部加载' : '加载更多';
  446. that.$set(that, 'sortProduct', productList);
  447. that.$set(that.where, 'page', that.where.page + 1);
  448. })
  449. .catch(err => {
  450. that.loading = false;
  451. that.loadTitle = '加载更多';
  452. });
  453. },
  454. // 首页数据
  455. getIndexConfig: function() {
  456. let that = this;
  457. getStoreCategory(this.mer_id).then(res => {
  458. that.$set(that, 'menus', res.data.menu);
  459. res.data.unshift({
  460. cate_name: '首页'
  461. });
  462. that.$set(that, 'navTop', res.data);
  463. that.reloadData();
  464. });
  465. },
  466. reloadData() {
  467. setTimeout(() => {
  468. this.showSkeleton = false
  469. }, 500)
  470. },
  471. // 首发新品详情
  472. goDetail(item) {
  473. if (item.activity && item.activity.type === '2' && !this.isLogin) {
  474. toLogin()
  475. return;
  476. } else {
  477. goShopDetail(item, this.uid).then(res => {
  478. uni.navigateTo({
  479. url: `/pages/goods_details/index?id=${item.id}`
  480. });
  481. });
  482. }
  483. },
  484. // 分类详情
  485. godDetail(item) {
  486. uni.navigateTo({
  487. url: `/pages/goods_details/index?id=${item.id}`
  488. });
  489. },
  490. //拼团详情
  491. goCombinDetail(item) {
  492. uni.navigateTo({
  493. url: `/pages/activity/combination_details/index?id=${item.product_group_id}`
  494. });
  495. },
  496. countTime: function() {
  497. // 获取当前时间
  498. var date = new Date();
  499. var now = date.getTime();
  500. //设置截止时间
  501. var endDate = new Date('2020-10-22 23:23:23');
  502. var end = endDate.getTime();
  503. //时间差
  504. var leftTime = end - now;
  505. //定义变量 d,h,m,s保存倒计时的时间
  506. if (leftTime >= 0) {
  507. this.d = Math.floor(leftTime / 1000 / 60 / 60 / 24);
  508. this.h = Math.floor((leftTime / 1000 / 60 / 60) % 24);
  509. this.m = Math.floor((leftTime / 1000 / 60) % 60);
  510. this.s = Math.floor((leftTime / 1000) % 60);
  511. this.sum_h = this.d * 24 + this.h;
  512. }
  513. //递归每秒调用countTime方法,显示动态时间效果
  514. setTimeout(this.countTime, 1000);
  515. },
  516. },
  517. mounted() {
  518. },
  519. // 滚动到底部
  520. onReachBottom() {
  521. },
  522. // 滚动监听
  523. onPageScroll(e) {
  524. // #ifdef H5
  525. if (this.isHeaderSerch) {
  526. if (e.scrollTop > this.domOffsetTop) {
  527. this.isFixed = true;
  528. }
  529. if (e.scrollTop < this.domOffsetTop) {
  530. this.$nextTick(() => {
  531. this.isFixed = false;
  532. });
  533. }
  534. } else {
  535. this.isFixed = false
  536. }
  537. // #endif
  538. // 传入scrollTop值并触发所有easy-loadimage组件下的滚动监听事件
  539. uni.$emit('scroll');
  540. }
  541. };
  542. </script>
  543. <style lang="scss">
  544. page {
  545. display: flex;
  546. flex-direction: column;
  547. }
  548. .main {
  549. padding: 0 20rpx;
  550. }
  551. .colum0{
  552. white-space: nowrap;
  553. display: flex;
  554. }
  555. .ysize {
  556. background-size: 100%;
  557. }
  558. .fullsize {
  559. background-size: 100% 100%;
  560. }
  561. .repeat {
  562. background-repeat: repeat;
  563. }
  564. .noRepeat {
  565. background-repeat: no-repeat;
  566. }
  567. .area-row {
  568. overflow: hidden;
  569. text-overflow: ellipsis;
  570. white-space: nowrap;
  571. display: block;
  572. width: 100%;
  573. text-align: center;
  574. }
  575. .page-index {
  576. display: flex;
  577. flex-direction: column;
  578. min-height: 100%;
  579. .page_content {
  580. /* #ifdef MP || APP-PLUS */
  581. padding-top: 270rpx;
  582. /* #endif */
  583. .page_bg{
  584. background: linear-gradient(180deg, #fff 0%, #f5f5f5 100%);
  585. }
  586. .nav {
  587. padding: 0 0rpx 30rpx;
  588. flex-wrap: wrap;
  589. /* #ifdef MP */
  590. margin-top: 0;
  591. /* #endif */
  592. /* #ifdef H5 */
  593. margin-top: 0;
  594. /* #endif */
  595. .item {
  596. display: flex;
  597. flex-direction: column;
  598. align-items: center;
  599. justify-content: center;
  600. width: 20%;
  601. margin-top: 30rpx;
  602. image {
  603. width: 82rpx;
  604. height: 82rpx;
  605. }
  606. }
  607. }
  608. .index-product-wrapper {
  609. .nav-bd {
  610. display: flex;
  611. align-items: center;
  612. .item {
  613. display: flex;
  614. flex-direction: column;
  615. align-items: center;
  616. justify-content: center;
  617. width: 25%;
  618. .txt {
  619. font-size: 32rpx;
  620. color: #282828;
  621. }
  622. .label {
  623. display: flex;
  624. align-items: center;
  625. justify-content: center;
  626. width: 124rpx;
  627. height: 32rpx;
  628. margin-top: 5rpx;
  629. font-size: 24rpx;
  630. color: #999;
  631. }
  632. &.active {
  633. color: $theme-color;
  634. .label {
  635. background: linear-gradient(90deg, $bg-star 0%, $bg-end 100%);
  636. border-radius: 16rpx;
  637. color: #fff;
  638. }
  639. }
  640. }
  641. }
  642. .list-box {
  643. display: flex;
  644. flex-wrap: wrap;
  645. justify-content: space-between;
  646. .item {
  647. width: 345rpx;
  648. margin-bottom: 20rpx;
  649. background-color: #fff;
  650. border-radius: 10px;
  651. overflow: hidden;
  652. image {
  653. width: 100%;
  654. height: 345rpx;
  655. }
  656. .text-info {
  657. padding: 10rpx 20rpx 15rpx;
  658. .title {
  659. color: #222222;
  660. }
  661. .old-price {
  662. margin-top: 8rpx;
  663. font-size: 26rpx;
  664. color: #aaaaaa;
  665. text-decoration: line-through;
  666. text {
  667. margin-right: 2px;
  668. font-size: 20rpx;
  669. }
  670. }
  671. .price {
  672. display: flex;
  673. align-items: flex-end;
  674. color: $theme-color;
  675. font-size: 34rpx;
  676. font-weight: 800;
  677. text {
  678. padding-bottom: 4rpx;
  679. font-size: 24rpx;
  680. font-weight: normal;
  681. }
  682. .txt {
  683. display: flex;
  684. align-items: center;
  685. justify-content: center;
  686. width: 28rpx;
  687. height: 28rpx;
  688. margin-left: 15rpx;
  689. margin-bottom: 10rpx;
  690. border: 1px solid $theme-color;
  691. border-radius: 4rpx;
  692. font-size: 22rpx;
  693. font-weight: normal;
  694. }
  695. }
  696. }
  697. }
  698. &.on {
  699. display: flex;
  700. }
  701. }
  702. }
  703. }
  704. }
  705. .productList {
  706. background-color: #f1f1f1;
  707. min-height: 70vh;
  708. .sort {
  709. width: 710rpx;
  710. max-height: 380rpx;
  711. background: rgba(255, 255, 255, 1);
  712. border-radius: 16rpx;
  713. padding: 8rpx 0rpx 30rpx;
  714. flex-wrap: wrap;
  715. margin: 25rpx auto 0 auto;
  716. &.no_pad {
  717. padding: 0;
  718. }
  719. .item {
  720. width: 20%;
  721. margin-top: 30rpx;
  722. text-align: center;
  723. .pictrues {
  724. width: 90rpx;
  725. height: 90rpx;
  726. background: rgba(248, 248, 248, 1);
  727. border-radius: 50%;
  728. margin: 0 auto;
  729. }
  730. image {
  731. width: 90rpx;
  732. height: 90rpx;
  733. }
  734. .text {
  735. color: #272727;
  736. font-size: 24rpx;
  737. margin-top: 10rpx;
  738. overflow: hidden;
  739. white-space: nowrap;
  740. text-overflow: ellipsis;
  741. }
  742. }
  743. }
  744. }
  745. .productList .list {
  746. padding: 0 20rpx;
  747. }
  748. .productList .list.on {
  749. background-color: #fff;
  750. border-top: 1px solid #f6f6f6;
  751. }
  752. .productList .list .item {
  753. width: 345rpx;
  754. margin-top: 20rpx;
  755. background-color: #fff;
  756. border-radius: 10rpx;
  757. .name{
  758. display: flex;
  759. align-items: center;
  760. .name_text{
  761. display: inline-block;
  762. max-width: 200rpx;
  763. }
  764. }
  765. }
  766. .productList .list .item.on {
  767. width: 100%;
  768. display: flex;
  769. border-bottom: 1px solid #f6f6f6;
  770. padding: 30rpx 0;
  771. margin: 0;
  772. }
  773. .productList .list .item .pictrue {
  774. position: relative;
  775. width: 100%;
  776. height: 345rpx;
  777. }
  778. .productList .list .item .pictrue.on {
  779. width: 180rpx;
  780. height: 180rpx;
  781. }
  782. .productList .list .item .pictrue image,
  783. .productList .list .item .pictrue uni-image,
  784. .productList .list .item .pictrue .easy-loadimage{
  785. width: 100%;
  786. height: 100%;
  787. border-radius: 10rpx 10rpx 0 0;
  788. }
  789. .productList .list .item .pictrue image.on {
  790. border-radius: 6rpx;
  791. }
  792. .productList .list .item .text {
  793. padding: 14rpx 17rpx 26rpx 17rpx;
  794. font-size: 28rpx;
  795. color: #212121;
  796. }
  797. .productList .list .item .text.on {
  798. width: 508rpx;
  799. padding: 0 0 0 22rpx;
  800. }
  801. .productList .list .item .text .money {
  802. font-size: 26rpx;
  803. font-weight: bold;
  804. margin-top: 8rpx;
  805. }
  806. .productList .list .item .text .coupon {
  807. background: rgba(255, 248, 247, 1);
  808. border: 1px solid rgba(233, 51, 35, 1);
  809. border-radius: 4rpx;
  810. font-size: 20rpx;
  811. margin-left: 18rpx;
  812. padding: 1rpx 4rpx;
  813. }
  814. .productList .list .item .text .money.on {
  815. margin-top: 50rpx;
  816. }
  817. .productList .list .item .text .money .num {
  818. font-size: 34rpx;
  819. }
  820. .productList .list .item .text .vip {
  821. font-size: 22rpx;
  822. color: #aaa;
  823. margin-top: 7rpx;
  824. }
  825. .productList .list .item .text .vip.on {
  826. margin-top: 12rpx;
  827. }
  828. .productList .list .item .text .vip .vip-money {
  829. font-size: 24rpx;
  830. color: #282828;
  831. font-weight: bold;
  832. }
  833. .productList .list .item .text .vip .vip-money image {
  834. width: 46rpx;
  835. height: 21rpx;
  836. margin-left: 4rpx;
  837. }
  838. .pictrue {
  839. position: relative;
  840. }
  841. // .fixed {
  842. // z-index: 100;
  843. // position: fixed;
  844. // left: 0;
  845. // top: 0;
  846. // background-color: #fff;
  847. // box-shadow: 0 10rpx 20rpx -5rpx rgba(0, 0, 0, 0.06);
  848. // }
  849. .combination-item {
  850. width: 328rpx;
  851. height: 180rpx;
  852. display: inline-block;
  853. background-size: 100%;
  854. position: relative;
  855. background-size: cover;
  856. border-radius: 16rpx;
  857. .img-box {
  858. width: 122rpx;
  859. height: 122rpx;
  860. position: absolute;
  861. image,.easy-loadimage,uni-image {
  862. width: 122rpx;
  863. height: 122rpx;
  864. }
  865. }
  866. .name {
  867. font-size: 30rpx;
  868. color: #333333;
  869. font-weight: bold;
  870. line-height: 32rpx;
  871. }
  872. .price {
  873. display: block;
  874. font-size: 30rpx;
  875. font-weight: bold;
  876. margin-top: 8rpx;
  877. color: #e93323;
  878. text {
  879. font-size: 20rpx;
  880. }
  881. }
  882. }
  883. </style>