storeProductPackageDetails.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937
  1. <template>
  2. <view class="content">
  3. <!-- 商品轮播图片 -->
  4. <view class="shop-banner" @click="showImg()">
  5. <swiper
  6. class="swiper"
  7. :indicator-dots="false"
  8. :circular="true"
  9. :autoplay="true"
  10. :interval="3000"
  11. :duration="1000"
  12. indicator-color="rgba(255, 255, 255, 0.6)"
  13. indicator-active-color="#ffffff"
  14. @change="swiperChange"
  15. >
  16. <swiper-item class="swiper-item" v-for="(item,index) in banner" :key="index">
  17. <image :src="item" mode="aspectFit"></image>
  18. </swiper-item>
  19. </swiper>
  20. <!-- 底部遮罩 -->
  21. <view class="banner-mask"></view>
  22. <!-- 数量 -->
  23. <view class="num-box">{{ activeBanner }}/{{ banner.length }}</view>
  24. </view>
  25. <!-- 详细信息 -->
  26. <view class="det-info">
  27. <view class="price-box">
  28. <view class="price">
  29. <text class="label">会员价</text>
  30. <text class="unit">¥</text>
  31. <text class="num" v-if="package!=null" >{{package.payMoney.toFixed(2)}}</text>
  32. <text class="label">零售价</text>
  33. <text class="old" v-if="package!=null" >¥{{package.money.toFixed(2)}}</text>
  34. </view>
  35. </view>
  36. <view class="name-box">
  37. {{package.title}}
  38. </view>
  39. <view class="intro">
  40. {{package.descs}}
  41. </view>
  42. </view>
  43. <!-- <view class="drug-box">
  44. <view class="title">组合套餐</view>
  45. <view class="inner">
  46. <view class="drug-list" >
  47. <view v-for="(subItem,index) in products" :key="index" class="drug-item">
  48. <view class="img-box">
  49. <image :src="subItem.image" mode="aspectFill"></image>
  50. </view>
  51. <view class="drug-info" >
  52. <view>
  53. <view class="name-box ellipsis2">
  54. {{subItem.productName}}
  55. </view>
  56. <view class="spec">{{subItem.sku}}</view>
  57. </view>
  58. <view class="num-box">
  59. <view class="price">
  60. <text class="unit">¥</text>
  61. <text class="num">{{subItem.price.toFixed(2)}}</text>
  62. </view>
  63. <view class="amount">x{{subItem.count}}</view>
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. </view> -->
  70. <!-- 图文详情 -->
  71. <view class="det-box">
  72. <view class="title">图文详情</view>
  73. <!-- <view class="inner">
  74. <view v-html="package.content" style="font-size:0" ></view>
  75. </view> -->
  76. <view v-html="package.content" ></view>
  77. </view>
  78. <!-- 底部按钮 -->
  79. <view class="btn-foot">
  80. <view class="menu-box">
  81. <view class="item" @click="goHome">
  82. <image src="https://kntobs.jnmyunl.com/shop/images/back_home.png" mode=""></image>
  83. <text class="label">首页</text>
  84. </view>
  85. <view class="item" style="position: relative;">
  86. <image src="https://kntobs.jnmyunl.com/shop/images/consult_small.png" mode=""></image>
  87. <text class="label">咨询</text>
  88. <button class="contact-btn" open-type="contact"></button>
  89. </view>
  90. </view>
  91. <view class="btn-box">
  92. <view class="btn buy" @click="buy" v-if="isShare==1">立即购买</view>
  93. <view class="btn buy" v-else>
  94. 分享
  95. <button class="share" data-name="shareBtn" open-type="share">分享</button>
  96. </view>
  97. </view>
  98. </view>
  99. <view class="message-box" v-if="messageShow">
  100. <view class="left">
  101. <image src="https://kntobs.jnmyunl.com/shop/images/close24.png" mode="" @click="closeOrder()" ></image>
  102. <view class="text ellipsis">您有{{count0}}个待支付订单</view>
  103. </view>
  104. <view class="btn" @click="showOrder()">查看</view>
  105. </view>
  106. </view>
  107. </template>
  108. <script>
  109. import {getOrderCount} from '@/api/storeOrder'
  110. import {getStoreProductPackageDetails} from '@/api/storeProductPackage'
  111. export default {
  112. data() {
  113. return {
  114. count0:0,
  115. messageShow:false,
  116. banner:[],
  117. packageId:null,
  118. package:null,
  119. products:[],
  120. // 当前轮播的图片
  121. activeBanner: 1,
  122. CompanyUserInfo:{},
  123. isShare: 0
  124. };
  125. },
  126. onLoad(options) {
  127. this.isShare = options.isShare || 0
  128. this.CompanyUserInfo=uni.getStorageSync('CompanyUserInfo');
  129. if (options.hasOwnProperty('q') && options.q) {
  130. this.isShare=1
  131. // 通过下面这步解码,可以拿到url的值
  132. const url = decodeURIComponent(options.q)
  133. this.url=url;
  134. // // 对url中携带的参数提取处理
  135. const obj = this.utils.urlToObj(url)
  136. this.packageId = obj.packageId;
  137. this.companyId = obj.companyId;
  138. this.companyUserId = obj.companyUserId;
  139. }
  140. else{
  141. this.packageId = options.packageId;
  142. this.companyId = options.companyId;
  143. this.companyUserId = options.companyUserId;
  144. }
  145. if(this.isShare==1){
  146. console.log(JSON.stringify(this.CompanyUserInfo))
  147. uni.hideShareMenu()
  148. }else{
  149. uni.showShareMenu()
  150. }
  151. // uni.showShareMenu({
  152. // withShareTicket:true,
  153. // //小程序的原生菜单中显示分享按钮,才能够让发送给朋友与分享到朋友圈两个按钮可以点击
  154. // menus:["shareAppMessage","shareTimeline"] //不设置默认发送给朋友
  155. // })
  156. },
  157. //发送给朋友
  158. onShareAppMessage(res) {
  159. wx.updateShareMenu({
  160. isPrivateMessage: true
  161. })
  162. return {
  163. title: this.package.title,
  164. path: `/pages_company/storeProductPackageDetails?isShare=1&packageId=${this.package.packageId}`+"&companyId="+this.companyId+"&companyUserId="+this.companyUserId,
  165. imageUrl: this.package.imgUrl //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  166. }
  167. },
  168. onShow() {
  169. console.log("onshow")
  170. if(this.utils.isLogin()){
  171. this.getOrderCount();
  172. }
  173. this.getStoreProductPackageDetails();
  174. },
  175. onHide() {
  176. wx.updateShareMenu({
  177. isPrivateMessage: false
  178. })
  179. },
  180. methods: {
  181. getOrderCount(){
  182. getOrderCount().then(
  183. res => {
  184. if(res.code==200){
  185. this.count0=res.count0;
  186. if(this.count0>0){
  187. this.messageShow=true;
  188. }
  189. }
  190. },
  191. rej => {}
  192. );
  193. },
  194. showOrder(){
  195. this.utils.isLogin().then(res => {
  196. if(res){
  197. uni.navigateTo({
  198. url: '/pages_user/user/storeOrder?status=0'
  199. })
  200. }
  201. })
  202. },
  203. closeOrder(){
  204. this.messageShow=false;
  205. },
  206. showImg() {
  207. //预览图片
  208. uni.previewImage({
  209. urls: this.banner,
  210. current: this.banner[0]
  211. });
  212. },
  213. getStoreProductPackageDetails(){
  214. let data = {packageId:this.packageId};
  215. getStoreProductPackageDetails(data).then(
  216. res => {
  217. if(res.code==200){
  218. this.package=res.data;
  219. console.log('详情',res.data)
  220. if(this.package.images!=null){
  221. this.banner=this.package.images.split(',')
  222. }
  223. else{
  224. this.banner=[]
  225. }
  226. this.products=JSON.parse(this.package.products);
  227. }else{
  228. uni.showToast({
  229. icon:'none',
  230. title: "请求失败",
  231. });
  232. }
  233. },
  234. rej => {}
  235. );
  236. },
  237. //swiper变化事件
  238. swiperChange(event) {
  239. this.activeBanner = event.detail.current + 1
  240. },
  241. buy() {
  242. this.utils.isLogin().then(res => {
  243. if(res){
  244. uni.navigateTo({
  245. url: '/pages_shopping/shopping/confirmPackageOrder?packageId='+this.packageId+"&companyUserId="+this.companyUserId
  246. })
  247. }
  248. })
  249. },
  250. //回到首页
  251. goHome() {
  252. uni.switchTab({
  253. url: '/pages/home/index'
  254. })
  255. },
  256. //跳转页面
  257. navgetTo(url) {
  258. this.utils.isLogin().then(res => {
  259. if(res){
  260. uni.navigateTo({
  261. url: url
  262. })
  263. }
  264. })
  265. },
  266. }
  267. }
  268. </script>
  269. <style lang="scss">
  270. .shop-banner{
  271. height: 756upx;
  272. background-color: #FFFFFF;
  273. position: relative;
  274. .swiper-item{
  275. box-sizing: border-box;
  276. }
  277. .swiper,
  278. .swiper-item,
  279. .swiper-item image{
  280. width: 100%;
  281. height: 100%;
  282. }
  283. .banner-mask{
  284. width: 100%;
  285. height: 44upx;
  286. // background: linear-gradient(0deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0));
  287. // opacity: 0.8;
  288. position: absolute;
  289. left: 0;
  290. bottom: 0;
  291. z-index: 9;
  292. background-image: url(https://kntobs.jnmyunl.com/shop/images/black_mask.png);
  293. background-size: 20upx 44upx;
  294. background-repeat: repeat-x;
  295. }
  296. .num-box{
  297. width: 80upx;
  298. height: 44upx;
  299. line-height: 44upx;
  300. text-align: center;
  301. font-size: 24upx;
  302. font-family: PingFang SC;
  303. font-weight: 500;
  304. color: #FFFFFF;
  305. background: rgba(0, 0, 0, .3);
  306. border-radius: 22upx;
  307. position: absolute;
  308. right: 30upx;
  309. bottom: 30upx;
  310. z-index: 10;
  311. }
  312. }
  313. .det-info{
  314. background: #FFFFFF;
  315. padding: 36upx 30upx 25upx;
  316. .price-box{
  317. display: flex;
  318. align-items: center;
  319. justify-content: space-between;
  320. .price{
  321. display: flex;
  322. align-items: flex-end;
  323. .label{
  324. color: #333;
  325. font-size: 28upx;
  326. font-family: PingFang SC;
  327. line-height: 1.3;
  328. margin-right: 5upx;
  329. }
  330. .unit{
  331. font-size: 28upx;
  332. font-family: PingFang SC;
  333. font-weight: bold;
  334. color: #FF6633;
  335. line-height: 1.3;
  336. }
  337. .num{
  338. font-size: 40upx;
  339. font-family: PingFang SC;
  340. font-weight: bold;
  341. color: #FF6633;
  342. margin: 0 20upx 0 10upx;
  343. line-height: 1;
  344. }
  345. .old{
  346. font-size: 28upx;
  347. font-family: PingFang SC;
  348. font-weight: 500;
  349. text-decoration: line-through;
  350. color: #BBBBBB;
  351. line-height: 1.3;
  352. }
  353. }
  354. .share-box{
  355. width: 120upx;
  356. height: 46upx;
  357. border: 1px solid #2BC7B9;
  358. border-radius: 23upx;
  359. display: flex;
  360. align-items: center;
  361. justify-content: center;
  362. position: relative;
  363. .text{
  364. font-size: 26upx;
  365. font-family: PingFang SC;
  366. font-weight: 500;
  367. color: #2BC7B9;
  368. }
  369. image{
  370. margin-left: 2rpx;
  371. width: 25upx;
  372. height: 24upx;
  373. }
  374. .share{
  375. display: inline-block;
  376. position: absolute;
  377. top: 0;
  378. left: 0;
  379. width: 100%;
  380. height: 100%rpx;
  381. opacity: 0;
  382. }
  383. }
  384. .spec{
  385. font-size: 24upx;
  386. font-family: PingFang SC;
  387. font-weight: 500;
  388. color: #999999;
  389. line-height: 36upx;
  390. }
  391. }
  392. .name-box{
  393. font-size: 32upx;
  394. font-family: PingFang SC;
  395. font-weight: bold;
  396. color: #111111;
  397. line-height: 44upx;
  398. margin-top: 32upx;
  399. .tag{
  400. display: inline-block;
  401. padding: 0 6upx;
  402. height: 30upx;
  403. background: linear-gradient(90deg, #66b2ef 0%, #2BC7B9 100%);
  404. border-radius: 4upx;
  405. margin-right: 10upx;
  406. font-size: 22upx;
  407. font-family: PingFang SC;
  408. font-weight: bold;
  409. color: #FFFFFF;
  410. line-height: 30upx;
  411. float: left;
  412. margin-top: 7upx;
  413. }
  414. }
  415. .intro{
  416. font-size: 26upx;
  417. font-family: PingFang SC;
  418. font-weight: 500;
  419. color: #999999;
  420. line-height: 36upx;
  421. padding: 18upx 0;
  422. // border-bottom: 1px solid #f7f7f7;
  423. }
  424. .safe-box{
  425. display: flex;
  426. align-items: center;
  427. padding-top: 24upx;
  428. image{
  429. width: 20upx;
  430. height: 24upx;
  431. margin-right: 20upx;
  432. }
  433. .text{
  434. font-size: 22upx;
  435. font-family: PingFang SC;
  436. font-weight: 500;
  437. color: #999999;
  438. line-height: 1;
  439. }
  440. .line{
  441. width: 1px;
  442. height: 23upx;
  443. background: #EDEEEF;
  444. margin: 0 20upx;
  445. }
  446. }
  447. }
  448. .inventor{
  449. height: 88upx;
  450. padding: 0 39upx 0 30upx;
  451. margin-top: 10upx;
  452. background: #FFFFFF;
  453. display: flex;
  454. align-items: center;
  455. justify-content: space-between;
  456. .left{
  457. display: flex;
  458. align-items: center;
  459. .head-box{
  460. margin-right: 27upx;
  461. display: flex;
  462. align-items: center;
  463. .head{
  464. width: 48upx;
  465. height: 48upx;
  466. border-radius: 50%;
  467. overflow: hidden;
  468. box-shadow: 0 0 0 1px #fff;
  469. margin-right: -10upx;
  470. image{
  471. width: 100%;
  472. height: 100%;
  473. }
  474. }
  475. }
  476. .num-box{
  477. font-size: 24upx;
  478. font-family: PingFang SC;
  479. font-weight: 500;
  480. color: #999999;
  481. .text{
  482. font-size: 24upx;
  483. font-family: PingFang SC;
  484. font-weight: 500;
  485. color: #666666;
  486. }
  487. }
  488. }
  489. .right{
  490. font-size: 24upx;
  491. font-family: PingFang SC;
  492. font-weight: 500;
  493. color: #999999;
  494. .text{
  495. font-size: 24upx;
  496. font-family: PingFang SC;
  497. font-weight: 500;
  498. color: #666666;
  499. }
  500. }
  501. }
  502. .effect{
  503. box-sizing: border-box;
  504. padding: 20upx 30upx;
  505. background: #FFFFFF;
  506. font-size: 28upx;
  507. font-family: PingFang SC;
  508. font-weight: 500;
  509. color: #666666;
  510. line-height: 1.8;
  511. margin-top: 10upx;
  512. display: flex;
  513. flex-direction: row;
  514. align-items: center;
  515. justify-content: space-between;
  516. .label{
  517. font-size: 28upx;
  518. font-family: PingFang SC;
  519. font-weight: 500;
  520. color: #111111;
  521. line-height: 1.8;
  522. }
  523. }
  524. .det-box{
  525. margin-top: 10upx;
  526. padding: 40upx 30upx 130upx 30upx;
  527. background-color: #FFFFFF;
  528. .title{
  529. font-size: 30upx;
  530. font-family: PingFang SC;
  531. font-weight: bold;
  532. color: #333333;
  533. line-height: 1;
  534. margin-bottom: 25upx;
  535. }
  536. }
  537. .btn-foot{
  538. box-sizing: border-box;
  539. width: 100%;
  540. height: 121upx;
  541. background: #FFFFFF;
  542. padding: 0 32upx 0 28upx;
  543. display: flex;
  544. align-items: center;
  545. justify-content: space-between;
  546. position: fixed;
  547. left: 0;
  548. bottom: 0;
  549. z-index: 99;
  550. .menu-box{
  551. display: flex;
  552. align-items: center;
  553. .item{
  554. display: flex;
  555. align-items: center;
  556. flex-direction: column;
  557. margin-right: 48upx;
  558. &:last-child{
  559. margin-right: 0;
  560. }
  561. image{
  562. width: 36upx;
  563. height: 36upx;
  564. margin-bottom: 10upx;
  565. }
  566. .label{
  567. font-size: 20upx;
  568. font-family: PingFang SC;
  569. font-weight: 500;
  570. color: #666666;
  571. text-align: center;
  572. }
  573. }
  574. :deep(.uni-badge--x){
  575. display: flex;
  576. align-items: center;
  577. justify-content: center;
  578. }
  579. :deep(.uni-badge){
  580. border: none;
  581. background-color: #FF3636;
  582. font-family: Roboto;
  583. }
  584. }
  585. .btn-box{
  586. display: flex;
  587. align-items: center;
  588. .btn{
  589. width: 200upx;
  590. height: 88upx;
  591. line-height: 88upx;
  592. text-align: center;
  593. border-radius: 44upx;
  594. margin-left: 20upx;
  595. font-size: 30upx;
  596. font-family: PingFang SC;
  597. font-weight: bold;
  598. color: #FFFFFF;
  599. position: relative;
  600. &:first-child{
  601. margin-left: 0;
  602. }
  603. &.cart{
  604. background: #FF6633;
  605. }
  606. &.buy{
  607. background: #2BC7B9;
  608. }
  609. }
  610. .share{
  611. display: inline-block;
  612. position: absolute;
  613. top: 0;
  614. left: 0;
  615. width: 100%;
  616. height: 100%rpx;
  617. opacity: 0;
  618. }
  619. }
  620. }
  621. .product-spec{
  622. .pro-info{
  623. display: flex;
  624. align-items: center;
  625. .img-box{
  626. width: 200upx;
  627. height: 200upx;
  628. background: #FFFFFF;
  629. border-radius: 16upx;
  630. overflow: hidden;
  631. margin-right: 30upx;
  632. image{
  633. width: 100%;
  634. height: 100%;
  635. }
  636. }
  637. .info-text{
  638. height: 200upx;
  639. display: flex;
  640. flex-direction: column;
  641. justify-content: space-between;
  642. .price{
  643. display: flex;
  644. align-items: flex-end;
  645. .unit{
  646. font-size: 32upx;
  647. font-family: PingFang SC;
  648. font-weight: bold;
  649. color: #FF6633;
  650. line-height: 1.2;
  651. margin-right: 10upx;
  652. }
  653. .num{
  654. font-size: 50upx;
  655. font-family: PingFang SC;
  656. font-weight: bold;
  657. color: #FF6633;
  658. line-height: 1;
  659. }
  660. }
  661. .desc-box{
  662. display: flex;
  663. flex-direction: column;
  664. padding-bottom: 9upx;
  665. .text{
  666. font-size: 26upx;
  667. font-family: PingFang SC;
  668. font-weight: 500;
  669. color: #999999;
  670. margin-top: 27upx;
  671. line-height: 1;
  672. &:first-child{
  673. margin-top: 0;
  674. }
  675. }
  676. }
  677. }
  678. }
  679. .spec-box{
  680. padding-top: 50upx;
  681. .title{
  682. font-size: 34upx;
  683. font-family: PingFang SC;
  684. font-weight: bold;
  685. color: #111111;
  686. line-height: 1;
  687. }
  688. .spec-list{
  689. display: flex;
  690. flex-wrap: wrap;
  691. margin-top: 30upx;
  692. .item{
  693. box-sizing: border-box;
  694. height: 64upx;
  695. padding: 0 30upx;
  696. line-height: 64upx;
  697. font-size: 28upx;
  698. font-family: PingFang SC;
  699. font-weight: 500;
  700. color: #111111;
  701. background: #F7F7F7;
  702. border: 1px solid #F7F7F7;
  703. border-radius: 32upx;
  704. margin-right: 20upx;
  705. margin-bottom: 30upx;
  706. &.active{
  707. background: #F1FFFE;
  708. border: 1px solid #8AD5CE;
  709. color: #2BC7B9;
  710. }
  711. }
  712. }
  713. }
  714. .price-num{
  715. display: flex;
  716. align-items: center;
  717. justify-content: space-between;
  718. margin-top: 14upx;
  719. .label{
  720. font-size: 34upx;
  721. font-family: PingFang SC;
  722. font-weight: bold;
  723. color: #111111;
  724. }
  725. .num-box{
  726. display: flex;
  727. align-items: center;
  728. .img-box{
  729. width: 60upx;
  730. height: 60upx;
  731. // border-radius: 4upx;
  732. border: 1px solid #dddddd;
  733. display: flex;
  734. align-items: center;
  735. justify-content: center;
  736. image{
  737. width: 25rpx;
  738. height: 25rpx;
  739. }
  740. }
  741. input{
  742. width: 60upx;
  743. height: 60upx;
  744. line-height: 60upx;
  745. font-size: 28upx;
  746. font-family: PingFang SC;
  747. font-weight: 500;
  748. color: #111111;
  749. // border-radius: 4upx;
  750. border-top: 1px solid #dddddd;
  751. border-bottom: 1px solid #dddddd;
  752. text-align: center;
  753. // margin: 0 16upx;
  754. }
  755. }
  756. }
  757. .sub-btn{
  758. width: 100%;
  759. height: 88upx;
  760. line-height: 88upx;
  761. text-align: center;
  762. font-size: 30upx;
  763. font-family: PingFang SC;
  764. font-weight: bold;
  765. color: #FFFFFF;
  766. background: #2BC7B9;
  767. border-radius: 44upx;
  768. margin-top: 30upx;
  769. // margin-bottom: 30upx;
  770. }
  771. }
  772. .contact-btn{
  773. display: inline-block;
  774. position: absolute;
  775. top: 0;
  776. left: 0;
  777. width: 100%;
  778. height: 100%;
  779. opacity: 0;
  780. z-index: 9999;
  781. }
  782. .drug-box{
  783. margin: 10upx 0 10upx;
  784. padding: 40upx 30upx;
  785. background-color: #FFFFFF;
  786. .drug-list{
  787. .drug-item{
  788. padding: 30upx 0;
  789. border-bottom: 1px soli #F0F0F0;
  790. display: flex;
  791. align-items: center;
  792. .img-box{
  793. width: 160upx;
  794. height: 160upx;
  795. margin-right: 30upx;
  796. flex-shrink: 0;
  797. image{
  798. width: 100%;
  799. height: 100%;
  800. }
  801. }
  802. .drug-info{
  803. width: calc(100% - 190upx);
  804. height: 160upx;
  805. display: flex;
  806. flex-direction: column;
  807. justify-content: space-between;
  808. .name-box{
  809. font-size: 28upx;
  810. font-family: PingFang SC;
  811. font-weight: 500;
  812. color: #111111;
  813. line-height: 40upx;
  814. .tag{
  815. display: inline-block;
  816. padding: 0 6upx;
  817. height: 30upx;
  818. background: linear-gradient(90deg, #66b2ef 0%, #2BC7B9 100%);
  819. border-radius: 4upx;
  820. margin-right: 10upx;
  821. font-size: 22upx;
  822. font-family: PingFang SC;
  823. font-weight: bold;
  824. color: #FFFFFF;
  825. line-height: 30upx;
  826. float: left;
  827. margin-top: 7upx;
  828. }
  829. }
  830. .spec{
  831. font-size: 24upx;
  832. font-family: PingFang SC;
  833. font-weight: 500;
  834. color: #999999;
  835. line-height: 1;
  836. margin-top: 10upx;
  837. }
  838. .num-box{
  839. display: flex;
  840. align-items: center;
  841. justify-content: space-between;
  842. .price{
  843. display: flex;
  844. align-items: flex-end;
  845. .unit{
  846. font-size: 24upx;
  847. font-family: PingFang SC;
  848. font-weight: 500;
  849. color: #111111;
  850. line-height: 1.2;
  851. margin-right: 4upx;
  852. }
  853. .num{
  854. font-size: 32upx;
  855. font-family: PingFang SC;
  856. font-weight: 500;
  857. color: #111111;
  858. line-height: 1;
  859. }
  860. }
  861. .amount{
  862. font-size: 24upx;
  863. font-family: PingFang SC;
  864. font-weight: 500;
  865. color: #999999;
  866. line-height: 1;
  867. }
  868. }
  869. }
  870. }
  871. }
  872. }
  873. .message-box{
  874. box-sizing: border-box;
  875. width: 693upx;
  876. height: 84upx;
  877. background: #F3FFFD;
  878. border: 1px solid #C7E9E5;
  879. box-shadow: 0px 4upx 12upx 0px rgba(90, 203, 138, 0.16);
  880. border-radius: 16upx;
  881. position: fixed;
  882. left: 50%;
  883. transform: translateX(-50%);
  884. bottom: 128upx;
  885. z-index: 99;
  886. display: flex;
  887. align-items: center;
  888. justify-content: space-between;
  889. padding: 0 20upx 0 30upx;
  890. .left{
  891. width: 80%;
  892. display: flex;
  893. align-items: center;
  894. image{
  895. width: 24upx;
  896. height: 24upx;
  897. margin-right: 18upx;
  898. }
  899. .text{
  900. width: 90%;
  901. font-size: 28upx;
  902. font-family: PingFang SC;
  903. font-weight: 500;
  904. color: #2BC7B9;
  905. }
  906. }
  907. .btn{
  908. width: 100upx;
  909. height: 48upx;
  910. line-height: 48upx;
  911. text-align: center;
  912. font-size: 24upx;
  913. font-family: PingFang SC;
  914. font-weight: 500;
  915. color: #FFFFFF;
  916. border: 1px solid #D2E6FF;
  917. background: linear-gradient(135deg, #66b2ef 0%, #2BC7B9 100%);
  918. border-radius: 24upx;
  919. margin-left: 30upx;
  920. }
  921. }
  922. </style>