index.vue 24 KB

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