index.vue 26 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070
  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. <view class="content-list">
  81. <mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
  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. </mescroll-body>
  104. </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 } 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: "/static/images/adfd21c004854c9b8997d371d7a0ce8c.jpg",
  237. // 商家资质图片
  238. licenseImagesList: ["/static/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. } else {
  287. uni.showToast({
  288. title: "storeId不存在~",
  289. icon: "none"
  290. })
  291. }
  292. },
  293. onShow() {
  294. this.divHeight= `calc(100vh - 44px - 88rpx - ${this.statusBarHeight}px)`
  295. this.getAdv();
  296. },
  297. onPageScroll(e) {
  298. if (e.scrollTop <= 44) {
  299. this.opacityTxt = 0
  300. this.opacity = e.scrollTop > this.statusBarHeight ? 0.6 : 0
  301. } else if (e.scrollTop > 50) {
  302. this.opacity = 1
  303. this.opacityTxt = 1
  304. }
  305. },
  306. methods: {
  307. rightClick() {
  308. uni.navigateBack()
  309. },
  310. clickTab(item) {
  311. this.current = item.index
  312. },
  313. // 预览图片
  314. previewImage(index) {
  315. uni.previewImage({
  316. current: index,
  317. urls: this.licenseImagesList
  318. });
  319. },
  320. getStoreInfo() {
  321. getStoreById({storeId: this.storeId}).then(
  322. res => {
  323. if(res.code==200){
  324. this.storeInfo = res.data || {}
  325. // this.licenseImagesList = this.storeInfo.licenseImages ? this.storeInfo.licenseImages.split(',') : []
  326. } else {
  327. uni.showToast({
  328. icon:'none',
  329. title: res.msg,
  330. });
  331. }
  332. },
  333. rej => {}
  334. );
  335. },
  336. toSearch() {
  337. if(this.from == 'company') {
  338. uni.navigateTo({
  339. url: '/pages_company/order/productList?storeId=' + this.storeId || ''
  340. })
  341. } else {
  342. uni.navigateTo({
  343. url: '/pages/home/productSearch?storeId=' + this.storeId || ''
  344. })
  345. }
  346. },
  347. handleAdvClick(item){
  348. if(item.showType==1){
  349. uni.setStorageSync('url',item.advUrl);
  350. uni.navigateTo({
  351. url:"/pages/home/h5?storeId="+ this.storeId || ""
  352. })
  353. }
  354. else if(item.showType==2){
  355. uni.navigateTo({
  356. url:item.advUrl
  357. })
  358. }
  359. else if(item.showType==3){
  360. uni.setStorageSync('content',item.content);
  361. uni.navigateTo({
  362. url:"/pages/home/content?storeId="+ this.storeId || ""
  363. })
  364. }
  365. },
  366. getAdv(){
  367. let data = {advType:2};
  368. getAdv(data).then(
  369. res => {
  370. if(res.code==200){
  371. this.advs=res.data;
  372. }
  373. },
  374. rej => {}
  375. );
  376. },
  377. getProductCate(){
  378. let data = {};
  379. getProductCate(data).then(
  380. res => {
  381. if(res.code==200){
  382. this.allCates=res.data;
  383. this.cates = this.allCates.filter(function (item) {
  384. return item.pid==0
  385. });
  386. if(this.cates!=null&&this.cates.length>0){
  387. this.cateSelect=this.cates[0].cateId;
  388. this.getSubCate()
  389. }
  390. }else{
  391. uni.showToast({
  392. icon:'none',
  393. title: "请求失败",
  394. });
  395. }
  396. },
  397. rej => {}
  398. );
  399. },
  400. // tab切换
  401. cateChange(item) {
  402. this.cateId = item.cateId;
  403. this.mescroll.resetUpScroll()
  404. },
  405. mescrollInit(mescroll) {
  406. this.mescroll = mescroll;
  407. },
  408. /*下拉刷新的回调 */
  409. downCallback(mescroll) {
  410. this.mescroll.resetUpScroll()
  411. },
  412. upCallback(page) {
  413. //联网加载数据
  414. var that = this;
  415. var data = {
  416. cateId:this.cateId,
  417. defaultOrder:this.defaultOrder,
  418. page: page.num,
  419. pageSize: page.size,
  420. productName: this.productName || "",
  421. storeId: this.storeId
  422. };
  423. if(this.from == 'company') {
  424. this.getSalesProducts(page,data)
  425. } else {
  426. this.getProducts(page,data)
  427. }
  428. },
  429. getProducts(page,data) {
  430. var that = this;
  431. getProducts(data).then(res => {
  432. if(res.code==200){
  433. //设置列表数据
  434. if (page.num == 1) {
  435. that.dataList = res.data.list;
  436. } else {
  437. that.dataList = that.dataList.concat(res.data.list);
  438. }
  439. that.mescroll.endBySize(res.data.list.length, res.data.total);
  440. }else{
  441. uni.showToast({
  442. icon:'none',
  443. title: "请求失败",
  444. });
  445. that.dataList = null;
  446. that.mescroll.endErr();
  447. }
  448. });
  449. },
  450. // 回到首页
  451. goHome() {
  452. uni.switchTab({
  453. url: '/pages/home/index'
  454. })
  455. },
  456. // 跳转页面
  457. navgetTo(url) {
  458. console.log("跳转")
  459. this.utils.isLogin().then(res => {
  460. if(res){
  461. uni.navigateTo({
  462. url: url
  463. })
  464. }
  465. })
  466. },
  467. // 查看药品详情
  468. showDetail(item) {
  469. if(this.from == 'company') {
  470. uni.navigateTo({
  471. url: '/pages_company/order/productDetails?productId='+item.productId +`${this.storeId ? '&storeId='+this.storeId : ''}`
  472. })
  473. } else {
  474. uni.navigateTo({
  475. url: './productDetails?productId='+item.productId +`${this.storeId ? '&storeId='+this.storeId : ''}`
  476. })
  477. }
  478. },
  479. // 药品分类选择
  480. choseCate(item) {
  481. this.cateSelect = item.cateId;
  482. this.getSubCate()
  483. },
  484. getSubCate(){
  485. var that=this;
  486. this.subCates = this.allCates.filter(function (item) {
  487. // let subList = that.allCates.filter(child => {
  488. // //返回每一项的子级数组
  489. // return child.pid === item.cateId
  490. // });
  491. // subList.length > 0 ? item.children = subList : [];
  492. return item.pid==that.cateSelect
  493. });
  494. },
  495. // 查看药品详情
  496. showProductList(item) {
  497. uni.navigateTo({
  498. url: '/pages/shopping/productList?cateId='+item.cateId+"&pid="+item.pid+'&storeId=' + this.storeId + '&from=' + this.from
  499. })
  500. }
  501. }
  502. }
  503. </script>
  504. <style scoped lang="scss">
  505. @mixin u-flex($flexD, $alignI, $justifyC) {
  506. display: flex;
  507. flex-direction: $flexD;
  508. align-items: $alignI;
  509. justify-content: $justifyC;
  510. }
  511. .inputbox {
  512. height: 60rpx;
  513. padding: 0 20rpx;
  514. @include u-flex(row, center, flex-start);
  515. border-radius: 40rpx;
  516. line-height: 60rpx;
  517. font-size:28rpx;
  518. color:#fff;
  519. font-family: PingFang SC;
  520. .icon-search{
  521. width: 28rpx;
  522. height: 28rpx;
  523. margin-right: 20rpx;
  524. }
  525. }
  526. .uni-nav-bar {
  527. position: fixed;
  528. top: 0;
  529. left: 0;
  530. width: 100%;
  531. z-index: 999;
  532. overflow: hidden;
  533. font-family: PingFang SC, PingFang SC;
  534. font-weight: 500;
  535. .uni-nav-barbox {
  536. width: 100%;
  537. height: 88rpx;
  538. @include u-flex(row, center, flex-start);
  539. position: relative;
  540. font-size: 24rpx;
  541. }
  542. .uni-nav-title {
  543. /* #ifdef APP-PLUS */
  544. font-size: 34rpx;
  545. /* #endif */
  546. /* #ifndef APP-PLUS */
  547. font-size: 14px;
  548. /* #endif */
  549. overflow: hidden;
  550. overflow: hidden;
  551. white-space: nowrap;
  552. text-overflow: ellipsis;
  553. }
  554. .uni-nav-back {
  555. margin-left: 20rpx;
  556. margin-right: 20rpx;
  557. height: 88rpx;
  558. @include u-flex(row, center, flex-start);
  559. }
  560. }
  561. .content {
  562. width: 100%;
  563. position: relative;
  564. .bg {
  565. width: 100%;
  566. height: auto;
  567. position: absolute;
  568. top: 0;
  569. left: 0;
  570. }
  571. &-top{
  572. position: fixed;
  573. z-index: 999;
  574. top: calc(var(--status-bar-height) + 120rpx);
  575. width: 100%;
  576. }
  577. &-body {
  578. position: relative;
  579. padding-top: calc(var(--status-bar-height) + 360rpx);
  580. }
  581. &-list{
  582. position: relative;
  583. padding-top: calc(var(--status-bar-height) + 440rpx);
  584. }
  585. }
  586. .store-head {
  587. // position: relative;
  588. // z-index: 9;
  589. // margin: 0 24rpx 0 24rpx;
  590. // padding: 24rpx;
  591. // background: #FFFFFF;
  592. // border-radius: 16rpx 16rpx 16rpx 16rpx;
  593. // font-family: PingFang SC, PingFang SC;
  594. // color: #222222;
  595. // box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04);
  596. position: relative;
  597. z-index: 999;
  598. padding:30rpx 24rpx;
  599. background:#3A1101;
  600. font-family: PingFang SC, PingFang SC;
  601. color: #fff;
  602. width: calc(100% - 48rpx);
  603. display: flex;
  604. align-items: flex-end;
  605. justify-content: space-between;
  606. &-info{
  607. flex:1;
  608. display: flex;
  609. flex-direction: column;
  610. justify-content: space-between;
  611. }
  612. &-top {
  613. display: flex;
  614. align-items: center;
  615. }
  616. &-logo {
  617. flex-shrink: 0;
  618. margin-right: 24rpx;
  619. }
  620. &-name {
  621. font-weight: 600;
  622. font-size: 32rpx;
  623. }
  624. &-right{
  625. display: flex;
  626. align-items: center;
  627. font-size: 24upx;
  628. image{
  629. transform: scaleX(-1);
  630. margin-left: 5upx;
  631. }
  632. }
  633. &-desc {
  634. margin-top: 16rpx;
  635. display: flex;
  636. align-items: center;
  637. flex-wrap: wrap;
  638. gap: 20rpx;
  639. position: relative;
  640. z-index: 2;
  641. view {
  642. // padding-right: 20rpx;
  643. font-size: 24rpx;
  644. position: relative;
  645. &::after {
  646. content: "";
  647. width: 0;
  648. height: 28rpx;
  649. border-right: 1rpx solid #eee;
  650. position: absolute;
  651. right: 0;
  652. top: 50%;
  653. transform: translate(0, -50%);
  654. }
  655. &:last-child::after {
  656. border: none;
  657. }
  658. }
  659. }
  660. &-bottom{
  661. padding-top: 24upx;
  662. display: flex;
  663. align-items: center;
  664. font-size: 24upx;
  665. &-left{
  666. background: rgba(255, 255, 255, 0.20);
  667. padding: 4rpx 10rpx;
  668. border-radius: 20rpx;
  669. font-size: 20rpx;
  670. margin-right: 24upx;
  671. }
  672. &-center{
  673. display: flex;
  674. align-items: center;
  675. view{
  676. font-size: 20rpx;
  677. border-radius: 4rpx;
  678. background: linear-gradient(120deg, #FE8227 0%, #FE4E12 100%);
  679. margin-right: 10rpx;
  680. padding: 2rpx 8rpx;
  681. }
  682. }
  683. }
  684. }
  685. .pub-tab-box{
  686. box-sizing: border-box;
  687. width: 100%;
  688. padding: 0 33upx;
  689. background-color: #FFFFFF;
  690. position: fixed;
  691. top: calc(var(--status-bar-height) + 340rpx);
  692. z-index: 999;
  693. box-shadow: 0px 0px 5px 2px rgba(0, 0, 0, 0.05);
  694. .tab-inner{
  695. height: 88upx;
  696. line-height: 88upx;
  697. display: flex;
  698. overflow-x: auto;
  699. justify-content: center;
  700. align-items: center;
  701. }
  702. .item{
  703. font-size: 28upx;
  704. white-space: nowrap;
  705. line-height: 1;
  706. font-family: PingFang SC;
  707. font-weight: 500;
  708. color: #666666;
  709. margin-right: 90upx;
  710. display: flex;
  711. align-items: center;
  712. justify-content: center;
  713. &:last-child{
  714. margin-right: 0;
  715. }
  716. &.active{
  717. font-weight: bold;
  718. color: #333333;
  719. &::after {
  720. content: "";
  721. width: 48rpx;
  722. height: 8rpx;
  723. background: linear-gradient(120deg, #31A1FE 0%, #008FD3 100%);
  724. position: absolute;
  725. bottom: 0;
  726. border-radius: 6upx 6upx 0upx 0;
  727. }
  728. }
  729. .text{
  730. position: relative;
  731. z-index: 1;
  732. }
  733. .tab-bg{
  734. width: 72upx;
  735. height: 28upx;
  736. position: absolute;
  737. top: 17upx;
  738. left: 50%;
  739. transform: translateX(-36upx);
  740. z-index: -1;
  741. }
  742. }
  743. }
  744. .goods-list{
  745. padding: 20upx;
  746. display: flex;
  747. flex-wrap: wrap;
  748. .item{
  749. margin-right: 20rpx;
  750. margin-bottom: 20rpx;
  751. width: 345rpx;
  752. background: #FFFFFF;
  753. box-shadow: 0px 0px 10rpx 4rpx rgba(199, 199, 199, 0.22);
  754. border-radius: 20rpx;
  755. overflow: hidden;
  756. &:nth-child(2n) {
  757. margin-right: 0;
  758. }
  759. .img-box{
  760. width: 100%;
  761. height: 334upx;
  762. position: relative;
  763. image{
  764. width: 100%;
  765. height: 100%;
  766. }
  767. }
  768. .info-box{
  769. box-sizing: border-box;
  770. height: 182upx;
  771. padding: 20upx 20upx 30upx;
  772. display: flex;
  773. flex-direction: column;
  774. justify-content: space-between;
  775. .title{
  776. font-size: 26upx;
  777. font-family: PingFang SC;
  778. font-weight: 500;
  779. color: #111111;
  780. line-height: 40upx;
  781. }
  782. .price-box{
  783. display: flex;
  784. align-items: flex-end;
  785. .now{
  786. display: flex;
  787. align-items: flex-end;
  788. margin-right: 20upx;
  789. .unit{
  790. font-size: 24upx;
  791. font-family: PingFang SC;
  792. font-weight: 500;
  793. color: #FF6633;
  794. line-height: 1.2;
  795. margin-right: 4upx;
  796. }
  797. .num{
  798. font-size: 36upx;
  799. font-family: PingFang SC;
  800. font-weight: bold;
  801. color: #FF6633;
  802. line-height: 1;
  803. }
  804. }
  805. .old{
  806. font-size: 26upx;
  807. font-family: PingFang SC;
  808. font-weight: 500;
  809. text-decoration: line-through;
  810. color: #BBBBBB;
  811. line-height: 1.1;
  812. }
  813. }
  814. }
  815. }
  816. }
  817. .btn-foot{
  818. box-sizing: border-box;
  819. height: 100upx;
  820. background: #FFFFFF;
  821. padding: 0 30upx;
  822. display: flex;
  823. align-items: center;
  824. justify-content: space-between;
  825. position: fixed;
  826. bottom: 0;
  827. z-index: 99;
  828. left: 50%;
  829. transform: translate(-50%,-50%);
  830. border-radius: 50px;
  831. box-shadow: 0px 0px 5px 2px rgba(0, 0, 0, 0.05);
  832. .menu-box{
  833. display: flex;
  834. align-items: center;
  835. .item{
  836. display: flex;
  837. align-items: center;
  838. flex-direction: column;
  839. margin-right: 48upx;
  840. &:last-child{
  841. margin-right: 0;
  842. }
  843. image{
  844. width: 40upx;
  845. height: 40upx;
  846. margin-bottom: 10upx;
  847. }
  848. .label{
  849. font-size: 20upx;
  850. font-family: PingFang SC;
  851. font-weight: 500;
  852. color: #626468;
  853. text-align: center;
  854. }
  855. }
  856. ::v-deep .uni-badge--x{
  857. display: flex;
  858. align-items: center;
  859. justify-content: center;
  860. }
  861. ::v-deep .uni-badge{
  862. border: none;
  863. background-color: #FF3636;
  864. font-family: Roboto;
  865. }
  866. }
  867. .btn-box{
  868. display: flex;
  869. align-items: center;
  870. .btn{
  871. width: 200upx;
  872. height: 88upx;
  873. line-height: 88upx;
  874. text-align: center;
  875. border-radius: 44upx;
  876. margin-left: 20upx;
  877. font-size: 28upx;
  878. font-family: PingFang SC;
  879. font-weight: bold;
  880. color: #FFFFFF;
  881. &:first-child{
  882. margin-left: 0;
  883. }
  884. &.cart{
  885. background: #FF5030;
  886. }
  887. &.buy{
  888. background: #008FD3;
  889. }
  890. }
  891. }
  892. }
  893. .border_bottom_line {
  894. position: relative;
  895. &::after {
  896. content: "";
  897. position: absolute;
  898. bottom: 0;
  899. left: 0;
  900. border-bottom: 1px solid #F5F7FA;
  901. width: 100%;
  902. transform: scaleY(0.5);
  903. border-top-color: #F5F7FA;
  904. border-right-color: #F5F7FA;
  905. border-left-color: #F5F7FA;
  906. }
  907. }
  908. .storebox {
  909. width: 100%;
  910. margin-top: -60rpx;
  911. padding-top: 80rpx;
  912. background-color: #fff;
  913. box-shadow: 0 -20rpx 16rpx #fff;
  914. position: relative;
  915. z-index: 1;
  916. &-info {
  917. padding: 24rpx 24rpx 0 24rpx;
  918. background-color: #fff;
  919. font-family: PingFang SC, PingFang SC;
  920. font-size: 28rpx;
  921. color: #333333;
  922. position: relative;
  923. border-top: 4px solid #F5F7FA;
  924. }
  925. &-map {
  926. display: flex;
  927. align-items: center;
  928. word-break: break-all;
  929. padding: 24rpx 0;
  930. }
  931. &-qualifications {
  932. display: flex;
  933. align-items: center;
  934. padding: 24rpx 0;
  935. }
  936. .qualifications {
  937. padding: 24rpx 0;
  938. }
  939. }
  940. .medic-box{
  941. display: flex;
  942. .cate-list{
  943. box-sizing: border-box;
  944. width: 200upx;
  945. background: #F2F5F9;
  946. display: flex;
  947. flex-direction: column;
  948. padding: 20upx 0;
  949. overflow-y: scroll;
  950. .item{
  951. height: 100upx;
  952. line-height: 100upx;
  953. padding-left: 30upx;
  954. font-size: 28upx;
  955. font-family: PingFang SC;
  956. font-weight: 500;
  957. color: #333333;
  958. position: relative;
  959. &.active{
  960. color: #0bb3f2;
  961. &::after{
  962. content: "";
  963. width: 8upx;
  964. height: 50upx;
  965. background: #0bb3f2;
  966. position: absolute;
  967. top: 25upx;
  968. left: 0;
  969. }
  970. }
  971. }
  972. }
  973. .medic{
  974. box-sizing: border-box;
  975. width: calc(100% - 200upx);
  976. height: 100%;
  977. padding: 0 30upx;
  978. .banner-box{
  979. margin-top: 30rpx;
  980. width: 100%;
  981. height: 160upx;
  982. border-radius: 10upx;
  983. overflow: hidden;
  984. .swiper,
  985. .swiper-item,
  986. .swiper-item image{
  987. width: 100%;
  988. height: 100%;
  989. }
  990. }
  991. .medic-list{
  992. box-sizing: border-box;
  993. padding: 30upx 0;
  994. overflow-y: auto;
  995. height: calc(100% - 220upx);
  996. position: relative;
  997. // .item{
  998. // .title{
  999. // font-size: 28upx;
  1000. // font-family: PingFang SC;
  1001. // font-weight: bold;
  1002. // color: #333333;
  1003. // padding-top: 20upx;
  1004. // margin-bottom: 30upx;
  1005. // }
  1006. // }
  1007. .inner-list{
  1008. display: flex;
  1009. flex-wrap: wrap;
  1010. .definite{
  1011. width: calc(33% - 20upx);
  1012. margin-right: 30upx;
  1013. margin-bottom: 30upx;
  1014. .img-box{
  1015. width: 100%;
  1016. height: 144upx;
  1017. background: #F5F5F5;
  1018. border-radius: 8upx;
  1019. overflow: hidden;
  1020. display: flex;
  1021. align-items: center;
  1022. image{
  1023. max-width: 100%;
  1024. }
  1025. }
  1026. .name{
  1027. width: 100%;
  1028. margin-top: 20upx;
  1029. font-size: 24upx;
  1030. font-family: PingFang SC;
  1031. font-weight: 500;
  1032. color: #666666;
  1033. text-align: center;
  1034. }
  1035. &:nth-child(3n) {
  1036. margin-right: 0;
  1037. }
  1038. }
  1039. }
  1040. }
  1041. }
  1042. }
  1043. </style>