secondProduct.vue 28 KB

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