product.vue 29 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156
  1. <template>
  2. <view class="product">
  3. <header-back :systeminfo='systeminfo' :navbar-data='nvabarData' :headerBtnPosi ="headerBtnPosi" :headerColor="headerColor" :page='backPage'></header-back>
  4. <tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading ="true" :loadingType="9"></tui-skeleton>
  5. <view class="container-product tui-skeleton">
  6. <view class="product-top">
  7. <view class="banner-section">
  8. <uni-swiper-dot :info="productImage" :current="current" field="content" :mode="mode" >
  9. <swiper class="banner tui-banner tui-skeleton-rect" circular @change="swiperChange" :duration='800' :autoplay="false" :circular="false" >
  10. <swiper-item v-for="(item, index) in productImage" :key="index" class="banner-item">
  11. <image :src="item" @click="previewImg(index)" />
  12. </swiper-item>
  13. </swiper>
  14. <view class="swiper__dots-box">
  15. <view v-for="(item,idx) in productImage"
  16. :key="idx"
  17. :class="[idx===current?'swiper__dots-long':'none']"
  18. :data-index="current" class="swiper__dots-item">
  19. </view>
  20. </view>
  21. </uni-swiper-dot>
  22. </view>
  23. <view class="product-wrap clearfix">
  24. <view class="wrap-top">
  25. <view class="p-title tui-skeleton-rect">
  26. {{product.name == undefined ? '' : product.name}}
  27. </view>
  28. <view v-if="!isLogin" class="p-login tui-skeleton-rect">
  29. <text @click.stop="navToLogin">登录查看价格<text class="iconfont icon-xiayibu" style="font-size: 22rpx;margin: 0 6rpx;"></text></text>
  30. </view>
  31. <view class="wrap-main" v-else>
  32. <view class="p-main" v-if="ladderPriceFlag == '0'">
  33. <view class="p-price tui-skeleton-fillet">
  34. <text class="txt sm">¥</text>
  35. <text class="txt big">{{retailPrice}}</text>
  36. <text class="txt big">{{smallMoney== '0'?'.00':smallMoney}}</text>
  37. </view>
  38. <view class="p-minBuy">
  39. 起订量:
  40. <text class="min-text">{{minBuyNumber}}</text>
  41. </view>
  42. </view>
  43. <view class="wrap-ladder" v-else>
  44. <view class="ladder-text">
  45. <text class="ladder-h1">说明:</text>
  46. <text class="ladder-p">本商品有以下优惠购物方案</text>
  47. </view>
  48. <view class="ladder-main tui-skeleton-rect">
  49. <view class="ladder-left">
  50. <view class="ladder-b">起订量:</view>
  51. <view class="ladder-b">价格:</view>
  52. </view>
  53. <view class="ladder-right">
  54. <view class="ladder-li" v-for="(ladder,index) in productLadderPrices" :key="index">
  55. <view class="ladder-a">{{ladder.buyNumRangeShow}}</view>
  56. <view class="ladder-a">¥{{ladder.buyPrice.toFixed(2)}}</view>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. </view>
  62. </view>
  63. <view class="wrap-label" v-if="product.tagsList.length>0">
  64. <view class="label-a tui-skeleton-rect" v-for="(label,index) in product.tagsList" :key="index">{{label}}</view>
  65. </view>
  66. <view class="wrap-info">
  67. <view class="info-viewT">
  68. <view class="info-viewL tui-skeleton-fillet">品牌:<text>{{product.brandName == null? '其他' : product.brandName}}</text></view>
  69. <view class="info-viewR tui-skeleton-fillet">包装规格:<text>{{product.unit}}</text></view>
  70. </view>
  71. <!-- <view class="info-viewB">
  72. <view class="info-f tui-skeleton-fillet">库存:<text>{{product.stock}}</text></view>
  73. <view class="info-f tui-skeleton-fillet">起订量:<text>{{minBuyNumber}}</text></view>
  74. </view> -->
  75. </view>
  76. <view class="wrap-seve">
  77. <text class="tui-skeleton-rect">服务:</text>
  78. <text class="iconfont icon-dui tui-skeleton-rect"><text class="text">无忧退货</text></text>
  79. <text class="iconfont icon-dui tui-skeleton-rect"><text class="text">快速退款</text></text>
  80. <text class="iconfont icon-dui tui-skeleton-rect"><text class="text">正品保证</text></text>
  81. </view>
  82. </view>
  83. </view>
  84. <view class="product-details">
  85. <!-- 头部 -->
  86. <view class="navbar tui-skeleton-fillet">
  87. <view class="nav-item"
  88. :class="{ current: tabCurrentIndex === 1 }"
  89. @click="tabClick(1)">
  90. <text class="line"></text>
  91. 商品详情
  92. </view>
  93. <view class="nav-item"
  94. :class="{ current: tabCurrentIndex === 2 }"
  95. @click="tabClick(2)">
  96. <text class="line"></text>
  97. 供应商信息
  98. </view>
  99. </view>
  100. <!-- 商品详情,供应商详情展示 -->
  101. <view class="content tui-banner tui-skeleton-rect" v-if="tabCurrentIndex === 1">
  102. <parser :html="html" :img-mode="widthFix"></parser>
  103. </view>
  104. <view class="content sup" v-else>
  105. <supplier-details :shop="shop"></supplier-details>
  106. </view>
  107. </view>
  108. <!-- 底部按钮 -->
  109. <view class="menu">
  110. <view class="isLower" v-if="goodsData.disabled">该商品已下架~</view>
  111. <view class="bottom-btn" :style="{paddingBottom :isIphoneX ? '68rpx' : '0rpx'}">
  112. <view class="bottom-le">
  113. <view class="item-bt" @click="this.$api.switchTabTo('/pages/tabBar/home/home')">
  114. <image src="../../static/icon-home-active@3x.png"></image>
  115. <text>首页</text>
  116. </view>
  117. <view class="item-bt">
  118. <!-- #ifdef MP-WEIXIN -->
  119. <button class="contact-btn" open-type="contact" @bindcontact="handleContact">
  120. <image src="../../static/severs@3x.png"></image>
  121. <text>客服</text>
  122. </button>
  123. <!-- #endif -->
  124. </view>
  125. <view class="item-bt" @click="buyProductCart()">
  126. <image src="../../static/icon-cart-active@3x.png"></image>
  127. <text>购物车</text>
  128. <text v-if="goodsData.cartCount > 0"
  129. class="uni-badge uni-badge-error uni-small uni-badge--small icon-num"
  130. :class="[goodsData.cartCount < 10 ? 'goleft':'']">
  131. {{ goodsData.cartCount >= 100 ? '99+': goodsData.cartCount}}
  132. </text>
  133. <view class="animation-num" :class="isAnimation ? 'animation' : 'restion'">+1</view>
  134. </view>
  135. </view>
  136. <view class="bottom-ri">
  137. <button
  138. :disabled="goodsData.disabled"
  139. class="btn btn-cart"
  140. :class="[goodsData.disabled ? 'disabled':'']"
  141. @tap.stop="btnGetConfirm('add')">加入购物车</button>
  142. <button
  143. :disabled="goodsData.disabled"
  144. class="btn btn-bay"
  145. :class="[goodsData.disabled ? 'disabled':'']"
  146. @tap.stop="btnGetConfirm('buy')">立即购买</button>
  147. </view>
  148. </view>
  149. </view>
  150. <!--底部选择模态层弹窗组件 -->
  151. <view class="popup spec" :class="specClass" @touchmove.stop.prevent="discard" @tap="hideSpec">
  152. <!-- 遮罩层 -->
  153. <view class="mask"></view>
  154. <view class="layer" @tap.stop="discard">
  155. <view class="content">
  156. <view class="layer-smimg">
  157. <image :src="product.mainImage" mode=""></image>
  158. </view>
  159. <view class="layer-nunbox">
  160. <view class="layer-nunbox-t">
  161. <view class="layer-nunbox-text">数量:</view>
  162. <view class="number-box">
  163. <view class="iconfont icon-jianhao" :class="[isQuantity==true?'disabled':'']" @click="changeCountSub()"></view>
  164. <input class="btn-input" type="number" v-model="number" maxlength='4' @blur="changeNumber($event)">
  165. <view class="iconfont icon-jiahao" :class="[isStock==true?'disabled':'']" @click="changeCountAdd()"></view>
  166. </view>
  167. </view>
  168. <view class="layer-nunbox-b">
  169. <view class="text">单价:
  170. <text class="p sm">¥</text>
  171. <text class="p bg">{{buyRetailPrice.toFixed(2)}}</text>
  172. </view>
  173. </view>
  174. </view>
  175. </view>
  176. <view class="btn"><view class="button" @click="btnConfirm">确定</view></view>
  177. </view>
  178. </view>
  179. <no-login v-if="isShowNoLogin" :productid="productID" :telPhone='telPhone' :alertType ='alertType'></no-login>
  180. </view>
  181. </view>
  182. </template>
  183. <script>
  184. import headerBack from '@/components/module/headerNavbar/header-poduct' //自定义导航
  185. import parser from "@/components/jyf-Parser/index" //富文本处理
  186. import tuiSkeleton from "@/components/tui-skeleton/tui-skeleton"
  187. import supplierDetails from "@/components/module/productDetails/supplierDetails" //供应商详情
  188. import noLogin from '@/components/module/noLogin/nologin'//未登录弹窗
  189. var isPreviewImg;
  190. export default{
  191. components:{
  192. headerBack,
  193. parser,
  194. tuiSkeleton,
  195. noLogin,
  196. supplierDetails
  197. },
  198. data(){
  199. return{
  200. html:'<div style="text-align: center;color:#333333;">暂无内容</div>',
  201. mode:'round',
  202. specClass: '',//规格弹窗css类,控制开关动画
  203. isBtnType:'',
  204. current:0,
  205. telPhone:'',
  206. ladderPriceFlag:'',
  207. productLadderPrices:'',
  208. loginStatus:true,
  209. isAnimation:false,
  210. skeletonShow:true,
  211. isShowNoLogin:false,
  212. isQuantity:false,
  213. isStock:false,
  214. disabled:false,
  215. tabCurrentIndex: 1,
  216. userID:'',
  217. isLogin:true,
  218. productID:0,
  219. classifyID:'',//分类ID
  220. goodsData:{},//自定义数据
  221. shop:{},//供应商信息
  222. product:{},//采美
  223. productImage:[],
  224. retailPrice:0,
  225. buyRetailPrice:0,
  226. stock:0,
  227. number:0,
  228. minBuyNumber:0,
  229. alertType:'',
  230. productsList:[],
  231. goodListData:[],
  232. headerBtnPosi: this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
  233. systeminfo: this.setSysteminfo(), //获取设备信息
  234. isIphoneX:this.$store.state.isIphoneX,
  235. windowHeight: '',
  236. headerColor:false,
  237. backPage:1,
  238. nvabarData: { //顶部自定义导航
  239. showCapsule: 1, // 是否显示左上角图标 1表示显示 0表示不显示
  240. title: '' // 导航栏 中间的标题
  241. }
  242. }
  243. },
  244. onLoad(option) {
  245. let self = this;
  246. console.log(option)
  247. this.productID = option.id;//获取商品ID
  248. if(option.page == 2){
  249. this.backPage = option.page
  250. }
  251. this.tabCurrentIndex = 1;// 页面显示是默认选中第一个
  252. },
  253. methods:{
  254. initData(){// 初始化商品详情查询
  255. this.$api.getStorage().then((resolve) => {
  256. this.userID = resolve.userID;
  257. this.$api.get('/details/product',{id:this.productID,userID:this.userID},
  258. response => {
  259. // console.log(response)
  260. if (response.code == "1") {
  261. this.productData = response.data;
  262. this.productImage=[];
  263. this.shop = response.data.shop;
  264. this.product = response.data.product;
  265. this.ladderPriceFlag = response.data.ladderPriceFlag;
  266. if(response.data.productLadderPrices!=null){
  267. this.productLadderPrices = response.data.productLadderPrices;
  268. }
  269. this.html = response.data.productDetailInfo == null ? this.html : this.$api.adaptRichTextImg(response.data.productDetailInfo.detailInfo)
  270. response.data.productImage.forEach(item =>{
  271. this.productImage.push(item.image);
  272. })
  273. //拆分金额并转千分位格式显示
  274. this.retailPrice = this.productData.retailPrice.toFixed(2);
  275. this.buyRetailPrice = this.productData.retailPrice;
  276. if(this.productData.validFlag =='2'){
  277. this.disabled = true
  278. }else{
  279. this.disabled = false
  280. }
  281. this.stock = this.productData.product.stock
  282. this.number = this.productData.minBuyNumber
  283. this.minBuyNumber = this.productData.minBuyNumber
  284. this.classifyID = this.productData.classifyID
  285. this.goodsData.disabled = this.disabled
  286. this.goodsData.cartCount = this.productData.cartCount
  287. } else {
  288. this.$util.msg(response.msg,2000);
  289. }
  290. this.skeletonShow = false
  291. }
  292. )
  293. });
  294. },
  295. initLogin(){//未登录时的处理
  296. this.$api.getStorage().then((resolve) => {
  297. this.isLogin = false;
  298. this.telPhone = resolve.tel
  299. })
  300. },
  301. swiperChange(e) {//顶部商品图片切换
  302. const index = e.detail.current;
  303. this.current = index;
  304. },
  305. previewImg (index) {//顶部商品图片预览
  306. isPreviewImg = true
  307. let previewUrls = this.productImage
  308. uni.previewImage({
  309. current: index, //图片索引
  310. urls: previewUrls, //必须是http图片,本地图片无效
  311. longPressActions:''
  312. })
  313. },
  314. tabClick(index) {//商品详情&&供应商信息tab切换
  315. this.tabCurrentIndex = index;
  316. },
  317. changeTab(e) {
  318. this.tabCurrentIndex = e.target.current;
  319. },
  320. handleContact(e){//跳转小程序客服
  321. console.log(e.detail.path)
  322. console.log(e.detail.query)
  323. },
  324. buyProductCart(){//底部购物车按钮点击
  325. if(!this.isLogin){
  326. this.alertType = '3'
  327. this.isShowNoLogin =true
  328. }else{
  329. this.isShowNoLogin =false
  330. this.$api.switchTabTo('/pages/tabBar/cart/cart');
  331. }
  332. },
  333. btnGetConfirm(type){//加入购物车&&立即购买点击
  334. if(!this.isLogin){
  335. if(type =='add'){
  336. this.alertType = '1'
  337. }else{
  338. this.alertType = '2'
  339. }
  340. this.isShowNoLogin =true
  341. }else{
  342. this.isShowNoLogin =false
  343. this.showSpec(type);
  344. }
  345. },
  346. changeCountAdd(){//popup弹窗数量增加按钮
  347. this.number++
  348. if(this.ladderPriceFlag == '1'){
  349. this.productLadderPrices.forEach((item,index)=>{
  350. if(this.number>=item.buyNum){
  351. this.buyRetailPrice = item.buyPrice
  352. }
  353. })
  354. }
  355. },
  356. changeCountSub(){//popup弹窗数量减按钮
  357. if(this.number<=this.minBuyNumber){
  358. this.number= this.minBuyNumber
  359. this.isQuantity =true
  360. this.$util.msg(`该商品最小起订量为${this.minBuyNumber}`,2000);
  361. return
  362. }else{
  363. this.number--
  364. if(this.ladderPriceFlag == '1'){
  365. this.productLadderPrices.forEach((item,index)=>{
  366. if(this.number>=item.buyNum){
  367. this.buyRetailPrice = item.buyPrice
  368. }
  369. })
  370. }
  371. this.isQuantity =false
  372. }
  373. },
  374. changeNumber(e){
  375. let _value = e.detail.value;
  376. if(!this.$api.isNumber(_value)){
  377. this.number = this.minBuyNumber
  378. }else if(_value < this.minBuyNumber){
  379. this.$util.msg(`该商品最小起订量为${this.minBuyNumber}`,2000);
  380. this.number = this.minBuyNumber
  381. }else{
  382. this.number = e.detail.value
  383. }
  384. },
  385. showSpec(type) {//显示选择数量确认弹窗
  386. this.isBtnType = type
  387. this.specClass = 'show';
  388. },
  389. hideSpec() {//关闭选择数量确认弹窗
  390. this.specClass = 'hide';
  391. setTimeout(() => {
  392. this.specClass = 'none';
  393. }, 200);
  394. },
  395. btnConfirm() {//加入购物车&&立即购买跳转订单页并关闭弹窗
  396. if(this.isBtnType == 'add'){
  397. // console.log(this.number)
  398. this.getAddProductCart()
  399. }else{
  400. // console.log(this.number)
  401. this.toConfirmation()
  402. }
  403. },
  404. toConfirmation(){//跳转确认订单页面
  405. this.specClass = 'hide';
  406. let productStp ={
  407. allPrice:this.number*this.buyRetailPrice,
  408. allCount:this.number,
  409. id:this.productData.id,
  410. productCount:this.number,
  411. classifyID:this.classifyID,
  412. }
  413. this.$api.navigateTo(`/pages/user/order/create-order?type=prodcut&data=${JSON.stringify({data:productStp})}`)
  414. setTimeout(() => {
  415. this.specClass = 'none';
  416. }, 200);
  417. },
  418. getAddProductCart(){//增加购物车成功和toast弹窗提示成功
  419. this.$api.post('/details/addCart',
  420. {
  421. productID:this.productID,
  422. userID:this.userID,
  423. productCount:this.number,
  424. organizeID:this.userOrganizeID
  425. },
  426. response => {
  427. if (response.code == "1") {
  428. this.specClass = 'hide';
  429. this.$util.msg(response.msg,1500,true,'success');
  430. this.isAnimation = true
  431. setTimeout(() => {
  432. this.specClass = 'none';
  433. }, 200);
  434. setTimeout(() => {
  435. this.isAnimation = false;
  436. }, 2000);
  437. this.goodsData.cartCount = response.data;
  438. }else{
  439. this.$util.msg(response.msg,2000);
  440. setTimeout(function(){
  441. this.$api.switchTabTo('/pages/tabBar/home/home')
  442. },1000)
  443. }
  444. }
  445. )
  446. },
  447. navToLogin(){
  448. this.$api.navigateTo(`/pages/user-module/login?type=detilType&id=${this.productID}`)
  449. },
  450. setHeaderBtnPosi(){
  451. // 获得胶囊按钮位置信息
  452. let headerBtnPosi = uni.getMenuButtonBoundingClientRect();
  453. return headerBtnPosi
  454. },
  455. setSysteminfo(){
  456. let systeminfo;
  457. uni.getSystemInfo({ // 获取设备信息
  458. success: (res) => {
  459. // console.log(res);
  460. // console.log(res.fontSizeSetting);
  461. // console.log(res.system);
  462. systeminfo = res
  463. },
  464. })
  465. return systeminfo
  466. },
  467. discard(){
  468. //丢弃
  469. }
  470. },
  471. onPageScroll(e){
  472. // console.log(e.scrollTop);//实时获取到滚动的值
  473. if(e.scrollTop>50){
  474. this.headerColor = true
  475. this.nvabarData={
  476. showCapsule: 1,
  477. title: '商品详情',
  478. }
  479. }else{
  480. this.headerColor = false
  481. this.nvabarData={
  482. showCapsule: 1,
  483. title: '',
  484. }
  485. }
  486. },
  487. onShow() {
  488. this.$api.loginStatus().then((resolveData) => {
  489. if(resolveData){
  490. this.isLogin = true;
  491. }else{
  492. this.initLogin()
  493. }
  494. if (isPreviewImg) {
  495. isPreviewImg = false;
  496. return;
  497. } else {
  498. this.initData();
  499. }
  500. });
  501. }
  502. }
  503. </script>
  504. <style lang="scss">
  505. page{
  506. background-color: #F7F7F7;
  507. }
  508. .product{
  509. padding-bottom: 120rpx;
  510. }
  511. .banner-section{
  512. width: 100%;
  513. height: 750rpx;
  514. position: relative;
  515. border-bottom: 1px solid #EBEBEB;
  516. }
  517. .banner{
  518. width: 100%;
  519. height: 750rpx;
  520. image {
  521. width: 100%;
  522. height: 100%;
  523. }
  524. }
  525. .swiper__dots-box{
  526. position: absolute;
  527. bottom: 24px;
  528. right: 24rpx;
  529. /* #ifndef APP-NVUE */
  530. display: flex;
  531. /* #endif */
  532. flex: 1;
  533. flex-direction: row;
  534. justify-content: center;
  535. align-items: center;
  536. height: 12rpx;
  537. padding: 10rpx;
  538. background: rgba(174,174,174,0.6);
  539. border-radius:16rpx;
  540. .swiper__dots-item{
  541. width: 12rpx;
  542. height: 12rpx;
  543. border-radius: 100%;
  544. margin: 6rpx;
  545. background: rgba(62,62,62,1);
  546. }
  547. .none{
  548. background:#FFFFFF;
  549. }
  550. .swiper__dots-long{
  551. background: rgba(62,62,62,1);
  552. transition: all 0.1s;
  553. }
  554. }
  555. .product-wrap{
  556. width: 702rpx;
  557. height: auto;
  558. padding: 24rpx 24rpx 0 24rpx;
  559. background-color: #FFFFFF;
  560. border-bottom: 20rpx solid #F7F7F7;
  561. .wrap-top{
  562. width: 100%;
  563. height: auto;
  564. float: left;
  565. padding-bottom: 24rpx;
  566. border-bottom: 1px solid #F8F8F8;
  567. .p-title{
  568. line-height: 40rpx;
  569. font-size: $font-size-28;
  570. color: $text-color;
  571. font-weight: Bold;
  572. -o-text-overflow: ellipsis;
  573. text-overflow: ellipsis;
  574. display: -webkit-box;
  575. word-break: break-all;
  576. -webkit-box-orient: vertical;
  577. -webkit-line-clamp: 2;
  578. overflow: hidden;
  579. margin-bottom: 16rpx;
  580. }
  581. .p-price{
  582. height: 44rpx;
  583. line-height: 44rpx;
  584. float: left;
  585. .txt{
  586. color: #FF2A2A;
  587. margin:0 2rpx;
  588. }
  589. .txt.sm{
  590. font-size: $font-size-24;
  591. }
  592. .txt.big{
  593. font-size: $font-size-32;
  594. }
  595. }
  596. .p-minBuy{
  597. height: 44rpx;
  598. line-height: 44rpx;
  599. float: right;
  600. padding: 0 18rpx;
  601. border-radius: 22rpx;
  602. background-color: #EBEBEB;
  603. color: #7F7F7F;
  604. font-size: 24rpx;
  605. text-align: center;
  606. .min-text{
  607. margin: 0 6rpx;
  608. }
  609. }
  610. .p-login{
  611. height: 44rpx;
  612. line-height: 44rpx;
  613. color: #F8C499;
  614. font-size: $font-size-24;
  615. }
  616. }
  617. .wrap-ladder{
  618. float: left;
  619. width: 100%;
  620. border-bottom: 1px solid #F8F8F8;
  621. .ladder-text{
  622. height: 34rpx;
  623. line-height: 34rpx;
  624. margin-bottom: 24rpx;
  625. font-size: 24rpx;
  626. color: #999999;
  627. .ladder-p{
  628. font-size: 20rpx;
  629. }
  630. }
  631. .ladder-main{
  632. width: 654rpx;
  633. height: 102rpx;
  634. padding: 24rpx;
  635. background: url(https://admin-b.caimei365.com/userfiles/1/images/photo/2020/02/%E9%98%B6%E6%A2%AF%E4%BB%B7%E6%A0%BC%E8%83%8C%E6%99%AF%403x.png);
  636. background-size: cover;
  637. border-radius: 20rpx;
  638. display: flex;
  639. .ladder-left{
  640. flex: 1.5;
  641. line-height: 51rpx;
  642. font-size: 24rpx;
  643. .ladder-b{
  644. text-align-last: justify;
  645. }
  646. }
  647. .ladder-right{
  648. height: 100%;
  649. display: flex;
  650. align-items: center;
  651. flex: 8.5;
  652. .ladder-li{
  653. height: 100%;
  654. flex: 1;
  655. display:flex;
  656. flex-flow: column;
  657. align-items: center;
  658. .ladder-a{
  659. flex: 1;
  660. height: 51rpx;
  661. line-height: 51rpx;
  662. font-size: 26rpx;
  663. text-align: justify;
  664. color: #FA6400;
  665. font-weight: bold;
  666. }
  667. }
  668. }
  669. }
  670. }
  671. .wrap-label{
  672. float: left;
  673. width: 100%;
  674. padding: 24rpx 0 0 0;
  675. border-bottom: 1px solid #F8F8F8;
  676. .label-a{
  677. padding: 0 18rpx;
  678. line-height: 40rpx;
  679. font-size: $font-size-24;
  680. color: #FFFFFF;
  681. text-align: center;
  682. border-radius: 20rpx;
  683. background:linear-gradient(135deg,rgba(250,100,0,0.7) 0%,rgba(249,80,63,0.7) 100%);
  684. margin: 0 22rpx 22rpx 0;
  685. display: inline-block;
  686. }
  687. }
  688. .wrap-info{
  689. float: left;
  690. width: 100%;
  691. padding: 24rpx 0 0 0;
  692. border-bottom: 1px solid #F8F8F8;
  693. .info-viewT{
  694. width: 100%;
  695. min-height: 40rpx;
  696. font-size: $font-size-28;
  697. color: $text-color;
  698. line-height: 40rpx;
  699. text-align: left;
  700. .info-viewL{
  701. min-width: 350rpx;
  702. float: left;
  703. margin-bottom: 24rpx;
  704. }
  705. .info-viewR{
  706. min-width: 352rpx;
  707. float: left;
  708. margin-bottom: 24rpx;
  709. }
  710. }
  711. .info-viewB{
  712. width: 100%;
  713. height: auto;
  714. }
  715. .info-f{
  716. width: 50%;
  717. float: left;
  718. font-size: $font-size-28;
  719. color: $text-color;
  720. line-height: 40rpx;
  721. margin-bottom: 24rpx;
  722. text-align: left;
  723. }
  724. }
  725. .wrap-seve{
  726. float: left;
  727. width: 100%;
  728. height: 72rpx;
  729. line-height: 72rpx;
  730. font-size: $font-size-28;
  731. color: $text-color;
  732. border-bottom: 1px solid #F8F8F8;
  733. .iconfont{
  734. color: $color-system;
  735. margin-left: 20rpx;
  736. font-size: $font-size-24;
  737. }
  738. .text{
  739. font-size: $font-size-24;
  740. color: $text-color;
  741. margin-left: 10rpx;
  742. }
  743. }
  744. }
  745. .product-details {
  746. height: 100%;
  747. background: #FFFFFF;
  748. .navbar {
  749. width: 702rpx;
  750. height: 96rpx;
  751. padding: 0 24rpx;
  752. background: #fff;
  753. z-index: 10;
  754. .nav-item {
  755. display: flex;
  756. width: 142rpx;
  757. justify-content: center;
  758. align-items: center;
  759. height: 96rpx;
  760. font-size: $font-size-28;
  761. color: $text-color;
  762. position: relative;
  763. margin-right: 48rpx;
  764. float: left;
  765. position: relative;
  766. .line{
  767. width: 100%;
  768. height: 2px;
  769. background: #FFFFFF;
  770. position: absolute;
  771. bottom: 0;
  772. left: 0;
  773. }
  774. &.current{
  775. color:$color-system;
  776. font-weight: bold;
  777. .line{
  778. background: $color-system;
  779. }
  780. }
  781. }
  782. }
  783. .content{
  784. width: 100%;
  785. min-height: 750rpx;
  786. }
  787. }
  788. .isLower{
  789. width: 100%;
  790. height: 90rpx;
  791. background-color: rgba(255, 191, 162, 0.5);
  792. line-height: 90rpx;
  793. text-align: center;
  794. color: #FFFFFF;
  795. font-size: $font-size-28;
  796. position: fixed;
  797. bottom: 110rpx;
  798. left: 0;
  799. }
  800. .bottom-btn{
  801. width: 100%;
  802. height: 110rpx;
  803. position: fixed;
  804. bottom: 0;
  805. left: 0;
  806. background: #FFFFFF;
  807. z-index: 99;
  808. .bottom-le{
  809. width: 302rpx;
  810. height: 86rpx;
  811. padding:12rpx 24rpx;
  812. float: left;
  813. .item-bt{
  814. width: 86rpx;
  815. height: 100%;
  816. margin-right:22rpx;
  817. display: flex;
  818. float: left;
  819. flex-direction: column;
  820. align-items: center;
  821. font-size: $font-size-24;
  822. color: $text-color;
  823. line-height: 34rpx;
  824. position: relative;
  825. .animation-num{
  826. font-size:$font-size-32 ;
  827. color: #FF2A2A;
  828. position: absolute;
  829. top: -12rpx;
  830. right: 4rpx;
  831. font-weight: bold;
  832. }
  833. .animation{
  834. animation: showAmnation 2.2s ease-in-out both;
  835. }
  836. .restion{
  837. animation: hideAmnation 1s ease-in-out both;
  838. }
  839. .icon-num{
  840. position: absolute;
  841. right:-12rpx;
  842. top: -9rpx;
  843. }
  844. .icon-num.goleft{
  845. right: 4rpx;
  846. }
  847. &:last-child{
  848. margin-right: 0;
  849. }
  850. image {
  851. width: 40rpx;
  852. height: 40rpx;
  853. margin-bottom: 8rpx;
  854. }
  855. button.contact-btn{
  856. width: 100%;
  857. height: 100%;
  858. margin: 0;
  859. padding: 0;
  860. display: flex;
  861. flex-direction: column;
  862. align-items: center;
  863. box-sizing: border-box;
  864. font-size: $font-size-24;
  865. text-align: center;
  866. text-decoration: none;
  867. line-height: 34rpx;
  868. border-radius: 0;
  869. -webkit-tap-highlight-color: transparent;
  870. overflow: hidden;
  871. color: $text-color;
  872. background-color:#FFFFFF;
  873. }
  874. }
  875. }
  876. .bottom-ri{
  877. width: 400rpx;
  878. height: 100%;
  879. float: right;
  880. display: flex;
  881. .btn{
  882. flex: 1;
  883. width: 200rpx;
  884. line-height: 110rpx;
  885. text-align: center;
  886. font-size: $font-size-28;
  887. color: #FFFFFF;
  888. }
  889. .btn-cart{
  890. background-color: #EFAF00;
  891. }
  892. .btn-cart.disabled{
  893. background-color: rgba(239, 175, 0, 0.5);
  894. }
  895. .btn-bay{
  896. background:linear-gradient(135deg,rgba(242,143,49,1) 0%,rgba(225,86,22,1) 100%);
  897. }
  898. .btn-bay.disabled{
  899. background-color: linear-gradient(135deg,rgba(242,143,49,0.5) 0%,rgba(225,86,22,0.5) 100%);;
  900. }
  901. }
  902. }
  903. .uni-badge--small {
  904. -webkit-transform: scale(.8);
  905. -ms-transform: scale(.8);
  906. transform: scale(.8);
  907. -webkit-transform-origin: center center;
  908. -ms-transform-origin: center center;
  909. transform-origin: center center;
  910. }
  911. .uni-badge {
  912. font-family: 'Helvetica Neue', Helvetica, sans-serif;
  913. -webkit-box-sizing: border-box;
  914. box-sizing: border-box;
  915. font-size: 12px;
  916. line-height: 1;
  917. display: inline-block;
  918. padding: 3px 6px;
  919. color: #333;
  920. border-radius: 100px;
  921. background-color: #f1f1f1;
  922. }
  923. .uni-badge-error {
  924. color: #fff;
  925. background-color: #dd524d;
  926. }
  927. /* 加入购物模态层*/
  928. @keyframes showPopup {
  929. 0% {
  930. opacity: 0;
  931. }
  932. 100% {
  933. opacity: 1;
  934. }
  935. }
  936. @keyframes hidePopup {
  937. 0% {
  938. opacity: 1;
  939. }
  940. 100% {
  941. opacity: 0;
  942. }
  943. }
  944. @keyframes showLayer {
  945. 0% {
  946. transform: translateY(0);
  947. }
  948. 100% {
  949. transform: translateY(-100%);
  950. }
  951. }
  952. @keyframes hideLayer {
  953. 0% {
  954. transform: translateY(-100%);
  955. }
  956. 100% {
  957. transform: translateY(0);
  958. }
  959. }
  960. @keyframes showAmnation {
  961. 0% {
  962. top: -12rpx;
  963. opacity: 0;
  964. }
  965. 50% {
  966. top: -60rpx;
  967. opacity: 1;
  968. }
  969. 100% {
  970. top: -100rpx;
  971. opacity: 0;
  972. }
  973. }
  974. @keyframes hideAmnation {
  975. 0% {
  976. top: -100rpx;
  977. opacity: 0;
  978. }
  979. 100% {
  980. top: -12rpx;
  981. opacity: 0;
  982. }
  983. }
  984. .popup {
  985. position: fixed;
  986. top: 0;
  987. width: 100%;
  988. height: 100%;
  989. z-index: 999;
  990. display: none;
  991. .mask{
  992. position: fixed;
  993. top: 0;
  994. width: 100%;
  995. height: 100%;
  996. z-index: 21;
  997. background-color: rgba(0, 0, 0, 0.6);
  998. }
  999. .layer {
  1000. position: fixed;
  1001. z-index: 22;
  1002. bottom: -294rpx;
  1003. width: 702rpx;
  1004. padding: 24rpx 24rpx 36rpx 24rpx;
  1005. height: 236rpx;
  1006. border-radius: 30rpx 30rpx 0 0;
  1007. background-color: #fff;
  1008. display: flex;
  1009. flex-wrap: wrap;
  1010. align-content: space-between;
  1011. .content {
  1012. width: 100%;
  1013. }
  1014. .btn {
  1015. width: 100%;
  1016. height: 88rpx;
  1017. .button {
  1018. width: 100%;
  1019. height: 88rpx;
  1020. color: #fff;
  1021. display: flex;
  1022. align-items: center;
  1023. justify-content: center;
  1024. background: $btn-confirm;
  1025. font-size: $font-size-28;
  1026. border-radius: 14rpx;
  1027. }
  1028. }
  1029. }
  1030. &.show {
  1031. display: block;
  1032. .mask{
  1033. animation: showPopup 0.2s linear both;
  1034. }
  1035. .layer {
  1036. animation: showLayer 0.2s linear both;
  1037. }
  1038. }
  1039. &.hide {
  1040. display: block;
  1041. .mask{
  1042. animation: hidePopup 0.2s linear both;
  1043. }
  1044. .layer {
  1045. animation: hideLayer 0.2s linear both;
  1046. }
  1047. }
  1048. &.none {
  1049. display: none;
  1050. }
  1051. &.service {
  1052. .row {
  1053. margin: 30upx 0;
  1054. .title {
  1055. font-size: 30upx;
  1056. margin: 10upx 0;
  1057. }
  1058. .description {
  1059. font-size: 28upx;
  1060. color: #999;
  1061. }
  1062. }
  1063. }
  1064. .layer-smimg{
  1065. width: 114rpx;
  1066. height: 114rpx;
  1067. float: left;
  1068. border-radius: 10rpx;
  1069. margin-right: 24rpx;
  1070. image{
  1071. width: 114rpx;
  1072. height: 114rpx;
  1073. border-radius: 10rpx;
  1074. }
  1075. }
  1076. .layer-nunbox{
  1077. justify-content: space-between;
  1078. align-items: center;
  1079. width: 536rpx;
  1080. height: 88rpx;
  1081. padding: 13rpx 0 0 0;
  1082. float: left;
  1083. .layer-nunbox-t{
  1084. width: 100%;
  1085. height:44rpx;
  1086. position:relative;
  1087. display: flex;
  1088. .layer-nunbox-text{
  1089. line-height: 44rpx;
  1090. font-size: $font-size-28;
  1091. }
  1092. .number-box{
  1093. display: flex;
  1094. justify-content: center;
  1095. align-items: center;
  1096. .iconfont{
  1097. font-size: $font-size-32;
  1098. padding:0 20rpx;
  1099. font-size: $text-color;
  1100. }
  1101. .btn-input{
  1102. width: 62rpx;
  1103. height: 48rpx;
  1104. line-height: 48rpx;
  1105. background: #F8F8F8;
  1106. border-radius: 4rpx;
  1107. text-align: center;
  1108. font-size: $font-size-28;
  1109. }
  1110. }
  1111. .product-step{
  1112. position: absolute;
  1113. left: 45rpx;
  1114. bottom: 0;
  1115. height: 44rpx;
  1116. background: #FFFFFF;
  1117. }
  1118. }
  1119. .layer-nunbox-b{
  1120. width: 100%;
  1121. height:44rpx;
  1122. margin-top: 13rpx;
  1123. }
  1124. .text{
  1125. line-height: 44rpx;
  1126. font-size: $font-size-28;
  1127. .p{
  1128. color: #FF2A2A;
  1129. }
  1130. .p:first-child{
  1131. margin-left: 30rpx;
  1132. }
  1133. .p.sm{
  1134. font-size: $font-size-24;
  1135. }
  1136. }
  1137. }
  1138. }
  1139. /*富文本样式*/
  1140. rich-text.p{
  1141. width: 702rpx !important;
  1142. padding: 0 24rpx;
  1143. text-align: justify;
  1144. }
  1145. rich-text.img{
  1146. width: 100%;
  1147. height: auto;
  1148. }
  1149. </style>