storeProductPackageDetails.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932
  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. methods: {
  176. getOrderCount(){
  177. getOrderCount().then(
  178. res => {
  179. if(res.code==200){
  180. this.count0=res.count0;
  181. if(this.count0>0){
  182. this.messageShow=true;
  183. }
  184. }
  185. },
  186. rej => {}
  187. );
  188. },
  189. showOrder(){
  190. this.utils.isLogin().then(res => {
  191. if(res){
  192. uni.navigateTo({
  193. url: '/pages_user/user/storeOrder?status=0'
  194. })
  195. }
  196. })
  197. },
  198. closeOrder(){
  199. this.messageShow=false;
  200. },
  201. showImg() {
  202. //预览图片
  203. uni.previewImage({
  204. urls: this.banner,
  205. current: this.banner[0]
  206. });
  207. },
  208. getStoreProductPackageDetails(){
  209. let data = {packageId:this.packageId};
  210. getStoreProductPackageDetails(data).then(
  211. res => {
  212. if(res.code==200){
  213. this.package=res.data;
  214. console.log('详情',res.data)
  215. if(this.package.images!=null){
  216. this.banner=this.package.images.split(',')
  217. }
  218. else{
  219. this.banner=[]
  220. }
  221. this.products=JSON.parse(this.package.products);
  222. }else{
  223. uni.showToast({
  224. icon:'none',
  225. title: "请求失败",
  226. });
  227. }
  228. },
  229. rej => {}
  230. );
  231. },
  232. //swiper变化事件
  233. swiperChange(event) {
  234. this.activeBanner = event.detail.current + 1
  235. },
  236. buy() {
  237. this.utils.isLogin().then(res => {
  238. if(res){
  239. uni.navigateTo({
  240. url: '/pages_shopping/shopping/confirmPackageOrder?packageId='+this.packageId+"&companyUserId="+this.companyUserId
  241. })
  242. }
  243. })
  244. },
  245. //回到首页
  246. goHome() {
  247. uni.switchTab({
  248. url: '/pages/home/index'
  249. })
  250. },
  251. //跳转页面
  252. navgetTo(url) {
  253. this.utils.isLogin().then(res => {
  254. if(res){
  255. uni.navigateTo({
  256. url: url
  257. })
  258. }
  259. })
  260. },
  261. }
  262. }
  263. </script>
  264. <style lang="scss">
  265. .shop-banner{
  266. height: 756upx;
  267. background-color: #FFFFFF;
  268. position: relative;
  269. .swiper-item{
  270. box-sizing: border-box;
  271. }
  272. .swiper,
  273. .swiper-item,
  274. .swiper-item image{
  275. width: 100%;
  276. height: 100%;
  277. }
  278. .banner-mask{
  279. width: 100%;
  280. height: 44upx;
  281. // background: linear-gradient(0deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0));
  282. // opacity: 0.8;
  283. position: absolute;
  284. left: 0;
  285. bottom: 0;
  286. z-index: 9;
  287. background-image: url(https://kntobs.jnmyunl.com/shop/images/black_mask.png);
  288. background-size: 20upx 44upx;
  289. background-repeat: repeat-x;
  290. }
  291. .num-box{
  292. width: 80upx;
  293. height: 44upx;
  294. line-height: 44upx;
  295. text-align: center;
  296. font-size: 24upx;
  297. font-family: PingFang SC;
  298. font-weight: 500;
  299. color: #FFFFFF;
  300. background: rgba(0, 0, 0, .3);
  301. border-radius: 22upx;
  302. position: absolute;
  303. right: 30upx;
  304. bottom: 30upx;
  305. z-index: 10;
  306. }
  307. }
  308. .det-info{
  309. background: #FFFFFF;
  310. padding: 36upx 30upx 25upx;
  311. .price-box{
  312. display: flex;
  313. align-items: center;
  314. justify-content: space-between;
  315. .price{
  316. display: flex;
  317. align-items: flex-end;
  318. .label{
  319. color: #333;
  320. font-size: 28upx;
  321. font-family: PingFang SC;
  322. line-height: 1.3;
  323. margin-right: 5upx;
  324. }
  325. .unit{
  326. font-size: 28upx;
  327. font-family: PingFang SC;
  328. font-weight: bold;
  329. color: #FF6633;
  330. line-height: 1.3;
  331. }
  332. .num{
  333. font-size: 40upx;
  334. font-family: PingFang SC;
  335. font-weight: bold;
  336. color: #FF6633;
  337. margin: 0 20upx 0 10upx;
  338. line-height: 1;
  339. }
  340. .old{
  341. font-size: 28upx;
  342. font-family: PingFang SC;
  343. font-weight: 500;
  344. text-decoration: line-through;
  345. color: #BBBBBB;
  346. line-height: 1.3;
  347. }
  348. }
  349. .share-box{
  350. width: 120upx;
  351. height: 46upx;
  352. border: 1px solid #2BC7B9;
  353. border-radius: 23upx;
  354. display: flex;
  355. align-items: center;
  356. justify-content: center;
  357. position: relative;
  358. .text{
  359. font-size: 26upx;
  360. font-family: PingFang SC;
  361. font-weight: 500;
  362. color: #2BC7B9;
  363. }
  364. image{
  365. margin-left: 2rpx;
  366. width: 25upx;
  367. height: 24upx;
  368. }
  369. .share{
  370. display: inline-block;
  371. position: absolute;
  372. top: 0;
  373. left: 0;
  374. width: 100%;
  375. height: 100%rpx;
  376. opacity: 0;
  377. }
  378. }
  379. .spec{
  380. font-size: 24upx;
  381. font-family: PingFang SC;
  382. font-weight: 500;
  383. color: #999999;
  384. line-height: 36upx;
  385. }
  386. }
  387. .name-box{
  388. font-size: 32upx;
  389. font-family: PingFang SC;
  390. font-weight: bold;
  391. color: #111111;
  392. line-height: 44upx;
  393. margin-top: 32upx;
  394. .tag{
  395. display: inline-block;
  396. padding: 0 6upx;
  397. height: 30upx;
  398. background: linear-gradient(90deg, #66b2ef 0%, #2BC7B9 100%);
  399. border-radius: 4upx;
  400. margin-right: 10upx;
  401. font-size: 22upx;
  402. font-family: PingFang SC;
  403. font-weight: bold;
  404. color: #FFFFFF;
  405. line-height: 30upx;
  406. float: left;
  407. margin-top: 7upx;
  408. }
  409. }
  410. .intro{
  411. font-size: 26upx;
  412. font-family: PingFang SC;
  413. font-weight: 500;
  414. color: #999999;
  415. line-height: 36upx;
  416. padding: 18upx 0;
  417. // border-bottom: 1px solid #f7f7f7;
  418. }
  419. .safe-box{
  420. display: flex;
  421. align-items: center;
  422. padding-top: 24upx;
  423. image{
  424. width: 20upx;
  425. height: 24upx;
  426. margin-right: 20upx;
  427. }
  428. .text{
  429. font-size: 22upx;
  430. font-family: PingFang SC;
  431. font-weight: 500;
  432. color: #999999;
  433. line-height: 1;
  434. }
  435. .line{
  436. width: 1px;
  437. height: 23upx;
  438. background: #EDEEEF;
  439. margin: 0 20upx;
  440. }
  441. }
  442. }
  443. .inventor{
  444. height: 88upx;
  445. padding: 0 39upx 0 30upx;
  446. margin-top: 10upx;
  447. background: #FFFFFF;
  448. display: flex;
  449. align-items: center;
  450. justify-content: space-between;
  451. .left{
  452. display: flex;
  453. align-items: center;
  454. .head-box{
  455. margin-right: 27upx;
  456. display: flex;
  457. align-items: center;
  458. .head{
  459. width: 48upx;
  460. height: 48upx;
  461. border-radius: 50%;
  462. overflow: hidden;
  463. box-shadow: 0 0 0 1px #fff;
  464. margin-right: -10upx;
  465. image{
  466. width: 100%;
  467. height: 100%;
  468. }
  469. }
  470. }
  471. .num-box{
  472. font-size: 24upx;
  473. font-family: PingFang SC;
  474. font-weight: 500;
  475. color: #999999;
  476. .text{
  477. font-size: 24upx;
  478. font-family: PingFang SC;
  479. font-weight: 500;
  480. color: #666666;
  481. }
  482. }
  483. }
  484. .right{
  485. font-size: 24upx;
  486. font-family: PingFang SC;
  487. font-weight: 500;
  488. color: #999999;
  489. .text{
  490. font-size: 24upx;
  491. font-family: PingFang SC;
  492. font-weight: 500;
  493. color: #666666;
  494. }
  495. }
  496. }
  497. .effect{
  498. box-sizing: border-box;
  499. padding: 20upx 30upx;
  500. background: #FFFFFF;
  501. font-size: 28upx;
  502. font-family: PingFang SC;
  503. font-weight: 500;
  504. color: #666666;
  505. line-height: 1.8;
  506. margin-top: 10upx;
  507. display: flex;
  508. flex-direction: row;
  509. align-items: center;
  510. justify-content: space-between;
  511. .label{
  512. font-size: 28upx;
  513. font-family: PingFang SC;
  514. font-weight: 500;
  515. color: #111111;
  516. line-height: 1.8;
  517. }
  518. }
  519. .det-box{
  520. margin-top: 10upx;
  521. padding: 40upx 30upx 130upx 30upx;
  522. background-color: #FFFFFF;
  523. .title{
  524. font-size: 30upx;
  525. font-family: PingFang SC;
  526. font-weight: bold;
  527. color: #333333;
  528. line-height: 1;
  529. margin-bottom: 25upx;
  530. }
  531. }
  532. .btn-foot{
  533. box-sizing: border-box;
  534. width: 100%;
  535. height: 121upx;
  536. background: #FFFFFF;
  537. padding: 0 32upx 0 28upx;
  538. display: flex;
  539. align-items: center;
  540. justify-content: space-between;
  541. position: fixed;
  542. left: 0;
  543. bottom: 0;
  544. z-index: 99;
  545. .menu-box{
  546. display: flex;
  547. align-items: center;
  548. .item{
  549. display: flex;
  550. align-items: center;
  551. flex-direction: column;
  552. margin-right: 48upx;
  553. &:last-child{
  554. margin-right: 0;
  555. }
  556. image{
  557. width: 36upx;
  558. height: 36upx;
  559. margin-bottom: 10upx;
  560. }
  561. .label{
  562. font-size: 20upx;
  563. font-family: PingFang SC;
  564. font-weight: 500;
  565. color: #666666;
  566. text-align: center;
  567. }
  568. }
  569. :deep(.uni-badge--x){
  570. display: flex;
  571. align-items: center;
  572. justify-content: center;
  573. }
  574. :deep(.uni-badge){
  575. border: none;
  576. background-color: #FF3636;
  577. font-family: Roboto;
  578. }
  579. }
  580. .btn-box{
  581. display: flex;
  582. align-items: center;
  583. .btn{
  584. width: 200upx;
  585. height: 88upx;
  586. line-height: 88upx;
  587. text-align: center;
  588. border-radius: 44upx;
  589. margin-left: 20upx;
  590. font-size: 30upx;
  591. font-family: PingFang SC;
  592. font-weight: bold;
  593. color: #FFFFFF;
  594. position: relative;
  595. &:first-child{
  596. margin-left: 0;
  597. }
  598. &.cart{
  599. background: #FF6633;
  600. }
  601. &.buy{
  602. background: #2BC7B9;
  603. }
  604. }
  605. .share{
  606. display: inline-block;
  607. position: absolute;
  608. top: 0;
  609. left: 0;
  610. width: 100%;
  611. height: 100%rpx;
  612. opacity: 0;
  613. }
  614. }
  615. }
  616. .product-spec{
  617. .pro-info{
  618. display: flex;
  619. align-items: center;
  620. .img-box{
  621. width: 200upx;
  622. height: 200upx;
  623. background: #FFFFFF;
  624. border-radius: 16upx;
  625. overflow: hidden;
  626. margin-right: 30upx;
  627. image{
  628. width: 100%;
  629. height: 100%;
  630. }
  631. }
  632. .info-text{
  633. height: 200upx;
  634. display: flex;
  635. flex-direction: column;
  636. justify-content: space-between;
  637. .price{
  638. display: flex;
  639. align-items: flex-end;
  640. .unit{
  641. font-size: 32upx;
  642. font-family: PingFang SC;
  643. font-weight: bold;
  644. color: #FF6633;
  645. line-height: 1.2;
  646. margin-right: 10upx;
  647. }
  648. .num{
  649. font-size: 50upx;
  650. font-family: PingFang SC;
  651. font-weight: bold;
  652. color: #FF6633;
  653. line-height: 1;
  654. }
  655. }
  656. .desc-box{
  657. display: flex;
  658. flex-direction: column;
  659. padding-bottom: 9upx;
  660. .text{
  661. font-size: 26upx;
  662. font-family: PingFang SC;
  663. font-weight: 500;
  664. color: #999999;
  665. margin-top: 27upx;
  666. line-height: 1;
  667. &:first-child{
  668. margin-top: 0;
  669. }
  670. }
  671. }
  672. }
  673. }
  674. .spec-box{
  675. padding-top: 50upx;
  676. .title{
  677. font-size: 34upx;
  678. font-family: PingFang SC;
  679. font-weight: bold;
  680. color: #111111;
  681. line-height: 1;
  682. }
  683. .spec-list{
  684. display: flex;
  685. flex-wrap: wrap;
  686. margin-top: 30upx;
  687. .item{
  688. box-sizing: border-box;
  689. height: 64upx;
  690. padding: 0 30upx;
  691. line-height: 64upx;
  692. font-size: 28upx;
  693. font-family: PingFang SC;
  694. font-weight: 500;
  695. color: #111111;
  696. background: #F7F7F7;
  697. border: 1px solid #F7F7F7;
  698. border-radius: 32upx;
  699. margin-right: 20upx;
  700. margin-bottom: 30upx;
  701. &.active{
  702. background: #F1FFFE;
  703. border: 1px solid #8AD5CE;
  704. color: #2BC7B9;
  705. }
  706. }
  707. }
  708. }
  709. .price-num{
  710. display: flex;
  711. align-items: center;
  712. justify-content: space-between;
  713. margin-top: 14upx;
  714. .label{
  715. font-size: 34upx;
  716. font-family: PingFang SC;
  717. font-weight: bold;
  718. color: #111111;
  719. }
  720. .num-box{
  721. display: flex;
  722. align-items: center;
  723. .img-box{
  724. width: 60upx;
  725. height: 60upx;
  726. // border-radius: 4upx;
  727. border: 1px solid #dddddd;
  728. display: flex;
  729. align-items: center;
  730. justify-content: center;
  731. image{
  732. width: 25rpx;
  733. height: 25rpx;
  734. }
  735. }
  736. input{
  737. width: 60upx;
  738. height: 60upx;
  739. line-height: 60upx;
  740. font-size: 28upx;
  741. font-family: PingFang SC;
  742. font-weight: 500;
  743. color: #111111;
  744. // border-radius: 4upx;
  745. border-top: 1px solid #dddddd;
  746. border-bottom: 1px solid #dddddd;
  747. text-align: center;
  748. // margin: 0 16upx;
  749. }
  750. }
  751. }
  752. .sub-btn{
  753. width: 100%;
  754. height: 88upx;
  755. line-height: 88upx;
  756. text-align: center;
  757. font-size: 30upx;
  758. font-family: PingFang SC;
  759. font-weight: bold;
  760. color: #FFFFFF;
  761. background: #2BC7B9;
  762. border-radius: 44upx;
  763. margin-top: 30upx;
  764. // margin-bottom: 30upx;
  765. }
  766. }
  767. .contact-btn{
  768. display: inline-block;
  769. position: absolute;
  770. top: 0;
  771. left: 0;
  772. width: 100%;
  773. height: 100%;
  774. opacity: 0;
  775. z-index: 9999;
  776. }
  777. .drug-box{
  778. margin: 10upx 0 10upx;
  779. padding: 40upx 30upx;
  780. background-color: #FFFFFF;
  781. .drug-list{
  782. .drug-item{
  783. padding: 30upx 0;
  784. border-bottom: 1px soli #F0F0F0;
  785. display: flex;
  786. align-items: center;
  787. .img-box{
  788. width: 160upx;
  789. height: 160upx;
  790. margin-right: 30upx;
  791. flex-shrink: 0;
  792. image{
  793. width: 100%;
  794. height: 100%;
  795. }
  796. }
  797. .drug-info{
  798. width: calc(100% - 190upx);
  799. height: 160upx;
  800. display: flex;
  801. flex-direction: column;
  802. justify-content: space-between;
  803. .name-box{
  804. font-size: 28upx;
  805. font-family: PingFang SC;
  806. font-weight: 500;
  807. color: #111111;
  808. line-height: 40upx;
  809. .tag{
  810. display: inline-block;
  811. padding: 0 6upx;
  812. height: 30upx;
  813. background: linear-gradient(90deg, #66b2ef 0%, #2BC7B9 100%);
  814. border-radius: 4upx;
  815. margin-right: 10upx;
  816. font-size: 22upx;
  817. font-family: PingFang SC;
  818. font-weight: bold;
  819. color: #FFFFFF;
  820. line-height: 30upx;
  821. float: left;
  822. margin-top: 7upx;
  823. }
  824. }
  825. .spec{
  826. font-size: 24upx;
  827. font-family: PingFang SC;
  828. font-weight: 500;
  829. color: #999999;
  830. line-height: 1;
  831. margin-top: 10upx;
  832. }
  833. .num-box{
  834. display: flex;
  835. align-items: center;
  836. justify-content: space-between;
  837. .price{
  838. display: flex;
  839. align-items: flex-end;
  840. .unit{
  841. font-size: 24upx;
  842. font-family: PingFang SC;
  843. font-weight: 500;
  844. color: #111111;
  845. line-height: 1.2;
  846. margin-right: 4upx;
  847. }
  848. .num{
  849. font-size: 32upx;
  850. font-family: PingFang SC;
  851. font-weight: 500;
  852. color: #111111;
  853. line-height: 1;
  854. }
  855. }
  856. .amount{
  857. font-size: 24upx;
  858. font-family: PingFang SC;
  859. font-weight: 500;
  860. color: #999999;
  861. line-height: 1;
  862. }
  863. }
  864. }
  865. }
  866. }
  867. }
  868. .message-box{
  869. box-sizing: border-box;
  870. width: 693upx;
  871. height: 84upx;
  872. background: #F3FFFD;
  873. border: 1px solid #C7E9E5;
  874. box-shadow: 0px 4upx 12upx 0px rgba(90, 203, 138, 0.16);
  875. border-radius: 16upx;
  876. position: fixed;
  877. left: 50%;
  878. transform: translateX(-50%);
  879. bottom: 128upx;
  880. z-index: 99;
  881. display: flex;
  882. align-items: center;
  883. justify-content: space-between;
  884. padding: 0 20upx 0 30upx;
  885. .left{
  886. width: 80%;
  887. display: flex;
  888. align-items: center;
  889. image{
  890. width: 24upx;
  891. height: 24upx;
  892. margin-right: 18upx;
  893. }
  894. .text{
  895. width: 90%;
  896. font-size: 28upx;
  897. font-family: PingFang SC;
  898. font-weight: 500;
  899. color: #2BC7B9;
  900. }
  901. }
  902. .btn{
  903. width: 100upx;
  904. height: 48upx;
  905. line-height: 48upx;
  906. text-align: center;
  907. font-size: 24upx;
  908. font-family: PingFang SC;
  909. font-weight: 500;
  910. color: #FFFFFF;
  911. border: 1px solid #D2E6FF;
  912. background: linear-gradient(135deg, #66b2ef 0%, #2BC7B9 100%);
  913. border-radius: 24upx;
  914. margin-left: 30upx;
  915. }
  916. }
  917. </style>