index.vue 28 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153
  1. <template>
  2. <view :style="{ 'background-image': `linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 100%),url(${store.mer_banner})` }"
  3. class="store-home">
  4. <!-- 搜索 -->
  5. <!-- #ifdef MP || APP-PLUS -->
  6. <view :style="{ height: statusBarHeight }"></view>
  7. <view class="header">
  8. <view class="head-menu">
  9. <view class="iconfont icon-xiangzuo" style="color: #fff;"></view>
  10. <view class="iconfont icon-shouye4" @click="goHome" style="color: #fff;"></view>
  11. </view>
  12. <view class="search"><text class="iconfont icon-xiazai5"></text>搜索商品</view>
  13. </view>
  14. <!-- #endif -->
  15. <!-- #ifdef H5 -->
  16. <view class="header">
  17. <view class="head-menu">
  18. <view class="iconfont icon-xiangzuo"></view>
  19. <view class="iconfont icon-shouye4" @click="goHome"></view>
  20. </view>
  21. <view class="search"><text class="iconfont icon-xiazai5"></text>搜索商品</view>
  22. </view>
  23. <!-- #endif -->
  24. <view v-show="navShow && tabActive === 3" class="nav" :style="viewColor">
  25. <view class="nav-cont">
  26. <view :class="{ active: navActive === 0 }" class="item">
  27. <view class="cont">
  28. {{ select.selected ? '评分' : '默认' }}
  29. <text :class="['arrow-icon', 'iconfont', select.show ? 'icon-xiangshang' : 'icon-xiangxia']"></text>
  30. </view>
  31. </view>
  32. <view :class="{ active: navActive === 1 }" class="item">
  33. <view class="cont">销量</view>
  34. </view>
  35. <view :class="{ active: navActive === 2 }" class="item">
  36. <view class="cont">
  37. 价格
  38. <image :src="sortPrice ? domain+'/static/diy/up'+keyColor+'.png' : domain+'/static/diy/down'+keyColor+'.png'"></image>
  39. </view>
  40. </view>
  41. <view class="item">
  42. <view class="cont">
  43. <text :class="['layout-icon', 'iconfont', isColumn ? 'icon-pailie' : 'icon-tupianpailie']"></text>
  44. </view>
  45. </view>
  46. </view>
  47. <view v-show="select.show && navShow" class="select">
  48. <view v-for="item in select.options" :key="item.id" :class="{ active: item.id === select.selected }" class="item">
  49. {{ item.name }}
  50. <text v-if="item.id === select.selected" class="iconfont icon-gou"></text>
  51. </view>
  52. </view>
  53. </view>
  54. <!--diy页面的导航-->
  55. <view v-show="navShow && tabActive == 1" class="nav" :style="viewColor">
  56. <view class="nav-cont">
  57. <view class="item active">
  58. <view class="cont">精选</view>
  59. </view>
  60. <view class="item">
  61. <view class="cont">新品</view>
  62. </view>
  63. <view class="item">
  64. <view class="cont">活动</view>
  65. </view>
  66. <view class="item">
  67. <view class="cont">领券</view>
  68. </view>
  69. </view>
  70. </view>
  71. <scroll-view class="main" scroll-y="true" @scroll="scrollHome" catchtouchmove :style="viewColor">
  72. <!-- 店铺信息 -->
  73. <view id="store" class="store">
  74. <image :src="store.mer_avatar"></image>
  75. <view class="text">
  76. <view class="text-view">
  77. <text v-if="store.type_name" class="font-bg-red">{{store.type_name}}</text>
  78. <text v-else-if="store.is_trader" class="font-bg-red">自营</text>
  79. <text class="name">{{ store.mer_name }}</text>
  80. <text class="iconfont icon-xiangyou"></text>
  81. </view>
  82. <view class="score">
  83. <view class="star">
  84. <view
  85. :style="{width: `${score.star.toFixed(2)}%`, backgroundImage: `url(${domain}/static/diy/score1${keyColor}.png)`}"></view>
  86. </view>
  87. <view>{{ score.number.toFixed(1) }}</view>
  88. </view>
  89. </view>
  90. <view v-if="store.services_type == 0" class="kefu">
  91. <text class="iconfont icon-kefu3"></text>
  92. </view>
  93. <view v-else-if="store.services_type == 1" class="kefu">
  94. <text class="iconfont icon-kefu3"></text>
  95. </view>
  96. <view v-else class="kefu">
  97. <text class="iconfont icon-kefu3"></text>
  98. </view>
  99. <button hover-class="none" :class="store.care ? 'care' : ''" v-if="!isLogin">
  100. <text v-show="!store.care" class="iconfont icon-guanzhu"></text>
  101. {{ store.care ? '已关注' : '关注' }}
  102. </button>
  103. <button v-else hover-class="none" :class="store.care ? 'care' : ''">
  104. <text v-show="!store.care" class="iconfont icon-guanzhu"></text>
  105. {{ store.care ? '已关注' : '关注' }}
  106. </button>
  107. </view>
  108. <view v-show="!navShow && tabActive === 3" class="nav">
  109. <view class="nav-cont">
  110. <view class="item active">
  111. <view class="cont">
  112. {{ select.selected ? '评分' : '默认' }}
  113. <text :class="['arrow-icon', 'iconfont', select.show ? 'icon-xiangshang' : 'icon-xiangxia']"></text>
  114. </view>
  115. </view>
  116. <view class="item">
  117. <view class="cont">
  118. 销量
  119. </view>
  120. </view>
  121. <view class="item">
  122. <view class="cont">
  123. 价格
  124. <image v-if="navActive === 2 && where.order == 'price_asc'" :src="domain+'/static/diy/up'+keyColor+'.png'"></image>
  125. <image v-if="navActive === 2 && where.order == 'price_desc'" :src="domain+'/static/diy/down'+keyColor+'.png'"></image>
  126. </view>
  127. </view>
  128. <view class="item">
  129. <view class="cont">
  130. <text :class="['layout-icon', 'iconfont', isColumn ? 'icon-pailie' : 'icon-tupianpailie']"></text>
  131. </view>
  132. </view>
  133. </view>
  134. <view v-show="select.show && !navShow" class="select">
  135. <view v-for="item in select.options" :key="item.id" :class="{ active: item.id === select.selected }" class="item"
  136. >{{ item.name }}
  137. <text v-if="item.id === select.selected" class="iconfont icon-gou"></text>
  138. </view>
  139. </view>
  140. </view>
  141. <!--diy导航-->
  142. <view v-show="!navShow && tabActive === 1" class="nav">
  143. <view class="nav-cont">
  144. <view class="item active">
  145. <view class="cont">精选</view>
  146. </view>
  147. <view class="item">
  148. <view class="cont">新品</view>
  149. </view>
  150. <view class="item">
  151. <view class="cont">活动</view>
  152. </view>
  153. <view class="item">
  154. <view class="cont">领券</view>
  155. </view>
  156. </view>
  157. <view v-show="select.show && !navShow" class="select">
  158. <view v-for="item in select.options" :key="item.id" :class="{ active: item.id === select.selected }" class="item">
  159. {{ item.name }}
  160. <text v-if="item.id === select.selected" class="iconfont icon-gou"></text>
  161. </view>
  162. </view>
  163. </view>
  164. <view class="tab-cont" :style="viewColor">
  165. <!-- diy组件 -->
  166. <view>
  167. <!-- #ifdef H5 -->
  168. <view v-for="(item, index) in styleConfig" :key="index">
  169. <block v-if="item.name != 'headerSerch' && item.name != 'tabNav' && item.name != 'pageFoot'">
  170. <component
  171. :is="item.name"
  172. :index="index"
  173. :dataConfig="item"
  174. :merId="id"
  175. @detail="goGoodsDetail"
  176. ></component>
  177. </block>
  178. </block>
  179. </view>
  180. <!-- #endif -->
  181. <!-- #ifdef MP || APP-PLUS-->
  182. <block v-for="(item, index) in styleConfig" :key="index" >
  183. <view>
  184. <activeParty v-if="item.name == 'activeParty'" :merId="id" :dataConfig="item"></activeParty>
  185. <articleList v-if="item.name == 'articleList'" :merId="id" :dataConfig="item"></articleList>
  186. <bargain v-if="item.name == 'bargain'" :merId="id" :dataConfig="item"></bargain>
  187. <blankPage v-if="item.name == 'blankPage'" :merId="id" :dataConfig="item"></blankPage>
  188. <combination v-if="item.name == 'combination'" :merId="id" :dataConfig="item"></combination>
  189. <topic v-if="item.name == 'topic'" :merId="id" :dataConfig="item"></topic>
  190. <coupon v-if="item.name == 'coupon'" :merId="id" :dataConfig="item"></coupon>
  191. <goodList v-if="item.name == 'goodList'" :merId="id" :dataConfig="item" @detail="goGoodsDetail"></goodList>
  192. <guide v-if="item.name == 'guide'" :merId="id" :dataConfig="item"></guide>
  193. <liveBroadcast v-if="item.name == 'liveBroadcast'" :merId="id" :dataConfig="item"></liveBroadcast>
  194. <menus v-if="item.name == 'menus'" :merId="id" :dataConfig="item"></menus>
  195. <presellList v-if="item.name == 'presellList'" :merId="id" :dataConfig="item"></presellList>
  196. <richText v-if="item.name == 'richText'" :merId="id" :dataConfig="item"></richText>
  197. <seckill v-if="item.name == 'seckill'" :merId="id" :dataConfig="item"></seckill>
  198. <swiperBg v-if="item.name == 'swiperBg'" :merId="id" :dataConfig="item"></swiperBg>
  199. <pictureCube v-if="item.name == 'pictureCube'" :merId="id" :dataConfig="item"></pictureCube>
  200. <swipers v-if="item.name == 'swipers'" :merId="id" :dataConfig="item"></swipers>
  201. <titles v-if="item.name == 'titles'" :merId="id" :dataConfig="item"></titles>
  202. </view>
  203. </block>
  204. <!-- #endif -->
  205. </view>
  206. </view>
  207. </scroll-view>
  208. <view class="footer" :style="viewColor">
  209. <view v-for="(item, index) in tabs" :key="index" :class="{ active: tabActive === item.value }" class="item">
  210. <view :class="['iconfont', item.icon]"></view>
  211. <view>{{ item.name }}</view>
  212. </view>
  213. </view>
  214. </view>
  215. </template>
  216. <script>
  217. // +----------------------------------------------------------------------
  218. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  219. // +----------------------------------------------------------------------
  220. // | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
  221. // +----------------------------------------------------------------------
  222. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  223. // +----------------------------------------------------------------------
  224. // | Author: CRMEB Team <admin@crmeb.com>
  225. // +----------------------------------------------------------------------
  226. import request from "@/utils/request.js";
  227. import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlow.vue'
  228. import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue'
  229. import {getStoreDetail, getStoreGoods, getStoreCategory, storeServiceList, hasServiceApi} from '@/api/store.js';
  230. import { getDiy } from '@/api/api.js';
  231. import { getUserInfo } from '@/api/user.js';
  232. import { configMap } from "@/utils";
  233. import { mapGetters } from "vuex";
  234. import { goShopDetail } from '@/libs/order.js';
  235. import emptyPage from '@/components/emptyPage.vue'
  236. import { HTTP_REQUEST_URL } from '@/config/app';
  237. import mConfig from '../../store/component/index.js';
  238. // #ifdef MP || APP-PLUS
  239. import activeParty from '../../index/component/activeParty';
  240. import coupon from '../../index/component/coupon';
  241. import bargain from '../../index/component/bargain';
  242. import blankPage from '../../index/component/blankPage';
  243. import combination from '../../index/component/combination';
  244. import goodList from '../../index/component/goodList';
  245. import guide from '../../index/component/guide';
  246. import liveBroadcast from '../../index/component/liveBroadcast';
  247. import menus from '../../index/component/menus';
  248. import topic from '../../index/component/topic';
  249. import presellList from '../../index/component/presellList';
  250. import richText from '../../index/component/richText';
  251. import seckill from '../../index/component/seckill';
  252. import swiperBg from '../../index/component/swiperBg';
  253. import pictureCube from '../../index/component/pictureCube'
  254. import titles from '../../index/component/titles';
  255. // #endif
  256. const app = getApp();
  257. export default {
  258. components: {
  259. ...mConfig,
  260. emptyPage,
  261. WaterfallsFlow,
  262. easyLoadimage,
  263. // #ifdef MP || APP-PLUS
  264. activeParty,
  265. bargain,
  266. coupon,
  267. blankPage,
  268. combination,
  269. goodList,
  270. liveBroadcast,
  271. menus,
  272. topic,
  273. presellList,
  274. richText,
  275. seckill,
  276. swiperBg,
  277. pictureCube,
  278. titles
  279. // #endif
  280. },
  281. data() {
  282. return {
  283. domain: HTTP_REQUEST_URL,
  284. // #ifdef MP
  285. menuButtonInfo: uni.getMenuButtonBoundingClientRect(),
  286. // #endif
  287. id: 0, // 商铺id
  288. did: 0, //diy模板id
  289. store: {}, // 商铺详情
  290. goods: [], // 商铺商品
  291. category: [], // 商铺分类
  292. coupon: [], // 优惠券
  293. styleConfig: [],
  294. isColumn: true, // 商品列表排列方式
  295. navShow: false,
  296. navActive: 0,
  297. diyActive: 0,
  298. tabActive: 1, // 底部切换
  299. keyword: '',
  300. order: '',
  301. sortPrice: true, // 价格排序
  302. goodsLoading: false,
  303. categoryLoading: false,
  304. loadTitle: '加载更多',
  305. loadend: false,
  306. where: {
  307. order: '',
  308. keyword: '',
  309. page: 1,
  310. limit: 30
  311. },
  312. // 下拉菜单
  313. select: {
  314. show: false,
  315. selected: 0,
  316. options: [{
  317. id: 0,
  318. name: '默认'
  319. },
  320. {
  321. id: 1,
  322. name: '评分'
  323. }
  324. ]
  325. },
  326. // 底部菜单
  327. tabs1: [{
  328. icon: 'icon-yizhan_o',
  329. name: '首页',
  330. value: 1,
  331. },
  332. {
  333. icon: 'icon-gouwu_o',
  334. name: '商品',
  335. value: 3,
  336. },
  337. {
  338. icon: 'icon-baoguo_huanbaohe_o',
  339. name: '生活服务',
  340. value: 5,
  341. },
  342. {
  343. icon: 'icon-yingyongAPP_o',
  344. name: '分类',
  345. value: 2,
  346. },
  347. {
  348. icon: 'icon-liwu_o',
  349. name: '专场',
  350. value: 4,
  351. }
  352. ],
  353. // 底部菜单
  354. tabs2: [{
  355. icon: 'icon-yizhan_o',
  356. name: '首页',
  357. value: 1,
  358. },
  359. {
  360. icon: 'icon-gouwu_o',
  361. name: '商品',
  362. value: 3,
  363. },
  364. {
  365. icon: 'icon-yingyongAPP_o',
  366. name: '分类',
  367. value: 2,
  368. },
  369. {
  370. icon: 'icon-zhuanti',
  371. name: '专场',
  372. value: 4,
  373. }
  374. ],
  375. tabs: [],
  376. storeTop: 0,
  377. navHeight: 0,
  378. service_open: false,
  379. type: 0,
  380. statusBarHeight: 0,
  381. }
  382. },
  383. computed: {
  384. score: function() {
  385. let store = this.store,
  386. score = {
  387. star: 0,
  388. number: 0
  389. };
  390. if ('postage_score' in store) {
  391. score.number = (parseFloat(store.postage_score) + parseFloat(store.product_score) + parseFloat(store.service_score)) /
  392. 3;
  393. score.star = score.number / 5 * 100;
  394. }
  395. return score;
  396. },
  397. ...configMap({
  398. margin_ico_switch: 0,
  399. margin_ico: '',
  400. }, mapGetters(['isLogin','uid','viewColor','keyColor'])),
  401. },
  402. watch: {
  403. },
  404. onLoad: function(options) {
  405. this.type = parseInt(options.type) || 1
  406. this.id = options.mer_id || options.id || 0
  407. this.did = options.diy_id || 0
  408. this.order = options.order
  409. this.getStore();
  410. this.diyData();
  411. this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
  412. },
  413. onShow() {
  414. },
  415. onReady: function() {
  416. },
  417. mounted: function() {
  418. const query = uni.createSelectorQuery().in(this);
  419. query.select('#store').boundingClientRect(data => {
  420. this.storeHeight = data.height;
  421. this.storeTop = data.top;
  422. }).exec();
  423. },
  424. methods: {
  425. // 首页
  426. goHome() {
  427. uni.switchTab({
  428. url: '/pages/index/index'
  429. });
  430. },
  431. // 获取diy模板数据
  432. diyData() {
  433. let that = this;
  434. getDiy({id: that.id, did: that.did, version: '221'}).then(res => {
  435. let data = res.data;
  436. that.styleConfig = that.objToArr(data.value);
  437. uni.setNavigationBarTitle({
  438. title: data.title
  439. });
  440. }).catch(err => {
  441. uni.showToast({
  442. title: err,
  443. icon: 'none'
  444. });
  445. });
  446. },
  447. // 对象转数组
  448. objToArr(data) {
  449. let obj = Object.keys(data).sort();
  450. let m = obj.map(key => data[key]);
  451. return m;
  452. },
  453. // 获取商品详情
  454. getStore: function() {
  455. getStoreDetail(this.id).then(res => {
  456. this.store = res.data;
  457. if(this.id == 0){
  458. this.tabs = this.tabs1
  459. }else{
  460. if((res.data.delivery_way.length == 1 && res.data.delivery_way[0] == '1') || res.data.delivery_way.length == 2){
  461. this.tabs = this.tabs1
  462. this.service_open = true
  463. }else{
  464. this.tabs = this.tabs2
  465. this.service_open = false
  466. }
  467. }
  468. }).catch(err => {
  469. this.loading = false;
  470. uni.showToast({
  471. title: err,
  472. icon: 'none'
  473. })
  474. })
  475. },
  476. // 获取商铺商品
  477. getGoods: function() {
  478. let that = this;
  479. if (that.loadend) return;
  480. if (that.loading) return;
  481. if (that.goodsLoading) return;
  482. that.goodsLoading = true;
  483. that.loadTitle = '';
  484. getStoreGoods(that.id, that.where).then(res => {
  485. that.goodsLoading = false;
  486. let list = res.data.list;
  487. let goodsList = that.$util.SplitArray(list, that.goods);
  488. let loadend = list.length < that.where.limit;
  489. that.loadend = loadend;
  490. that.loading = false;
  491. that.loadTitle = loadend ? '已全部加载' : '加载更多';
  492. that.$set(that, 'goods', goodsList);
  493. that.$set(that.where, 'page', that.where.page + 1);
  494. }).catch(err => {
  495. that.loading = false;
  496. that.goodsLoading = false;
  497. uni.showToast({
  498. title: err,
  499. icon: 'none'
  500. })
  501. setTimeout(function() {
  502. uni.navigateBack()
  503. }, 1000);
  504. });
  505. },
  506. // 去商品详情页
  507. goGoodsDetail(item) {
  508. },
  509. // 商铺首页滚动 navbar 吸顶
  510. scrollHome: function(e) {
  511. uni.$emit('scroll');
  512. this.navShow = e.detail.scrollTop >= 50;
  513. },
  514. },
  515. }
  516. </script>
  517. <style lang="scss" scoped>
  518. .tab-cont{
  519. background: #f5f5f5;
  520. min-height: 500rpx;
  521. pointer-events: none;
  522. }
  523. /deep/.care {
  524. background-image: none !important;
  525. border: 1px solid #fff;
  526. background-color: transparent;
  527. }
  528. .store-home {
  529. position: fixed;
  530. top: 0;
  531. right: 0;
  532. bottom: 0;
  533. left: 0;
  534. display: flex;
  535. flex-direction: column;
  536. padding-bottom: 100rpx;
  537. padding-bottom: calc(100rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  538. padding-bottom: calc(100rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  539. background: left top/750rpx 390rpx no-repeat fixed;
  540. overflow: hidden;
  541. }
  542. .header {
  543. position: relative;
  544. z-index: 6;
  545. display: flex;
  546. align-items: center;
  547. padding-right: 34rpx;
  548. height: 43px;
  549. padding-left: 33rpx;
  550. .head-menu {
  551. display: -webkit-box;
  552. display: -webkit-flex;
  553. display: flex;
  554. -webkit-box-align: center;
  555. -webkit-align-items: center;
  556. align-items: center;
  557. height: 27px;
  558. width: 70px;
  559. background: rgba(0, 0, 0, 0.25);
  560. border-radius: 13px;
  561. .icon-xiangzuo {
  562. font-size: 32rpx;
  563. color: #FFFFFF;
  564. }
  565. .iconfont {
  566. -webkit-box-flex: 1;
  567. -webkit-flex: 1;
  568. flex: 1;
  569. text-align: center;
  570. color: #fff;
  571. box-sizing: border-box;
  572. &.icon-xiangzuo {
  573. border-right: 1px solid rgba(255,255,255,.3);
  574. }
  575. }
  576. }
  577. .search {
  578. flex: 1;
  579. display: flex;
  580. align-items: center;
  581. min-width: 0;
  582. height: 58rpx;
  583. border-radius: 29rpx;
  584. margin-left: 32rpx;
  585. background-color: #FFFFFF;
  586. font-weight: 500;
  587. font-size: 26rpx;
  588. color: #999999;
  589. /* #ifdef MP */
  590. margin-right: 200rpx;
  591. /* #endif */
  592. .iconfont {
  593. margin-right: 13rpx;
  594. margin-left: 30rpx;
  595. font-size: 24rpx;
  596. }
  597. }
  598. }
  599. .main_count{
  600. background-color: #ffffff;
  601. padding: 30rpx 20rpx;
  602. .list{
  603. width: 710rpx;
  604. height: 280rpx;
  605. margin-bottom: 30rpx;
  606. position: relative;
  607. .picture{
  608. width: 710rpx;
  609. height: 280rpx;
  610. border-radius: 16rpx;
  611. }
  612. }
  613. }
  614. .main {
  615. flex: 1;
  616. min-height: 0rpx;
  617. box-sizing: border-box;
  618. padding: 0;
  619. }
  620. .store {
  621. position: relative;
  622. z-index: 6;
  623. display: flex;
  624. align-items: center;
  625. padding-right: 20rpx;
  626. padding-left: 20rpx;
  627. padding-top: 20rpx;
  628. padding-bottom: 22rpx;
  629. image {
  630. width: 74rpx;
  631. height: 74rpx;
  632. border-radius: 6rpx;
  633. }
  634. .store-margin{
  635. width: 26rpx;
  636. height: 26rpx;
  637. margin-left: 10rpx;
  638. }
  639. .kefu{
  640. color: #ffffff;
  641. margin-right: 26rpx;
  642. cursor: pointer;
  643. .icon-kefu3{
  644. font-size: 34rpx;
  645. }
  646. }
  647. .text {
  648. flex: 1;
  649. min-width: 0;
  650. margin-right: 20rpx;
  651. margin-left: 20rpx;
  652. .text-view {
  653. display: inline-flex;
  654. align-items: center;
  655. max-width: 100%;
  656. .name {
  657. flex: 1;
  658. min-width: 0;
  659. overflow: hidden;
  660. white-space: nowrap;
  661. text-overflow: ellipsis;
  662. font-weight: bold;
  663. font-size: 30rpx;
  664. line-height: 1;
  665. color: #FFFFFF;
  666. }
  667. .iconfont {
  668. margin-left: 10rpx;
  669. font-size: 17rpx;
  670. color: #FFFFFF;
  671. }
  672. }
  673. .score {
  674. display: flex;
  675. align-items: center;
  676. margin-top: 17rpx;
  677. font-weight: 500;
  678. font-size: 24rpx;
  679. line-height: 1;
  680. color: #FFFFFF;
  681. .star {
  682. position: relative;
  683. width: 111rpx;
  684. height: 19rpx;
  685. margin-right: 10rpx;
  686. background: url(../../columnGoods/images/star.png) left top/100% 100% no-repeat;
  687. overflow: hidden;
  688. view {
  689. position: absolute;
  690. top: 0;
  691. left: 0;
  692. width: 100%;
  693. height: 100%;
  694. background: url(../../columnGoods/images/star_active.png) left top/111rpx 19rpx no-repeat;
  695. &.star_purple{
  696. background: url(../../columnGoods/images/star_active_purple.png) left top/111rpx 19rpx no-repeat;
  697. }
  698. }
  699. }
  700. }
  701. }
  702. button {
  703. display: flex;
  704. justify-content: center;
  705. align-items: center;
  706. width: 113rpx;
  707. height: 48rpx;
  708. border-radius: 24rpx;
  709. background-image: linear-gradient(-90deg, var(--view-bntColor21) 0%, var(--view-bntColor22) 100%);
  710. font-weight: 500;
  711. font-size: 22rpx;
  712. color: #FFFFFF;
  713. .iconfont {
  714. margin-right: 6rpx;
  715. font-size: 22rpx;
  716. }
  717. &.gary {
  718. background-color: #999;
  719. }
  720. }
  721. }
  722. .font-bg-red {
  723. background-color: var(--view-theme);
  724. border: 1px solid var(--view-theme);
  725. }
  726. .nav.fixed {
  727. position: fixed;
  728. left: 0;
  729. width: 100%;
  730. .nav-cont {
  731. position: absolute;
  732. width: 100%;
  733. }
  734. }
  735. .nav {
  736. position: relative;
  737. .nav-cont {
  738. display: flex;
  739. align-items: center;
  740. height: 84rpx;
  741. .item {
  742. flex: 1;
  743. display: flex;
  744. justify-content: center;
  745. align-items: center;
  746. min-width: 0;
  747. .cont {
  748. display: flex;
  749. justify-content: center;
  750. align-items: center;
  751. width: 116rpx;
  752. height: 44rpx;
  753. border-radius: 22rpx;
  754. font-weight: 500;
  755. font-size: 24rpx;
  756. color: #FFFFFF;
  757. .arrow-icon {
  758. margin-left: 10rpx;
  759. font-size: 18rpx;
  760. }
  761. .layout-icon {
  762. font-size: 32rpx;
  763. }
  764. .icon-pailie {
  765. font-size: 32rpx;
  766. }
  767. image {
  768. width: 15rpx;
  769. height: 21rpx;
  770. margin-left: 7rpx;
  771. }
  772. }
  773. }
  774. .active {
  775. .cont {
  776. background-color: #FFFFFF;
  777. font-weight: bold;
  778. color: var(--view-theme);
  779. }
  780. }
  781. }
  782. .select {
  783. position: absolute;
  784. top: 100%;
  785. left: 0;
  786. z-index: 2;
  787. width: 100%;
  788. padding-right: 40rpx;
  789. padding-bottom: 28rpx;
  790. padding-left: 74rpx;
  791. border-bottom-right-radius: 24rpx;
  792. border-bottom-left-radius: 24rpx;
  793. background-color: #FFFFFF;
  794. box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.06);
  795. .item {
  796. margin-top: 28rpx;
  797. font-size: 24rpx;
  798. color: #454545;
  799. }
  800. .active {
  801. color: var(--view-theme);
  802. .iconfont{
  803. color: var(--view-theme);
  804. float: right;
  805. font-size: 20rpx;
  806. }
  807. }
  808. }
  809. }
  810. .goods {
  811. display: flex;
  812. flex-wrap: wrap;
  813. justify-content: space-between;
  814. padding-top: 20rpx;
  815. padding-right: 20rpx;
  816. padding-left: 20rpx;
  817. background-color: #F5F5F5;
  818. width: 750rpx;
  819. .item {
  820. width: 345rpx;
  821. border-radius: 16rpx;
  822. margin-bottom: 20rpx;
  823. background-color: #FFFFFF;
  824. overflow: hidden;
  825. .sell_out {
  826. display: flex;
  827. width: 110rpx;
  828. height: 110rpx;
  829. align-items: center;
  830. justify-content: center;
  831. border-radius: 100%;
  832. background: rgba(0,0,0,.6);
  833. color: #fff;
  834. font-size: 24rpx;
  835. position: absolute;
  836. top: 50%;
  837. left: 50%;
  838. margin: -55rpx 0 0 -55rpx;
  839. &::before{
  840. content: "";
  841. display: block;
  842. width: 100rpx;
  843. height: 100rpx;
  844. border-radius: 100%;
  845. border: 1px dashed #fff;
  846. position: absolute;
  847. top: 5rpx;
  848. left: 5rpx;
  849. }
  850. }
  851. .image,.easy-loadimage,image,uni-image {
  852. width: 345rpx;
  853. height: 345rpx;
  854. image {
  855. display: block;
  856. width: 100%;
  857. height: 100%;
  858. }
  859. }
  860. .text {
  861. padding: 20rpx 20rpx 25rpx;
  862. .name {
  863. font-weight: 500;
  864. font-size: 30rpx;
  865. line-height: 1;
  866. color: #222222;
  867. display: flex;
  868. align-items: center;
  869. .name_text{
  870. display: inline-block;
  871. max-width: 400rpx;
  872. }
  873. }
  874. .money-wrap {
  875. display: flex;
  876. align-items: center;
  877. margin-top: 43rpx;
  878. .money {
  879. font-weight: bold;
  880. font-size: 26rpx;
  881. color: var(--view-priceColor);
  882. text {
  883. font-size: 34rpx;
  884. line-height: 1;
  885. }
  886. }
  887. }
  888. .score {
  889. margin-top: 20rpx;
  890. font-weight: 500;
  891. font-size: 20rpx;
  892. line-height: 1;
  893. color: #737373;
  894. }
  895. }
  896. .item_tags{
  897. margin-top: 8rpx;
  898. }
  899. .item_tags .tags_item {
  900. display: inline-block;
  901. font-size: 20rpx;
  902. text-align: center;
  903. border-radius: 5rpx;
  904. padding: 0 4rpx;
  905. line-height: 28rpx;
  906. margin-right: 8rpx;
  907. }
  908. .item_tags .tags_item.ticket{
  909. border: 1px solid var(--view-theme);
  910. color: var(--view-theme);
  911. }
  912. .item_tags .tags_item.delivery{
  913. color: #FF9000;
  914. border: 1px solid #FF9000;
  915. }
  916. .foot {
  917. display: flex;
  918. justify-content: center;
  919. align-items: center;
  920. height: 52rpx;
  921. background-image: linear-gradient(-90deg, var(--view-bntColor21) 0%, var(--view-bntColor22) 100%);
  922. font-weight: 500;
  923. font-size: 24rpx;
  924. color: #FFFFFF;
  925. .iconfont {
  926. margin-right: 10rpx;
  927. font-size: 22rpx;
  928. line-height: 1;
  929. }
  930. }
  931. }
  932. }
  933. .column {
  934. padding: 0;
  935. background-color: #FFFFFF;
  936. .item {
  937. position: relative;
  938. display: flex;
  939. width: 100%;
  940. padding: 30rpx 20rpx;
  941. border-radius: 0;
  942. margin-bottom: 0;
  943. &::before {
  944. content: " ";
  945. position: absolute;
  946. top: 0;
  947. right: 20rpx;
  948. left: 250rpx;
  949. border-top: 1px solid #F5F5F5;
  950. }
  951. /deep/.image,/deep/.easy-loadimage,/deep/image,/deep/uni-image {
  952. width: 260rpx;
  953. height: 260rpx;
  954. border-radius: 16rpx;
  955. overflow: hidden;
  956. position: relative;
  957. }
  958. .border-picture {
  959. position: absolute;
  960. top: 0;
  961. left: 0;
  962. width: 100%;
  963. height: 100%;
  964. background: center/cover no-repeat;
  965. }
  966. .text {
  967. position: relative;
  968. width: 450rpx;
  969. min-width: 0;
  970. padding-top: 0;
  971. padding-right: 0;
  972. padding-bottom: 0;
  973. .name {
  974. color: #282828;
  975. width: 100%;
  976. display: flex;
  977. }
  978. .item_bot{
  979. width: 100%;
  980. }
  981. .money-wrap {
  982. display: flex;
  983. align-items: center;
  984. margin-top: 52rpx;
  985. .ticket {
  986. height: 28rpx;
  987. padding-right: 12rpx;
  988. padding-left: 12rpx;
  989. border: none;
  990. border-radius: 0;
  991. margin-top: 17rpx;
  992. margin-left: 0;
  993. background: url(../../../static/images/yh.png) top left/100% 100% no-repeat;
  994. line-height: 28rpx;
  995. }
  996. }
  997. }
  998. .foot {
  999. position: absolute;
  1000. right: 20rpx;
  1001. bottom: 30rpx;
  1002. height: 44rpx;
  1003. padding-right: 17rpx;
  1004. padding-left: 17rpx;
  1005. border-radius: 22rpx;
  1006. font-size: 22rpx;
  1007. color: #F5F5F5;
  1008. }
  1009. }
  1010. }
  1011. .category {
  1012. padding-top: 34rpx;
  1013. padding-right: 20rpx;
  1014. padding-left: 20rpx;
  1015. .section {
  1016. border-radius: 10rpx;
  1017. margin-bottom: 20rpx;
  1018. background-color: #FFFFFF;
  1019. .head {
  1020. position: relative;
  1021. display: flex;
  1022. align-items: center;
  1023. height: 90rpx;
  1024. padding-right: 20rpx;
  1025. padding-left: 36rpx;
  1026. font-weight: bold;
  1027. color: #282828;
  1028. &::before {
  1029. content: " ";
  1030. position: absolute;
  1031. top: 50%;
  1032. left: 20rpx;
  1033. width: 6rpx;
  1034. height: 24rpx;
  1035. background-color: var(--view-theme);
  1036. transform: translateY(-50%);
  1037. }
  1038. .title {
  1039. flex: 1;
  1040. min-width: 0;
  1041. overflow: hidden;
  1042. white-space: nowrap;
  1043. text-overflow: ellipsis;
  1044. font-size: 30rpx;
  1045. }
  1046. .iconfont {
  1047. font-size: 22rpx;
  1048. line-height: 1;
  1049. }
  1050. }
  1051. .body {
  1052. display: flex;
  1053. flex-wrap: wrap;
  1054. justify-content: space-between;
  1055. align-items: center;
  1056. padding: 9rpx 36rpx 14rpx;
  1057. .item {
  1058. width: 314rpx;
  1059. height: 84rpx;
  1060. padding-right: 30rpx;
  1061. padding-left: 30rpx;
  1062. border-radius: 10rpx;
  1063. background-color: #F5F5F5;
  1064. margin-bottom: 10rpx;
  1065. overflow: hidden;
  1066. white-space: nowrap;
  1067. text-overflow: ellipsis;
  1068. font-weight: 500;
  1069. font-size: 26rpx;
  1070. line-height: 84rpx;
  1071. color: #282828;
  1072. }
  1073. }
  1074. }
  1075. }
  1076. .empty-box{
  1077. display: flex;
  1078. flex-direction: column;
  1079. justify-content: center;
  1080. align-items: center;
  1081. margin-top: 0;
  1082. padding-top: 200rpx;
  1083. image{
  1084. width: 414rpx;
  1085. height: 240rpx;
  1086. }
  1087. .txt{
  1088. font-size: 26rpx;
  1089. color: #999;
  1090. }
  1091. }
  1092. .footer {
  1093. position: fixed;
  1094. bottom: 0;
  1095. left: 0;
  1096. z-index: 5;
  1097. display: flex;
  1098. width: 100%;
  1099. height: 100rpx;
  1100. height: calc(100rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  1101. height: calc(100rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  1102. background-color: #FFFFFF;
  1103. opacity: 0.96;
  1104. .item {
  1105. flex: 1;
  1106. display: flex;
  1107. flex-direction: column;
  1108. justify-content: center;
  1109. align-items: center;
  1110. font-weight: 500;
  1111. font-size: 20rpx;
  1112. color: #282828;
  1113. .iconfont {
  1114. font-size: 43rpx;
  1115. }
  1116. .icon-zhuanti{
  1117. font-size: 38rpx;
  1118. }
  1119. }
  1120. .active {
  1121. color: var(--view-theme);
  1122. }
  1123. }
  1124. .p-b-75{
  1125. padding-bottom: 150rpx;
  1126. }
  1127. .vip-money {
  1128. color: #282828;
  1129. font-size: 22rpx;
  1130. margin-left: 6rpx;
  1131. font-weight: bold;
  1132. }
  1133. .vipImg {
  1134. width: 65rpx;
  1135. height: 28rpx;
  1136. margin-left: 4rpx;
  1137. image {
  1138. width: 100%!important;
  1139. height: 100%!important;
  1140. display: block;
  1141. }
  1142. }
  1143. </style>