index.vue 65 KB

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