secondProduct.vue 28 KB

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