index.vue 68 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862
  1. <template>
  2. <view v-if="pageShow" class="page"
  3. :class="bgTabVal==2?'fullsize noRepeat':bgTabVal==1?'repeat ysize':'noRepeat ysize'"
  4. :style="'background-color:'+bgColor+';background-image: url('+bgPic+');min-height:'+windowHeight+'px;'">
  5. <view v-if="!errorNetwork" :style="colorStyle">
  6. <skeleton :show="showSkeleton" :isNodes="isNodes" ref="skeleton" loading="chiaroscuro" selector="skeleton"
  7. bgcolor="#FFF"></skeleton>
  8. <view class="index skeleton" :style="{visibility: showSkeleton ? 'hidden' : 'visible'}">
  9. <!-- #ifdef H5 -->
  10. <view v-for="(item, index) in styleConfig" :key="index">
  11. <component :is="item.name" :index="index" :dataConfig="item" @changeBarg="changeBarg"
  12. @changeTab="changeTab" :tempArr="tempArr" :iSshowH="iSshowH" @detail="goDetail"
  13. :isSortType="isSortType" @bindSortId="bindSortId" @bindHeight="bindHeight" :isFixed="isFixed">
  14. </component>
  15. </view>
  16. <!-- #endif -->
  17. <!-- #ifdef MP || APP-PLUS -->
  18. <block v-for="(item, index) in styleConfig" :key="index">
  19. <!-- <activeParty v-if="item.name == 'activeParty'" :dataConfig="item" :isSortType="isSortType">
  20. </activeParty> -->
  21. <!-- <articleList v-if="item.name == 'articleList'" :dataConfig="item" :isSortType="isSortType">
  22. </articleList> -->
  23. <!-- <bargain v-if="item.name == 'bargain'" :dataConfig="item" @changeBarg="changeBarg"
  24. :isSortType="isSortType"></bargain> -->
  25. <!-- <blankPage v-if="item.name == 'blankPage'" :dataConfig="item" :isSortType="isSortType"></blankPage> -->
  26. <!-- <combination v-if="item.name == 'combination'" :dataConfig="item" :isSortType="isSortType">
  27. </combination> -->
  28. <!-- <coupon v-if="item.name == 'coupon'" :dataConfig="item" :isSortType="isSortType"></coupon> -->
  29. <!-- <customerService v-if="item.name == 'customerService'" :dataConfig="item" :isSortType="isSortType">
  30. </customerService> -->
  31. <!-- <goodList v-if="item.name == 'goodList'" :dataConfig="item" @detail="goDetail"
  32. :isSortType="isSortType"></goodList> -->
  33. <!-- <guide v-if="item.name == 'guide'" :dataConfig="item" :isSortType="isSortType"></guide> -->
  34. <headerSerch v-if="item.name == 'headerSerch'" :dataConfig="item"></headerSerch>
  35. <!-- <liveBroadcast v-if="item.name == 'liveBroadcast'" :dataConfig="item" :isSortType="isSortType">
  36. </liveBroadcast> -->
  37. <menus v-if="item.name == 'menus'" :dataConfig="item" :isSortType="isSortType"></menus>
  38. <news v-if="item.name == 'news'" :dataConfig="item" :isSortType="isSortType"></news>
  39. <!-- <pictureCube v-if="item.name == 'pictureCube'" :dataConfig="item" :isSortType="isSortType">
  40. </pictureCube> -->
  41. <promotionList v-if="item.name == 'promotionList'" :dataConfig="item" @changeTab="changeTab"
  42. :tempArr="tempArr" :iSshowH="iSshowH" @detail="goDetail" :isSortType="isSortType">
  43. </promotionList>
  44. <!-- <richText v-if="item.name == 'richText'" :dataConfig="item" :isSortType="isSortType"></richText> -->
  45. <!-- <seckill v-if="item.name == 'seckill'" :dataConfig="item" :isSortType="isSortType"></seckill> -->
  46. <swiperBg v-if="item.name == 'swiperBg'" :dataConfig="item" :isSortType="isSortType"></swiperBg>
  47. <!-- <swipers v-if="item.name == 'swipers'" :dataConfig="item" :isSortType="isSortType"></swipers> -->
  48. <tabNav v-if="item.name == 'tabNav'" :dataConfig="item" @bindHeight="bindHeighta"
  49. @bindSortId="bindSortId" :isFixed="isFixed"></tabNav>
  50. <!-- <titles v-if="item.name == 'titles'" :dataConfig="item" :isSortType="isSortType"></titles> -->
  51. </block>
  52. <!-- #endif -->
  53. <!-- 分类商品模块 -->
  54. <!-- #ifdef APP-PLUS -->
  55. <view class="sort-product" v-if="isSortType == 1" style="margin-top: 0;">
  56. <scroll-view scroll-x="true" style="background: #fff;">
  57. <view class="sort-box" v-if="sortList.children && sortList.children.length">
  58. <view class="sort-item" v-for="(item, index) in sortList.children" :key="index"
  59. @click="changeSort(item, index)" :class="{ on: curSort == index }">
  60. <image :src="item.pic" mode="" v-if="item.pic"></image>
  61. <image src="/static/images/sort-img.png" mode="" v-else></image>
  62. <view class="txt">{{ item.cate_name }}</view>
  63. </view>
  64. </view>
  65. </scroll-view>
  66. <view class="product-list" v-if="goodList.length">
  67. <view class="product-item" v-for="(item, index) in goodList" @click="goGoodsDetail(item)">
  68. <image :src="item.image"></image>
  69. <span class="pictrue_log_big pictrue_log_class"
  70. v-if="item.activity && item.activity.type === '1'">{{$t(`秒杀`)}}</span>
  71. <span class="pictrue_log_big pictrue_log_class"
  72. v-if="item.activity && item.activity.type === '2'">{{$t(`砍价`)}}</span>
  73. <span class="pictrue_log_big pictrue_log_class"
  74. v-if="item.activity && item.activity.type === '3'">{{$t(`拼团`)}}</span>
  75. <view class="info">
  76. <view class="title line1">{{ item.store_name }}</view>
  77. <view class="price-box">
  78. <text>{{$t(`¥`)}}</text>
  79. {{ item.price }}
  80. </view>
  81. </view>
  82. </view>
  83. </view>
  84. <Loading :loaded="loaded" :loading="loading"></Loading>
  85. <view class="" v-if="goodList.length == 0 && loaded">
  86. <view class="emptyBox">
  87. <image :src="imgHost + '/statics/images/no-thing.png'"></image>
  88. <view class="tips">{{$t(`暂无商品,去看点别的吧`)}}</view>
  89. </view>
  90. <recommend :hostProduct="hostProduct"></recommend>
  91. </view>
  92. </view>
  93. <!-- #endif -->
  94. <!-- #ifndef APP-PLUS -->
  95. <view class="sort-product" v-if="isSortType == 1" :style="{ marginTop: sortMpTop + 'px' }">
  96. <scroll-view scroll-x="true" style="background: #fff;">
  97. <view class="sort-box" v-if="sortList.children && sortList.children.length">
  98. <view class="sort-item" v-for="(item, index) in sortList.children" :key="index"
  99. @click="changeSort(item, index)" :class="{ on: curSort == index }">
  100. <image :src="item.pic" mode="" v-if="item.pic"></image>
  101. <image src="/static/images/sort-img.png" mode="" v-else></image>
  102. <view class="txt">{{ item.cate_name }}</view>
  103. </view>
  104. </view>
  105. </scroll-view>
  106. <view class="product-list" v-if="goodList.length">
  107. <view class="product-item" v-for="(item, index) in goodList" @click="goGoodsDetail(item)">
  108. <image :src="item.image"></image>
  109. <span class="pictrue_log_big pictrue_log_class"
  110. v-if="item.activity && item.activity.type === '1'">{{$t(`秒杀`)}}</span>
  111. <span class="pictrue_log_big pictrue_log_class"
  112. v-if="item.activity && item.activity.type === '2'">{{$t(`砍价`)}}</span>
  113. <span class="pictrue_log_big pictrue_log_class"
  114. v-if="item.activity && item.activity.type === '3'">{{$t(`拼团`)}}</span>
  115. <span class="pictrue_log_big pictrue_log_class" v-if="item.checkCoupon">{{$t(`券`)}}</span>
  116. <view class="info">
  117. <view class="title line2">{{ item.store_name }}</view>
  118. <view class="price-box">
  119. <text>{{$t(`¥`)}}</text>
  120. {{ item.price }}
  121. </view>
  122. </view>
  123. </view>
  124. </view>
  125. <Loading :loaded="loaded" :loading="loading"></Loading>
  126. <view class="" v-if="goodList.length == 0 && loaded">
  127. <view class="emptyBox">
  128. <image :src="imgHost + '/statics/images/no-thing.png'"></image>
  129. <view class="tips">{{$t(`暂无数据`)}}</view>
  130. </view>
  131. <recommend :hostProduct="hostProduct"></recommend>
  132. </view>
  133. </view>
  134. <!-- #endif -->
  135. <!-- <view class="loadingicon acea-row row-center-wrapper" v-if="tempArr.length && styleConfig[styleConfig.length - 1].name == 'promotionList'">
  136. <text class="loading iconfont icon-jiazai" :hidden="loading == false"></text>
  137. {{ loadTitle }}
  138. </view> -->
  139. <!-- #ifdef MP -->
  140. <!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" :isGoIndex="false"></authorize> -->
  141. <!-- #endif -->
  142. <couponWindow :window="isCouponShow" @onColse="couponClose" :couponImage="couponObj.image"
  143. :couponList="couponObj.list"></couponWindow>
  144. <view class="uni-p-b-98" v-if="footerStatus"></view>
  145. <view v-if="site_config" class="site-config" @click="goICP">{{ site_config }}</view>
  146. <!-- <pageFooter v-if="footerStatus"></pageFooter> -->
  147. <view class="foot" v-if="newData.status && newData.status.status">
  148. <view class="page-footer" id="target" :style="{'background-color':newData.bgColor.color[0].item}">
  149. <view class="foot-item" v-for="(item,index) in newData.menuList" :key="index"
  150. @click="goRouter(item)">
  151. <block v-if="item.link == activeRouter">
  152. <image :src="item.imgList[0]"></image>
  153. <view class="txt" :style="{color:newData.activeTxtColor.color[0].item}">
  154. {{$t(item.name)}}
  155. </view>
  156. </block>
  157. <block v-else>
  158. <image :src="item.imgList[1]"></image>
  159. <view class="txt" :style="{color:newData.txtColor.color[0].item}">{{$t(item.name)}}
  160. </view>
  161. </block>
  162. <div class="count-num"
  163. v-if="item.link === '/pages/order_addcart/order_addcart' && countNum > 0">
  164. {{countNum}}
  165. </div>
  166. </view>
  167. </view>
  168. </view>
  169. </view>
  170. </view>
  171. <view v-else>
  172. <view class="error-network">
  173. <image :src="imgHost + '/statics/images/error-network.png'"></image>
  174. <view class="title">{{$t(`网络连接断开`)}}</view>
  175. <view class="con">
  176. <view class="label">{{$t(`请检查情况:`)}}:</view>
  177. <view class="item">· {{$t(`在设置中是否已开启网络权限:`)}}</view>
  178. <view class="item">· {{$t(`当前是否处于弱网环境`)}}</view>
  179. <view class="item">· {{$t(`版本是否过低,升级试试吧`)}}</view>
  180. </view>
  181. <view class="btn" @click="reconnect">{{$t(`重新连接`)}}</view>
  182. </view>
  183. </view>
  184. <!-- #ifdef APP-PLUS -->
  185. <app-update v-if="!privacyStatus" ref="appUpdate" :force="true" :tabbar="false"></app-update>
  186. <view class="privacy-wrapper" v-if="privacyStatus">
  187. <view class="privacy-box">
  188. <view class="title">{{$t(`服务协议与隐私政策`)}}</view>
  189. <view class="content">
  190. {{$t(`请务必审慎阅读、充分理解“服务协议与 隐私政策”各条款,包括但不限于:为了 向你提供即时通讯、内容分享等服务,我 们需要收集你的设备信息、操作日志等个
  191. 人信息。你可以在“设置”中查看、变更、删除个人信息并管理你的授权。`)}}<br>
  192. {{$t(`你可以阅读`)}}<navigator url="/pages/users/privacy/index?type=3">{{$t(`《服务协议与隐私政策》`)}}</navigator>
  193. {{$t(`了解详细信息。如你同意,请点击“我同意”开始接受我们的服务。`)}}
  194. </view>
  195. <view class="btn-box">
  196. <view class="btn-item" @click="confirmApp">{{$t(`我同意`)}}</view>
  197. <view class="btn" @click="closeModel">{{$t(`残忍拒绝`)}}</view>
  198. </view>
  199. </view>
  200. </view>
  201. <!-- #endif -->
  202. </view>
  203. </template>
  204. <script>
  205. const app = getApp();
  206. import colors from "@/mixins/color";
  207. import couponWindow from '@/components/couponWindow/index';
  208. import {
  209. getCouponV2,
  210. getCouponNewUser,
  211. siteConfig
  212. } from '@/api/api.js';
  213. import {
  214. getNavigation
  215. } from '@/api/public.js';
  216. // #ifdef H5
  217. import mConfig from './components/index.js';
  218. // #endif
  219. // #ifdef MP || APP-PLUS
  220. import authorize from '@/components/Authorize';
  221. import activeParty from './components/activeParty';
  222. import headerSerch from './components/headerSerch';
  223. import swipers from './components/swipers';
  224. import coupon from './components/coupon';
  225. import articleList from './components/articleList';
  226. import bargain from './components/bargain';
  227. import blankPage from './components/blankPage';
  228. import combination from './components/combination';
  229. import customerService from './components/customerService';
  230. import goodList from './components/goodList';
  231. import guide from './components/guide';
  232. import liveBroadcast from './components/liveBroadcast';
  233. import menus from './components/menus';
  234. import news from './components/news';
  235. import pictureCube from './components/pictureCube';
  236. import promotionList from './components/promotionList';
  237. import richText from './components/richText';
  238. import seckill from './components/seckill';
  239. import swiperBg from './components/swiperBg';
  240. import tabNav from './components/tabNav';
  241. import titles from './components/titles';
  242. import appUpdate from "@/components/update/app-update.vue";
  243. import {
  244. getTempIds
  245. } from '@/api/api.js';
  246. import {
  247. SUBSCRIBE_MESSAGE,
  248. TIPS_KEY
  249. } from '@/config/cache';
  250. // #endif
  251. import {
  252. mapGetters
  253. } from 'vuex';
  254. import {
  255. getDiy,
  256. getIndexData
  257. } from '@/api/api.js';
  258. import {
  259. getGroomList,
  260. getCategoryList,
  261. getProductslist,
  262. getProductHot
  263. } from '@/api/store.js';
  264. import {
  265. goShopDetail
  266. } from '@/libs/order.js';
  267. import {
  268. getCartCounts,
  269. } from '@/api/order.js';
  270. import {
  271. toLogin
  272. } from '@/libs/login.js';
  273. import { HTTP_REQUEST_URL } from '@/config/app';
  274. import pageFooter from '@/components/pageFooter/index.vue';
  275. import Loading from '@/components/Loading/index.vue';
  276. import recommend from '@/components/recommend';
  277. export default {
  278. computed: mapGetters(['isLogin', 'uid']),
  279. mixins: [colors],
  280. components: {
  281. recommend,
  282. Loading,
  283. pageFooter,
  284. couponWindow,
  285. // #ifdef H5
  286. ...mConfig,
  287. // #endif
  288. // #ifdef MP || APP-PLUS
  289. authorize,
  290. activeParty,
  291. headerSerch,
  292. swipers,
  293. coupon,
  294. articleList,
  295. bargain,
  296. blankPage,
  297. combination,
  298. customerService,
  299. goodList,
  300. guide,
  301. liveBroadcast,
  302. menus,
  303. pictureCube,
  304. news,
  305. promotionList,
  306. richText,
  307. seckill,
  308. swiperBg,
  309. tabNav,
  310. titles,
  311. appUpdate, //APP更新
  312. // #endif
  313. },
  314. computed: mapGetters(['isLogin', 'cartNum']),
  315. data() {
  316. return {
  317. imgHost: HTTP_REQUEST_URL,
  318. showSkeleton: true, //骨架屏显示隐藏
  319. isNodes: 0, //控制什么时候开始抓取元素节点,只要数值改变就重新抓取
  320. styleConfig: [],
  321. tempArr: [],
  322. goodType: 3,
  323. loading: false,
  324. loadend: false,
  325. loadTitle: this.$t(`下拉加载更多`), //提示语
  326. page: 1,
  327. limit: this.$config.LIMIT,
  328. iSshowH: false,
  329. numConfig: 0,
  330. code: '',
  331. isCouponShow: false,
  332. couponObj: {},
  333. couponObjs: {
  334. show: false
  335. },
  336. shareInfo: {},
  337. footConfig: {},
  338. isSortType: 0,
  339. sortList: '',
  340. sortAll: [],
  341. goodPage: 1,
  342. goodList: [],
  343. newData: {},
  344. sid: 0,
  345. curSort: 0,
  346. sortMpTop: 0,
  347. loaded: false,
  348. loading: false,
  349. hostProduct: [],
  350. hotScroll: false,
  351. hotPage: 1,
  352. hotLimit: 10,
  353. domOffsetTop: 50,
  354. // #ifdef APP-PLUS || MP
  355. isFixed: true,
  356. // #endif
  357. // #ifdef H5
  358. isFixed: false,
  359. // #endif
  360. site_config: '',
  361. errorNetwork: false, // 是否断网
  362. privacyStatus: false, // 隐私政策是否同意过
  363. footerStatus: false,
  364. isHeaderSerch: false,
  365. bgColor: '',
  366. bgPic: '',
  367. bgTabVal: '',
  368. pageShow: true,
  369. windowHeight: 0,
  370. activeRouter: '',
  371. countNum: 0
  372. };
  373. },
  374. onPullDownRefresh() {
  375. this.diyData();
  376. },
  377. created(options) {
  378. let that = this
  379. this.$nextTick(function () {
  380. uni.getSystemInfo({
  381. success: function (res) {
  382. that.windowHeight = res.windowHeight;
  383. }
  384. });
  385. })
  386. // getNavigation().then(res => {
  387. // this.newData = res.data
  388. // if (this.newData.status && this.newData.status.status) {
  389. // uni.hideTabBar()
  390. // } else {
  391. // uni.showTabBar()
  392. // }
  393. // })
  394. uni.hideTabBar()
  395. let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
  396. let curRoute = routes[routes.length - 1].route //获取当前页面路由
  397. this.activeRouter = '/' + curRoute
  398. // #ifdef APP-PLUS
  399. uni.setStorageSync("privacyStatus", true);
  400. // try {
  401. // let val = uni.getStorageSync('privacyStatus') || false
  402. // if (!val) {
  403. // this.privacyStatus = true
  404. // }
  405. // } catch (e) {}
  406. // #endif
  407. this.diyData();
  408. this.getIndexData();
  409. // #ifdef MP
  410. this.getTempIds();
  411. // #endif
  412. // #ifndef APP-PLUS
  413. // siteConfig().then(res => {
  414. // this.site_config = res.data.record_No
  415. // }).catch(err => {
  416. // console.error(err.msg);
  417. // });
  418. // #endif
  419. // 优惠券弹窗
  420. // var newDates = new Date().toLocaleDateString();
  421. if (this.isLogin) {
  422. this.getCoupon();
  423. getCartCounts().then(res => {
  424. this.countNum = res.data.count
  425. this.$store.commit('indexData/setCartNum', res.data.count > 99 ? '..' : res.data.count +
  426. '')
  427. if (res.data.count > 0) {
  428. wx.setTabBarBadge({
  429. index: Number(uni.getStorageSync('FOOTER_ADDCART')) || 2,
  430. text: res.data.count + ''
  431. })
  432. } else {
  433. wx.hideTabBarRedDot({
  434. index: Number(uni.getStorageSync('FOOTER_ADDCART')) || 2
  435. })
  436. }
  437. });
  438. }
  439. },
  440. // onReady() {
  441. // let that = this
  442. // uni.getSystemInfo({
  443. // success: function(res) { // res - 各种参数
  444. // let info = uni.createSelectorQuery().select(".hander"); // 获取某个元素
  445. // info.boundingClientRect(function(data) { //data - 各种参数
  446. // let view = res.windowHeight - data.height
  447. // that.heightHome = view
  448. // }).exec()
  449. // }
  450. // });
  451. // },
  452. watch: {
  453. isLogin: {
  454. deep: true, //深度监听设置为 true
  455. handler: function (newV, oldV) {
  456. // 优惠券弹窗
  457. var newDates = new Date().toLocaleDateString();
  458. if (newV) {
  459. try {
  460. var oldDate = uni.getStorageSync('oldDate') || '';
  461. } catch { }
  462. if (oldDate != newDates) {
  463. this.getCoupon();
  464. }
  465. }
  466. }
  467. }
  468. },
  469. onReady() { },
  470. methods: {
  471. // #ifdef APP-PLUS
  472. // 同意隐私协议
  473. confirmApp() {
  474. uni.setStorageSync('privacyStatus', true)
  475. this.privacyStatus = false
  476. },
  477. // 关闭Model
  478. closeModel() {
  479. //退出app
  480. uni.getSystemInfo({
  481. success: function (res) { // 判断为安卓的手机
  482. if (res.platform == 'android') { // 安卓退出app
  483. plus.runtime.quit();
  484. } else { // 判断为ios的手机,退出App
  485. plus.ios.import("UIApplication").sharedApplication().performSelector("exit");
  486. }
  487. }
  488. })
  489. },
  490. // #endif
  491. // 重新链接
  492. reconnect() {
  493. uni.showLoading({
  494. title: this.$t(`加载中`)
  495. })
  496. this.diyData();
  497. this.getIndexData();
  498. getShare().then(res => {
  499. this.shareInfo = res.data;
  500. });
  501. },
  502. goICP() {
  503. // #ifdef H5
  504. window.open('http://beian.miit.gov.cn/');
  505. // #endif
  506. // #ifdef MP
  507. uni.navigateTo({
  508. url: `/pages/annex/web_view/index?url=https://beian.miit.gov.cn/`
  509. });
  510. // #endif
  511. },
  512. bindHeighta(data) {
  513. // #ifdef APP-PLUS
  514. this.sortMpTop = data.top + data.height;
  515. // #endif
  516. },
  517. bindHeight(data) {
  518. uni.hideLoading();
  519. this.domOffsetTop = data.top;
  520. },
  521. // 去商品详情
  522. goGoodsDetail(item) {
  523. goShopDetail(item, this.uid).then(res => {
  524. uni.navigateTo({
  525. url: `/pages/goods_details/index?id=${item.id}`
  526. });
  527. });
  528. },
  529. /**
  530. * 获取我的推荐
  531. */
  532. get_host_product: function () {
  533. let that = this;
  534. if (that.hotScroll) return;
  535. getProductHot(that.hotPage, that.hotLimit).then(res => {
  536. that.hotPage++;
  537. that.hotScroll = res.data.length < that.hotLimit;
  538. that.hostProduct = that.hostProduct.concat(res.data);
  539. // that.$set(that, 'hostProduct', res.data)
  540. });
  541. },
  542. // 分类点击
  543. changeSort(item, index) {
  544. if (this.curSort == index) return;
  545. this.curSort = index;
  546. this.sid = item.id;
  547. this.goodList = [];
  548. this.goodPage = 1;
  549. this.loaded = false;
  550. this.getGoodsList();
  551. },
  552. // 获取分类id
  553. bindSortId(data) {
  554. this.isSortType = data == -99 ? 0 : 1;
  555. this.getProductList(data);
  556. if (this.hostProduct.length == 0) {
  557. this.get_host_product();
  558. }
  559. },
  560. getProductList(data) {
  561. let tempObj = '';
  562. this.curSort = 0;
  563. this.loaded = false;
  564. if (this.sortAll.length > 0) {
  565. this.sortAll.forEach((el, index) => {
  566. if (el.id == data) {
  567. this.$set(this, 'sortList', el);
  568. this.sid = el.children.length ? el.children[0].id : '';
  569. }
  570. });
  571. this.goodList = [];
  572. this.goodPage = 1;
  573. this.$nextTick(() => {
  574. if (this.sortList != '') this.getGoodsList();
  575. });
  576. } else {
  577. getCategoryList().then(res => {
  578. this.sortAll = res.data;
  579. res.data.forEach((el, index) => {
  580. if (el.id == data) {
  581. this.sortList = el;
  582. this.sid = el.children.length ? el.children[0].id : '';
  583. }
  584. });
  585. this.goodList = [];
  586. this.goodPage = 1;
  587. this.$nextTick(() => {
  588. if (this.sortList != '') this.getGoodsList();
  589. });
  590. });
  591. }
  592. },
  593. getGoodsList() {
  594. if (this.loading || this.loaded) return;
  595. this.loading = true;
  596. getProductslist({
  597. sid: this.sid,
  598. keyword: '',
  599. priceOrder: '',
  600. salesOrder: '',
  601. news: 0,
  602. page: this.goodPage,
  603. limit: 10,
  604. cid: this.sortList.id
  605. }).then(res => {
  606. this.loading = false;
  607. this.loaded = res.data.length < 10;
  608. this.goodPage++;
  609. this.goodList = this.goodList.concat(res.data);
  610. });
  611. },
  612. // 新用户优惠券
  613. getNewCoupon() {
  614. const oldUser = uni.getStorageSync('oldUser') || 0;
  615. if (!oldUser) {
  616. getCouponNewUser().then(res => {
  617. const {
  618. data
  619. } = res;
  620. if (data.show) {
  621. if (data.list.length) {
  622. this.isCouponShow = true;
  623. this.couponObj = data;
  624. uni.setStorageSync('oldUser', 1);
  625. }
  626. } else {
  627. uni.setStorageSync('oldUser', 1);
  628. }
  629. });
  630. }
  631. },
  632. // 优惠券弹窗
  633. getCoupon() {
  634. const tagDate = uni.getStorageSync('tagDate') || '',
  635. nowDate = new Date().toLocaleDateString();
  636. if (tagDate === nowDate) {
  637. this.getNewCoupon();
  638. } else {
  639. getCouponV2().then(res => {
  640. const {
  641. data
  642. } = res;
  643. if (data.list.length) {
  644. this.isCouponShow = true;
  645. this.couponObj = data;
  646. uni.setStorageSync('tagDate', new Date().toLocaleDateString());
  647. } else {
  648. this.getNewCoupon();
  649. }
  650. });
  651. }
  652. },
  653. // 优惠券弹窗关闭
  654. couponClose() {
  655. this.isCouponShow = false;
  656. if (!uni.getStorageSync('oldUser')) {
  657. this.getNewCoupon();
  658. }
  659. },
  660. onLoadFun() { },
  661. // #ifdef H5
  662. // 获取url后面的参数
  663. getQueryString(name) {
  664. var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
  665. var reg_rewrite = new RegExp('(^|/)' + name + '/([^/]*)(/|$)', 'i');
  666. var r = window.location.search.substr(1).match(reg);
  667. var q = window.location.pathname.substr(1).match(reg_rewrite);
  668. if (r != null) {
  669. return unescape(r[2]);
  670. } else if (q != null) {
  671. return unescape(q[2]);
  672. } else {
  673. return null;
  674. }
  675. },
  676. // #endif
  677. // #ifdef MP
  678. getTempIds() {
  679. let messageTmplIds = wx.getStorageSync(SUBSCRIBE_MESSAGE);
  680. if (!messageTmplIds) {
  681. getTempIds().then(res => {
  682. if (res.data) wx.setStorageSync(SUBSCRIBE_MESSAGE, JSON.stringify(res.data));
  683. });
  684. }
  685. },
  686. // #endif
  687. // 对象转数组
  688. objToArr(data) {
  689. let obj = Object.keys(data);
  690. let m = obj.map(key => data[key]);
  691. return m;
  692. },
  693. diyData() {
  694. uni.request({
  695. url:'api/test',
  696. success:res=>{
  697. console.log(res)
  698. }
  699. })
  700. let that = this;
  701. let res = {
  702. data: {
  703. "name": "蓝色主题模板(官方演示勿动!)",
  704. "value": {
  705. "1666235374470008": {
  706. "name": "liveBroadcast",
  707. "timestamp": "1666235374470008",
  708. "setUp": {
  709. "tabVal": 0
  710. },
  711. "bg": {
  712. "title": "背景色",
  713. "name": "bg",
  714. "default": [
  715. {
  716. "item": "#fff"
  717. }
  718. ],
  719. "color": [
  720. {
  721. "item": "#fff"
  722. }
  723. ]
  724. },
  725. "boxShadow": {
  726. "title": "阴影颜色",
  727. "name": "playBg",
  728. "default": [
  729. {
  730. "item": "rgba(0, 0, 0, 0.06)"
  731. }
  732. ],
  733. "color": [
  734. {
  735. "item": "rgba(0, 0, 0, 0.06)"
  736. }
  737. ]
  738. },
  739. "limit": {
  740. "title": "显示个数",
  741. "val": 1
  742. },
  743. "listStyle": {
  744. "title": "列表样式",
  745. "name": "listStyle",
  746. "type": 0,
  747. "list": [
  748. {
  749. "val": "单列",
  750. "icon": "iconPic_big"
  751. },
  752. {
  753. "val": "双列",
  754. "icon": "iconPic_small"
  755. },
  756. {
  757. "val": "大图",
  758. "icon": "iconbanner_1"
  759. }
  760. ]
  761. },
  762. "mbConfig": {
  763. "title": "页面间距",
  764. "val": 0,
  765. "min": 0
  766. },
  767. "id": "id1666235050825000"
  768. },
  769. "1666235374470000": {
  770. "name": "headerSerch",
  771. "timestamp": "1666235374470000",
  772. "setUp": {
  773. "tabVal": 0
  774. },
  775. "bgColor": {
  776. "title": "背景颜色(渐变)",
  777. "name": "bgColor",
  778. "default": [
  779. {
  780. "item": "#F62C2C"
  781. },
  782. {
  783. "item": "#F96E29"
  784. }
  785. ],
  786. "color": [
  787. {
  788. "item": "rgba(29,176,252,1)"
  789. },
  790. {
  791. "item": "rgba(64,209,244,1)"
  792. }
  793. ]
  794. },
  795. "boxStyle": {
  796. "title": "边框样式",
  797. "name": "boxStyle",
  798. "type": 0,
  799. "list": [
  800. {
  801. "val": "圆角",
  802. "icon": "iconPic_fillet"
  803. },
  804. {
  805. "val": "直角",
  806. "icon": "iconPic_square"
  807. }
  808. ]
  809. },
  810. "txtStyle": {
  811. "title": "文本位置",
  812. "name": "txtStyle",
  813. "type": 1,
  814. "list": [
  815. {
  816. "val": "居左",
  817. "icon": "icondoc_left"
  818. },
  819. {
  820. "val": "居中",
  821. "icon": "icondoc_center"
  822. }
  823. ]
  824. },
  825. "prConfig": {
  826. "title": "背景边距",
  827. "val": 8,
  828. "min": 0
  829. },
  830. "mbConfig": {
  831. "title": "页面间距",
  832. "val": 0,
  833. "min": 0
  834. },
  835. "hotWords": {
  836. "list": [
  837. {
  838. "val": ""
  839. }
  840. ]
  841. },
  842. "logoConfig": {
  843. "type": 1,
  844. "header": "设置logo",
  845. "title": "",
  846. "url": "https://demo26.crmeb.net/uploads/attach/2022/10/20221009/7436ee5680bc5d67c46a6017939475e5.png"
  847. },
  848. "id": "id1665385357481000"
  849. },
  850. "1666235374470001": {
  851. "name": "swiperBg",
  852. "timestamp": "1666235374470001",
  853. "setUp": {
  854. "tabVal": 1
  855. },
  856. "swiperConfig": {
  857. "title": "最多可添加10张图片,建议宽度750px;鼠标拖拽左侧圆点可调整图片 顺序",
  858. "maxList": 10,
  859. "list": [
  860. {
  861. "img": "https://demo26.crmeb.net/uploads/attach/2022/09/20220928/8903e1c331b95263270d1bf558315eea.jpg",
  862. "info": [
  863. {
  864. "title": "标题",
  865. "value": "电商社交",
  866. "tips": "选填,不超过4个字",
  867. "max": 4
  868. },
  869. {
  870. "title": "链接",
  871. "value": "/pages/goods_cate/goods_cate",
  872. "tips": "请输入链接",
  873. "max": 100
  874. }
  875. ]
  876. },
  877. {
  878. "img": "https://qiniu.crmeb.net/attach/2021/10/78c7c20211011171437256.png",
  879. "info": [
  880. {
  881. "title": "标题",
  882. "value": "今日推荐",
  883. "tips": "选填,不超过4个字",
  884. "max": 4
  885. },
  886. {
  887. "title": "链接",
  888. "value": "/pages/extension/customer_list/chat",
  889. "tips": "请输入链接",
  890. "max": 100
  891. }
  892. ]
  893. },
  894. {
  895. "img": "https://qiniu.crmeb.net/attach/2021/10/ce66b202110111714168104.png",
  896. "info": [
  897. {
  898. "title": "标题",
  899. "value": "超值爆款",
  900. "tips": "选填,不超过4个字",
  901. "max": 4
  902. },
  903. {
  904. "title": "链接",
  905. "value": "/pages/users/user_sgin/index",
  906. "tips": "请输入链接",
  907. "max": 100
  908. }
  909. ]
  910. }
  911. ]
  912. },
  913. "isShow": {
  914. "title": "是否显示背景色",
  915. "val": false
  916. },
  917. "bgColor": {
  918. "title": "背景颜色(渐变)",
  919. "default": [
  920. {
  921. "item": "#F62C2C"
  922. },
  923. {
  924. "item": "#F96E29"
  925. }
  926. ],
  927. "color": [
  928. {
  929. "item": "rgba(29,176,252,1)"
  930. },
  931. {
  932. "item": "rgba(64,209,244,1)"
  933. }
  934. ]
  935. },
  936. "dotColor": {
  937. "title": "指示器颜色",
  938. "default": [
  939. {
  940. "item": "#fff"
  941. }
  942. ],
  943. "color": [
  944. {
  945. "item": "rgba(29,176,252,1)"
  946. }
  947. ]
  948. },
  949. "lrConfig": {
  950. "title": "左右边距",
  951. "val": 11,
  952. "min": 0
  953. },
  954. "mbConfig": {
  955. "title": "页面间距",
  956. "val": 10,
  957. "min": 0
  958. },
  959. "docConfig": {
  960. "cname": "swiper",
  961. "title": "指示器样式",
  962. "type": 0,
  963. "list": [
  964. {
  965. "val": "圆形",
  966. "icon": "iconDot"
  967. },
  968. {
  969. "val": "直线",
  970. "icon": "iconSquarepoint"
  971. },
  972. {
  973. "val": "数字",
  974. "icon": "iconshuzi"
  975. },
  976. {
  977. "val": "无指示器",
  978. "icon": "iconjinyong"
  979. }
  980. ]
  981. },
  982. "txtStyle": {
  983. "title": "指示器位置",
  984. "type": 2,
  985. "list": [
  986. {
  987. "val": "居左",
  988. "icon": "icondoc_left"
  989. },
  990. {
  991. "val": "居中",
  992. "icon": "icondoc_center"
  993. },
  994. {
  995. "val": "居右",
  996. "icon": "icondoc_right"
  997. }
  998. ]
  999. },
  1000. "imgConfig": {
  1001. "cname": "docStyle",
  1002. "title": "轮播图样式",
  1003. "type": 0,
  1004. "list": [
  1005. {
  1006. "val": "圆角",
  1007. "icon": "iconPic_fillet"
  1008. },
  1009. {
  1010. "val": "直角",
  1011. "icon": "iconPic_square"
  1012. }
  1013. ]
  1014. },
  1015. "id": "id1665385357481001"
  1016. },
  1017. "1666235374470002": {
  1018. "name": "news",
  1019. "timestamp": "1666235374470002",
  1020. "setUp": {
  1021. "tabVal": 1
  1022. },
  1023. "txtStyle": {
  1024. "title": "文本位置",
  1025. "name": "txtStyle",
  1026. "type": 0,
  1027. "list": [
  1028. {
  1029. "val": "居左",
  1030. "icon": "icondoc_left",
  1031. "style": "left"
  1032. },
  1033. {
  1034. "val": "居中",
  1035. "icon": "icondoc_center",
  1036. "style": "center"
  1037. },
  1038. {
  1039. "val": "居右",
  1040. "icon": "icondoc_right",
  1041. "style": "right"
  1042. }
  1043. ]
  1044. },
  1045. "bgColor": {
  1046. "title": "背景颜色",
  1047. "default": [
  1048. {
  1049. "item": "#fff"
  1050. }
  1051. ],
  1052. "color": [
  1053. {
  1054. "item": "#fff"
  1055. }
  1056. ]
  1057. },
  1058. "txtColor": {
  1059. "title": "文字颜色",
  1060. "default": [
  1061. {
  1062. "item": "#333"
  1063. }
  1064. ],
  1065. "color": [
  1066. {
  1067. "item": "#333"
  1068. }
  1069. ]
  1070. },
  1071. "listConfig": {
  1072. "title": "最多可添加10个版块;鼠标拖拽左侧圆点可调整版块顺序",
  1073. "max": 10,
  1074. "list": [
  1075. {
  1076. "chiild": [
  1077. {
  1078. "title": "标题",
  1079. "val": "标准版4.5正式发布,大家快来体验",
  1080. "max": 30,
  1081. "pla": "选填,不超过30个字",
  1082. "empty": true
  1083. },
  1084. {
  1085. "title": "链接",
  1086. "val": "/pages/extension/news_details/index?id=128",
  1087. "max": 200,
  1088. "pla": "请输入连接"
  1089. }
  1090. ]
  1091. }
  1092. ],
  1093. "tabCur": 0
  1094. },
  1095. "bgStyle": {
  1096. "title": "背景样式",
  1097. "name": "bgStyle",
  1098. "type": 1,
  1099. "list": [
  1100. {
  1101. "val": "直角",
  1102. "icon": "iconPic_square"
  1103. },
  1104. {
  1105. "val": "圆角",
  1106. "icon": "iconPic_fillet"
  1107. }
  1108. ]
  1109. },
  1110. "prConfig": {
  1111. "title": "背景边距",
  1112. "val": 10,
  1113. "min": 0
  1114. },
  1115. "mbConfig": {
  1116. "title": "页面间距",
  1117. "val": 10,
  1118. "min": 0
  1119. },
  1120. "logoConfig": {
  1121. "header": "图标设置",
  1122. "title": "最多可添加1张图片,建议宽度130 * 36px",
  1123. "url": "https://qiniu.crmeb.net/attach/2021/11/6d4fe202111181229083421.png"
  1124. },
  1125. "id": "id1665385357481002"
  1126. },
  1127. "1666235374470003": {
  1128. "name": "menus",
  1129. "timestamp": "1666235374470003",
  1130. "setUp": {
  1131. "tabVal": 0
  1132. },
  1133. "tabConfig": {
  1134. "title": "展示样式",
  1135. "tabVal": 1,
  1136. "type": 1,
  1137. "tabList": [
  1138. {
  1139. "name": "单行展示",
  1140. "icon": "icondanhang"
  1141. },
  1142. {
  1143. "name": "多行展示",
  1144. "icon": "iconduohang"
  1145. }
  1146. ]
  1147. },
  1148. "rowsNum": {
  1149. "title": "显示行数",
  1150. "name": "rowsNum",
  1151. "type": 0,
  1152. "list": [
  1153. {
  1154. "val": "2行",
  1155. "icon": "icon2hang"
  1156. },
  1157. {
  1158. "val": "3行",
  1159. "icon": "icon3hang"
  1160. },
  1161. {
  1162. "val": "4行",
  1163. "icon": "icon4hang"
  1164. }
  1165. ]
  1166. },
  1167. "menuStyle": {
  1168. "title": "图标样式",
  1169. "name": "menuStyle",
  1170. "type": 1,
  1171. "list": [
  1172. {
  1173. "val": "方形",
  1174. "icon": "iconPic_square"
  1175. },
  1176. {
  1177. "val": "圆形",
  1178. "icon": "icondayuanjiao"
  1179. }
  1180. ]
  1181. },
  1182. "number": {
  1183. "title": "显示个数",
  1184. "name": "number",
  1185. "type": 2,
  1186. "list": [
  1187. {
  1188. "val": "3个",
  1189. "icon": "icon3ge"
  1190. },
  1191. {
  1192. "val": "4个",
  1193. "icon": "icon4ge1"
  1194. },
  1195. {
  1196. "val": "5个",
  1197. "icon": "icon5ge1"
  1198. }
  1199. ]
  1200. },
  1201. "pointerStyle": {
  1202. "title": "指示器样式",
  1203. "name": "pointerStyle",
  1204. "type": 2,
  1205. "list": [
  1206. {
  1207. "val": "长条",
  1208. "icon": "iconSquarepoint"
  1209. },
  1210. {
  1211. "val": "圆形",
  1212. "icon": "iconDot"
  1213. },
  1214. {
  1215. "val": "无指示器",
  1216. "icon": "iconjinyong"
  1217. }
  1218. ]
  1219. },
  1220. "bgStyle": {
  1221. "title": "背景样式",
  1222. "name": "bgStyle",
  1223. "type": 1,
  1224. "list": [
  1225. {
  1226. "val": "直角",
  1227. "icon": "iconPic_square"
  1228. },
  1229. {
  1230. "val": "圆角",
  1231. "icon": "iconPic_fillet"
  1232. }
  1233. ]
  1234. },
  1235. "prConfig": {
  1236. "title": "背景边距",
  1237. "val": 10,
  1238. "min": 0
  1239. },
  1240. "menuConfig": {
  1241. "title": "最多可添加1张图片,建议宽度90 * 90px",
  1242. "maxList": 100,
  1243. "list": [
  1244. {
  1245. "img": "https://qiniu.crmeb.net/attach/2021/09/02d9e202109101106364468.png",
  1246. "info": [
  1247. {
  1248. "title": "标题",
  1249. "value": "预约自提",
  1250. "tips": "选填,不超过4个字",
  1251. "max": 4
  1252. },
  1253. {
  1254. "title": "链接",
  1255. "value": "/pages/goods_details/index?id=109",
  1256. "tips": "请输入链接",
  1257. "max": 100
  1258. }
  1259. ]
  1260. },
  1261. {
  1262. "img": "https://qiniu.crmeb.net/attach/2021/09/4a21a202109101106368349.png",
  1263. "info": [
  1264. {
  1265. "title": "标题",
  1266. "value": "领优惠券",
  1267. "tips": "选填,不超过4个字",
  1268. "max": 4
  1269. },
  1270. {
  1271. "title": "链接",
  1272. "value": "/pages/users/user_get_coupon/index",
  1273. "tips": "请输入链接",
  1274. "max": 100
  1275. }
  1276. ]
  1277. },
  1278. {
  1279. "img": "https://demo26.crmeb.net/uploads/attach/2022/09/20220916/d09d2286f960697ab7e1fb9d2595605f.png",
  1280. "info": [
  1281. {
  1282. "title": "标题",
  1283. "value": "特价限购",
  1284. "tips": "选填,不超过4个字",
  1285. "max": 4
  1286. },
  1287. {
  1288. "title": "链接",
  1289. "value": "/pages/goods_details/index?id=116",
  1290. "tips": "请输入链接",
  1291. "max": 100
  1292. }
  1293. ]
  1294. },
  1295. {
  1296. "img": "https://qiniu.crmeb.net/attach/2021/09/9d74b20210910110637104.png",
  1297. "info": [
  1298. {
  1299. "title": "标题",
  1300. "value": "新闻资讯",
  1301. "tips": "选填,不超过4个字",
  1302. "max": 4
  1303. },
  1304. {
  1305. "title": "链接",
  1306. "value": "/pages/extension/news_list/index",
  1307. "tips": "请输入链接",
  1308. "max": 100
  1309. }
  1310. ]
  1311. },
  1312. {
  1313. "img": "https://qiniu.crmeb.net/attach/2021/09/1c95120210910110636424.png",
  1314. "info": [
  1315. {
  1316. "title": "标题",
  1317. "value": "助力砍价",
  1318. "tips": "选填,不超过4个字",
  1319. "max": 4
  1320. },
  1321. {
  1322. "title": "链接",
  1323. "value": "/pages/activity/goods_bargain/index",
  1324. "tips": "请输入链接",
  1325. "max": 100
  1326. }
  1327. ]
  1328. },
  1329. {
  1330. "img": "https://qiniu.crmeb.net/attach/2021/09/23332202109101106361126.png",
  1331. "info": [
  1332. {
  1333. "title": "标题",
  1334. "value": "限时秒杀",
  1335. "tips": "选填,不超过4个字",
  1336. "max": 4
  1337. },
  1338. {
  1339. "title": "链接",
  1340. "value": "/pages/activity/goods_seckill/index",
  1341. "tips": "请输入链接",
  1342. "max": 100
  1343. }
  1344. ]
  1345. },
  1346. {
  1347. "img": "https://qiniu.crmeb.net/attach/2021/09/34f81202109101106357549.png",
  1348. "info": [
  1349. {
  1350. "title": "标题",
  1351. "value": "积分商城",
  1352. "tips": "选填,不超过4个字",
  1353. "max": 4
  1354. },
  1355. {
  1356. "title": "链接",
  1357. "value": "/pages/points_mall/index",
  1358. "tips": "请输入链接",
  1359. "max": 100
  1360. }
  1361. ]
  1362. },
  1363. {
  1364. "img": "https://demo26.crmeb.net/uploads/attach/2022/09/20220916/06c63d52fc6772917540d47076606680.png",
  1365. "info": [
  1366. {
  1367. "title": "标题",
  1368. "value": "成团返佣",
  1369. "tips": "选填,不超过4个字",
  1370. "max": 4
  1371. },
  1372. {
  1373. "title": "链接",
  1374. "value": "/pages/activity/goods_combination_details/index?id=23",
  1375. "tips": "请输入链接",
  1376. "max": 100
  1377. }
  1378. ]
  1379. },
  1380. {
  1381. "img": "https://demo26.crmeb.net/uploads/attach/2022/09/20220916/e31cdcb6fa7660aee45912ef572cc114.png",
  1382. "info": [
  1383. {
  1384. "title": "标题",
  1385. "value": "用户足迹",
  1386. "tips": "选填,不超过4个字",
  1387. "max": 4
  1388. },
  1389. {
  1390. "title": "链接",
  1391. "value": "/pages/users/visit_list/index",
  1392. "tips": "请输入链接",
  1393. "max": 100
  1394. }
  1395. ]
  1396. },
  1397. {
  1398. "img": "https://qiniu.crmeb.net/attach/2021/09/f4598202109101106358762.png",
  1399. "info": [
  1400. {
  1401. "title": "标题",
  1402. "value": "幸运转盘",
  1403. "tips": "选填,不超过4个字",
  1404. "max": 4
  1405. },
  1406. {
  1407. "title": "链接",
  1408. "value": "/pages/goods/lottery/grids/index?type=1",
  1409. "tips": "请输入链接",
  1410. "max": 100
  1411. }
  1412. ]
  1413. }
  1414. ]
  1415. },
  1416. "pointerColor": {
  1417. "title": "指示器颜色",
  1418. "name": "pointerColor",
  1419. "default": [
  1420. {
  1421. "item": "#f44"
  1422. }
  1423. ],
  1424. "color": [
  1425. {
  1426. "item": "#f44"
  1427. }
  1428. ]
  1429. },
  1430. "bgColor": {
  1431. "title": "背景颜色",
  1432. "name": "bgColor",
  1433. "default": [
  1434. {
  1435. "item": "#fff"
  1436. }
  1437. ],
  1438. "color": [
  1439. {
  1440. "item": "#fff"
  1441. }
  1442. ]
  1443. },
  1444. "titleColor": {
  1445. "title": "文字颜色",
  1446. "name": "themeColor",
  1447. "default": [
  1448. {
  1449. "item": "#333333"
  1450. }
  1451. ],
  1452. "color": [
  1453. {
  1454. "item": "rgba(51,51,51,1)"
  1455. }
  1456. ]
  1457. },
  1458. "mbConfig": {
  1459. "title": "页面间距",
  1460. "val": 12,
  1461. "min": 0
  1462. },
  1463. "id": "id1665385357481003"
  1464. },
  1465. "1666235374470004": {
  1466. "name": "activeParty",
  1467. "timestamp": "1666235374470004",
  1468. "setUp": {
  1469. "tabVal": 1
  1470. },
  1471. "titleConfig": {
  1472. "title": "促销标题",
  1473. "value": "超值爆款",
  1474. "place": "请输入标题",
  1475. "max": 10
  1476. },
  1477. "desConfig": {
  1478. "title": "促销简介",
  1479. "value": "美好生活由此开始",
  1480. "place": "请输入简介",
  1481. "max": 8
  1482. },
  1483. "menuConfig": {
  1484. "title": "最多可添加4个版块,图片建议尺寸140 * 140px;鼠标拖拽左侧圆点可 调整版块顺序",
  1485. "maxList": 4,
  1486. "list": [
  1487. {
  1488. "img": "https://qiniu.crmeb.net/attach/2021/11/16/216aaf8ea5fdeff2a31a48f3e931ff46.jpg",
  1489. "info": [
  1490. {
  1491. "title": "标题",
  1492. "value": "今日推荐",
  1493. "tips": "选填,不超过4个字",
  1494. "max": 4
  1495. },
  1496. {
  1497. "title": "简介",
  1498. "value": "店主诚意推荐 品质商品",
  1499. "tips": "选填,不超过20个字",
  1500. "max": 20
  1501. },
  1502. {
  1503. "title": "链接",
  1504. "value": "/pages/columnGoods/HotNewGoods/index?type=1&name=精品推荐",
  1505. "tips": "请输入链接",
  1506. "max": 100
  1507. }
  1508. ]
  1509. },
  1510. {
  1511. "img": "https://qiniu.crmeb.net/attach/2021/11/15/1c72a02ad97f695bd85fa04821b72985.jpg",
  1512. "info": [
  1513. {
  1514. "title": "标题",
  1515. "value": "热门榜单",
  1516. "tips": "选填,不超过4个字",
  1517. "max": 4
  1518. },
  1519. {
  1520. "title": "简介",
  1521. "value": "店主诚意推荐 品质商品",
  1522. "tips": "选填,不超过20个字",
  1523. "max": 20
  1524. },
  1525. {
  1526. "title": "链接",
  1527. "value": "/pages/columnGoods/HotNewGoods/index?type=2&name=热门榜单",
  1528. "tips": "请输入链接",
  1529. "max": 100
  1530. }
  1531. ]
  1532. },
  1533. {
  1534. "img": "https://qiniu.crmeb.net/attach/2021/10/612bb202110121143097664.png",
  1535. "info": [
  1536. {
  1537. "title": "标题",
  1538. "value": "首发新品",
  1539. "tips": "选填,不超过4个字",
  1540. "max": 4
  1541. },
  1542. {
  1543. "title": "简介",
  1544. "value": "新品上架等 你来拿",
  1545. "tips": "选填,不超过20个字",
  1546. "max": 20
  1547. },
  1548. {
  1549. "title": "链接",
  1550. "value": "/pages/columnGoods/HotNewGoods/index?type=3&name=首发新品",
  1551. "tips": "请输入链接",
  1552. "max": 100
  1553. }
  1554. ]
  1555. },
  1556. {
  1557. "img": "https://qiniu.crmeb.net/attach/2021/10/59c17202110130919585671.png",
  1558. "info": [
  1559. {
  1560. "title": "标题",
  1561. "value": "促销单品",
  1562. "tips": "选填,不超过4个字",
  1563. "max": 4
  1564. },
  1565. {
  1566. "title": "简介",
  1567. "value": "综合评选好 产品",
  1568. "tips": "选填,不超过20个字",
  1569. "max": 20
  1570. },
  1571. {
  1572. "title": "链接",
  1573. "value": "/pages/columnGoods/HotNewGoods/index?type=4&name=促销单品",
  1574. "tips": "请输入链接",
  1575. "max": 100
  1576. }
  1577. ]
  1578. }
  1579. ]
  1580. },
  1581. "themeColor": {
  1582. "title": "主题颜色",
  1583. "name": "themeColor",
  1584. "default": [
  1585. {
  1586. "item": "#fc3c3e"
  1587. }
  1588. ],
  1589. "color": [
  1590. {
  1591. "item": "rgba(29,176,252,1)"
  1592. }
  1593. ]
  1594. },
  1595. "bgColor": {
  1596. "title": "标签背景颜色",
  1597. "name": "bgColor",
  1598. "default": [
  1599. {
  1600. "item": "#F62C2C"
  1601. },
  1602. {
  1603. "item": "#F96E29"
  1604. }
  1605. ],
  1606. "color": [
  1607. {
  1608. "item": "rgba(29,176,252,1)"
  1609. },
  1610. {
  1611. "item": "rgba(64,209,244,1)"
  1612. }
  1613. ]
  1614. },
  1615. "boxColor": {
  1616. "title": "背景颜色",
  1617. "name": "boxColor",
  1618. "default": [
  1619. {
  1620. "item": "#ffe5e3"
  1621. }
  1622. ],
  1623. "color": [
  1624. {
  1625. "item": "rgba(208,240,255,1)"
  1626. }
  1627. ]
  1628. },
  1629. "mbConfig": {
  1630. "title": "页面间距",
  1631. "val": 12,
  1632. "min": 0
  1633. },
  1634. "id": "id1665385357481004"
  1635. },
  1636. "1666235374470005": {
  1637. "name": "combination",
  1638. "timestamp": "1666235374470005",
  1639. "setUp": {
  1640. "tabVal": 1
  1641. },
  1642. "numConfig": {
  1643. "val": 3
  1644. },
  1645. "priceShow": {
  1646. "title": "是否显示价格",
  1647. "val": true
  1648. },
  1649. "bntShow": {
  1650. "title": "是否显示按钮",
  1651. "val": true
  1652. },
  1653. "titleShow": {
  1654. "title": "是否显示名称",
  1655. "val": true
  1656. },
  1657. "pinkShow": {
  1658. "title": "是否显示拼团标签",
  1659. "val": true
  1660. },
  1661. "joinShow": {
  1662. "title": "是否显示参团标签",
  1663. "val": true
  1664. },
  1665. "txtColor": {
  1666. "title": "文字背景色",
  1667. "name": "themeColor",
  1668. "default": [
  1669. {
  1670. "item": "rgba(255,68,68,0.1)"
  1671. }
  1672. ],
  1673. "color": [
  1674. {
  1675. "item": "rgba(208,240,255,1)"
  1676. }
  1677. ]
  1678. },
  1679. "conStyle": {
  1680. "title": "背景样式",
  1681. "name": "conStyle",
  1682. "type": 1,
  1683. "list": [
  1684. {
  1685. "val": "直角",
  1686. "icon": "iconPic_square"
  1687. },
  1688. {
  1689. "val": "圆角",
  1690. "icon": "iconPic_fillet"
  1691. }
  1692. ]
  1693. },
  1694. "bgColor": {
  1695. "title": "背景颜色",
  1696. "name": "themeColor",
  1697. "default": [
  1698. {
  1699. "item": "#fff"
  1700. }
  1701. ],
  1702. "color": [
  1703. {
  1704. "item": "#fff"
  1705. }
  1706. ]
  1707. },
  1708. "prConfig": {
  1709. "title": "背景边距",
  1710. "val": 10,
  1711. "min": 0
  1712. },
  1713. "themeColor": {
  1714. "title": "主题风格",
  1715. "name": "themeColor",
  1716. "default": [
  1717. {
  1718. "item": "#E93323"
  1719. }
  1720. ],
  1721. "color": [
  1722. {
  1723. "item": "rgba(29,176,252,1)"
  1724. }
  1725. ]
  1726. },
  1727. "mbConfig": {
  1728. "title": "页面间距",
  1729. "val": 12,
  1730. "min": 0
  1731. },
  1732. "lrConfig": {
  1733. "title": "左右边距",
  1734. "val": 10,
  1735. "min": 0
  1736. },
  1737. "imgConfig": {
  1738. "title": "最多可添加1张图片,建议宽度18 * 18px",
  1739. "url": "https://qiniu.crmeb.net/attach/2021/11/238c5202111181433515309.gif"
  1740. },
  1741. "id": "id1665385357481005"
  1742. },
  1743. "1666235374470006": {
  1744. "name": "bargain",
  1745. "timestamp": "1666235374470006",
  1746. "setUp": {
  1747. "tabVal": 1
  1748. },
  1749. "numConfig": {
  1750. "val": 3
  1751. },
  1752. "priceShow": {
  1753. "title": "是否显示价格",
  1754. "val": true
  1755. },
  1756. "bntShow": {
  1757. "title": "是否显示按钮",
  1758. "val": true
  1759. },
  1760. "themeColor": {
  1761. "title": "主题风格",
  1762. "name": "themeColor",
  1763. "default": [
  1764. {
  1765. "item": "#E93323"
  1766. }
  1767. ],
  1768. "color": [
  1769. {
  1770. "item": "rgba(29,176,252,1)"
  1771. }
  1772. ]
  1773. },
  1774. "titleColor": {
  1775. "title": "标题颜色",
  1776. "name": "txtColor",
  1777. "default": [
  1778. {
  1779. "item": "#FF6000"
  1780. }
  1781. ],
  1782. "color": [
  1783. {
  1784. "item": "rgba(255,152,0,1)"
  1785. }
  1786. ]
  1787. },
  1788. "bgColor": {
  1789. "title": "背景颜色",
  1790. "name": "bgColor",
  1791. "default": [
  1792. {
  1793. "item": "#FDDBB2"
  1794. },
  1795. {
  1796. "item": "#FDEFC6"
  1797. }
  1798. ],
  1799. "color": [
  1800. {
  1801. "item": "#FDDBB2"
  1802. },
  1803. {
  1804. "item": "#FDEFC6"
  1805. }
  1806. ]
  1807. },
  1808. "bgStyle": {
  1809. "title": "背景样式",
  1810. "name": "bgStyle",
  1811. "type": 1,
  1812. "list": [
  1813. {
  1814. "val": "直角",
  1815. "icon": "iconPic_square"
  1816. },
  1817. {
  1818. "val": "圆角",
  1819. "icon": "iconPic_fillet"
  1820. }
  1821. ]
  1822. },
  1823. "prConfig": {
  1824. "title": "背景边距",
  1825. "val": 10,
  1826. "min": 0
  1827. },
  1828. "productGap": {
  1829. "title": "商品间距",
  1830. "val": 10,
  1831. "min": 0
  1832. },
  1833. "mbCongfig": {
  1834. "title": "页面间距",
  1835. "val": 0,
  1836. "min": 0
  1837. },
  1838. "id": "id1665385357481006"
  1839. },
  1840. "1666235374470007": {
  1841. "name": "seckill",
  1842. "timestamp": "1666235374470007",
  1843. "setUp": {
  1844. "tabVal": 1
  1845. },
  1846. "countDownColor": {
  1847. "title": "倒计时背景色",
  1848. "name": "countDownColor",
  1849. "default": [
  1850. {
  1851. "item": "rgba(252,60,62,0.09)"
  1852. }
  1853. ],
  1854. "color": [
  1855. {
  1856. "item": "rgba(255,255,255,0.09)"
  1857. }
  1858. ]
  1859. },
  1860. "themeColor": {
  1861. "title": "主题风格",
  1862. "name": "themeColor",
  1863. "default": [
  1864. {
  1865. "item": "#E93323"
  1866. }
  1867. ],
  1868. "color": [
  1869. {
  1870. "item": "rgba(29,176,255,1)"
  1871. }
  1872. ]
  1873. },
  1874. "conStyle": {
  1875. "title": "背景样式",
  1876. "name": "conStyle",
  1877. "type": 1,
  1878. "list": [
  1879. {
  1880. "val": "直角",
  1881. "icon": "iconPic_square"
  1882. },
  1883. {
  1884. "val": "圆角",
  1885. "icon": "iconPic_fillet"
  1886. }
  1887. ]
  1888. },
  1889. "bgColor": {
  1890. "title": "背景颜色",
  1891. "name": "themeColor",
  1892. "default": [
  1893. {
  1894. "item": "#fff"
  1895. }
  1896. ],
  1897. "color": [
  1898. {
  1899. "item": "#fff"
  1900. }
  1901. ]
  1902. },
  1903. "prConfig": {
  1904. "title": "背景边距",
  1905. "val": 10,
  1906. "min": 0
  1907. },
  1908. "priceShow": {
  1909. "title": "是否显示价格",
  1910. "val": true
  1911. },
  1912. "discountShow": {
  1913. "title": "是否显示折扣标签",
  1914. "val": true
  1915. },
  1916. "titleShow": {
  1917. "title": "是否显示名称",
  1918. "val": true
  1919. },
  1920. "seckillShow": {
  1921. "title": "抢购标签",
  1922. "val": true
  1923. },
  1924. "numberConfig": {
  1925. "val": 3
  1926. },
  1927. "lrConfig": {
  1928. "title": "左右边距",
  1929. "val": 10,
  1930. "min": 0
  1931. },
  1932. "mbConfig": {
  1933. "title": "页面间距",
  1934. "val": 0,
  1935. "min": 0
  1936. },
  1937. "imgConfig": {
  1938. "title": "最多可添加1张图片,建议宽度18 * 18px",
  1939. "url": "https://demo26.crmeb.net/uploads/attach/2022/09/20220930/e537a7fc631006d3571d7a8574438b03.gif"
  1940. },
  1941. "id": "id1665385357481007"
  1942. },
  1943. "1666235374470009": {
  1944. "name": "promotionList",
  1945. "timestamp": "1666235374470009",
  1946. "setUp": {
  1947. "tabVal": 1
  1948. },
  1949. "productList": {
  1950. "title": "促销列表"
  1951. },
  1952. "titleConfig": {
  1953. "title": "标题位置",
  1954. "type": 2,
  1955. "list": [
  1956. {
  1957. "val": "居左",
  1958. "icon": "icondoc_left"
  1959. },
  1960. {
  1961. "val": "居中",
  1962. "icon": "icondoc_center"
  1963. },
  1964. {
  1965. "val": "居右",
  1966. "icon": "icondoc_right"
  1967. }
  1968. ]
  1969. },
  1970. "titleShow": {
  1971. "title": "是否显示商品名称",
  1972. "val": true
  1973. },
  1974. "opriceShow": {
  1975. "title": "是否显示商品原价",
  1976. "val": true
  1977. },
  1978. "priceShow": {
  1979. "title": "是否显示商品价格",
  1980. "val": true
  1981. },
  1982. "couponShow": {
  1983. "title": "是否显示优惠券",
  1984. "val": true
  1985. },
  1986. "tabConfig": {
  1987. "title": "最多可添加4个版块;鼠标拖拽左侧圆点可调整版块顺序",
  1988. "max": 4,
  1989. "tabCur": 3,
  1990. "list": [
  1991. {
  1992. "chiild": [
  1993. {
  1994. "title": "标题",
  1995. "val": "首发新品",
  1996. "max": 4,
  1997. "pla": "选填,不超过四个字"
  1998. },
  1999. {
  2000. "title": "简介",
  2001. "val": "最新出炉",
  2002. "max": 4,
  2003. "pla": "选填,不超过四个字"
  2004. }
  2005. ],
  2006. "link": {
  2007. "title": "链接",
  2008. "activeVal": 3,
  2009. "optiops": [
  2010. {
  2011. "type": 0,
  2012. "value": 1,
  2013. "label": "精品推荐"
  2014. },
  2015. {
  2016. "type": 1,
  2017. "value": 2,
  2018. "label": "热门榜单"
  2019. },
  2020. {
  2021. "type": 2,
  2022. "value": 3,
  2023. "label": "首发新品"
  2024. },
  2025. {
  2026. "type": 3,
  2027. "value": 4,
  2028. "label": "促销单品"
  2029. }
  2030. ]
  2031. }
  2032. },
  2033. {
  2034. "chiild": [
  2035. {
  2036. "title": "标题",
  2037. "val": "精品推荐",
  2038. "max": 4,
  2039. "pla": "选填,不超过四个字"
  2040. },
  2041. {
  2042. "title": "简介",
  2043. "val": "猜你喜欢",
  2044. "max": 4,
  2045. "pla": "选填,不超过四个字"
  2046. }
  2047. ],
  2048. "link": {
  2049. "title": "链接",
  2050. "activeVal": 1,
  2051. "optiops": [
  2052. {
  2053. "type": 0,
  2054. "value": 1,
  2055. "label": "精品推荐"
  2056. },
  2057. {
  2058. "type": 1,
  2059. "value": 2,
  2060. "label": "热门榜单"
  2061. },
  2062. {
  2063. "type": 2,
  2064. "value": 3,
  2065. "label": "首发新品"
  2066. },
  2067. {
  2068. "type": 3,
  2069. "value": 4,
  2070. "label": "促销单品"
  2071. }
  2072. ]
  2073. }
  2074. },
  2075. {
  2076. "chiild": [
  2077. {
  2078. "title": "标题",
  2079. "val": "热门榜单",
  2080. "max": 4,
  2081. "pla": "选填,不超过四个字"
  2082. },
  2083. {
  2084. "title": "简介",
  2085. "val": "好评如云",
  2086. "max": 4,
  2087. "pla": "选填,不超过四个字"
  2088. }
  2089. ],
  2090. "link": {
  2091. "title": "链接",
  2092. "activeVal": 2,
  2093. "optiops": [
  2094. {
  2095. "type": 0,
  2096. "value": 1,
  2097. "label": "精品推荐"
  2098. },
  2099. {
  2100. "type": 1,
  2101. "value": 2,
  2102. "label": "热门榜单"
  2103. },
  2104. {
  2105. "type": 2,
  2106. "value": 3,
  2107. "label": "首发新品"
  2108. },
  2109. {
  2110. "type": 3,
  2111. "value": 4,
  2112. "label": "促销单品"
  2113. }
  2114. ]
  2115. }
  2116. },
  2117. {
  2118. "chiild": [
  2119. {
  2120. "title": "标题",
  2121. "val": "促销单品",
  2122. "max": 4,
  2123. "pla": "选填,不超过四个字"
  2124. },
  2125. {
  2126. "title": "简介",
  2127. "val": "多买多销",
  2128. "max": 4,
  2129. "pla": "选填,不超过四个字"
  2130. }
  2131. ],
  2132. "link": {
  2133. "title": "链接",
  2134. "activeVal": 4,
  2135. "optiops": [
  2136. {
  2137. "type": 0,
  2138. "value": 1,
  2139. "label": "精品推荐"
  2140. },
  2141. {
  2142. "type": 1,
  2143. "value": 2,
  2144. "label": "热门榜单"
  2145. },
  2146. {
  2147. "type": 2,
  2148. "value": 3,
  2149. "label": "首发新品"
  2150. },
  2151. {
  2152. "type": 3,
  2153. "value": 4,
  2154. "label": "促销单品"
  2155. }
  2156. ]
  2157. }
  2158. }
  2159. ]
  2160. },
  2161. "themeColor": {
  2162. "title": "主题风格",
  2163. "name": "themeColor",
  2164. "default": [
  2165. {
  2166. "item": "#F95429"
  2167. }
  2168. ],
  2169. "color": [
  2170. {
  2171. "item": "rgba(29,176,252,1)"
  2172. }
  2173. ]
  2174. },
  2175. "fontColor": {
  2176. "title": "价格颜色",
  2177. "name": "fontColor",
  2178. "default": [
  2179. {
  2180. "item": "#e93323"
  2181. }
  2182. ],
  2183. "color": [
  2184. {
  2185. "item": "rgba(253,80,47,1)"
  2186. }
  2187. ]
  2188. },
  2189. "labelColor": {
  2190. "title": "活动标签",
  2191. "name": "labelColor",
  2192. "default": [
  2193. {
  2194. "item": "#e93323"
  2195. }
  2196. ],
  2197. "color": [
  2198. {
  2199. "item": "rgba(29,176,252,1)"
  2200. }
  2201. ]
  2202. },
  2203. "mbConfig": {
  2204. "title": "页面间距",
  2205. "val": 0,
  2206. "min": 0
  2207. },
  2208. "numConfig": {
  2209. "val": 9
  2210. },
  2211. "id": "id1665385357481008"
  2212. },
  2213. "1666235390875000": {
  2214. "name": "pageFoot",
  2215. "setUp": {
  2216. "tabVal": 0
  2217. },
  2218. "status": {
  2219. "title": "是否自定义",
  2220. "name": "status",
  2221. "status": true
  2222. },
  2223. "txtColor": {
  2224. "title": "文字颜色",
  2225. "name": "txtColor",
  2226. "default": [
  2227. {
  2228. "item": "#282828"
  2229. }
  2230. ],
  2231. "color": [
  2232. {
  2233. "item": "rgba(51,51,51,1)"
  2234. }
  2235. ]
  2236. },
  2237. "activeTxtColor": {
  2238. "title": "选中文字颜色",
  2239. "name": "txtColor",
  2240. "default": [
  2241. {
  2242. "item": "#F62C2C"
  2243. }
  2244. ],
  2245. "color": [
  2246. {
  2247. "item": "rgba(29,176,252,1)"
  2248. }
  2249. ]
  2250. },
  2251. "bgColor": {
  2252. "title": "背景颜色",
  2253. "name": "bgColor",
  2254. "default": [
  2255. {
  2256. "item": "#fff"
  2257. }
  2258. ],
  2259. "color": [
  2260. {
  2261. "item": "#fff"
  2262. }
  2263. ]
  2264. },
  2265. "menuList": [
  2266. {
  2267. "imgList": [
  2268. "https://qiniu.crmeb.net/attach/2021/11/bdf25202111181452426458.png",
  2269. "https://qiniu.crmeb.net/attach/2021/11/aaf1b202111181452576658.png"
  2270. ],
  2271. "name": "首页",
  2272. "link": "/pages/index/index"
  2273. },
  2274. {
  2275. "imgList": [
  2276. "https://demo26.crmeb.net/uploads/attach/2022/09/20220923/14367a2fecd502f51978ed6ea09afe19.png",
  2277. "https://qiniu.crmeb.net/attach/2021/11/59d4a202111181453208678.png"
  2278. ],
  2279. "name": "分类",
  2280. "link": "/pages/goods_cate/goods_cate"
  2281. },
  2282. {
  2283. "imgList": [
  2284. "https://qiniu.crmeb.net/attach/2021/11/076ac202111181453294517.png",
  2285. "https://qiniu.crmeb.net/attach/2021/11/201c9202111181453378599.png"
  2286. ],
  2287. "name": "购物车",
  2288. "link": "/pages/order_addcart/order_addcart"
  2289. },
  2290. {
  2291. "imgList": [
  2292. "https://qiniu.crmeb.net/attach/2021/11/f04cf20211118145343755.png",
  2293. "https://qiniu.crmeb.net/attach/2021/11/3a141202111181453495771.png"
  2294. ],
  2295. "name": "我的",
  2296. "link": "/pages/user/index"
  2297. }
  2298. ],
  2299. "id": "idundefined"
  2300. }
  2301. },
  2302. "is_show": 1,
  2303. "is_bg_color": 0,
  2304. "color_picker": "#f5f5f5",
  2305. "bg_pic": "",
  2306. "bg_tab_val": 0,
  2307. "is_bg_pic": 0,
  2308. "order_status": 0,
  2309. "is_diy": 1,
  2310. "title": "首页"
  2311. }
  2312. }
  2313. // getDiy(0).then(res => {
  2314. setTimeout(() => {
  2315. this.isNodes++;
  2316. }, 0);
  2317. this.errorNetwork = false
  2318. let data = res.data;
  2319. if (data.is_bg_color) {
  2320. this.bgColor = data.color_picker
  2321. }
  2322. if (data.is_bg_pic) {
  2323. this.bgPic = data.bg_pic
  2324. this.bgTabVal = data.bg_tab_val
  2325. }
  2326. this.pageShow = data.is_show
  2327. uni.setNavigationBarTitle({
  2328. title: res.data.title
  2329. });
  2330. let temp = [];
  2331. let lastArr = that.objToArr(res.data.value);
  2332. lastArr.forEach((item, index, arr) => {
  2333. if (item.name == 'headerSerch') {
  2334. this.isHeaderSerch = true
  2335. }
  2336. if (item.name == 'pageFoot') {
  2337. console.log(item.status)
  2338. if (item.status && item.status.status) {
  2339. this.newData = item
  2340. setTimeout((e) => {
  2341. that.$set(that, 'footerStatus', true);
  2342. console.log(this.footerStatus)
  2343. }, 50)
  2344. }
  2345. uni.setStorageSync('FOOTER_BAR', item.status && item.status.status ? true :
  2346. false)
  2347. item.menuList.map((path, index) => {
  2348. if (path.link === '/pages/order_addcart/order_addcart') {
  2349. uni.setStorageSync('FOOTER_ADDCART', index)
  2350. }
  2351. })
  2352. arr.splice(index, 1);
  2353. }
  2354. if (item.name == 'promotionList') {
  2355. that.numConfig = item.numConfig.val;
  2356. that.goodType = item.tabConfig.list[0].link.activeVal;
  2357. that.getGroomList();
  2358. }
  2359. if (item.name == 'tabNav') {
  2360. // #ifndef APP-PLUS
  2361. // uni.showLoading({
  2362. // title: '加载中',
  2363. // mask: true,
  2364. // });
  2365. // #endif
  2366. // setTimeout(function() {
  2367. // uni.hideLoading();
  2368. // }, 8000);
  2369. }
  2370. temp = arr;
  2371. });
  2372. function sortNumber(a, b) {
  2373. return a.timestamp - b.timestamp;
  2374. }
  2375. temp.sort(sortNumber)
  2376. that.styleConfig = temp;
  2377. setTimeout(() => {
  2378. this.showSkeleton = false
  2379. }, 300)
  2380. uni.stopPullDownRefresh({
  2381. success: (e) => { },
  2382. });
  2383. // })
  2384. // .catch(error => {
  2385. // // #ifdef APP-PLUS
  2386. // if (error.status) {
  2387. // uni.hideLoading()
  2388. // if (that.errorNetwork) {
  2389. // uni.showToast({
  2390. // title: this.$t(`连接失败`),
  2391. // icon: 'none',
  2392. // duration: 2000
  2393. // })
  2394. // }
  2395. // this.errorNetwork = true
  2396. // this.showSkeleton = false;
  2397. // }
  2398. // // #endif
  2399. // });
  2400. },
  2401. getIndexData() { },
  2402. changeBarg(item) {
  2403. if (!this.isLogin) {
  2404. toLogin();
  2405. } else {
  2406. uni.navigateTo({
  2407. url: `/pages/activity/goods_bargain_details/index?id=${item.id}&bargain=${this.$store.state.app.uid}`
  2408. });
  2409. }
  2410. },
  2411. // 促销列表的点击事件;
  2412. changeTab(type) {
  2413. this.goodType = type;
  2414. this.tempArr = [];
  2415. this.page = 1;
  2416. this.loadend = false;
  2417. let onloadH = true;
  2418. this.getGroomList(onloadH);
  2419. },
  2420. // 精品推荐
  2421. getGroomList(onloadH) {
  2422. let that = this;
  2423. let type = that.goodType;
  2424. if (that.loadend) return false;
  2425. if (that.loading) return false;
  2426. if (onloadH) {
  2427. that.$set(that, 'iSshowH', true);
  2428. }
  2429. getGroomList(type, {
  2430. page: that.page,
  2431. limit: this.numConfig
  2432. })
  2433. .then(({
  2434. data
  2435. }) => {
  2436. that.$set(that, 'iSshowH', false);
  2437. let maxPage = Math.ceil(this.numConfig / this.limit);
  2438. let list = data.list,
  2439. loadend = list.length < that.limit || that.page >= maxPage;
  2440. let tempArr = that.$util.SplitArray(list, that.tempArr);
  2441. that.$set(that, 'tempArr', tempArr.slice(0, this.numConfig));
  2442. that.loadend = loadend;
  2443. that.loadTitle = loadend ? that.$t(`没有更多内容啦~`) : that.$t(`加载更多`);
  2444. that.page = that.page + 1;
  2445. that.loading = false;
  2446. })
  2447. .catch(res => {
  2448. that.loading = false;
  2449. that.loadTitle = that.$t(`加载更多`);
  2450. });
  2451. },
  2452. goRouter(item) {
  2453. var pages = getCurrentPages();
  2454. var page = (pages[pages.length - 1]).$page.fullPath;
  2455. if (item.link == page) return
  2456. uni.switchTab({
  2457. url: item.link,
  2458. fail(err) {
  2459. uni.redirectTo({
  2460. url: item.link
  2461. })
  2462. }
  2463. })
  2464. },
  2465. goDetail(item) {
  2466. goShopDetail(item, this.$store.state.app.uid).then(res => {
  2467. uni.navigateTo({
  2468. url: `/pages/goods_details/index?id=${item.id}`
  2469. });
  2470. });
  2471. },
  2472. onsollBotton() {
  2473. console.log('????', this.isSortType)
  2474. if (this.isSortType == 0) {
  2475. // this.getGroomList();
  2476. } else {
  2477. this.getGoodsList();
  2478. }
  2479. }
  2480. },
  2481. onReachBottom: function () {
  2482. },
  2483. onPageScroll(e) {
  2484. // #ifdef H5
  2485. if (this.isHeaderSerch) {
  2486. if (e.scrollTop > this.domOffsetTop) {
  2487. this.isFixed = true;
  2488. }
  2489. if (e.scrollTop < this.domOffsetTop) {
  2490. this.$nextTick(() => {
  2491. this.isFixed = false;
  2492. });
  2493. }
  2494. } else {
  2495. this.isFixed = false
  2496. }
  2497. // #endif
  2498. },
  2499. //#ifdef MP
  2500. onShareAppMessage() {
  2501. return {
  2502. title: this.shareInfo.title,
  2503. path: '/pages/index/index'
  2504. };
  2505. },
  2506. //分享到朋友圈
  2507. onShareTimeline: function () {
  2508. return {
  2509. title: this.shareInfo.title,
  2510. imageUrl: this.shareInfo.img
  2511. };
  2512. }
  2513. //#endif
  2514. };
  2515. </script>
  2516. <style lang="scss">
  2517. // page {
  2518. // padding-bottom: 50px;
  2519. // }
  2520. .pictrue_log_class {
  2521. background-color: var(--view-theme);
  2522. }
  2523. .page {
  2524. padding-bottom: 50px;
  2525. }
  2526. .ysize {
  2527. background-size: 100%;
  2528. }
  2529. .fullsize {
  2530. background-size: 100% 100%;
  2531. }
  2532. .repeat {
  2533. background-repeat: repeat;
  2534. }
  2535. .noRepeat {
  2536. background-repeat: no-repeat;
  2537. }
  2538. .privacy-wrapper {
  2539. z-index: 999;
  2540. position: fixed;
  2541. left: 0;
  2542. top: 0;
  2543. width: 100%;
  2544. height: 100%;
  2545. background: #7F7F7F;
  2546. .privacy-box {
  2547. position: absolute;
  2548. left: 50%;
  2549. top: 50%;
  2550. transform: translate(-50%, -50%);
  2551. width: 560rpx;
  2552. padding: 50rpx 45rpx 0;
  2553. background: #fff;
  2554. border-radius: 20rpx;
  2555. .title {
  2556. text-align: center;
  2557. font-size: 32rpx;
  2558. text-align: center;
  2559. color: #333;
  2560. font-weight: 700;
  2561. }
  2562. .content {
  2563. margin-top: 20rpx;
  2564. line-height: 1.5;
  2565. font-size: 26rpx;
  2566. color: #666;
  2567. navigator {
  2568. display: inline-block;
  2569. color: #E93323;
  2570. }
  2571. }
  2572. .btn-box {
  2573. margin-top: 40rpx;
  2574. text-align: center;
  2575. font-size: 30rpx;
  2576. .btn-item {
  2577. height: 82rpx;
  2578. line-height: 82rpx;
  2579. background: linear-gradient(90deg, #F67A38 0%, #F11B09 100%);
  2580. color: #fff;
  2581. border-radius: 41rpx;
  2582. }
  2583. .btn {
  2584. padding: 30rpx 0;
  2585. }
  2586. }
  2587. }
  2588. }
  2589. .error-network {
  2590. position: fixed;
  2591. left: 0;
  2592. top: 0;
  2593. display: flex;
  2594. flex-direction: column;
  2595. align-items: center;
  2596. width: 100%;
  2597. height: 100%;
  2598. padding-top: 40rpx;
  2599. background: #fff;
  2600. image {
  2601. width: 414rpx;
  2602. height: 336rpx;
  2603. }
  2604. .title {
  2605. position: relative;
  2606. top: -40rpx;
  2607. font-size: 32rpx;
  2608. color: #666;
  2609. }
  2610. .con {
  2611. font-size: 24rpx;
  2612. color: #999;
  2613. .label {
  2614. margin-bottom: 20rpx;
  2615. }
  2616. .item {
  2617. margin-bottom: 20rpx;
  2618. }
  2619. }
  2620. .btn {
  2621. display: flex;
  2622. align-items: center;
  2623. justify-content: center;
  2624. width: 508rpx;
  2625. height: 86rpx;
  2626. margin-top: 100rpx;
  2627. border: 1px solid #D74432;
  2628. color: #E93323;
  2629. font-size: 30rpx;
  2630. border-radius: 120rpx;
  2631. }
  2632. }
  2633. .sort-product {
  2634. margin-top: 20rpx;
  2635. .sort-box {
  2636. display: flex;
  2637. width: 100%;
  2638. border-radius: 16rpx;
  2639. padding: 30rpx 0;
  2640. .sort-item {
  2641. width: 20%;
  2642. display: flex;
  2643. flex-direction: column;
  2644. align-items: center;
  2645. justify-content: center;
  2646. flex-shrink: 0;
  2647. image {
  2648. width: 90rpx;
  2649. height: 90rpx;
  2650. border-radius: 50%;
  2651. }
  2652. .txt {
  2653. color: #272727;
  2654. font-size: 24rpx;
  2655. margin-top: 10rpx;
  2656. overflow: hidden;
  2657. white-space: nowrap;
  2658. text-overflow: ellipsis;
  2659. width: 140rpx;
  2660. text-align: center;
  2661. }
  2662. .pictrues {
  2663. width: 90rpx;
  2664. height: 90rpx;
  2665. background: #f8f8f8;
  2666. border-radius: 50%;
  2667. margin: 0 auto;
  2668. }
  2669. .icon-gengduo1 {
  2670. color: #333;
  2671. }
  2672. &.on {
  2673. .txt {
  2674. color: #fc4141;
  2675. }
  2676. image {
  2677. border: 1px solid #fc4141;
  2678. }
  2679. }
  2680. }
  2681. }
  2682. .product-list {
  2683. display: flex;
  2684. flex-wrap: wrap;
  2685. justify-content: space-between;
  2686. margin-top: 30rpx;
  2687. padding: 0 20rpx;
  2688. .product-item {
  2689. position: relative;
  2690. width: 344rpx;
  2691. background: #fff;
  2692. border-radius: 10rpx;
  2693. margin-bottom: 20rpx;
  2694. display: flex;
  2695. flex-direction: column;
  2696. image {
  2697. width: 100%;
  2698. height: 344rpx;
  2699. border-radius: 10rpx 10rpx 0 0;
  2700. }
  2701. .info {
  2702. flex: 1;
  2703. padding: 14rpx 16rpx;
  2704. display: flex;
  2705. flex-direction: column;
  2706. justify-content: space-between;
  2707. .title {
  2708. font-size: 28rpx;
  2709. }
  2710. .price-box {
  2711. font-size: 34rpx;
  2712. font-weight: 700;
  2713. margin-top: 8px;
  2714. color: #fc4141;
  2715. text {
  2716. font-size: 26rpx;
  2717. }
  2718. }
  2719. }
  2720. }
  2721. }
  2722. }
  2723. .emptyBox {
  2724. text-align: center;
  2725. padding-top: 20rpx;
  2726. .tips {
  2727. color: #aaa;
  2728. font-size: 26rpx;
  2729. padding-bottom: 20rpx;
  2730. }
  2731. image {
  2732. width: 414rpx;
  2733. height: 304rpx;
  2734. }
  2735. }
  2736. .site-config {
  2737. margin-top: 40rpx;
  2738. font-size: 24rpx;
  2739. text-align: center;
  2740. color: #666;
  2741. &.fixed {
  2742. position: fixed;
  2743. bottom: 69px;
  2744. left: 0;
  2745. width: 100%;
  2746. }
  2747. }
  2748. .page-footer {
  2749. position: fixed;
  2750. bottom: 0;
  2751. z-index: 30;
  2752. display: flex;
  2753. align-items: center;
  2754. justify-content: space-around;
  2755. width: 100%;
  2756. height: calc(98rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  2757. height: calc(98rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  2758. box-sizing: border-box;
  2759. border-top: solid 1rpx #F3F3F3;
  2760. background-color: #fff;
  2761. box-shadow: 0px 0px 17rpx 1rpx rgba(206, 206, 206, 0.32);
  2762. padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
  2763. padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/
  2764. .foot-item {
  2765. display: flex;
  2766. width: max-content;
  2767. align-items: center;
  2768. justify-content: center;
  2769. flex-direction: column;
  2770. position: relative;
  2771. .count-num {
  2772. position: absolute;
  2773. display: flex;
  2774. justify-content: center;
  2775. align-items: center;
  2776. width: 40rpx;
  2777. height: 40rpx;
  2778. top: 0rpx;
  2779. right: -15rpx;
  2780. color: #fff;
  2781. font-size: 20rpx;
  2782. background-color: #FD502F;
  2783. border-radius: 50%;
  2784. padding: 4rpx;
  2785. }
  2786. }
  2787. .foot-item image {
  2788. height: 50rpx;
  2789. width: 50rpx;
  2790. text-align: center;
  2791. margin: 0 auto;
  2792. }
  2793. .foot-item .txt {
  2794. font-size: 24rpx;
  2795. &.active {}
  2796. }
  2797. }
  2798. </style>