secondProduct.vue 29 KB

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