index.vue 33 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307
  1. <template>
  2. <view class="container">
  3. <!-- 小程序头部兼容 -->
  4. <!-- #ifdef MP -->
  5. <!-- <view class="input-box flex" @click="clickSearch">
  6. <view class=" input-content flex">
  7. <view class="iconfont iconsearch"></view>
  8. <view class="input"><input type="text" disabled placeholder="请输入搜索内容" /></view>
  9. </view>
  10. </view>
  11. <view class="mp-height"></view> -->
  12. <!-- #endif -->
  13. <!-- 头部轮播 -->
  14. <!-- <view class="headerInput" >
  15. <input type="text" placeholder="请输入搜索内容"/>
  16. </view> -->
  17. <view class="carousel-section" style="background-color: #fff;">
  18. <view class="headerInput" @click="clickSearch">
  19. <image src="../../static/img/is.png" mode=""></image>请输入搜索内容
  20. <!-- <input type="text" value="" placeholder="请输入搜索内容" /> -->
  21. </view>
  22. <!-- 标题栏和状态栏占位符 -->
  23. <view class="titleNview-placing"></view>
  24. <!-- 背景色区域 -->
  25. <view class="titleNview-background">
  26. <image src="../../static/img/index-bg.png"></image>
  27. </view>
  28. <swiper class="carousel" autoplay="true" duration="400" interval="5000" @change="swiperChange">
  29. <swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item" @click="bannerNavToUrl(item)"><image :src="item.pic" /></swiper-item>
  30. </swiper>
  31. <!-- 自定义swiper指示器 -->
  32. <!-- <view class="swiper-dots">
  33. <text class="num">{{ swiperCurrent + 1 }}</text>
  34. <text class="sign">/</text>
  35. <text class="num">{{ swiperLength }}</text>
  36. </view> -->
  37. </view>
  38. <!-- 分类 -->
  39. <view class="cate-section">
  40. <view class="cate-item" @click="tabTo('/pages/category/category')">
  41. <image src="/static/icon/in1.png"></image>
  42. <text>全部分类</text>
  43. </view>
  44. <navigator url="/pages/product/classify?type=2">
  45. <view class="cate-item">
  46. <image src="/static/icon/in2.png"></image>
  47. <text>热销专区</text>
  48. </view>
  49. </navigator>
  50. <navigator url="/pages/money/USDT">
  51. <view class="cate-item">
  52. <image src="/static/icon/in3.png"></image>
  53. <text>充值送积分</text>
  54. </view>
  55. </navigator>
  56. <!-- <navigator url="/pages/index/sign"> -->
  57. <view class="cate-item" @click="Toshare">
  58. <image src="/static/icon/in4.png"></image>
  59. <text>邀请有礼</text>
  60. </view>
  61. <!-- </navigator> -->
  62. </view>
  63. <!-- 精选好物 -->
  64. <view class="goods">
  65. <hot-goods :goodsList="goodsList"></hot-goods>
  66. </view>
  67. <!-- <br> -->
  68. <!-- 为你推荐 -->
  69. <view class="recommend-h">
  70. <recommend :bastList="bastList"></recommend>
  71. </view>
  72. <!-- <view class="ad-1"><image src="/static/temp/ad1.jpg" mode="scaleToFill"></image></view> -->
  73. <!-- 可领取优惠券 -->
  74. <!-- <scroll-view class="coupon-box clamp" :scroll-x="true">
  75. <view v-for="(item, index) in couponArray" :key="item.id" class="coupon-list">
  76. <view class="row flex">
  77. <view class="list-money flex">
  78. <image :src="item.is_use ? '/static/img/img02.png' : '/static/img/img03.png'" mode="scaleToFill"></image>
  79. <view class="list-money-text">
  80. <view class="tit" :class="{ noAction: item.is_use }">
  81. <text>{{ item.coupon_price }}</text>
  82. </view>
  83. </view>
  84. </view>
  85. <view class="list-interval position-relative">
  86. <view class="bottom"></view>
  87. <view class="top"></view>
  88. </view>
  89. <view class="row_list_right">
  90. <view class="right_top"><text class="right_title" :class="{ noAction: item.is_use }">满减券</text></view>
  91. <view class="right_time">
  92. <text>满{{ item.use_min_price }}使用</text>
  93. </view>
  94. </view>
  95. <view class="right_use" :class="{ noAction: item.is_use }" @click="setCoupons(item)">
  96. <text>{{ item.is_use ? '已领取' : '立即领取' }}</text>
  97. </view>
  98. </view>
  99. </view>
  100. </scroll-view>
  101. -->
  102. <!-- 秒杀楼层 -->
  103. <!-- <seckill></seckill> -->
  104. <!-- 砍价 -->
  105. <!-- <view class="hot-goods"> -->
  106. <!-- <view class="hot-headers flex-upDown-center"> -->
  107. <!-- <image class="img" src="../../static/img/img44.png"></image> -->
  108. <!-- <view class="hot-title">超值砍价</view>
  109. <view><view class="more" @click.stop="navTo('/pages/activity/goods_bargain/index')">更多</view></view>
  110. </view> -->
  111. <!-- <view class="hot-lists" v-for="(baritem, barindex) in bargainlist" :key="barindex" @click.stop="navToDetailPages(baritem)">
  112. <view class="hot-produce">
  113. <view class="produce-image"><image :src="baritem.image"></image></view>
  114. <view class="produce-content">
  115. <view class="produce-price1 ">
  116. <view class="produce-name line2">{{ baritem.title }}</view>
  117. <view class="produce-info">
  118. 已抢
  119. <text style="color: #FF383E">{{ baritem.sales }}</text>
  120. 箱/仅剩
  121. <text style="color:#FF383E">{{ baritem.stock }}</text>
  122. </view>
  123. <view class="produce-center">
  124. <view class="kanjia_word">
  125. <view class="word-1">原价:¥{{ baritem.price }}</view>
  126. <view class="word-2">
  127. 砍后价
  128. <text style="font-size: 24rpx;">¥</text>
  129. <text style="font-size: 36rpx;">{{ baritem.min_price }}</text>
  130. </view>
  131. </view>
  132. <view
  133. class="kanjia_button flex-center"
  134. @tap.stop="openSubscribe('/pages/activity/goods_bargain_details/index?id=' + baritem.id + '&bargain=' + userInfo.uid)"
  135. >
  136. <view>查看详情</view>
  137. </view>
  138. </view>
  139. </view>
  140. </view>
  141. </view> -->
  142. <!-- </view> -->
  143. <!-- </view> -->
  144. <!-- 拼团楼层 -->
  145. <!-- <view class="recommend flex">
  146. <view class="recommend_list" @click="change(ls.id)" v-for="ls in recommend">
  147. <view class="re_title" v-bind:class="{ active_color: ls.id == checkid }">{{ ls.re_title }}</view>
  148. <view class="re_name" v-bind:class="{ active_color: ls.id == checkid }">{{ ls.re_name }}</view>
  149. <image class="selected_icon" v-bind:class="{ active: ls.id == checkid }" src="/static/img/img04.png"></image>
  150. </view>
  151. </view>
  152. <swiper id="list-box" @change="listChange" :style="{ height: swiperHeight + 'px' }" :current="checkid">
  153. <swiper-item> -->
  154. <!-- <scroll-view scroll-y="true" class="list-box-h"> -->
  155. <!-- <view class="guess-section">
  156. <view v-for="(item, index) in bastList" :key="index" class="guess-item" @click="navToDetailPage(item)">
  157. <view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
  158. <text class="title clamp margin-c-20">{{ item.store_name }}</text>
  159. <view class="cmy-hr"></view>
  160. <view class="price margin-c-20 flex">
  161. <view>
  162. <text class="font-size-sm ">¥</text>
  163. {{ item.price }}
  164. </view>
  165. <view class="font-size-sm">
  166. <text class="font-color-gray">{{ item.sales }}人购买</text>
  167. </view>
  168. </view>
  169. </view>
  170. </view> -->
  171. <!-- </scroll-view> -->
  172. <!-- </swiper-item> -->
  173. <!-- <swiper-item>
  174. <scroll-view scroll-y="true" class="list-box-h">
  175. <view class="guess-section">
  176. <view v-for="(item, index) in goodsList" :key="index" class="guess-item" @click="navToDetailPage(item)">
  177. <view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
  178. <text class="title clamp margin-c-20">{{ item.store_name }}</text>
  179. <view class="cmy-hr"></view>
  180. <view class="price margin-c-20 flex">
  181. <view>
  182. <text class="font-size-sm ">¥</text>
  183. {{ item.price }}
  184. </view>
  185. <view class="font-size-sm">
  186. <text class="font-color-gray">{{ item.sales }}人购买</text>
  187. </view>
  188. </view>
  189. </view>
  190. </view>
  191. </scroll-view>
  192. </swiper-item>
  193. <swiper-item>
  194. <scroll-view scroll-y="true">
  195. <view class="guess-section">
  196. <view v-for="(item, index) in bastBanner" :key="index" class="guess-item" @click="navToDetailPage(item)">
  197. <navigator :url="item.link">
  198. <view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
  199. <text class="title clamp margin-c-20">{{ item.store_name }}</text>
  200. <view class="cmy-hr"></view>
  201. <view class="price margin-c-20 flex">
  202. <view>
  203. <text class="font-size-sm ">¥</text>
  204. {{ item.price }}
  205. </view>
  206. <view class="font-size-sm">
  207. <text class="font-color-gray">库存{{ item.stock + item.unit_name }}</text>
  208. </view>
  209. </view>
  210. </navigator>
  211. </view>
  212. </view>
  213. </scroll-view>
  214. </swiper-item>
  215. </swiper>
  216. -->
  217. <!-- 精品 商品 -->
  218. <!-- <view class="f-header m-t">
  219. <view class="f-left-icon"></view>
  220. <view class="tit-box"><text class="tit">精品推荐</text></view>
  221. <navigator url="/pages/product/classify?type=1"><text class="iconfont iconenter">更多</text></navigator>
  222. </view>
  223. <view class="guess-section">
  224. <view v-for="(item, index) in bastList" :key="index" class="guess-item" @click="navToDetailPage(item)">
  225. <view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
  226. <text class="title clamp margin-c-20">{{ item.store_name }}</text>
  227. <view class="cmy-hr"></view>
  228. <view class="price margin-c-20 flex">
  229. <view>
  230. <text class="font-size-sm ">¥</text>
  231. {{ item.price }}
  232. </view>
  233. <view class="font-size-sm">
  234. <text class="font-color-gray">{{ item.sales }}人购买</text>
  235. </view>
  236. </view>
  237. </view>
  238. </view> -->
  239. <!-- 最新 商品 -->
  240. <!-- <view class="f-header m-t">
  241. <view class="f-left-icon"></view>
  242. <view class="tit-box"><text class="tit">最新商品</text></view>
  243. <navigator url="/pages/product/classify?type=3"><text class="iconfont iconenter">更多</text></navigator>
  244. </view>
  245. <view class="guess-section">
  246. <view v-for="(item, index) in goodsList" :key="index" class="guess-item" @click="navToDetailPage(item)">
  247. <view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
  248. <text class="title clamp margin-c-20">{{ item.store_name }}</text>
  249. <view class="cmy-hr"></view>
  250. <view class="price margin-c-20 flex">
  251. <view>
  252. <text class="font-size-sm ">¥</text>
  253. {{ item.price }}
  254. </view>
  255. <view class="font-size-sm">
  256. <text class="font-color-gray">{{ item.sales }}人购买</text>
  257. </view>
  258. </view>
  259. </view>
  260. </view> -->
  261. <!-- 促销 商品 -->
  262. <!-- <view class="f-header m-t">
  263. <view class="f-left-icon"></view>
  264. <view class="tit-box"><text class="tit">促销商品</text></view>
  265. <navigator url="/pages/product/classify?type=4"><text class="iconfont iconenter">更多</text></navigator>
  266. </view>
  267. <view class="guess-section">
  268. <view v-for="(item, index) in bastBanner" :key="index" class="guess-item" @click="navToDetailPage(item)">
  269. <view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
  270. <text class="title clamp margin-c-20">{{ item.store_name }}</text>
  271. <view class="cmy-hr"></view>
  272. <view class="price margin-c-20 flex">
  273. <view>
  274. <text class="font-size-sm ">¥</text>
  275. {{ item.price }}
  276. </view>
  277. <view class="font-size-sm">
  278. <text class="font-color-gray">{{ item.sales }}人购买</text>
  279. </view>
  280. </view>
  281. </view>
  282. </view> -->
  283. <!-- 会员升级专区 -->
  284. <!-- <view class="f-header m-t">
  285. <view class="f-left-icon"></view>
  286. <view class="tit-box"><text class="tit">会员升级专区</text></view>
  287. <text class="iconfont iconenter">更多</text>
  288. </view> -->
  289. <!-- <view class="uservip flex">
  290. <image @error="onImageError('userServant', 0)" lazy-load :src="userServant[0].image" mode="aspectFill"></image>
  291. <view class="detail">
  292. <view class="title">满园春1999元会员升级礼包</view>
  293. <view class="icon">自营</view>
  294. <view class="flex price-box">
  295. <view class="price">
  296. <text class="font-size-sm">¥</text>
  297. 18888
  298. </view>
  299. <view class="text">115人购买</view>
  300. </view>
  301. </view>
  302. </view> -->
  303. <!-- 精品推荐 -->
  304. <!-- <view class="f-header m-t">
  305. <view class="f-left-icon"></view>
  306. <view class="tit-box"><text class="tit">精品推荐</text></view>
  307. <text class="iconfont iconenter">更多</text>
  308. </view> -->
  309. <!-- <view class="guess-section">
  310. <view v-for="(item, index) in goodsList" :key="index" class="guess-item" @click="navToDetailPage(item)">
  311. <view class="image-wrapper"><image @error="onImageError('goodsList', index)" lazy-load :src="item.image" mode="aspectFill"></image></view>
  312. <text class="title clamp margin-c-20">
  313. <text class="icon">自营</text>
  314. {{ item.title }}
  315. </text>
  316. <view class="hr"></view>
  317. <view class="price margin-c-20 flex">
  318. <view>
  319. <text class="font-size-sm ">¥</text>
  320. {{ item.price }}
  321. </view>
  322. <view class="font-size-sm">
  323. <view class='detail'>
  324. <text class="icon">代理价</text>
  325. <text></text>
  326. </view>
  327. <view class="detail">
  328. <text class="font-color-yellow">会员价</text>
  329. <text class="font-color-yellow">7.5折</text>
  330. </view>
  331. </view>
  332. </view>
  333. <view class="tip">兑换价¥44+44积分</view>
  334. </view>
  335. </view> -->
  336. <view class="Mask" v-show="shareShow">
  337. <image @click="share" src="http://shicai.liuniu946.com/static/img/shareimg4.png"></image>
  338. <view class="Toshare" @click="Toshare"></view>
  339. <view class="Tocancel" @click="Tocancel"></view>
  340. </view>
  341. </view>
  342. </template>
  343. <script>
  344. import seckill from '../../components/seckill/seckill.vue';
  345. import hotGoods from './child/hotGoods.vue';
  346. import recommend from './child/recommend.vue'
  347. import { loadIndexs } from '@/api/index.js';
  348. import { getUserInfo } from '@/api/user.js';
  349. import { setCoupons } from '@/api/functionalUnit.js';
  350. import { getBargainList } from '@/api/product.js';
  351. import { interceptor } from '@/utils/loginUtils';
  352. import { mapState } from 'vuex';
  353. export default {
  354. components: {
  355. seckill,
  356. hotGoods,
  357. recommend
  358. },
  359. watch: {
  360. //自适应swiper高度
  361. checkid(newValue, oldValue) {
  362. let obj = this;
  363. if (newValue == 0) {
  364. let bHeight = Math.ceil(obj.bastList.length / 2);
  365. obj.swiperHeight = Math.ceil(obj.pageProportion * 520 * bHeight);
  366. }
  367. if (newValue == 1) {
  368. let bHeight = Math.ceil(obj.goodsList.length / 2);
  369. obj.swiperHeight = Math.ceil(obj.pageProportion * 520 * bHeight);
  370. }
  371. if (newValue == 2) {
  372. let bHeight = Math.ceil(obj.bastBanner.length / 2);
  373. obj.swiperHeight = Math.ceil(obj.pageProportion * 520 * bHeight);
  374. }
  375. },
  376. // 初次加载页面高度时修改页面高度
  377. bastList(newValue, oldValue) {
  378. let obj = this;
  379. let bHeight = Math.ceil(newValue.length / 2);
  380. obj.$nextTick(function() {
  381. uni.createSelectorQuery()
  382. .select('#list-box')
  383. .fields(
  384. {
  385. size: true
  386. },
  387. function(data) {
  388. obj.pageProportion = data.width / 750;
  389. obj.swiperHeight = Math.ceil(obj.pageProportion * 520 * bHeight);
  390. }
  391. )
  392. .exec();
  393. });
  394. }
  395. },
  396. data() {
  397. return {
  398. shareShow: false, //分享海报
  399. pageProportion: 0, //保存页面基于750宽度的比例
  400. swiperHeight: 0,
  401. checkid: 0,
  402. titleNViewBackground: '',
  403. swiperCurrent: 0,
  404. swiperLength: 0,
  405. bargainlist: [], //砍价商品
  406. carouselList: [], //轮播列表
  407. goodsList: [], //最新商品列表
  408. bastList: [], //精品推荐列表
  409. bastBanner: [], //促销商品列表
  410. menusList: [], //头部菜单
  411. page: 1,
  412. limit: 5,
  413. userServant: [
  414. {
  415. image: ''
  416. }
  417. ], //用户推广服务
  418. couponArray: [], //可领取优惠券
  419. recommend: [
  420. {
  421. id: 0,
  422. re_title: '精选',
  423. re_name: '为你推荐'
  424. },
  425. {
  426. id: 1,
  427. re_title: '最新',
  428. re_name: '最新好货优选'
  429. },
  430. {
  431. id: 2,
  432. re_title: '便宜好货',
  433. re_name: '90天便宜好货'
  434. }
  435. ],
  436. actTime: new Date()
  437. };
  438. },
  439. computed: {
  440. ...mapState(['loginInterceptor']),
  441. ...mapState('user', ['hasLogin','userInfo'])
  442. },
  443. onLoad: function(option) {
  444. // #ifndef MP
  445. if (option.spread) {
  446. // 存储其他邀请人
  447. uni.setStorageSync('spread', option.spread);
  448. }
  449. // #endif
  450. // #ifdef MP
  451. if (option.scene) {
  452. // 存储小程序邀请人
  453. uni.setStorage({
  454. key: 'spread_code',
  455. data: option.scene
  456. });
  457. }
  458. // #endif
  459. },
  460. onShow: function() {
  461. // 判断是否强制登录
  462. if (this.loginInterceptor && !this.hasLogin) {
  463. // 登录拦截
  464. interceptor();
  465. }
  466. this.loadData();
  467. this.getBargainList();
  468. },
  469. //下拉刷新
  470. onPullDownRefresh() {
  471. this.loadData();
  472. },
  473. // #ifndef MP
  474. // 监听导航栏输入框点击事件
  475. onNavigationBarSearchInputClicked(e) {
  476. //跳转到搜索页面
  477. this.clickSearch();
  478. },
  479. //点击导航栏 buttons 时触发
  480. onNavigationBarButtonTap(e) {
  481. const index = e.index;
  482. if (index === 0) {
  483. this.$api.msg('点击了扫描');
  484. } else if (index === 1) {
  485. // #ifdef APP-PLUS
  486. const pages = getCurrentPages();
  487. const page = pages[pages.length - 1];
  488. const currentWebview = page.$getAppWebview();
  489. currentWebview.hideTitleNViewButtonRedDot({
  490. index
  491. });
  492. // #endif
  493. uni.navigateTo({
  494. url: '/pages/user/notice'
  495. });
  496. }
  497. },
  498. // #endif
  499. methods: {
  500. //跳转
  501. tabTo(url) {
  502. uni.switchTab({
  503. url: url
  504. })
  505. },
  506. //砍价商品推荐详情页
  507. navToDetailPages(item) {
  508. let id = item.product_id;
  509. //let type = 2;
  510. uni.navigateTo({
  511. url: '/pages/product/product?id=' + id
  512. });
  513. },
  514. openSubscribe: function(e) {
  515. let page = e;
  516. // #ifndef MP
  517. uni.navigateTo({
  518. url: page
  519. });
  520. // #endif
  521. // #ifdef MP
  522. uni.showLoading({
  523. title: '正在加载'
  524. });
  525. openBargainSubscribe()
  526. .then(res => {
  527. uni.hideLoading();
  528. uni.navigateTo({
  529. url: page
  530. });
  531. })
  532. .catch(err => {
  533. uni.hideLoading();
  534. });
  535. // #endif
  536. },
  537. getBargainList() {
  538. let that = this;
  539. getBargainList({
  540. page: that.page,
  541. limit: that.limit
  542. })
  543. .then(function(res) {
  544. that.$set(that, 'bargainlist', res.data.slice(0, 2));
  545. })
  546. .catch(res => {
  547. console.log(res, 'getBargainList');
  548. });
  549. },
  550. Mask() {
  551. this.MaskShow = false;
  552. this.shareShow = true;
  553. uni.setStorage({
  554. key: 'FirstEntry',
  555. data: true,
  556. success: function() {
  557. console.log(uni.getStorageSync('FirstEntry'), 'Mask');
  558. }
  559. });
  560. },
  561. Toshare() {
  562. if (this.userInfo == '') {
  563. getUserInfo({})
  564. .then(({ data }) => {
  565. this.setUserInfo(data);
  566. this.userInfo = data;
  567. })
  568. .catch(e => {});
  569. } else {
  570. this.shareShow = false;
  571. uni.navigateTo({
  572. url: '/pages/user/shareQrCode?spread=' + this.userInfo.uid
  573. });
  574. }
  575. },
  576. Tocancel() {
  577. this.shareShow = false;
  578. },
  579. // 监听切换事件
  580. listChange(e) {
  581. this.checkid = e.detail.current;
  582. },
  583. // 點擊搜索框
  584. clickSearch() {
  585. uni.navigateTo({
  586. url: '/pages/product/search'
  587. });
  588. },
  589. // 点击触发领取优惠券
  590. setCoupons(item) {
  591. // 判断是否已经领取了优惠券
  592. let obj = this;
  593. uni.showModal({
  594. title: '领取提示',
  595. content: '是否领取优惠券',
  596. success(e) {
  597. if (e.confirm) {
  598. setCoupons({ couponId: item.id }).then(e => {
  599. item.is_use = true;
  600. uni.showToast({
  601. title: '领取成功',
  602. type: 'top',
  603. duration: 2000
  604. });
  605. });
  606. }
  607. }
  608. });
  609. },
  610. //商品种类切换
  611. change(item) {
  612. let id = item;
  613. this.checkid = id;
  614. if (this.checkid == 1) {
  615. // console.log(1);
  616. this.detail = this.selected_detail;
  617. } else if (this.checkid == 2) {
  618. // console.log(2);
  619. this.detail = this.new_product;
  620. } else {
  621. this.detail = this.cheap_good;
  622. }
  623. },
  624. // 监听图片加载完成
  625. onImageError(key, index) {
  626. this[key][index].image = '/static/error/errorImage.jpg';
  627. },
  628. // 请求载入数据
  629. async loadData() {
  630. loadIndexs({})
  631. .then(({ data }) => {
  632. let goods = data.info;
  633. this.carouselList = data.banner;
  634. this.swiperLength = this.carouselList.length;
  635. this.menusList = data.menus;
  636. this.goodsList = goods.firstList; //最新商品
  637. console.log(goods.firstList)
  638. this.bastList = goods.bastList; //精品推荐
  639. this.bastBanner = data.benefit; //促销单品
  640. this.$set(this, 'couponArray', data.couponList); //保存卡包券
  641. uni.stopPullDownRefresh();
  642. })
  643. .catch(e => {
  644. uni.stopPullDownRefresh();
  645. });
  646. },
  647. //轮播图切换修改背景色
  648. swiperChange(e) {
  649. const index = e.detail.current;
  650. this.swiperCurrent = index;
  651. this.titleNViewBackground = this.carouselList[index].background;
  652. },
  653. //详情页
  654. navToDetailPage(item) {
  655. let id = item.id;
  656. uni.navigateTo({
  657. url: '/pages/product/product?id=' + id
  658. });
  659. },
  660. // 轮播图跳转
  661. bannerNavToUrl(item) {
  662. // #ifdef H5
  663. if (item.wap_url.indexOf('http') > 0) {
  664. window.location.href = item.wap_url;
  665. }
  666. // #endif
  667. //测试数据没有写id,用title代替
  668. uni.navigateTo({
  669. url: item.wap_url
  670. });
  671. }
  672. }
  673. };
  674. </script>
  675. <style lang="scss">
  676. //搜索栏
  677. .headerInput {
  678. z-index: 9;
  679. background-color: rgba(255,255,255,0.5);
  680. border-radius: 25rpx;
  681. padding: 8rpx 28rpx;
  682. width: 90%;
  683. position: relative;
  684. top: 30px;
  685. left: 5%;
  686. text-align: center;
  687. color: #fff;
  688. image {
  689. width: 34rpx;
  690. height: 34rpx;
  691. margin-bottom: -5rpx;
  692. margin-right: 10rpx;
  693. }
  694. }
  695. //精选好物
  696. .goods {
  697. margin-top: 20rpx;
  698. background-color: #fff;
  699. padding: 40rpx 5%;
  700. margin-bottom: 20rpx;
  701. }
  702. //为你推荐
  703. .recommend-h {
  704. margin: 0rpx auto;
  705. background-color: #fff;
  706. padding-top: 30rpx;
  707. font-size: 26rpx;
  708. }
  709. .Mask {
  710. width: 100%;
  711. height: 100vh;
  712. position: fixed;
  713. z-index: 99999;
  714. background-color: rgba(0, 0, 0, 0.7);
  715. top: 0;
  716. image {
  717. width: 100%;
  718. height: 100vh;
  719. }
  720. }
  721. // 热销商品
  722. .hot-goods {
  723. margin: 0 25rpx;
  724. padding: 5rpx 25rpx 30rpx 25rpx;
  725. background-color: #fff;
  726. border-radius: 10rpx;
  727. .hot-headers {
  728. margin: 25rpx 0;
  729. width: 100%;
  730. display: flex;
  731. .img {
  732. width: 32rpx;
  733. height: 32rpx;
  734. margin-right: 10rpx;
  735. }
  736. .hot-title {
  737. font-size: 30rpx;
  738. margin-right: 15rpx;
  739. }
  740. .more {
  741. line-height: 1;
  742. padding: 5rpx 10rpx 5rpx 15rpx;
  743. text-align: center;
  744. font-size: 20rpx;
  745. border-radius: 15rpx;
  746. color: #ffffff;
  747. background: linear-gradient(90deg, rgba(250, 52, 38, 1) 0%, rgba(249, 30, 83, 1) 100%);
  748. image {
  749. width: 20rpx;
  750. height: 20rpx;
  751. }
  752. }
  753. }
  754. .hot-lists {
  755. line-height: 1;
  756. display: flex;
  757. .hot-produce {
  758. width: 100%;
  759. height: 260rpx;
  760. border-top: 1px solid #f0f0f0;
  761. display: flex;
  762. padding-top: 28rpx;
  763. .produce-image {
  764. width: 200rpx;
  765. height: 200rpx;
  766. image {
  767. width: 200rpx;
  768. height: 200rpx;
  769. border: 1px solid #f0f0f0;
  770. }
  771. }
  772. .produce-content {
  773. // flex-direction: column;
  774. margin-left: 30rpx;
  775. height: 200rpx;
  776. position: relative;
  777. width: calc(100% - 200rpx - 30rpx);
  778. .produce-name {
  779. font-size: 28rpx;
  780. font-weight: bold;
  781. line-height: 35rpx;
  782. color: #343434;
  783. }
  784. .produce-info {
  785. font-size: 20rpx;
  786. margin-top: 25rpx;
  787. }
  788. .produce-price {
  789. display: flex;
  790. align-items: flex-end;
  791. color: #ff383e;
  792. font-size: 24rpx;
  793. margin-top: 70rpx;
  794. font-weight: bold;
  795. text {
  796. font-size: 36rpx;
  797. }
  798. .produce-price-1 {
  799. font-size: 22rpx;
  800. font-weight: 500;
  801. text-decoration: line-through;
  802. color: rgba(170, 170, 170, 1);
  803. margin-left: 20rpx;
  804. }
  805. }
  806. .produce-price1 {
  807. height: 100%;
  808. letter-spacing: 3rpx;
  809. color: #ff383e;
  810. font-size: 24rpx;
  811. font-weight: bold;
  812. .produce-center {
  813. width: 100%;
  814. position: absolute;
  815. bottom: 0;
  816. display: flex;
  817. justify-content: space-between;
  818. align-items: center;
  819. .kanjia_word {
  820. .word-1 {
  821. font-size: 22rpx;
  822. color: #666666;
  823. }
  824. .word-2 {
  825. font-size: 28rpx;
  826. color: #ff383e;
  827. margin-top: 10rpx;
  828. }
  829. }
  830. .kanjia_button {
  831. height: 50rpx;
  832. width: 150rpx;
  833. border-radius: 25rpx;
  834. font-size: 26rpx;
  835. font-weight: 500;
  836. color: #ff383e;
  837. border: 1px solid rgba(255, 56, 62, 1);
  838. }
  839. }
  840. }
  841. }
  842. }
  843. }
  844. }
  845. /* #ifdef MP */
  846. .mp-height {
  847. height: 44px;
  848. }
  849. .input-box {
  850. position: fixed;
  851. top: 0;
  852. left: 0;
  853. width: 100%;
  854. padding: 25rpx;
  855. background-color: #ffffff;
  856. z-index: 999;
  857. height: 44px;
  858. .iconsearch {
  859. font-size: 50rpx;
  860. }
  861. .input-content {
  862. border-radius: 99rpx;
  863. flex-grow: 1;
  864. padding: 10rpx 30rpx;
  865. background-color: rgba(231, 231, 231, 0.7);
  866. .input {
  867. flex-grow: 1;
  868. input {
  869. font-size: $font-lg;
  870. }
  871. }
  872. }
  873. .input-button {
  874. padding-left: 20rpx;
  875. font-size: $font-lg;
  876. height: 100%;
  877. }
  878. }
  879. page {
  880. .cate-section {
  881. position: relative;
  882. z-index: 5;
  883. border-radius: 16rpx 16rpx 0 0;
  884. margin-top: -20rpx;
  885. }
  886. .carousel-section {
  887. padding: 0;
  888. .titleNview-placing {
  889. padding-top: 0;
  890. height: 0;
  891. }
  892. .carousel {
  893. .carousel-item {
  894. padding: 0;
  895. }
  896. }
  897. .swiper-dots {
  898. left: 45rpx;
  899. bottom: 40rpx;
  900. }
  901. }
  902. }
  903. /* #endif */
  904. page {
  905. background: #f7f8f7;
  906. }
  907. .m-t {
  908. margin-top: 16rpx;
  909. }
  910. /* 头部 轮播图 */
  911. .carousel-section {
  912. position: relative;
  913. padding-top: 10px;
  914. overflow: hidden;
  915. .titleNview-placing {
  916. height: var(--status-bar-height);
  917. padding-top: 44px;
  918. box-sizing: content-box;
  919. }
  920. .titleNview-background {
  921. position: absolute;
  922. top: 0;
  923. left: 0;
  924. width: 100%;
  925. image {
  926. // imsisize: 100%;
  927. // height: 100%;
  928. width: 100%;
  929. margin-top: -100rpx;
  930. }
  931. }
  932. .carousel {
  933. width: 100%;
  934. height: 240rpx;
  935. .carousel-item {
  936. width: 100%;
  937. height: 100%;
  938. padding: 0 5%;
  939. overflow: hidden;
  940. }
  941. image {
  942. width: 100%;
  943. height: 100%;
  944. border-radius: $border-radius-sm;
  945. }
  946. }
  947. }
  948. .swiper-dots {
  949. display: flex;
  950. position: absolute;
  951. left: 60rpx;
  952. bottom: 15rpx;
  953. width: 72rpx;
  954. height: 36rpx;
  955. background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAABkCAYAAADDhn8LAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTMyIDc5LjE1OTI4NCwgMjAxNi8wNC8xOS0xMzoxMzo0MCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OTk4MzlBNjE0NjU1MTFFOUExNjRFQ0I3RTQ0NEExQjMiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OTk4MzlBNjA0NjU1MTFFOUExNjRFQ0I3RTQ0NEExQjMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6Q0E3RUNERkE0NjExMTFFOTg5NzI4MTM2Rjg0OUQwOEUiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6Q0E3RUNERkI0NjExMTFFOTg5NzI4MTM2Rjg0OUQwOEUiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4Gh5BPAAACTUlEQVR42uzcQW7jQAwFUdN306l1uWwNww5kqdsmm6/2MwtVCp8CosQtP9vg/2+/gY+DRAMBgqnjIp2PaCxCLLldpPARRIiFj1yBbMV+cHZh9PURRLQNhY8kgWyL/WDtwujjI8hoE8rKLqb5CDJaRMJHokC6yKgSCR9JAukmokIknCQJpLOIrJFwMsBJELFcKHwM9BFkLBMKFxNcBCHlQ+FhoocgpVwwnv0Xn30QBJGMC0QcaBVJiAMiec/dcwKuL4j1QMsVCXFAJE4s4NQA3K/8Y6DzO4g40P7UcmIBJxbEesCKWBDg8wWxHrAiFgT4fEGsB/CwIhYE+AeBAAdPLOcV8HRmWRDAiQVcO7GcV8CLM8uCAE4sQCDAlHcQ7x+ABQEEAggEEAggEEAggEAAgQACASAQQCCAQACBAAIBBAIIBBAIIBBAIABe4e9iAe/xd7EAJxYgEGDeO4j3EODp/cOCAE4sYMyJ5cwCHs4rCwI4sYBxJ5YzC84rCwKcXxArAuthQYDzC2JF0H49LAhwYUGsCFqvx5EF2T07dMaJBetx4cRyaqFtHJ8EIhK0i8OJBQxcECuCVutxJhCRoE0cZwMRyRcFefa/ffZBVPogePihhyCnbBhcfMFFEFM+DD4m+ghSlgmDkwlOgpAl4+BkkJMgZdk4+EgaSCcpVX7bmY9kgXQQU+1TgE0c+QJZUUz1b2T4SBbIKmJW+3iMj2SBVBWz+leVfCQLpIqYbp8b85EskIxyfIOfK5Sf+wiCRJEsllQ+oqEkQfBxmD8BBgA5hVjXyrBNUQAAAABJRU5ErkJggg==);
  956. background-size: 100% 100%;
  957. .num {
  958. width: 36rpx;
  959. height: 36rpx;
  960. border-radius: 50px;
  961. font-size: 24rpx;
  962. color: #fff;
  963. text-align: center;
  964. line-height: 36rpx;
  965. }
  966. .sign {
  967. position: absolute;
  968. top: 0;
  969. left: 50%;
  970. line-height: 36rpx;
  971. font-size: 12rpx;
  972. color: #fff;
  973. transform: translateX(-50%);
  974. }
  975. }
  976. /* 分类 */
  977. .cate-section {
  978. background-color: #fff;
  979. display: flex;
  980. justify-content: space-around;
  981. align-items: center;
  982. flex-wrap: wrap;
  983. padding: 30rpx 22rpx;
  984. .cate-item {
  985. display: flex;
  986. flex-direction: column;
  987. align-items: center;
  988. font-size: 12rpx;
  989. color: #333333;
  990. }
  991. /* 原图标颜色太深,不想改图了,所以加了透明度 */
  992. image {
  993. width: 120rpx;
  994. height: 120rpx;
  995. border-radius: 50%;
  996. }
  997. }
  998. // 中间广告图片
  999. .ad-1 {
  1000. width: 100%;
  1001. height: 210rpx;
  1002. padding: 10rpx 0;
  1003. background: #fff;
  1004. image {
  1005. width: 100%;
  1006. height: 100%;
  1007. }
  1008. }
  1009. /*公用边框样式*/
  1010. %icon {
  1011. margin-right: 10rpx;
  1012. display: inline-block;
  1013. padding: 2rpx 10rpx;
  1014. border: 1rpx solid $color-yellow;
  1015. color: $color-yellow;
  1016. line-height: 1;
  1017. font-size: $font-base;
  1018. border-radius: 10rpx;
  1019. }
  1020. .f-header {
  1021. display: flex;
  1022. align-items: center;
  1023. height: 92rpx;
  1024. padding: 6rpx 30rpx 8rpx;
  1025. image {
  1026. flex-shrink: 0;
  1027. width: 80rpx;
  1028. height: 80rpx;
  1029. margin-right: 20rpx;
  1030. }
  1031. .tit-box {
  1032. @extend %font-title-box;
  1033. }
  1034. .tit {
  1035. @extend %font-title;
  1036. }
  1037. .iconenter {
  1038. font-size: $font-lg + 2rpx;
  1039. color: $font-color-light;
  1040. }
  1041. .f-left-icon {
  1042. @extend %f-left-icon;
  1043. }
  1044. .iconfont {
  1045. font-size: $font-sm - 2rpx;
  1046. }
  1047. }
  1048. // 会员升级礼包
  1049. .uservip {
  1050. border-radius: $border-radius-sm;
  1051. background-color: white;
  1052. box-shadow: $box-shadow;
  1053. height: 300rpx;
  1054. margin: 0 30rpx;
  1055. image {
  1056. height: 100%;
  1057. width: 300rpx;
  1058. }
  1059. .detail {
  1060. position: relative;
  1061. padding: 20rpx;
  1062. height: 100%;
  1063. .icon {
  1064. @extend %icon;
  1065. }
  1066. .price-box {
  1067. position: absolute;
  1068. bottom: 20rpx;
  1069. width: calc(100% - 40rpx);
  1070. .price {
  1071. font-size: $font-lg + 2rpx;
  1072. font-weight: bold;
  1073. color: $font-color-base;
  1074. }
  1075. .text {
  1076. color: $color-gray;
  1077. font-size: $font-sm;
  1078. }
  1079. }
  1080. .title {
  1081. font-size: $font-lg;
  1082. font-weight: bold;
  1083. }
  1084. }
  1085. }
  1086. /* 猜你喜欢 */
  1087. .guess-section {
  1088. display: flex;
  1089. flex-wrap: wrap;
  1090. padding: 0 30rpx;
  1091. .guess-item {
  1092. overflow: hidden;
  1093. display: flex;
  1094. flex-direction: column;
  1095. width: 48%;
  1096. margin-bottom: 4%;
  1097. border-radius: $border-radius-sm;
  1098. background-color: white;
  1099. box-shadow: $box-shadow;
  1100. &:nth-child(2n + 1) {
  1101. margin-right: 4%;
  1102. }
  1103. }
  1104. .image-wrapper {
  1105. width: 100%;
  1106. height: 330rpx;
  1107. border-radius: 3px;
  1108. overflow: hidden;
  1109. image {
  1110. width: 100%;
  1111. height: 100%;
  1112. opacity: 1;
  1113. }
  1114. }
  1115. .title {
  1116. font-size: $font-base;
  1117. color: $font-color-dark;
  1118. font-weight: bold;
  1119. line-height: 80rpx;
  1120. }
  1121. .price {
  1122. font-size: $font-lg;
  1123. color: $font-color-base;
  1124. font-weight: bold;
  1125. line-height: 1;
  1126. line-height: 80rpx;
  1127. }
  1128. .icon {
  1129. @extend %icon;
  1130. }
  1131. .detail {
  1132. line-height: 1;
  1133. }
  1134. .tip {
  1135. color: white;
  1136. background-color: $color-yellow;
  1137. line-height: 1.5;
  1138. font-size: $font-sm;
  1139. padding-left: 20rpx;
  1140. }
  1141. }
  1142. // 推荐
  1143. .recommend {
  1144. width: 95%;
  1145. margin: 0rpx auto;
  1146. padding-top: 30rpx;
  1147. font-size: 26rpx;
  1148. text-align: center;
  1149. align-items: flex-start;
  1150. .recommend_list {
  1151. width: 33%;
  1152. }
  1153. .re_title {
  1154. font-size: 32rpx;
  1155. font-weight: bold;
  1156. }
  1157. .re_name {
  1158. color: #999999;
  1159. padding-top: 10rpx;
  1160. }
  1161. .selected_icon {
  1162. width: 25rpx;
  1163. height: 10rpx;
  1164. margin: 0px auto;
  1165. display: none;
  1166. image {
  1167. width: 100%;
  1168. height: 100%;
  1169. }
  1170. }
  1171. .active {
  1172. display: block;
  1173. }
  1174. .active_color {
  1175. color: #dc4d46 !important;
  1176. }
  1177. }
  1178. // 列表
  1179. .list-box-h {
  1180. height: 1550rpx;
  1181. }
  1182. // 优惠券
  1183. .coupon-list {
  1184. display: inline-block;
  1185. }
  1186. .row {
  1187. border-radius: 15rpx;
  1188. margin: 25rpx;
  1189. height: 155rpx;
  1190. // width: 552rpx;
  1191. overflow: hidden;
  1192. background-color: #ffffff;
  1193. padding-right: 25rpx;
  1194. .list-interval {
  1195. border: 1px dashed $border-color-light;
  1196. height: 100%;
  1197. .top,
  1198. .bottom {
  1199. border-radius: 100rpx;
  1200. width: 30rpx;
  1201. height: 30rpx;
  1202. position: absolute;
  1203. background-color: $page-color-base;
  1204. right: -15rpx;
  1205. }
  1206. .top {
  1207. top: -18rpx;
  1208. }
  1209. .bottom {
  1210. bottom: -18rpx;
  1211. }
  1212. }
  1213. .list-money {
  1214. height: 100%;
  1215. min-width: 155rpx;
  1216. text-align: center;
  1217. image {
  1218. height: 100%;
  1219. width: 20rpx;
  1220. }
  1221. .list-money-text {
  1222. flex-grow: 1;
  1223. padding: 0 25rpx;
  1224. .tit {
  1225. text-align: center;
  1226. padding: 15rpx 0rpx;
  1227. font-size: 55rpx;
  1228. color: $color-red;
  1229. font-weight: bold;
  1230. &.noAction {
  1231. color: $font-color-light;
  1232. }
  1233. }
  1234. .price {
  1235. padding-bottom: 25rpx;
  1236. color: $font-color-light;
  1237. }
  1238. }
  1239. }
  1240. .row_list_right {
  1241. // flex-grow: 1;
  1242. min-width: 200rpx;
  1243. padding-left: 25rpx;
  1244. line-height: 1;
  1245. .right_time {
  1246. padding: 10rpx 0rpx;
  1247. color: $font-color-light;
  1248. font-size: $font-sm;
  1249. }
  1250. .right_top {
  1251. margin: 15rpx 0;
  1252. .right_name {
  1253. font-size: $font-base;
  1254. color: #bc253a;
  1255. font-weight: bold;
  1256. }
  1257. .right_title {
  1258. font-size: $font-base;
  1259. color: $font-base;
  1260. font-weight: bold;
  1261. &.noAction {
  1262. color: $font-color-light;
  1263. }
  1264. }
  1265. }
  1266. }
  1267. .right_use {
  1268. margin: 15rpx 0;
  1269. padding: 10rpx;
  1270. width: 160rpx;
  1271. text-align: center;
  1272. color: #fff;
  1273. background-color: #bc253a;
  1274. border-radius: 50rpx;
  1275. font-size: $font-sm;
  1276. &.noAction {
  1277. background-color: $font-color-light;
  1278. }
  1279. }
  1280. .iconlocation {
  1281. font-size: 36rpx;
  1282. color: $font-color-light;
  1283. }
  1284. }
  1285. </style>