productDetail.vue 22 KB

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