productDetail.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775
  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. <uni-number-box v-model="qty" :input-width="150" :input-height="60" :min="1" :max="999"></uni-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. this.submitOk = false
  442. uni.navigateTo({
  443. url: "/pagesB/procureOrder"
  444. })
  445. }
  446. setTimeout(()=>{
  447. uni.hideLoading()
  448. },300)
  449. },
  450. }
  451. }
  452. </script>
  453. <style lang="less">
  454. .pages {
  455. height: 100vh;
  456. display: flex;
  457. flex-direction: column;
  458. .scrollPage-header{
  459. z-index: 1;
  460. width: 100%;
  461. position:fixed;
  462. left: 0;
  463. top: 0;
  464. .header-title{
  465. display: flex;
  466. align-items: center;
  467. justify-content: space-between;
  468. padding: 0 10px;
  469. height: 44px;
  470. .header-left{
  471. display: flex;
  472. align-items: center;
  473. text{
  474. font-size: 14px;
  475. color: #333333;
  476. }
  477. background-color: rgba(255,255,255,0.6);
  478. box-shadow: 0px 1px 0px 0px #E6E6E6;
  479. border-radius: 50px;
  480. padding: 3px 6px 3px;
  481. }
  482. .header-right{
  483. width: 50px;
  484. }
  485. }
  486. }
  487. .copyText{
  488. background-color: #efefef;
  489. border-radius: 100rpx;
  490. padding: 0 20rpx;
  491. color: #03A9F4;
  492. font-size: 20rpx;
  493. display: inline-block;
  494. margin-left: 20rpx;
  495. height: 44rpx;
  496. line-height: 44rpx;
  497. }
  498. .scrollPage-content{
  499. flex: 1;
  500. overflow-y: auto;
  501. .product-info{
  502. background:#fff;
  503. margin-bottom: 10px;
  504. .product-info-text{
  505. padding: 10px;
  506. .product-info-text-title{
  507. font-weight: bold;
  508. color: #333333;
  509. line-height: 22px;
  510. margin-bottom: 5px;
  511. }
  512. .product-info-text-attr{
  513. display: flex;
  514. align-items: center;
  515. justify-content: space-between;
  516. .product-info-price{
  517. color: red;
  518. display: flex;
  519. align-items: baseline;
  520. font-size: 12px;
  521. text{
  522. font-size: 38rpx;
  523. }
  524. }
  525. .product-info-nums{
  526. font-size: 12px;
  527. color: #999999;
  528. >view{
  529. display: flex;
  530. align-items: center;
  531. }
  532. .share{
  533. button{
  534. width: auto;
  535. padding: 0;
  536. border: 0;
  537. background: none;
  538. line-height: normal;
  539. margin: 0;
  540. display: inline;
  541. font-size: 12px;
  542. color: #999;
  543. &::after{
  544. border:none;
  545. }
  546. /deep/ .u-icon{
  547. margin-right: 3px;
  548. }
  549. }
  550. }
  551. }
  552. }
  553. }
  554. }
  555. .product-info-guige{
  556. display: flex;
  557. flex-wrap: wrap;
  558. justify-content: space-between;
  559. background:#fff;
  560. margin: 10px 0;
  561. padding: 10px;
  562. line-height: 28px;
  563. .row{
  564. width: 100%;
  565. }
  566. .row-ban{
  567. width: 50%;
  568. }
  569. >view{
  570. color: #999;
  571. text{
  572. color: #333333;
  573. }
  574. }
  575. }
  576. .product-info-content{
  577. background:#fff;
  578. margin-bottom: 10px;
  579. padding: 10px;
  580. line-height: 28px;
  581. }
  582. }
  583. .rebate-tag{
  584. background: #ffe7df;
  585. color: #E91E63;
  586. padding: 2px 5px;
  587. font-size: 10px;
  588. border-radius: 3px;
  589. margin-left: 6px;
  590. }
  591. .tejia-tag{
  592. color: #E91E63;
  593. margin-left: 6px;
  594. font-size: 12px;
  595. text{
  596. font-size: 12px;
  597. color: #999;
  598. margin-left: 5px;
  599. text-decoration: line-through;
  600. }
  601. }
  602. .scrollPage-footer{
  603. background-color: #FFFFFF;
  604. width: 100%;
  605. position: fixed;
  606. left: 0;
  607. bottom: 0;
  608. .scrollPage-footer-box{
  609. display: flex;
  610. align-items: center;
  611. justify-content: space-between;
  612. height: 50px;
  613. }
  614. .footer-left{
  615. display: flex;
  616. align-items: center;
  617. justify-content: space-between;
  618. width: 35%;
  619. .footer-left-item{
  620. display: flex;
  621. flex-direction: column;
  622. align-items: center;
  623. justify-content: center;
  624. padding: 0 15px;
  625. position: relative;
  626. .footer-left-item-text{
  627. font-size: 12px;
  628. color: #666666;
  629. }
  630. .badge{
  631. background: #f44336;
  632. color: #fff;
  633. position: absolute;
  634. right: 5px;
  635. top: -8px;
  636. font-size: 12px;
  637. display: flex;
  638. align-items: center;
  639. justify-content: center;
  640. border-radius: 50rpx;
  641. padding: 0 10rpx;
  642. }
  643. }
  644. }
  645. .footer-right{
  646. width: 60%;
  647. height: 100%;
  648. display: flex;
  649. align-items: center;
  650. .footer-right-item{
  651. height: 100%;
  652. display: flex;
  653. flex-direction: column;
  654. align-items: center;
  655. justify-content: center;
  656. width: 50%;
  657. font-size: 14px;
  658. color: #FFFFFF;
  659. }
  660. .footer-right-item:first-child{
  661. background-color: #FF9900;
  662. }
  663. .footer-right-item:last-child{
  664. background-color: #FF0000;
  665. }
  666. }
  667. }
  668. .popu-content{
  669. display: flex;
  670. flex-direction: column;
  671. align-items: center;
  672. padding: 10px 15px;
  673. .popu-close{
  674. padding: 10px;
  675. position: absolute;
  676. right: 0;
  677. top: 0;
  678. }
  679. .pupu-box{
  680. display: flex;
  681. justify-content: space-between;
  682. margin-top: 35px;
  683. width: 100%;
  684. }
  685. .popu-content-img{
  686. border-radius: 6px;
  687. border: 1px solid #eee;
  688. overflow: hidden;
  689. width: 80px;
  690. height: 80px;
  691. }
  692. .popu-content-info{
  693. padding: 0 0 0 10px;
  694. flex-grow: 1;
  695. overflow: hidden;
  696. width: 50%;
  697. .popu-content-info-title{
  698. font-size: 14px;
  699. }
  700. }
  701. .gift-box{
  702. padding-left: 8%;
  703. margin-top: 10px;
  704. border-top: 1px solid #eee;
  705. padding-top: 10px;
  706. .popu-content-info-title{
  707. font-size: 12px;
  708. color: #666;
  709. }
  710. .popu-content-box{
  711. margin-top: 6px;
  712. }
  713. .rebate-tag{
  714. margin: 0 5px 0 0;
  715. background: #ff0000;
  716. color: #fff;
  717. width: 40px;
  718. flex-grow: 1;
  719. display: flex;
  720. justify-content: center;
  721. }
  722. }
  723. .popu-content-box{
  724. display: flex;
  725. align-items: baseline;
  726. margin-top: 5px;
  727. .popu-content-price{
  728. color: red;
  729. display: flex;
  730. align-items: baseline;
  731. font-size: 12px;
  732. text{
  733. font-size: 38rpx;
  734. }
  735. }
  736. }
  737. .popu-content-num{
  738. font-size: 12px;
  739. color: #999999;
  740. padding: 10px 0;
  741. > text{
  742. margin-right: 10px;
  743. font-size: 10px;
  744. }
  745. }
  746. .popu-content-btn{
  747. width: 100%;
  748. display: flex;
  749. align-items: center;
  750. justify-content: space-around;
  751. margin: 20px 0 10px;
  752. .popu-content-btn-item{
  753. width: 40%;
  754. height: 34px;
  755. font-size: 14px;
  756. display: flex;
  757. align-items: center;
  758. justify-content: center;
  759. border-radius: 100px;
  760. }
  761. .cancelBtn{
  762. background-color: #f8f8f8;
  763. color: #666;
  764. }
  765. .okbtn{
  766. background-color: #f70000;
  767. color: #FFFFFF;
  768. }
  769. }
  770. }
  771. }
  772. </style>