secondProduct.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221
  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. goSupplier(){
  418. this.$api.setStorage('supplierInfo',this.shop)
  419. this.$api.navigateTo('/pages/goods/supplier')
  420. },
  421. discard(){
  422. //丢弃
  423. }
  424. },
  425. onPageScroll(e){//实时获取到滚动的值
  426. if(e.scrollTop>50){
  427. this.headerColor = true
  428. this.nvabarData={
  429. showCapsule: 1,
  430. title: '商品详情',
  431. }
  432. }else{
  433. this.headerColor = false
  434. this.nvabarData={
  435. showCapsule: 1,
  436. title: '',
  437. }
  438. }
  439. if(e.scrollTop>700){
  440. this.navbarFiexd = 'fixed'
  441. }else{
  442. this.navbarFiexd = 'none'
  443. }
  444. },
  445. onShareAppMessage(res){//分享转发
  446. if (res.from === 'button') {
  447. // 来自页面内转发按钮
  448. }
  449. return {
  450. title: `${this.product.name}`,
  451. path: `pages/goods/product?type=share&id=${this.productID}`,
  452. imageUrl:`${this.productImage[0]}`
  453. }
  454. },
  455. onShow() {
  456. this.$api.getStorage().then((resolve) => {
  457. this.userID = resolve.userID ? resolve.userID : '';
  458. this.userIdentity = resolve.userIdentity ? resolve.userIdentity : 3
  459. if (isPreviewImg) {
  460. isPreviewImg = false;
  461. return;
  462. } else {
  463. this.initData();
  464. }
  465. }).catch(error =>{
  466. this.initData();
  467. })
  468. }
  469. }
  470. </script>
  471. <style lang="scss">
  472. page{
  473. background-color: #F7F7F7;
  474. }
  475. .productRemarks{
  476. color: #FF2A2A;
  477. font-size: 24rpx;
  478. margin-bottom: 16rp
  479. }
  480. .banner-section{
  481. width: 100%;
  482. height: 750rpx;
  483. position: relative;
  484. border-bottom: 1px solid #EBEBEB;
  485. }
  486. .banner{
  487. width: 100%;
  488. height: 750rpx;
  489. .product-img{
  490. width: 750rpx;
  491. }
  492. image {
  493. width: 100%;
  494. height: 100%;
  495. }
  496. }
  497. .swiper__dots-box{
  498. position: absolute;
  499. bottom: 24px;
  500. right: 24rpx;
  501. /* #ifndef APP-NVUE */
  502. display: flex;
  503. /* #endif */
  504. flex: 1;
  505. flex-direction: row;
  506. justify-content: center;
  507. align-items: center;
  508. height: 12rpx;
  509. padding: 10rpx;
  510. background: rgba(174,174,174,0.6);
  511. border-radius:16rpx;
  512. .swiper__dots-item{
  513. width: 12rpx;
  514. height: 12rpx;
  515. border-radius: 100%;
  516. margin: 6rpx;
  517. background: rgba(62,62,62,1);
  518. }
  519. .none{
  520. background:#FFFFFF;
  521. }
  522. .swiper__dots-long{
  523. background: rgba(62,62,62,1);
  524. transition: all 0.1s;
  525. }
  526. }
  527. .product-wrap{
  528. width: 100%;
  529. height: auto;
  530. padding: 24rpx 0 0 0;
  531. background-color: #FFFFFF;
  532. border-bottom: 20rpx solid #F7F7F7;
  533. .wrap-top{
  534. width: 702rpx;
  535. padding: 0 24rpx;
  536. height: auto;
  537. float: left;
  538. padding-bottom: 24rpx;
  539. border-bottom: 1px solid #F8F8F8;
  540. &.none{
  541. .p-title{
  542. color:#999999
  543. }
  544. }
  545. .p-title{
  546. line-height: 40rpx;
  547. font-size: $font-size-28;
  548. color: $text-color;
  549. font-weight: Bold;
  550. -o-text-overflow: ellipsis;
  551. text-overflow: ellipsis;
  552. display: -webkit-box;
  553. word-break: break-all;
  554. -webkit-box-orient: vertical;
  555. -webkit-line-clamp: 2;
  556. overflow: hidden;
  557. margin-bottom: 16rpx;
  558. }
  559. .wrap-main-pricenone{
  560. line-height: 44rpx;
  561. color: #FF2A2A;
  562. font-size: $font-size-28;
  563. font-weight: 600;
  564. }
  565. .wrap-main-text{
  566. display: block;
  567. float: left;
  568. font-weight: normal;
  569. }
  570. .wrap-main-none{
  571. display: block;
  572. width: 256rpx;
  573. height: 44rpx;
  574. padding-left: 20rpx;
  575. border-radius: 11rpx;
  576. background: $btn-confirm;
  577. float: right;
  578. line-height: 44rpx;
  579. color: #FFFFFF;
  580. text-align: center;
  581. font-size: $font-size-24;
  582. }
  583. .p-active{
  584. width: 130rpx;
  585. height: 44rpx;
  586. display: flex;
  587. align-items: center;
  588. flex-direction: row;
  589. float: left;
  590. .icon-active{
  591. width: 124rpx;
  592. height: 30rpx;
  593. display: block;
  594. }
  595. }
  596. .p-price{
  597. height: 44rpx;
  598. line-height: 44rpx;
  599. float: left;
  600. .txt{
  601. color: #FF2A2A;
  602. margin:0 2rpx;
  603. }
  604. .txt.sm{
  605. font-size: $font-size-24;
  606. }
  607. .txt.big{
  608. font-size: $font-size-32;
  609. }
  610. }
  611. .p-minBuy{
  612. height: 44rpx;
  613. line-height: 44rpx;
  614. float: right;
  615. padding: 0 18rpx;
  616. border-radius: 22rpx;
  617. background-color: #EBEBEB;
  618. color: #7F7F7F;
  619. font-size: 24rpx;
  620. text-align: center;
  621. .min-text{
  622. margin: 0 6rpx;
  623. }
  624. }
  625. .p-login{
  626. height: 44rpx;
  627. line-height: 44rpx;
  628. color: $color-system;
  629. font-size: $font-size-24;
  630. &.grade{
  631. margin-bottom: 20rpx;
  632. }
  633. .p-no{
  634. float: left;
  635. margin-right: 5rpx;
  636. font-size: $font-size-28;
  637. }
  638. .p-login-btn{
  639. display: block;
  640. height: 44rpx;
  641. padding: 0 10rpx 0 20rpx;
  642. border-radius: 11rpx;
  643. background: $btn-confirm;
  644. float: right;
  645. line-height: 44rpx;
  646. color: #FFFFFF;
  647. text-align: center;
  648. font-size: $font-size-24;
  649. }
  650. }
  651. }
  652. .wrap-active{
  653. width: 100%;
  654. float: left;
  655. height: 80rpx;
  656. background: linear-gradient(225deg,rgba(255,143,101,1) 0%,rgba(248,79,57,1) 100%);
  657. line-height: 80rpx;
  658. font-size: $font-size-26;
  659. color: #FFFFFF;
  660. text-align: center;
  661. }
  662. .wrap-ladder{
  663. float: left;
  664. width: 702rpx;
  665. border-bottom: 1px solid #F8F8F8;
  666. .ladder-text{
  667. height: 34rpx;
  668. line-height: 34rpx;
  669. margin-bottom: 24rpx;
  670. font-size: 24rpx;
  671. color: #999999;
  672. .ladder-p{
  673. font-size: 20rpx;
  674. }
  675. }
  676. .ladder-main{
  677. width: 654rpx;
  678. height: 102rpx;
  679. padding: 24rpx;
  680. background: url(https://img.caimei365.com/group1/M00/03/95/Cmis216Sk_WASybTAAI2gyWbunM918.png);
  681. background-size: cover;
  682. border-radius: 20rpx;
  683. display: flex;
  684. .ladder-left{
  685. flex: 1.5;
  686. line-height: 51rpx;
  687. font-size: 24rpx;
  688. .ladder-b{
  689. text-align-last: justify;
  690. }
  691. }
  692. .ladder-right{
  693. height: 100%;
  694. display: flex;
  695. align-items: center;
  696. flex: 8.5;
  697. .ladder-li{
  698. height: 100%;
  699. flex: 1;
  700. display:flex;
  701. flex-flow: column;
  702. align-items: center;
  703. .ladder-a{
  704. flex: 1;
  705. height: 51rpx;
  706. line-height: 51rpx;
  707. font-size: 26rpx;
  708. text-align: justify;
  709. color: #FA6400;
  710. font-weight: bold;
  711. }
  712. }
  713. }
  714. }
  715. }
  716. .wrap-label{
  717. float: left;
  718. width: 702rpx;
  719. padding: 24rpx 24rpx 0 24rpx;
  720. border-bottom: 1px solid #F8F8F8;
  721. .label-a{
  722. padding: 0 18rpx;
  723. line-height: 40rpx;
  724. font-size: $font-size-24;
  725. color: #FFFFFF;
  726. text-align: center;
  727. border-radius: 20rpx;
  728. background:#A69DFE;
  729. margin: 0 22rpx 22rpx 0;
  730. display: inline-block;
  731. }
  732. }
  733. .wrap-info{
  734. float: left;
  735. width: 702rpx;
  736. padding: 24rpx 24rpx 0 24rpx;
  737. border-bottom: 1px solid #F8F8F8;
  738. .info-viewT{
  739. width: 100%;
  740. min-height: 40rpx;
  741. font-size: $font-size-28;
  742. color: $text-color;
  743. line-height: 40rpx;
  744. text-align: left;
  745. &.none{
  746. color: #999999;
  747. }
  748. .info-viewL{
  749. min-width: 350rpx;
  750. float: left;
  751. margin-bottom: 24rpx;
  752. }
  753. .info-viewR{
  754. min-width: 352rpx;
  755. float: left;
  756. margin-bottom: 24rpx;
  757. }
  758. }
  759. .info-viewB{
  760. width: 100%;
  761. height: auto;
  762. }
  763. .info-f{
  764. width: 50%;
  765. float: left;
  766. font-size: $font-size-28;
  767. color: $text-color;
  768. line-height: 40rpx;
  769. margin-bottom: 24rpx;
  770. text-align: left;
  771. }
  772. }
  773. .wrap-seve{
  774. float: left;
  775. width: 702rpx;
  776. padding: 0 24rpx;
  777. height: 72rpx;
  778. line-height: 72rpx;
  779. font-size: $font-size-28;
  780. color: $text-color;
  781. border-bottom: 1px solid #F8F8F8;
  782. &.none{
  783. color: #999999;
  784. .text{
  785. color: #999999;
  786. }
  787. }
  788. .iconfont{
  789. color: $color-system;
  790. margin-left: 20rpx;
  791. font-size: $font-size-24;
  792. }
  793. .text{
  794. font-size: $font-size-24;
  795. color: $text-color;
  796. margin-left: 10rpx;
  797. }
  798. }
  799. }
  800. .product-details {
  801. height: 100%;
  802. background: #FFFFFF;
  803. .navbar {
  804. width: 702rpx;
  805. height: 96rpx;
  806. padding: 0 24rpx;
  807. background: #fff;
  808. z-index: 10;
  809. display: flex;
  810. border-bottom: 1px solid #F8F8F8;
  811. &.fixed{
  812. position: fixed;
  813. left: 0;
  814. }
  815. .nav-item {
  816. display: flex;
  817. flex: 1;
  818. justify-content: center;
  819. align-items: center;
  820. height: 96rpx;
  821. font-size: $font-size-28;
  822. color: $text-color;
  823. position: relative;
  824. float: left;
  825. position: relative;
  826. .line{
  827. width: 60%;
  828. height: 2px;
  829. border-radius: 1px;
  830. background: #FFFFFF;
  831. position: absolute;
  832. bottom: 0;
  833. left: 50%;
  834. margin-left: -30%;
  835. }
  836. &.current{
  837. color:$color-system;
  838. .line{
  839. background: $color-system;
  840. }
  841. }
  842. }
  843. }
  844. .content{
  845. width: 100%;
  846. min-height: 750rpx;
  847. }
  848. }
  849. .isLower{
  850. width: 100%;
  851. height: 116rpx;
  852. line-height: 116rpx;
  853. text-align: center;
  854. color: #000000;
  855. font-size: $font-size-32;
  856. font-weight: bold;
  857. }
  858. .bottom-btn{
  859. width: 100%;
  860. height: 110rpx;
  861. position: fixed;
  862. bottom: 0;
  863. left: 0;
  864. background: #FFFFFF;
  865. z-index: 99;
  866. .bottom-le{
  867. width: 302rpx;
  868. height: 86rpx;
  869. padding:12rpx 24rpx;
  870. float: left;
  871. .item-bt{
  872. width: 86rpx;
  873. height: 100%;
  874. margin-right:22rpx;
  875. display: flex;
  876. float: left;
  877. flex-direction: column;
  878. align-items: center;
  879. font-size: $font-size-24;
  880. color: $text-color;
  881. line-height: 34rpx;
  882. position: relative;
  883. .animation-num{
  884. font-size:$font-size-32 ;
  885. color: #FF2A2A;
  886. position: absolute;
  887. top: -12rpx;
  888. right: 4rpx;
  889. font-weight: bold;
  890. }
  891. .animation{
  892. animation: showAmnation 2.2s ease-in-out both;
  893. }
  894. .restion{
  895. animation: hideAmnation 1s ease-in-out both;
  896. }
  897. .icon-num{
  898. position: absolute;
  899. right:-12rpx;
  900. top: -9rpx;
  901. }
  902. .icon-num.goleft{
  903. right: 4rpx;
  904. }
  905. &:last-child{
  906. margin-right: 0;
  907. }
  908. image {
  909. width: 40rpx;
  910. height: 40rpx;
  911. margin-bottom: 8rpx;
  912. }
  913. button.contact-btn{
  914. width: 100%;
  915. height: 100%;
  916. margin: 0;
  917. padding: 0;
  918. display: flex;
  919. flex-direction: column;
  920. align-items: center;
  921. box-sizing: border-box;
  922. font-size: $font-size-24;
  923. text-align: center;
  924. text-decoration: none;
  925. line-height: 34rpx;
  926. border-radius: 0;
  927. -webkit-tap-highlight-color: transparent;
  928. overflow: hidden;
  929. color: $text-color;
  930. background-color:#FFFFFF;
  931. }
  932. }
  933. }
  934. .bottom-ri{
  935. width: 400rpx;
  936. height: 100%;
  937. float: right;
  938. display: flex;
  939. .btn{
  940. flex: 1;
  941. width: 200rpx;
  942. line-height: 110rpx;
  943. text-align: center;
  944. font-size: $font-size-28;
  945. color: #FFFFFF;
  946. }
  947. .btn-cart{
  948. background-color: #EFAF00;
  949. }
  950. .btn-cart.disabled{
  951. background-color: rgba(239, 175, 0, 0.5);
  952. }
  953. .btn-bay{
  954. background:linear-gradient(135deg,rgba(242,143,49,1) 0%,rgba(225,86,22,1) 100%);
  955. }
  956. .btn-bay.disabled{
  957. background-color: linear-gradient(135deg,rgba(242,143,49,0.5) 0%,rgba(225,86,22,0.5) 100%);;
  958. }
  959. }
  960. }
  961. .uni-badge--small {
  962. -webkit-transform: scale(.8);
  963. -ms-transform: scale(.8);
  964. transform: scale(.8);
  965. -webkit-transform-origin: center center;
  966. -ms-transform-origin: center center;
  967. transform-origin: center center;
  968. }
  969. .uni-badge {
  970. font-family: 'Helvetica Neue', Helvetica, sans-serif;
  971. -webkit-box-sizing: border-box;
  972. box-sizing: border-box;
  973. font-size: 12px;
  974. line-height: 1;
  975. display: inline-block;
  976. padding: 3px 6px;
  977. color: #333;
  978. border-radius: 100px;
  979. background-color: #f1f1f1;
  980. }
  981. .uni-badge-error {
  982. color: #fff;
  983. background-color: #dd524d;
  984. }
  985. /* 加入购物模态层*/
  986. @keyframes showPopup {
  987. 0% {
  988. opacity: 0;
  989. }
  990. 100% {
  991. opacity: 1;
  992. }
  993. }
  994. @keyframes hidePopup {
  995. 0% {
  996. opacity: 1;
  997. }
  998. 100% {
  999. opacity: 0;
  1000. }
  1001. }
  1002. @keyframes showLayer {
  1003. 0% {
  1004. transform: translateY(0);
  1005. }
  1006. 100% {
  1007. transform: translateY(-100%);
  1008. }
  1009. }
  1010. @keyframes hideLayer {
  1011. 0% {
  1012. transform: translateY(-100%);
  1013. }
  1014. 100% {
  1015. transform: translateY(0);
  1016. }
  1017. }
  1018. @keyframes showAmnation {
  1019. 0% {
  1020. top: -12rpx;
  1021. opacity: 0;
  1022. }
  1023. 50% {
  1024. top: -60rpx;
  1025. opacity: 1;
  1026. }
  1027. 100% {
  1028. top: -100rpx;
  1029. opacity: 0;
  1030. }
  1031. }
  1032. @keyframes hideAmnation {
  1033. 0% {
  1034. top: -100rpx;
  1035. opacity: 0;
  1036. }
  1037. 100% {
  1038. top: -12rpx;
  1039. opacity: 0;
  1040. }
  1041. }
  1042. .popup {
  1043. position: fixed;
  1044. top: 0;
  1045. width: 100%;
  1046. height: 100%;
  1047. z-index: 999;
  1048. display: none;
  1049. .mask{
  1050. position: fixed;
  1051. top: 0;
  1052. width: 100%;
  1053. height: 100%;
  1054. z-index: 21;
  1055. background-color: rgba(0, 0, 0, 0.6);
  1056. }
  1057. .layer {
  1058. position: fixed;
  1059. z-index: 22;
  1060. bottom: -294rpx;
  1061. width: 702rpx;
  1062. padding: 24rpx 24rpx 36rpx 24rpx;
  1063. height: 260rpx;
  1064. border-radius: 20rpx 20rpx 0 0;
  1065. background-color: #fff;
  1066. display: flex;
  1067. flex-wrap: wrap;
  1068. align-content: space-between;
  1069. .content {
  1070. width: 100%;
  1071. }
  1072. .btn {
  1073. width: 100%;
  1074. height: 88rpx;
  1075. margin-top: 20rpx;
  1076. .button {
  1077. width: 100%;
  1078. height: 88rpx;
  1079. color: #fff;
  1080. display: flex;
  1081. align-items: center;
  1082. justify-content: center;
  1083. background: $btn-confirm;
  1084. font-size: $font-size-28;
  1085. border-radius: 14rpx;
  1086. }
  1087. }
  1088. }
  1089. &.show {
  1090. display: block;
  1091. .mask{
  1092. animation: showPopup 0.2s linear both;
  1093. }
  1094. .layer {
  1095. animation: showLayer 0.2s linear both;
  1096. }
  1097. }
  1098. &.hide {
  1099. display: block;
  1100. .mask{
  1101. animation: hidePopup 0.2s linear both;
  1102. }
  1103. .layer {
  1104. animation: hideLayer 0.2s linear both;
  1105. }
  1106. }
  1107. &.none {
  1108. display: none;
  1109. }
  1110. &.service {
  1111. .row {
  1112. margin: 30upx 0;
  1113. .title {
  1114. font-size: 30upx;
  1115. margin: 10upx 0;
  1116. }
  1117. .description {
  1118. font-size: 28upx;
  1119. color: #999;
  1120. }
  1121. }
  1122. }
  1123. .layer-smimg{
  1124. width: 114rpx;
  1125. height: 114rpx;
  1126. float: left;
  1127. border-radius: 10rpx;
  1128. margin-right: 24rpx;
  1129. image{
  1130. width: 114rpx;
  1131. height: 114rpx;
  1132. border-radius: 10rpx;
  1133. }
  1134. }
  1135. .layer-nunbox{
  1136. justify-content: space-between;
  1137. align-items: center;
  1138. width: 536rpx;
  1139. height: auto;
  1140. float: left;
  1141. .layer-nunbox-t{
  1142. width: 100%;
  1143. height:44rpx;
  1144. position:relative;
  1145. display: flex;
  1146. margin-bottom: 10rpx;
  1147. .text{
  1148. font-size: $font-size-24;
  1149. line-height: 48rpx;
  1150. color: #999999;
  1151. }
  1152. .layer-nunbox-text{
  1153. line-height: 44rpx;
  1154. font-size: $font-size-28;
  1155. }
  1156. .number-box{
  1157. display: flex;
  1158. justify-content: center;
  1159. align-items: center;
  1160. .iconfont{
  1161. font-size: $font-size-32;
  1162. padding:0 20rpx;
  1163. font-size: $text-color;
  1164. }
  1165. .btn-input{
  1166. width: 62rpx;
  1167. height: 48rpx;
  1168. line-height: 48rpx;
  1169. background: #F8F8F8;
  1170. border-radius: 4rpx;
  1171. text-align: center;
  1172. font-size: $font-size-28;
  1173. }
  1174. }
  1175. .product-step{
  1176. position: absolute;
  1177. left: 45rpx;
  1178. bottom: 0;
  1179. height: 44rpx;
  1180. background: #FFFFFF;
  1181. }
  1182. }
  1183. .layer-nunbox-b{
  1184. width: 100%;
  1185. height:44rpx;
  1186. margin-top: 13rpx;
  1187. }
  1188. .text{
  1189. line-height: 44rpx;
  1190. font-size: $font-size-28;
  1191. .p{
  1192. color: #FF2A2A;
  1193. }
  1194. .p:first-child{
  1195. margin-left: 30rpx;
  1196. }
  1197. .p.sm{
  1198. font-size: $font-size-24;
  1199. }
  1200. }
  1201. }
  1202. }
  1203. /*富文本样式*/
  1204. rich-text.p{
  1205. width: 702rpx !important;
  1206. padding: 0 24rpx;
  1207. text-align: justify;
  1208. }
  1209. rich-text.img{
  1210. width: 100%;
  1211. height: auto;
  1212. }
  1213. </style>