index.vue 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571
  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', pointerEvents: preview ? 'none' : 'auto'}">
  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"></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"></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 v-if="item.name == 'menus'" :class="isMenu ? 'transform-view' : ''" :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. @changeTab="changeTab" :isFixed="isFixed"></tabNav>
  89. </block>
  90. <!-- #endif -->
  91. <view class="main" v-show="navIndex == 0">
  92. <!-- 首页推荐 -->
  93. <view v-if="recommend_switch == 1" class="index-product-wrapper">
  94. <!-- 首发新品 -->
  95. <recommend :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">
  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 cate_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="`${domain}/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" class="copyRight">{{beian_sn}}</a>
  174. <!-- #endif -->
  175. <!-- #ifndef H5 -->
  176. <view v-if="beian_sn" class="copyRight" @click="goCopyright('https://beian.miit.gov.cn')">{{beian_sn}}</view>
  177. <!-- #endif -->
  178. </view>
  179. </view>
  180. <view v-else>
  181. <view class="error-network">
  182. <image :src="`${domain}/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="`${domain}/static/images/share-info.png`" @click="closeShare"></image>
  216. <!-- #endif -->
  217. <!-- #ifdef H5 -->
  218. <image :src="`${domain}/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>
  241. </view>
  242. </scroll-view>
  243. <view class="text">优惠券已放入您的账户中,点击“优惠券”去使用</view>
  244. <view class='iconfont icon-guanbi3' @click="showCoupon = false"></view>
  245. </view>
  246. </view>
  247. <!-- #ifndef H5 -->
  248. <passwordPopup></passwordPopup>
  249. <!-- #endif -->
  250. <!--自定义底部tab栏-->
  251. <customTab :newData="newData" :activeRouter="activeRouter"></customTab>
  252. <view v-if="overflow" class="overflow-mask" @touchmove.stop.prevent="() => {}"></view>
  253. </view>
  254. </template>
  255. <script>
  256. // +----------------------------------------------------------------------
  257. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  258. // +----------------------------------------------------------------------
  259. // | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
  260. // +----------------------------------------------------------------------
  261. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  262. // +----------------------------------------------------------------------
  263. // | Author: CRMEB Team <admin@crmeb.com>
  264. // +----------------------------------------------------------------------
  265. var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
  266. let app = getApp();
  267. import { getUserInfo } from '@/api/user.js';
  268. import { getDiy, getPageDiy, getIndexData, getAppVersion } from '@/api/api.js';
  269. import { getNavigation } from '@/api/public.js';
  270. import { getStorage } from '@/libs/uniApi.js';
  271. // #ifdef MP-WEIXIN
  272. import { getTemlIds } from '@/api/api.js';
  273. import { SUBSCRIBE_MESSAGE, TIPS_KEY } from '@/config/cache';
  274. // #endif
  275. import { getShare } from '@/api/public.js';
  276. import { goShopDetail } from '@/libs/order.js';
  277. import { toLogin } from '@/libs/login.js';
  278. import { mapGetters } from 'vuex';
  279. import { getProductslist, getProductHot, storeCategory } from '@/api/store.js';
  280. import { initiateAssistApi } from '@/api/activity.js';
  281. import { setVisit, spread } from '@/api/user.js';
  282. import recommend from '@/components/recommend';
  283. // #ifndef H5
  284. import passwordPopup from '@/components/passwordPopup';
  285. // #endif
  286. // #ifdef H5
  287. import mConfig from './component/index.js';
  288. // #endif
  289. import customTab from '@/components/customTab';
  290. // #ifdef MP || APP-PLUS
  291. import activeParty from './component/activeParty';
  292. import headerSerch from './component/headerSerch';
  293. import homeComb from './component/homeComb';
  294. import coupon from './component/coupon';
  295. import bargain from './component/bargain';
  296. import blankPage from './component/blankPage';
  297. import combination from './component/combination';
  298. import customerService from './component/customerService';
  299. import goodList from './component/goodList';
  300. import guide from './component/guide';
  301. import liveBroadcast from './component/liveBroadcast';
  302. import menus from './component/menus';
  303. import news from './component/news';
  304. import topic from './component/topic';
  305. import presellList from './component/presellList';
  306. import plantList from './component/plantList';
  307. import pictureCube from './component/pictureCube'
  308. import shopList from './component/shopList';
  309. import richText from './component/richText';
  310. import seckill from './component/seckill';
  311. import swiperBg from './component/swiperBg';
  312. import tabNav from './component/tabNav';
  313. import titles from './component/titles';
  314. import hotRanking from "./component/hotRanking.vue";
  315. // #endif
  316. import { silenceBindingSpread, configMap, isWeixin } from '@/utils/index';
  317. import history from '@/mixins/history';
  318. import shareScence from '@/libs/spread';
  319. import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
  320. import {getNewPeopleCouponLst} from '@/api/activity.js'
  321. import { HTTP_REQUEST_URL } from '@/config/app';
  322. export default {
  323. computed: configMap({hide_mer_status:0,recommend_switch:0,beian_sn:'',share_title:'',share_pic:'',site_name:'',hot_ranking_switch:0,navigation: {}},
  324. mapGetters(['isLogin','uid','keyColor'])),
  325. mixins: [history],
  326. components: {
  327. easyLoadimage,
  328. recommend,
  329. customTab,
  330. // #ifndef H5
  331. passwordPopup,
  332. // #endif
  333. // #ifdef H5
  334. ...mConfig,
  335. // #endif
  336. // #ifdef MP || APP-PLUS
  337. activeParty,
  338. headerSerch,
  339. homeComb,
  340. bargain,
  341. coupon,
  342. blankPage,
  343. combination,
  344. customerService,
  345. goodList,
  346. guide,
  347. liveBroadcast,
  348. menus,
  349. news,
  350. topic,
  351. presellList,
  352. plantList,
  353. pictureCube,
  354. shopList,
  355. richText,
  356. seckill,
  357. swiperBg,
  358. tabNav,
  359. titles,
  360. hotRanking
  361. // #endif
  362. },
  363. data() {
  364. return {
  365. domain: HTTP_REQUEST_URL,
  366. couponTypeMsg:{
  367. 10: '通用券',
  368. 11: '品类券',
  369. 12: '跨店券'
  370. },
  371. styleConfig: [],
  372. showSkeleton: true, //骨架屏显示隐藏
  373. isNodes: 0, //控制什么时候开始抓取元素节点,只要数值改变就重新抓取
  374. privacyStatus: false,
  375. errorNetwork: false,
  376. userInfo: {},
  377. loading: false,
  378. statusBarHeight: statusBarHeight,
  379. navIndex: 0,
  380. navTop: [],
  381. subscribe: false,
  382. followUrl: '',
  383. followHid: true,
  384. followCode: false,
  385. sortList: [],
  386. window: false,
  387. navH: '',
  388. couponList: [],
  389. marTop: 0,
  390. loadend: false,
  391. loading: false,
  392. loadTitle: '加载更多',
  393. sortProduct: [],
  394. where: {
  395. pid: 0,
  396. page: 1,
  397. limit: 6
  398. },
  399. is_switch: true,
  400. hostProduct: [],
  401. hotPage: 1,
  402. hotLimit: 30,
  403. hotScroll: true,
  404. hotLoading: false,
  405. hotTitle: '加载更多',
  406. // #ifdef MP || APP-PLUS
  407. isFixed: false,
  408. // #endif
  409. // #ifdef H5
  410. isFixed: false,
  411. // #endif
  412. isScrolled: false,
  413. scrolled: false,
  414. tempArr: [], //精品推荐临时数组
  415. d: '',
  416. h: '',
  417. m: '',
  418. s: '',
  419. sum_h: '',
  420. sortMarTop: 0,
  421. globalDatas: {},
  422. currSpid: '',
  423. _options:{},
  424. isIntegral: false,
  425. appUpdate: {},
  426. bgColor: '',
  427. bgPic: '',
  428. bgTabVal: '',
  429. windowHeight: 0,
  430. domHeight: 0,
  431. isHeaderSerch: false,
  432. showCoupon: false,
  433. couponArray: [],
  434. smallPage: false,
  435. isMenu: false,
  436. isScale: false,
  437. homeCombData: {},
  438. footerStatus: false,
  439. newData: {},
  440. activeRouter: '',
  441. overflow: false,
  442. diyId: 0,
  443. preview: false,
  444. isSupport: true
  445. };
  446. },
  447. /**
  448. * 用户点击右上角分享
  449. */
  450. // #ifdef MP
  451. onShareAppMessage: function() {
  452. let that = this;
  453. wx.showShareMenu({
  454. withShareTicket: true,
  455. menus: ['shareAppMessage', 'shareTimeline']
  456. });
  457. return {
  458. title: that.share_title,
  459. imageUrl: "",
  460. path: '/pages/index/index?spid=' + that.uid
  461. };
  462. },
  463. onShareTimeline: function() {
  464. let that = this;
  465. return {
  466. title: that.share_title,
  467. query: {
  468. spid: that.uid
  469. },
  470. imageUrl: ''
  471. };
  472. },
  473. // #endif
  474. onLoad(options) {
  475. let that = this
  476. this._options = options;
  477. this.diyId = options.diyId || 0;
  478. this.preview = options.time ? true : false;
  479. // #ifdef APP-PLUS
  480. that.appVersionConfig(); //APP版本检测
  481. // #endif
  482. that.$nextTick(function() {
  483. uni.getSystemInfo({
  484. success: function(res) {
  485. that.windowHeight = res.windowHeight;
  486. }
  487. });
  488. })
  489. that.pageLoad(options);
  490. },
  491. created(options) {
  492. let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
  493. let curRoute = routes[routes.length - 1].route //获取当前页面路由
  494. this.activeRouter = '/' + curRoute
  495. },
  496. onShow() {
  497. let that = this
  498. that.isIntegral = uni.getStorageSync('isIntegral')
  499. // #ifdef APP-PLUS
  500. if(that.appUpdate.openUpgrade == '1'){
  501. that.alertAppUpdate();
  502. }
  503. // #endif
  504. that.getNav()
  505. that.loadCoupon()
  506. that.$nextTick(function() {
  507. const query = uni.createSelectorQuery();
  508. query.select('#home').boundingClientRect(); //获取当前元素距离顶部的距离
  509. query.exec(res =>{
  510. that.isScrolled = res[0].top <= -60
  511. })
  512. })
  513. },
  514. onHide() {
  515. uni.setStorageSync('isIntegral',false)
  516. },
  517. onReady() {
  518. },
  519. watch: {
  520. globalDatas(nVal, oVal) {
  521. // #ifdef H5
  522. this.ShareInfo(nVal);
  523. // #endif
  524. },
  525. },
  526. onPullDownRefresh(){
  527. this.overflow = true;
  528. this.reconnect();
  529. // #ifdef APP-PLUS
  530. setTimeout(() => {
  531. uni.reLaunch({
  532. url: "/pages/index/index"
  533. });
  534. }, 50)
  535. // #endif
  536. },
  537. methods: {
  538. goCopyright(url){
  539. this.$util.JumpPath(url);
  540. },
  541. loadCoupon(){
  542. if(!this.showCoupon && !uni.getStorageSync('show_coupon') && uni.getStorageSync('is_new_user')){
  543. getNewPeopleCouponLst().then(res => {
  544. this.couponArray = res.data;
  545. setTimeout(() => {
  546. this.showCoupon = this.couponArray.length > 0;
  547. uni.setStorageSync('show_coupon', '1')
  548. }, 1500);
  549. })
  550. }
  551. },
  552. pageLoad(options){
  553. let that = this;
  554. if (options.spid) {
  555. that.currSpid = options.spid;
  556. app.globalData.spid = options.spid;
  557. }else if(getStorage('spid')){
  558. that.currSpid = getStorage('spid');
  559. app.globalData.spid = getStorage('spid');
  560. }
  561. // #ifdef APP-PLUS
  562. try {
  563. let val = uni.getStorageSync('privacyStatus') || true;
  564. if (!val) {
  565. this.privacyStatus = true;
  566. }
  567. } catch (e) {}
  568. this.snycNetWork();
  569. // #endif
  570. // #ifdef MP
  571. if (options.scene) {
  572. let value = that.$util.getUrlParams(decodeURIComponent(options.scene));
  573. if (value.id) options.id = value.id;
  574. //记录推广人uid
  575. if (value.spid) {
  576. that.currSpid = value.spid;
  577. app.globalData.spid = value.spid;
  578. }else if(getStorage('spid')){
  579. that.currSpid = getStorage('spid');
  580. app.globalData.spid = getStorage('spid');
  581. }
  582. }
  583. // #endif
  584. shareScence(that.currSpid, that.isLogin);
  585. this.isLogin && silenceBindingSpread();
  586. this.reloadData();
  587. Promise.all([
  588. this.diyData(0),
  589. ]);
  590. if (this.isLogin) {
  591. this.getUserInfo();
  592. }
  593. },
  594. closeShare(){
  595. uni.setStorageSync('isIntegral',false);
  596. this.isIntegral = uni.getStorageSync('isIntegral');
  597. },
  598. // 重新链接
  599. reconnect() {
  600. uni.getNetworkType({
  601. success: res => {
  602. this.errorNetwork = res.networkType === 'none';
  603. if(!this.errorNetwork){
  604. this.pageLoad(this._options);
  605. }else{
  606. // uni.stopPullDownRefresh();
  607. that.overflow = false;
  608. }
  609. }
  610. });
  611. },
  612. getNav(){
  613. getNavigation().then(res => {
  614. this.newData = res.data
  615. if (this.newData.status && this.newData.status.status) {
  616. uni.hideTabBar()
  617. } else {
  618. uni.showTabBar()
  619. }
  620. })
  621. },
  622. // #ifdef APP-PLUS
  623. snycNetWork() {
  624. uni.getNetworkType({
  625. success: res => {
  626. this.errorNetwork = res.networkType === 'none';
  627. }
  628. });
  629. },
  630. // 同意隐私协议
  631. confirmApp() {
  632. uni.setStorageSync('privacyStatus', true);
  633. this.privacyStatus = false;
  634. },
  635. // 关闭 Model
  636. closeModel() {
  637. this.privacyStatus = false;
  638. },
  639. // #endif
  640. // 对象转数组
  641. objToArr(data) {
  642. let obj = Object.keys(data).sort();
  643. let m = obj.map(key => data[key]);
  644. return m;
  645. },
  646. diyData(id) {
  647. let that = this;
  648. let parmas = {
  649. id: id,
  650. did: that.diyId,
  651. version: '221'
  652. }
  653. that.styleConfig = []
  654. that.smallPage = false;
  655. getDiy(parmas).then(res => {
  656. setTimeout(() => {
  657. that.isNodes++;
  658. }, 0);
  659. that.errorNetwork = false
  660. let data = res.data;
  661. uni.setNavigationBarTitle({
  662. title: data.title
  663. });
  664. if (data.is_bg_color) {
  665. that.bgColor = data.color_picker
  666. }
  667. if (data.is_bg_pic) {
  668. that.bgPic = data.bg_pic
  669. that.bgTabVal = data.bg_tab_val
  670. }else{
  671. that.bgPic = ""
  672. }
  673. that.styleConfig = that.objToArr(data.value);
  674. that.styleConfig.forEach((item, index, arr) => {
  675. item.did = data.id
  676. if (item.name == 'headerSerch' || item.name == 'homeComb') {
  677. that.isHeaderSerch = true
  678. if(item.name == 'homeComb'){
  679. that.$set(that, 'homeCombData', item)
  680. that.smallPage = true;
  681. }
  682. }
  683. if (item.name == 'pageFoot') {
  684. if (item.status && item.status.status) {
  685. this.newData = item
  686. setTimeout((e) => {
  687. that.$set(that, 'footerStatus', true);
  688. }, 50)
  689. }
  690. uni.setStorageSync('FOOTER_BAR', item.status && item.status.status ? true : false)
  691. item.menuList.map((path, index) => {
  692. if (path.link === '/pages/order_addcart/order_addcart') {
  693. uni.setStorageSync('FOOTER_ADDCART', index)
  694. }
  695. })
  696. arr.splice(index, 1);
  697. }
  698. if(item.name == 'menus'){
  699. that.isMenu = true;
  700. }
  701. if(that.recommend_switch == 1)that.get_host_product()
  702. uni.pageScrollTo({
  703. scrollTop: 0,
  704. })
  705. that.overflow = false;
  706. uni.stopPullDownRefresh();
  707. });
  708. }).catch(err => {
  709. uni.showToast({
  710. title: err,
  711. icon: 'none'
  712. })
  713. uni.stopPullDownRefresh();
  714. });
  715. },
  716. changeDiy(id) {
  717. let that = this;
  718. if(id){
  719. that.styleConfig = []
  720. getPageDiy({id: id,version:'221'}).then(res => {
  721. let data = res.data
  722. uni.setNavigationBarTitle({
  723. title: data.title
  724. });
  725. that.isScale = true
  726. if (data.is_bg_color) {
  727. that.bgColor = data.color_picker
  728. }
  729. if (data.is_bg_pic) {
  730. that.bgPic = data.bg_pic
  731. that.bgTabVal = data.bg_tab_val
  732. }else{
  733. that.bgPic = ""
  734. }
  735. that.styleConfig = that.objToArr(data.value);
  736. that.styleConfig.forEach((item, index, arr) => {
  737. item.did = data.id
  738. if (item.name == 'headerSerch' || item.name == 'homeComb' || item.name == 'tabNav') {
  739. that.styleConfig.splice(index, 1);
  740. }
  741. if(item.name == 'menus'){
  742. that.isMenu = true;
  743. }
  744. });
  745. that.isHeaderSerch = true
  746. that.isScale = true
  747. uni.pageScrollTo({
  748. scrollTop: 0,
  749. })
  750. uni.stopPullDownRefresh();
  751. }).catch(err => {
  752. that.styleConfig = []
  753. uni.stopPullDownRefresh();
  754. uni.showToast({
  755. title: err,
  756. icon: 'none'
  757. })
  758. });
  759. }else{
  760. that.diyData(0)
  761. that.isScale = false
  762. }
  763. },
  764. // #ifdef APP-PLUS
  765. appVersionConfig() {
  766. var that = this;
  767. //app升级
  768. // 获取本地应用资源版本号
  769. getAppVersion().then(res => {
  770. that.$set(that.appUpdate, 'androidAddress', res.data.androidAddress);
  771. that.$set(that.appUpdate, 'appVersion', res.data.appVersion);
  772. that.$set(that.appUpdate, 'iosAddress', res.data.iosAddress);
  773. that.$set(that.appUpdate, 'openUpgrade', res.data.openUpgrade);
  774. plus.runtime.getProperty(plus.runtime.appid, function(inf) {
  775. let nowVersion = (inf.version).split('.').join('');
  776. let appVersion = (res.data.appVersion).split('.').join('');
  777. that.$set(that.appUpdate, 'alert', appVersion > nowVersion);
  778. that.alertAppUpdate();
  779. });
  780. })
  781. },
  782. alertAppUpdate(){
  783. if(this.appUpdate.alert) {
  784. uni.getSystemInfo({
  785. success: (res) => {
  786. uni.showModal({
  787. title: '更新提示',
  788. content: '发现新版本,是否前去下载?',
  789. showCancel: this.appUpdate.openUpgrade != '1',
  790. cancelColor: '#eeeeee',
  791. confirmColor: '#FF0000',
  792. success:(response)=> {
  793. if (response.confirm) {
  794. switch (res.platform) {
  795. case "android":
  796. plus.runtime.openURL(this
  797. .appUpdate
  798. .androidAddress);
  799. break;
  800. case "ios":
  801. plus.runtime.openURL(encodeURI(
  802. this.appUpdate
  803. .iosAddress));
  804. break;
  805. }
  806. }
  807. }
  808. });
  809. }
  810. })
  811. }
  812. },
  813. // #endif
  814. // 分类页更多
  815. bindMore() {
  816. try {
  817. uni.setStorageSync('storeIndex', this.navTop[this.navIndex].pid);
  818. uni.switchTab({
  819. url: '/pages/goods_cate/goods_cate'
  820. });
  821. } catch (e) {}
  822. },
  823. goDetails(item) {
  824. goShopDetail(item, this.uid).then(res => {
  825. if (this.isLogin) {
  826. initiateAssistApi(item.activity_id)
  827. .then(res => {
  828. let id = res.data.product_assist_set_id;
  829. uni.hideLoading();
  830. uni.navigateTo({
  831. url: '/pages/activity/assist_detail/index?id=' + id
  832. });
  833. })
  834. .catch(err => {
  835. uni.showToast({
  836. title: err,
  837. icon: 'none'
  838. });
  839. });
  840. } else {
  841. toLogin()
  842. }
  843. });
  844. },
  845. /**
  846. * 获取个人用户信息
  847. */
  848. getUserInfo: function() {
  849. let that = this;
  850. getUserInfo().then(res => {
  851. that.userInfo = res.data;
  852. });
  853. },
  854. // 记录会员访问
  855. setVisit() {
  856. setVisit({
  857. url: '/pages/index/index'
  858. }).then(res => {
  859. console.log(res);
  860. });
  861. },
  862. // 导航分类切换
  863. changeTab(e,tabTitle) {
  864. let self = this;
  865. if (this.navIndex == e.index) return;
  866. this.navIndex = e.index;
  867. if (e.index > 0) {
  868. storeCategory({
  869. pid: e.pid
  870. }).then(res => {
  871. this.sortList = res.data.length > 9 ? res.data.splice(0, 9) : res.data;
  872. if (this.sortList.length > 0) {
  873. this.where.pid = e.pid;
  874. this.where.page = 1;
  875. this.loadend = false;
  876. this.loading = false;
  877. this.sortProduct = [];
  878. this.navTop = tabTitle;
  879. this.get_product_list();
  880. uni.pageScrollTo({
  881. scrollTop: 0,
  882. })
  883. }
  884. });
  885. self.sortMarTop = 10;
  886. }
  887. },
  888. //分类产品
  889. get_product_list: function() {
  890. let that = this;
  891. if (that.loading || that.loadend) return;
  892. that.loading = true;
  893. that.loadTitle = '';
  894. getProductslist(that.where)
  895. .then(res => {
  896. let list = res.data.list;
  897. let productList = that.$util.SplitArray(list, that.sortProduct);
  898. let loadend = list.length < that.where.limit;
  899. that.loadend = loadend;
  900. that.loading = false;
  901. that.loadTitle = loadend ? '已全部加载' : '加载更多';
  902. that.$set(that, 'sortProduct', productList);
  903. that.$set(that.where, 'page', that.where.page + 1);
  904. })
  905. .catch(err => {
  906. that.loading = false;
  907. that.loadTitle = '加载更多';
  908. });
  909. },
  910. /**
  911. * 获取我的推荐
  912. */
  913. get_host_product: function() {
  914. let that = this;
  915. let num = that.hotLimit;
  916. if (!that.hotScroll) return;
  917. if (that.hotLoading) return;
  918. that.hotLoading = true;
  919. that.hotTitle = '';
  920. getProductHot(that.hotPage, that.hotLimit).then(res => {
  921. let list = res.data.list;
  922. let productList = that.$util.SplitArray(list, that.hostProduct);
  923. let hotScroll = list.length <= num && list.length != 0;
  924. that.hotScroll = hotScroll;
  925. that.hotLoading = false;
  926. that.hotTitle = !hotScroll ? '已全部加载' : '加载更多';
  927. that.$set(that, 'hostProduct', productList);
  928. that.$set(that, 'hotPage', that.hotPage + 1);
  929. });
  930. },
  931. reloadData() {
  932. setTimeout(() => {
  933. this.showSkeleton = false
  934. }, 500)
  935. },
  936. // 首发新品详情
  937. goDetail(item) {
  938. if (item.activity && item.activity.type === '2' && !this.isLogin) {
  939. // #ifdef H5
  940. uni.showModal({
  941. title: '提示',
  942. content: '您未登录,请登录!',
  943. success: function(res) {
  944. if (res.confirm) {
  945. uni.navigateTo({
  946. url: '/pages/users/login/index'
  947. });
  948. } else if (res.cancel) {
  949. }
  950. }
  951. });
  952. // #endif
  953. // #ifdef MP
  954. toLogin()
  955. // #endif
  956. return;
  957. } else {
  958. goShopDetail(item, this.uid).then(res => {
  959. if (this.isLogin) {
  960. initiateAssistApi(item.activity_id)
  961. .then(res => {
  962. let id = res.data.product_assist_set_id;
  963. uni.hideLoading();
  964. uni.navigateTo({
  965. url: '/pages/activity/assist_detail/index?id=' + id
  966. });
  967. })
  968. .catch(err => {
  969. uni.showToast({
  970. title: err,
  971. icon: 'none'
  972. });
  973. });
  974. } else {
  975. toLogin()
  976. }
  977. });
  978. }
  979. },
  980. //#ifdef H5
  981. ShareInfo(datas) {
  982. let data = this.storeInfo;
  983. let href = location.href;
  984. if (this.$wechat.isWeixin()) {
  985. if (this.isLogin) {
  986. href = href.indexOf('?') === -1 ? href + '?spid=' + this.uid : href + '&spid=' + this.uid;
  987. } else {
  988. href = href;
  989. }
  990. let configAppMessage = {
  991. desc: datas.share_info,
  992. title: datas.share_title,
  993. link: href,
  994. imgUrl: datas.share_pic
  995. };
  996. this.$wechat
  997. .wechatEvevt(['updateAppMessageShareData', 'updateTimelineShareData', 'onMenuShareAppMessage', 'onMenuShareTimeline'], configAppMessage)
  998. .then(res => {})
  999. .catch(err => {
  1000. console.log(err);
  1001. });
  1002. }
  1003. },
  1004. //#endif
  1005. },
  1006. mounted() {
  1007. let query = uni.createSelectorQuery().in(this);
  1008. query.select("#home").boundingClientRect();
  1009. query.exec(res => {
  1010. this.domHeight = res[0].height;
  1011. })
  1012. },
  1013. // 滚动到底部
  1014. onReachBottom() {
  1015. if(this.recommend_switch == 1 && this.navIndex == 0){
  1016. // 首页加载更多
  1017. this.get_host_product();
  1018. }else if(this.navIndex == 1){
  1019. // 分类栏目加载更多
  1020. if (this.sortProduct.length > 0) {
  1021. this.get_product_list();
  1022. }
  1023. }
  1024. },
  1025. // 滚动监听
  1026. onPageScroll(e) {
  1027. this.isFixed = e.scrollTop > 40;
  1028. if (this.isHeaderSerch) {
  1029. let isScroll = false
  1030. isScroll = e.scrollTop > 50
  1031. this.isScrolled = isScroll;
  1032. } else {
  1033. this.isScrolled = false
  1034. }
  1035. // 传入scrollTop值并触发所有easy-loadimage组件下的滚动监听事件
  1036. uni.$emit('scroll');
  1037. }
  1038. };
  1039. </script>
  1040. <style>
  1041. </style>
  1042. <style lang="scss" scoped>
  1043. .bnt1{
  1044. color: red;
  1045. }
  1046. .overflow-mask{
  1047. position: fixed;
  1048. top: 0;
  1049. left: 0;
  1050. z-index: 1001;
  1051. width: 100%;
  1052. height: 100vh;
  1053. background: transparent;
  1054. transition: all .5s;
  1055. }
  1056. page {
  1057. display: flex;
  1058. flex-direction: column;
  1059. }
  1060. /deep/ .home-comb .my-main{
  1061. left: 0;
  1062. position: fixed;
  1063. top: 0;
  1064. width: 100%;
  1065. z-index: 30;
  1066. }
  1067. .main {
  1068. padding: 0 20rpx;
  1069. }
  1070. .colum0{
  1071. white-space: nowrap;
  1072. display: flex;
  1073. }
  1074. .ysize {
  1075. background-size: 100%;
  1076. }
  1077. .fullsize {
  1078. background-size: 100% 100%;
  1079. }
  1080. .repeat {
  1081. background-repeat: repeat;
  1082. }
  1083. .noRepeat {
  1084. background-repeat: no-repeat;
  1085. }
  1086. .privacy-wrapper {
  1087. z-index: 999;
  1088. position: fixed;
  1089. left: 0;
  1090. top: 0;
  1091. bottom: 0;
  1092. right: 0;
  1093. width: 100%;
  1094. height: 100%;
  1095. background: #7f7f7f;
  1096. .privacy-box {
  1097. position: absolute;
  1098. left: 50%;
  1099. top: 50%;
  1100. transform: translate(-50%, -50%);
  1101. width: 560rpx;
  1102. padding: 50rpx 45rpx 0;
  1103. background: #fff;
  1104. border-radius: 20rpx;
  1105. .title {
  1106. text-align: center;
  1107. font-size: 32rpx;
  1108. text-align: center;
  1109. color: #333;
  1110. font-weight: 700;
  1111. }
  1112. .content {
  1113. margin-top: 20rpx;
  1114. line-height: 1.5;
  1115. font-size: 26rpx;
  1116. color: #666;
  1117. navigator {
  1118. display: inline-block;
  1119. color: #e93323;
  1120. }
  1121. }
  1122. .btn-box {
  1123. margin-top: 40rpx;
  1124. text-align: center;
  1125. font-size: 30rpx;
  1126. .btn-item {
  1127. height: 82rpx;
  1128. line-height: 82rpx;
  1129. background: linear-gradient(90deg, #f67a38 0%, #f11b09 100%);
  1130. color: #fff;
  1131. border-radius: 41rpx;
  1132. }
  1133. .btn {
  1134. padding: 30rpx 0;
  1135. }
  1136. }
  1137. }
  1138. }
  1139. .coupon_popups{
  1140. z-index: 999;
  1141. position: fixed;
  1142. left: 0;
  1143. top: 0;
  1144. width: 100%;
  1145. height: 100%;
  1146. text-align: center;
  1147. .bg{
  1148. position: absolute;
  1149. left: 0;
  1150. top: 0;
  1151. width: 100%;
  1152. height: 100%;
  1153. background-color: rgba(0,0,0,.5);
  1154. }
  1155. .con{
  1156. position: absolute;
  1157. left: 50%;
  1158. top: 50%;
  1159. transform: translate(-50%,-50%);
  1160. width: 680rpx;
  1161. height:900rpx;
  1162. background-size: 100% 700rpx;
  1163. background-repeat: no-repeat;
  1164. scroll-view{
  1165. width: 610rpx;
  1166. height: 306rpx;
  1167. padding: 20rpx 10rpx 0;
  1168. margin: 300rpx auto 0;
  1169. box-sizing: border-box;
  1170. }
  1171. .item{
  1172. display: flex;
  1173. align-items: center;
  1174. width: 100%;
  1175. height: 164rpx;
  1176. 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==');
  1177. background-repeat: no-repeat;
  1178. background-size: 100% 100%;
  1179. margin-bottom: 20rpx;
  1180. border-radius: 20rpx;
  1181. position: relative;
  1182. .left{
  1183. width: 160rpx;
  1184. text-align: center;
  1185. &::after{
  1186. content: "";
  1187. display: block;
  1188. height: 110rpx;
  1189. border-right: 1px dashed #E6E6E6;
  1190. position: absolute;
  1191. left: 178rpx;
  1192. top: 25rpx;
  1193. }
  1194. .price{
  1195. color: #E93323;
  1196. font-size: 26rpx;
  1197. font-weight: bold;
  1198. text{
  1199. font-size: 46rpx;
  1200. }
  1201. }
  1202. .max_price{
  1203. color: #999999;
  1204. font-size: 18rpx;
  1205. margin-top: 8rpx;
  1206. }
  1207. }
  1208. .right{
  1209. width: 432rpx;
  1210. padding: 0 20rpx;
  1211. .title{
  1212. color: #333333;
  1213. font-size: 26rpx;
  1214. }
  1215. .time{
  1216. color: #999999;
  1217. font-size: 22rpx;
  1218. margin-top: 20rpx;
  1219. }
  1220. .bnt1{
  1221. .titleSize{
  1222. font-weight: 700;
  1223. font-size: 33rpx;
  1224. }
  1225. .titleColor{
  1226. margin-top: 20rpx;
  1227. color: #999999;
  1228. }
  1229. }
  1230. .coupon_type{
  1231. position: absolute;
  1232. color: #fff;
  1233. font-size: 15rpx;
  1234. width: 30rpx;
  1235. text-align: center;
  1236. height: auto;
  1237. background: #E93323;
  1238. top: 0;
  1239. right: 20rpx;
  1240. line-height: 26rpx;
  1241. padding: 5rpx 0 15rpx;
  1242. writing-mode: vertical-lr;
  1243. word-wrap: break-word;
  1244. display: flex;
  1245. /*#ifdef MP*/
  1246. align-items: center;
  1247. /*#endif*/
  1248. justify-content: center;
  1249. &::after{
  1250. content: "";
  1251. width: 0;
  1252. height: 0;
  1253. border-left: 14rpx solid transparent;
  1254. border-right: 14rpx solid transparent;
  1255. border-bottom: 14rpx solid #fff;
  1256. position: absolute;
  1257. bottom: -4rpx;
  1258. left: 2rpx;
  1259. }
  1260. }
  1261. }
  1262. }
  1263. .text{
  1264. width: 600rpx;
  1265. margin: 30rpx auto 0;
  1266. font-size: 20rpx;
  1267. color: #ffffff;
  1268. }
  1269. .icon-guanbi3{
  1270. color: #ffffff;
  1271. font-size: 70rpx;
  1272. position: absolute;
  1273. bottom: -80rpx;
  1274. left: 320rpx;
  1275. }
  1276. }
  1277. }
  1278. .item_tags{
  1279. margin-top: 8rpx;
  1280. display: flex;
  1281. }
  1282. .item_tags .tags_item {
  1283. display: inline-block;
  1284. font-size: 20rpx;
  1285. text-align: center;
  1286. border-radius: 5rpx;
  1287. padding: 0 4rpx;
  1288. line-height: 28rpx;
  1289. margin-right: 8rpx;
  1290. }
  1291. .item_tags .tags_item.ticket{
  1292. color: var(--view-theme);
  1293. border: 1px solid var(--view-theme);
  1294. }
  1295. .item_tags .tags_item.delivery{
  1296. color: #FF9000;
  1297. border: 1px solid #FF9000;
  1298. }
  1299. .copyRight{
  1300. margin: 60rpx auto 20rpx;
  1301. max-width: 690rpx;
  1302. font-size: 20rpx;
  1303. color: #707070;
  1304. text-decoration: none;
  1305. }
  1306. .share-box {
  1307. z-index: 1000;
  1308. position: fixed;
  1309. left: 0;
  1310. top: 0;
  1311. width: 100%;
  1312. height: 100%;
  1313. image {
  1314. width: 100%;
  1315. height: 100%;
  1316. }
  1317. }
  1318. .error-network {
  1319. position: fixed;
  1320. left: 0;
  1321. top: 0;
  1322. display: flex;
  1323. flex-direction: column;
  1324. align-items: center;
  1325. width: 100%;
  1326. height: 100%;
  1327. padding-top: 40rpx;
  1328. background: #fff;
  1329. padding-top: 30%;
  1330. image {
  1331. width: 414rpx;
  1332. height: 336rpx;
  1333. }
  1334. .title {
  1335. position: relative;
  1336. top: -40rpx;
  1337. font-size: 32rpx;
  1338. color: #666;
  1339. }
  1340. .con {
  1341. font-size: 24rpx;
  1342. color: #999;
  1343. .label {
  1344. margin-bottom: 20rpx;
  1345. }
  1346. .item {
  1347. margin-bottom: 20rpx;
  1348. }
  1349. }
  1350. .btn {
  1351. display: flex;
  1352. align-items: center;
  1353. justify-content: center;
  1354. width: 508rpx;
  1355. height: 86rpx;
  1356. margin-top: 100rpx;
  1357. border: 1px solid #d74432;
  1358. color: #e93323;
  1359. font-size: 30rpx;
  1360. border-radius: 120rpx;
  1361. }
  1362. }
  1363. .area-row {
  1364. overflow: hidden;
  1365. text-overflow: ellipsis;
  1366. white-space: nowrap;
  1367. display: block;
  1368. width: 100%;
  1369. text-align: center;
  1370. }
  1371. .page-index {
  1372. display: flex;
  1373. flex-direction: column;
  1374. min-height: 100%;
  1375. }
  1376. .productList {
  1377. background-color: #f1f1f1;
  1378. min-height: 70vh;
  1379. .sort {
  1380. width: 710rpx;
  1381. max-height: 380rpx;
  1382. background: rgba(255, 255, 255, 1);
  1383. border-radius: 16rpx;
  1384. padding: 8rpx 0rpx 30rpx;
  1385. flex-wrap: wrap;
  1386. margin: 25rpx auto 0 auto;
  1387. .item {
  1388. width: 20%;
  1389. margin-top: 30rpx;
  1390. text-align: center;
  1391. .pictrues {
  1392. width: 90rpx;
  1393. height: 90rpx;
  1394. background: rgba(248, 248, 248, 1);
  1395. border-radius: 50%;
  1396. margin: 0 auto;
  1397. }
  1398. .easy-loadimage {
  1399. width: 90rpx;
  1400. height: 90rpx;
  1401. display: inline-block;
  1402. }
  1403. .text {
  1404. color: #272727;
  1405. font-size: 24rpx;
  1406. margin-top: 10rpx;
  1407. overflow: hidden;
  1408. white-space: nowrap;
  1409. text-overflow: ellipsis;
  1410. }
  1411. }
  1412. }
  1413. }
  1414. .productList .list {
  1415. padding: 0 20rpx;
  1416. }
  1417. .productList .list.on {
  1418. background-color: #fff;
  1419. border-top: 1px solid #f6f6f6;
  1420. }
  1421. .productList .list .item {
  1422. width: 345rpx;
  1423. margin-top: 20rpx;
  1424. background-color: #fff;
  1425. border-radius: 10rpx;
  1426. .name{
  1427. display: flex;
  1428. align-items: center;
  1429. }
  1430. }
  1431. .productList .list .item.on {
  1432. width: 100%;
  1433. display: flex;
  1434. border-bottom: 1px solid #f6f6f6;
  1435. padding: 30rpx 0;
  1436. margin: 0;
  1437. }
  1438. .productList .list .item .pictrue {
  1439. position: relative;
  1440. width: 100%;
  1441. height: 345rpx;
  1442. }
  1443. .productList .list .item .pictrue.on {
  1444. width: 180rpx;
  1445. height: 180rpx;
  1446. }
  1447. /deep/.productList .list .item .pictrue image,
  1448. /deep/.productList .list .item .pictrue uni-image,
  1449. /deep/.productList .list .item .pictrue .easy-loadimage{
  1450. width: 100%;
  1451. height: 100%;
  1452. border-radius: 10rpx 10rpx 0 0;
  1453. }
  1454. /deep/.productList .list .item .pictrue uni-image.origin-img{
  1455. border-radius: 10rpx 10rpx 0 0;
  1456. }
  1457. .productList .list .item .pictrue image.on {
  1458. border-radius: 6rpx;
  1459. }
  1460. .productList .list .item .text {
  1461. padding: 14rpx 17rpx 26rpx 17rpx;
  1462. font-size: 28rpx;
  1463. color: #212121;
  1464. }
  1465. .productList .list .item .text.on {
  1466. width: 508rpx;
  1467. padding: 0 0 0 22rpx;
  1468. }
  1469. .productList .list .item .text .money {
  1470. font-size: 26rpx;
  1471. font-weight: bold;
  1472. margin-top: 8rpx;
  1473. }
  1474. .productList .list .item .text .coupon {
  1475. background: rgba(255, 248, 247, 1);
  1476. border: 1px solid rgba(233, 51, 35, 1);
  1477. border-radius: 4rpx;
  1478. font-size: 20rpx;
  1479. margin-left: 18rpx;
  1480. padding: 1rpx 4rpx;
  1481. }
  1482. .productList .list .item .text .money.on {
  1483. margin-top: 50rpx;
  1484. }
  1485. .productList .list .item .text .money .num {
  1486. font-size: 34rpx;
  1487. }
  1488. .pictrue {
  1489. position: relative;
  1490. .border-picture {
  1491. position: absolute;
  1492. top: 0;
  1493. left: 0;
  1494. width: 100%;
  1495. height: 100%;
  1496. border-radius: 10rpx 10rpx 0 0;
  1497. background: center/cover no-repeat;
  1498. }
  1499. }
  1500. .cate_pictrue,/deep/.cate_pictrue image,/deep/.cate_pictrue .easy-loadimage,/deep/.cate_pictrue uni-image{
  1501. width: 82rpx;
  1502. height: 82rpx;
  1503. margin: 0 auto;
  1504. }
  1505. .fixed {
  1506. z-index: 100;
  1507. position: fixed;
  1508. left: 0;
  1509. top: 0;
  1510. background-color: #fff;
  1511. box-shadow: 0 10rpx 20rpx -5rpx rgba(0, 0, 0, 0.06);
  1512. }
  1513. .page-footer {
  1514. position: fixed;
  1515. bottom: 0;
  1516. z-index: 30;
  1517. display: flex;
  1518. align-items: center;
  1519. justify-content: space-around;
  1520. width: 100%;
  1521. height: calc(98rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  1522. height: calc(98rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  1523. box-sizing: border-box;
  1524. border-top: 1px solid #F3F3F3;
  1525. background-color: #fff;
  1526. box-shadow: 0px 0px 17rpx 1rpx rgba(206, 206, 206, 0.32);
  1527. padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
  1528. padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/
  1529. &.filter{
  1530. filter: blur(2rpx);
  1531. }
  1532. .foot-item {
  1533. display: flex;
  1534. width: max-content;
  1535. align-items: center;
  1536. justify-content: center;
  1537. flex-direction: column;
  1538. position: relative;
  1539. .count-num {
  1540. position: absolute;
  1541. display: flex;
  1542. justify-content: center;
  1543. align-items: center;
  1544. width: 40rpx;
  1545. height: 40rpx;
  1546. top: 0rpx;
  1547. right: -15rpx;
  1548. color: #fff;
  1549. font-size: 20rpx;
  1550. background-color: #FD502F;
  1551. border-radius: 50%;
  1552. padding: 4rpx;
  1553. }
  1554. }
  1555. .foot-item image {
  1556. height: 50rpx;
  1557. width: 50rpx;
  1558. text-align: center;
  1559. margin: 0 auto;
  1560. }
  1561. .foot-item .txt {
  1562. font-size: 24rpx;
  1563. }
  1564. }
  1565. </style>