123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862 |
- <template>
- <view v-if="pageShow" class="page"
- :class="bgTabVal==2?'fullsize noRepeat':bgTabVal==1?'repeat ysize':'noRepeat ysize'"
- :style="'background-color:'+bgColor+';background-image: url('+bgPic+');min-height:'+windowHeight+'px;'">
- <view v-if="!errorNetwork" :style="colorStyle">
- <skeleton :show="showSkeleton" :isNodes="isNodes" ref="skeleton" loading="chiaroscuro" selector="skeleton"
- bgcolor="#FFF"></skeleton>
- <view class="index skeleton" :style="{visibility: showSkeleton ? 'hidden' : 'visible'}">
- <!-- #ifdef H5 -->
- <view v-for="(item, index) in styleConfig" :key="index">
- <component :is="item.name" :index="index" :dataConfig="item" @changeBarg="changeBarg"
- @changeTab="changeTab" :tempArr="tempArr" :iSshowH="iSshowH" @detail="goDetail"
- :isSortType="isSortType" @bindSortId="bindSortId" @bindHeight="bindHeight" :isFixed="isFixed">
- </component>
- </view>
- <!-- #endif -->
- <!-- #ifdef MP || APP-PLUS -->
- <block v-for="(item, index) in styleConfig" :key="index">
- <!-- <activeParty v-if="item.name == 'activeParty'" :dataConfig="item" :isSortType="isSortType">
- </activeParty> -->
- <!-- <articleList v-if="item.name == 'articleList'" :dataConfig="item" :isSortType="isSortType">
- </articleList> -->
- <!-- <bargain v-if="item.name == 'bargain'" :dataConfig="item" @changeBarg="changeBarg"
- :isSortType="isSortType"></bargain> -->
- <!-- <blankPage v-if="item.name == 'blankPage'" :dataConfig="item" :isSortType="isSortType"></blankPage> -->
- <!-- <combination v-if="item.name == 'combination'" :dataConfig="item" :isSortType="isSortType">
- </combination> -->
- <!-- <coupon v-if="item.name == 'coupon'" :dataConfig="item" :isSortType="isSortType"></coupon> -->
- <!-- <customerService v-if="item.name == 'customerService'" :dataConfig="item" :isSortType="isSortType">
- </customerService> -->
- <!-- <goodList v-if="item.name == 'goodList'" :dataConfig="item" @detail="goDetail"
- :isSortType="isSortType"></goodList> -->
- <!-- <guide v-if="item.name == 'guide'" :dataConfig="item" :isSortType="isSortType"></guide> -->
- <headerSerch v-if="item.name == 'headerSerch'" :dataConfig="item"></headerSerch>
- <!-- <liveBroadcast v-if="item.name == 'liveBroadcast'" :dataConfig="item" :isSortType="isSortType">
- </liveBroadcast> -->
- <menus v-if="item.name == 'menus'" :dataConfig="item" :isSortType="isSortType"></menus>
- <news v-if="item.name == 'news'" :dataConfig="item" :isSortType="isSortType"></news>
- <!-- <pictureCube v-if="item.name == 'pictureCube'" :dataConfig="item" :isSortType="isSortType">
- </pictureCube> -->
- <promotionList v-if="item.name == 'promotionList'" :dataConfig="item" @changeTab="changeTab"
- :tempArr="tempArr" :iSshowH="iSshowH" @detail="goDetail" :isSortType="isSortType">
- </promotionList>
- <!-- <richText v-if="item.name == 'richText'" :dataConfig="item" :isSortType="isSortType"></richText> -->
- <!-- <seckill v-if="item.name == 'seckill'" :dataConfig="item" :isSortType="isSortType"></seckill> -->
- <swiperBg v-if="item.name == 'swiperBg'" :dataConfig="item" :isSortType="isSortType"></swiperBg>
- <!-- <swipers v-if="item.name == 'swipers'" :dataConfig="item" :isSortType="isSortType"></swipers> -->
- <tabNav v-if="item.name == 'tabNav'" :dataConfig="item" @bindHeight="bindHeighta"
- @bindSortId="bindSortId" :isFixed="isFixed"></tabNav>
- <!-- <titles v-if="item.name == 'titles'" :dataConfig="item" :isSortType="isSortType"></titles> -->
- </block>
- <!-- #endif -->
- <!-- 分类商品模块 -->
- <!-- #ifdef APP-PLUS -->
- <view class="sort-product" v-if="isSortType == 1" style="margin-top: 0;">
- <scroll-view scroll-x="true" style="background: #fff;">
- <view class="sort-box" v-if="sortList.children && sortList.children.length">
- <view class="sort-item" v-for="(item, index) in sortList.children" :key="index"
- @click="changeSort(item, index)" :class="{ on: curSort == index }">
- <image :src="item.pic" mode="" v-if="item.pic"></image>
- <image src="/static/images/sort-img.png" mode="" v-else></image>
- <view class="txt">{{ item.cate_name }}</view>
- </view>
- </view>
- </scroll-view>
- <view class="product-list" v-if="goodList.length">
- <view class="product-item" v-for="(item, index) in goodList" @click="goGoodsDetail(item)">
- <image :src="item.image"></image>
- <span class="pictrue_log_big pictrue_log_class"
- v-if="item.activity && item.activity.type === '1'">{{$t(`秒杀`)}}</span>
- <span class="pictrue_log_big pictrue_log_class"
- v-if="item.activity && item.activity.type === '2'">{{$t(`砍价`)}}</span>
- <span class="pictrue_log_big pictrue_log_class"
- v-if="item.activity && item.activity.type === '3'">{{$t(`拼团`)}}</span>
- <view class="info">
- <view class="title line1">{{ item.store_name }}</view>
- <view class="price-box">
- <text>{{$t(`¥`)}}</text>
- {{ item.price }}
- </view>
- </view>
- </view>
- </view>
- <Loading :loaded="loaded" :loading="loading"></Loading>
- <view class="" v-if="goodList.length == 0 && loaded">
- <view class="emptyBox">
- <image :src="imgHost + '/statics/images/no-thing.png'"></image>
- <view class="tips">{{$t(`暂无商品,去看点别的吧`)}}</view>
- </view>
- <recommend :hostProduct="hostProduct"></recommend>
- </view>
- </view>
- <!-- #endif -->
- <!-- #ifndef APP-PLUS -->
- <view class="sort-product" v-if="isSortType == 1" :style="{ marginTop: sortMpTop + 'px' }">
- <scroll-view scroll-x="true" style="background: #fff;">
- <view class="sort-box" v-if="sortList.children && sortList.children.length">
- <view class="sort-item" v-for="(item, index) in sortList.children" :key="index"
- @click="changeSort(item, index)" :class="{ on: curSort == index }">
- <image :src="item.pic" mode="" v-if="item.pic"></image>
- <image src="/static/images/sort-img.png" mode="" v-else></image>
- <view class="txt">{{ item.cate_name }}</view>
- </view>
- </view>
- </scroll-view>
- <view class="product-list" v-if="goodList.length">
- <view class="product-item" v-for="(item, index) in goodList" @click="goGoodsDetail(item)">
- <image :src="item.image"></image>
- <span class="pictrue_log_big pictrue_log_class"
- v-if="item.activity && item.activity.type === '1'">{{$t(`秒杀`)}}</span>
- <span class="pictrue_log_big pictrue_log_class"
- v-if="item.activity && item.activity.type === '2'">{{$t(`砍价`)}}</span>
- <span class="pictrue_log_big pictrue_log_class"
- v-if="item.activity && item.activity.type === '3'">{{$t(`拼团`)}}</span>
- <span class="pictrue_log_big pictrue_log_class" v-if="item.checkCoupon">{{$t(`券`)}}</span>
- <view class="info">
- <view class="title line2">{{ item.store_name }}</view>
- <view class="price-box">
- <text>{{$t(`¥`)}}</text>
- {{ item.price }}
- </view>
- </view>
- </view>
- </view>
- <Loading :loaded="loaded" :loading="loading"></Loading>
- <view class="" v-if="goodList.length == 0 && loaded">
- <view class="emptyBox">
- <image :src="imgHost + '/statics/images/no-thing.png'"></image>
- <view class="tips">{{$t(`暂无数据`)}}</view>
- </view>
- <recommend :hostProduct="hostProduct"></recommend>
- </view>
- </view>
- <!-- #endif -->
- <!-- <view 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> -->
- <!-- #ifdef MP -->
- <!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" :isGoIndex="false"></authorize> -->
- <!-- #endif -->
- <couponWindow :window="isCouponShow" @onColse="couponClose" :couponImage="couponObj.image"
- :couponList="couponObj.list"></couponWindow>
- <view class="uni-p-b-98" v-if="footerStatus"></view>
- <view v-if="site_config" class="site-config" @click="goICP">{{ site_config }}</view>
- <!-- <pageFooter v-if="footerStatus"></pageFooter> -->
- <view class="foot" v-if="newData.status && newData.status.status">
- <view class="page-footer" id="target" :style="{'background-color':newData.bgColor.color[0].item}">
- <view class="foot-item" v-for="(item,index) in newData.menuList" :key="index"
- @click="goRouter(item)">
- <block v-if="item.link == activeRouter">
- <image :src="item.imgList[0]"></image>
- <view class="txt" :style="{color:newData.activeTxtColor.color[0].item}">
- {{$t(item.name)}}
- </view>
- </block>
- <block v-else>
- <image :src="item.imgList[1]"></image>
- <view class="txt" :style="{color:newData.txtColor.color[0].item}">{{$t(item.name)}}
- </view>
- </block>
- <div class="count-num"
- v-if="item.link === '/pages/order_addcart/order_addcart' && countNum > 0">
- {{countNum}}
- </div>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view v-else>
- <view class="error-network">
- <image :src="imgHost + '/statics/images/error-network.png'"></image>
- <view class="title">{{$t(`网络连接断开`)}}</view>
- <view class="con">
- <view class="label">{{$t(`请检查情况:`)}}:</view>
- <view class="item">· {{$t(`在设置中是否已开启网络权限:`)}}</view>
- <view class="item">· {{$t(`当前是否处于弱网环境`)}}</view>
- <view class="item">· {{$t(`版本是否过低,升级试试吧`)}}</view>
- </view>
- <view class="btn" @click="reconnect">{{$t(`重新连接`)}}</view>
- </view>
- </view>
- <!-- #ifdef APP-PLUS -->
- <app-update v-if="!privacyStatus" ref="appUpdate" :force="true" :tabbar="false"></app-update>
- <view class="privacy-wrapper" v-if="privacyStatus">
- <view class="privacy-box">
- <view class="title">{{$t(`服务协议与隐私政策`)}}</view>
- <view class="content">
- {{$t(`请务必审慎阅读、充分理解“服务协议与 隐私政策”各条款,包括但不限于:为了 向你提供即时通讯、内容分享等服务,我 们需要收集你的设备信息、操作日志等个
- 人信息。你可以在“设置”中查看、变更、删除个人信息并管理你的授权。`)}}<br>
- {{$t(`你可以阅读`)}}<navigator url="/pages/users/privacy/index?type=3">{{$t(`《服务协议与隐私政策》`)}}</navigator>
- {{$t(`了解详细信息。如你同意,请点击“我同意”开始接受我们的服务。`)}}
- </view>
- <view class="btn-box">
- <view class="btn-item" @click="confirmApp">{{$t(`我同意`)}}</view>
- <view class="btn" @click="closeModel">{{$t(`残忍拒绝`)}}</view>
- </view>
- </view>
- </view>
- <!-- #endif -->
- </view>
- </template>
- <script>
- const app = getApp();
- import colors from "@/mixins/color";
- import couponWindow from '@/components/couponWindow/index';
- import {
- getCouponV2,
- getCouponNewUser,
- siteConfig
- } from '@/api/api.js';
- import {
- getNavigation
- } from '@/api/public.js';
- // #ifdef H5
- import mConfig from './components/index.js';
- // #endif
- // #ifdef MP || APP-PLUS
- import authorize from '@/components/Authorize';
- import activeParty from './components/activeParty';
- import headerSerch from './components/headerSerch';
- import swipers from './components/swipers';
- import coupon from './components/coupon';
- import articleList from './components/articleList';
- import bargain from './components/bargain';
- import blankPage from './components/blankPage';
- import combination from './components/combination';
- import customerService from './components/customerService';
- import goodList from './components/goodList';
- import guide from './components/guide';
- import liveBroadcast from './components/liveBroadcast';
- import menus from './components/menus';
- import news from './components/news';
- import pictureCube from './components/pictureCube';
- import promotionList from './components/promotionList';
- import richText from './components/richText';
- import seckill from './components/seckill';
- import swiperBg from './components/swiperBg';
- import tabNav from './components/tabNav';
- import titles from './components/titles';
- import appUpdate from "@/components/update/app-update.vue";
- import {
- getTempIds
- } from '@/api/api.js';
- import {
- SUBSCRIBE_MESSAGE,
- TIPS_KEY
- } from '@/config/cache';
- // #endif
- import {
- mapGetters
- } from 'vuex';
- import {
- getDiy,
- getIndexData
- } from '@/api/api.js';
- import {
- getGroomList,
- getCategoryList,
- getProductslist,
- getProductHot
- } from '@/api/store.js';
- import {
- goShopDetail
- } from '@/libs/order.js';
- import {
- getCartCounts,
- } from '@/api/order.js';
- import {
- toLogin
- } from '@/libs/login.js';
- import { HTTP_REQUEST_URL } from '@/config/app';
- import pageFooter from '@/components/pageFooter/index.vue';
- import Loading from '@/components/Loading/index.vue';
- import recommend from '@/components/recommend';
- export default {
- computed: mapGetters(['isLogin', 'uid']),
- mixins: [colors],
- components: {
- recommend,
- Loading,
- pageFooter,
- couponWindow,
- // #ifdef H5
- ...mConfig,
- // #endif
- // #ifdef MP || APP-PLUS
- authorize,
- activeParty,
- headerSerch,
- swipers,
- coupon,
- articleList,
- bargain,
- blankPage,
- combination,
- customerService,
- goodList,
- guide,
- liveBroadcast,
- menus,
- pictureCube,
- news,
- promotionList,
- richText,
- seckill,
- swiperBg,
- tabNav,
- titles,
- appUpdate, //APP更新
- // #endif
- },
- computed: mapGetters(['isLogin', 'cartNum']),
- data() {
- return {
- imgHost: HTTP_REQUEST_URL,
- showSkeleton: true, //骨架屏显示隐藏
- isNodes: 0, //控制什么时候开始抓取元素节点,只要数值改变就重新抓取
- styleConfig: [],
- tempArr: [],
- goodType: 3,
- loading: false,
- loadend: false,
- loadTitle: this.$t(`下拉加载更多`), //提示语
- page: 1,
- limit: this.$config.LIMIT,
- iSshowH: false,
- numConfig: 0,
- code: '',
- isCouponShow: false,
- couponObj: {},
- couponObjs: {
- show: false
- },
- shareInfo: {},
- footConfig: {},
- isSortType: 0,
- sortList: '',
- sortAll: [],
- goodPage: 1,
- goodList: [],
- newData: {},
- sid: 0,
- curSort: 0,
- sortMpTop: 0,
- loaded: false,
- loading: false,
- hostProduct: [],
- hotScroll: false,
- hotPage: 1,
- hotLimit: 10,
- domOffsetTop: 50,
- // #ifdef APP-PLUS || MP
- isFixed: true,
- // #endif
- // #ifdef H5
- isFixed: false,
- // #endif
- site_config: '',
- errorNetwork: false, // 是否断网
- privacyStatus: false, // 隐私政策是否同意过
- footerStatus: false,
- isHeaderSerch: false,
- bgColor: '',
- bgPic: '',
- bgTabVal: '',
- pageShow: true,
- windowHeight: 0,
- activeRouter: '',
- countNum: 0
- };
- },
- onPullDownRefresh() {
- this.diyData();
- },
- created(options) {
- let that = this
- this.$nextTick(function () {
- uni.getSystemInfo({
- success: function (res) {
- that.windowHeight = res.windowHeight;
- }
- });
- })
- // getNavigation().then(res => {
- // this.newData = res.data
- // if (this.newData.status && this.newData.status.status) {
- // uni.hideTabBar()
- // } else {
- // uni.showTabBar()
- // }
- // })
- uni.hideTabBar()
- let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
- let curRoute = routes[routes.length - 1].route //获取当前页面路由
- this.activeRouter = '/' + curRoute
- // #ifdef APP-PLUS
- uni.setStorageSync("privacyStatus", true);
- // try {
- // let val = uni.getStorageSync('privacyStatus') || false
- // if (!val) {
- // this.privacyStatus = true
- // }
- // } catch (e) {}
- // #endif
- this.diyData();
- this.getIndexData();
- // #ifdef MP
- this.getTempIds();
- // #endif
- // #ifndef APP-PLUS
- // siteConfig().then(res => {
- // this.site_config = res.data.record_No
- // }).catch(err => {
- // console.error(err.msg);
- // });
- // #endif
- // 优惠券弹窗
- // var newDates = new Date().toLocaleDateString();
- if (this.isLogin) {
- this.getCoupon();
- getCartCounts().then(res => {
- this.countNum = res.data.count
- this.$store.commit('indexData/setCartNum', res.data.count > 99 ? '..' : res.data.count +
- '')
- if (res.data.count > 0) {
- wx.setTabBarBadge({
- index: Number(uni.getStorageSync('FOOTER_ADDCART')) || 2,
- text: res.data.count + ''
- })
- } else {
- wx.hideTabBarRedDot({
- index: Number(uni.getStorageSync('FOOTER_ADDCART')) || 2
- })
- }
- });
- }
- },
- // onReady() {
- // let that = this
- // uni.getSystemInfo({
- // success: function(res) { // res - 各种参数
- // let info = uni.createSelectorQuery().select(".hander"); // 获取某个元素
- // info.boundingClientRect(function(data) { //data - 各种参数
- // let view = res.windowHeight - data.height
- // that.heightHome = view
- // }).exec()
- // }
- // });
- // },
- watch: {
- isLogin: {
- deep: true, //深度监听设置为 true
- handler: function (newV, oldV) {
- // 优惠券弹窗
- var newDates = new Date().toLocaleDateString();
- if (newV) {
- try {
- var oldDate = uni.getStorageSync('oldDate') || '';
- } catch { }
- if (oldDate != newDates) {
- this.getCoupon();
- }
- }
- }
- }
- },
- onReady() { },
- methods: {
- // #ifdef APP-PLUS
- // 同意隐私协议
- confirmApp() {
- uni.setStorageSync('privacyStatus', true)
- this.privacyStatus = false
- },
- // 关闭Model
- closeModel() {
- //退出app
- uni.getSystemInfo({
- success: function (res) { // 判断为安卓的手机
- if (res.platform == 'android') { // 安卓退出app
- plus.runtime.quit();
- } else { // 判断为ios的手机,退出App
- plus.ios.import("UIApplication").sharedApplication().performSelector("exit");
- }
- }
- })
- },
- // #endif
- // 重新链接
- reconnect() {
- uni.showLoading({
- title: this.$t(`加载中`)
- })
- this.diyData();
- this.getIndexData();
- getShare().then(res => {
- this.shareInfo = res.data;
- });
- },
- goICP() {
- // #ifdef H5
- window.open('http://beian.miit.gov.cn/');
- // #endif
- // #ifdef MP
- uni.navigateTo({
- url: `/pages/annex/web_view/index?url=https://beian.miit.gov.cn/`
- });
- // #endif
- },
- bindHeighta(data) {
- // #ifdef APP-PLUS
- this.sortMpTop = data.top + data.height;
- // #endif
- },
- bindHeight(data) {
- uni.hideLoading();
- this.domOffsetTop = data.top;
- },
- // 去商品详情
- goGoodsDetail(item) {
- goShopDetail(item, this.uid).then(res => {
- uni.navigateTo({
- url: `/pages/goods_details/index?id=${item.id}`
- });
- });
- },
- /**
- * 获取我的推荐
- */
- get_host_product: function () {
- let that = this;
- if (that.hotScroll) return;
- getProductHot(that.hotPage, that.hotLimit).then(res => {
- that.hotPage++;
- that.hotScroll = res.data.length < that.hotLimit;
- that.hostProduct = that.hostProduct.concat(res.data);
- // that.$set(that, 'hostProduct', res.data)
- });
- },
- // 分类点击
- changeSort(item, index) {
- if (this.curSort == index) return;
- this.curSort = index;
- this.sid = item.id;
- this.goodList = [];
- this.goodPage = 1;
- this.loaded = false;
- this.getGoodsList();
- },
- // 获取分类id
- bindSortId(data) {
- this.isSortType = data == -99 ? 0 : 1;
- this.getProductList(data);
- if (this.hostProduct.length == 0) {
- this.get_host_product();
- }
- },
- getProductList(data) {
- let tempObj = '';
- this.curSort = 0;
- this.loaded = false;
- if (this.sortAll.length > 0) {
- this.sortAll.forEach((el, index) => {
- if (el.id == data) {
- this.$set(this, 'sortList', el);
- this.sid = el.children.length ? el.children[0].id : '';
- }
- });
- this.goodList = [];
- this.goodPage = 1;
- this.$nextTick(() => {
- if (this.sortList != '') this.getGoodsList();
- });
- } else {
- getCategoryList().then(res => {
- this.sortAll = res.data;
- res.data.forEach((el, index) => {
- if (el.id == data) {
- this.sortList = el;
- this.sid = el.children.length ? el.children[0].id : '';
- }
- });
- this.goodList = [];
- this.goodPage = 1;
- this.$nextTick(() => {
- if (this.sortList != '') this.getGoodsList();
- });
- });
- }
- },
- getGoodsList() {
- if (this.loading || this.loaded) return;
- this.loading = true;
- getProductslist({
- sid: this.sid,
- keyword: '',
- priceOrder: '',
- salesOrder: '',
- news: 0,
- page: this.goodPage,
- limit: 10,
- cid: this.sortList.id
- }).then(res => {
- this.loading = false;
- this.loaded = res.data.length < 10;
- this.goodPage++;
- this.goodList = this.goodList.concat(res.data);
- });
- },
- // 新用户优惠券
- getNewCoupon() {
- const oldUser = uni.getStorageSync('oldUser') || 0;
- if (!oldUser) {
- getCouponNewUser().then(res => {
- const {
- data
- } = res;
- if (data.show) {
- if (data.list.length) {
- this.isCouponShow = true;
- this.couponObj = data;
- uni.setStorageSync('oldUser', 1);
- }
- } else {
- uni.setStorageSync('oldUser', 1);
- }
- });
- }
- },
- // 优惠券弹窗
- getCoupon() {
- const tagDate = uni.getStorageSync('tagDate') || '',
- nowDate = new Date().toLocaleDateString();
- if (tagDate === nowDate) {
- this.getNewCoupon();
- } else {
- getCouponV2().then(res => {
- const {
- data
- } = res;
- if (data.list.length) {
- this.isCouponShow = true;
- this.couponObj = data;
- uni.setStorageSync('tagDate', new Date().toLocaleDateString());
- } else {
- this.getNewCoupon();
- }
- });
- }
- },
- // 优惠券弹窗关闭
- couponClose() {
- this.isCouponShow = false;
- if (!uni.getStorageSync('oldUser')) {
- this.getNewCoupon();
- }
- },
- onLoadFun() { },
- // #ifdef H5
- // 获取url后面的参数
- getQueryString(name) {
- var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
- var reg_rewrite = new RegExp('(^|/)' + name + '/([^/]*)(/|$)', 'i');
- var r = window.location.search.substr(1).match(reg);
- var q = window.location.pathname.substr(1).match(reg_rewrite);
- if (r != null) {
- return unescape(r[2]);
- } else if (q != null) {
- return unescape(q[2]);
- } else {
- return null;
- }
- },
- // #endif
- // #ifdef MP
- getTempIds() {
- let messageTmplIds = wx.getStorageSync(SUBSCRIBE_MESSAGE);
- if (!messageTmplIds) {
- getTempIds().then(res => {
- if (res.data) wx.setStorageSync(SUBSCRIBE_MESSAGE, JSON.stringify(res.data));
- });
- }
- },
- // #endif
- // 对象转数组
- objToArr(data) {
- let obj = Object.keys(data);
- let m = obj.map(key => data[key]);
- return m;
- },
- diyData() {
- uni.request({
- url:'api/test',
- success:res=>{
- console.log(res)
- }
- })
- let that = this;
- let res = {
- data: {
- "name": "蓝色主题模板(官方演示勿动!)",
- "value": {
- "1666235374470008": {
- "name": "liveBroadcast",
- "timestamp": "1666235374470008",
- "setUp": {
- "tabVal": 0
- },
- "bg": {
- "title": "背景色",
- "name": "bg",
- "default": [
- {
- "item": "#fff"
- }
- ],
- "color": [
- {
- "item": "#fff"
- }
- ]
- },
- "boxShadow": {
- "title": "阴影颜色",
- "name": "playBg",
- "default": [
- {
- "item": "rgba(0, 0, 0, 0.06)"
- }
- ],
- "color": [
- {
- "item": "rgba(0, 0, 0, 0.06)"
- }
- ]
- },
- "limit": {
- "title": "显示个数",
- "val": 1
- },
- "listStyle": {
- "title": "列表样式",
- "name": "listStyle",
- "type": 0,
- "list": [
- {
- "val": "单列",
- "icon": "iconPic_big"
- },
- {
- "val": "双列",
- "icon": "iconPic_small"
- },
- {
- "val": "大图",
- "icon": "iconbanner_1"
- }
- ]
- },
- "mbConfig": {
- "title": "页面间距",
- "val": 0,
- "min": 0
- },
- "id": "id1666235050825000"
- },
- "1666235374470000": {
- "name": "headerSerch",
- "timestamp": "1666235374470000",
- "setUp": {
- "tabVal": 0
- },
- "bgColor": {
- "title": "背景颜色(渐变)",
- "name": "bgColor",
- "default": [
- {
- "item": "#F62C2C"
- },
- {
- "item": "#F96E29"
- }
- ],
- "color": [
- {
- "item": "rgba(29,176,252,1)"
- },
- {
- "item": "rgba(64,209,244,1)"
- }
- ]
- },
- "boxStyle": {
- "title": "边框样式",
- "name": "boxStyle",
- "type": 0,
- "list": [
- {
- "val": "圆角",
- "icon": "iconPic_fillet"
- },
- {
- "val": "直角",
- "icon": "iconPic_square"
- }
- ]
- },
- "txtStyle": {
- "title": "文本位置",
- "name": "txtStyle",
- "type": 1,
- "list": [
- {
- "val": "居左",
- "icon": "icondoc_left"
- },
- {
- "val": "居中",
- "icon": "icondoc_center"
- }
- ]
- },
- "prConfig": {
- "title": "背景边距",
- "val": 8,
- "min": 0
- },
- "mbConfig": {
- "title": "页面间距",
- "val": 0,
- "min": 0
- },
- "hotWords": {
- "list": [
- {
- "val": ""
- }
- ]
- },
- "logoConfig": {
- "type": 1,
- "header": "设置logo",
- "title": "",
- "url": "https://demo26.crmeb.net/uploads/attach/2022/10/20221009/7436ee5680bc5d67c46a6017939475e5.png"
- },
- "id": "id1665385357481000"
- },
- "1666235374470001": {
- "name": "swiperBg",
- "timestamp": "1666235374470001",
- "setUp": {
- "tabVal": 1
- },
- "swiperConfig": {
- "title": "最多可添加10张图片,建议宽度750px;鼠标拖拽左侧圆点可调整图片 顺序",
- "maxList": 10,
- "list": [
- {
- "img": "https://demo26.crmeb.net/uploads/attach/2022/09/20220928/8903e1c331b95263270d1bf558315eea.jpg",
- "info": [
- {
- "title": "标题",
- "value": "电商社交",
- "tips": "选填,不超过4个字",
- "max": 4
- },
- {
- "title": "链接",
- "value": "/pages/goods_cate/goods_cate",
- "tips": "请输入链接",
- "max": 100
- }
- ]
- },
- {
- "img": "https://qiniu.crmeb.net/attach/2021/10/78c7c20211011171437256.png",
- "info": [
- {
- "title": "标题",
- "value": "今日推荐",
- "tips": "选填,不超过4个字",
- "max": 4
- },
- {
- "title": "链接",
- "value": "/pages/extension/customer_list/chat",
- "tips": "请输入链接",
- "max": 100
- }
- ]
- },
- {
- "img": "https://qiniu.crmeb.net/attach/2021/10/ce66b202110111714168104.png",
- "info": [
- {
- "title": "标题",
- "value": "超值爆款",
- "tips": "选填,不超过4个字",
- "max": 4
- },
- {
- "title": "链接",
- "value": "/pages/users/user_sgin/index",
- "tips": "请输入链接",
- "max": 100
- }
- ]
- }
- ]
- },
- "isShow": {
- "title": "是否显示背景色",
- "val": false
- },
- "bgColor": {
- "title": "背景颜色(渐变)",
- "default": [
- {
- "item": "#F62C2C"
- },
- {
- "item": "#F96E29"
- }
- ],
- "color": [
- {
- "item": "rgba(29,176,252,1)"
- },
- {
- "item": "rgba(64,209,244,1)"
- }
- ]
- },
- "dotColor": {
- "title": "指示器颜色",
- "default": [
- {
- "item": "#fff"
- }
- ],
- "color": [
- {
- "item": "rgba(29,176,252,1)"
- }
- ]
- },
- "lrConfig": {
- "title": "左右边距",
- "val": 11,
- "min": 0
- },
- "mbConfig": {
- "title": "页面间距",
- "val": 10,
- "min": 0
- },
- "docConfig": {
- "cname": "swiper",
- "title": "指示器样式",
- "type": 0,
- "list": [
- {
- "val": "圆形",
- "icon": "iconDot"
- },
- {
- "val": "直线",
- "icon": "iconSquarepoint"
- },
- {
- "val": "数字",
- "icon": "iconshuzi"
- },
- {
- "val": "无指示器",
- "icon": "iconjinyong"
- }
- ]
- },
- "txtStyle": {
- "title": "指示器位置",
- "type": 2,
- "list": [
- {
- "val": "居左",
- "icon": "icondoc_left"
- },
- {
- "val": "居中",
- "icon": "icondoc_center"
- },
- {
- "val": "居右",
- "icon": "icondoc_right"
- }
- ]
- },
- "imgConfig": {
- "cname": "docStyle",
- "title": "轮播图样式",
- "type": 0,
- "list": [
- {
- "val": "圆角",
- "icon": "iconPic_fillet"
- },
- {
- "val": "直角",
- "icon": "iconPic_square"
- }
- ]
- },
- "id": "id1665385357481001"
- },
- "1666235374470002": {
- "name": "news",
- "timestamp": "1666235374470002",
- "setUp": {
- "tabVal": 1
- },
- "txtStyle": {
- "title": "文本位置",
- "name": "txtStyle",
- "type": 0,
- "list": [
- {
- "val": "居左",
- "icon": "icondoc_left",
- "style": "left"
- },
- {
- "val": "居中",
- "icon": "icondoc_center",
- "style": "center"
- },
- {
- "val": "居右",
- "icon": "icondoc_right",
- "style": "right"
- }
- ]
- },
- "bgColor": {
- "title": "背景颜色",
- "default": [
- {
- "item": "#fff"
- }
- ],
- "color": [
- {
- "item": "#fff"
- }
- ]
- },
- "txtColor": {
- "title": "文字颜色",
- "default": [
- {
- "item": "#333"
- }
- ],
- "color": [
- {
- "item": "#333"
- }
- ]
- },
- "listConfig": {
- "title": "最多可添加10个版块;鼠标拖拽左侧圆点可调整版块顺序",
- "max": 10,
- "list": [
- {
- "chiild": [
- {
- "title": "标题",
- "val": "标准版4.5正式发布,大家快来体验",
- "max": 30,
- "pla": "选填,不超过30个字",
- "empty": true
- },
- {
- "title": "链接",
- "val": "/pages/extension/news_details/index?id=128",
- "max": 200,
- "pla": "请输入连接"
- }
- ]
- }
- ],
- "tabCur": 0
- },
- "bgStyle": {
- "title": "背景样式",
- "name": "bgStyle",
- "type": 1,
- "list": [
- {
- "val": "直角",
- "icon": "iconPic_square"
- },
- {
- "val": "圆角",
- "icon": "iconPic_fillet"
- }
- ]
- },
- "prConfig": {
- "title": "背景边距",
- "val": 10,
- "min": 0
- },
- "mbConfig": {
- "title": "页面间距",
- "val": 10,
- "min": 0
- },
- "logoConfig": {
- "header": "图标设置",
- "title": "最多可添加1张图片,建议宽度130 * 36px",
- "url": "https://qiniu.crmeb.net/attach/2021/11/6d4fe202111181229083421.png"
- },
- "id": "id1665385357481002"
- },
- "1666235374470003": {
- "name": "menus",
- "timestamp": "1666235374470003",
- "setUp": {
- "tabVal": 0
- },
- "tabConfig": {
- "title": "展示样式",
- "tabVal": 1,
- "type": 1,
- "tabList": [
- {
- "name": "单行展示",
- "icon": "icondanhang"
- },
- {
- "name": "多行展示",
- "icon": "iconduohang"
- }
- ]
- },
- "rowsNum": {
- "title": "显示行数",
- "name": "rowsNum",
- "type": 0,
- "list": [
- {
- "val": "2行",
- "icon": "icon2hang"
- },
- {
- "val": "3行",
- "icon": "icon3hang"
- },
- {
- "val": "4行",
- "icon": "icon4hang"
- }
- ]
- },
- "menuStyle": {
- "title": "图标样式",
- "name": "menuStyle",
- "type": 1,
- "list": [
- {
- "val": "方形",
- "icon": "iconPic_square"
- },
- {
- "val": "圆形",
- "icon": "icondayuanjiao"
- }
- ]
- },
- "number": {
- "title": "显示个数",
- "name": "number",
- "type": 2,
- "list": [
- {
- "val": "3个",
- "icon": "icon3ge"
- },
- {
- "val": "4个",
- "icon": "icon4ge1"
- },
- {
- "val": "5个",
- "icon": "icon5ge1"
- }
- ]
- },
- "pointerStyle": {
- "title": "指示器样式",
- "name": "pointerStyle",
- "type": 2,
- "list": [
- {
- "val": "长条",
- "icon": "iconSquarepoint"
- },
- {
- "val": "圆形",
- "icon": "iconDot"
- },
- {
- "val": "无指示器",
- "icon": "iconjinyong"
- }
- ]
- },
- "bgStyle": {
- "title": "背景样式",
- "name": "bgStyle",
- "type": 1,
- "list": [
- {
- "val": "直角",
- "icon": "iconPic_square"
- },
- {
- "val": "圆角",
- "icon": "iconPic_fillet"
- }
- ]
- },
- "prConfig": {
- "title": "背景边距",
- "val": 10,
- "min": 0
- },
- "menuConfig": {
- "title": "最多可添加1张图片,建议宽度90 * 90px",
- "maxList": 100,
- "list": [
- {
- "img": "https://qiniu.crmeb.net/attach/2021/09/02d9e202109101106364468.png",
- "info": [
- {
- "title": "标题",
- "value": "预约自提",
- "tips": "选填,不超过4个字",
- "max": 4
- },
- {
- "title": "链接",
- "value": "/pages/goods_details/index?id=109",
- "tips": "请输入链接",
- "max": 100
- }
- ]
- },
- {
- "img": "https://qiniu.crmeb.net/attach/2021/09/4a21a202109101106368349.png",
- "info": [
- {
- "title": "标题",
- "value": "领优惠券",
- "tips": "选填,不超过4个字",
- "max": 4
- },
- {
- "title": "链接",
- "value": "/pages/users/user_get_coupon/index",
- "tips": "请输入链接",
- "max": 100
- }
- ]
- },
- {
- "img": "https://demo26.crmeb.net/uploads/attach/2022/09/20220916/d09d2286f960697ab7e1fb9d2595605f.png",
- "info": [
- {
- "title": "标题",
- "value": "特价限购",
- "tips": "选填,不超过4个字",
- "max": 4
- },
- {
- "title": "链接",
- "value": "/pages/goods_details/index?id=116",
- "tips": "请输入链接",
- "max": 100
- }
- ]
- },
- {
- "img": "https://qiniu.crmeb.net/attach/2021/09/9d74b20210910110637104.png",
- "info": [
- {
- "title": "标题",
- "value": "新闻资讯",
- "tips": "选填,不超过4个字",
- "max": 4
- },
- {
- "title": "链接",
- "value": "/pages/extension/news_list/index",
- "tips": "请输入链接",
- "max": 100
- }
- ]
- },
- {
- "img": "https://qiniu.crmeb.net/attach/2021/09/1c95120210910110636424.png",
- "info": [
- {
- "title": "标题",
- "value": "助力砍价",
- "tips": "选填,不超过4个字",
- "max": 4
- },
- {
- "title": "链接",
- "value": "/pages/activity/goods_bargain/index",
- "tips": "请输入链接",
- "max": 100
- }
- ]
- },
- {
- "img": "https://qiniu.crmeb.net/attach/2021/09/23332202109101106361126.png",
- "info": [
- {
- "title": "标题",
- "value": "限时秒杀",
- "tips": "选填,不超过4个字",
- "max": 4
- },
- {
- "title": "链接",
- "value": "/pages/activity/goods_seckill/index",
- "tips": "请输入链接",
- "max": 100
- }
- ]
- },
- {
- "img": "https://qiniu.crmeb.net/attach/2021/09/34f81202109101106357549.png",
- "info": [
- {
- "title": "标题",
- "value": "积分商城",
- "tips": "选填,不超过4个字",
- "max": 4
- },
- {
- "title": "链接",
- "value": "/pages/points_mall/index",
- "tips": "请输入链接",
- "max": 100
- }
- ]
- },
- {
- "img": "https://demo26.crmeb.net/uploads/attach/2022/09/20220916/06c63d52fc6772917540d47076606680.png",
- "info": [
- {
- "title": "标题",
- "value": "成团返佣",
- "tips": "选填,不超过4个字",
- "max": 4
- },
- {
- "title": "链接",
- "value": "/pages/activity/goods_combination_details/index?id=23",
- "tips": "请输入链接",
- "max": 100
- }
- ]
- },
- {
- "img": "https://demo26.crmeb.net/uploads/attach/2022/09/20220916/e31cdcb6fa7660aee45912ef572cc114.png",
- "info": [
- {
- "title": "标题",
- "value": "用户足迹",
- "tips": "选填,不超过4个字",
- "max": 4
- },
- {
- "title": "链接",
- "value": "/pages/users/visit_list/index",
- "tips": "请输入链接",
- "max": 100
- }
- ]
- },
- {
- "img": "https://qiniu.crmeb.net/attach/2021/09/f4598202109101106358762.png",
- "info": [
- {
- "title": "标题",
- "value": "幸运转盘",
- "tips": "选填,不超过4个字",
- "max": 4
- },
- {
- "title": "链接",
- "value": "/pages/goods/lottery/grids/index?type=1",
- "tips": "请输入链接",
- "max": 100
- }
- ]
- }
- ]
- },
- "pointerColor": {
- "title": "指示器颜色",
- "name": "pointerColor",
- "default": [
- {
- "item": "#f44"
- }
- ],
- "color": [
- {
- "item": "#f44"
- }
- ]
- },
- "bgColor": {
- "title": "背景颜色",
- "name": "bgColor",
- "default": [
- {
- "item": "#fff"
- }
- ],
- "color": [
- {
- "item": "#fff"
- }
- ]
- },
- "titleColor": {
- "title": "文字颜色",
- "name": "themeColor",
- "default": [
- {
- "item": "#333333"
- }
- ],
- "color": [
- {
- "item": "rgba(51,51,51,1)"
- }
- ]
- },
- "mbConfig": {
- "title": "页面间距",
- "val": 12,
- "min": 0
- },
- "id": "id1665385357481003"
- },
- "1666235374470004": {
- "name": "activeParty",
- "timestamp": "1666235374470004",
- "setUp": {
- "tabVal": 1
- },
- "titleConfig": {
- "title": "促销标题",
- "value": "超值爆款",
- "place": "请输入标题",
- "max": 10
- },
- "desConfig": {
- "title": "促销简介",
- "value": "美好生活由此开始",
- "place": "请输入简介",
- "max": 8
- },
- "menuConfig": {
- "title": "最多可添加4个版块,图片建议尺寸140 * 140px;鼠标拖拽左侧圆点可 调整版块顺序",
- "maxList": 4,
- "list": [
- {
- "img": "https://qiniu.crmeb.net/attach/2021/11/16/216aaf8ea5fdeff2a31a48f3e931ff46.jpg",
- "info": [
- {
- "title": "标题",
- "value": "今日推荐",
- "tips": "选填,不超过4个字",
- "max": 4
- },
- {
- "title": "简介",
- "value": "店主诚意推荐 品质商品",
- "tips": "选填,不超过20个字",
- "max": 20
- },
- {
- "title": "链接",
- "value": "/pages/columnGoods/HotNewGoods/index?type=1&name=精品推荐",
- "tips": "请输入链接",
- "max": 100
- }
- ]
- },
- {
- "img": "https://qiniu.crmeb.net/attach/2021/11/15/1c72a02ad97f695bd85fa04821b72985.jpg",
- "info": [
- {
- "title": "标题",
- "value": "热门榜单",
- "tips": "选填,不超过4个字",
- "max": 4
- },
- {
- "title": "简介",
- "value": "店主诚意推荐 品质商品",
- "tips": "选填,不超过20个字",
- "max": 20
- },
- {
- "title": "链接",
- "value": "/pages/columnGoods/HotNewGoods/index?type=2&name=热门榜单",
- "tips": "请输入链接",
- "max": 100
- }
- ]
- },
- {
- "img": "https://qiniu.crmeb.net/attach/2021/10/612bb202110121143097664.png",
- "info": [
- {
- "title": "标题",
- "value": "首发新品",
- "tips": "选填,不超过4个字",
- "max": 4
- },
- {
- "title": "简介",
- "value": "新品上架等 你来拿",
- "tips": "选填,不超过20个字",
- "max": 20
- },
- {
- "title": "链接",
- "value": "/pages/columnGoods/HotNewGoods/index?type=3&name=首发新品",
- "tips": "请输入链接",
- "max": 100
- }
- ]
- },
- {
- "img": "https://qiniu.crmeb.net/attach/2021/10/59c17202110130919585671.png",
- "info": [
- {
- "title": "标题",
- "value": "促销单品",
- "tips": "选填,不超过4个字",
- "max": 4
- },
- {
- "title": "简介",
- "value": "综合评选好 产品",
- "tips": "选填,不超过20个字",
- "max": 20
- },
- {
- "title": "链接",
- "value": "/pages/columnGoods/HotNewGoods/index?type=4&name=促销单品",
- "tips": "请输入链接",
- "max": 100
- }
- ]
- }
- ]
- },
- "themeColor": {
- "title": "主题颜色",
- "name": "themeColor",
- "default": [
- {
- "item": "#fc3c3e"
- }
- ],
- "color": [
- {
- "item": "rgba(29,176,252,1)"
- }
- ]
- },
- "bgColor": {
- "title": "标签背景颜色",
- "name": "bgColor",
- "default": [
- {
- "item": "#F62C2C"
- },
- {
- "item": "#F96E29"
- }
- ],
- "color": [
- {
- "item": "rgba(29,176,252,1)"
- },
- {
- "item": "rgba(64,209,244,1)"
- }
- ]
- },
- "boxColor": {
- "title": "背景颜色",
- "name": "boxColor",
- "default": [
- {
- "item": "#ffe5e3"
- }
- ],
- "color": [
- {
- "item": "rgba(208,240,255,1)"
- }
- ]
- },
- "mbConfig": {
- "title": "页面间距",
- "val": 12,
- "min": 0
- },
- "id": "id1665385357481004"
- },
- "1666235374470005": {
- "name": "combination",
- "timestamp": "1666235374470005",
- "setUp": {
- "tabVal": 1
- },
- "numConfig": {
- "val": 3
- },
- "priceShow": {
- "title": "是否显示价格",
- "val": true
- },
- "bntShow": {
- "title": "是否显示按钮",
- "val": true
- },
- "titleShow": {
- "title": "是否显示名称",
- "val": true
- },
- "pinkShow": {
- "title": "是否显示拼团标签",
- "val": true
- },
- "joinShow": {
- "title": "是否显示参团标签",
- "val": true
- },
- "txtColor": {
- "title": "文字背景色",
- "name": "themeColor",
- "default": [
- {
- "item": "rgba(255,68,68,0.1)"
- }
- ],
- "color": [
- {
- "item": "rgba(208,240,255,1)"
- }
- ]
- },
- "conStyle": {
- "title": "背景样式",
- "name": "conStyle",
- "type": 1,
- "list": [
- {
- "val": "直角",
- "icon": "iconPic_square"
- },
- {
- "val": "圆角",
- "icon": "iconPic_fillet"
- }
- ]
- },
- "bgColor": {
- "title": "背景颜色",
- "name": "themeColor",
- "default": [
- {
- "item": "#fff"
- }
- ],
- "color": [
- {
- "item": "#fff"
- }
- ]
- },
- "prConfig": {
- "title": "背景边距",
- "val": 10,
- "min": 0
- },
- "themeColor": {
- "title": "主题风格",
- "name": "themeColor",
- "default": [
- {
- "item": "#E93323"
- }
- ],
- "color": [
- {
- "item": "rgba(29,176,252,1)"
- }
- ]
- },
- "mbConfig": {
- "title": "页面间距",
- "val": 12,
- "min": 0
- },
- "lrConfig": {
- "title": "左右边距",
- "val": 10,
- "min": 0
- },
- "imgConfig": {
- "title": "最多可添加1张图片,建议宽度18 * 18px",
- "url": "https://qiniu.crmeb.net/attach/2021/11/238c5202111181433515309.gif"
- },
- "id": "id1665385357481005"
- },
- "1666235374470006": {
- "name": "bargain",
- "timestamp": "1666235374470006",
- "setUp": {
- "tabVal": 1
- },
- "numConfig": {
- "val": 3
- },
- "priceShow": {
- "title": "是否显示价格",
- "val": true
- },
- "bntShow": {
- "title": "是否显示按钮",
- "val": true
- },
- "themeColor": {
- "title": "主题风格",
- "name": "themeColor",
- "default": [
- {
- "item": "#E93323"
- }
- ],
- "color": [
- {
- "item": "rgba(29,176,252,1)"
- }
- ]
- },
- "titleColor": {
- "title": "标题颜色",
- "name": "txtColor",
- "default": [
- {
- "item": "#FF6000"
- }
- ],
- "color": [
- {
- "item": "rgba(255,152,0,1)"
- }
- ]
- },
- "bgColor": {
- "title": "背景颜色",
- "name": "bgColor",
- "default": [
- {
- "item": "#FDDBB2"
- },
- {
- "item": "#FDEFC6"
- }
- ],
- "color": [
- {
- "item": "#FDDBB2"
- },
- {
- "item": "#FDEFC6"
- }
- ]
- },
- "bgStyle": {
- "title": "背景样式",
- "name": "bgStyle",
- "type": 1,
- "list": [
- {
- "val": "直角",
- "icon": "iconPic_square"
- },
- {
- "val": "圆角",
- "icon": "iconPic_fillet"
- }
- ]
- },
- "prConfig": {
- "title": "背景边距",
- "val": 10,
- "min": 0
- },
- "productGap": {
- "title": "商品间距",
- "val": 10,
- "min": 0
- },
- "mbCongfig": {
- "title": "页面间距",
- "val": 0,
- "min": 0
- },
- "id": "id1665385357481006"
- },
- "1666235374470007": {
- "name": "seckill",
- "timestamp": "1666235374470007",
- "setUp": {
- "tabVal": 1
- },
- "countDownColor": {
- "title": "倒计时背景色",
- "name": "countDownColor",
- "default": [
- {
- "item": "rgba(252,60,62,0.09)"
- }
- ],
- "color": [
- {
- "item": "rgba(255,255,255,0.09)"
- }
- ]
- },
- "themeColor": {
- "title": "主题风格",
- "name": "themeColor",
- "default": [
- {
- "item": "#E93323"
- }
- ],
- "color": [
- {
- "item": "rgba(29,176,255,1)"
- }
- ]
- },
- "conStyle": {
- "title": "背景样式",
- "name": "conStyle",
- "type": 1,
- "list": [
- {
- "val": "直角",
- "icon": "iconPic_square"
- },
- {
- "val": "圆角",
- "icon": "iconPic_fillet"
- }
- ]
- },
- "bgColor": {
- "title": "背景颜色",
- "name": "themeColor",
- "default": [
- {
- "item": "#fff"
- }
- ],
- "color": [
- {
- "item": "#fff"
- }
- ]
- },
- "prConfig": {
- "title": "背景边距",
- "val": 10,
- "min": 0
- },
- "priceShow": {
- "title": "是否显示价格",
- "val": true
- },
- "discountShow": {
- "title": "是否显示折扣标签",
- "val": true
- },
- "titleShow": {
- "title": "是否显示名称",
- "val": true
- },
- "seckillShow": {
- "title": "抢购标签",
- "val": true
- },
- "numberConfig": {
- "val": 3
- },
- "lrConfig": {
- "title": "左右边距",
- "val": 10,
- "min": 0
- },
- "mbConfig": {
- "title": "页面间距",
- "val": 0,
- "min": 0
- },
- "imgConfig": {
- "title": "最多可添加1张图片,建议宽度18 * 18px",
- "url": "https://demo26.crmeb.net/uploads/attach/2022/09/20220930/e537a7fc631006d3571d7a8574438b03.gif"
- },
- "id": "id1665385357481007"
- },
- "1666235374470009": {
- "name": "promotionList",
- "timestamp": "1666235374470009",
- "setUp": {
- "tabVal": 1
- },
- "productList": {
- "title": "促销列表"
- },
- "titleConfig": {
- "title": "标题位置",
- "type": 2,
- "list": [
- {
- "val": "居左",
- "icon": "icondoc_left"
- },
- {
- "val": "居中",
- "icon": "icondoc_center"
- },
- {
- "val": "居右",
- "icon": "icondoc_right"
- }
- ]
- },
- "titleShow": {
- "title": "是否显示商品名称",
- "val": true
- },
- "opriceShow": {
- "title": "是否显示商品原价",
- "val": true
- },
- "priceShow": {
- "title": "是否显示商品价格",
- "val": true
- },
- "couponShow": {
- "title": "是否显示优惠券",
- "val": true
- },
- "tabConfig": {
- "title": "最多可添加4个版块;鼠标拖拽左侧圆点可调整版块顺序",
- "max": 4,
- "tabCur": 3,
- "list": [
- {
- "chiild": [
- {
- "title": "标题",
- "val": "首发新品",
- "max": 4,
- "pla": "选填,不超过四个字"
- },
- {
- "title": "简介",
- "val": "最新出炉",
- "max": 4,
- "pla": "选填,不超过四个字"
- }
- ],
- "link": {
- "title": "链接",
- "activeVal": 3,
- "optiops": [
- {
- "type": 0,
- "value": 1,
- "label": "精品推荐"
- },
- {
- "type": 1,
- "value": 2,
- "label": "热门榜单"
- },
- {
- "type": 2,
- "value": 3,
- "label": "首发新品"
- },
- {
- "type": 3,
- "value": 4,
- "label": "促销单品"
- }
- ]
- }
- },
- {
- "chiild": [
- {
- "title": "标题",
- "val": "精品推荐",
- "max": 4,
- "pla": "选填,不超过四个字"
- },
- {
- "title": "简介",
- "val": "猜你喜欢",
- "max": 4,
- "pla": "选填,不超过四个字"
- }
- ],
- "link": {
- "title": "链接",
- "activeVal": 1,
- "optiops": [
- {
- "type": 0,
- "value": 1,
- "label": "精品推荐"
- },
- {
- "type": 1,
- "value": 2,
- "label": "热门榜单"
- },
- {
- "type": 2,
- "value": 3,
- "label": "首发新品"
- },
- {
- "type": 3,
- "value": 4,
- "label": "促销单品"
- }
- ]
- }
- },
- {
- "chiild": [
- {
- "title": "标题",
- "val": "热门榜单",
- "max": 4,
- "pla": "选填,不超过四个字"
- },
- {
- "title": "简介",
- "val": "好评如云",
- "max": 4,
- "pla": "选填,不超过四个字"
- }
- ],
- "link": {
- "title": "链接",
- "activeVal": 2,
- "optiops": [
- {
- "type": 0,
- "value": 1,
- "label": "精品推荐"
- },
- {
- "type": 1,
- "value": 2,
- "label": "热门榜单"
- },
- {
- "type": 2,
- "value": 3,
- "label": "首发新品"
- },
- {
- "type": 3,
- "value": 4,
- "label": "促销单品"
- }
- ]
- }
- },
- {
- "chiild": [
- {
- "title": "标题",
- "val": "促销单品",
- "max": 4,
- "pla": "选填,不超过四个字"
- },
- {
- "title": "简介",
- "val": "多买多销",
- "max": 4,
- "pla": "选填,不超过四个字"
- }
- ],
- "link": {
- "title": "链接",
- "activeVal": 4,
- "optiops": [
- {
- "type": 0,
- "value": 1,
- "label": "精品推荐"
- },
- {
- "type": 1,
- "value": 2,
- "label": "热门榜单"
- },
- {
- "type": 2,
- "value": 3,
- "label": "首发新品"
- },
- {
- "type": 3,
- "value": 4,
- "label": "促销单品"
- }
- ]
- }
- }
- ]
- },
- "themeColor": {
- "title": "主题风格",
- "name": "themeColor",
- "default": [
- {
- "item": "#F95429"
- }
- ],
- "color": [
- {
- "item": "rgba(29,176,252,1)"
- }
- ]
- },
- "fontColor": {
- "title": "价格颜色",
- "name": "fontColor",
- "default": [
- {
- "item": "#e93323"
- }
- ],
- "color": [
- {
- "item": "rgba(253,80,47,1)"
- }
- ]
- },
- "labelColor": {
- "title": "活动标签",
- "name": "labelColor",
- "default": [
- {
- "item": "#e93323"
- }
- ],
- "color": [
- {
- "item": "rgba(29,176,252,1)"
- }
- ]
- },
- "mbConfig": {
- "title": "页面间距",
- "val": 0,
- "min": 0
- },
- "numConfig": {
- "val": 9
- },
- "id": "id1665385357481008"
- },
- "1666235390875000": {
- "name": "pageFoot",
- "setUp": {
- "tabVal": 0
- },
- "status": {
- "title": "是否自定义",
- "name": "status",
- "status": true
- },
- "txtColor": {
- "title": "文字颜色",
- "name": "txtColor",
- "default": [
- {
- "item": "#282828"
- }
- ],
- "color": [
- {
- "item": "rgba(51,51,51,1)"
- }
- ]
- },
- "activeTxtColor": {
- "title": "选中文字颜色",
- "name": "txtColor",
- "default": [
- {
- "item": "#F62C2C"
- }
- ],
- "color": [
- {
- "item": "rgba(29,176,252,1)"
- }
- ]
- },
- "bgColor": {
- "title": "背景颜色",
- "name": "bgColor",
- "default": [
- {
- "item": "#fff"
- }
- ],
- "color": [
- {
- "item": "#fff"
- }
- ]
- },
- "menuList": [
- {
- "imgList": [
- "https://qiniu.crmeb.net/attach/2021/11/bdf25202111181452426458.png",
- "https://qiniu.crmeb.net/attach/2021/11/aaf1b202111181452576658.png"
- ],
- "name": "首页",
- "link": "/pages/index/index"
- },
- {
- "imgList": [
- "https://demo26.crmeb.net/uploads/attach/2022/09/20220923/14367a2fecd502f51978ed6ea09afe19.png",
- "https://qiniu.crmeb.net/attach/2021/11/59d4a202111181453208678.png"
- ],
- "name": "分类",
- "link": "/pages/goods_cate/goods_cate"
- },
- {
- "imgList": [
- "https://qiniu.crmeb.net/attach/2021/11/076ac202111181453294517.png",
- "https://qiniu.crmeb.net/attach/2021/11/201c9202111181453378599.png"
- ],
- "name": "购物车",
- "link": "/pages/order_addcart/order_addcart"
- },
- {
- "imgList": [
- "https://qiniu.crmeb.net/attach/2021/11/f04cf20211118145343755.png",
- "https://qiniu.crmeb.net/attach/2021/11/3a141202111181453495771.png"
- ],
- "name": "我的",
- "link": "/pages/user/index"
- }
- ],
- "id": "idundefined"
- }
- },
- "is_show": 1,
- "is_bg_color": 0,
- "color_picker": "#f5f5f5",
- "bg_pic": "",
- "bg_tab_val": 0,
- "is_bg_pic": 0,
- "order_status": 0,
- "is_diy": 1,
- "title": "首页"
- }
- }
- // getDiy(0).then(res => {
- setTimeout(() => {
- this.isNodes++;
- }, 0);
- this.errorNetwork = false
- let data = res.data;
- if (data.is_bg_color) {
- this.bgColor = data.color_picker
- }
- if (data.is_bg_pic) {
- this.bgPic = data.bg_pic
- this.bgTabVal = data.bg_tab_val
- }
- this.pageShow = data.is_show
- uni.setNavigationBarTitle({
- title: res.data.title
- });
- let temp = [];
- let lastArr = that.objToArr(res.data.value);
- lastArr.forEach((item, index, arr) => {
- if (item.name == 'headerSerch') {
- this.isHeaderSerch = true
- }
- if (item.name == 'pageFoot') {
- console.log(item.status)
- if (item.status && item.status.status) {
- this.newData = item
- setTimeout((e) => {
- that.$set(that, 'footerStatus', true);
- console.log(this.footerStatus)
- }, 50)
- }
- uni.setStorageSync('FOOTER_BAR', item.status && item.status.status ? true :
- false)
- item.menuList.map((path, index) => {
- if (path.link === '/pages/order_addcart/order_addcart') {
- uni.setStorageSync('FOOTER_ADDCART', index)
- }
- })
- arr.splice(index, 1);
- }
- if (item.name == 'promotionList') {
- that.numConfig = item.numConfig.val;
- that.goodType = item.tabConfig.list[0].link.activeVal;
- that.getGroomList();
- }
- if (item.name == 'tabNav') {
- // #ifndef APP-PLUS
- // uni.showLoading({
- // title: '加载中',
- // mask: true,
- // });
- // #endif
- // setTimeout(function() {
- // uni.hideLoading();
- // }, 8000);
- }
- temp = arr;
- });
- function sortNumber(a, b) {
- return a.timestamp - b.timestamp;
- }
- temp.sort(sortNumber)
- that.styleConfig = temp;
- setTimeout(() => {
- this.showSkeleton = false
- }, 300)
- uni.stopPullDownRefresh({
- success: (e) => { },
- });
- // })
- // .catch(error => {
- // // #ifdef APP-PLUS
- // if (error.status) {
- // uni.hideLoading()
- // if (that.errorNetwork) {
- // uni.showToast({
- // title: this.$t(`连接失败`),
- // icon: 'none',
- // duration: 2000
- // })
- // }
- // this.errorNetwork = true
- // this.showSkeleton = false;
- // }
- // // #endif
- // });
- },
- getIndexData() { },
- changeBarg(item) {
- if (!this.isLogin) {
- toLogin();
- } else {
- uni.navigateTo({
- url: `/pages/activity/goods_bargain_details/index?id=${item.id}&bargain=${this.$store.state.app.uid}`
- });
- }
- },
- // 促销列表的点击事件;
- changeTab(type) {
- this.goodType = type;
- this.tempArr = [];
- this.page = 1;
- this.loadend = false;
- let onloadH = true;
- this.getGroomList(onloadH);
- },
- // 精品推荐
- getGroomList(onloadH) {
- let that = this;
- let type = that.goodType;
- if (that.loadend) return false;
- if (that.loading) return false;
- if (onloadH) {
- that.$set(that, 'iSshowH', true);
- }
- getGroomList(type, {
- page: that.page,
- limit: this.numConfig
- })
- .then(({
- data
- }) => {
- that.$set(that, 'iSshowH', false);
- let maxPage = Math.ceil(this.numConfig / this.limit);
- let list = data.list,
- loadend = list.length < that.limit || that.page >= maxPage;
- let tempArr = that.$util.SplitArray(list, that.tempArr);
- that.$set(that, 'tempArr', tempArr.slice(0, this.numConfig));
- that.loadend = loadend;
- that.loadTitle = loadend ? that.$t(`没有更多内容啦~`) : that.$t(`加载更多`);
- that.page = that.page + 1;
- that.loading = false;
- })
- .catch(res => {
- that.loading = false;
- that.loadTitle = that.$t(`加载更多`);
- });
- },
- goRouter(item) {
- var pages = getCurrentPages();
- var page = (pages[pages.length - 1]).$page.fullPath;
- if (item.link == page) return
- uni.switchTab({
- url: item.link,
- fail(err) {
- uni.redirectTo({
- url: item.link
- })
- }
- })
- },
- goDetail(item) {
- goShopDetail(item, this.$store.state.app.uid).then(res => {
- uni.navigateTo({
- url: `/pages/goods_details/index?id=${item.id}`
- });
- });
- },
- onsollBotton() {
- console.log('????', this.isSortType)
- if (this.isSortType == 0) {
- // this.getGroomList();
- } else {
- this.getGoodsList();
- }
- }
- },
- onReachBottom: function () {
- },
- 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
- },
- //#ifdef MP
- onShareAppMessage() {
- return {
- title: this.shareInfo.title,
- path: '/pages/index/index'
- };
- },
- //分享到朋友圈
- onShareTimeline: function () {
- return {
- title: this.shareInfo.title,
- imageUrl: this.shareInfo.img
- };
- }
- //#endif
- };
- </script>
- <style lang="scss">
- // page {
- // padding-bottom: 50px;
- // }
- .pictrue_log_class {
- background-color: var(--view-theme);
- }
- .page {
- padding-bottom: 50px;
- }
- .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;
- 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;
- }
- }
- }
- }
- .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;
- 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;
- }
- }
- .sort-product {
- margin-top: 20rpx;
- .sort-box {
- display: flex;
- width: 100%;
- border-radius: 16rpx;
- padding: 30rpx 0;
- .sort-item {
- width: 20%;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- flex-shrink: 0;
- image {
- width: 90rpx;
- height: 90rpx;
- border-radius: 50%;
- }
- .txt {
- color: #272727;
- font-size: 24rpx;
- margin-top: 10rpx;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- width: 140rpx;
- text-align: center;
- }
- .pictrues {
- width: 90rpx;
- height: 90rpx;
- background: #f8f8f8;
- border-radius: 50%;
- margin: 0 auto;
- }
- .icon-gengduo1 {
- color: #333;
- }
- &.on {
- .txt {
- color: #fc4141;
- }
- image {
- border: 1px solid #fc4141;
- }
- }
- }
- }
- .product-list {
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- margin-top: 30rpx;
- padding: 0 20rpx;
- .product-item {
- position: relative;
- width: 344rpx;
- background: #fff;
- border-radius: 10rpx;
- margin-bottom: 20rpx;
- display: flex;
- flex-direction: column;
- image {
- width: 100%;
- height: 344rpx;
- border-radius: 10rpx 10rpx 0 0;
- }
- .info {
- flex: 1;
- padding: 14rpx 16rpx;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- .title {
- font-size: 28rpx;
- }
- .price-box {
- font-size: 34rpx;
- font-weight: 700;
- margin-top: 8px;
- color: #fc4141;
- text {
- font-size: 26rpx;
- }
- }
- }
- }
- }
- }
- .emptyBox {
- text-align: center;
- padding-top: 20rpx;
- .tips {
- color: #aaa;
- font-size: 26rpx;
- padding-bottom: 20rpx;
- }
- image {
- width: 414rpx;
- height: 304rpx;
- }
- }
- .site-config {
- margin-top: 40rpx;
- font-size: 24rpx;
- text-align: center;
- color: #666;
- &.fixed {
- position: fixed;
- bottom: 69px;
- left: 0;
- width: 100%;
- }
- }
- .page-footer {
- position: fixed;
- bottom: 0;
- z-index: 30;
- display: flex;
- align-items: center;
- justify-content: space-around;
- width: 100%;
- height: calc(98rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
- height: calc(98rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
- box-sizing: border-box;
- border-top: solid 1rpx #F3F3F3;
- background-color: #fff;
- box-shadow: 0px 0px 17rpx 1rpx rgba(206, 206, 206, 0.32);
- padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
- padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/
- .foot-item {
- display: flex;
- width: max-content;
- align-items: center;
- justify-content: center;
- flex-direction: column;
- position: relative;
- .count-num {
- position: absolute;
- display: flex;
- justify-content: center;
- align-items: center;
- width: 40rpx;
- height: 40rpx;
- top: 0rpx;
- right: -15rpx;
- color: #fff;
- font-size: 20rpx;
- background-color: #FD502F;
- border-radius: 50%;
- padding: 4rpx;
- }
- }
- .foot-item image {
- height: 50rpx;
- width: 50rpx;
- text-align: center;
- margin: 0 auto;
- }
- .foot-item .txt {
- font-size: 24rpx;
- &.active {}
- }
- }
- </style>
|