index.vue 25 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063
  1. <template>
  2. <view class="content" v-show="storeId">
  3. <!-- <view class="uni-nav-bar" :style="{backgroundColor: `rgba(255, 255, 255,${opacity})`}">
  4. <view :style="{height: statusBarHeight + 'px',width: '100%'}"></view>
  5. <view class="uni-nav-barbox">
  6. <view class="uni-nav-back">
  7. <u-icon name="arrow-left" color="#fff" size="20" @click="rightClick"></u-icon>
  8. </view>
  9. <view class="uni-nav-title" :style="{opacity: 1,width:`calc(100vw - 100rpx - ${menuRight} - ${menuWidth})`}">
  10. {{storeInfo.storeName}}
  11. <view class="inputbox" :style="{background: opacity >= 0.6 ? '#F7F7F7':'#fff'}" @click="toSearch">
  12. <image class="icon-search" src="../../static/images/search.png" mode=""></image>
  13. <view>搜索店内药品</view>
  14. </view>
  15. </view>
  16. </view>
  17. </view> -->
  18. <view class="uni-nav-bar" :style="{backgroundColor: `rgba(58, 17, 1, 1)`}">
  19. <view :style="{height: statusBarHeight + 'px',width: '100%'}"></view>
  20. <view class="uni-nav-barbox">
  21. <view class="uni-nav-back">
  22. <u-icon name="arrow-left" color="#fff" size="20" @click="rightClick"></u-icon>
  23. </view>
  24. <view class="uni-nav-title" :style="{opacity: 1,width:`calc(100vw - 120rpx - ${menuRight} - ${menuWidth})`}">
  25. <!-- {{storeInfo.storeName}} -->
  26. <view class="inputbox" :style="{background:'rgba(255, 255, 255, 0.25)'}" @click="toSearch">
  27. <image class="icon-search" src="../../static/images/search_white_icon12.png" mode=""></image>
  28. <view>搜索店内药品</view>
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. <view class="content-top">
  34. <view class="store-head" v-show="storeInfo.storeName">
  35. <view>
  36. <view class="store-head-top">
  37. <view class="store-head-logo">
  38. <u-image shape="square" :src="storeInfo.logoUrl || logoUrl" width="100rpx" height="100rpx" radius="6"></u-image>
  39. </view>
  40. <view class="store-info">
  41. <view class="store-head-name">{{storeInfo.storeName || ''}}</view>
  42. <view class="store-head-desc">
  43. <!-- <view>销售{{utils.formatSalesNum(storeInfo.salesCount) }}</view> -->
  44. <view>24小时营业 · 月售{{utils.formatSalesNum(storeInfo.salesCount) }}{{utils.formatSalesNum(storeInfo.salesCount)>1000?'+':''}}</view>
  45. <!-- <view>支持预订</view> -->
  46. </view>
  47. </view>
  48. </view>
  49. <view class="store-head-bottom">
  50. <view class="store-head-bottom-left">支持预定</view>
  51. <view class="store-head-bottom-center">
  52. <view>直降6元</view>
  53. <view>低价换购</view>
  54. <view>返15个芳华币</view>
  55. </view>
  56. </view>
  57. </view>
  58. <view class="store-head-right">
  59. <text>领卷</text>
  60. <image class="w24 h24" src="../../static/images/back_white.png" mode=""></image>
  61. </view>
  62. </view>
  63. </view>
  64. <!-- tab切换 -->
  65. <view class="pub-tab-box">
  66. <view class="tab-inner">
  67. <view
  68. v-for="(item,index) in tabs"
  69. :key="index"
  70. :class="cateId == item.cateId?'item active':'item'"
  71. @click="cateChange(item)">
  72. <view class="text">
  73. {{ item.cateName }}
  74. <!-- <image v-show="cateId == item.cateId" class="tab-bg" src="../../static/images/tab_bg.png" mode=""></image> -->
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. <!-- 数据列表 -->
  80. <scroll-view scroll-y="true" style="height: calc(100vh - 500rpx);">
  81. <view class="content-list">
  82. <view class="goods-list">
  83. <view class="item" v-for="(item,index) in dataList" :key="index" @click="showDetail(item)">
  84. <view class="img-box">
  85. <image :src="item.image" mode="aspectFit"></image>
  86. <view class="cf-box" v-if="item.productType==2">
  87. <view class="title">处方药</view>
  88. <view class="subTitle">请在医师指导下使用</view>
  89. </view>
  90. </view>
  91. <view class="info-box">
  92. <view class="title ellipsis2">{{item.productName}}</view>
  93. <view class="price-box">
  94. <view class="now">
  95. <text class="unit">¥</text>
  96. <text class="num">{{item.price.toFixed(2)}}</text>
  97. </view>
  98. <view class="old">¥{{item.otPrice.toFixed(2)}}</view>
  99. </view>
  100. </view>
  101. </view>
  102. </view>
  103. </view>
  104. </scroll-view>
  105. <!-- 底部按钮 -->
  106. <view class="btn-foot">
  107. <view class="menu-box">
  108. <view class="item" @click="goHome">
  109. <image src="../../static/images/tab_home_icon24.png" mode=""></image>
  110. <text class="label">首页</text>
  111. </view>
  112. <view class="item" @click="navgetTo('./cart')">
  113. <uni-badge size="small" :text="cartCount" absolute="rightTop" type="error">
  114. <image src="../../static/images/shopping_car_icon20.png" mode=""></image>
  115. </uni-badge>
  116. <text class="label">购物车</text>
  117. </view>
  118. <view class="item" style="position: relative;">
  119. <image src="../../static/images/customer_service_icon24.png" mode=""></image>
  120. <text class="label">客服</text>
  121. <button class="contact-btn" open-type="contact"></button>
  122. </view>
  123. </view>
  124. </view>
  125. <!-- <image class="bg" src="../../static/images/chu_query.png" mode="widthFix"></image> -->
  126. <!-- <view class="content-body">
  127. <view class="storebox">
  128. <u-sticky bgColor="#fff" :offset-top="statusBarHeight + 44">
  129. <u-tabs :list="tabbar" :current="current" @click="clickTab" class="u-tabs"></u-tabs>
  130. </u-sticky> -->
  131. <!-- 商品 -->
  132. <!-- <view :style="{height: divHeight,display: current == 0 ? 'flex' : 'none'}" class="medic-box">
  133. <view class="cate-list">
  134. <view
  135. v-for="(item,index) in cates"
  136. :key="index"
  137. :class="cateSelect == item.cateId?'item active':'item'"
  138. @click="choseCate(item)"
  139. >{{item.cateName }}</view>
  140. </view>
  141. <view class="medic"> -->
  142. <!-- 轮播图 -->
  143. <!-- <view class="banner-box">
  144. <swiper
  145. class="swiper"
  146. :indicator-dots="true"
  147. :circular="true"
  148. :autoplay="true"
  149. :interval="3000"
  150. :duration="1000"
  151. indicator-color="rgba(255, 255, 255, 0.6)"
  152. indicator-active-color="#ffffff"
  153. >
  154. <swiper-item class="swiper-item" v-for="(item,index) in advs" :key="index" @click="handleAdvClick(item)">
  155. <image :src="item.imageUrl" mode=""></image>
  156. </swiper-item>
  157. </swiper>
  158. </view> -->
  159. <!-- 药品列表 -->
  160. <!-- <view class="medic-list">
  161. <view class="item" v-for="(item,index) in subCates" :key="index">
  162. <view class="title">{{item.cateName}}</view>
  163. <view class="inner-list">
  164. <view class="definite"v-for="(subItem,index) in subCates" @click="showProductList(subItem)">
  165. <view class="img-box">
  166. <image :src="subItem.pic" mode="aspectFit"></image>
  167. </view>
  168. <view class="name ellipsis">{{subItem.cateName}}</view>
  169. </view>
  170. </view>
  171. </view>
  172. </view>
  173. </view>
  174. </view> -->
  175. <!-- 商家信息 -->
  176. <!-- <view class="storebox-info" :style="{height: divHeight}" v-show="current == 1">
  177. <view class="storebox-map">
  178. <u-icon name="map" color="#ccc" size="18"></u-icon>
  179. <view style="margin-left: 10rpx;">{{storeInfo.address || "--"}}</view>
  180. </view>
  181. <view class="storebox-map" v-if="storeInfo.phone">
  182. <u-icon name="phone" color="#ccc" size="18"></u-icon>
  183. <view style="margin-left: 10rpx;">{{storeInfo.phone || "--"}}</view>
  184. </view>
  185. <view class="storebox-qualifications" v-if="storeInfo.descs">
  186. <u-icon name="volume" color="#ccc" size="18"></u-icon>
  187. <view style="margin-left: 10rpx;">{{storeInfo.descs || "--"}}</view>
  188. </view>
  189. <view class="storebox-qualifications">
  190. <u-icon name="file-text" color="#ccc" size="18"></u-icon>
  191. <view style="margin-left: 10rpx;">商家资质</view>
  192. </view>
  193. <view class="qualifications">
  194. <view v-for="(img,i) in licenseImagesList" :key="i">
  195. <u-image
  196. shape="square"
  197. lazyLoad
  198. :src="img"
  199. width="100%"
  200. mode="widthFix"
  201. radius="6"
  202. @click="previewImage(i)"
  203. ></u-image>
  204. </view>
  205. </view>
  206. </view>
  207. </view>
  208. </view> -->
  209. </view>
  210. </template>
  211. <script>
  212. import {getProductCate} from '@/api/product';
  213. import {getAdv} from '@/api/adv';
  214. import { getStoreById,getNewStoreById,getIndexData} from "@/api/store.js";
  215. import {getProductCateByPid,getProducts} from '@/api/product'
  216. import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
  217. export default {
  218. mixins: [MescrollMixin],
  219. data() {
  220. return {
  221. statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
  222. // 右侧的胶囊距离右侧屏幕距离-px
  223. menuRight: uni.getStorageSync('menuInfo').menuRight,
  224. // 右侧的胶囊宽度-px
  225. menuWidth: uni.getStorageSync('menuInfo').menuWidth,
  226. opacity: 0,
  227. opacityTxt: 0,
  228. storeId: "",
  229. tabbar: [{
  230. name: '商品',
  231. }, {
  232. name: '商家',
  233. }],
  234. current: 0,
  235. storeInfo: {},
  236. logoUrl: "https://user.test.ylrztop.com/images/adfd21c004854c9b8997d371d7a0ce8c.jpg",
  237. // 商家资质图片
  238. licenseImagesList: ["https://user.test.ylrztop.com/images/sjzz.jpg"],
  239. divHeight:'0px',
  240. allCates:[],
  241. cates:[],
  242. subCates:[],
  243. // 选中药品分类
  244. cateSelect: 0,
  245. // 轮播图
  246. advs: [],
  247. // 'company'表示销售管理的进来的
  248. from: "",
  249. dataList:[],
  250. cateId:null,
  251. tabs:[{
  252. cateId: 178,
  253. cateName: "推荐",
  254. pid: 179,
  255. },
  256. {
  257. cateId: 100,
  258. cateName: "分类",
  259. pid: 179,
  260. }
  261. ],
  262. //上拉加载的配置
  263. upOption: {
  264. onScroll:true,
  265. use: true, // 是否启用上拉加载; 默认true
  266. page: {
  267. num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  268. size: 10 // 每页数据的数量,默认10
  269. },
  270. noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  271. empty: {
  272. icon:'/static/images/no_data.png',
  273. tip: '暂无数据',
  274. },
  275. textNoMore:"已经到底了",
  276. }
  277. }
  278. },
  279. onLoad(option) {
  280. this.storeId = option.storeId || ""
  281. this.cateId = 178;
  282. this.from= option.from || ''
  283. if(this.storeId){
  284. this.getStoreInfo()
  285. this.getProductCate();
  286. this.getProducts()
  287. } else {
  288. uni.showToast({
  289. title: "storeId不存在~",
  290. icon: "none"
  291. })
  292. }
  293. },
  294. onShow() {
  295. this.divHeight= `calc(100vh - 44px - 88rpx - ${this.statusBarHeight}px)`
  296. this.getAdv();
  297. },
  298. onPageScroll(e) {
  299. if (e.scrollTop <= 44) {
  300. this.opacityTxt = 0
  301. this.opacity = e.scrollTop > this.statusBarHeight ? 0.6 : 0
  302. } else if (e.scrollTop > 50) {
  303. this.opacity = 1
  304. this.opacityTxt = 1
  305. }
  306. },
  307. methods: {
  308. rightClick() {
  309. uni.navigateBack()
  310. },
  311. clickTab(item) {
  312. this.current = item.index
  313. },
  314. // 预览图片
  315. previewImage(index) {
  316. uni.previewImage({
  317. current: index,
  318. urls: this.licenseImagesList
  319. });
  320. },
  321. getStoreInfo() {
  322. getNewStoreById(this.storeId).then(
  323. res => {
  324. if(res.code==200){
  325. this.storeInfo = res.data || {}
  326. // this.licenseImagesList = this.storeInfo.licenseImages ? this.storeInfo.licenseImages.split(',') : []
  327. } else {
  328. uni.showToast({
  329. icon:'none',
  330. title: res.msg,
  331. });
  332. }
  333. },
  334. rej => {}
  335. );
  336. },
  337. toSearch() {
  338. if(this.from == 'company') {
  339. uni.navigateTo({
  340. url: '/pages_company/order/productList?storeId=' + this.storeId || ''
  341. })
  342. } else {
  343. uni.navigateTo({
  344. url: '/pages/home/productSearch?storeId=' + this.storeId || ''
  345. })
  346. }
  347. },
  348. handleAdvClick(item){
  349. if(item.showType==1){
  350. uni.setStorageSync('url',item.advUrl);
  351. uni.navigateTo({
  352. url:"/pages/home/h5?storeId="+ this.storeId || ""
  353. })
  354. }
  355. else if(item.showType==2){
  356. uni.navigateTo({
  357. url:item.advUrl
  358. })
  359. }
  360. else if(item.showType==3){
  361. uni.setStorageSync('content',item.content);
  362. uni.navigateTo({
  363. url:"/pages/home/content?storeId="+ this.storeId || ""
  364. })
  365. }
  366. },
  367. getAdv(){
  368. let data = {advType:2};
  369. getAdv(data).then(
  370. res => {
  371. if(res.code==200){
  372. this.advs=res.data;
  373. }
  374. },
  375. rej => {}
  376. );
  377. },
  378. getProductCate(){
  379. let data = {};
  380. getProductCate(data).then(
  381. res => {
  382. if(res.code==200){
  383. this.allCates=res.data;
  384. this.cates = this.allCates.filter(function (item) {
  385. return item.pid==0
  386. });
  387. if(this.cates!=null&&this.cates.length>0){
  388. this.cateSelect=this.cates[0].cateId;
  389. this.getSubCate()
  390. }
  391. }else{
  392. uni.showToast({
  393. icon:'none',
  394. title: "请求失败",
  395. });
  396. }
  397. },
  398. rej => {}
  399. );
  400. },
  401. // tab切换
  402. cateChange(item) {
  403. this.cateId = item.cateId;
  404. this.mescroll.resetUpScroll()
  405. },
  406. mescrollInit(mescroll) {
  407. this.mescroll = mescroll;
  408. },
  409. /*下拉刷新的回调 */
  410. downCallback(mescroll) {
  411. this.mescroll.resetUpScroll()
  412. },
  413. upCallback(page) {
  414. //联网加载数据
  415. var that = this;
  416. var data = {
  417. cateId:this.cateId,
  418. defaultOrder:this.defaultOrder,
  419. page: page.num,
  420. pageSize: page.size,
  421. productName: this.productName || "",
  422. storeId: this.storeId
  423. };
  424. if(this.from == 'company') {
  425. this.getSalesProducts(page,data)
  426. } else {
  427. this.getProducts(page,data)
  428. }
  429. },
  430. getProducts(page,data) {
  431. // var that = this;
  432. getIndexData().then(res => {
  433. if(res.code==200){
  434. this.dataList = res.data.hotProductList;
  435. }else{
  436. uni.showToast({
  437. icon:'none',
  438. title: "请求失败",
  439. });
  440. }
  441. },rej => {});
  442. },
  443. // 回到首页
  444. goHome() {
  445. uni.switchTab({
  446. url: '/pages/home/index'
  447. })
  448. },
  449. // 跳转页面
  450. navgetTo(url) {
  451. console.log("跳转")
  452. this.utils.isLogin().then(res => {
  453. if(res){
  454. uni.navigateTo({
  455. url: url
  456. })
  457. }
  458. })
  459. },
  460. // 查看药品详情
  461. showDetail(item) {
  462. if(this.from == 'company') {
  463. uni.navigateTo({
  464. url: '/pages_company/order/productDetails?productId='+item.productId +`${this.storeId ? '&storeId='+this.storeId : ''}`
  465. })
  466. } else {
  467. uni.navigateTo({
  468. url: './productDetails?productId='+item.productId +`${this.storeId ? '&storeId='+this.storeId : ''}`
  469. })
  470. }
  471. },
  472. // 药品分类选择
  473. choseCate(item) {
  474. this.cateSelect = item.cateId;
  475. this.getSubCate()
  476. },
  477. getSubCate(){
  478. var that=this;
  479. this.subCates = this.allCates.filter(function (item) {
  480. // let subList = that.allCates.filter(child => {
  481. // //返回每一项的子级数组
  482. // return child.pid === item.cateId
  483. // });
  484. // subList.length > 0 ? item.children = subList : [];
  485. return item.pid==that.cateSelect
  486. });
  487. },
  488. // 查看药品详情
  489. showProductList(item) {
  490. uni.navigateTo({
  491. url: '/pages/shopping/productList?cateId='+item.cateId+"&pid="+item.pid+'&storeId=' + this.storeId + '&from=' + this.from
  492. })
  493. }
  494. }
  495. }
  496. </script>
  497. <style scoped lang="scss">
  498. @mixin u-flex($flexD, $alignI, $justifyC) {
  499. display: flex;
  500. flex-direction: $flexD;
  501. align-items: $alignI;
  502. justify-content: $justifyC;
  503. }
  504. .inputbox {
  505. height: 60rpx;
  506. padding: 0 20rpx;
  507. @include u-flex(row, center, flex-start);
  508. border-radius: 40rpx;
  509. line-height: 60rpx;
  510. font-size:28rpx;
  511. color:#fff;
  512. font-family: PingFang SC;
  513. .icon-search{
  514. width: 28rpx;
  515. height: 28rpx;
  516. margin-right: 20rpx;
  517. }
  518. }
  519. .uni-nav-bar {
  520. position: fixed;
  521. top: 0;
  522. left: 0;
  523. width: 100%;
  524. z-index: 999;
  525. overflow: hidden;
  526. font-family: PingFang SC, PingFang SC;
  527. font-weight: 500;
  528. .uni-nav-barbox {
  529. width: 100%;
  530. height: 88rpx;
  531. @include u-flex(row, center, flex-start);
  532. position: relative;
  533. font-size: 24rpx;
  534. }
  535. .uni-nav-title {
  536. /* #ifdef APP-PLUS */
  537. font-size: 34rpx;
  538. /* #endif */
  539. /* #ifndef APP-PLUS */
  540. font-size: 14px;
  541. /* #endif */
  542. overflow: hidden;
  543. overflow: hidden;
  544. white-space: nowrap;
  545. text-overflow: ellipsis;
  546. }
  547. .uni-nav-back {
  548. margin-left: 20rpx;
  549. margin-right: 20rpx;
  550. height: 88rpx;
  551. @include u-flex(row, center, flex-start);
  552. }
  553. }
  554. .content {
  555. width: 100%;
  556. position: relative;
  557. .bg {
  558. width: 100%;
  559. height: auto;
  560. position: absolute;
  561. top: 0;
  562. left: 0;
  563. }
  564. &-top{
  565. position: fixed;
  566. z-index: 999;
  567. top: calc(var(--status-bar-height) + 120rpx);
  568. width: 100%;
  569. }
  570. &-body {
  571. position: relative;
  572. padding-top: calc(var(--status-bar-height) + 360rpx);
  573. }
  574. &-list{
  575. position: relative;
  576. padding-top: calc(var(--status-bar-height) + 440rpx);
  577. }
  578. }
  579. .store-head {
  580. // position: relative;
  581. // z-index: 9;
  582. // margin: 0 24rpx 0 24rpx;
  583. // padding: 24rpx;
  584. // background: #FFFFFF;
  585. // border-radius: 16rpx 16rpx 16rpx 16rpx;
  586. // font-family: PingFang SC, PingFang SC;
  587. // color: #222222;
  588. // box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04);
  589. position: relative;
  590. z-index: 999;
  591. padding:30rpx 24rpx;
  592. background:#3A1101;
  593. font-family: PingFang SC, PingFang SC;
  594. color: #fff;
  595. width: calc(100% - 48rpx);
  596. display: flex;
  597. align-items: flex-end;
  598. justify-content: space-between;
  599. &-info{
  600. flex:1;
  601. display: flex;
  602. flex-direction: column;
  603. justify-content: space-between;
  604. }
  605. &-top {
  606. display: flex;
  607. align-items: center;
  608. }
  609. &-logo {
  610. flex-shrink: 0;
  611. margin-right: 24rpx;
  612. }
  613. &-name {
  614. font-weight: 600;
  615. font-size: 32rpx;
  616. }
  617. &-right{
  618. display: flex;
  619. align-items: center;
  620. font-size: 24upx;
  621. image{
  622. transform: scaleX(-1);
  623. margin-left: 5upx;
  624. }
  625. }
  626. &-desc {
  627. margin-top: 16rpx;
  628. display: flex;
  629. align-items: center;
  630. flex-wrap: wrap;
  631. gap: 20rpx;
  632. position: relative;
  633. z-index: 2;
  634. view {
  635. // padding-right: 20rpx;
  636. font-size: 24rpx;
  637. position: relative;
  638. &::after {
  639. content: "";
  640. width: 0;
  641. height: 28rpx;
  642. border-right: 1rpx solid #eee;
  643. position: absolute;
  644. right: 0;
  645. top: 50%;
  646. transform: translate(0, -50%);
  647. }
  648. &:last-child::after {
  649. border: none;
  650. }
  651. }
  652. }
  653. &-bottom{
  654. padding-top: 24upx;
  655. display: flex;
  656. align-items: center;
  657. font-size: 24upx;
  658. &-left{
  659. background: rgba(255, 255, 255, 0.20);
  660. padding: 4rpx 10rpx;
  661. border-radius: 20rpx;
  662. font-size: 20rpx;
  663. margin-right: 24upx;
  664. }
  665. &-center{
  666. display: flex;
  667. align-items: center;
  668. view{
  669. font-size: 20rpx;
  670. border-radius: 4rpx;
  671. background: linear-gradient(120deg, #FE8227 0%, #FE4E12 100%);
  672. margin-right: 10rpx;
  673. padding: 2rpx 8rpx;
  674. }
  675. }
  676. }
  677. }
  678. .pub-tab-box{
  679. box-sizing: border-box;
  680. width: 100%;
  681. padding: 0 33upx;
  682. background-color: #FFFFFF;
  683. position: fixed;
  684. top: calc(var(--status-bar-height) + 340rpx);
  685. z-index: 999;
  686. box-shadow: 0px 0px 5px 2px rgba(0, 0, 0, 0.05);
  687. .tab-inner{
  688. height: 88upx;
  689. line-height: 88upx;
  690. display: flex;
  691. overflow-x: auto;
  692. justify-content: center;
  693. align-items: center;
  694. }
  695. .item{
  696. font-size: 28upx;
  697. white-space: nowrap;
  698. line-height: 1;
  699. font-family: PingFang SC;
  700. font-weight: 500;
  701. color: #666666;
  702. margin-right: 90upx;
  703. display: flex;
  704. align-items: center;
  705. justify-content: center;
  706. &:last-child{
  707. margin-right: 0;
  708. }
  709. &.active{
  710. font-weight: bold;
  711. color: #333333;
  712. &::after {
  713. content: "";
  714. width: 48rpx;
  715. height: 8rpx;
  716. background: linear-gradient(120deg, #31A1FE 0%, #008FD3 100%);
  717. position: absolute;
  718. bottom: 0;
  719. border-radius: 6upx 6upx 0upx 0;
  720. }
  721. }
  722. .text{
  723. position: relative;
  724. z-index: 1;
  725. }
  726. .tab-bg{
  727. width: 72upx;
  728. height: 28upx;
  729. position: absolute;
  730. top: 17upx;
  731. left: 50%;
  732. transform: translateX(-36upx);
  733. z-index: -1;
  734. }
  735. }
  736. }
  737. .goods-list{
  738. padding: 20upx;
  739. display: flex;
  740. flex-wrap: wrap;
  741. .item{
  742. margin-right: 20rpx;
  743. margin-bottom: 20rpx;
  744. width: 345rpx;
  745. background: #FFFFFF;
  746. box-shadow: 0px 0px 10rpx 4rpx rgba(199, 199, 199, 0.22);
  747. border-radius: 20rpx;
  748. overflow: hidden;
  749. &:nth-child(2n) {
  750. margin-right: 0;
  751. }
  752. .img-box{
  753. width: 100%;
  754. height: 334upx;
  755. position: relative;
  756. image{
  757. width: 100%;
  758. height: 100%;
  759. }
  760. }
  761. .info-box{
  762. box-sizing: border-box;
  763. height: 182upx;
  764. padding: 20upx 20upx 30upx;
  765. display: flex;
  766. flex-direction: column;
  767. justify-content: space-between;
  768. .title{
  769. font-size: 26upx;
  770. font-family: PingFang SC;
  771. font-weight: 500;
  772. color: #111111;
  773. line-height: 40upx;
  774. }
  775. .price-box{
  776. display: flex;
  777. align-items: flex-end;
  778. .now{
  779. display: flex;
  780. align-items: flex-end;
  781. margin-right: 20upx;
  782. .unit{
  783. font-size: 24upx;
  784. font-family: PingFang SC;
  785. font-weight: 500;
  786. color: #FF6633;
  787. line-height: 1.2;
  788. margin-right: 4upx;
  789. }
  790. .num{
  791. font-size: 36upx;
  792. font-family: PingFang SC;
  793. font-weight: bold;
  794. color: #FF6633;
  795. line-height: 1;
  796. }
  797. }
  798. .old{
  799. font-size: 26upx;
  800. font-family: PingFang SC;
  801. font-weight: 500;
  802. text-decoration: line-through;
  803. color: #BBBBBB;
  804. line-height: 1.1;
  805. }
  806. }
  807. }
  808. }
  809. }
  810. .btn-foot{
  811. box-sizing: border-box;
  812. height: 100upx;
  813. background: #FFFFFF;
  814. padding: 0 30upx;
  815. display: flex;
  816. align-items: center;
  817. justify-content: space-between;
  818. position: fixed;
  819. bottom: 0;
  820. z-index: 99;
  821. left: 50%;
  822. transform: translate(-50%,-50%);
  823. border-radius: 50px;
  824. box-shadow: 0px 0px 5px 2px rgba(0, 0, 0, 0.05);
  825. .menu-box{
  826. display: flex;
  827. align-items: center;
  828. .item{
  829. display: flex;
  830. align-items: center;
  831. flex-direction: column;
  832. margin-right: 48upx;
  833. &:last-child{
  834. margin-right: 0;
  835. }
  836. image{
  837. width: 40upx;
  838. height: 40upx;
  839. margin-bottom: 10upx;
  840. }
  841. .label{
  842. font-size: 20upx;
  843. font-family: PingFang SC;
  844. font-weight: 500;
  845. color: #626468;
  846. text-align: center;
  847. }
  848. }
  849. ::v-deep .uni-badge--x{
  850. display: flex;
  851. align-items: center;
  852. justify-content: center;
  853. }
  854. ::v-deep .uni-badge{
  855. border: none;
  856. background-color: #FF3636;
  857. font-family: Roboto;
  858. }
  859. }
  860. .btn-box{
  861. display: flex;
  862. align-items: center;
  863. .btn{
  864. width: 200upx;
  865. height: 88upx;
  866. line-height: 88upx;
  867. text-align: center;
  868. border-radius: 44upx;
  869. margin-left: 20upx;
  870. font-size: 28upx;
  871. font-family: PingFang SC;
  872. font-weight: bold;
  873. color: #FFFFFF;
  874. &:first-child{
  875. margin-left: 0;
  876. }
  877. &.cart{
  878. background: #FF5030;
  879. }
  880. &.buy{
  881. background: #008FD3;
  882. }
  883. }
  884. }
  885. }
  886. .border_bottom_line {
  887. position: relative;
  888. &::after {
  889. content: "";
  890. position: absolute;
  891. bottom: 0;
  892. left: 0;
  893. border-bottom: 1px solid #F5F7FA;
  894. width: 100%;
  895. transform: scaleY(0.5);
  896. border-top-color: #F5F7FA;
  897. border-right-color: #F5F7FA;
  898. border-left-color: #F5F7FA;
  899. }
  900. }
  901. .storebox {
  902. width: 100%;
  903. margin-top: -60rpx;
  904. padding-top: 80rpx;
  905. background-color: #fff;
  906. box-shadow: 0 -20rpx 16rpx #fff;
  907. position: relative;
  908. z-index: 1;
  909. &-info {
  910. padding: 24rpx 24rpx 0 24rpx;
  911. background-color: #fff;
  912. font-family: PingFang SC, PingFang SC;
  913. font-size: 28rpx;
  914. color: #333333;
  915. position: relative;
  916. border-top: 4px solid #F5F7FA;
  917. }
  918. &-map {
  919. display: flex;
  920. align-items: center;
  921. word-break: break-all;
  922. padding: 24rpx 0;
  923. }
  924. &-qualifications {
  925. display: flex;
  926. align-items: center;
  927. padding: 24rpx 0;
  928. }
  929. .qualifications {
  930. padding: 24rpx 0;
  931. }
  932. }
  933. .medic-box{
  934. display: flex;
  935. .cate-list{
  936. box-sizing: border-box;
  937. width: 200upx;
  938. background: #F2F5F9;
  939. display: flex;
  940. flex-direction: column;
  941. padding: 20upx 0;
  942. overflow-y: scroll;
  943. .item{
  944. height: 100upx;
  945. line-height: 100upx;
  946. padding-left: 30upx;
  947. font-size: 28upx;
  948. font-family: PingFang SC;
  949. font-weight: 500;
  950. color: #333333;
  951. position: relative;
  952. &.active{
  953. color: #0bb3f2;
  954. &::after{
  955. content: "";
  956. width: 8upx;
  957. height: 50upx;
  958. background: #0bb3f2;
  959. position: absolute;
  960. top: 25upx;
  961. left: 0;
  962. }
  963. }
  964. }
  965. }
  966. .medic{
  967. box-sizing: border-box;
  968. width: calc(100% - 200upx);
  969. height: 100%;
  970. padding: 0 30upx;
  971. .banner-box{
  972. margin-top: 30rpx;
  973. width: 100%;
  974. height: 160upx;
  975. border-radius: 10upx;
  976. overflow: hidden;
  977. .swiper,
  978. .swiper-item,
  979. .swiper-item image{
  980. width: 100%;
  981. height: 100%;
  982. }
  983. }
  984. .medic-list{
  985. box-sizing: border-box;
  986. padding: 30upx 0;
  987. overflow-y: auto;
  988. height: calc(100% - 220upx);
  989. position: relative;
  990. // .item{
  991. // .title{
  992. // font-size: 28upx;
  993. // font-family: PingFang SC;
  994. // font-weight: bold;
  995. // color: #333333;
  996. // padding-top: 20upx;
  997. // margin-bottom: 30upx;
  998. // }
  999. // }
  1000. .inner-list{
  1001. display: flex;
  1002. flex-wrap: wrap;
  1003. .definite{
  1004. width: calc(33% - 20upx);
  1005. margin-right: 30upx;
  1006. margin-bottom: 30upx;
  1007. .img-box{
  1008. width: 100%;
  1009. height: 144upx;
  1010. background: #F5F5F5;
  1011. border-radius: 8upx;
  1012. overflow: hidden;
  1013. display: flex;
  1014. align-items: center;
  1015. image{
  1016. max-width: 100%;
  1017. }
  1018. }
  1019. .name{
  1020. width: 100%;
  1021. margin-top: 20upx;
  1022. font-size: 24upx;
  1023. font-family: PingFang SC;
  1024. font-weight: 500;
  1025. color: #666666;
  1026. text-align: center;
  1027. }
  1028. &:nth-child(3n) {
  1029. margin-right: 0;
  1030. }
  1031. }
  1032. }
  1033. }
  1034. }
  1035. }
  1036. </style>