storeProductPackageDetails.vue 20 KB

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