storeProductPackageDetails.vue 20 KB

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