productDetail.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774
  1. <template>
  2. <view class="pages">
  3. <!-- head -->
  4. <view class="scrollPage-header">
  5. <view :style="{height:statusBarHeight+'px'}"></view>
  6. <view class="header-title">
  7. <view class="header-left" @click="goBack">
  8. <uni-icons type="arrowleft" size="20"></uni-icons>
  9. <text>{{isShare?'首页':'返回'}}</text>
  10. </view>
  11. <view class="header-right"></view>
  12. </view>
  13. </view>
  14. <!-- 内容 -->
  15. <view class="scrollPage-content">
  16. <view class="product-info" v-if="detail">
  17. <view :style="{height:statusBarHeight+'px'}"></view>
  18. <u-swiper mode="number" :border-radius="0" img-mode="aspectFit" :interval="3000" :height="450" :list="imgList" @click="viewImg"></u-swiper>
  19. <view class="product-info-text">
  20. <view class="product-info-text-title">
  21. {{detail.productName}}
  22. <!-- <view class="copyText" @click="copy(detail.productName)">复制</view> -->
  23. <uni-tag style="margin-left: 10px;" size="mini" :circle="true" v-if="detail.status==0 || detail.dealerScopeFlag==0" :text="detail.status==0?'已下架':'已售罄'"></uni-tag>
  24. </view>
  25. <view class="product-info-text-attr">
  26. <view class="product-info-price flex align_center" v-if="!hasLogin">
  27. ¥***
  28. </view>
  29. <view class="flex align_center" v-else>
  30. <view class="product-info-price">
  31. ¥<text>{{detail.priceStr[0]}}</text>.{{detail.priceStr[1]}}
  32. </view>
  33. <view class="flex align_center rebate-tag" v-if="detail.promoType=='BUY_PROD_GIVE_VALID'">
  34. 返<text>{{detail.resultValue}}</text>元
  35. </view>
  36. <view class="flex align_center rebate-tag" v-if="detail.promoType=='BUY_PROD_GIVE_PROD'">
  37. 买{{detail.conditionValue}}赠{{detail.resultValue}}
  38. </view>
  39. <view class="flex align_center tejia-tag" v-if="detail.promoType=='PROMO_PROD'">
  40. 特价<text>¥{{detail.orginPrice}}</text>
  41. </view>
  42. </view>
  43. <view class="product-info-nums">
  44. <view class="share">
  45. <button open-type="share"><u-icon :size='24' name="zhuanfa"></u-icon> 分享</button>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. <u-divider bg-color="">商品详情</u-divider>
  52. <view class="product-info-guige" v-if="detail&&detail.product">
  53. <view class="row">品牌:<text>{{detail.product.productBrandName||'--'}}</text></view>
  54. <view class="row">原厂编码:<text>{{detail.product.origCode||'--'}} </text> <view class="copyText" v-if="detail.product.origCode" @click="copy(detail.product.origCode)">复制</view></view>
  55. <view class="row">产品编码:<text>{{detail.product.code||'--'}}</text> <view class="copyText" v-if="detail.product.code" @click="copy(detail.product.code)">复制</view></view>
  56. <view class="row">条形码:<text>{{detail.product.qrCode||'--'}}</text> <view class="copyText" v-if="detail.product.qrCode" @click="copy(detail.product.qrCode)">复制</view></view>
  57. <view class="row-ban">商品尺寸:<text>{{detail.product.size||'--'}}</text></view>
  58. <view class="row-ban">计量单位:<text>{{detail.product.unit||'--'}}</text></view>
  59. <view class="row-ban">重量:<text>{{detail.product.weight||'--'}}</text></view>
  60. <view class="row-ban">包装数:<text>{{ (detail.product.packQty) || '--' }}{{ detail.product.packQty ? detail.product.unit : '' }}/{{ detail.product.packQtyUnit||'--' }}</text></view>
  61. </view>
  62. <view class="product-info-content">
  63. <rich-text v-if="detail && detail.product && detail.product.description" :nodes="detail.product.description"></rich-text>
  64. <view v-else style="font-size: 12px;color: #999;text-align: center;">暂无产品介绍</view>
  65. </view>
  66. </view>
  67. <!-- 底部栏 -->
  68. <view class="scrollPage-footer">
  69. <view class="scrollPage-footer-box">
  70. <view class="footer-left">
  71. <view v-if="isShare" class="footer-left-item" @click="goBack">
  72. <u-icon :size='50' color="#666" name="home"></u-icon>
  73. <text class="footer-left-item-text">首页</text>
  74. </view>
  75. <view class="footer-left-item" @click="toCart">
  76. <u-icon :size='50' color="#666" name="shopping-cart"></u-icon>
  77. <text class="footer-left-item-text">购物车</text>
  78. <text class="badge" v-if="totalNum">{{totalNum>99?'99+':totalNum}}</text>
  79. </view>
  80. </view>
  81. <view class="footer-right">
  82. <view class="footer-right-item" @click="addCart($event)">
  83. <text>加入购物车</text>
  84. </view>
  85. <view class="footer-right-item" @click="toBuy">
  86. <text>立即购买</text>
  87. </view>
  88. </view>
  89. </view>
  90. <view :style="{height:safeAreaBottom+'px'}"></view>
  91. </view>
  92. <!-- 购物车动画 -->
  93. <uni-cart-animation ref="cartAnimation" @animationfinish="animationfinish"></uni-cart-animation>
  94. <!-- 立即购买 -->
  95. <page-container
  96. :show="showPopu"
  97. :round="true"
  98. :z-index="100"
  99. position="center"
  100. customStyle="right: 0; left: 0; top: 0; bottom: 0; margin: auto 10%;width: fit-content;height: fit-content;border-radius:15px;"
  101. @afterleave="closePopu">
  102. <view class="popu-content" v-if="detail">
  103. <view class="popu-close" @click="showPopu=false">
  104. <uni-icons size="26" type="closeempty"></uni-icons>
  105. </view>
  106. <view class="pupu-box">
  107. <view class="popu-content-img">
  108. <image style="width: 80px; height: 80px;" mode="aspectFit" :src="detail.productMsg||'/static/def_imgs.png'"></image>
  109. </view>
  110. <view class="popu-content-info">
  111. <view class="popu-content-info-title">
  112. <text class="ellipsis-two">{{detail.productName}}</text>
  113. </view>
  114. <view class="popu-content-box">
  115. <view class="popu-content-price" v-if="hasLogin">
  116. ¥<text>{{detail.priceStr[0]}}</text>.{{detail.priceStr[1]}}
  117. </view>
  118. <view class="popu-content-price" v-else>¥***</view>
  119. <view class="flex align_center rebate-tag" v-if="hasLogin&&detail.promoType=='BUY_PROD_GIVE_VALID'">
  120. 返<text>{{detail.resultValue}}</text>元
  121. </view>
  122. <view class="flex align_center rebate-tag" v-if="hasLogin&&detail.promoType=='BUY_PROD_GIVE_PROD'">
  123. 买{{detail.conditionValue}}赠{{detail.resultValue}}
  124. </view>
  125. <view class="flex align_center tejia-tag" v-if="hasLogin&&detail.promoType=='PROMO_PROD'">
  126. 特价<text>¥{{detail.orginPrice}}</text>
  127. </view>
  128. </view>
  129. <view class="popu-content-num flex align_center justify_between">
  130. <text>数量</text>
  131. <u-number-box v-model="qty" :input-width="100" :input-height="60" :min="1" :max="999"></u-number-box>
  132. </view>
  133. </view>
  134. </view>
  135. <view class="pupu-box gift-box" v-if="giftNum">
  136. <view class="popu-content-img">
  137. <image style="width: 50px; height: 50px;" mode="aspectFit" :src="detail.productMsg||'/static/def_imgs.png'"></image>
  138. </view>
  139. <view class="popu-content-info">
  140. <view class="popu-content-info-title flex align_center">
  141. <view class="flex align_center rebate-tag">
  142. 赠品
  143. </view>
  144. <text class="ellipsis-two">{{detail.productName}}</text>
  145. </view>
  146. <view class="popu-content-box justify_between">
  147. <view></view>
  148. <view class="popu-content-num flex align_center">
  149. <text>X</text> {{giftNum}}
  150. </view>
  151. </view>
  152. </view>
  153. </view>
  154. <view class="popu-content-btn">
  155. <view class="popu-content-btn-item cancelBtn" @click="showPopu=false">取消</view>
  156. <view class="popu-content-btn-item okbtn" @click="toBuy">确定采购</view>
  157. </view>
  158. </view>
  159. </page-container>
  160. </view>
  161. </template>
  162. <script>
  163. import {
  164. mapState,
  165. mapMutations,
  166. } from 'vuex'
  167. import { addCart, getCartCount } from '@/api/cart.js'
  168. import { getShopDetail } from '@/api/shop.js'
  169. import { purchaseSave, purchaseCheck } from '@/api/purchase.js'
  170. import { toAuthStore, toLogin } from "@/utils/index.js"
  171. export default {
  172. data() {
  173. return {
  174. loading: false,
  175. showPopu: false, // 弹框
  176. statusBarHeight: 0, // 状态栏高度
  177. safeAreaBottom: 0, // 底部安全区域高度
  178. imgList: [],
  179. shopProductSn: null,
  180. detail: null,
  181. qty: 1,// 数量
  182. isShare: false ,// 是否从分享打开的
  183. busPos:{
  184. x: 10,
  185. y:uni.getSystemInfoSync().windowHeight - 30
  186. }
  187. }
  188. },
  189. onLoad(option) {
  190. this.isShare = !!option.share
  191. // 计算安全区域
  192. this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight
  193. this.safeAreaBottom = uni.getSystemInfoSync().safeAreaInsets.bottom
  194. this.shopProductSn = option.sn
  195. // 获取产品详情
  196. this.getDetail()
  197. },
  198. // 分享
  199. onShareAppMessage(e){
  200. return {
  201. title: this.detail ? this.detail.productName : '商品名称',
  202. path: '/pagesB/shopiing/productDetail?sn='+this.shopProductSn+'&share=1',
  203. imageUrl:this.detail ? this.detail.productMsg : '',
  204. type: '1'
  205. }
  206. },
  207. computed: {
  208. ...mapState(['hasLogin']),
  209. // 登录用户信息
  210. userInfo(){
  211. return this.$store.state.vuex_userInfo
  212. },
  213. totalNum(){
  214. return this.hasLogin&&this.userInfo.sysUserFlag == '1' ? this.$store.state.vuex_cartTotal : 0
  215. },
  216. // 赠品数量
  217. giftNum(){
  218. return this.detail && this.detail.promoType=='BUY_PROD_GIVE_PROD' ? Math.floor(this.qty / this.detail.conditionValue)*this.detail.resultValue : 0
  219. }
  220. },
  221. methods: {
  222. // 返回
  223. goBack(){
  224. if(this.isShare){
  225. uni.reLaunch({
  226. url: '/pages/index/index'
  227. })
  228. }else{
  229. uni.navigateBack()
  230. }
  231. },
  232. // 复制
  233. copy(text){
  234. uni.setClipboardData({
  235. data: text,
  236. })
  237. },
  238. viewImg(index){
  239. uni.previewImage({
  240. urls: this.imgList
  241. })
  242. },
  243. // 产品详情
  244. getDetail(){
  245. uni.showLoading({
  246. title: '加载中'
  247. })
  248. const storeShelf = this.$store.state.vuex_storeShelf
  249. const dealerSn = this.hasLogin && this.userInfo && this.userInfo.sysUserFlag == '1'&&storeShelf ? storeShelf.dealerSn : ''
  250. // 获取产品详情
  251. getShopDetail({
  252. shopProductSn: this.shopProductSn,
  253. dealerSn: dealerSn
  254. }).then(res => {
  255. if(res.status == 200){
  256. this.detail = res.data
  257. if(res.data){
  258. if(res.data.productPicList){
  259. res.data.productPicList.forEach(item => {
  260. this.imgList.push(item.imageUrl||'/static/def_imgs.png')
  261. })
  262. }else{
  263. this.imgList.push(res.data.productMsg||'/static/def_imgs.png')
  264. }
  265. const a = res.data.shopPromoProduct
  266. let bprice = res.data.price
  267. if(a){
  268. res.data.promoType = a.promoType
  269. res.data.resultValue = a.resultValue
  270. res.data.conditionValue = a.conditionValue
  271. res.data.discountType = a.discountType
  272. res.data.promoProductSn = a.promoProductSn
  273. res.data.promoSn = a.promoSn
  274. // 特价
  275. if(res.data.promoType=='PROMO_PROD'){
  276. res.data.orginPrice = res.data.price
  277. // 直降
  278. if(res.data.discountType == 'STRAIGHT_DOWN'){
  279. bprice = res.data.price - res.data.resultValue
  280. }
  281. // 折扣
  282. if(res.data.discountType == 'DISCOUNT'){
  283. bprice = Number(res.data.price * res.data.resultValue).toFixed(2)
  284. }
  285. }
  286. }
  287. res.data.priceStr = Number(bprice).toFixed(2).toString().split('.')
  288. }
  289. }
  290. uni.hideLoading()
  291. })
  292. },
  293. animationfinish(){
  294. this.loading = false
  295. },
  296. // 加入购物车
  297. addCart(event){
  298. if(this.hasLogin){
  299. // 游客未认证
  300. if(this.userInfo.sysUserFlag == '0'){
  301. toAuthStore()
  302. }else{
  303. if(this.loading){
  304. return
  305. }
  306. this.loading = true
  307. this.$refs.cartAnimation.touchOnGoods(event,this.busPos);
  308. // 加入购物车
  309. addCart({
  310. qty: 1,
  311. price: this.detail.price,
  312. productSn: this.detail.productSn
  313. }).then(res => {
  314. if(res.status == 200){
  315. uni.$emit('refashCart')
  316. }
  317. })
  318. }
  319. }else{
  320. toLogin()
  321. }
  322. },
  323. // 打开购物车
  324. toCart(){
  325. if(this.hasLogin){
  326. // 游客未认证
  327. if(this.userInfo.sysUserFlag == '0'){
  328. toAuthStore()
  329. }else{
  330. uni.navigateTo({
  331. url: '/pagesB/cart/index'
  332. })
  333. }
  334. }else{
  335. toLogin()
  336. }
  337. },
  338. // 立即购买
  339. toBuy(){
  340. if(this.hasLogin){
  341. // 游客未认证
  342. if(this.userInfo.sysUserFlag == '0'){
  343. toAuthStore()
  344. }else{
  345. if(this.detail.status==0 || this.detail.dealerScopeFlag==0){
  346. uni.showToast({
  347. title: '此商品已'+(this.detail.status==0?'下架':'售罄'),
  348. icon: 'none'
  349. })
  350. }else{
  351. // 打开数量选择弹框
  352. if(!this.showPopu){
  353. this.showPopu = true
  354. }else{
  355. // 提交
  356. this.submitOrder()
  357. }
  358. }
  359. }
  360. }else{
  361. toLogin()
  362. }
  363. },
  364. // 去结算
  365. submitOrder(){
  366. uni.showLoading({
  367. title: '提交中...',
  368. mask: true
  369. })
  370. const _this = this
  371. purchaseCheck({detailList: [{
  372. productSn:this.detail.productSn,
  373. productCode:this.detail.productCode,
  374. qty: this.qty,
  375. price:this.detail.price,
  376. }]}).then(res => {
  377. uni.hideLoading()
  378. if(res.status == 200){
  379. const successList = res.data.successList.map(item => {
  380. return {
  381. productSn:item.productSn,
  382. productCode: item.productCode,
  383. qty: item.qty,
  384. price:item.price
  385. }
  386. })
  387. const removeList = res.data.removeList.map(item => item.productCode)
  388. const selloutList = res.data.selloutList.map(item => item.productCode)
  389. // 有已下架或已售罄产品提示
  390. if(removeList.length || selloutList.length){
  391. uni.showModal({
  392. title: '提示',
  393. content: (removeList.length ? `产品${removeList.join(',')}已下架,`:'')+(selloutList.length?`产品${selloutList.join(',')}已售罄,`:'')+`不可采购。`+(successList.length?'是否继续采购其他产品?':''),
  394. showCancel: successList.length,
  395. confirmText: successList.length?'确定':'知道了',
  396. success(ret) {
  397. if(ret.confirm && successList.length){
  398. _this.submitForm(successList)
  399. }
  400. }
  401. })
  402. }else{
  403. // 直接提交
  404. _this.submitForm(successList)
  405. }
  406. }else{
  407. uni.showToast({
  408. title: res.message,
  409. icon: 'none'
  410. })
  411. }
  412. })
  413. },
  414. submitForm(detailList){
  415. uni.showLoading({
  416. title: '提交中...',
  417. mask: true
  418. })
  419. purchaseSave({
  420. detailList: detailList
  421. }).then(res => {
  422. if(res.status == 200){
  423. res.data.detailList = []
  424. this.$store.state.vuex_tempData = res.data
  425. this.showPopu = false
  426. this.submitOk = true
  427. }else{
  428. uni.hideLoading()
  429. uni.showToast({
  430. title: res.message,
  431. icon: 'none'
  432. })
  433. }
  434. })
  435. },
  436. // 关闭后
  437. closePopu(){
  438. this.showPopu = false
  439. this.qty = 1
  440. if(this.submitOk){
  441. uni.navigateTo({
  442. url: "/pagesB/procureOrder"
  443. })
  444. }
  445. setTimeout(()=>{
  446. uni.hideLoading()
  447. },300)
  448. },
  449. }
  450. }
  451. </script>
  452. <style lang="less">
  453. .pages {
  454. height: 100vh;
  455. display: flex;
  456. flex-direction: column;
  457. .scrollPage-header{
  458. z-index: 1;
  459. width: 100%;
  460. position:fixed;
  461. left: 0;
  462. top: 0;
  463. .header-title{
  464. display: flex;
  465. align-items: center;
  466. justify-content: space-between;
  467. padding: 0 10px;
  468. height: 44px;
  469. .header-left{
  470. display: flex;
  471. align-items: center;
  472. text{
  473. font-size: 14px;
  474. color: #333333;
  475. }
  476. background-color: rgba(255,255,255,0.6);
  477. box-shadow: 0px 1px 0px 0px #E6E6E6;
  478. border-radius: 50px;
  479. padding: 3px 6px 3px;
  480. }
  481. .header-right{
  482. width: 50px;
  483. }
  484. }
  485. }
  486. .copyText{
  487. background-color: #efefef;
  488. border-radius: 100rpx;
  489. padding: 0 20rpx;
  490. color: #03A9F4;
  491. font-size: 20rpx;
  492. display: inline-block;
  493. margin-left: 20rpx;
  494. height: 44rpx;
  495. line-height: 44rpx;
  496. }
  497. .scrollPage-content{
  498. flex: 1;
  499. overflow-y: auto;
  500. .product-info{
  501. background:#fff;
  502. margin-bottom: 10px;
  503. .product-info-text{
  504. padding: 10px;
  505. .product-info-text-title{
  506. font-weight: bold;
  507. color: #333333;
  508. line-height: 22px;
  509. margin-bottom: 5px;
  510. }
  511. .product-info-text-attr{
  512. display: flex;
  513. align-items: center;
  514. justify-content: space-between;
  515. .product-info-price{
  516. color: red;
  517. display: flex;
  518. align-items: baseline;
  519. font-size: 12px;
  520. text{
  521. font-size: 38rpx;
  522. }
  523. }
  524. .product-info-nums{
  525. font-size: 12px;
  526. color: #999999;
  527. >view{
  528. display: flex;
  529. align-items: center;
  530. }
  531. .share{
  532. button{
  533. width: auto;
  534. padding: 0;
  535. border: 0;
  536. background: none;
  537. line-height: normal;
  538. margin: 0;
  539. display: inline;
  540. font-size: 12px;
  541. color: #999;
  542. &::after{
  543. border:none;
  544. }
  545. /deep/ .u-icon{
  546. margin-right: 3px;
  547. }
  548. }
  549. }
  550. }
  551. }
  552. }
  553. }
  554. .product-info-guige{
  555. display: flex;
  556. flex-wrap: wrap;
  557. justify-content: space-between;
  558. background:#fff;
  559. margin: 10px 0;
  560. padding: 10px;
  561. line-height: 28px;
  562. .row{
  563. width: 100%;
  564. }
  565. .row-ban{
  566. width: 50%;
  567. }
  568. >view{
  569. color: #999;
  570. text{
  571. color: #333333;
  572. }
  573. }
  574. }
  575. .product-info-content{
  576. background:#fff;
  577. margin-bottom: 10px;
  578. padding: 10px;
  579. line-height: 28px;
  580. }
  581. }
  582. .rebate-tag{
  583. background: #ffe7df;
  584. color: #E91E63;
  585. padding: 2px 5px;
  586. font-size: 10px;
  587. border-radius: 3px;
  588. margin-left: 6px;
  589. }
  590. .tejia-tag{
  591. color: #E91E63;
  592. margin-left: 6px;
  593. font-size: 12px;
  594. text{
  595. font-size: 12px;
  596. color: #999;
  597. margin-left: 5px;
  598. text-decoration: line-through;
  599. }
  600. }
  601. .scrollPage-footer{
  602. background-color: #FFFFFF;
  603. width: 100%;
  604. position: fixed;
  605. left: 0;
  606. bottom: 0;
  607. .scrollPage-footer-box{
  608. display: flex;
  609. align-items: center;
  610. justify-content: space-between;
  611. height: 50px;
  612. }
  613. .footer-left{
  614. display: flex;
  615. align-items: center;
  616. justify-content: space-between;
  617. width: 35%;
  618. .footer-left-item{
  619. display: flex;
  620. flex-direction: column;
  621. align-items: center;
  622. justify-content: center;
  623. padding: 0 15px;
  624. position: relative;
  625. .footer-left-item-text{
  626. font-size: 12px;
  627. color: #666666;
  628. }
  629. .badge{
  630. background: #f44336;
  631. color: #fff;
  632. position: absolute;
  633. right: 5px;
  634. top: -8px;
  635. font-size: 12px;
  636. display: flex;
  637. align-items: center;
  638. justify-content: center;
  639. border-radius: 50rpx;
  640. padding: 0 10rpx;
  641. }
  642. }
  643. }
  644. .footer-right{
  645. width: 60%;
  646. height: 100%;
  647. display: flex;
  648. align-items: center;
  649. .footer-right-item{
  650. height: 100%;
  651. display: flex;
  652. flex-direction: column;
  653. align-items: center;
  654. justify-content: center;
  655. width: 50%;
  656. font-size: 14px;
  657. color: #FFFFFF;
  658. }
  659. .footer-right-item:first-child{
  660. background-color: #FF9900;
  661. }
  662. .footer-right-item:last-child{
  663. background-color: #FF0000;
  664. }
  665. }
  666. }
  667. .popu-content{
  668. display: flex;
  669. flex-direction: column;
  670. align-items: center;
  671. padding: 10px 15px;
  672. .popu-close{
  673. padding: 10px;
  674. position: absolute;
  675. right: 0;
  676. top: 0;
  677. }
  678. .pupu-box{
  679. display: flex;
  680. justify-content: space-between;
  681. margin-top: 35px;
  682. width: 100%;
  683. }
  684. .popu-content-img{
  685. border-radius: 6px;
  686. border: 1px solid #eee;
  687. overflow: hidden;
  688. width: 80px;
  689. height: 80px;
  690. }
  691. .popu-content-info{
  692. padding: 0 0 0 10px;
  693. flex-grow: 1;
  694. overflow: hidden;
  695. width: 50%;
  696. .popu-content-info-title{
  697. font-size: 14px;
  698. }
  699. }
  700. .gift-box{
  701. padding-left: 8%;
  702. margin-top: 10px;
  703. border-top: 1px solid #eee;
  704. padding-top: 10px;
  705. .popu-content-info-title{
  706. font-size: 12px;
  707. color: #666;
  708. }
  709. .popu-content-box{
  710. margin-top: 6px;
  711. }
  712. .rebate-tag{
  713. margin: 0 5px 0 0;
  714. background: #ff0000;
  715. color: #fff;
  716. width: 40px;
  717. flex-grow: 1;
  718. display: flex;
  719. justify-content: center;
  720. }
  721. }
  722. .popu-content-box{
  723. display: flex;
  724. align-items: baseline;
  725. margin-top: 5px;
  726. .popu-content-price{
  727. color: red;
  728. display: flex;
  729. align-items: baseline;
  730. font-size: 12px;
  731. text{
  732. font-size: 38rpx;
  733. }
  734. }
  735. }
  736. .popu-content-num{
  737. font-size: 12px;
  738. color: #999999;
  739. padding: 10px 0;
  740. > text{
  741. margin-right: 10px;
  742. font-size: 10px;
  743. }
  744. }
  745. .popu-content-btn{
  746. width: 100%;
  747. display: flex;
  748. align-items: center;
  749. justify-content: space-around;
  750. margin: 20px 0 10px;
  751. .popu-content-btn-item{
  752. width: 45%;
  753. height: 36px;
  754. font-size: 14px;
  755. display: flex;
  756. align-items: center;
  757. justify-content: center;
  758. border-radius: 100px;
  759. }
  760. .cancelBtn{
  761. background-color: #f8f8f8;
  762. color: #666;
  763. }
  764. .okbtn{
  765. background-color: #f70000;
  766. color: #FFFFFF;
  767. }
  768. }
  769. }
  770. }
  771. </style>