index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937
  1. <template>
  2. <view>
  3. <view class='productList' :style="viewColor">
  4. <view class='search acea-row row-between-wrapper' :class="'styleType'+store_street_theme">
  5. <view class="back" @click='backjJump()'>
  6. <view class="iconfont icon-xiangzuo"></view>
  7. </view>
  8. <view class='input acea-row row-between-wrapper'><text class='iconfont icon-sousuo'></text>
  9. <input placeholder='搜索店铺名称' placeholder-class='placeholder' confirm-type='search' name="search" :value='sotreParam.keyword'
  10. @confirm="searchSubmit"></input>
  11. </view>
  12. <view v-if="mer_location == 1" :class="'styleType'+store_street_theme" style="text-align: right;" class='iconfont search-right' @click='showMaoLocation(latitude,longitude)'>
  13. <view class="iconfont icon-dingwei"></view>
  14. <view class="right-text" v-if="recommend_address">
  15. {{recommend_address}}
  16. </view>
  17. <view class="iconfont icon-xiangyou" v-if="recommend_address"></view>
  18. </view>
  19. </view>
  20. <view class="nav-wrapper" :class="'styleType'+store_street_theme">
  21. <view class='nav acea-row row-middle' :class="'styleType'+store_street_theme">
  22. <view v-for="item in downMenus" :key="item.key" class='item' :class="{'font-colors':firstKey == item.key}" @click='set_where(item.key)'>
  23. <view class="">
  24. {{item.title}}
  25. </view>
  26. <view class="line" :class="{'font-line':firstKey == item.key}">
  27. </view>
  28. </view>
  29. <view class="item" @click="bindRight">
  30. <view>筛选
  31. <!-- <text class="iconfont icon-shaixuan"></text> -->
  32. </view>
  33. <view class="line">
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. <!-- 店铺 -->
  39. <block>
  40. <view class="mer-box">
  41. <block v-if="store_street_theme == 1">
  42. <view class="mer-item" v-for="(item,index) in storeList" :key='index'>
  43. <view class="mer-hd" @click="goStore(item.mer_id)">
  44. <image :src="item.mini_banner?item.mini_banner:item.mer_banner"></image>
  45. <view class="mer-name">
  46. <image :src="item.mer_avatar"></image>
  47. <view class="">
  48. <view class="mer-top">
  49. <view class="txt line1">{{item.mer_name}}</view>
  50. <text v-if="item.type_name" class="font-bg-red ml8">{{item.type_name}}</text>
  51. <text v-else-if="item.is_trader" class="font-bg-red ml8">自营</text>
  52. </view>
  53. <view class="mer-btn">
  54. <view class="">
  55. {{item.care_count<10000 ? item.care_count : (item.care_count/10000).toFixed(2)+'万'}}人关注
  56. </view>
  57. <view class="line" v-if="item.distance"></view>
  58. <view class="distance" v-if="item.distance" @click.stop="showStoreLocation(item)">
  59. <view class="">
  60. {{item.distance}}
  61. </view>
  62. <view class="iconfont icon-xiangyou"></view>
  63. </view>
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. <view class="pro-box" :class="'styleType'+store_street_theme">
  69. <navigator :url="`/pages/goods_details/index?id=${itemn.product_id}`" hover-class="none" class="pro-item" v-for="(itemn,indexn) in item.recommend" :key='indexn' v-if="item.recommend.length<=3">
  70. <easy-loadimage mode="widthFix" :image-src="itemn.image"></easy-loadimage>
  71. <view class="price">
  72. <text>¥</text>{{itemn.price}}
  73. </view>
  74. </navigator>
  75. </view>
  76. </view>
  77. </block>
  78. <block v-if="store_street_theme == 2">
  79. <view class="mer-item2" v-for="(item,index) in storeList" :key='index'>
  80. <view class="mer-hd mer-shop-count" @click="goStore(item.mer_id)">
  81. <image class="mer-avatar" :src="item.mer_avatar"></image>
  82. <view class="mer-shop-right">
  83. <view class="mer-count">
  84. <view class="mer-top">
  85. <view class="txt line1">{{item.mer_name}}</view>
  86. <text v-if="item.type_name" class="font-bg-red ml8">{{item.type_name}}</text>
  87. <text v-else-if="item.is_trader" class="font-bg-red ml8">自营</text>
  88. </view>
  89. <view class="mer-btn">
  90. <view class="">
  91. {{item.care_count<10000 ? item.care_count : (item.care_count/10000).toFixed(2)+'万'}}人关注
  92. </view>
  93. <view class="line" v-if="item.distance"></view>
  94. <view class="distance" v-if="item.distance" @click.stop="showStoreLocation(item)">
  95. <view class="">
  96. {{item.distance}}
  97. </view>
  98. <view class="iconfont icon-xiangyou"></view>
  99. </view>
  100. </view>
  101. </view>
  102. <view class="pro-box">
  103. <navigator :url="`/pages/goods_details/index?id=${itemn.product_id}`" hover-class="none" class="pro-item" v-for="(itemn,indexn) in item.recommend" :key='indexn' v-if="item.recommend.length<=3">
  104. <easy-loadimage mode="widthFix" :image-src="itemn.image"></easy-loadimage>
  105. <view class="price">
  106. <text>¥</text>{{itemn.price}}
  107. </view>
  108. </navigator>
  109. </view>
  110. </view>
  111. </view>
  112. </view>
  113. </block>
  114. <block v-if="store_street_theme == 3">
  115. <view class="mer-item mer-item3" v-for="(item,index) in storeList" :key='index' :style="'background-image:url('+item.mer_banner+')'">
  116. <view class="mer-hd" @click="goStore(item.mer_id)">
  117. <view class="mer-name">
  118. <image :src="item.mer_avatar"></image>
  119. <view class="">
  120. <view class="mer-top">
  121. <view class="txt line1">{{item.mer_name}}</view>
  122. <text v-if="item.type_name" class="font-bg-red ml8">{{item.type_name}}</text>
  123. <text v-else-if="item.is_trader" class="font-bg-red ml8">自营</text>
  124. </view>
  125. <view class="mer-btn">
  126. <view class="">
  127. {{item.care_count<10000 ? item.care_count : (item.care_count/10000).toFixed(2)+'万'}}人关注
  128. </view>
  129. <view class="line" v-if="item.distance"></view>
  130. <view class="distance" v-if="item.distance" @click.stop="showStoreLocation(item)">
  131. <view class="">
  132. {{item.distance}}
  133. </view>
  134. <view class="iconfont icon-xiangyou"></view>
  135. </view>
  136. </view>
  137. </view>
  138. </view>
  139. </view>
  140. <view class="pro-box" :class="'styleType'+store_street_theme">
  141. <navigator :url="`/pages/goods_details/index?id=${itemn.product_id}`" hover-class="none" class="pro-item" v-for="(itemn,indexn) in item.recommend" :key='indexn' v-if="item.recommend.length<=3">
  142. <image :src="itemn.image"></image>
  143. <view class="price">
  144. <text>¥</text>{{itemn.price}}
  145. </view>
  146. </navigator>
  147. </view>
  148. </view>
  149. </block>
  150. <view class='loadingicon acea-row row-center-wrapper' v-if="loading">
  151. <text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
  152. </view>
  153. </view>
  154. <view class='no-shop' v-if="!storeList.length && !loading && !loadingIcon" v-cloak>
  155. <view class='pictrue' style="margin: 0 auto;">
  156. <image src='http://ygs.hqgjsmc.com/baseimg/noCart.png'></image>
  157. <text>暂无店铺,快去搜索其他店铺吧</text>
  158. </view>
  159. </view>
  160. </block>
  161. </view>
  162. <rightSlider v-if="rightBox" :status="rightBox" :merList="merList" :storeTypeArr="storeTypeArr" @confirm="confirm" @close="close"></rightSlider>
  163. </view>
  164. </template>
  165. <script>
  166. // +----------------------------------------------------------------------
  167. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  168. // +----------------------------------------------------------------------
  169. // | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
  170. // +----------------------------------------------------------------------
  171. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  172. // +----------------------------------------------------------------------
  173. // | Author: CRMEB Team <admin@crmeb.com>
  174. // +----------------------------------------------------------------------
  175. import { storeMerchantList, getGeocoder } from '@/api/store.js';
  176. import recommend from '@/components/recommend';
  177. import rightSlider from '@/components/rightSlider/index';
  178. import { merClassifly, getStoreTypeApi } from '@/api/store.js';
  179. import { mapGetters } from "vuex";
  180. import { goShopDetail } from '@/libs/order.js'
  181. import { configMap } from '@/utils';
  182. import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
  183. const app = getApp();
  184. export default {
  185. components: {
  186. recommend,
  187. rightSlider,
  188. easyLoadimage
  189. },
  190. data() {
  191. return {
  192. price: 0,
  193. stock: 0,
  194. nows: false,
  195. loading: false,
  196. loadingIcon: true,
  197. loadTitle: '加载更多',
  198. title: '',
  199. hotPage: 1,
  200. hotLimit: 10,
  201. hotScroll: false,
  202. // 筛选框
  203. rightBox: false,
  204. //品牌列表
  205. brandList: [],
  206. downKey: 0,
  207. downStatus: false,
  208. // 下拉菜单
  209. downMenu: [{
  210. title: '默认',
  211. key: 0,
  212. order: ""
  213. },
  214. {
  215. title: '销量',
  216. key: 1,
  217. order: 'sales'
  218. },
  219. {
  220. title: '好评',
  221. key: 2,
  222. order: 'rate'
  223. },
  224. {
  225. title: '距离',
  226. key: 3,
  227. order: 'location'
  228. }
  229. ],
  230. // 是否第一个
  231. firstKey: 0,
  232. // 商铺列表
  233. storeList: [],
  234. sotreParam: {
  235. keyword: '',
  236. page: 1,
  237. limit: 10,
  238. order: '',
  239. category_id : '',
  240. type_id: ''
  241. },
  242. storeKey: 0,
  243. storeScroll: true,
  244. mer_id: '',
  245. sortId: '',
  246. price_on: '',
  247. price_off: '',
  248. detaile_address: "",
  249. recommend_address: "",
  250. location_address: "",
  251. latitude: "",
  252. longitude: "",
  253. count: 0,
  254. storeTypeArr: [], //店铺类型
  255. merList: [], //商户分类
  256. };
  257. },
  258. onLoad() {
  259. this.storeList = [];
  260. if (this.mer_location == 1) {
  261. this.selfLocation()
  262. } else{
  263. this.storeMerchantList();
  264. }
  265. this.getClassfication();
  266. this.getStoreType();
  267. },
  268. computed: {
  269. downMenus: function() {
  270. return this.downMenu.filter((item) => {
  271. if (this.mer_location) {
  272. return item
  273. } else {
  274. return item.key < 3
  275. }
  276. })
  277. },
  278. ...configMap({
  279. mer_location: 0,
  280. store_street_theme: 1,
  281. hide_mer_status: '',
  282. }, mapGetters(['viewColor'])),
  283. },
  284. methods: {
  285. // 获取商户分类
  286. getClassfication: function() {
  287. let temp = []
  288. merClassifly()
  289. .then(res => {
  290. temp = res.data.map(item => {
  291. return {
  292. ...item,
  293. check: false
  294. }
  295. })
  296. if (this.sotreParam.category_id.length > 0) {
  297. this.sotreParam.category_id.forEach((ids, index) => {
  298. temp.forEach(el => {
  299. if (ids == el.merchant_category_id) {
  300. el.check = true
  301. }
  302. })
  303. })
  304. }
  305. this.merList = temp
  306. })
  307. .catch(res => {
  308. this.$util.Tips({
  309. title: res
  310. });
  311. });
  312. },
  313. // 获取店铺类型
  314. getStoreType: function() {
  315. let temp = []
  316. getStoreTypeApi()
  317. .then(res => {
  318. temp = res.data.map(item => {
  319. return {
  320. ...item,
  321. check: false
  322. }
  323. })
  324. if (this.sotreParam.type_id.length > 0) {
  325. this.sotreParam.type_id.forEach((ids, index) => {
  326. temp.forEach(el => {
  327. if (ids == el.mer_type_id) {
  328. el.check = true
  329. }
  330. })
  331. })
  332. }
  333. this.storeTypeArr = temp
  334. })
  335. .catch(res => {
  336. this.$util.Tips({
  337. title: res
  338. });
  339. });
  340. },
  341. /** 打开地图**/
  342. showMaoLocation(lat, long) {
  343. if (!lat || !long) return this.$util.Tips({
  344. title: '请设置允许商城访问您的位置!'
  345. });
  346. //#ifdef H5
  347. if (this.$wechat.isWeixin() === true) {
  348. this.$wechat.seeLocation({
  349. latitude: Number(lat),
  350. longitude: Number(long),
  351. address: this.location_address
  352. }).then(res=>{
  353. console.log('success');
  354. })
  355. }else{
  356. //#endif
  357. uni.openLocation({
  358. latitude: parseFloat(lat),
  359. longitude: parseFloat(long),
  360. address: this.location_address,
  361. scale: 8,
  362. success: function(res) {
  363. console.log(res)
  364. },
  365. });
  366. // #ifdef H5
  367. }
  368. //#endif
  369. },
  370. showStoreLocation(item) {
  371. if (!item.lat || !item.long) return this.$util.Tips({
  372. title: '请设置允许商城访问您的位置!'
  373. });
  374. //#ifdef H5
  375. if (this.$wechat.isWeixin() === true) {
  376. this.$wechat.seeLocation({
  377. latitude: Number(item.lat),
  378. longitude: Number(item.long),
  379. name: item.mer_name,
  380. address: item.mer_address ? item.mer_address: '',
  381. }).then(res=>{
  382. console.log('success');
  383. })
  384. }else{
  385. //#endif
  386. uni.openLocation({
  387. latitude: parseFloat(item.lat),
  388. longitude: parseFloat(item.long),
  389. scale: 8,
  390. name: item.mer_name,
  391. address: item.mer_address ? item.mer_address: '',
  392. success: function(res) {
  393. console.log(res)
  394. },
  395. });
  396. // #ifdef H5
  397. }
  398. //#endif
  399. },
  400. selfLocation() {
  401. let self = this
  402. uni.getLocation({
  403. type: 'gcj02',
  404. success: (res) => {
  405. let latitude, longitude;
  406. latitude = res.latitude.toString();
  407. longitude = res.longitude.toString();
  408. this.latitude = res.latitude
  409. this.longitude = res.longitude
  410. getGeocoder({
  411. lat: latitude,
  412. long: longitude
  413. }).then(res => {
  414. console.log(res)
  415. this.detaile_address = res.data.address;
  416. this.location_address = res.data.address;
  417. this.recommend_address = res.data.address.length > 4 ? res.data.address.slice(0,4) + '...' : res.data.address
  418. })
  419. },
  420. fail: (res) => {
  421. uni.showToast({
  422. title: res,
  423. icon: 'none',
  424. duration: 1000
  425. });
  426. },
  427. complete: (res) => {
  428. this.storeMerchantList();
  429. }
  430. });
  431. },
  432. // 查找店铺
  433. storeMerchantList() {
  434. if (this.loading) return
  435. this.loading = true
  436. let rqData = {
  437. keyword: this.sotreParam.keyword,
  438. page: this.sotreParam.page,
  439. limit: 10,
  440. order: this.sotreParam.order,
  441. category_id: this.sotreParam.category_id,
  442. type_id: this.sotreParam.type_id
  443. }
  444. if (this.latitude) {
  445. rqData.location = this.latitude + ',' + this.longitude
  446. }
  447. storeMerchantList(rqData).then(res => {
  448. this.count = res.data.count
  449. this.storeList = this.storeList.concat(res.data.list)
  450. this.loading = false
  451. this.loadingIcon = false
  452. })
  453. },
  454. // 进店
  455. goStore(id) {
  456. if (this.hide_mer_status != 1) {
  457. uni.navigateTo({
  458. url: `/pages/store/index?id=${id}`
  459. })
  460. }
  461. },
  462. searchSubmit: function(e) {
  463. let that = this;
  464. that.$set(that.sotreParam, 'keyword', e.detail.value);
  465. this.set_where(this.firstKey)
  466. },
  467. // 右侧切换
  468. bindRight() {
  469. this.sotreParam.page = 1
  470. this.rightBox = true
  471. },
  472. // 组件确定
  473. confirm(data) {
  474. let arr1 = [],arr2 = []
  475. if (data.storeTypeArr.length == 0) {
  476. this.sotreParam.type_id = ''
  477. } else {
  478. data.storeTypeArr.forEach(item => {
  479. arr1.push(item.mer_type_id)
  480. })
  481. this.sotreParam.type_id = arr1.toString();
  482. }
  483. if (data.merList.length == 0) {
  484. this.sotreParam.category_id = ''
  485. } else {
  486. data.merList.forEach(item => {
  487. arr2.push(item.merchant_category_id)
  488. })
  489. this.sotreParam.category_id = arr2.toString();
  490. }
  491. this.rightBox = data.status
  492. this.loadend = false;
  493. this.$set(this.sotreParam, 'page', 1)
  494. this.storeList = [];
  495. this.storeMerchantList();
  496. },
  497. // 组件关闭
  498. close() {
  499. this.rightBox = false
  500. },
  501. //点击事件处理
  502. set_where: function(e) {
  503. if (this.loading) return
  504. this.storeList = []
  505. this.firstKey = e
  506. this.sotreParam.page = 1
  507. this.sotreParam.order = this.downMenu[e].order
  508. this.storeMerchantList();
  509. },
  510. backjJump() {
  511. uni.navigateBack({
  512. delta: 1
  513. })
  514. },
  515. },
  516. //刷新
  517. onPullDownRefresh() {},
  518. //上划加载更多
  519. onReachBottom() {
  520. if (this.count === this.storeList.length) {
  521. if (this.count === 0) {
  522. return
  523. }
  524. uni.showToast({
  525. title: '已加载全部',
  526. icon: 'none',
  527. duration: 1000
  528. });
  529. } else {
  530. this.sotreParam.page += 1
  531. this.storeMerchantList()
  532. }
  533. },
  534. // 滚动监听
  535. onPageScroll(e) {
  536. // 传入scrollTop值并触发所有easy-loadimage组件下的滚动监听事件
  537. uni.$emit('scroll');
  538. }
  539. }
  540. </script>
  541. <style lang="scss">
  542. .productList .search {
  543. width: 100%;
  544. height: 86rpx;
  545. padding: 0 20rpx;
  546. box-sizing: border-box;
  547. position: fixed;
  548. left: 0;
  549. top: 0;
  550. z-index: 9;
  551. display: flex;
  552. flex-wrap: nowrap;
  553. background-color: #fff;
  554. &.styleType1{
  555. background-color: var(--view-theme);
  556. }
  557. .search-right {
  558. display: flex;
  559. align-items: center;
  560. justify-content: space-between;
  561. max-width: max-content;
  562. flex: 1;
  563. padding-left: 20rpx;
  564. }
  565. .right-text {
  566. overflow: hidden;
  567. text-overflow: ellipsis;
  568. white-space: nowrap;
  569. font-size: 28rpx;
  570. width: max-content;
  571. color: #fff;
  572. padding: 0 10rpx;
  573. }
  574. .icon-xiangyou,
  575. .icon-dingwei {
  576. font-size: 30rpx;
  577. color: #fff;
  578. }
  579. }
  580. .search-right.styleType2 .right-text, .search-right.styleType3 .right-text{
  581. color: #282828;
  582. }
  583. .search-right.styleType2 .icon-xiangyou,.search-right.styleType3 .icon-xiangyou{
  584. color: #999999;
  585. }
  586. .search-right.styleType2 .icon-dingwei,.search-right.styleType3 .icon-dingwei{
  587. color: #8A8A8A;
  588. }
  589. .productList .search .back {
  590. display: flex;
  591. align-items: center;
  592. width: 40rpx;
  593. height: 60rpx;
  594. .iconfont {
  595. color: #fff;
  596. font-size: 36rpx;
  597. }
  598. }
  599. .productList .search .input {
  600. flex: 1;
  601. height: 60rpx;
  602. background-color: #fff;
  603. border-radius: 50rpx;
  604. padding: 0 20rpx;
  605. box-sizing: border-box;
  606. }
  607. .productList .search.styleType2 .input,.productList .search.styleType3 .input{
  608. background: #EDEDED;
  609. }
  610. .productList .search .input input {
  611. flex: 1;
  612. height: 100%;
  613. font-size: 26rpx;
  614. margin-left: 10rpx;
  615. }
  616. .productList .search .input .placeholder {
  617. color: #999;
  618. }
  619. .productList .search .input .iconfont {
  620. font-size: 35rpx;
  621. color: #555;
  622. }
  623. .productList .search .icon-pailie,
  624. .productList .search .icon-tupianpailie {
  625. color: #fff;
  626. width: 62rpx;
  627. font-size: 40rpx;
  628. height: 86rpx;
  629. line-height: 86rpx;
  630. }
  631. .productList .nav-wrapper {
  632. z-index: 9;
  633. position: fixed;
  634. left: 0;
  635. top: 0;
  636. width: 100%;
  637. margin-top: 86rpx;
  638. background-color: #fff;
  639. &.styleType1{
  640. background-color: var(--view-theme);
  641. }
  642. .tab-bar {
  643. display: flex;
  644. align-items: center;
  645. .tab-item {
  646. position: relative;
  647. flex: 1;
  648. display: flex;
  649. justify-content: center;
  650. align-items: center;
  651. padding: 8rpx 0 20rpx;
  652. color: #fff;
  653. font-size: 28rpx;
  654. font-weight: bold;
  655. &::after {
  656. content: ' ';
  657. position: absolute;
  658. left: 50%;
  659. bottom: 18rpx;
  660. width: 30rpx;
  661. height: 3rpx;
  662. background: transparent;
  663. transform: translateX(-50%);
  664. }
  665. &.on {
  666. &::after {
  667. background: #fff;
  668. }
  669. }
  670. }
  671. }
  672. }
  673. .productList .nav {
  674. height: 86rpx;
  675. color: #454545;
  676. font-size: 28rpx;
  677. display: flex;
  678. justify-content: space-between;
  679. padding: 0 28rpx;
  680. }
  681. .productList .nav .item {
  682. display: flex;
  683. align-items: center;
  684. justify-content: center;
  685. flex-direction: column;
  686. color: #FFFFFF;
  687. flex: 1;
  688. }
  689. .productList .nav.styleType2 .item,.productList .nav.styleType3 .item {
  690. color: #282828;
  691. }
  692. .productList .nav .item.font-colors {
  693. font-weight: 500;
  694. color: #FFFFFF;
  695. }
  696. .productList .nav.styleType2 .item.font-colors,
  697. .productList .nav.styleType3 .item.font-colors {
  698. color: var(--view-theme);
  699. }
  700. .productList .nav .item .font-line {
  701. height: 4rpx;
  702. background-color: #fff;
  703. margin-top: 3rpx;
  704. width: 28rpx;
  705. animation: line 0.3s;
  706. -moz-animation: line 0.3s;
  707. /* Firefox */
  708. -webkit-animation: line 0.3s;
  709. /* Safari 和 Chrome */
  710. -o-animation: line 0.3s;
  711. /* Opera */
  712. }
  713. .productList .nav.styleType2 .item .font-line,
  714. .productList .nav.styleType3 .item .font-line{
  715. background-color: var(--view-theme);
  716. }
  717. @keyframes line {
  718. from {
  719. width: 0rpx;
  720. }
  721. to {
  722. width: 28rpx;
  723. }
  724. }
  725. .productList .nav .item image {
  726. width: 15rpx;
  727. height: 19rpx;
  728. margin-left: 10rpx;
  729. }
  730. .mer-box {
  731. padding: 20rpx 20rpx;
  732. margin-top: 168rpx;
  733. .mer-item {
  734. margin-bottom: 20rpx;
  735. background-color: #fff;
  736. border-radius: 16rpx;
  737. &.mer-item3{
  738. background-size: cover;
  739. background-repeat: no-repeat;
  740. }
  741. .mer-hd {
  742. position: relative;
  743. width: 100%;
  744. height: 134rpx;
  745. border-radius: 16rpx 16rpx 0 0;
  746. overflow: hidden;
  747. display: flex;
  748. image {
  749. width: 100%;
  750. height: 100%;
  751. }
  752. .mer-name {
  753. position: absolute;
  754. left: 20rpx;
  755. top: 30rpx;
  756. display: flex;
  757. align-items: center;
  758. padding: 0 10rpx;
  759. image {
  760. width: 79rpx;
  761. height: 79rpx;
  762. border: 1px solid #fff;
  763. border-radius: 50%;
  764. margin-right: 10rpx;
  765. }
  766. .txt {
  767. flex: 1;
  768. }
  769. }
  770. }
  771. /deep/.easy-loadimage{
  772. width: 100%;
  773. height: 214rpx;
  774. border-radius: 8rpx;
  775. }
  776. .pro-box {
  777. display: flex;
  778. align-items: center;
  779. padding: 20rpx 20rpx 30rpx;
  780. .pro-item {
  781. width: 218rpx;
  782. margin-right: 14rpx;
  783. /deep/image,uni-image {
  784. width: 100%;
  785. height: 214rpx;
  786. border-radius: 8rpx;
  787. }
  788. .price {
  789. margin-top: 5rpx;
  790. font-size: 28rpx;
  791. color: var(--view-priceColor);
  792. font-weight: bold;
  793. text {
  794. font-size: 28rpx;
  795. }
  796. }
  797. &:last-child {
  798. margin-right: 0;
  799. }
  800. }
  801. &.styleType3{
  802. padding: 20rpx;
  803. .pro-item {
  804. background-color: #fff;
  805. border-radius: 16rpx;
  806. text-align: center;
  807. padding: 10rpx 0 20rpx;
  808. /deep/image,uni-image {
  809. width: 194rpx;
  810. height: 194rpx;
  811. border-radius: 8rpx;
  812. }
  813. }
  814. }
  815. }
  816. }
  817. .mer-top {
  818. display: flex;
  819. align-items: center;
  820. color: #FFFFFF;
  821. font-size: 28rpx;
  822. font-weight: bold;
  823. margin-bottom: 6rpx;
  824. .font-bg-red {
  825. margin-left: 20rpx;
  826. font-size: 18rpx;
  827. padding: 2rpx 10rpx;
  828. color: #fff;
  829. border-radius: 30rpx;
  830. width: auto;
  831. background-color: var(--view-theme);
  832. border-color: var(--view-theme);
  833. }
  834. }
  835. .mer-btn {
  836. color: rgba($color: #fff, $alpha: 0.7);
  837. font-size: 24rpx;
  838. display: flex;
  839. align-items: center;
  840. .line {
  841. width: 2rpx;
  842. height: 18rpx;
  843. color: rgba($color: #fff, $alpha: 0.7);
  844. margin: 0 12rpx;
  845. }
  846. .distance {
  847. display: flex;
  848. align-items: center;
  849. font-size: 24rpx;
  850. .iconfont {
  851. font-size: 24rpx;
  852. line-height: 24rpx;
  853. }
  854. }
  855. }
  856. .more-shop {
  857. display: flex;
  858. align-items: center;
  859. justify-content: center;
  860. background-color: #FFFFFF;
  861. padding: 27rpx 0;
  862. color: #999999;
  863. font-size: 26rpx;
  864. .icon-xiangyou {
  865. font-size: 22rpx;
  866. }
  867. }
  868. }
  869. .mer-item2{
  870. padding: 20rpx;
  871. background: #fff;
  872. margin-bottom: 20rpx;
  873. border-radius: 16rpx;
  874. .mer-shop-count{
  875. display: flex;
  876. .mer-avatar{
  877. width: 100rpx;
  878. height: 100rpx;
  879. }
  880. .mer-top{
  881. color: #282828;
  882. }
  883. .mer-shop-right{
  884. margin-left: 20rpx;
  885. .mer-btn{
  886. color: #666666;
  887. }
  888. }
  889. .pro-box {
  890. display: flex;
  891. align-items: center;
  892. margin-top: 20rpx;
  893. .pro-item {
  894. width: 170rpx;
  895. margin-right: 20rpx;
  896. /deep/image,uni-image,/deep/.easy-loadimage {
  897. width: 100%;
  898. height: 170rpx;
  899. border-radius: 8rpx;
  900. }
  901. .price {
  902. margin-top: 5rpx;
  903. font-size: 28rpx;
  904. color: var(--view-priceColor);
  905. font-weight: bold;
  906. text {
  907. font-size: 28rpx;
  908. }
  909. }
  910. &:last-child {
  911. margin-right: 0;
  912. }
  913. }
  914. }
  915. }
  916. }
  917. .no-shop {
  918. background-color: #fff;
  919. padding-bottom: calc(100% - 176rpx);
  920. .pictrue {
  921. display: flex;
  922. flex-direction: column;
  923. align-items: center;
  924. color: $uni-nothing-text;
  925. image {
  926. width: 414rpx;
  927. height: 380rpx;
  928. }
  929. }
  930. }
  931. </style>