storeProductPackageDetails.vue 20 KB

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