| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770 |
- <template>
- <view :class="bgTabVal==2?'fullsize noRepeat':bgTabVal==1?'repeat ysize':'noRepeat ysize'"
- :style="'background-color:'+bgColor+';background-image: url('+bgPic+');min-height:'+windowHeight+'px;'">
- <skeleton :show="showSkeleton" :isNodes="isNodes" ref="skeleton" loading="chiaroscuro" selector="skeleton"
- bgcolor="#FFF"></skeleton>
- <view v-if="!errorNetwork" :style="{visibility: showSkeleton ? 'hidden' : 'visible'}">
- <view class="page-index skeleton" :class="{ bgf: navIndex > 0 }">
- <block>
- <!-- #ifdef H5 -->
- <view v-for="(item, index) in styleConfig" :key="index">
- <block v-if="item.name != 'headerSerch' && item.name != 'tabNav'">
- <component :is="item.name" :index="index" :isFixed="isFixed" :dataConfig="item"
- @changeBarg="changeBarg" :tempArr="tempArr" :userInfo="userInfo" :tabTitle="navTop"
- :navIndex="navIndex" @changeTab="changeTab" @detail="goDetail" v-show="navIndex == 0">
- </component>
- </block>
- <block v-if="item.name == 'headerSerch'">
- <component :is="'headerSerch'" :isFixed="isFixed" :dataConfig="item"
- @changeBarg="changeBarg" :tempArr="tempArr" :userInfo="userInfo" :tabTitle="navTop"
- @changeTab="changeTab" @detail="goDetail"></component>
- </block>
- <block v-if="item.name == 'tabNav'">
- <component :is="'tabNav'" :isFixed="isFixed" :dataConfig="item" @changeBarg="changeBarg"
- :tempArr="tempArr" :userInfo="userInfo" :tabTitle="navTop" @changeTab="changeTab"
- @detail="goDetail"></component>
- </block>
- </view>
- <!-- #endif -->
- <!-- #ifdef MP || APP-PLUS -->
- <block v-for="(item, index) in styleConfig" :key="index">
- <view v-show="navIndex == 0">
- <activeParty v-if="item.name == 'activeParty'" :dataConfig="item"></activeParty>
- <bargain v-if="item.name == 'bargain'" :dataConfig="item" @changeBarg="changeBarg">
- </bargain>
- <blankPage v-if="item.name == 'blankPage'" :dataConfig="item"></blankPage>
- <combination v-if="item.name == 'combination'" :dataConfig="item"></combination>
- <topic v-if="item.name == 'topic'" :dataConfig="item"></topic>
- <coupon v-if="item.name == 'coupon'" :dataConfig="item"></coupon>
- <customerService v-if="item.name == 'customerService'" :dataConfig="item"></customerService>
- <goodList v-if="item.name == 'goodList'" :dataConfig="item" @detail="goDetail"></goodList>
- <guide v-if="item.name == 'guide'" :dataConfig="item"></guide>
- <liveBroadcast v-if="item.name == 'liveBroadcast'" :dataConfig="item"></liveBroadcast>
- <menus v-if="item.name == 'menus'" :dataConfig="item"></menus>
- <news v-if="item.name == 'news'" :dataConfig="item"></news>
- <presellList v-if="item.name == 'presellList'" :dataConfig="item"></presellList>
- <plantList v-if="item.name == 'plantList'" :dataConfig="item"></plantList>
- <promotionList v-if="item.name == 'promotionList'" :dataConfig="item" @changeTab="changeTab"
- :tempArr="tempArr" @detail="goDetail"></promotionList>
- <richText v-if="item.name == 'richText'" :dataConfig="item"></richText>
- <seckill v-if="item.name == 'seckill'" :dataConfig="item"></seckill>
- <swiperBg v-if="item.name == 'swiperBg'" :dataConfig="item"></swiperBg>
- <pictureCube v-if="item.name == 'pictureCube'" :dataConfig="item"></pictureCube>
- <titles v-if="item.name == 'titles'" :dataConfig="item"></titles>
- <shopList v-if="item.name == 'shopList' && hide_mer_status != 1" :dataConfig="item">
- </shopList>
- </view>
- <headerSerch v-if="item.name == 'headerSerch'" :dataConfig="item" :userInfo="userInfo">
- </headerSerch>
- <tabNav v-if="item.name == 'tabNav'" :dataConfig="item" class="tabNav" :tabTitle="navTop"
- @bindHeight="bindHeighta" @changeTab="changeTab" :isFixed="isFixed"></tabNav>
- </block>
- <!-- #endif -->
- <view class="main" v-show="navIndex == 0">
- <!-- 首页推荐 -->
- <view class="index-product-wrapper">
- <!-- 首发新品 -->
- <recommend :hostProduct="hostProduct" :indexP="true" :isLogin="isLogin"></recommend>
- <view class="loadingicon acea-row row-center-wrapper" v-if="hostProduct.length > 0">
- <text class="loading iconfont icon-jiazai" :hidden="hotLoading == false"></text>
- {{ hotTitle }}
- </view>
- </view>
- </view>
- <view v-show="navIndex == 0" class="loadingicon acea-row row-center-wrapper"
- v-if="tempArr.length && styleConfig[styleConfig.length - 1].name == 'promotionList'">
- <text class="loading iconfont icon-jiazai" :hidden="loading == false"></text>
- {{ loadTitle }}
- </view>
- </block>
- <!-- 分类页 -->
- <view class="productList" v-if="navIndex > 0" :style="'margin-top:' + prodeuctTop + 'px;'">
- <view class="sort acea-row" v-if="sortList.length>0" :style="{ marginTop: sortMarTop + 'px' }">
- <navigator hover-class="none" v-if="index < 9"
- :url="'/pages/columnGoods/goods_list/index?id=' + item.store_category_id + '&title=' + item.cate_name"
- class="item" v-for="(item, index) in sortList" :key="item.store_category_id">
- <view class="pictrue">
- <easy-loadimage :image-src="item.pic"></easy-loadimage>
- </view>
- <view class="text">{{ item.cate_name }}</view>
- </navigator>
- <view class="item" @click="bindMore" v-if="sortList.length >= 9">
- <view class="pictrues acea-row row-center-wrapper"><text
- class="iconfont icon-gengduo1"></text></view>
- <view class="text" style="margin-top: 22rpx;">更多</view>
- </view>
- </view>
- <block v-if="sortProduct.length > 0">
- <view class="list acea-row row-between-wrapper">
- <navigator @tap="goDetails(item)" class="item" v-for="(item, index) in sortProduct"
- :key="item.product_id">
- <view class="pictrue">
- <easy-loadimage :image-src="item.image"></easy-loadimage>
- </view>
- <view class="text">
- <view class="name line1">
- <text class="name_text line2">{{ item.store_name }}</text>
- </view>
- <view class="acea-row row-middle">
- <view class="money font-color-red">
- ¥
- <text class="num">{{ item.price }}</text>
- </view>
- </view>
- <view class="item_tags acea-row">
- <text v-if="item.merchant.type_name && item.product_type == 0"
- class="font-bg-red">{{ item.merchant.type_name }}</text>
- <text v-else-if="item.merchant.is_trader && item.product_type == 0"
- class="font-bg-red">自营</text>
- <text v-if="item.product_type != 0"
- :class="'font_bg-red type' + item.product_type">
- {{ item.product_type == 1 ? '秒杀' : item.product_type == 2 ? '预售' : item.product_type == 3 ? '助力' : item.product_type == 4 ? '拼团' : '' }}
- </text>
- <text class="tags_item ticket" v-if="item.issetCoupon">领券</text>
- <text class="tags_item delivery" v-if="item.delivery_free == 1">包邮</text>
- </view>
- </view>
- </navigator>
- <view class="loadingicon acea-row row-center-wrapper"
- v-if="sortProduct.length > 0 || sortProductLoading">
- <text class="loading iconfont icon-jiazai" :hidden="loading == false"></text>
- {{ loadTitle }}
- </view>
- </view>
- </block>
- <block v-if="sortProduct.length == 0">
- <view class="noCommodity">
- <view class="pictrue" style="margin: 0 auto;">
- <image src="http://ygs.hqgjsmc.com/baseimg/noCart.png"></image>
- <view>暂无商品,去看点什么吧</view>
- </view>
- <recommend :hostProduct="hostProduct"></recommend>
- </view>
- </block>
- </view>
- <!-- #ifdef H5 -->
- <a v-if="beian_sn" href="https://beian.miit.gov.cn/#/Integrated/index"
- class="copyRight">{{beian_sn}}</a>
- <!-- #endif -->
- </view>
- </view>
- <view v-else>
- <view class="error-network">
- <image src="/static/images/error-network.png"></image>
- <view class="title">网络连接断开</view>
- <view class="con">
- <view class="label">请检查情况:</view>
- <view class="item">· 在设置中是否已开启网络权限</view>
- <view class="item">· 当前是否处于弱网环境</view>
- <view class="item">· 版本是否过低,升级试试吧</view>
- </view>
- <view class="btn" @click="reconnect">重新连接</view>
- </view>
- </view>
- <!-- #ifdef APP-PLUS -->
- <view class="privacy-wrapper" v-if="privacyStatus">
- <view class="privacy-box">
- <view class="title">服务协议与隐私政策</view>
- <view class="content">
- 请务必审慎阅读、充分理解“服务协议与 隐私政策”各条款,包括但不限于:为了 向你提供即时通讯、内容分享等服务,我 们需要收集你的设备信息、操作日志等个
- 人信息。你可以在“设置”中查看、变更、 删除个人信息并管理你的授权。
- <br />
- 你可以阅读
- <navigator url="/pages/users/privacy/index">《服务协议与隐私政策》</navigator>
- 了解 详细信息。如你同意,请点击“我同意”开始接受我们的服务。
- </view>
- <view class="btn-box">
- <view class="btn-item" @click="confirmApp">我同意</view>
- <view class="btn" @click="closeModel">随便逛逛</view>
- </view>
- </view>
- </view>
- <!-- #endif -->
- <!-- 发送给朋友图片 -->
- <view class="share-box" v-if="isIntegral">
- <!-- #ifndef H5 -->
- <image src="http://ygs.hqgjsmc.com/baseimg/share-info.png" @click="closeShare"></image>
- <!-- #endif -->
- <!-- #ifdef H5 -->
- <image src="/static/images/share-info-wechat.png" @click="closeShare"></image>
- <!-- #endif -->
- </view>
- <!-- 优惠券弹窗 -->
- <view class="coupon_popups" v-if="showCoupon">
- <view class="bg"></view>
- <view class="con" :style="{ 'background-image': `url(${domain}/static/diy/couponWindow${keyColor}.png)` }">
- <scroll-view scroll-y="true">
- <view v-for="(item, index) in couponArray" class="item">
- <view class="left">
- <view class="price">¥ <text>{{item.coupon_price}}</text></view>
- <view class="max_price" v-if="item.use_min_price > 0">满{{item.use_min_price}}可用</view>
- <view class="max_price" v-else>无门槛</view>
- </view>
- <view class="right">
- <view class="time line1" v-if="item.coupon_type">有效期{{item.use_start_time}} -
- {{item.use_end_time}}</view>
- <text class="coupon_type">{{couponTypeMsg[item.type] || '店铺券'}}</text>
- <navigator :url="'/pages/columnGoods/goods_coupon_list/index?coupon_id='+item.coupon_id"
- class='bnt1 b-color' hover-class="none"><text
- class="title titleSize">{{item.title}}</text>
- <view class="title titleColor">
- 全场商品均可使用
- </view>
- </navigator>
- <!-- <view>{{item.start_time}}-{{item.end_time}}</view> -->
- </view>
- </view>
- </scroll-view>
- <view class="text">优惠券已放入您的账户中,点击“优惠券”去使用</view>
- <view class='iconfont icon-guanbi3' @click="showCoupon = false"></view>
- </view>
- </view>
- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"
- :isGoIndex="false"></authorize>
- <!-- #ifndef H5 -->
- <passwordPopup></passwordPopup>
- <!-- #endif -->
- <view class="page-btm" style="padding-top: 20rpx;">
- ©2022 浙江易博网络科技有限公司 版权所有
- </view>
- <view class="page-btm" @click="gocx" style="padding-bottom: 10rpx;">
- 浙ICP备2021013190号
- </view>
- </view>
- </template>
- <script>
- // +----------------------------------------------------------------------
- // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
- // +----------------------------------------------------------------------
- // | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
- // +----------------------------------------------------------------------
- // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
- // +----------------------------------------------------------------------
- // | Author: CRMEB Team <admin@crmeb.com>
- // +----------------------------------------------------------------------
- var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
- let app = getApp();
- import {
- getUserInfo
- } from '@/api/user.js';
- import {
- getDiy,
- getIndexData,
- getAppVersion,
- getUserCoupons
- } from '@/api/api.js';
- // #ifdef MP-WEIXIN
- import {
- getTemlIds
- } from '@/api/api.js';
- import {
- SUBSCRIBE_MESSAGE,
- TIPS_KEY
- } from '@/config/cache';
- // #endif
- import {
- getShare,
- getconfig
- } from '@/api/public.js';
- import {
- goShopDetail
- } from '@/libs/order.js';
- import {
- mapGetters
- } from 'vuex';
- import {
- getProductslist,
- getProductHot,
- storeCategory
- } from '@/api/store.js';
- import {
- initiateAssistApi
- } from '@/api/activity.js';
- import {
- openBargainSubscribe
- } from '@/utils/SubscribeMessage.js';
- import {
- setVisit,
- spread
- } from '@/api/user.js';
- import recommend from '@/components/recommend';
- // #ifndef H5
- import passwordPopup from '@/components/passwordPopup';
- // #endif
- // #ifdef H5
- import mConfig from './component/index.js';
- // #endif
- import authorize from '@/components/Authorize';
- // #ifdef MP || APP-PLUS
- import activeParty from './component/activeParty';
- import headerSerch from './component/headerSerch';
- import coupon from './component/coupon';
- import bargain from './component/bargain';
- import blankPage from './component/blankPage';
- import combination from './component/combination';
- import customerService from './component/customerService';
- import goodList from './component/goodList';
- import guide from './component/guide';
- import liveBroadcast from './component/liveBroadcast';
- import menus from './component/menus';
- import news from './component/news';
- import topic from './component/topic';
- import presellList from './component/presellList';
- import plantList from './component/plantList';
- import pictureCube from './component/pictureCube'
- import shopList from './component/shopList';
- import richText from './component/richText';
- import seckill from './component/seckill';
- import swiperBg from './component/swiperBg';
- import tabNav from './component/tabNav';
- import titles from './component/titles';
- // #endif
- import {
- silenceBindingSpread,
- configMap,
- isWeixin
- } from '@/utils/index';
- import history from '@/mixins/history';
- import shareScence from '@/libs/spread';
- import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
- import {
- getNewPeopleCouponLst
- } from '@/api/activity.js'
- import {
- HTTP_REQUEST_URL
- } from '@/config/app';
- export default {
- computed: configMap({
- hide_mer_status: 0,
- beian_sn: '',
- share_title: '',
- site_name: ''
- },
- mapGetters(['isLogin', 'uid', 'keyColor'])),
- mixins: [history],
- components: {
- easyLoadimage,
- recommend,
- authorize,
- // #ifndef H5
- passwordPopup,
- // #endif
- // #ifdef H5
- ...mConfig,
- // #endif
- // #ifdef MP || APP-PLUS
- activeParty,
- headerSerch,
- bargain,
- coupon,
- blankPage,
- combination,
- customerService,
- goodList,
- guide,
- liveBroadcast,
- menus,
- news,
- topic,
- presellList,
- plantList,
- pictureCube,
- shopList,
- richText,
- seckill,
- swiperBg,
- tabNav,
- titles
- // #endif
- },
- data() {
- return {
- domain: HTTP_REQUEST_URL,
- couponTypeMsg: {
- 10: '通用券',
- 11: '品类券',
- 12: '跨店券'
- },
- styleConfig: [],
- showSkeleton: true, //骨架屏显示隐藏
- isNodes: 0, //控制什么时候开始抓取元素节点,只要数值改变就重新抓取
- privacyStatus: false,
- errorNetwork: false,
- ad: {
- home_ad_pic: ''
- },
- userInfo: {},
- loading: false,
- isAuto: false, //没有授权的不会自动授权
- isShowAuth: false, //是否隐藏授权
- statusBarHeight: statusBarHeight,
- navIndex: 0,
- navTop: [],
- subscribe: false,
- followUrl: '',
- followHid: true,
- followCode: false,
- imgUrls: [{
- url: '',
- pic: '',
- id: '',
- name: ''
- }],
- hot: [],
- sortList: [],
- 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: ''
- }],
- window: false,
- navH: '',
- couponList: [],
- marTop: 0,
- loadend: false,
- loading: false,
- loadTitle: '加载更多',
- sortProduct: [],
- where: {
- pid: 0,
- page: 1,
- limit: 6
- },
- is_switch: true,
- hostProduct: [],
- hotPage: 1,
- hotLimit: 30,
- hotScroll: true,
- hotLoading: false,
- hotTitle: '加载更多',
- explosiveMoney: [],
- prodeuctTop: 0,
- pinkInfo: '',
- searchH: 0,
- domOffsetTop: 50,
- // #ifdef APP-PLUS || MP
- isFixed: true,
- // #endif
- // #ifdef H5
- isFixed: false,
- // #endif
- goodScroll: true, //精品推荐开关
- params: {
- //精品推荐分页
- page: 1,
- limit: 10
- },
- tempArr: [], //精品推荐临时数组
- numConfig: 0,
- pageInfo: '', // 精品推荐全数据
- swiperCur: 0,
- d: '',
- h: '',
- m: '',
- s: '',
- sum_h: '',
- sortMarTop: 0,
- globalDatas: {},
- // #ifdef MP || APP-PLUS
- mpHeight: 108,
- // #endif
- // #ifndef MP || APP-PLUS
- mpHeight: 0,
- // #endif
- currSpid: '',
- _options: {},
- isIntegral: false,
- appUpdate: {},
- sortMpTop: 0,
- bgColor: '',
- bgPic: '',
- bgTabVal: '',
- windowHeight: 0,
- isHeaderSerch: false,
- showCoupon: false,
- couponArray: []
- };
- },
- /**
- * 用户点击右上角分享
- */
- // #ifdef MP
- onShareAppMessage: function() {
- let that = this;
- wx.showShareMenu({
- withShareTicket: true,
- menus: ['shareAppMessage', 'shareTimeline']
- });
- return {
- title: that.share_title,
- path: '/pages/index/index?spid=' + that.uid
- };
- },
- onShareTimeline: function() {
- let that = this;
- return {
- title: that.share_title,
- query: {
- spid: that.uid
- },
- imageUrl: ''
- };
- },
- // #endif
- onLoad(options) {
- let that = this
- this._options = options;
- // #ifdef APP-PLUS
- const pages = getCurrentPages();
- const page = pages[pages.length - 1];
- const currentWebview = page.$getAppWebview();
- currentWebview.setStyle({
- pullToRefresh: {
- support: !that.isSupport,
- style: plus.os.name === 'Android' ? 'circle' : 'default'
- }
- });
- that.isSupport = !that.isSupport;
- that.appVersionConfig(); //APP版本检测
- // #endif
- that.$nextTick(function() {
- uni.getSystemInfo({
- success: function(res) {
- that.windowHeight = res.windowHeight;
- }
- });
- })
- that.pageLoad(options);
- setTimeout(() => {
- that.isNodes++;
- }, 100);
- },
- onShow() {
- this.getConfig();
- this.isIntegral = uni.getStorageSync('isIntegral')
- // #ifdef APP-PLUS
- if (this.appUpdate.openUpgrade == '1') {
- this.alertAppUpdate();
- }
- // #endif
- this.loadCoupon()
- },
- onHide() {
- uni.setStorageSync('isIntegral', false)
- },
- onReady() {
- },
- watch: {
- globalDatas(nVal, oVal) {
- // #ifdef H5
- this.ShareInfo(nVal);
- // #endif
- },
- privacyStatus(n) {
- if (n) {
- uni.hideTabBar();
- } else {
- uni.showTabBar();
- }
- },
- },
- onPullDownRefresh() {
- this.styleConfig = []
- this.diyData()
- setTimeout(() => {
- uni.stopPullDownRefresh();
- }, 100);
- this.reconnect();
- },
- methods: {
- gocx() {
- let url = 'https://www.miit.gov.cn/'
- // #ifdef H5
- window.location.href = 'https://www.miit.gov.cn/'
- // #endif
- // #ifdef APP-PLUS
- plus.runtime.openURL(
- url,
- function(err) {
- console.log(err);
- }
- );
- // #endif
- },
- changeBarg() {},
- loadCoupon() {
- if (!this.showCoupon && !uni.getStorageSync('show_coupon') && uni.getStorageSync('is_new_user')) {
- getNewPeopleCouponLst().then(res => {
- this.couponArray = res.data;
- setTimeout(() => {
- this.showCoupon = this.couponArray.length > 0;
- uni.setStorageSync('show_coupon', '1')
- }, 1500);
- })
- }
- },
- pageLoad(options) {
- let that = this;
- if (options.spid) {
- that.currSpid = options.spid;
- app.globalData.spid = options.spid;
- }
- // #ifdef APP-PLUS
- try {
- let val = uni.getStorageSync('privacyStatus') || false;
- if (!val) {
- this.privacyStatus = true;
- }
- } catch (e) {}
- this.snycNetWork();
- // #endif
- // #ifdef MP
- if (options.scene) {
- let value = that.$util.getUrlParams(decodeURIComponent(options.scene));
- if (value.id) options.id = value.id;
- //记录推广人uid
- if (value.spid) {
- that.currSpid = value.spid;
- app.globalData.spid = value.spid;
- }
- }
- // #endif
- shareScence(that.currSpid, that.isLogin);
- this.isLogin && silenceBindingSpread();
- this.getIndexConfig()
- Promise.all([
- this.diyData(),
- this.get_host_product(),
- ]);
- if (this.isLogin) {
- this.getUserInfo();
- // #ifdef MP
- this.getHistory();
- // #endif
- }
- },
- closeShare() {
- uni.setStorageSync('isIntegral', false);
- this.isIntegral = uni.getStorageSync('isIntegral');
- },
- bindHeighta(data) {
- // #ifdef APP-PLUS
- this.sortMpTop = data.top + data.height;
- // #endif
- },
- // 重新链接
- reconnect() {
- uni.getNetworkType({
- success: res => {
- this.errorNetwork = res.networkType === 'none';
- if (!this.errorNetwork) {
- this.pageLoad(this._options);
- }
- }
- });
- },
- // #ifdef APP-PLUS
- snycNetWork() {
- uni.getNetworkType({
- success: res => {
- this.errorNetwork = res.networkType === 'none';
- }
- });
- },
- // 同意隐私协议
- confirmApp() {
- uni.setStorageSync('privacyStatus', true);
- this.privacyStatus = false;
- },
- // 关闭 Model
- closeModel() {
- this.privacyStatus = false;
- },
- // #endif
- // 对象转数组
- objToArr(data) {
- let obj = Object.keys(data).sort();
- let m = obj.map(key => data[key]);
- return m;
- },
- diyData() {
- let that = this;
- getDiy().then(res => {
- setTimeout(() => {
- that.isNodes++;
- }, 0);
- that.errorNetwork = false
- uni.setNavigationBarTitle({
- title: res.data.title
- });
- let data = res.data;
- if (data.is_bg_color) {
- that.bgColor = data.color_picker
- }
- if (data.is_bg_pic) {
- that.bgPic = data.bg_pic
- that.bgTabVal = data.bg_tab_val
- }
- that.styleConfig = that.objToArr(res.data.value);
- that.styleConfig.forEach((item, index, arr) => {
- if (item.name == 'headerSerch') {
- that.isHeaderSerch = true
- }
- });
- });
- },
- // 微信登录回调
- onLoadFun: function(e) {
- this.isShowAuth = false;
- },
- // #ifdef APP-PLUS
- appVersionConfig() {
- var that = this;
- //app升级
- // 获取本地应用资源版本号
- getAppVersion().then(res => {
- that.$set(that.appUpdate, 'androidAddress', res.data.androidAddress);
- that.$set(that.appUpdate, 'appVersion', res.data.appVersion);
- that.$set(that.appUpdate, 'iosAddress', res.data.iosAddress);
- that.$set(that.appUpdate, 'openUpgrade', res.data.openUpgrade);
- plus.runtime.getProperty(plus.runtime.appid, function(inf) {
- let nowVersion = (inf.version).split('.').join('');
- let appVersion = (res.data.appVersion).split('.').join('');
- that.$set(that.appUpdate, 'alert', appVersion > nowVersion);
- that.alertAppUpdate();
- });
- })
- },
- alertAppUpdate() {
- if (this.appUpdate.alert) {
- uni.getSystemInfo({
- success: (res) => {
- uni.showModal({
- title: '更新提示',
- content: '发现新版本,是否前去下载?',
- showCancel: this.appUpdate.openUpgrade !=
- '1',
- cancelColor: '#eeeeee',
- confirmColor: '#FF0000',
- success: (response) => {
- if (response.confirm) {
- switch (res.platform) {
- case "android":
- plus.runtime.openURL(this
- .appUpdate
- .androidAddress);
- break;
- case "ios":
- plus.runtime.openURL(encodeURI(
- this.appUpdate
- .iosAddress));
- break;
- }
- }
- }
- });
- }
- })
- }
- },
- // #endif
- getConfig() {
- // 获取配置
- getconfig()
- .then(res => {
- let self = this;
- this.globalDatas = res.data;
- uni.$emit('configData', res.data);
- })
- .catch(err => {});
- },
- // 分类页更多
- bindMore() {
- console.log(this.navTop[this.navIndex]);
- try {
- uni.setStorageSync('storeIndex', this.navTop[this.navIndex].pid);
- uni.switchTab({
- url: '/pages/goods_cate/goods_cate'
- });
- } catch (e) {}
- },
- goDetails(item) {
- goShopDetail(item, this.uid).then(res => {
- if (this.isLogin) {
- initiateAssistApi(item.activity_id)
- .then(res => {
- let id = res.data.product_assist_set_id;
- uni.hideLoading();
- // #ifndef MP
- uni.navigateTo({
- url: '/pages/activity/assist_detail/index?id=' + id
- });
- // #endif
- // #ifdef MP
- openBargainSubscribe()
- .then(res => {
- uni.hideLoading();
- uni.navigateTo({
- url: '/pages/activity/assist_detail/index?id=' + id
- });
- })
- .catch(err => {
- uni.hideLoading();
- });
- // #endif
- })
- .catch(err => {
- uni.showToast({
- title: err,
- icon: 'none'
- });
- });
- } else {
- this.isAuto = true;
- this.isShowAuth = true
- }
- });
- },
- /**
- * 获取个人用户信息
- */
- getUserInfo: function() {
- let that = this;
- getUserInfo().then(res => {
- that.userInfo = res.data;
- });
- },
- // 记录会员访问
- setVisit() {
- setVisit({
- url: '/pages/index/index'
- }).then(res => {
- console.log(res);
- });
- },
- // 导航分类切换
- changeTab(e) {
- let self = this;
- if (this.navIndex == e.index) return;
- this.navIndex = e.index;
- if (e.index > 0) {
- storeCategory({
- pid: e.pid
- }).then(res => {
- this.sortList = res.data.length > 9 ? res.data.splice(0, 9) : res.data;
- if (this.sortList.length > 0) {
- this.where.pid = e.pid;
- this.where.page = 1;
- this.loadend = false;
- this.loading = false;
- this.sortProduct = [];
- this.get_product_list();
- }
- });
- self.sortMarTop = 10;
- }
- },
- //分类产品
- get_product_list: function() {
- let that = this;
- if (that.loading) return;
- that.loading = true;
- that.loadTitle = '';
- getProductslist(that.where)
- .then(res => {
- let list = res.data.list;
- let productList = that.$util.SplitArray(list, that.sortProduct);
- let loadend = list.length < that.where.limit;
- that.loadend = loadend;
- that.loading = false;
- that.loadTitle = loadend ? '已全部加载' : '加载更多';
- that.$set(that, 'sortProduct', productList);
- that.$set(that.where, 'page', that.where.page + 1);
- })
- .catch(err => {
- that.loading = false;
- that.loadTitle = '加载更多';
- });
- },
- /**
- * 获取我的推荐
- */
- get_host_product: function() {
- let that = this;
- let num = that.hotLimit;
- if (!that.hotScroll) return;
- if (that.hotLoading) return;
- that.hotLoading = true;
- that.hotTitle = '';
- getProductHot(that.hotPage, that.hotLimit).then(res => {
- let list = res.data.list;
- let productList = that.$util.SplitArray(list, that.hostProduct);
- let hotScroll = list.length <= num && list.length != 0;
- that.hotScroll = hotScroll;
- that.hotLoading = false;
- that.hotTitle = !hotScroll ? '已全部加载' : '加载更多';
- that.$set(that, 'hostProduct', productList);
- that.$set(that, 'hotPage', that.hotPage + 1);
- });
- },
- // 首页数据
- getIndexConfig: function() {
- let that = this;
- getIndexData().then(res => {
- that.$set(that, 'imgUrls', res.data.banner);
- that.$set(that, 'menus', res.data.menu);
- that.$set(that, 'hot', res.data.hot);
- that.$set(that, 'ad', res.data.ad);
- res.data.category.unshift({
- cate_name: '首页'
- });
- that.$set(that, 'navTop', res.data.category);
- // #ifdef H5
- that.subscribe = res.data.subscribe;
- // #endif
- // 小程序判断用户是否授权;
- // #ifdef MP
- uni.getSetting({
- success(res) {
- if (!res.authSetting['scope.userInfo']) {
- that.window = that.couponList.length ? true : false;
- } else {
- that.window = false;
- }
- }
- });
- // #endif
- // #ifndef MP
- if (that.isLogin) {
- that.window = false;
- } else {
- that.window = that.couponList.length ? true : false;
- }
- // #endif
- that.reloadData();
- });
- },
- reloadData() {
- setTimeout(() => {
- this.showSkeleton = false
- }, 500)
- },
- // 授权关闭
- authColse: function(e) {
- this.isShowAuth = e;
- },
- // 首发新品详情
- goDetail(item) {
- if (item.activity && item.activity.type === '2' && !this.isLogin) {
- // #ifdef H5
- uni.showModal({
- title: '提示',
- content: '您未登录,请登录!',
- success: function(res) {
- if (res.confirm) {
- uni.navigateTo({
- url: '/pages/users/login/index'
- });
- } else if (res.cancel) {}
- }
- });
- // #endif
- // #ifdef MP
- this.$set(this, 'isAuto', true);
- this.$set(this, 'isShowAuth', true);
- // #endif
- return;
- } else {
- goShopDetail(item, this.uid).then(res => {
- uni.navigateTo({
- url: `/pages/goods_details/index?id=${item.id}`
- });
- });
- }
- },
- // 分类详情
- godDetail(item) {
- uni.navigateTo({
- url: `/pages/goods_details/index?id=${item.id}`
- });
- },
- //拼团详情
- goCombinDetail(item) {
- uni.navigateTo({
- url: `/pages/activity/combination_details/index?id=${item.product_group_id}`
- });
- },
- countTime: function() {
- // 获取当前时间
- var date = new Date();
- var now = date.getTime();
- //设置截止时间
- var endDate = new Date('2020-10-22 23:23:23');
- var end = endDate.getTime();
- //时间差
- var leftTime = end - now;
- //定义变量 d,h,m,s保存倒计时的时间
- if (leftTime >= 0) {
- this.d = Math.floor(leftTime / 1000 / 60 / 60 / 24);
- this.h = Math.floor((leftTime / 1000 / 60 / 60) % 24);
- this.m = Math.floor((leftTime / 1000 / 60) % 60);
- this.s = Math.floor((leftTime / 1000) % 60);
- this.sum_h = this.d * 24 + this.h;
- }
- //递归每秒调用countTime方法,显示动态时间效果
- setTimeout(this.countTime, 1000);
- },
- //#ifdef H5
- ShareInfo(datas) {
- let data = this.storeInfo;
- let href = location.href;
- if (this.$wechat.isWeixin()) {
- if (this.isLogin) {
- href = href.indexOf('?') === -1 ? href + '?spid=' + this.uid : href + '&spid=' + this.uid;
- } else {
- href = href;
- }
- let configAppMessage = {
- desc: datas.share_info,
- title: datas.share_title,
- link: href,
- imgUrl: datas.share_pic
- };
- this.$wechat
- .wechatEvevt(['updateAppMessageShareData', 'updateTimelineShareData', 'onMenuShareAppMessage',
- 'onMenuShareTimeline'
- ], configAppMessage)
- .then(res => {
- console.log(res, '=============================>>WXAPI');
- })
- .catch(err => {
- console.log(err);
- });
- }
- },
- //#endif
- },
- mounted() {
- },
- // 滚动到底部
- onReachBottom() {
- if (this.navIndex == 0) {
- // 首页加载更多
- this.get_host_product();
- } else {
- // 分类栏目加载更多
- if (this.sortProduct.length > 0) {
- this.get_product_list();
- } else {
- this.get_host_product();
- }
- }
- },
- // 滚动监听
- onPageScroll(e) {
- // #ifdef H5
- if (this.isHeaderSerch) {
- if (e.scrollTop > this.domOffsetTop) {
- this.isFixed = true;
- }
- if (e.scrollTop < this.domOffsetTop) {
- this.$nextTick(() => {
- this.isFixed = false;
- });
- }
- } else {
- this.isFixed = false
- }
- // #endif
- // 传入scrollTop值并触发所有easy-loadimage组件下的滚动监听事件
- uni.$emit('scroll');
- }
- };
- </script>
- <style>
- </style>
- <style lang="scss">
- .bnt1 {
- color: red;
- }
- page {
- display: flex;
- flex-direction: column;
- height: 100%;
- }
- .main {
- padding: 0 20rpx;
- }
- .colum0 {
- white-space: nowrap;
- display: flex;
- }
- .ysize {
- background-size: 100%;
- }
- .fullsize {
- background-size: 100% 100%;
- }
- .repeat {
- background-repeat: repeat;
- }
- .noRepeat {
- background-repeat: no-repeat;
- }
- .privacy-wrapper {
- z-index: 999;
- position: fixed;
- left: 0;
- top: 0;
- bottom: 0;
- right: 0;
- width: 100%;
- height: 100%;
- background: #7f7f7f;
- .privacy-box {
- position: absolute;
- left: 50%;
- top: 50%;
- transform: translate(-50%, -50%);
- width: 560rpx;
- padding: 50rpx 45rpx 0;
- background: #fff;
- border-radius: 20rpx;
- .title {
- text-align: center;
- font-size: 32rpx;
- text-align: center;
- color: #333;
- font-weight: 700;
- }
- .content {
- margin-top: 20rpx;
- line-height: 1.5;
- font-size: 26rpx;
- color: #666;
- navigator {
- display: inline-block;
- color: #e93323;
- }
- }
- .btn-box {
- margin-top: 40rpx;
- text-align: center;
- font-size: 30rpx;
- .btn-item {
- height: 82rpx;
- line-height: 82rpx;
- background: linear-gradient(90deg, #f67a38 0%, #f11b09 100%);
- color: #fff;
- border-radius: 41rpx;
- }
- .btn {
- padding: 30rpx 0;
- }
- }
- }
- }
- .coupon_popups {
- z-index: 999;
- position: fixed;
- left: 0;
- top: 0;
- width: 100%;
- height: 100%;
- text-align: center;
- .bg {
- position: absolute;
- left: 0;
- top: 0;
- width: 100%;
- height: 100%;
- background-color: rgba(0, 0, 0, .5);
- }
- .con {
- position: absolute;
- left: 50%;
- top: 50%;
- transform: translate(-50%, -50%);
- width: 680rpx;
- height: 900rpx;
- background-size: 100% 700rpx;
- background-repeat: no-repeat;
- scroll-view {
- width: 540rpx;
- height: 306rpx;
- padding-top: 20rpx;
- margin: 300rpx auto 0;
- }
- .item {
- display: flex;
- align-items: center;
- width: 100%;
- height: 164rpx;
- 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==');
- background-repeat: no-repeat;
- background-size: 100% 100%;
- margin-bottom: 20rpx;
- border-radius: 20rpx;
- position: relative;
- .left {
- width: 160rpx;
- text-align: center;
- &::after {
- content: "";
- display: block;
- height: 110rpx;
- border-right: 1rpx dashed #E6E6E6;
- position: absolute;
- left: 162rpx;
- top: 25rpx;
- }
- .price {
- color: #E93323;
- font-size: 26rpx;
- font-weight: bold;
- text {
- font-size: 46rpx;
- }
- }
- .max_price {
- color: #999999;
- font-size: 18rpx;
- margin-top: 8rpx;
- }
- }
- .right {
- width: 380rpx;
- padding: 0 20rpx;
- .title {
- color: #333333;
- font-size: 26rpx;
- }
- .time {
- color: #999999;
- font-size: 22rpx;
- margin-top: 20rpx;
- }
- .bnt1 {
- .titleSize {
- font-weight: 700;
- font-size: 33rpx;
- }
- .titleColor {
- color: #999999;
- }
- }
- .coupon_type {
- position: absolute;
- color: #fff;
- font-size: 15rpx;
- width: 30rpx;
- text-align: center;
- height: auto;
- background: #E93323;
- top: 0;
- right: 20rpx;
- line-height: 26rpx;
- padding: 5rpx 0 15rpx;
- &::after {
- content: "";
- width: 0;
- height: 0;
- border-left: 14rpx solid transparent;
- border-right: 14rpx solid transparent;
- border-bottom: 14rpx solid #fff;
- position: absolute;
- bottom: -4rpx;
- left: 2rpx;
- }
- }
- }
- }
- .text {
- width: 600rpx;
- margin: 30rpx auto 0;
- font-size: 20rpx;
- color: #ffffff;
- }
- .icon-guanbi3 {
- color: #ffffff;
- font-size: 70rpx;
- position: absolute;
- bottom: -80rpx;
- left: 320rpx;
- }
- }
- }
- .copyRight {
- margin: 60rpx auto 20rpx;
- max-width: 690rpx;
- font-size: 20rpx;
- color: #707070;
- text-decoration: none;
- }
- .share-box {
- z-index: 1000;
- position: fixed;
- left: 0;
- top: 0;
- width: 100%;
- height: 100%;
- image {
- width: 100%;
- height: 100%;
- }
- }
- .error-network {
- position: fixed;
- left: 0;
- top: 0;
- display: flex;
- flex-direction: column;
- align-items: center;
- width: 100%;
- height: 100%;
- padding-top: 40rpx;
- background: #fff;
- padding-top: 30%;
- image {
- width: 414rpx;
- height: 336rpx;
- }
- .title {
- position: relative;
- top: -40rpx;
- font-size: 32rpx;
- color: #666;
- }
- .con {
- font-size: 24rpx;
- color: #999;
- .label {
- margin-bottom: 20rpx;
- }
- .item {
- margin-bottom: 20rpx;
- }
- }
- .btn {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 508rpx;
- height: 86rpx;
- margin-top: 100rpx;
- border: 1px solid #d74432;
- color: #e93323;
- font-size: 30rpx;
- border-radius: 120rpx;
- }
- }
- .area-row {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- display: block;
- width: 100%;
- text-align: center;
- }
- .page-index {
- display: flex;
- flex-direction: column;
- min-height: 100%;
- .page_content {
- /* #ifdef MP || APP-PLUS */
- padding-top: 270rpx;
- /* #endif */
- .page_bg {
- background: linear-gradient(180deg, #fff 0%, #f5f5f5 100%);
- }
- .nav {
- padding: 0 0rpx 30rpx;
- flex-wrap: wrap;
- /* #ifdef MP */
- margin-top: 0;
- /* #endif */
- /* #ifdef H5 */
- margin-top: 0;
- /* #endif */
- .item {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- width: 20%;
- margin-top: 30rpx;
- image {
- width: 82rpx;
- height: 82rpx;
- }
- }
- }
- .index-product-wrapper {
- .nav-bd {
- display: flex;
- align-items: center;
- .item {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- width: 25%;
- .txt {
- font-size: 32rpx;
- color: #282828;
- }
- .label {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 124rpx;
- height: 32rpx;
- margin-top: 5rpx;
- font-size: 24rpx;
- color: #999;
- }
- &.active {
- color: $theme-color;
- .label {
- background: linear-gradient(90deg, $bg-star 0%, $bg-end 100%);
- border-radius: 16rpx;
- color: #fff;
- }
- }
- }
- }
- .list-box {
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- .item {
- width: 345rpx;
- margin-bottom: 20rpx;
- background-color: #fff;
- border-radius: 10px;
- overflow: hidden;
- image {
- width: 100%;
- height: 345rpx;
- }
- .text-info {
- padding: 10rpx 20rpx 15rpx;
- .title {
- color: #222222;
- }
- .old-price {
- margin-top: 8rpx;
- font-size: 26rpx;
- color: #aaaaaa;
- text-decoration: line-through;
- text {
- margin-right: 2px;
- font-size: 20rpx;
- }
- }
- .price {
- display: flex;
- align-items: flex-end;
- color: $theme-color;
- font-size: 34rpx;
- font-weight: 800;
- text {
- padding-bottom: 4rpx;
- font-size: 24rpx;
- font-weight: normal;
- }
- .txt {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 28rpx;
- height: 28rpx;
- margin-left: 15rpx;
- margin-bottom: 10rpx;
- border: 1px solid $theme-color;
- border-radius: 4rpx;
- font-size: 22rpx;
- font-weight: normal;
- }
- }
- }
- }
- &.on {
- display: flex;
- }
- }
- }
- }
- }
- .productList {
- background-color: #f1f1f1;
- min-height: 70vh;
- .sort {
- width: 710rpx;
- max-height: 380rpx;
- background: rgba(255, 255, 255, 1);
- border-radius: 16rpx;
- padding: 8rpx 0rpx 30rpx;
- flex-wrap: wrap;
- margin: 25rpx auto 0 auto;
- .item {
- width: 20%;
- margin-top: 30rpx;
- text-align: center;
- .pictrues {
- width: 90rpx;
- height: 90rpx;
- background: rgba(248, 248, 248, 1);
- border-radius: 50%;
- margin: 0 auto;
- }
- .easy-loadimage {
- width: 90rpx;
- height: 90rpx;
- display: inline-block;
- }
- .text {
- color: #272727;
- font-size: 24rpx;
- margin-top: 10rpx;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- }
- }
- }
- .productList .list {
- padding: 0 20rpx;
- }
- .productList .list.on {
- background-color: #fff;
- border-top: 1px solid #f6f6f6;
- }
- .productList .list .item {
- width: 345rpx;
- margin-top: 20rpx;
- background-color: #fff;
- border-radius: 10rpx;
- .name {
- display: flex;
- align-items: center;
- }
- }
- .productList .list .item.on {
- width: 100%;
- display: flex;
- border-bottom: 1rpx solid #f6f6f6;
- padding: 30rpx 0;
- margin: 0;
- }
- .productList .list .item .pictrue {
- position: relative;
- width: 100%;
- height: 345rpx;
- }
- .productList .list .item .pictrue.on {
- width: 180rpx;
- height: 180rpx;
- }
- .productList .list .item .pictrue image,
- .productList .list .item .pictrue uni-image,
- .productList .list .item .pictrue .easy-loadimage {
- width: 100%;
- height: 100%;
- border-radius: 10rpx 10rpx 0 0;
- }
- /deep/.productList .list .item .pictrue uni-image.origin-img {
- border-radius: 10rpx 10rpx 0 0;
- }
- .productList .list .item .pictrue image.on {
- border-radius: 6rpx;
- }
- .productList .list .item .text {
- padding: 14rpx 17rpx 26rpx 17rpx;
- font-size: 28rpx;
- color: #212121;
- }
- .productList .list .item .text.on {
- width: 508rpx;
- padding: 0 0 0 22rpx;
- }
- .productList .list .item .text .money {
- font-size: 26rpx;
- font-weight: bold;
- margin-top: 8rpx;
- }
- .productList .list .item .text .coupon {
- background: rgba(255, 248, 247, 1);
- border: 1px solid rgba(233, 51, 35, 1);
- border-radius: 4rpx;
- font-size: 20rpx;
- margin-left: 18rpx;
- padding: 1rpx 4rpx;
- }
- .productList .list .item .text .money.on {
- margin-top: 50rpx;
- }
- .productList .list .item .text .money .num {
- font-size: 34rpx;
- }
- .pictrue {
- position: relative;
- }
- .fixed {
- z-index: 100;
- position: fixed;
- left: 0;
- top: 0;
- background-color: #fff;
- box-shadow: 0 10rpx 20rpx -5rpx rgba(0, 0, 0, 0.06);
- }
- .page-btm {
- background-color: #f5f5f5;
- font-size: 32rpx;
- text-align: center;
- color: #d6d6d8;
- }
- </style>
|