product.vue 29 KB

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