index.vue 36 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345
  1. <template>
  2. <view>
  3. <view :class="bgTabVal==2?'fullsize noRepeat':bgTabVal==1?'repeat ysize':'noRepeat ysize'"
  4. :style="'background-color:'+bgColor+';background-image: url('+bgPic+');min-height:'+windowHeight+'px;'" id="home">
  5. <skeleton :show="showSkeleton" :isNodes="isNodes" ref="skeleton" loading="chiaroscuro" selector="skeleton" bgcolor="transparent"></skeleton>
  6. <view :style="{visibility: showSkeleton ? 'hidden' : 'visible'}">
  7. <view class="page-index skeleton" :class="{ bgf: navIndex > 0 }">
  8. <block>
  9. <!-- #ifdef H5 -->
  10. <homeComb v-if="smallPage" class="home-comb" :isScale="isScale" :isMenu="isMenu" :dataConfig="homeCombData" :userInfo="userInfo" :isFixed="isFixed" :isScrolled="isScrolled" @changeDiy="diyData"></homeComb>
  11. <view v-for="(item, index) in styleConfig" :key="index">
  12. <block v-if="item.name != 'headerSerch' && item.name != 'tabNav' && item.name != 'shopList' && item.name != 'homeComb' && item.name != 'hotRanking' && item.name != 'pageFoot'">
  13. <component
  14. :is="item.name"
  15. :index="index"
  16. :isFixed="isFixed"
  17. :dataConfig="item"
  18. :tempArr="tempArr"
  19. :userInfo="userInfo"
  20. :tabTitle="navTop"
  21. :navIndex="navIndex"
  22. @changeTab="changeTab"
  23. @detail="goDetail"
  24. v-show="navIndex == 0"
  25. ></component>
  26. </block>
  27. <block v-if="item.name == 'headerSerch'">
  28. <headerSerch
  29. :dataConfig="item"
  30. :tempArr="tempArr"
  31. :userInfo="userInfo"
  32. :tabTitle="navTop"
  33. @changeTab="changeTab"
  34. @detail="goDetail"
  35. ></headerSerch>
  36. </block>
  37. <block v-if="item.name == 'shopList' && hide_mer_status != 1 && navIndex == 0">
  38. <shopList :dataConfig="item"></shopList>
  39. </block>
  40. <block v-if="item.name == 'tabNav'">
  41. <tabNav
  42. :isFixed="isFixed"
  43. :dataConfig="item"
  44. :tempArr="tempArr"
  45. :userInfo="userInfo"
  46. :tabTitle="navTop"
  47. @changeTab="changeTab"
  48. @detail="goDetail"
  49. ></tabNav>
  50. </block>
  51. <block v-if="item.name == 'homeComb' && !smallPage">
  52. <homeComb :isMenu="isMenu" :dataConfig="item" :isFixed="isFixed" :isScrolled="isScrolled" :userInfo="userInfo" @changeDiy="diyData"></homeComb>
  53. </block>
  54. <block v-if="item.name == 'hotRanking' && hot_ranking_switch != 0 && navIndex == 0">
  55. <hotRanking :dataConfig="item"></hotRanking>
  56. </block>
  57. </view>
  58. <!-- #endif -->
  59. <!-- #ifdef MP || APP-PLUS -->
  60. <homeComb class="home-comb" v-if="smallPage" :isScale="isScale" :isMenu="isMenu" :dataConfig="homeCombData" :isFixed="isFixed" :isScrolled="isScrolled" :userInfo="userInfo" @changeDiy="diyData"></homeComb>
  61. <block v-for="(item, index) in styleConfig" :key="index" >
  62. <view v-show="navIndex == 0">
  63. <homeComb v-if="item.name == 'homeComb' && !smallPage" :isMenu="isMenu" :dataConfig="item" :isFixed="isFixed" :isScrolled="isScrolled" :userInfo="userInfo" @changeDiy="diyData"></homeComb>
  64. <activeParty v-if="item.name == 'activeParty'" :dataConfig="item"></activeParty>
  65. <bargain v-if="item.name == 'bargain'" :dataConfig="item"></bargain>
  66. <blankPage v-if="item.name == 'blankPage'" :dataConfig="item"></blankPage>
  67. <combination v-if="item.name == 'combination'" :dataConfig="item"></combination>
  68. <topic v-if="item.name == 'topic'" :dataConfig="item"></topic>
  69. <coupon v-if="item.name == 'coupon'" :dataConfig="item"></coupon>
  70. <customerService v-if="item.name == 'customerService'" :dataConfig="item"></customerService>
  71. <goodList v-if="item.name == 'goodList'" :dataConfig="item" @detail="goDetail"></goodList>
  72. <guide v-if="item.name == 'guide'" :dataConfig="item"></guide>
  73. <liveBroadcast v-if="item.name == 'liveBroadcast'" :dataConfig="item"></liveBroadcast>
  74. <menus :class="isMenu ? 'transform-view' : ''" v-if="item.name == 'menus'" :dataConfig="item"></menus>
  75. <news v-if="item.name == 'news'" :dataConfig="item"></news>
  76. <presellList v-if="item.name == 'presellList'" :dataConfig="item"></presellList>
  77. <plantList v-if="item.name == 'plantList'" :dataConfig="item"></plantList>
  78. <hotRanking v-if="item.name == 'hotRanking' && hot_ranking_switch != 0" :dataConfig="item"></hotRanking>
  79. <promotionList v-if="item.name == 'promotionList'" :dataConfig="item" @changeTab="changeTab" :tempArr="tempArr" @detail="goDetail"></promotionList>
  80. <richText v-if="item.name == 'richText'" :dataConfig="item"></richText>
  81. <seckill v-if="item.name == 'seckill'" :dataConfig="item"></seckill>
  82. <swiperBg v-if="item.name == 'swiperBg'" :dataConfig="item"></swiperBg>
  83. <pictureCube v-if="item.name == 'pictureCube'" :dataConfig="item"></pictureCube>
  84. <titles v-if="item.name == 'titles'" :dataConfig="item"></titles>
  85. <shopList v-if="item.name == 'shopList' && hide_mer_status != 1" :dataConfig="item"></shopList>
  86. </view>
  87. <headerSerch v-if="item.name == 'headerSerch'" :dataConfig="item" :userInfo="userInfo"></headerSerch>
  88. <tabNav v-if="item.name == 'tabNav'" :dataConfig="item" class="tabNav" :tabTitle="navTop"
  89. @changeTab="changeTab" :isFixed="isFixed"></tabNav>
  90. </block>
  91. <!-- #endif -->
  92. </block>
  93. <!-- 分类页 -->
  94. <view class="productList" v-if="navIndex > 0">
  95. <view class="sort acea-row" v-if="sortList.length>0" :style="{ marginTop: sortMarTop + 'px' }">
  96. <navigator
  97. hover-class="none"
  98. v-if="index < 9"
  99. :url="'/pages/columnGoods/goods_list/index?id=' + item.store_category_id + '&title=' + item.cate_name"
  100. class="item"
  101. v-for="(item, index) in sortList"
  102. :key="item.store_category_id"
  103. >
  104. <view class="pictrue cate_pictrue">
  105. <easy-loadimage :image-src="item.pic"></easy-loadimage>
  106. <view v-if="item.border_pic" :style="{ backgroundImage: `url(${item.border_pic})` }" class="border-picture"></view>
  107. </view>
  108. <view class="text">{{ item.cate_name }}</view>
  109. </navigator>
  110. <view class="item" @click="bindMore" v-if="sortList.length >= 9">
  111. <view class="pictrues acea-row row-center-wrapper"><text class="iconfont icon-gengduo1"></text></view>
  112. <view class="text" style="margin-top: 22rpx;">更多</view>
  113. </view>
  114. </view>
  115. <block v-if="sortProduct.length > 0">
  116. <view class="list acea-row row-between-wrapper">
  117. <navigator @tap="goDetails(item)" class="item" v-for="(item, index) in sortProduct" :key="item.product_id">
  118. <view class="pictrue">
  119. <easy-loadimage :image-src="item.image"></easy-loadimage>
  120. <view v-if="item.border_pic" :style="{ backgroundImage: `url(${item.border_pic})` }" class="border-picture"></view>
  121. </view>
  122. <view class="text">
  123. <view class="name line1">
  124. <text class="name_text line2">{{ item.store_name }}</text>
  125. </view>
  126. <view class="acea-row row-middle">
  127. <view class="money font-color-red">
  128. <text class="num">{{ item.price }}</text>
  129. </view>
  130. </view>
  131. <view class="item_tags acea-row">
  132. <text v-if="item.merchant.type_name && item.product_type == 0" class="font-bg-red">{{ item.merchant.type_name }}</text>
  133. <text v-else-if="item.merchant.is_trader && item.product_type == 0" class="font-bg-red">自营</text>
  134. <text v-if="item.product_type != 0" :class="'font_bg-red type' + item.product_type">
  135. {{ item.product_type == 1 ? '秒杀' : item.product_type == 2 ? '预售' : item.product_type == 3 ? '助力' : item.product_type == 4 ? '拼团' : '' }}
  136. </text>
  137. <text class="tags_item ticket" v-if="item.issetCoupon">领券</text>
  138. <text class="tags_item delivery" v-if="item.delivery_free == 1">包邮</text>
  139. </view>
  140. </view>
  141. </navigator>
  142. <view class="loadingicon acea-row row-center-wrapper" v-if="sortProduct.length > 0 || sortProductLoading">
  143. <text class="loading iconfont icon-jiazai" :hidden="loading == false"></text>
  144. {{ loadTitle }}
  145. </view>
  146. </view>
  147. </block>
  148. <block v-if="sortProduct.length == 0">
  149. <view class="noCommodity">
  150. <view class="pictrue" style="margin: 0 auto;">
  151. <image :src="`${domain}/static/images/noCart.png`"></image>
  152. <view>暂无商品,去看点什么吧</view>
  153. </view>
  154. </view>
  155. </block>
  156. </view>
  157. </view>
  158. </view>
  159. <home></home>
  160. </view>
  161. </view>
  162. </template>
  163. <script>
  164. // +----------------------------------------------------------------------
  165. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  166. // +----------------------------------------------------------------------
  167. // | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
  168. // +----------------------------------------------------------------------
  169. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  170. // +----------------------------------------------------------------------
  171. // | Author: CRMEB Team <admin@crmeb.com>
  172. // +----------------------------------------------------------------------
  173. let app = getApp();
  174. import { getUserInfo } from '@/api/user.js';
  175. import { getPageDiy, getIndexData } from '@/api/api.js';
  176. import { getStorage } from '@/libs/uniApi.js';
  177. // #ifdef MP-WEIXIN
  178. import { SUBSCRIBE_MESSAGE, TIPS_KEY } from '@/config/cache';
  179. // #endif
  180. import { getShare, getconfig } from '@/api/public.js';
  181. import { goShopDetail } from '@/libs/order.js';
  182. import { mapGetters } from 'vuex';
  183. import { getProductslist, storeCategory } from '@/api/store.js';
  184. import { initiateAssistApi } from '@/api/activity.js';
  185. import { spread } from '@/api/user.js';
  186. import recommend from '@/components/recommend';
  187. // #ifdef H5
  188. import mConfig from '../index/component/index.js';
  189. // #endif
  190. import customTab from '@/components/customTab';
  191. // #ifdef MP || APP-PLUS
  192. import activeParty from '../index/component/activeParty';
  193. import headerSerch from '../index/component/headerSerch';
  194. import homeComb from '../index/component/homeComb';
  195. import coupon from '../index/component/coupon';
  196. import bargain from '../index/component/bargain';
  197. import blankPage from '../index/component/blankPage';
  198. import combination from '../index/component/combination';
  199. import customerService from '../index/component/customerService';
  200. import goodList from '../index/component/goodList';
  201. import guide from '../index/component/guide';
  202. import liveBroadcast from '../index/component/liveBroadcast';
  203. import menus from '../index/component/menus';
  204. import news from '../index/component/news';
  205. import topic from '../index/component/topic';
  206. import presellList from '../index/component/presellList';
  207. import plantList from '../index/component/plantList';
  208. import pictureCube from '../index/component/pictureCube'
  209. import shopList from '../index/component/shopList';
  210. import richText from '../index/component/richText';
  211. import seckill from '../index/component/seckill';
  212. import swiperBg from '../index/component/swiperBg';
  213. import tabNav from '../index/component/tabNav';
  214. import titles from '../index/component/titles';
  215. import hotRanking from "../index/component/hotRanking.vue";
  216. // #endif
  217. import { silenceBindingSpread, configMap, isWeixin } from '@/utils/index';
  218. import history from '@/mixins/history';
  219. import shareScence from '@/libs/spread';
  220. import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
  221. import {getNewPeopleCouponLst} from '@/api/activity.js'
  222. import { HTTP_REQUEST_URL } from '@/config/app';
  223. import home from '@/components/home/index.vue';
  224. import { toLogin } from '@/libs/login.js';
  225. export default {
  226. computed: configMap({hide_mer_status:0,recommend_switch:0,beian_sn:'',share_title:'',site_name:'',hot_ranking_switch:0,navigation: {}},
  227. mapGetters(['isLogin','uid','keyColor'])),
  228. mixins: [history],
  229. components: {
  230. easyLoadimage,
  231. home,
  232. // #ifdef H5
  233. ...mConfig,
  234. // #endif
  235. // #ifdef MP || APP-PLUS
  236. activeParty,
  237. headerSerch,
  238. homeComb,
  239. bargain,
  240. coupon,
  241. blankPage,
  242. combination,
  243. customerService,
  244. goodList,
  245. guide,
  246. liveBroadcast,
  247. menus,
  248. news,
  249. topic,
  250. presellList,
  251. plantList,
  252. pictureCube,
  253. shopList,
  254. richText,
  255. seckill,
  256. swiperBg,
  257. tabNav,
  258. titles,
  259. hotRanking
  260. // #endif
  261. },
  262. data() {
  263. return {
  264. domain: HTTP_REQUEST_URL,
  265. couponTypeMsg:{
  266. 10: '通用券',
  267. 11: '品类券',
  268. 12: '跨店券'
  269. },
  270. styleConfig: [],
  271. showSkeleton: true, //骨架屏显示隐藏
  272. isNodes: 0, //控制什么时候开始抓取元素节点,只要数值改变就重新抓取
  273. userInfo: {},
  274. loading: false,
  275. navIndex: 0,
  276. navTop: [],
  277. subscribe: false,
  278. followUrl: '',
  279. followHid: true,
  280. followCode: false,
  281. sortList: [],
  282. window: false,
  283. navH: '',
  284. couponList: [],
  285. marTop: 0,
  286. loadend: false,
  287. loading: false,
  288. loadTitle: '加载更多',
  289. sortProduct: [],
  290. where: {
  291. pid: 0,
  292. page: 1,
  293. limit: 6
  294. },
  295. is_switch: true,
  296. hotPage: 1,
  297. hotLimit: 30,
  298. hotScroll: true,
  299. hotLoading: false,
  300. hotTitle: '加载更多',
  301. // #ifdef MP || APP-PLUS
  302. isFixed: true,
  303. // #endif
  304. // #ifdef H5
  305. isFixed: false,
  306. // #endif
  307. isScrolled: false,
  308. scrolled: false,
  309. tempArr: [], //精品推荐临时数组
  310. d: '',
  311. h: '',
  312. m: '',
  313. s: '',
  314. sum_h: '',
  315. sortMarTop: 0,
  316. // #ifdef MP || APP-PLUS
  317. mpHeight: 108,
  318. // #endif
  319. // #ifndef MP || APP-PLUS
  320. mpHeight: 0,
  321. // #endif
  322. currSpid: '',
  323. _options:{},
  324. isIntegral: false,
  325. appUpdate: {},
  326. bgColor: '',
  327. bgPic: '',
  328. bgTabVal: '',
  329. windowHeight: 0,
  330. domHeight: 0,
  331. isHeaderSerch: false,
  332. showCoupon: false,
  333. couponArray: [],
  334. smallPage: false,
  335. isMenu: false,
  336. isScale: false,
  337. homeCombData: {},
  338. footerStatus: false,
  339. newData: {},
  340. activeRouter: '',
  341. overflow: false,
  342. };
  343. },
  344. /**
  345. * 用户点击右上角分享
  346. */
  347. // #ifdef MP
  348. onShareAppMessage: function() {
  349. let that = this;
  350. wx.showShareMenu({
  351. withShareTicket: true,
  352. menus: ['shareAppMessage', 'shareTimeline']
  353. });
  354. return {
  355. title: that.share_title,
  356. path: '/pages/index/index?spid=' + that.uid
  357. };
  358. },
  359. onShareTimeline: function() {
  360. let that = this;
  361. return {
  362. title: that.share_title,
  363. query: {
  364. spid: that.uid
  365. },
  366. imageUrl: ''
  367. };
  368. },
  369. // #endif
  370. onLoad(options) {
  371. let that = this
  372. this._options = options;
  373. that.$nextTick(function() {
  374. uni.getSystemInfo({
  375. success: function(res) {
  376. that.windowHeight = res.windowHeight;
  377. }
  378. });
  379. })
  380. that.pageLoad(options);
  381. },
  382. created(options) {
  383. let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
  384. let curRoute = routes[routes.length - 1].route //获取当前页面路由
  385. this.activeRouter = '/' + curRoute
  386. },
  387. onShow() {
  388. let that = this
  389. that.isIntegral = uni.getStorageSync('isIntegral')
  390. that.$nextTick(function() {
  391. const query = uni.createSelectorQuery();
  392. query.select('#home').boundingClientRect(); //获取当前元素距离顶部的距离
  393. query.exec(res =>{
  394. if(res[0].top <= -60)that.isScrolled = true
  395. })
  396. })
  397. },
  398. onHide() {
  399. uni.setStorageSync('isIntegral',false)
  400. },
  401. onReady() {
  402. },
  403. watch: {
  404. },
  405. onPullDownRefresh(){
  406. this.overflow = true;
  407. },
  408. methods: {
  409. pageLoad(options){
  410. let that = this;
  411. if (options.spid) {
  412. that.currSpid = options.spid;
  413. app.globalData.spid = options.spid;
  414. }else if(getStorage('spid')){
  415. that.currSpid = getStorage('spid');
  416. app.globalData.spid = getStorage('spid');
  417. }
  418. // #ifdef MP
  419. if (options.scene) {
  420. let value = that.$util.getUrlParams(decodeURIComponent(options.scene));
  421. if (value.id) options.id = value.id;
  422. //记录推广人uid
  423. if (value.spid) {
  424. that.currSpid = value.spid;
  425. app.globalData.spid = value.spid;
  426. }else if(getStorage('spid')){
  427. that.currSpid = getStorage('spid');
  428. app.globalData.spid = getStorage('spid');
  429. }
  430. }
  431. // #endif
  432. shareScence(that.currSpid, that.isLogin);
  433. this.isLogin && silenceBindingSpread();
  434. this.getIndexConfig();
  435. Promise.all([
  436. this.diyData(options.id),
  437. ]);
  438. if (this.isLogin) {
  439. this.getUserInfo();
  440. }
  441. },
  442. closeShare(){
  443. uni.setStorageSync('isIntegral',false);
  444. this.isIntegral = uni.getStorageSync('isIntegral');
  445. },
  446. // 对象转数组
  447. objToArr(data) {
  448. let obj = Object.keys(data).sort();
  449. let m = obj.map(key => data[key]);
  450. return m;
  451. },
  452. diyData(id) {
  453. let that = this;
  454. let data = {
  455. id: id
  456. }
  457. that.styleConfig = []
  458. getPageDiy({id: id,version:'221'}).then(res => {
  459. setTimeout(() => {
  460. that.isNodes++;
  461. }, 0);
  462. let data = res.data;
  463. uni.setNavigationBarTitle({
  464. title: data.title
  465. });
  466. if (data.is_bg_color) {
  467. that.bgColor = data.color_picker
  468. }
  469. if (data.is_bg_pic) {
  470. that.bgPic = data.bg_pic
  471. that.bgTabVal = data.bg_tab_val
  472. }
  473. that.styleConfig = that.objToArr(data.value);
  474. that.styleConfig.forEach((item, index, arr) => {
  475. if (item.name == 'headerSerch' || item.name == 'homeComb') {
  476. that.isHeaderSerch = true
  477. if(item.name == 'homeComb'){
  478. // that.homeCombData = item
  479. that.$set(that, 'homeCombData', item)
  480. that.smallPage = true;
  481. }
  482. }
  483. if (item.name == 'pageFoot') {
  484. if (item.status && item.status.status) {
  485. this.newData = item
  486. setTimeout((e) => {
  487. that.$set(that, 'footerStatus', true);
  488. }, 50)
  489. }
  490. uni.setStorageSync('FOOTER_BAR', item.status && item.status.status ? true : false)
  491. item.menuList.map((path, index) => {
  492. if (path.link === '/pages/order_addcart/order_addcart') {
  493. uni.setStorageSync('FOOTER_ADDCART', index)
  494. }
  495. })
  496. arr.splice(index, 1);
  497. }
  498. if(item.name == 'menus'){
  499. that.isMenu = true;
  500. }
  501. uni.pageScrollTo({
  502. scrollTop: 0,
  503. })
  504. that.overflow = false;
  505. });
  506. }).catch(err => {
  507. uni.showToast({
  508. title: err,
  509. icon: 'none'
  510. })
  511. });
  512. },
  513. // 分类页更多
  514. bindMore() {
  515. try {
  516. uni.setStorageSync('storeIndex', this.navTop[this.navIndex].pid);
  517. uni.switchTab({
  518. url: '/pages/goods_cate/goods_cate'
  519. });
  520. } catch (e) {}
  521. },
  522. goDetails(item) {
  523. goShopDetail(item, this.uid).then(res => {
  524. if (this.isLogin) {
  525. initiateAssistApi(item.activity_id)
  526. .then(res => {
  527. let id = res.data.product_assist_set_id;
  528. uni.hideLoading();
  529. uni.navigateTo({
  530. url: '/pages/activity/assist_detail/index?id=' + id
  531. });
  532. })
  533. .catch(err => {
  534. uni.showToast({
  535. title: err,
  536. icon: 'none'
  537. });
  538. });
  539. } else {
  540. toLogin()
  541. }
  542. });
  543. },
  544. /**
  545. * 获取个人用户信息
  546. */
  547. getUserInfo: function() {
  548. let that = this;
  549. getUserInfo().then(res => {
  550. that.userInfo = res.data;
  551. });
  552. },
  553. // 导航分类切换
  554. changeTab(e) {
  555. let self = this;
  556. if (this.navIndex == e.index) return;
  557. this.navIndex = e.index;
  558. if (e.index > 0) {
  559. storeCategory({
  560. pid: e.pid
  561. }).then(res => {
  562. this.sortList = res.data.length > 9 ? res.data.splice(0, 9) : res.data;
  563. if (this.sortList.length > 0) {
  564. this.where.pid = e.pid;
  565. this.where.page = 1;
  566. this.loadend = false;
  567. this.loading = false;
  568. this.sortProduct = [];
  569. this.get_product_list();
  570. uni.pageScrollTo({
  571. scrollTop: 0,
  572. })
  573. }
  574. });
  575. self.sortMarTop = 10;
  576. }
  577. },
  578. //分类产品
  579. get_product_list: function() {
  580. let that = this;
  581. if (that.loading) return;
  582. that.loading = true;
  583. that.loadTitle = '';
  584. getProductslist(that.where)
  585. .then(res => {
  586. let list = res.data.list;
  587. let productList = that.$util.SplitArray(list, that.sortProduct);
  588. let loadend = list.length < that.where.limit;
  589. that.loadend = loadend;
  590. that.loading = false;
  591. that.loadTitle = loadend ? '已全部加载' : '加载更多';
  592. that.$set(that, 'sortProduct', productList);
  593. that.$set(that.where, 'page', that.where.page + 1);
  594. })
  595. .catch(err => {
  596. that.loading = false;
  597. that.loadTitle = '加载更多';
  598. });
  599. },
  600. // 首页数据
  601. getIndexConfig: function() {
  602. let that = this;
  603. getIndexData().then(res => {
  604. res.data.category.unshift({
  605. cate_name: '首页'
  606. });
  607. that.$set(that, 'navTop', res.data.category);
  608. // #ifdef H5
  609. that.subscribe = res.data.subscribe;
  610. // #endif
  611. // 小程序判断用户是否授权;
  612. // #ifdef MP
  613. uni.getSetting({
  614. success(res) {
  615. if (!res.authSetting['scope.userInfo']) {
  616. that.window = that.couponList.length ? true : false;
  617. } else {
  618. that.window = false;
  619. }
  620. }
  621. });
  622. // #endif
  623. // #ifndef MP
  624. if (that.isLogin) {
  625. that.window = false;
  626. } else {
  627. that.window = that.couponList.length ? true : false;
  628. }
  629. // #endif
  630. that.reloadData();
  631. });
  632. },
  633. reloadData() {
  634. setTimeout(() => {
  635. this.showSkeleton = false
  636. }, 500)
  637. },
  638. // 首发新品详情
  639. goDetail(item) {
  640. if (item.activity && item.activity.type === '2' && !this.isLogin) {
  641. // #ifdef H5
  642. uni.showModal({
  643. title: '提示',
  644. content: '您未登录,请登录!',
  645. success: function(res) {
  646. if (res.confirm) {
  647. uni.navigateTo({
  648. url: '/pages/users/login/index'
  649. });
  650. } else if (res.cancel) {
  651. }
  652. }
  653. });
  654. // #endif
  655. // #ifdef MP
  656. toLogin()
  657. // #endif
  658. return;
  659. } else {
  660. goShopDetail(item, this.uid).then(res => {
  661. uni.navigateTo({
  662. url: `/pages/goods_details/index?id=${item.id}`
  663. });
  664. });
  665. }
  666. },
  667. },
  668. mounted() {
  669. let query = uni.createSelectorQuery().in(this);
  670. query.select("#home").boundingClientRect();
  671. query.exec(res => {
  672. this.domHeight = res[0].height;
  673. })
  674. },
  675. // 滚动到底部
  676. onReachBottom() {
  677. // 分类栏目加载更多
  678. if (this.sortProduct.length > 0) {
  679. this.get_product_list();
  680. }
  681. },
  682. // 滚动监听
  683. onPageScroll(e) {
  684. if (this.isHeaderSerch) {
  685. let isScroll = false
  686. isScroll = e.scrollTop > 50
  687. this.isScrolled = isScroll;
  688. } else {
  689. this.isScrolled = false
  690. }
  691. // 传入scrollTop值并触发所有easy-loadimage组件下的滚动监听事件
  692. uni.$emit('scroll');
  693. }
  694. };
  695. </script>
  696. <style>
  697. </style>
  698. <style lang="scss" scoped>
  699. .bnt1{
  700. color: red;
  701. }
  702. .overflow-mask{
  703. position: fixed;
  704. top: 0;
  705. left: 0;
  706. z-index: 1001;
  707. width: 100%;
  708. height: 100vh;
  709. background: transparent;
  710. transition: all .5s;
  711. }
  712. page {
  713. display: flex;
  714. flex-direction: column;
  715. }
  716. /deep/ .home-comb .my-main{
  717. left: 0;
  718. position: fixed;
  719. top: 0;
  720. width: 100%;
  721. z-index: 30;
  722. }
  723. .main {
  724. padding: 0 20rpx;
  725. }
  726. .colum0{
  727. white-space: nowrap;
  728. display: flex;
  729. }
  730. .ysize {
  731. background-size: 100%;
  732. }
  733. .fullsize {
  734. background-size: 100% 100%;
  735. }
  736. .repeat {
  737. background-repeat: repeat;
  738. }
  739. .noRepeat {
  740. background-repeat: no-repeat;
  741. }
  742. .privacy-wrapper {
  743. z-index: 999;
  744. position: fixed;
  745. left: 0;
  746. top: 0;
  747. bottom: 0;
  748. right: 0;
  749. width: 100%;
  750. height: 100%;
  751. background: #7f7f7f;
  752. .privacy-box {
  753. position: absolute;
  754. left: 50%;
  755. top: 50%;
  756. transform: translate(-50%, -50%);
  757. width: 560rpx;
  758. padding: 50rpx 45rpx 0;
  759. background: #fff;
  760. border-radius: 20rpx;
  761. .title {
  762. text-align: center;
  763. font-size: 32rpx;
  764. text-align: center;
  765. color: #333;
  766. font-weight: 700;
  767. }
  768. .content {
  769. margin-top: 20rpx;
  770. line-height: 1.5;
  771. font-size: 26rpx;
  772. color: #666;
  773. navigator {
  774. display: inline-block;
  775. color: #e93323;
  776. }
  777. }
  778. .btn-box {
  779. margin-top: 40rpx;
  780. text-align: center;
  781. font-size: 30rpx;
  782. .btn-item {
  783. height: 82rpx;
  784. line-height: 82rpx;
  785. background: linear-gradient(90deg, #f67a38 0%, #f11b09 100%);
  786. color: #fff;
  787. border-radius: 41rpx;
  788. }
  789. .btn {
  790. padding: 30rpx 0;
  791. }
  792. }
  793. }
  794. }
  795. .coupon_popups{
  796. z-index: 999;
  797. position: fixed;
  798. left: 0;
  799. top: 0;
  800. width: 100%;
  801. height: 100%;
  802. text-align: center;
  803. .bg{
  804. position: absolute;
  805. left: 0;
  806. top: 0;
  807. width: 100%;
  808. height: 100%;
  809. background-color: rgba(0,0,0,.5);
  810. }
  811. .con{
  812. position: absolute;
  813. left: 50%;
  814. top: 50%;
  815. transform: translate(-50%,-50%);
  816. width: 680rpx;
  817. height:900rpx;
  818. background-size: 100% 700rpx;
  819. background-repeat: no-repeat;
  820. scroll-view{
  821. width: 610rpx;
  822. height: 306rpx;
  823. padding-top: 20rpx;
  824. margin: 300rpx auto 0;
  825. }
  826. .item{
  827. display: flex;
  828. align-items: center;
  829. width: 100%;
  830. height: 164rpx;
  831. background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABDgAAAFICAMAAACC1L7bAAAAilBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////2N2iNAAAALXRSTlMA9xnrZyf0790ev4d1Egr7cl9TI+XNbVpAtKSUjX0NB6ucgnpDMdjRxUw7LdTK5bIiAAAF40lEQVR42uzcWW7CMBSF4UNImAIBEcpUKJQixt79b68qD1VLgNi8VHL+bxHH9tH1VUE+SeedVs1QkMmNAYGotTrzdNJWiSRtGe7J5aRnQFh2m1z3ndeGB05ycjYgOPNct2WLvuGRoZxMDAhPbbnSDQmPlDKpnCwMCNE+UsGxYSixl5MXA4JUP+lKbCgXyUHbgED1J/pjbHAwloONAcGKqfP8jVYqlTUNCNdQPxKDmw+V6hoQsEZOm+et0VOJHiUzwnbgjPQ3Uwlm6BC6WBcRZ6SHpa7QMqNimj19ezd42OqBLcO3CF/K2IG/5lR3Tbm8oQIuVd/S4CfmnYJqiyXtDJ5eM92QdAyohI6UG7zVB7qWpQZUxRufVJ4z6kb65dytG1AZR80NzzkMTkkkKY/XpAaqJWVqFICvmfiSBcDTp1hnDsDTiFX+AHzVCA4A3ggOAAQHgAKCA8D/Izi+2KmDAQAAAAZC/tYDGMB9CiJAHMARB9ATByAO4IgD6IkDEAdwxAH0xAGIAzjiAHriAMQBHHEAPXEA4gCOOICeOABxAEccQE8cgDiAIw6gJw5AHMARB9ATByAOxk4dDAAAADAQ8rcewADuUxDBEQfQEwcgDuCIA+iJAxAHcMQB9MQBiAM44gB64gDEARxxAD1xAOIAjjiAnjgAcQBHHEBPHIA4gCMOoCcOQBzAEQfQEwcgDuCIA+iJAxAHcMQB9MQBiAM44gB64gDEARxxAD1xAOIAjjiAnjgAcQBHHEBPHIA4gCMOoCcOQBzAEQfQEwcgDuCIA+iJAxAHcMQB9MQBjJ06GAAAAGAg5G89gAHcpyASB3DEAfTEAYgDOOIAeuIAxAEccQA9cQDiAI44gJ44AHEARxxATxyAOIAjDqAnDkAcwBEH0BMHIA7giAPoiQMQB3DEAfTEAYgDOOIAeuIAxAEccQA9cQDiAI44gJ44AHEARxxATxyAOIAjDqAnDkAcwBEH0BMHIA7giAPoiQMQB3DEAfTEAYgDOOIAeuIAxAEccQA9cTB26mAAAACAgZC/9QAOYJ+CCMQBhDiAP3EA4gBCHMCfOABxACEO4E8cgDiAEAfwJw5AHECIA/gTByAOIMQB/IkDEAcQ4gD+xAGIAwhxAH/iAMQBhDiAP3EA4gBCHMCfOABxACEO4E8cgDiAEAfwJw5AHECIA/gTByAOIMQB/IkDEAcQ4gD+xAGIAwhxAH/iAMQBhDiAP3EA4gBCHMCfOABxACEOYOzUwQAAAAADIX/rAQzgPgVRTxyAOIAjDqAnDkAcwBEH0BMHIA7giAPoiQMQB3DEAfTEAYgDOOIAeuIAxAEccQA9cQDiAI44gJ44AHEARxxATxyAOIAjDqAnDkAcwBEH0BMHIA7giAPoiQMQB3DEAfTEAYgDOOIAeuIAxAEccQA9cQDiAI44gJ44AHEARxxATxyAOIAjDqAnDkAcwBEH0BMHIA7giIOxU4cEAIBAEMBAIUny/esR4BTqzBZi0CcOQBxAEAfQJw5AHEAQB9AnDkAcQBAH0CcOQBxAEAfQJw5AHEAQB9AnDkAcQBAH0CcOQBxAEAfQt+4AfNnrDK+dO8tNGIaiMHwSoBAKlERAQ4FQhnSQeve/vaoPRVWayTza/7cI2/ecKwNwMtDEAMDJRFMDACdb7Qz3WZ3SRJqX2fJ1YEBI9no23GGyGemP8sLZgYBkig3uLqpaLDk6EIy5tDY42iaqsTgZEISppJnBSZSqwdKAEAwlZhVHg1KNcrZiEICHQhK9ipOoVIucRVz476wfcWToLVOroQGeG8wlkXI42akF7zeE4BbyvRv6WS3UoaCVhd+m+jUy9JPqhmoFQRrHukkNfUzU7bgywF+fXJPONmpFZATvDSttAD1it6hQMwY/+O8pVcWV3aVOW/XBFyfw1TjXP8mXod1MvewN8NE6Vo3jmU2wdrlaEDXDb9HhqHqjF0OLWL1cDfDOKVGz5PBmaCKJdBQhWl9idUiy/QczSy31UxjgjYfpYxar6hufchGebA48QgAAAABJRU5ErkJggg==');
  832. background-repeat: no-repeat;
  833. background-size: 100% 100%;
  834. margin-bottom: 20rpx;
  835. border-radius: 20rpx;
  836. position: relative;
  837. .left{
  838. width: 160rpx;
  839. text-align: center;
  840. &::after{
  841. content: "";
  842. display: block;
  843. height: 110rpx;
  844. border-right: 1px dashed #E6E6E6;
  845. position: absolute;
  846. left: 178rpx;
  847. top: 25rpx;
  848. }
  849. .price{
  850. color: #E93323;
  851. font-size: 26rpx;
  852. font-weight: bold;
  853. text{
  854. font-size: 46rpx;
  855. }
  856. }
  857. .max_price{
  858. color: #999999;
  859. font-size: 18rpx;
  860. margin-top: 8rpx;
  861. }
  862. }
  863. .right{
  864. width: 440rpx;
  865. padding: 0 20rpx;
  866. .title{
  867. color: #333333;
  868. font-size: 26rpx;
  869. }
  870. .time{
  871. color: #999999;
  872. font-size: 22rpx;
  873. margin-top: 20rpx;
  874. }
  875. .bnt1{
  876. .titleSize{
  877. font-weight: 700;
  878. font-size: 33rpx;
  879. }
  880. .titleColor{
  881. margin-top: 20rpx;
  882. color: #999999;
  883. }
  884. }
  885. .coupon_type{
  886. position: absolute;
  887. color: #fff;
  888. font-size: 15rpx;
  889. width: 30rpx;
  890. text-align: center;
  891. height: auto;
  892. background: #E93323;
  893. top: 0;
  894. right: 20rpx;
  895. line-height: 26rpx;
  896. padding: 5rpx 0 15rpx;
  897. &::after{
  898. content: "";
  899. width: 0;
  900. height: 0;
  901. border-left: 14rpx solid transparent;
  902. border-right: 14rpx solid transparent;
  903. border-bottom: 14rpx solid #fff;
  904. position: absolute;
  905. bottom: -4rpx;
  906. left: 2rpx;
  907. }
  908. }
  909. }
  910. }
  911. .text{
  912. width: 600rpx;
  913. margin: 30rpx auto 0;
  914. font-size: 20rpx;
  915. color: #ffffff;
  916. }
  917. .icon-guanbi3{
  918. color: #ffffff;
  919. font-size: 70rpx;
  920. position: absolute;
  921. bottom: -80rpx;
  922. left: 320rpx;
  923. }
  924. }
  925. }
  926. .item_tags{
  927. margin-top: 8rpx;
  928. display: flex;
  929. }
  930. .item_tags .tags_item {
  931. display: inline-block;
  932. font-size: 20rpx;
  933. text-align: center;
  934. border-radius: 5rpx;
  935. padding: 0 4rpx;
  936. line-height: 28rpx;
  937. margin-right: 8rpx;
  938. }
  939. .item_tags .tags_item.ticket{
  940. color: var(--view-theme);
  941. border: 1px solid var(--view-theme);
  942. }
  943. .item_tags .tags_item.delivery{
  944. color: #FF9000;
  945. border: 1px solid #FF9000;
  946. }
  947. .copyRight{
  948. margin: 60rpx auto 20rpx;
  949. max-width: 690rpx;
  950. font-size: 20rpx;
  951. color: #707070;
  952. text-decoration: none;
  953. }
  954. .share-box {
  955. z-index: 1000;
  956. position: fixed;
  957. left: 0;
  958. top: 0;
  959. width: 100%;
  960. height: 100%;
  961. image {
  962. width: 100%;
  963. height: 100%;
  964. }
  965. }
  966. .error-network {
  967. position: fixed;
  968. left: 0;
  969. top: 0;
  970. display: flex;
  971. flex-direction: column;
  972. align-items: center;
  973. width: 100%;
  974. height: 100%;
  975. padding-top: 40rpx;
  976. background: #fff;
  977. padding-top: 30%;
  978. image {
  979. width: 414rpx;
  980. height: 336rpx;
  981. }
  982. .title {
  983. position: relative;
  984. top: -40rpx;
  985. font-size: 32rpx;
  986. color: #666;
  987. }
  988. .con {
  989. font-size: 24rpx;
  990. color: #999;
  991. .label {
  992. margin-bottom: 20rpx;
  993. }
  994. .item {
  995. margin-bottom: 20rpx;
  996. }
  997. }
  998. .btn {
  999. display: flex;
  1000. align-items: center;
  1001. justify-content: center;
  1002. width: 508rpx;
  1003. height: 86rpx;
  1004. margin-top: 100rpx;
  1005. border: 1px solid #d74432;
  1006. color: #e93323;
  1007. font-size: 30rpx;
  1008. border-radius: 120rpx;
  1009. }
  1010. }
  1011. .area-row {
  1012. overflow: hidden;
  1013. text-overflow: ellipsis;
  1014. white-space: nowrap;
  1015. display: block;
  1016. width: 100%;
  1017. text-align: center;
  1018. }
  1019. .page-index {
  1020. display: flex;
  1021. flex-direction: column;
  1022. min-height: 100%;
  1023. .page_content {
  1024. /* #ifdef MP || APP-PLUS */
  1025. padding-top: 270rpx;
  1026. /* #endif */
  1027. .page_bg{
  1028. background: linear-gradient(180deg, #fff 0%, #f5f5f5 100%);
  1029. }
  1030. .nav {
  1031. padding: 0 0rpx 30rpx;
  1032. flex-wrap: wrap;
  1033. /* #ifdef MP */
  1034. margin-top: 0;
  1035. /* #endif */
  1036. /* #ifdef H5 */
  1037. margin-top: 0;
  1038. /* #endif */
  1039. .item {
  1040. display: flex;
  1041. flex-direction: column;
  1042. align-items: center;
  1043. justify-content: center;
  1044. width: 20%;
  1045. margin-top: 30rpx;
  1046. image {
  1047. width: 82rpx;
  1048. height: 82rpx;
  1049. }
  1050. }
  1051. }
  1052. .index-product-wrapper {
  1053. .nav-bd {
  1054. display: flex;
  1055. align-items: center;
  1056. .item {
  1057. display: flex;
  1058. flex-direction: column;
  1059. align-items: center;
  1060. justify-content: center;
  1061. width: 25%;
  1062. .txt {
  1063. font-size: 32rpx;
  1064. color: #282828;
  1065. }
  1066. .label {
  1067. display: flex;
  1068. align-items: center;
  1069. justify-content: center;
  1070. width: 124rpx;
  1071. height: 32rpx;
  1072. margin-top: 5rpx;
  1073. font-size: 24rpx;
  1074. color: #999;
  1075. }
  1076. &.active {
  1077. color: $theme-color;
  1078. .label {
  1079. background: linear-gradient(90deg, $bg-star 0%, $bg-end 100%);
  1080. border-radius: 16rpx;
  1081. color: #fff;
  1082. }
  1083. }
  1084. }
  1085. }
  1086. .list-box {
  1087. display: flex;
  1088. flex-wrap: wrap;
  1089. justify-content: space-between;
  1090. .item {
  1091. width: 345rpx;
  1092. margin-bottom: 20rpx;
  1093. background-color: #fff;
  1094. border-radius: 10px;
  1095. overflow: hidden;
  1096. image {
  1097. width: 100%;
  1098. height: 345rpx;
  1099. }
  1100. .text-info {
  1101. padding: 10rpx 20rpx 15rpx;
  1102. .title {
  1103. color: #222222;
  1104. }
  1105. .old-price {
  1106. margin-top: 8rpx;
  1107. font-size: 26rpx;
  1108. color: #aaaaaa;
  1109. text-decoration: line-through;
  1110. text {
  1111. margin-right: 2px;
  1112. font-size: 20rpx;
  1113. }
  1114. }
  1115. .price {
  1116. display: flex;
  1117. align-items: flex-end;
  1118. color: $theme-color;
  1119. font-size: 34rpx;
  1120. font-weight: 800;
  1121. text {
  1122. padding-bottom: 4rpx;
  1123. font-size: 24rpx;
  1124. font-weight: normal;
  1125. }
  1126. .txt {
  1127. display: flex;
  1128. align-items: center;
  1129. justify-content: center;
  1130. width: 28rpx;
  1131. height: 28rpx;
  1132. margin-left: 15rpx;
  1133. margin-bottom: 10rpx;
  1134. border: 1px solid $theme-color;
  1135. border-radius: 4rpx;
  1136. font-size: 22rpx;
  1137. font-weight: normal;
  1138. }
  1139. }
  1140. }
  1141. }
  1142. &.on {
  1143. display: flex;
  1144. }
  1145. }
  1146. }
  1147. }
  1148. }
  1149. .productList {
  1150. background-color: #f1f1f1;
  1151. min-height: 70vh;
  1152. .sort {
  1153. width: 710rpx;
  1154. max-height: 380rpx;
  1155. background: rgba(255, 255, 255, 1);
  1156. border-radius: 16rpx;
  1157. padding: 8rpx 0rpx 30rpx;
  1158. flex-wrap: wrap;
  1159. margin: 25rpx auto 0 auto;
  1160. .item {
  1161. width: 20%;
  1162. margin-top: 30rpx;
  1163. text-align: center;
  1164. .pictrues {
  1165. width: 90rpx;
  1166. height: 90rpx;
  1167. background: rgba(248, 248, 248, 1);
  1168. border-radius: 50%;
  1169. margin: 0 auto;
  1170. }
  1171. .easy-loadimage {
  1172. width: 90rpx;
  1173. height: 90rpx;
  1174. display: inline-block;
  1175. }
  1176. .text {
  1177. color: #272727;
  1178. font-size: 24rpx;
  1179. margin-top: 10rpx;
  1180. overflow: hidden;
  1181. white-space: nowrap;
  1182. text-overflow: ellipsis;
  1183. }
  1184. }
  1185. }
  1186. }
  1187. .productList .list {
  1188. padding: 0 20rpx;
  1189. }
  1190. .productList .list.on {
  1191. background-color: #fff;
  1192. border-top: 1px solid #f6f6f6;
  1193. }
  1194. .productList .list .item {
  1195. width: 345rpx;
  1196. margin-top: 20rpx;
  1197. background-color: #fff;
  1198. border-radius: 10rpx;
  1199. .name{
  1200. display: flex;
  1201. align-items: center;
  1202. }
  1203. }
  1204. .productList .list .item.on {
  1205. width: 100%;
  1206. display: flex;
  1207. border-bottom: 1px solid #f6f6f6;
  1208. padding: 30rpx 0;
  1209. margin: 0;
  1210. }
  1211. .productList .list .item .pictrue {
  1212. position: relative;
  1213. width: 100%;
  1214. height: 345rpx;
  1215. }
  1216. .productList .list .item .pictrue.on {
  1217. width: 180rpx;
  1218. height: 180rpx;
  1219. }
  1220. /deep/.productList .list .item .pictrue image,
  1221. /deep/.productList .list .item .pictrue uni-image,
  1222. /deep/.productList .list .item .pictrue .easy-loadimage{
  1223. width: 100%;
  1224. height: 100%;
  1225. border-radius: 10rpx 10rpx 0 0;
  1226. }
  1227. /deep/.productList .list .item .pictrue uni-image.origin-img{
  1228. border-radius: 10rpx 10rpx 0 0;
  1229. }
  1230. .productList .list .item .pictrue image.on {
  1231. border-radius: 6rpx;
  1232. }
  1233. .productList .list .item .text {
  1234. padding: 14rpx 17rpx 26rpx 17rpx;
  1235. font-size: 28rpx;
  1236. color: #212121;
  1237. }
  1238. .productList .list .item .text.on {
  1239. width: 508rpx;
  1240. padding: 0 0 0 22rpx;
  1241. }
  1242. .productList .list .item .text .money {
  1243. font-size: 26rpx;
  1244. font-weight: bold;
  1245. margin-top: 8rpx;
  1246. }
  1247. .productList .list .item .text .coupon {
  1248. background: rgba(255, 248, 247, 1);
  1249. border: 1px solid rgba(233, 51, 35, 1);
  1250. border-radius: 4rpx;
  1251. font-size: 20rpx;
  1252. margin-left: 18rpx;
  1253. padding: 1rpx 4rpx;
  1254. }
  1255. .productList .list .item .text .money.on {
  1256. margin-top: 50rpx;
  1257. }
  1258. .productList .list .item .text .money .num {
  1259. font-size: 34rpx;
  1260. }
  1261. .pictrue {
  1262. position: relative;
  1263. .border-picture {
  1264. position: absolute;
  1265. top: 0;
  1266. left: 0;
  1267. width: 100%;
  1268. height: 100%;
  1269. border-radius: 10rpx 10rpx 0 0;
  1270. background: center/cover no-repeat;
  1271. }
  1272. }
  1273. .cate_pictrue,/deep/.cate_pictrue image,/deep/.cate_pictrue .easy-loadimage,/deep/.cate_pictrue uni-image{
  1274. width: 82rpx;
  1275. height: 82rpx;
  1276. margin: 0 auto;
  1277. }
  1278. .fixed {
  1279. z-index: 100;
  1280. position: fixed;
  1281. left: 0;
  1282. top: 0;
  1283. background-color: #fff;
  1284. box-shadow: 0 10rpx 20rpx -5rpx rgba(0, 0, 0, 0.06);
  1285. }
  1286. .page-footer {
  1287. position: fixed;
  1288. bottom: 0;
  1289. z-index: 30;
  1290. display: flex;
  1291. align-items: center;
  1292. justify-content: space-around;
  1293. width: 100%;
  1294. height: calc(98rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  1295. height: calc(98rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  1296. box-sizing: border-box;
  1297. border-top: 1px solid #F3F3F3;
  1298. background-color: #fff;
  1299. box-shadow: 0px 0px 17rpx 1rpx rgba(206, 206, 206, 0.32);
  1300. padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
  1301. padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/
  1302. &.filter{
  1303. filter: blur(2rpx);
  1304. }
  1305. .foot-item {
  1306. display: flex;
  1307. width: max-content;
  1308. align-items: center;
  1309. justify-content: center;
  1310. flex-direction: column;
  1311. position: relative;
  1312. .count-num {
  1313. position: absolute;
  1314. display: flex;
  1315. justify-content: center;
  1316. align-items: center;
  1317. width: 40rpx;
  1318. height: 40rpx;
  1319. top: 0rpx;
  1320. right: -15rpx;
  1321. color: #fff;
  1322. font-size: 20rpx;
  1323. background-color: #FD502F;
  1324. border-radius: 50%;
  1325. padding: 4rpx;
  1326. }
  1327. }
  1328. .foot-item image {
  1329. height: 50rpx;
  1330. width: 50rpx;
  1331. text-align: center;
  1332. margin: 0 auto;
  1333. }
  1334. .foot-item .txt {
  1335. font-size: 24rpx;
  1336. }
  1337. }
  1338. </style>