productDetail.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786
  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. res.data.orginPrice = res.data.price
  275. // 特价
  276. if(res.data.promoType=='PROMO_PROD'){
  277. bprice =res.data.conditionValue
  278. }
  279. }
  280. res.data.priceStr = Number(bprice).toFixed(2).toString().split('.')
  281. }
  282. }
  283. uni.hideLoading()
  284. })
  285. },
  286. animationfinish(){
  287. this.loading = false
  288. },
  289. // 加入购物车
  290. addCart(event){
  291. if(this.hasLogin){
  292. // 游客未认证
  293. if(this.userInfo.sysUserFlag == '0'){
  294. toAuthStore()
  295. }else{
  296. if(this.loading){
  297. return
  298. }
  299. this.loading = true
  300. this.$refs.cartAnimation.touchOnGoods(event,this.busPos);
  301. // 加入购物车
  302. addCart({
  303. qty: 1,
  304. price: this.detail.price,
  305. productSn: this.detail.productSn
  306. }).then(res => {
  307. if(res.status == 200){
  308. uni.$emit('refashCart')
  309. }
  310. })
  311. }
  312. }else{
  313. toLogin()
  314. }
  315. },
  316. // 打开购物车
  317. toCart(){
  318. if(this.hasLogin){
  319. // 游客未认证
  320. if(this.userInfo.sysUserFlag == '0'){
  321. toAuthStore()
  322. }else{
  323. uni.navigateTo({
  324. url: '/pagesB/cart/index'
  325. })
  326. }
  327. }else{
  328. toLogin()
  329. }
  330. },
  331. // 立即购买
  332. toBuy(){
  333. if(this.hasLogin){
  334. // 游客未认证
  335. if(this.userInfo.sysUserFlag == '0'){
  336. toAuthStore()
  337. }else{
  338. if(this.detail.status==0 || this.detail.dealerScopeFlag==0){
  339. uni.showToast({
  340. title: '此商品已'+(this.detail.status==0?'下架':'售罄'),
  341. icon: 'none'
  342. })
  343. }else{
  344. // 打开数量选择弹框
  345. if(!this.showPopu){
  346. this.showPopu = true
  347. }else{
  348. // 提交
  349. this.submitOrder()
  350. }
  351. }
  352. }
  353. }else{
  354. toLogin()
  355. }
  356. },
  357. // 去结算
  358. submitOrder(){
  359. uni.showLoading({
  360. title: '提交中...',
  361. mask: true
  362. })
  363. const _this = this
  364. purchaseCheck({detailList: [{
  365. productSn:this.detail.productSn,
  366. productCode:this.detail.productCode,
  367. qty: this.qty,
  368. price:this.detail.price,
  369. promoSn: this.detail.promoSn
  370. }]}).then(res => {
  371. uni.hideLoading()
  372. if(res.status == 200){
  373. const successList = res.data.successList.map(item => {
  374. return {
  375. productSn:item.productSn,
  376. productCode: item.productCode,
  377. qty: item.qty,
  378. price:item.price,
  379. promoSn: item.promoSn
  380. }
  381. })
  382. const removeList = res.data.removeList.map(item => item.productCode)
  383. const selloutList = res.data.selloutList.map(item => item.productCode)
  384. const promoChangeFlag = res.data.promoChangeFlag
  385. // 活动变更
  386. if(promoChangeFlag){
  387. uni.showModal({
  388. title: '提示',
  389. content: '促销活动已变更,请刷新?',
  390. confirmText:'确定刷新',
  391. success(ret) {
  392. if(ret.confirm){
  393. _this.getDetail()
  394. _this.showPopu = false
  395. }
  396. }
  397. })
  398. return
  399. }
  400. // 有已下架或已售罄产品提示
  401. if(removeList.length || selloutList.length){
  402. uni.showModal({
  403. title: '提示',
  404. content: (removeList.length ? `产品${removeList.join(',')}已下架,`:'')+(selloutList.length?`产品${selloutList.join(',')}已售罄,`:'')+`不可采购。`+(successList.length?'是否继续采购其他产品?':''),
  405. showCancel: successList.length,
  406. confirmText: successList.length?'确定':'知道了',
  407. success(ret) {
  408. if(ret.confirm && successList.length){
  409. _this.submitForm(successList)
  410. }
  411. }
  412. })
  413. }else{
  414. // 直接提交
  415. _this.submitForm(successList)
  416. }
  417. }else{
  418. uni.showToast({
  419. title: res.message,
  420. icon: 'none'
  421. })
  422. }
  423. })
  424. },
  425. submitForm(detailList){
  426. uni.showLoading({
  427. title: '提交中...',
  428. mask: true
  429. })
  430. purchaseSave({
  431. detailList: detailList
  432. }).then(res => {
  433. if(res.status == 200){
  434. res.data.detailList = []
  435. this.$store.state.vuex_tempData = res.data
  436. this.showPopu = false
  437. this.submitOk = true
  438. }else{
  439. uni.hideLoading()
  440. uni.showToast({
  441. title: res.message,
  442. icon: 'none'
  443. })
  444. }
  445. })
  446. },
  447. // 关闭后
  448. closePopu(){
  449. this.showPopu = false
  450. this.qty = 1
  451. if(this.submitOk){
  452. this.submitOk = false
  453. uni.navigateTo({
  454. url: "/pagesB/procureOrder"
  455. })
  456. }
  457. setTimeout(()=>{
  458. uni.hideLoading()
  459. },300)
  460. },
  461. }
  462. }
  463. </script>
  464. <style lang="less">
  465. .pages {
  466. height: 100vh;
  467. display: flex;
  468. flex-direction: column;
  469. .scrollPage-header{
  470. z-index: 1;
  471. width: 100%;
  472. position:fixed;
  473. left: 0;
  474. top: 0;
  475. .header-title{
  476. display: flex;
  477. align-items: center;
  478. justify-content: space-between;
  479. padding: 0 10px;
  480. height: 44px;
  481. .header-left{
  482. display: flex;
  483. align-items: center;
  484. text{
  485. font-size: 14px;
  486. color: #333333;
  487. }
  488. background-color: rgba(255,255,255,0.6);
  489. box-shadow: 0px 1px 0px 0px #E6E6E6;
  490. border-radius: 50px;
  491. padding: 3px 6px 3px;
  492. }
  493. .header-right{
  494. width: 50px;
  495. }
  496. }
  497. }
  498. .copyText{
  499. background-color: #efefef;
  500. border-radius: 100rpx;
  501. padding: 0 20rpx;
  502. color: #03A9F4;
  503. font-size: 20rpx;
  504. display: inline-block;
  505. margin-left: 20rpx;
  506. height: 44rpx;
  507. line-height: 44rpx;
  508. }
  509. .scrollPage-content{
  510. flex: 1;
  511. overflow-y: auto;
  512. .product-info{
  513. background:#fff;
  514. margin-bottom: 10px;
  515. .product-info-text{
  516. padding: 10px;
  517. .product-info-text-title{
  518. font-weight: bold;
  519. color: #333333;
  520. line-height: 22px;
  521. margin-bottom: 5px;
  522. }
  523. .product-info-text-attr{
  524. display: flex;
  525. align-items: center;
  526. justify-content: space-between;
  527. .product-info-price{
  528. color: red;
  529. display: flex;
  530. align-items: baseline;
  531. font-size: 12px;
  532. text{
  533. font-size: 38rpx;
  534. }
  535. }
  536. .product-info-nums{
  537. font-size: 12px;
  538. color: #999999;
  539. >view{
  540. display: flex;
  541. align-items: center;
  542. }
  543. .share{
  544. button{
  545. width: auto;
  546. padding: 0;
  547. border: 0;
  548. background: none;
  549. line-height: normal;
  550. margin: 0;
  551. display: inline;
  552. font-size: 12px;
  553. color: #999;
  554. &::after{
  555. border:none;
  556. }
  557. /deep/ .u-icon{
  558. margin-right: 3px;
  559. }
  560. }
  561. }
  562. }
  563. }
  564. }
  565. }
  566. .product-info-guige{
  567. display: flex;
  568. flex-wrap: wrap;
  569. justify-content: space-between;
  570. background:#fff;
  571. margin: 10px 0;
  572. padding: 10px;
  573. line-height: 28px;
  574. .row{
  575. width: 100%;
  576. }
  577. .row-ban{
  578. width: 50%;
  579. }
  580. >view{
  581. color: #999;
  582. text{
  583. color: #333333;
  584. }
  585. }
  586. }
  587. .product-info-content{
  588. background:#fff;
  589. margin-bottom: 10px;
  590. padding: 10px;
  591. line-height: 28px;
  592. }
  593. }
  594. .rebate-tag{
  595. background: #ffe7df;
  596. color: #E91E63;
  597. padding: 2px 5px;
  598. font-size: 10px;
  599. border-radius: 3px;
  600. margin-left: 6px;
  601. }
  602. .tejia-tag{
  603. color: #E91E63;
  604. margin-left: 6px;
  605. font-size: 12px;
  606. text{
  607. font-size: 12px;
  608. color: #999;
  609. margin-left: 5px;
  610. text-decoration: line-through;
  611. }
  612. }
  613. .scrollPage-footer{
  614. background-color: #FFFFFF;
  615. width: 100%;
  616. position: fixed;
  617. left: 0;
  618. bottom: 0;
  619. .scrollPage-footer-box{
  620. display: flex;
  621. align-items: center;
  622. justify-content: space-between;
  623. height: 50px;
  624. }
  625. .footer-left{
  626. display: flex;
  627. align-items: center;
  628. justify-content: space-between;
  629. width: 35%;
  630. .footer-left-item{
  631. display: flex;
  632. flex-direction: column;
  633. align-items: center;
  634. justify-content: center;
  635. padding: 0 15px;
  636. position: relative;
  637. .footer-left-item-text{
  638. font-size: 12px;
  639. color: #666666;
  640. }
  641. .badge{
  642. background: #f44336;
  643. color: #fff;
  644. position: absolute;
  645. right: 5px;
  646. top: -8px;
  647. font-size: 12px;
  648. display: flex;
  649. align-items: center;
  650. justify-content: center;
  651. border-radius: 50rpx;
  652. padding: 0 10rpx;
  653. }
  654. }
  655. }
  656. .footer-right{
  657. width: 60%;
  658. height: 100%;
  659. display: flex;
  660. align-items: center;
  661. .footer-right-item{
  662. height: 100%;
  663. display: flex;
  664. flex-direction: column;
  665. align-items: center;
  666. justify-content: center;
  667. width: 50%;
  668. font-size: 14px;
  669. color: #FFFFFF;
  670. }
  671. .footer-right-item:first-child{
  672. background-color: #FF9900;
  673. }
  674. .footer-right-item:last-child{
  675. background-color: #FF0000;
  676. }
  677. }
  678. }
  679. .popu-content{
  680. display: flex;
  681. flex-direction: column;
  682. align-items: center;
  683. padding: 10px 15px;
  684. .popu-close{
  685. padding: 10px;
  686. position: absolute;
  687. right: 0;
  688. top: 0;
  689. }
  690. .pupu-box{
  691. display: flex;
  692. justify-content: space-between;
  693. margin-top: 35px;
  694. width: 100%;
  695. }
  696. .popu-content-img{
  697. border-radius: 6px;
  698. border: 1px solid #eee;
  699. overflow: hidden;
  700. width: 80px;
  701. height: 80px;
  702. }
  703. .popu-content-info{
  704. padding: 0 0 0 10px;
  705. flex-grow: 1;
  706. overflow: hidden;
  707. width: 50%;
  708. .popu-content-info-title{
  709. font-size: 14px;
  710. }
  711. }
  712. .gift-box{
  713. padding-left: 8%;
  714. margin-top: 10px;
  715. border-top: 1px solid #eee;
  716. padding-top: 10px;
  717. .popu-content-info-title{
  718. font-size: 12px;
  719. color: #666;
  720. }
  721. .popu-content-box{
  722. margin-top: 6px;
  723. }
  724. .rebate-tag{
  725. margin: 0 5px 0 0;
  726. background: #ff0000;
  727. color: #fff;
  728. width: 40px;
  729. flex-grow: 1;
  730. display: flex;
  731. justify-content: center;
  732. }
  733. }
  734. .popu-content-box{
  735. display: flex;
  736. align-items: baseline;
  737. margin-top: 5px;
  738. .popu-content-price{
  739. color: red;
  740. display: flex;
  741. align-items: baseline;
  742. font-size: 12px;
  743. text{
  744. font-size: 38rpx;
  745. }
  746. }
  747. }
  748. .popu-content-num{
  749. font-size: 12px;
  750. color: #999999;
  751. padding: 10px 0;
  752. > text{
  753. margin-right: 10px;
  754. font-size: 10px;
  755. }
  756. }
  757. .popu-content-btn{
  758. width: 100%;
  759. display: flex;
  760. align-items: center;
  761. justify-content: space-around;
  762. margin: 20px 0 10px;
  763. .popu-content-btn-item{
  764. width: 40%;
  765. height: 34px;
  766. font-size: 14px;
  767. display: flex;
  768. align-items: center;
  769. justify-content: center;
  770. border-radius: 100px;
  771. }
  772. .cancelBtn{
  773. background-color: #f8f8f8;
  774. color: #666;
  775. }
  776. .okbtn{
  777. background-color: #f70000;
  778. color: #FFFFFF;
  779. }
  780. }
  781. }
  782. }
  783. </style>