index.vue 50 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814
  1. <template>
  2. <view :class="bgTabVal==2?'fullsize noRepeat':bgTabVal==1?'repeat ysize':'noRepeat ysize'"
  3. :style="'background-color:'+bgColor+';background-image: url('+bgPic+');min-height:'+windowHeight+'px;'" id="home">
  4. <skeleton :show="showSkeleton" :isNodes="isNodes" ref="skeleton" loading="chiaroscuro" selector="skeleton" bgcolor="transparent"></skeleton>
  5. <view v-if="!errorNetwork" :style="{visibility: showSkeleton ? 'hidden' : 'visible'}">
  6. <view class="page-index skeleton" :class="{ bgf: navIndex > 0 }">
  7. <block>
  8. <!-- #ifdef H5 -->
  9. <homeComb v-if="smallPage" class="home-comb" :isScale="isScale" :isMenu="isMenu" :dataConfig="homeCombData" :userInfo="userInfo" :isFixed="isFixed" :isScrolled="isScrolled" @changeDiy="changeDiy"></homeComb>
  10. <view v-for="(item, index) in styleConfig" :key="index">
  11. <block v-if="item.name != 'headerSerch' && item.name != 'tabNav' && item.name != 'shopList' && item.name != 'homeComb' && item.name != 'hotRanking' && item.name != 'pageFoot'">
  12. <component
  13. :is="item.name"
  14. :index="index"
  15. :isFixed="isFixed"
  16. :dataConfig="item"
  17. :tempArr="tempArr"
  18. :userInfo="userInfo"
  19. :tabTitle="navTop"
  20. :navIndex="navIndex"
  21. @changeTab="changeTab"
  22. @detail="goDetail"
  23. v-show="navIndex == 0"
  24. ></component>
  25. </block>
  26. <block v-if="item.name == 'headerSerch'">
  27. <headerSerch
  28. :dataConfig="item"
  29. :tempArr="tempArr"
  30. :userInfo="userInfo"
  31. :tabTitle="navTop"
  32. @changeTab="changeTab"
  33. @detail="goDetail"
  34. ></headerSerch>
  35. </block>
  36. <block v-if="item.name == 'shopList' && hide_mer_status != 1 && navIndex == 0">
  37. <shopList :dataConfig="item"></shopList>
  38. </block>
  39. <block v-if="item.name == 'tabNav'">
  40. <tabNav
  41. :isFixed="isFixed"
  42. :dataConfig="item"
  43. :tempArr="tempArr"
  44. :userInfo="userInfo"
  45. :tabTitle="navTop"
  46. @changeTab="changeTab"
  47. @detail="goDetail"
  48. ></tabNav>
  49. </block>
  50. <block v-if="item.name == 'homeComb' && !smallPage">
  51. <homeComb :isMenu="isMenu" :dataConfig="item" :isFixed="isFixed" :isScrolled="isScrolled" :userInfo="userInfo" @changeDiy="changeDiy"></homeComb>
  52. </block>
  53. <block v-if="item.name == 'hotRanking' && hot_ranking_switch != 0 && navIndex == 0">
  54. <hotRanking :dataConfig="item"></hotRanking>
  55. </block>
  56. </view>
  57. <!-- #endif -->
  58. <!-- #ifdef MP || APP-PLUS -->
  59. <homeComb class="home-comb" v-if="smallPage" :isScale="isScale" :isMenu="isMenu" :dataConfig="homeCombData" :isFixed="isFixed" :isScrolled="isScrolled" :userInfo="userInfo" @changeDiy="changeDiy" @bindHeight="bindHeighta"></homeComb>
  60. <block v-for="(item, index) in styleConfig" :key="index" >
  61. <view v-show="navIndex == 0">
  62. <homeComb v-if="item.name == 'homeComb' && !smallPage" :isMenu="isMenu" :dataConfig="item" :isFixed="isFixed" :isScrolled="isScrolled" :userInfo="userInfo" @changeDiy="changeDiy" @bindHeight="bindHeighta"></homeComb>
  63. <activeParty v-if="item.name == 'activeParty'" :dataConfig="item"></activeParty>
  64. <bargain v-if="item.name == 'bargain'" :dataConfig="item"></bargain>
  65. <blankPage v-if="item.name == 'blankPage'" :dataConfig="item"></blankPage>
  66. <combination v-if="item.name == 'combination'" :dataConfig="item"></combination>
  67. <topic v-if="item.name == 'topic'" :dataConfig="item"></topic>
  68. <coupon v-if="item.name == 'coupon'" :dataConfig="item"></coupon>
  69. <customerService v-if="item.name == 'customerService'" :dataConfig="item"></customerService>
  70. <goodList v-if="item.name == 'goodList'" :dataConfig="item" @detail="goDetail"></goodList>
  71. <guide v-if="item.name == 'guide'" :dataConfig="item"></guide>
  72. <liveBroadcast v-if="item.name == 'liveBroadcast'" :dataConfig="item"></liveBroadcast>
  73. <menus :class="isMenu ? 'transform-view' : ''" v-if="item.name == 'menus'" :dataConfig="item"></menus>
  74. <news v-if="item.name == 'news'" :dataConfig="item"></news>
  75. <presellList v-if="item.name == 'presellList'" :dataConfig="item"></presellList>
  76. <plantList v-if="item.name == 'plantList'" :dataConfig="item"></plantList>
  77. <hotRanking v-if="item.name == 'hotRanking' && hot_ranking_switch != 0" :dataConfig="item"></hotRanking>
  78. <promotionList v-if="item.name == 'promotionList'" :dataConfig="item" @changeTab="changeTab" :tempArr="tempArr" @detail="goDetail"></promotionList>
  79. <richText v-if="item.name == 'richText'" :dataConfig="item"></richText>
  80. <seckill v-if="item.name == 'seckill'" :dataConfig="item"></seckill>
  81. <swiperBg v-if="item.name == 'swiperBg'" :dataConfig="item"></swiperBg>
  82. <pictureCube v-if="item.name == 'pictureCube'" :dataConfig="item"></pictureCube>
  83. <titles v-if="item.name == 'titles'" :dataConfig="item"></titles>
  84. <shopList v-if="item.name == 'shopList' && hide_mer_status != 1" :dataConfig="item"></shopList>
  85. </view>
  86. <headerSerch v-if="item.name == 'headerSerch'" :dataConfig="item" :userInfo="userInfo"></headerSerch>
  87. <tabNav v-if="item.name == 'tabNav'" :dataConfig="item" class="tabNav" :tabTitle="navTop"
  88. @bindHeight="bindHeighta" @changeTab="changeTab" :isFixed="isFixed"></tabNav>
  89. </block>
  90. <!-- #endif -->
  91. <view class="main" v-show="navIndex == 0">
  92. <!-- 首页推荐 -->
  93. <view class="index-product-wrapper">
  94. <!-- 首发新品 -->
  95. <recommend v-if="recommend_switch == 1" :hostProduct="hostProduct" :indexP="true" :isLogin="isLogin"></recommend>
  96. <view class="loadingicon acea-row row-center-wrapper" v-if="hostProduct.length > 0">
  97. <text class="loading iconfont icon-jiazai" :hidden="hotLoading == false"></text>
  98. {{ hotTitle }}
  99. </view>
  100. </view>
  101. </view>
  102. <view v-show="navIndex == 0" class="loadingicon acea-row row-center-wrapper" v-if="tempArr.length && styleConfig[styleConfig.length - 1].name == 'promotionList'">
  103. <text class="loading iconfont icon-jiazai" :hidden="loading == false"></text>
  104. {{ loadTitle }}
  105. </view>
  106. </block>
  107. <!-- 分类页 -->
  108. <view class="productList" v-if="navIndex > 0" :style="'margin-top:' + prodeuctTop + 'px;'">
  109. <view class="sort acea-row" v-if="sortList.length>0" :style="{ marginTop: sortMarTop + 'px' }">
  110. <navigator
  111. hover-class="none"
  112. v-if="index < 9"
  113. :url="'/pages/columnGoods/goods_list/index?id=' + item.store_category_id + '&title=' + item.cate_name"
  114. class="item"
  115. v-for="(item, index) in sortList"
  116. :key="item.store_category_id"
  117. >
  118. <view class="pictrue">
  119. <easy-loadimage :image-src="item.pic"></easy-loadimage>
  120. <view v-if="item.border_pic" :style="{ backgroundImage: `url(${item.border_pic})` }" class="border-picture"></view>
  121. </view>
  122. <view class="text">{{ item.cate_name }}</view>
  123. </navigator>
  124. <view class="item" @click="bindMore" v-if="sortList.length >= 9">
  125. <view class="pictrues acea-row row-center-wrapper"><text class="iconfont icon-gengduo1"></text></view>
  126. <view class="text" style="margin-top: 22rpx;">更多</view>
  127. </view>
  128. </view>
  129. <block v-if="sortProduct.length > 0">
  130. <view class="list acea-row row-between-wrapper">
  131. <navigator @tap="goDetails(item)" class="item" v-for="(item, index) in sortProduct" :key="item.product_id">
  132. <view class="pictrue">
  133. <easy-loadimage :image-src="item.image"></easy-loadimage>
  134. <view v-if="item.border_pic" :style="{ backgroundImage: `url(${item.border_pic})` }" class="border-picture"></view>
  135. </view>
  136. <view class="text">
  137. <view class="name line1">
  138. <text class="name_text line2">{{ item.store_name }}</text>
  139. </view>
  140. <view class="acea-row row-middle">
  141. <view class="money font-color-red">
  142. <text class="num">{{ item.price }}</text>
  143. </view>
  144. </view>
  145. <view class="item_tags acea-row">
  146. <text v-if="item.merchant.type_name && item.product_type == 0" class="font-bg-red">{{ item.merchant.type_name }}</text>
  147. <text v-else-if="item.merchant.is_trader && item.product_type == 0" class="font-bg-red">自营</text>
  148. <text v-if="item.product_type != 0" :class="'font_bg-red type' + item.product_type">
  149. {{ item.product_type == 1 ? '秒杀' : item.product_type == 2 ? '预售' : item.product_type == 3 ? '助力' : item.product_type == 4 ? '拼团' : '' }}
  150. </text>
  151. <text class="tags_item ticket" v-if="item.issetCoupon">领券</text>
  152. <text class="tags_item delivery" v-if="item.delivery_free == 1">包邮</text>
  153. </view>
  154. </view>
  155. </navigator>
  156. <view class="loadingicon acea-row row-center-wrapper" v-if="sortProduct.length > 0 || sortProductLoading">
  157. <text class="loading iconfont icon-jiazai" :hidden="loading == false"></text>
  158. {{ loadTitle }}
  159. </view>
  160. </view>
  161. </block>
  162. <block v-if="sortProduct.length == 0">
  163. <view class="noCommodity">
  164. <view class="pictrue" style="margin: 0 auto;">
  165. <image src="/static/images/noCart.png"></image>
  166. <view>暂无商品,去看点什么吧</view>
  167. </view>
  168. <recommend :hostProduct="hostProduct"></recommend>
  169. </view>
  170. </block>
  171. </view>
  172. <!-- #ifdef H5 -->
  173. <a v-if="beian_sn" href="https://beian.miit.gov.cn/#/Integrated/index" class="copyRight">{{beian_sn}}</a>
  174. <!-- #endif -->
  175. <!-- #ifndef H5 -->
  176. <view v-if="beian_sn" class="copyRight">{{beian_sn}}</view>
  177. <!-- #endif -->
  178. </view>
  179. </view>
  180. <view v-else>
  181. <view class="error-network">
  182. <image src="/static/images/error-network.png"></image>
  183. <view class="title">网络连接断开</view>
  184. <view class="con">
  185. <view class="label">请检查情况:</view>
  186. <view class="item">· 在设置中是否已开启网络权限</view>
  187. <view class="item">· 当前是否处于弱网环境</view>
  188. <view class="item">· 版本是否过低,升级试试吧</view>
  189. </view>
  190. <view class="btn" @click="reconnect">重新连接</view>
  191. </view>
  192. </view>
  193. <!-- #ifdef APP-PLUS -->
  194. <view class="privacy-wrapper" v-if="privacyStatus">
  195. <view class="privacy-box">
  196. <view class="title">用户协议与隐私政策</view>
  197. <view class="content">
  198. 请务必审慎阅读、充分理解“用户协议 与 隐私政策”各条款,包括但不限于:为了 向你提供即时通讯、内容分享等服务,我 们需要收集你的设备信息、操作日志等个
  199. 人信息。你可以在“设置”中查看、变更、 删除个人信息并管理你的授权。
  200. <br />
  201. 你可以阅读
  202. <navigator url="/pages/users/user_about/index?from=sys_user_agree">《用户协议》</navigator>与<navigator url="/pages/users/user_about/index?from=sys_userr_privacy">《隐私政策》</navigator>
  203. 了解 详细信息。如你同意,请点击“我同意”开始接受我们的服务。
  204. </view>
  205. <view class="btn-box">
  206. <view class="btn-item" @click="confirmApp">我同意</view>
  207. <view class="btn" @click="closeModel">随便逛逛</view>
  208. </view>
  209. </view>
  210. </view>
  211. <!-- #endif -->
  212. <!-- 发送给朋友图片 -->
  213. <view class="share-box" v-if="isIntegral">
  214. <!-- #ifndef H5 -->
  215. <image src="/static/images/share-info.png" @click="closeShare"></image>
  216. <!-- #endif -->
  217. <!-- #ifdef H5 -->
  218. <image src="/static/images/share-info-wechat.png" @click="closeShare"></image>
  219. <!-- #endif -->
  220. </view>
  221. <!-- 优惠券弹窗 -->
  222. <view class="coupon_popups" v-if="showCoupon">
  223. <view class="bg"></view>
  224. <view class="con" :style="{ 'background-image': `url(${domain}/static/diy/couponWindow${keyColor}.png)` }">
  225. <scroll-view scroll-y="true" >
  226. <view v-for="(item, index) in couponArray" class="item">
  227. <view class="left">
  228. <view class="price">¥ <text>{{item.coupon_price}}</text></view>
  229. <view class="max_price" v-if="item.use_min_price > 0">满{{item.use_min_price}}可用</view>
  230. <view class="max_price" v-else>无门槛</view>
  231. </view>
  232. <view class="right">
  233. <view class="time line1" v-if="item.coupon_type">有效期{{item.use_start_time}} - {{item.use_end_time}}</view>
  234. <text class="coupon_type">{{couponTypeMsg[item.type] || '店铺券'}}</text>
  235. <navigator :url="'/pages/columnGoods/goods_coupon_list/index?coupon_id='+item.coupon_id" class='bnt1 b-color' hover-class="none"><text class="title titleSize">{{item.title}}</text>
  236. <view class="title titleColor">
  237. 有效期:{{item.use_start_time}}-{{item.use_end_time}}
  238. </view>
  239. </navigator>
  240. <!-- <view>{{item.start_time}}-{{item.end_time}}</view> -->
  241. </view>
  242. </view>
  243. </scroll-view>
  244. <view class="text">优惠券已放入您的账户中,点击“优惠券”去使用</view>
  245. <view class='iconfont icon-guanbi3' @click="showCoupon = false"></view>
  246. </view>
  247. </view>
  248. <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" :isGoIndex="false"></authorize>
  249. <!-- #ifndef H5 -->
  250. <passwordPopup></passwordPopup>
  251. <!-- #endif -->
  252. <view class="foot" v-if="newData.status && newData.status.status">
  253. <view class="page-footer" id="target" :style="{'background-color':newData.bgColor.color[0].item}">
  254. <view class="foot-item" v-for="(item,index) in newData.menuList" :key="index"
  255. @click="goRouter(item)">
  256. <block v-if="item.link == activeRouter">
  257. <image :src="item.imgList[0]"></image>
  258. <view class="txt" :style="{color:newData.activeTxtColor.color[0].item}">{{item.name}}
  259. </view>
  260. </block>
  261. <block v-else>
  262. <image :src="item.imgList[1]"></image>
  263. <view class="txt" :style="{color:newData.txtColor.color[0].item}">{{item.name}}</view>
  264. </block>
  265. </view>
  266. </view>
  267. </view>
  268. <view v-if="overflow" class="overflow-mask" @touchmove.stop.prevent="() => {}"></view>
  269. </view>
  270. </template>
  271. <script>
  272. // +----------------------------------------------------------------------
  273. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  274. // +----------------------------------------------------------------------
  275. // | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
  276. // +----------------------------------------------------------------------
  277. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  278. // +----------------------------------------------------------------------
  279. // | Author: CRMEB Team <admin@crmeb.com>
  280. // +----------------------------------------------------------------------
  281. var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
  282. let app = getApp();
  283. import { getUserInfo } from '@/api/user.js';
  284. import { getDiy, getPageDiy, getIndexData, getAppVersion ,getUserCoupons} from '@/api/api.js';
  285. import { getNavigation } from '@/api/public.js';
  286. // #ifdef MP-WEIXIN
  287. import { getTemlIds } from '@/api/api.js';
  288. import { SUBSCRIBE_MESSAGE, TIPS_KEY } from '@/config/cache';
  289. // #endif
  290. import { getShare, getconfig } from '@/api/public.js';
  291. import { goShopDetail } from '@/libs/order.js';
  292. import { mapGetters } from 'vuex';
  293. import { getProductslist, getProductHot, storeCategory } from '@/api/store.js';
  294. import { initiateAssistApi } from '@/api/activity.js';
  295. import { openBargainSubscribe } from '@/utils/SubscribeMessage.js';
  296. import { setVisit, spread } from '@/api/user.js';
  297. import recommend from '@/components/recommend';
  298. // #ifndef H5
  299. import passwordPopup from '@/components/passwordPopup';
  300. // #endif
  301. // #ifdef H5
  302. import mConfig from './component/index.js';
  303. // #endif
  304. import authorize from '@/components/Authorize';
  305. // #ifdef MP || APP-PLUS
  306. import activeParty from './component/activeParty';
  307. import headerSerch from './component/headerSerch';
  308. import homeComb from './component/homeComb';
  309. import coupon from './component/coupon';
  310. import bargain from './component/bargain';
  311. import blankPage from './component/blankPage';
  312. import combination from './component/combination';
  313. import customerService from './component/customerService';
  314. import goodList from './component/goodList';
  315. import guide from './component/guide';
  316. import liveBroadcast from './component/liveBroadcast';
  317. import menus from './component/menus';
  318. import news from './component/news';
  319. import topic from './component/topic';
  320. import presellList from './component/presellList';
  321. import plantList from './component/plantList';
  322. import pictureCube from './component/pictureCube'
  323. import shopList from './component/shopList';
  324. import richText from './component/richText';
  325. import seckill from './component/seckill';
  326. import swiperBg from './component/swiperBg';
  327. import tabNav from './component/tabNav';
  328. import titles from './component/titles';
  329. import hotRanking from "./component/hotRanking.vue";
  330. // #endif
  331. import { silenceBindingSpread, configMap, isWeixin } from '@/utils/index';
  332. import history from '@/mixins/history';
  333. import shareScence from '@/libs/spread';
  334. import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
  335. import {getNewPeopleCouponLst} from '@/api/activity.js'
  336. import { HTTP_REQUEST_URL } from '@/config/app';
  337. export default {
  338. computed: configMap({hide_mer_status:0,recommend_switch:0,beian_sn:'',share_title:'',site_name:'',hot_ranking_switch:0,navigation: {}},
  339. mapGetters(['isLogin','uid','keyColor'])),
  340. mixins: [history],
  341. components: {
  342. easyLoadimage,
  343. recommend,
  344. authorize,
  345. // #ifndef H5
  346. passwordPopup,
  347. // #endif
  348. // #ifdef H5
  349. ...mConfig,
  350. // #endif
  351. // #ifdef MP || APP-PLUS
  352. activeParty,
  353. headerSerch,
  354. homeComb,
  355. bargain,
  356. coupon,
  357. blankPage,
  358. combination,
  359. customerService,
  360. goodList,
  361. guide,
  362. liveBroadcast,
  363. menus,
  364. news,
  365. topic,
  366. presellList,
  367. plantList,
  368. pictureCube,
  369. shopList,
  370. richText,
  371. seckill,
  372. swiperBg,
  373. tabNav,
  374. titles,
  375. hotRanking
  376. // #endif
  377. },
  378. data() {
  379. return {
  380. domain: HTTP_REQUEST_URL,
  381. couponTypeMsg:{
  382. 10: '通用券',
  383. 11: '品类券',
  384. 12: '跨店券'
  385. },
  386. styleConfig: [],
  387. showSkeleton: true, //骨架屏显示隐藏
  388. isNodes: 0, //控制什么时候开始抓取元素节点,只要数值改变就重新抓取
  389. privacyStatus: false,
  390. errorNetwork: false,
  391. ad: {home_ad_pic: ''},
  392. userInfo: {},
  393. loading: false,
  394. isAuto: false, //没有授权的不会自动授权
  395. isShowAuth: false, //是否隐藏授权
  396. statusBarHeight: statusBarHeight,
  397. navIndex: 0,
  398. navTop: [],
  399. subscribe: false,
  400. followUrl: '',
  401. followHid: true,
  402. followCode: false,
  403. imgUrls: [{url:'',pic:'',id: '',name:''}],
  404. hot: [],
  405. sortList: [],
  406. menus: [{url:'',pic:'',id: '',name:''},{url:'',pic:'',id: '',name:''},{url:'',pic:'',id: '',name:''},{url:'',pic:'',id: '',name:''},{url:'',pic:'',id: '',name:''},{url:'',pic:'',id: '',name:''},{url:'',pic:'',id: '',name:''},{url:'',pic:'',id: '',name:''},{url:'',pic:'',id: '',name:''},{url:'',pic:'',id: '',name:''}],
  407. window: false,
  408. navH: '',
  409. couponList: [],
  410. marTop: 0,
  411. loadend: false,
  412. loading: false,
  413. loadTitle: '加载更多',
  414. sortProduct: [],
  415. where: {
  416. pid: 0,
  417. page: 1,
  418. limit: 6
  419. },
  420. is_switch: true,
  421. hostProduct: [],
  422. hotPage: 1,
  423. hotLimit: 30,
  424. hotScroll: true,
  425. hotLoading: false,
  426. hotTitle: '加载更多',
  427. explosiveMoney: [],
  428. prodeuctTop: 0,
  429. pinkInfo: '',
  430. searchH: 0,
  431. domOffsetTop: 50,
  432. // #ifdef MP || APP-PLUS
  433. isFixed: true,
  434. // #endif
  435. // #ifdef H5
  436. isFixed: false,
  437. // #endif
  438. isScrolled: false,
  439. scrolled: false,
  440. goodScroll: true, //精品推荐开关
  441. params: {
  442. //精品推荐分页
  443. page: 1,
  444. limit: 10
  445. },
  446. tempArr: [], //精品推荐临时数组
  447. numConfig: 0,
  448. pageInfo: '', // 精品推荐全数据
  449. swiperCur: 0,
  450. d: '',
  451. h: '',
  452. m: '',
  453. s: '',
  454. sum_h: '',
  455. sortMarTop: 0,
  456. globalDatas: {},
  457. // #ifdef MP || APP-PLUS
  458. mpHeight: 108,
  459. // #endif
  460. // #ifndef MP || APP-PLUS
  461. mpHeight: 0,
  462. // #endif
  463. currSpid: '',
  464. _options:{},
  465. isIntegral: false,
  466. appUpdate: {},
  467. sortMpTop: 0,
  468. bgColor: '',
  469. bgPic: '',
  470. bgTabVal: '',
  471. windowHeight: 0,
  472. domHeight: 0,
  473. isHeaderSerch: false,
  474. showCoupon: false,
  475. couponArray: [],
  476. smallPage: false,
  477. isMenu: false,
  478. isScale: false,
  479. homeCombData: {},
  480. appScroll: 0,
  481. footerStatus: false,
  482. newData: {},
  483. activeRouter: '',
  484. countNum: 0,
  485. overflow: false
  486. };
  487. },
  488. /**
  489. * 用户点击右上角分享
  490. */
  491. // #ifdef MP
  492. onShareAppMessage: function() {
  493. let that = this;
  494. wx.showShareMenu({
  495. withShareTicket: true,
  496. menus: ['shareAppMessage', 'shareTimeline']
  497. });
  498. return {
  499. title: that.share_title,
  500. path: '/pages/index/index?spid=' + that.uid+'&&order_id='+uni.getStorageSync('order_id')
  501. };
  502. },
  503. onShareTimeline: function() {
  504. let that = this;
  505. return {
  506. title: that.share_title,
  507. query: {
  508. spid: that.uid,
  509. order_id:uni.getStorageSync('order_id')
  510. },
  511. imageUrl: ''
  512. };
  513. },
  514. // #endif
  515. onLoad(options) {
  516. if(options.order_id){
  517. uni.setStorageSync('order_id',options.order_id)
  518. }
  519. let that = this
  520. this._options = options;
  521. // #ifdef APP-PLUS
  522. const pages = getCurrentPages();
  523. const page = pages[pages.length - 1];
  524. const currentWebview = page.$getAppWebview();
  525. currentWebview.setStyle({
  526. pullToRefresh: {
  527. support: !that.isSupport,
  528. style: plus.os.name === 'Android' ? 'circle' : 'default'
  529. }
  530. });
  531. that.isSupport = !that.isSupport;
  532. that.appVersionConfig(); //APP版本检测
  533. // #endif
  534. that.$nextTick(function() {
  535. uni.getSystemInfo({
  536. success: function(res) {
  537. that.windowHeight = res.windowHeight;
  538. }
  539. });
  540. })
  541. that.pageLoad(options);
  542. },
  543. created(options) {
  544. let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
  545. let curRoute = routes[routes.length - 1].route //获取当前页面路由
  546. this.activeRouter = '/' + curRoute
  547. },
  548. onShow() {
  549. let that = this
  550. that.getConfig();
  551. that.isIntegral = uni.getStorageSync('isIntegral')
  552. // #ifdef APP-PLUS
  553. if(that.appUpdate.openUpgrade == '1'){
  554. that.alertAppUpdate();
  555. }
  556. // #endif
  557. that.getNav()
  558. that.loadCoupon()
  559. },
  560. onHide() {
  561. uni.setStorageSync('isIntegral',false)
  562. },
  563. onReady() {
  564. },
  565. watch: {
  566. globalDatas(nVal, oVal) {
  567. // #ifdef H5
  568. this.ShareInfo(nVal);
  569. // #endif
  570. },
  571. privacyStatus(n) {
  572. // if (n) {
  573. // uni.hideTabBar();
  574. // } else {
  575. // uni.showTabBar();
  576. // }
  577. },
  578. },
  579. onPullDownRefresh(){
  580. this.overflow = true;
  581. this.reconnect();
  582. },
  583. methods: {
  584. loadCoupon(){
  585. if(!this.showCoupon && !uni.getStorageSync('show_coupon') && uni.getStorageSync('is_new_user')){
  586. getNewPeopleCouponLst().then(res => {
  587. this.couponArray = res.data;
  588. setTimeout(() => {
  589. this.showCoupon = this.couponArray.length > 0;
  590. uni.setStorageSync('show_coupon', '1')
  591. }, 1500);
  592. })
  593. }
  594. },
  595. pageLoad(options){
  596. let that = this;
  597. if (options.spid) {
  598. that.currSpid = options.spid;
  599. app.globalData.spid = options.spid;
  600. }
  601. // #ifdef APP-PLUS
  602. try {
  603. let val = uni.getStorageSync('privacyStatus') || true;
  604. if (!val) {
  605. this.privacyStatus = true;
  606. }
  607. } catch (e) {}
  608. this.snycNetWork();
  609. // #endif
  610. // #ifdef MP
  611. if (options.scene) {
  612. let value = that.$util.getUrlParams(decodeURIComponent(options.scene));
  613. if (value.id) options.id = value.id;
  614. //记录推广人uid
  615. if (value.spid) {
  616. that.currSpid = value.spid;
  617. app.globalData.spid = value.spid;
  618. }
  619. }
  620. // #endif
  621. shareScence(that.currSpid, that.isLogin);
  622. this.isLogin && silenceBindingSpread();
  623. this.getIndexConfig()
  624. Promise.all([
  625. this.diyData(0),
  626. ]);
  627. if (this.isLogin) {
  628. this.getUserInfo();
  629. // #ifdef MP
  630. this.getHistory();
  631. // #endif
  632. }
  633. },
  634. closeShare(){
  635. uni.setStorageSync('isIntegral',false);
  636. this.isIntegral = uni.getStorageSync('isIntegral');
  637. },
  638. bindHeighta(data) {
  639. // #ifdef APP-PLUS
  640. this.sortMpTop = data.top + data.height;
  641. // #endif
  642. },
  643. // 重新链接
  644. reconnect() {
  645. uni.getNetworkType({
  646. success: res => {
  647. this.errorNetwork = res.networkType === 'none';
  648. if(!this.errorNetwork){
  649. this.pageLoad(this._options);
  650. }else{
  651. uni.stopPullDownRefresh();
  652. that.overflow = false;
  653. }
  654. }
  655. });
  656. },
  657. getNav(){
  658. getNavigation().then(res => {
  659. this.newData = res.data
  660. if (this.newData.status && this.newData.status.status) {
  661. uni.hideTabBar()
  662. } else {
  663. uni.showTabBar()
  664. }
  665. })
  666. },
  667. // #ifdef APP-PLUS
  668. snycNetWork() {
  669. uni.getNetworkType({
  670. success: res => {
  671. this.errorNetwork = res.networkType === 'none';
  672. }
  673. });
  674. },
  675. // 同意隐私协议
  676. confirmApp() {
  677. uni.setStorageSync('privacyStatus', true);
  678. this.privacyStatus = false;
  679. },
  680. // 关闭 Model
  681. closeModel() {
  682. this.privacyStatus = false;
  683. },
  684. // #endif
  685. // 对象转数组
  686. objToArr(data) {
  687. let obj = Object.keys(data).sort();
  688. let m = obj.map(key => data[key]);
  689. return m;
  690. },
  691. goRouter(item) {
  692. var pages = getCurrentPages();
  693. var page = (pages[pages.length - 1]).$page.fullPath;
  694. if (item.link == page) return
  695. uni.switchTab({
  696. url: item.link,
  697. fail(err) {
  698. uni.redirectTo({
  699. url: item.link
  700. })
  701. }
  702. })
  703. },
  704. diyData(id) {
  705. let that = this;
  706. let data = {
  707. id: id
  708. }
  709. that.styleConfig = []
  710. getDiy(data).then(res => {
  711. setTimeout(() => {
  712. that.isNodes++;
  713. }, 0);
  714. that.errorNetwork = false
  715. uni.setNavigationBarTitle({
  716. title: res.data.title
  717. });
  718. let data = res.data;
  719. if (data.is_bg_color) {
  720. that.bgColor = data.color_picker
  721. }
  722. if (data.is_bg_pic) {
  723. that.bgPic = data.bg_pic
  724. that.bgTabVal = data.bg_tab_val
  725. }
  726. that.styleConfig = that.objToArr(res.data.value);
  727. that.styleConfig.forEach((item, index, arr) => {
  728. if (item.name == 'headerSerch' || item.name == 'homeComb') {
  729. that.isHeaderSerch = true
  730. if(item.name == 'homeComb'){
  731. that.homeCombData = item
  732. that.smallPage = true;
  733. }
  734. }
  735. if (item.name == 'pageFoot') {
  736. if (item.status && item.status.status) {
  737. this.newData = item
  738. setTimeout((e) => {
  739. that.$set(that, 'footerStatus', true);
  740. }, 50)
  741. }
  742. uni.setStorageSync('FOOTER_BAR', item.status && item.status.status ? true : false)
  743. item.menuList.map((path, index) => {
  744. if (path.link === '/pages/order_addcart/order_addcart') {
  745. uni.setStorageSync('FOOTER_ADDCART', index)
  746. }
  747. })
  748. arr.splice(index, 1);
  749. }
  750. if(item.name == 'menus'){
  751. that.isMenu = true;
  752. }
  753. that.get_host_product()
  754. uni.pageScrollTo({
  755. scrollTop: 0,
  756. })
  757. uni.stopPullDownRefresh();
  758. that.overflow = false;
  759. });
  760. });
  761. },
  762. changeDiy(id) {
  763. let that = this;
  764. if(id){
  765. that.styleConfig = []
  766. getPageDiy({id: id}).then(res => {
  767. uni.setNavigationBarTitle({
  768. title: res.data.title
  769. });
  770. that.isScale = true
  771. let data = res.data;
  772. if (data.is_bg_color) {
  773. that.bgColor = data.color_picker
  774. }
  775. if (data.is_bg_pic) {
  776. that.bgPic = data.bg_pic
  777. that.bgTabVal = data.bg_tab_val
  778. }
  779. that.styleConfig = that.objToArr(res.data.value);
  780. that.styleConfig.forEach((item, index, arr) => {
  781. if (item.name == 'headerSerch' || item.name == 'homeComb' || item.name == 'tabNav') {
  782. that.styleConfig.splice(index, 1);
  783. }
  784. if(item.name == 'menus'){
  785. that.isMenu = true;
  786. }
  787. });
  788. that.isHeaderSerch = true
  789. that.isScale = true
  790. uni.pageScrollTo({
  791. scrollTop: 0,
  792. })
  793. }).catch(err => {
  794. that.styleConfig = []
  795. });
  796. }else{
  797. that.diyData(0)
  798. that.isScale = false
  799. }
  800. },
  801. // 微信登录回调
  802. onLoadFun: function(e) {
  803. this.isShowAuth = false;
  804. },
  805. // #ifdef APP-PLUS
  806. appVersionConfig() {
  807. var that = this;
  808. //app升级
  809. // 获取本地应用资源版本号
  810. getAppVersion().then(res => {
  811. that.$set(that.appUpdate, 'androidAddress', res.data.androidAddress);
  812. that.$set(that.appUpdate, 'appVersion', res.data.appVersion);
  813. that.$set(that.appUpdate, 'iosAddress', res.data.iosAddress);
  814. that.$set(that.appUpdate, 'openUpgrade', res.data.openUpgrade);
  815. plus.runtime.getProperty(plus.runtime.appid, function(inf) {
  816. let nowVersion = (inf.version).split('.').join('');
  817. let appVersion = (res.data.appVersion).split('.').join('');
  818. that.$set(that.appUpdate, 'alert', appVersion > nowVersion);
  819. that.alertAppUpdate();
  820. });
  821. })
  822. },
  823. alertAppUpdate(){
  824. if(this.appUpdate.alert) {
  825. uni.getSystemInfo({
  826. success: (res) => {
  827. uni.showModal({
  828. title: '更新提示',
  829. content: '发现新版本,是否前去下载?',
  830. showCancel: this.appUpdate.openUpgrade != '1',
  831. cancelColor: '#eeeeee',
  832. confirmColor: '#FF0000',
  833. success:(response)=> {
  834. if (response.confirm) {
  835. switch (res.platform) {
  836. case "android":
  837. plus.runtime.openURL(this
  838. .appUpdate
  839. .androidAddress);
  840. break;
  841. case "ios":
  842. plus.runtime.openURL(encodeURI(
  843. this.appUpdate
  844. .iosAddress));
  845. break;
  846. }
  847. }
  848. }
  849. });
  850. }
  851. })
  852. }
  853. },
  854. // #endif
  855. getConfig() {
  856. // 获取配置
  857. getconfig()
  858. .then(res => {
  859. let self = this;
  860. this.globalDatas = res.data;
  861. uni.$emit('configData', res.data);
  862. })
  863. .catch(err => {});
  864. },
  865. // 分类页更多
  866. bindMore() {
  867. console.log(this.navTop[this.navIndex]);
  868. try {
  869. uni.setStorageSync('storeIndex', this.navTop[this.navIndex].pid);
  870. uni.switchTab({
  871. url: '/pages/goods_cate/goods_cate'
  872. });
  873. } catch (e) {}
  874. },
  875. goDetails(item) {
  876. goShopDetail(item, this.uid).then(res => {
  877. if (this.isLogin) {
  878. initiateAssistApi(item.activity_id)
  879. .then(res => {
  880. let id = res.data.product_assist_set_id;
  881. uni.hideLoading();
  882. // #ifndef MP
  883. uni.navigateTo({
  884. url: '/pages/activity/assist_detail/index?id=' + id
  885. });
  886. // #endif
  887. // #ifdef MP
  888. openBargainSubscribe()
  889. .then(res => {
  890. uni.hideLoading();
  891. uni.navigateTo({
  892. url: '/pages/activity/assist_detail/index?id=' + id
  893. });
  894. })
  895. .catch(err => {
  896. uni.hideLoading();
  897. });
  898. // #endif
  899. })
  900. .catch(err => {
  901. uni.showToast({
  902. title: err,
  903. icon: 'none'
  904. });
  905. });
  906. } else {
  907. this.isAuto = true;
  908. this.isShowAuth = true
  909. }
  910. });
  911. },
  912. /**
  913. * 获取个人用户信息
  914. */
  915. getUserInfo: function() {
  916. let that = this;
  917. getUserInfo().then(res => {
  918. that.userInfo = res.data;
  919. });
  920. },
  921. // 记录会员访问
  922. setVisit() {
  923. setVisit({
  924. url: '/pages/index/index'
  925. }).then(res => {
  926. console.log(res);
  927. });
  928. },
  929. // 导航分类切换
  930. changeTab(e) {
  931. let self = this;
  932. if (this.navIndex == e.index) return;
  933. this.navIndex = e.index;
  934. if (e.index > 0) {
  935. storeCategory({
  936. pid: e.pid
  937. }).then(res => {
  938. this.sortList = res.data.length > 9 ? res.data.splice(0, 9) : res.data;
  939. if (this.sortList.length > 0) {
  940. this.where.pid = e.pid;
  941. this.where.page = 1;
  942. this.loadend = false;
  943. this.loading = false;
  944. this.sortProduct = [];
  945. this.get_product_list();
  946. uni.pageScrollTo({
  947. scrollTop: 0,
  948. })
  949. }
  950. });
  951. self.sortMarTop = 10;
  952. }
  953. },
  954. //分类产品
  955. get_product_list: function() {
  956. let that = this;
  957. if (that.loading) return;
  958. that.loading = true;
  959. that.loadTitle = '';
  960. getProductslist(that.where)
  961. .then(res => {
  962. let list = res.data.list;
  963. let productList = that.$util.SplitArray(list, that.sortProduct);
  964. let loadend = list.length < that.where.limit;
  965. that.loadend = loadend;
  966. that.loading = false;
  967. that.loadTitle = loadend ? '已全部加载' : '加载更多';
  968. that.$set(that, 'sortProduct', productList);
  969. that.$set(that.where, 'page', that.where.page + 1);
  970. })
  971. .catch(err => {
  972. that.loading = false;
  973. that.loadTitle = '加载更多';
  974. });
  975. },
  976. /**
  977. * 获取我的推荐
  978. */
  979. get_host_product: function() {
  980. let that = this;
  981. let num = that.hotLimit;
  982. if (!that.hotScroll) return;
  983. if (that.hotLoading) return;
  984. that.hotLoading = true;
  985. that.hotTitle = '';
  986. getProductHot(that.hotPage, that.hotLimit).then(res => {
  987. let list = res.data.list;
  988. let productList = that.$util.SplitArray(list, that.hostProduct);
  989. let hotScroll = list.length <= num && list.length != 0;
  990. that.hotScroll = hotScroll;
  991. that.hotLoading = false;
  992. that.hotTitle = !hotScroll ? '已全部加载' : '加载更多';
  993. that.$set(that, 'hostProduct', productList);
  994. that.$set(that, 'hotPage', that.hotPage + 1);
  995. });
  996. },
  997. // 首页数据
  998. getIndexConfig: function() {
  999. let that = this;
  1000. getIndexData().then(res => {
  1001. that.$set(that, 'imgUrls', res.data.banner);
  1002. that.$set(that, 'menus', res.data.menu);
  1003. that.$set(that, 'hot', res.data.hot);
  1004. that.$set(that, 'ad', res.data.ad);
  1005. res.data.category.unshift({
  1006. cate_name: '首页'
  1007. });
  1008. that.$set(that, 'navTop', res.data.category);
  1009. // #ifdef H5
  1010. that.subscribe = res.data.subscribe;
  1011. // #endif
  1012. // 小程序判断用户是否授权;
  1013. // #ifdef MP
  1014. uni.getSetting({
  1015. success(res) {
  1016. if (!res.authSetting['scope.userInfo']) {
  1017. that.window = that.couponList.length ? true : false;
  1018. } else {
  1019. that.window = false;
  1020. }
  1021. }
  1022. });
  1023. // #endif
  1024. // #ifndef MP
  1025. if (that.isLogin) {
  1026. that.window = false;
  1027. } else {
  1028. that.window = that.couponList.length ? true : false;
  1029. }
  1030. // #endif
  1031. that.reloadData();
  1032. });
  1033. },
  1034. reloadData() {
  1035. setTimeout(() => {
  1036. this.showSkeleton = false
  1037. }, 500)
  1038. },
  1039. // 授权关闭
  1040. authColse: function(e) {
  1041. this.isShowAuth = e;
  1042. },
  1043. // 首发新品详情
  1044. goDetail(item) {
  1045. if (item.activity && item.activity.type === '2' && !this.isLogin) {
  1046. // #ifdef H5
  1047. uni.showModal({
  1048. title: '提示',
  1049. content: '您未登录,请登录!',
  1050. success: function(res) {
  1051. if (res.confirm) {
  1052. uni.navigateTo({
  1053. url: '/pages/users/login/index'
  1054. });
  1055. } else if (res.cancel) {
  1056. }
  1057. }
  1058. });
  1059. // #endif
  1060. // #ifdef MP
  1061. this.$set(this, 'isAuto', true);
  1062. this.$set(this, 'isShowAuth', true);
  1063. // #endif
  1064. return;
  1065. } else {
  1066. goShopDetail(item, this.uid).then(res => {
  1067. uni.navigateTo({
  1068. url: `/pages/goods_details/index?id=${item.id}`
  1069. });
  1070. });
  1071. }
  1072. },
  1073. // 分类详情
  1074. godDetail(item) {
  1075. uni.navigateTo({
  1076. url: `/pages/goods_details/index?id=${item.id}`
  1077. });
  1078. },
  1079. //拼团详情
  1080. goCombinDetail(item) {
  1081. uni.navigateTo({
  1082. url: `/pages/activity/combination_details/index?id=${item.product_group_id}`
  1083. });
  1084. },
  1085. countTime: function() {
  1086. // 获取当前时间
  1087. var date = new Date();
  1088. var now = date.getTime();
  1089. //设置截止时间
  1090. var endDate = new Date('2020-10-22 23:23:23');
  1091. var end = endDate.getTime();
  1092. //时间差
  1093. var leftTime = end - now;
  1094. //定义变量 d,h,m,s保存倒计时的时间
  1095. if (leftTime >= 0) {
  1096. this.d = Math.floor(leftTime / 1000 / 60 / 60 / 24);
  1097. this.h = Math.floor((leftTime / 1000 / 60 / 60) % 24);
  1098. this.m = Math.floor((leftTime / 1000 / 60) % 60);
  1099. this.s = Math.floor((leftTime / 1000) % 60);
  1100. this.sum_h = this.d * 24 + this.h;
  1101. }
  1102. //递归每秒调用countTime方法,显示动态时间效果
  1103. setTimeout(this.countTime, 1000);
  1104. },
  1105. //#ifdef H5
  1106. ShareInfo(datas) {
  1107. let data = this.storeInfo;
  1108. let href = location.href;
  1109. if (this.$wechat.isWeixin()) {
  1110. if (this.isLogin) {
  1111. href = href.indexOf('?') === -1 ? href + '?spid=' + this.uid : href + '&spid=' + this.uid;
  1112. } else {
  1113. href = href;
  1114. }
  1115. let configAppMessage = {
  1116. desc: datas.share_info,
  1117. title: datas.share_title,
  1118. link: href,
  1119. imgUrl: datas.share_pic
  1120. };
  1121. this.$wechat
  1122. .wechatEvevt(['updateAppMessageShareData', 'updateTimelineShareData', 'onMenuShareAppMessage', 'onMenuShareTimeline'], configAppMessage)
  1123. .then(res => {
  1124. console.log(res, '=============================>>WXAPI');
  1125. })
  1126. .catch(err => {
  1127. console.log(err);
  1128. });
  1129. }
  1130. },
  1131. //#endif
  1132. },
  1133. mounted() {
  1134. let query = uni.createSelectorQuery().in(this);
  1135. query.select("#home").boundingClientRect();
  1136. query.exec(res => {
  1137. this.domHeight = res[0].height;
  1138. })
  1139. },
  1140. // 滚动到底部
  1141. onReachBottom() {
  1142. if (this.navIndex == 0) {
  1143. // 首页加载更多
  1144. this.get_host_product();
  1145. } else {
  1146. // 分类栏目加载更多
  1147. if (this.sortProduct.length > 0) {
  1148. this.get_product_list();
  1149. } else {
  1150. this.get_host_product();
  1151. }
  1152. }
  1153. },
  1154. // 滚动监听
  1155. onPageScroll(e) {
  1156. if (this.isHeaderSerch) {
  1157. let isScroll = false
  1158. this.appScroll = e.scrollTop
  1159. // #ifdef APP-PLUS
  1160. // isScroll = e.scrollTop > 50
  1161. // #endif
  1162. // #ifdef MP || H5
  1163. // isScroll = e.scrollTop > 50 && this.windowHeight - this.domHeight >= 50
  1164. // #endif
  1165. isScroll = e.scrollTop > 50
  1166. this.isScrolled = isScroll;
  1167. } else {
  1168. this.isScrolled = false
  1169. }
  1170. // 传入scrollTop值并触发所有easy-loadimage组件下的滚动监听事件
  1171. uni.$emit('scroll');
  1172. }
  1173. };
  1174. </script>
  1175. <style>
  1176. </style>
  1177. <style lang="scss" scoped>
  1178. .bnt1{
  1179. color: red;
  1180. }
  1181. .overflow-mask{
  1182. position: fixed;
  1183. top: 0;
  1184. left: 0;
  1185. z-index: 1001;
  1186. width: 100%;
  1187. height: 100vh;
  1188. background: transparent;
  1189. transition: all .5s;
  1190. }
  1191. page {
  1192. display: flex;
  1193. flex-direction: column;
  1194. }
  1195. /deep/ .home-comb .my-main{
  1196. left: 0;
  1197. position: fixed;
  1198. top: 0;
  1199. width: 100%;
  1200. z-index: 30;
  1201. }
  1202. .main {
  1203. padding: 0 20rpx;
  1204. }
  1205. .colum0{
  1206. white-space: nowrap;
  1207. display: flex;
  1208. }
  1209. .ysize {
  1210. background-size: 100%;
  1211. }
  1212. .fullsize {
  1213. background-size: 100% 100%;
  1214. }
  1215. .repeat {
  1216. background-repeat: repeat;
  1217. }
  1218. .noRepeat {
  1219. background-repeat: no-repeat;
  1220. }
  1221. .privacy-wrapper {
  1222. z-index: 999;
  1223. position: fixed;
  1224. left: 0;
  1225. top: 0;
  1226. bottom: 0;
  1227. right: 0;
  1228. width: 100%;
  1229. height: 100%;
  1230. background: #7f7f7f;
  1231. .privacy-box {
  1232. position: absolute;
  1233. left: 50%;
  1234. top: 50%;
  1235. transform: translate(-50%, -50%);
  1236. width: 560rpx;
  1237. padding: 50rpx 45rpx 0;
  1238. background: #fff;
  1239. border-radius: 20rpx;
  1240. .title {
  1241. text-align: center;
  1242. font-size: 32rpx;
  1243. text-align: center;
  1244. color: #333;
  1245. font-weight: 700;
  1246. }
  1247. .content {
  1248. margin-top: 20rpx;
  1249. line-height: 1.5;
  1250. font-size: 26rpx;
  1251. color: #666;
  1252. navigator {
  1253. display: inline-block;
  1254. color: #e93323;
  1255. }
  1256. }
  1257. .btn-box {
  1258. margin-top: 40rpx;
  1259. text-align: center;
  1260. font-size: 30rpx;
  1261. .btn-item {
  1262. height: 82rpx;
  1263. line-height: 82rpx;
  1264. background: linear-gradient(90deg, #f67a38 0%, #f11b09 100%);
  1265. color: #fff;
  1266. border-radius: 41rpx;
  1267. }
  1268. .btn {
  1269. padding: 30rpx 0;
  1270. }
  1271. }
  1272. }
  1273. }
  1274. .coupon_popups{
  1275. z-index: 999;
  1276. position: fixed;
  1277. left: 0;
  1278. top: 0;
  1279. width: 100%;
  1280. height: 100%;
  1281. text-align: center;
  1282. .bg{
  1283. position: absolute;
  1284. left: 0;
  1285. top: 0;
  1286. width: 100%;
  1287. height: 100%;
  1288. background-color: rgba(0,0,0,.5);
  1289. }
  1290. .con{
  1291. position: absolute;
  1292. left: 50%;
  1293. top: 50%;
  1294. transform: translate(-50%,-50%);
  1295. width: 680rpx;
  1296. height:900rpx;
  1297. background-size: 100% 700rpx;
  1298. background-repeat: no-repeat;
  1299. scroll-view{
  1300. width: 610rpx;
  1301. height: 306rpx;
  1302. padding-top: 20rpx;
  1303. margin: 300rpx auto 0;
  1304. }
  1305. .item{
  1306. display: flex;
  1307. align-items: center;
  1308. width: 100%;
  1309. height: 164rpx;
  1310. background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABDgAAAFICAMAAACC1L7bAAAAilBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////2N2iNAAAALXRSTlMA9xnrZyf0790ev4d1Egr7cl9TI+XNbVpAtKSUjX0NB6ucgnpDMdjRxUw7LdTK5bIiAAAF40lEQVR42uzcWW7CMBSF4UNImAIBEcpUKJQixt79b68qD1VLgNi8VHL+bxHH9tH1VUE+SeedVs1QkMmNAYGotTrzdNJWiSRtGe7J5aRnQFh2m1z3ndeGB05ycjYgOPNct2WLvuGRoZxMDAhPbbnSDQmPlDKpnCwMCNE+UsGxYSixl5MXA4JUP+lKbCgXyUHbgED1J/pjbHAwloONAcGKqfP8jVYqlTUNCNdQPxKDmw+V6hoQsEZOm+et0VOJHiUzwnbgjPQ3Uwlm6BC6WBcRZ6SHpa7QMqNimj19ezd42OqBLcO3CF/K2IG/5lR3Tbm8oQIuVd/S4CfmnYJqiyXtDJ5eM92QdAyohI6UG7zVB7qWpQZUxRufVJ4z6kb65dytG1AZR80NzzkMTkkkKY/XpAaqJWVqFICvmfiSBcDTp1hnDsDTiFX+AHzVCA4A3ggOAAQHgAKCA8D/Izi+2KmDAQAAAAZC/tYDGMB9CiJAHMARB9ATByAO4IgD6IkDEAdwxAH0xAGIAzjiAHriAMQBHHEAPXEA4gCOOICeOABxAEccQE8cgDiAIw6gJw5AHMARB9ATByAOxk4dDAAAADAQ8rcewADuUxDBEQfQEwcgDuCIA+iJAxAHcMQB9MQBiAM44gB64gDEARxxAD1xAOIAjjiAnjgAcQBHHEBPHIA4gCMOoCcOQBzAEQfQEwcgDuCIA+iJAxAHcMQB9MQBiAM44gB64gDEARxxAD1xAOIAjjiAnjgAcQBHHEBPHIA4gCMOoCcOQBzAEQfQEwcgDuCIA+iJAxAHcMQB9MQBjJ06GAAAAGAg5G89gAHcpyASB3DEAfTEAYgDOOIAeuIAxAEccQA9cQDiAI44gJ44AHEARxxATxyAOIAjDqAnDkAcwBEH0BMHIA7giAPoiQMQB3DEAfTEAYgDOOIAeuIAxAEccQA9cQDiAI44gJ44AHEARxxATxyAOIAjDqAnDkAcwBEH0BMHIA7giAPoiQMQB3DEAfTEAYgDOOIAeuIAxAEccQA9cTB26mAAAACAgZC/9QAOYJ+CCMQBhDiAP3EA4gBCHMCfOABxACEO4E8cgDiAEAfwJw5AHECIA/gTByAOIMQB/IkDEAcQ4gD+xAGIAwhxAH/iAMQBhDiAP3EA4gBCHMCfOABxACEO4E8cgDiAEAfwJw5AHECIA/gTByAOIMQB/IkDEAcQ4gD+xAGIAwhxAH/iAMQBhDiAP3EA4gBCHMCfOABxACEOYOzUwQAAAAADIX/rAQzgPgVRTxyAOIAjDqAnDkAcwBEH0BMHIA7giAPoiQMQB3DEAfTEAYgDOOIAeuIAxAEccQA9cQDiAI44gJ44AHEARxxATxyAOIAjDqAnDkAcwBEH0BMHIA7giAPoiQMQB3DEAfTEAYgDOOIAeuIAxAEccQA9cQDiAI44gJ44AHEARxxATxyAOIAjDqAnDkAcwBEH0BMHIA7giIOxU4cEAIBAEMBAIUny/esR4BTqzBZi0CcOQBxAEAfQJw5AHEAQB9AnDkAcQBAH0CcOQBxAEAfQJw5AHEAQB9AnDkAcQBAH0CcOQBxAEAfQt+4AfNnrDK+dO8tNGIaiMHwSoBAKlERAQ4FQhnSQeve/vaoPRVWayTza/7cI2/ecKwNwMtDEAMDJRFMDACdb7Qz3WZ3SRJqX2fJ1YEBI9no23GGyGemP8sLZgYBkig3uLqpaLDk6EIy5tDY42iaqsTgZEISppJnBSZSqwdKAEAwlZhVHg1KNcrZiEICHQhK9ipOoVIucRVz476wfcWToLVOroQGeG8wlkXI42akF7zeE4BbyvRv6WS3UoaCVhd+m+jUy9JPqhmoFQRrHukkNfUzU7bgywF+fXJPONmpFZATvDSttAD1it6hQMwY/+O8pVcWV3aVOW/XBFyfw1TjXP8mXod1MvewN8NE6Vo3jmU2wdrlaEDXDb9HhqHqjF0OLWL1cDfDOKVGz5PBmaCKJdBQhWl9idUiy/QczSy31UxjgjYfpYxar6hufchGebA48QgAAAABJRU5ErkJggg==');
  1311. background-repeat: no-repeat;
  1312. background-size: 100% 100%;
  1313. margin-bottom: 20rpx;
  1314. border-radius: 20rpx;
  1315. position: relative;
  1316. .left{
  1317. width: 160rpx;
  1318. text-align: center;
  1319. &::after{
  1320. content: "";
  1321. display: block;
  1322. height: 110rpx;
  1323. border-right: 1px dashed #E6E6E6;
  1324. position: absolute;
  1325. left: 178rpx;
  1326. top: 25rpx;
  1327. }
  1328. .price{
  1329. color: #E93323;
  1330. font-size: 26rpx;
  1331. font-weight: bold;
  1332. text{
  1333. font-size: 46rpx;
  1334. }
  1335. }
  1336. .max_price{
  1337. color: #999999;
  1338. font-size: 18rpx;
  1339. margin-top: 8rpx;
  1340. }
  1341. }
  1342. .right{
  1343. width: 440rpx;
  1344. padding: 0 20rpx;
  1345. .title{
  1346. color: #333333;
  1347. font-size: 26rpx;
  1348. }
  1349. .time{
  1350. color: #999999;
  1351. font-size: 22rpx;
  1352. margin-top: 20rpx;
  1353. }
  1354. .bnt1{
  1355. .titleSize{
  1356. font-weight: 700;
  1357. font-size: 33rpx;
  1358. }
  1359. .titleColor{
  1360. margin-top: 20rpx;
  1361. color: #999999;
  1362. }
  1363. }
  1364. .coupon_type{
  1365. position: absolute;
  1366. color: #fff;
  1367. font-size: 15rpx;
  1368. width: 30rpx;
  1369. text-align: center;
  1370. height: auto;
  1371. background: #E93323;
  1372. top: 0;
  1373. right: 20rpx;
  1374. line-height: 26rpx;
  1375. padding: 5rpx 0 15rpx;
  1376. &::after{
  1377. content: "";
  1378. width: 0;
  1379. height: 0;
  1380. border-left: 14rpx solid transparent;
  1381. border-right: 14rpx solid transparent;
  1382. border-bottom: 14rpx solid #fff;
  1383. position: absolute;
  1384. bottom: -4rpx;
  1385. left: 2rpx;
  1386. }
  1387. }
  1388. }
  1389. }
  1390. .text{
  1391. width: 600rpx;
  1392. margin: 30rpx auto 0;
  1393. font-size: 20rpx;
  1394. color: #ffffff;
  1395. }
  1396. .icon-guanbi3{
  1397. color: #ffffff;
  1398. font-size: 70rpx;
  1399. position: absolute;
  1400. bottom: -80rpx;
  1401. left: 320rpx;
  1402. }
  1403. }
  1404. }
  1405. .item_tags{
  1406. margin-top: 8rpx;
  1407. display: flex;
  1408. }
  1409. .item_tags .tags_item {
  1410. display: inline-block;
  1411. font-size: 20rpx;
  1412. text-align: center;
  1413. border-radius: 5rpx;
  1414. padding: 0 4rpx;
  1415. line-height: 28rpx;
  1416. margin-right: 8rpx;
  1417. }
  1418. .item_tags .tags_item.ticket{
  1419. color: var(--view-theme);
  1420. border: 1px solid var(--view-theme);
  1421. }
  1422. .item_tags .tags_item.delivery{
  1423. color: #FF9000;
  1424. border: 1px solid #FF9000;
  1425. }
  1426. .copyRight{
  1427. margin: 60rpx auto 20rpx;
  1428. max-width: 690rpx;
  1429. font-size: 20rpx;
  1430. color: #707070;
  1431. text-decoration: none;
  1432. }
  1433. .share-box {
  1434. z-index: 1000;
  1435. position: fixed;
  1436. left: 0;
  1437. top: 0;
  1438. width: 100%;
  1439. height: 100%;
  1440. image {
  1441. width: 100%;
  1442. height: 100%;
  1443. }
  1444. }
  1445. .error-network {
  1446. position: fixed;
  1447. left: 0;
  1448. top: 0;
  1449. display: flex;
  1450. flex-direction: column;
  1451. align-items: center;
  1452. width: 100%;
  1453. height: 100%;
  1454. padding-top: 40rpx;
  1455. background: #fff;
  1456. padding-top: 30%;
  1457. image {
  1458. width: 414rpx;
  1459. height: 336rpx;
  1460. }
  1461. .title {
  1462. position: relative;
  1463. top: -40rpx;
  1464. font-size: 32rpx;
  1465. color: #666;
  1466. }
  1467. .con {
  1468. font-size: 24rpx;
  1469. color: #999;
  1470. .label {
  1471. margin-bottom: 20rpx;
  1472. }
  1473. .item {
  1474. margin-bottom: 20rpx;
  1475. }
  1476. }
  1477. .btn {
  1478. display: flex;
  1479. align-items: center;
  1480. justify-content: center;
  1481. width: 508rpx;
  1482. height: 86rpx;
  1483. margin-top: 100rpx;
  1484. border: 1px solid #d74432;
  1485. color: #e93323;
  1486. font-size: 30rpx;
  1487. border-radius: 120rpx;
  1488. }
  1489. }
  1490. .area-row {
  1491. overflow: hidden;
  1492. text-overflow: ellipsis;
  1493. white-space: nowrap;
  1494. display: block;
  1495. width: 100%;
  1496. text-align: center;
  1497. }
  1498. .page-index {
  1499. display: flex;
  1500. flex-direction: column;
  1501. min-height: 100%;
  1502. .page_content {
  1503. /* #ifdef MP || APP-PLUS */
  1504. padding-top: 270rpx;
  1505. /* #endif */
  1506. .page_bg{
  1507. background: linear-gradient(180deg, #fff 0%, #f5f5f5 100%);
  1508. }
  1509. .nav {
  1510. padding: 0 0rpx 30rpx;
  1511. flex-wrap: wrap;
  1512. /* #ifdef MP */
  1513. margin-top: 0;
  1514. /* #endif */
  1515. /* #ifdef H5 */
  1516. margin-top: 0;
  1517. /* #endif */
  1518. .item {
  1519. display: flex;
  1520. flex-direction: column;
  1521. align-items: center;
  1522. justify-content: center;
  1523. width: 20%;
  1524. margin-top: 30rpx;
  1525. image {
  1526. width: 82rpx;
  1527. height: 82rpx;
  1528. }
  1529. }
  1530. }
  1531. .index-product-wrapper {
  1532. .nav-bd {
  1533. display: flex;
  1534. align-items: center;
  1535. .item {
  1536. display: flex;
  1537. flex-direction: column;
  1538. align-items: center;
  1539. justify-content: center;
  1540. width: 25%;
  1541. .txt {
  1542. font-size: 32rpx;
  1543. color: #282828;
  1544. }
  1545. .label {
  1546. display: flex;
  1547. align-items: center;
  1548. justify-content: center;
  1549. width: 124rpx;
  1550. height: 32rpx;
  1551. margin-top: 5rpx;
  1552. font-size: 24rpx;
  1553. color: #999;
  1554. }
  1555. &.active {
  1556. color: $theme-color;
  1557. .label {
  1558. background: linear-gradient(90deg, $bg-star 0%, $bg-end 100%);
  1559. border-radius: 16rpx;
  1560. color: #fff;
  1561. }
  1562. }
  1563. }
  1564. }
  1565. .list-box {
  1566. display: flex;
  1567. flex-wrap: wrap;
  1568. justify-content: space-between;
  1569. .item {
  1570. width: 345rpx;
  1571. margin-bottom: 20rpx;
  1572. background-color: #fff;
  1573. border-radius: 10px;
  1574. overflow: hidden;
  1575. image {
  1576. width: 100%;
  1577. height: 345rpx;
  1578. }
  1579. .text-info {
  1580. padding: 10rpx 20rpx 15rpx;
  1581. .title {
  1582. color: #222222;
  1583. }
  1584. .old-price {
  1585. margin-top: 8rpx;
  1586. font-size: 26rpx;
  1587. color: #aaaaaa;
  1588. text-decoration: line-through;
  1589. text {
  1590. margin-right: 2px;
  1591. font-size: 20rpx;
  1592. }
  1593. }
  1594. .price {
  1595. display: flex;
  1596. align-items: flex-end;
  1597. color: $theme-color;
  1598. font-size: 34rpx;
  1599. font-weight: 800;
  1600. text {
  1601. padding-bottom: 4rpx;
  1602. font-size: 24rpx;
  1603. font-weight: normal;
  1604. }
  1605. .txt {
  1606. display: flex;
  1607. align-items: center;
  1608. justify-content: center;
  1609. width: 28rpx;
  1610. height: 28rpx;
  1611. margin-left: 15rpx;
  1612. margin-bottom: 10rpx;
  1613. border: 1px solid $theme-color;
  1614. border-radius: 4rpx;
  1615. font-size: 22rpx;
  1616. font-weight: normal;
  1617. }
  1618. }
  1619. }
  1620. }
  1621. &.on {
  1622. display: flex;
  1623. }
  1624. }
  1625. }
  1626. }
  1627. }
  1628. .productList {
  1629. background-color: #f1f1f1;
  1630. min-height: 70vh;
  1631. .sort {
  1632. width: 710rpx;
  1633. max-height: 380rpx;
  1634. background: rgba(255, 255, 255, 1);
  1635. border-radius: 16rpx;
  1636. padding: 8rpx 0rpx 30rpx;
  1637. flex-wrap: wrap;
  1638. margin: 25rpx auto 0 auto;
  1639. .item {
  1640. width: 20%;
  1641. margin-top: 30rpx;
  1642. text-align: center;
  1643. .pictrues {
  1644. width: 90rpx;
  1645. height: 90rpx;
  1646. background: rgba(248, 248, 248, 1);
  1647. border-radius: 50%;
  1648. margin: 0 auto;
  1649. }
  1650. .easy-loadimage {
  1651. width: 90rpx;
  1652. height: 90rpx;
  1653. display: inline-block;
  1654. }
  1655. .text {
  1656. color: #272727;
  1657. font-size: 24rpx;
  1658. margin-top: 10rpx;
  1659. overflow: hidden;
  1660. white-space: nowrap;
  1661. text-overflow: ellipsis;
  1662. }
  1663. }
  1664. }
  1665. }
  1666. .productList .list {
  1667. padding: 0 20rpx;
  1668. }
  1669. .productList .list.on {
  1670. background-color: #fff;
  1671. border-top: 1px solid #f6f6f6;
  1672. }
  1673. .productList .list .item {
  1674. width: 345rpx;
  1675. margin-top: 20rpx;
  1676. background-color: #fff;
  1677. border-radius: 10rpx;
  1678. .name{
  1679. display: flex;
  1680. align-items: center;
  1681. }
  1682. }
  1683. .productList .list .item.on {
  1684. width: 100%;
  1685. display: flex;
  1686. border-bottom: 1px solid #f6f6f6;
  1687. padding: 30rpx 0;
  1688. margin: 0;
  1689. }
  1690. .productList .list .item .pictrue {
  1691. position: relative;
  1692. width: 100%;
  1693. height: 345rpx;
  1694. }
  1695. .productList .list .item .pictrue.on {
  1696. width: 180rpx;
  1697. height: 180rpx;
  1698. }
  1699. .productList .list .item .pictrue image,
  1700. .productList .list .item .pictrue uni-image,
  1701. .productList .list .item .pictrue .easy-loadimage{
  1702. width: 100%;
  1703. height: 100%;
  1704. border-radius: 10rpx 10rpx 0 0;
  1705. }
  1706. /deep/.productList .list .item .pictrue uni-image.origin-img{
  1707. border-radius: 10rpx 10rpx 0 0;
  1708. }
  1709. .productList .list .item .pictrue image.on {
  1710. border-radius: 6rpx;
  1711. }
  1712. .productList .list .item .text {
  1713. padding: 14rpx 17rpx 26rpx 17rpx;
  1714. font-size: 28rpx;
  1715. color: #212121;
  1716. }
  1717. .productList .list .item .text.on {
  1718. width: 508rpx;
  1719. padding: 0 0 0 22rpx;
  1720. }
  1721. .productList .list .item .text .money {
  1722. font-size: 26rpx;
  1723. font-weight: bold;
  1724. margin-top: 8rpx;
  1725. }
  1726. .productList .list .item .text .coupon {
  1727. background: rgba(255, 248, 247, 1);
  1728. border: 1px solid rgba(233, 51, 35, 1);
  1729. border-radius: 4rpx;
  1730. font-size: 20rpx;
  1731. margin-left: 18rpx;
  1732. padding: 1rpx 4rpx;
  1733. }
  1734. .productList .list .item .text .money.on {
  1735. margin-top: 50rpx;
  1736. }
  1737. .productList .list .item .text .money .num {
  1738. font-size: 34rpx;
  1739. }
  1740. .pictrue {
  1741. position: relative;
  1742. .border-picture {
  1743. position: absolute;
  1744. top: 0;
  1745. left: 0;
  1746. width: 100%;
  1747. height: 100%;
  1748. border-radius: 10rpx 10rpx 0 0;
  1749. background: center/cover no-repeat;
  1750. }
  1751. }
  1752. .fixed {
  1753. z-index: 100;
  1754. position: fixed;
  1755. left: 0;
  1756. top: 0;
  1757. background-color: #fff;
  1758. box-shadow: 0 10rpx 20rpx -5rpx rgba(0, 0, 0, 0.06);
  1759. }
  1760. .page-footer {
  1761. position: fixed;
  1762. bottom: 0;
  1763. z-index: 30;
  1764. display: flex;
  1765. align-items: center;
  1766. justify-content: space-around;
  1767. width: 100%;
  1768. height: calc(98rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  1769. height: calc(98rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  1770. box-sizing: border-box;
  1771. border-top: 1px solid #F3F3F3;
  1772. background-color: #fff;
  1773. box-shadow: 0px 0px 17rpx 1rpx rgba(206, 206, 206, 0.32);
  1774. padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
  1775. padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/
  1776. .foot-item {
  1777. display: flex;
  1778. width: max-content;
  1779. align-items: center;
  1780. justify-content: center;
  1781. flex-direction: column;
  1782. position: relative;
  1783. .count-num {
  1784. position: absolute;
  1785. display: flex;
  1786. justify-content: center;
  1787. align-items: center;
  1788. width: 40rpx;
  1789. height: 40rpx;
  1790. top: 0rpx;
  1791. right: -15rpx;
  1792. color: #fff;
  1793. font-size: 20rpx;
  1794. background-color: #FD502F;
  1795. border-radius: 50%;
  1796. padding: 4rpx;
  1797. }
  1798. }
  1799. .foot-item image {
  1800. height: 50rpx;
  1801. width: 50rpx;
  1802. text-align: center;
  1803. margin: 0 auto;
  1804. }
  1805. .foot-item .txt {
  1806. font-size: 24rpx;
  1807. }
  1808. }
  1809. </style>