storeProductPackageDetails.vue 20 KB

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