secondProduct.vue 29 KB

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