product.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149
  1. <template>
  2. <view class="product">
  3. <header-back :systeminfo='systeminfo' :navbar-data='nvabarData' :headerBtnPosi ="headerBtnPosi" :headerColor="headerColor" :page='1'></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/home-current@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/cart-current@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. nvabarData: { //顶部自定义导航
  238. showCapsule: 1, // 是否显示左上角图标 1表示显示 0表示不显示
  239. title: '', // 导航栏 中间的标题
  240. },
  241. }
  242. },
  243. onLoad(option) {
  244. let self = this;
  245. this.productID = option.id;//获取商品ID
  246. this.tabCurrentIndex = 1;// 页面显示是默认选中第一个
  247. },
  248. methods:{
  249. initData(){// 初始化商品详情查询
  250. this.$api.getStorage().then((resolve) => {
  251. this.userID = resolve.userID;
  252. this.$api.get('/details/product',{id:this.productID,userID:this.userID},
  253. response => {
  254. // console.log(response)
  255. if (response.code == "1") {
  256. this.productData = response.data;
  257. this.productImage=[];
  258. this.shop = response.data.shop;
  259. this.product = response.data.product;
  260. this.ladderPriceFlag = response.data.ladderPriceFlag;
  261. if(response.data.productLadderPrices!=null){
  262. this.productLadderPrices = response.data.productLadderPrices;
  263. }
  264. this.html = response.data.productDetailInfo == null ? this.html : this.$api.adaptRichTextImg(response.data.productDetailInfo.detailInfo)
  265. response.data.productImage.forEach(item =>{
  266. this.productImage.push(item.image);
  267. })
  268. //拆分金额并转千分位格式显示
  269. this.retailPrice = this.productData.retailPrice.toFixed(2);
  270. this.buyRetailPrice = this.productData.retailPrice.toFixed(2);
  271. if(this.productData.validFlag =='2'){
  272. this.disabled = true
  273. }else{
  274. this.disabled = false
  275. }
  276. this.stock = this.productData.product.stock
  277. this.number = this.productData.minBuyNumber
  278. this.minBuyNumber = this.productData.minBuyNumber
  279. this.classifyID = this.productData.classifyID
  280. this.goodsData.disabled = this.disabled
  281. this.goodsData.cartCount = this.productData.cartCount
  282. } else {
  283. this.$util.msg(response.msg,2000);
  284. }
  285. this.skeletonShow = false
  286. }
  287. )
  288. });
  289. },
  290. initLogin(){//未登录时的处理
  291. this.$api.getStorage().then((resolve) => {
  292. this.isLogin = false;
  293. this.telPhone = resolve.tel
  294. })
  295. },
  296. swiperChange(e) {//顶部商品图片切换
  297. const index = e.detail.current;
  298. this.current = index;
  299. },
  300. previewImg (index) {//顶部商品图片预览
  301. isPreviewImg = true
  302. let previewUrls = this.productImage
  303. uni.previewImage({
  304. current: index, //图片索引
  305. urls: previewUrls, //必须是http图片,本地图片无效
  306. longPressActions:''
  307. })
  308. },
  309. tabClick(index) {//商品详情&&供应商信息tab切换
  310. this.tabCurrentIndex = index;
  311. },
  312. changeTab(e) {
  313. this.tabCurrentIndex = e.target.current;
  314. },
  315. handleContact(e){//跳转小程序客服
  316. console.log(e.detail.path)
  317. console.log(e.detail.query)
  318. },
  319. buyProductCart(){//底部购物车按钮点击
  320. if(!this.isLogin){
  321. this.alertType = '3'
  322. this.isShowNoLogin =true
  323. }else{
  324. this.isShowNoLogin =false
  325. this.$api.switchTabTo('/pages/tabBar/cart/cart');
  326. }
  327. },
  328. btnGetConfirm(type){//加入购物车&&立即购买点击
  329. if(!this.isLogin){
  330. if(type =='add'){
  331. this.alertType = '1'
  332. }else{
  333. this.alertType = '2'
  334. }
  335. this.isShowNoLogin =true
  336. }else{
  337. this.isShowNoLogin =false
  338. this.showSpec(type);
  339. }
  340. },
  341. changeCountAdd(){//popup弹窗数量增加按钮
  342. this.number++
  343. if(this.ladderPriceFlag == '1'){
  344. this.productLadderPrices.forEach((item,index)=>{
  345. if(this.number>=item.buyNum){
  346. this.buyRetailPrice = item.buyPrice
  347. }
  348. })
  349. }
  350. },
  351. changeCountSub(){//popup弹窗数量减按钮
  352. if(this.number<=this.minBuyNumber){
  353. this.number= this.minBuyNumber
  354. this.isQuantity =true
  355. this.$util.msg(`该商品最小起订量为${this.minBuyNumber}`,2000);
  356. return
  357. }else{
  358. this.number--
  359. if(this.ladderPriceFlag == '1'){
  360. this.productLadderPrices.forEach((item,index)=>{
  361. if(this.number>=item.buyNum){
  362. this.buyRetailPrice = item.buyPrice
  363. }
  364. })
  365. }
  366. this.isQuantity =false
  367. }
  368. },
  369. changeNumber(e){
  370. let _value = e.detail.value;
  371. if(!this.$api.isNumber(_value)){
  372. this.number = this.minBuyNumber
  373. }else if(_value < this.minBuyNumber){
  374. this.$util.msg(`该商品最小起订量为${this.minBuyNumber}`,2000);
  375. this.number = this.minBuyNumber
  376. }else{
  377. this.number = e.detail.value
  378. }
  379. },
  380. showSpec(type) {//显示选择数量确认弹窗
  381. this.isBtnType = type
  382. this.specClass = 'show';
  383. },
  384. hideSpec() {//关闭选择数量确认弹窗
  385. this.specClass = 'hide';
  386. setTimeout(() => {
  387. this.specClass = 'none';
  388. }, 200);
  389. },
  390. btnConfirm() {//加入购物车&&立即购买跳转订单页并关闭弹窗
  391. if(this.isBtnType == 'add'){
  392. // console.log(this.number)
  393. this.getAddProductCart()
  394. }else{
  395. // console.log(this.number)
  396. this.toConfirmation()
  397. }
  398. },
  399. toConfirmation(){//跳转确认订单页面
  400. this.specClass = 'hide';
  401. let productStp ={
  402. allPrice:this.number*this.buyRetailPrice,
  403. allCount:this.number,
  404. id:this.productData.id,
  405. productCount:this.number,
  406. classifyID:this.classifyID,
  407. }
  408. this.$api.navigateTo(`/pages/user/order/create-order?type=prodcut&data=${JSON.stringify({data:productStp})}`)
  409. setTimeout(() => {
  410. this.specClass = 'none';
  411. }, 200);
  412. },
  413. getAddProductCart(){//增加购物车成功和toast弹窗提示成功
  414. this.$api.post('/details/addCart',
  415. {
  416. productID:this.productID,
  417. userID:this.userID,
  418. productCount:this.number,
  419. organizeID:this.userOrganizeID
  420. },
  421. response => {
  422. if (response.code == "1") {
  423. this.specClass = 'hide';
  424. this.$util.msg(response.msg,1500,true,'success');
  425. this.isAnimation = true
  426. setTimeout(() => {
  427. this.specClass = 'none';
  428. }, 200);
  429. setTimeout(() => {
  430. this.isAnimation = false;
  431. }, 2000);
  432. this.goodsData.cartCount = response.data;
  433. }else{
  434. this.$util.msg(response.msg,2000);
  435. setTimeout(function(){
  436. this.$api.switchTabTo('/pages/tabBar/home/home')
  437. },1000)
  438. }
  439. }
  440. )
  441. },
  442. navToLogin(){
  443. this.$api.navigateTo(`/pages/login/login?type=detilType&id=${this.productID}`)
  444. },
  445. setHeaderBtnPosi(){
  446. // 获得胶囊按钮位置信息
  447. let headerBtnPosi = uni.getMenuButtonBoundingClientRect();
  448. return headerBtnPosi
  449. },
  450. setSysteminfo(){
  451. let systeminfo;
  452. uni.getSystemInfo({ // 获取设备信息
  453. success: (res) => {
  454. // console.log(res);
  455. // console.log(res.fontSizeSetting);
  456. // console.log(res.system);
  457. systeminfo = res
  458. },
  459. })
  460. return systeminfo
  461. },
  462. discard(){
  463. //丢弃
  464. }
  465. },
  466. onPageScroll(e){
  467. // console.log(e.scrollTop);//实时获取到滚动的值
  468. if(e.scrollTop>50){
  469. this.headerColor = true
  470. this.nvabarData={
  471. showCapsule: 1,
  472. title: '商品详情',
  473. }
  474. }else{
  475. this.headerColor = false
  476. this.nvabarData={
  477. showCapsule: 1,
  478. title: '',
  479. }
  480. }
  481. },
  482. onShow() {
  483. this.$api.loginStatus().then((resolveData) => {
  484. if(resolveData){
  485. this.isLogin = true;
  486. }else{
  487. this.initLogin()
  488. }
  489. if (isPreviewImg) {
  490. isPreviewImg = false;
  491. return;
  492. } else {
  493. this.initData();
  494. }
  495. });
  496. },
  497. }
  498. </script>
  499. <style lang="scss">
  500. page{
  501. background-color: #F7F7F7;
  502. }
  503. .product{
  504. padding-bottom: 120rpx;
  505. }
  506. .banner-section{
  507. width: 100%;
  508. height: 750rpx;
  509. position: relative;
  510. border-bottom: 1px solid #EBEBEB;
  511. }
  512. .banner{
  513. width: 100%;
  514. height: 750rpx;
  515. image {
  516. width: 100%;
  517. height: 100%;
  518. }
  519. }
  520. .swiper__dots-box{
  521. position: absolute;
  522. bottom: 24px;
  523. right: 24rpx;
  524. /* #ifndef APP-NVUE */
  525. display: flex;
  526. /* #endif */
  527. flex: 1;
  528. flex-direction: row;
  529. justify-content: center;
  530. align-items: center;
  531. height: 12rpx;
  532. padding: 10rpx;
  533. background: rgba(174,174,174,0.6);
  534. border-radius:16rpx;
  535. .swiper__dots-item{
  536. width: 12rpx;
  537. height: 12rpx;
  538. border-radius: 100%;
  539. margin: 6rpx;
  540. background: rgba(62,62,62,1);
  541. }
  542. .none{
  543. background:#FFFFFF;
  544. }
  545. .swiper__dots-long{
  546. background: rgba(62,62,62,1);
  547. transition: all 0.1s;
  548. }
  549. }
  550. .product-wrap{
  551. width: 702rpx;
  552. height: auto;
  553. padding: 24rpx 24rpx 0 24rpx;
  554. background-color: #FFFFFF;
  555. border-bottom: 20rpx solid #F7F7F7;
  556. .wrap-top{
  557. width: 100%;
  558. height: auto;
  559. float: left;
  560. padding-bottom: 24rpx;
  561. border-bottom: 1px solid #F8F8F8;
  562. .p-title{
  563. line-height: 40rpx;
  564. font-size: $font-size-base;
  565. color: $text-color;
  566. font-weight: Bold;
  567. -o-text-overflow: ellipsis;
  568. text-overflow: ellipsis;
  569. display: -webkit-box;
  570. word-break: break-all;
  571. -webkit-box-orient: vertical;
  572. -webkit-line-clamp: 2;
  573. overflow: hidden;
  574. margin-bottom: 16rpx;
  575. }
  576. .p-price{
  577. height: 44rpx;
  578. line-height: 44rpx;
  579. float: left;
  580. .txt{
  581. color: #FF2A2A;
  582. margin:0 2rpx;
  583. }
  584. .txt.sm{
  585. font-size: $font-size-sm;
  586. }
  587. .txt.big{
  588. font-size: $font-size-lg;
  589. }
  590. }
  591. .p-minBuy{
  592. height: 44rpx;
  593. line-height: 44rpx;
  594. float: right;
  595. padding: 0 18rpx;
  596. border-radius: 22rpx;
  597. background-color: #EBEBEB;
  598. color: #7F7F7F;
  599. font-size: 24rpx;
  600. text-align: center;
  601. .min-text{
  602. margin: 0 6rpx;
  603. }
  604. }
  605. .p-login{
  606. height: 44rpx;
  607. line-height: 44rpx;
  608. color: #F8C499;
  609. font-size: $font-size-sm;
  610. }
  611. }
  612. .wrap-ladder{
  613. float: left;
  614. width: 100%;
  615. border-bottom: 1px solid #F8F8F8;
  616. .ladder-text{
  617. height: 34rpx;
  618. line-height: 34rpx;
  619. margin-bottom: 24rpx;
  620. font-size: 24rpx;
  621. color: #999999;
  622. .ladder-p{
  623. font-size: 20rpx;
  624. }
  625. }
  626. .ladder-main{
  627. width: 654rpx;
  628. height: 102rpx;
  629. padding: 24rpx;
  630. 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);
  631. background-size: cover;
  632. border-radius: 20rpx;
  633. display: flex;
  634. .ladder-left{
  635. flex: 1.5;
  636. line-height: 51rpx;
  637. font-size: 24rpx;
  638. .ladder-b{
  639. text-align-last: justify;
  640. }
  641. }
  642. .ladder-right{
  643. height: 100%;
  644. display: flex;
  645. align-items: center;
  646. flex: 8.5;
  647. .ladder-li{
  648. height: 100%;
  649. flex: 1;
  650. display:flex;
  651. flex-flow: column;
  652. align-items: center;
  653. .ladder-a{
  654. flex: 1;
  655. height: 51rpx;
  656. line-height: 51rpx;
  657. font-size: 26rpx;
  658. text-align: justify;
  659. color: #FA6400;
  660. font-weight: bold;
  661. }
  662. }
  663. }
  664. }
  665. }
  666. .wrap-label{
  667. float: left;
  668. width: 100%;
  669. padding: 24rpx 0 0 0;
  670. border-bottom: 1px solid #F8F8F8;
  671. .label-a{
  672. padding: 0 18rpx;
  673. line-height: 40rpx;
  674. font-size: $font-size-sm;
  675. color: #FFFFFF;
  676. text-align: center;
  677. border-radius: 20rpx;
  678. background:linear-gradient(135deg,rgba(250,100,0,0.7) 0%,rgba(249,80,63,0.7) 100%);
  679. margin: 0 22rpx 22rpx 0;
  680. display: inline-block;
  681. }
  682. }
  683. .wrap-info{
  684. float: left;
  685. width: 100%;
  686. padding: 24rpx 0 0 0;
  687. border-bottom: 1px solid #F8F8F8;
  688. .info-viewT{
  689. width: 100%;
  690. min-height: 40rpx;
  691. font-size: $font-size-base;
  692. color: $text-color;
  693. line-height: 40rpx;
  694. text-align: left;
  695. .info-viewL{
  696. min-width: 350rpx;
  697. float: left;
  698. margin-bottom: 24rpx;
  699. }
  700. .info-viewR{
  701. min-width: 352rpx;
  702. float: left;
  703. margin-bottom: 24rpx;
  704. }
  705. }
  706. .info-viewB{
  707. width: 100%;
  708. height: auto;
  709. }
  710. .info-f{
  711. width: 50%;
  712. float: left;
  713. font-size: $font-size-base;
  714. color: $text-color;
  715. line-height: 40rpx;
  716. margin-bottom: 24rpx;
  717. text-align: left;
  718. }
  719. }
  720. .wrap-seve{
  721. float: left;
  722. width: 100%;
  723. height: 72rpx;
  724. line-height: 72rpx;
  725. font-size: $font-size-base;
  726. color: $text-color;
  727. border-bottom: 1px solid #F8F8F8;
  728. .iconfont{
  729. color: $color-system;
  730. margin-left: 20rpx;
  731. font-size: $font-size-sm;
  732. }
  733. .text{
  734. font-size: $font-size-sm;
  735. color: $text-color;
  736. margin-left: 10rpx;
  737. }
  738. }
  739. }
  740. .product-details {
  741. height: 100%;
  742. background: #FFFFFF;
  743. .navbar {
  744. width: 702rpx;
  745. height: 96rpx;
  746. padding: 0 24rpx;
  747. background: #fff;
  748. z-index: 10;
  749. .nav-item {
  750. display: flex;
  751. width: 142rpx;
  752. justify-content: center;
  753. align-items: center;
  754. height: 96rpx;
  755. font-size: $font-size-base;
  756. color: $text-color;
  757. position: relative;
  758. margin-right: 48rpx;
  759. float: left;
  760. position: relative;
  761. .line{
  762. width: 100%;
  763. height: 2px;
  764. background: #FFFFFF;
  765. position: absolute;
  766. bottom: 0;
  767. left: 0;
  768. }
  769. &.current{
  770. color:$color-system;
  771. font-weight: bold;
  772. .line{
  773. background: $color-system;
  774. }
  775. }
  776. }
  777. }
  778. .content{
  779. width: 100%;
  780. min-height: 750rpx;
  781. }
  782. }
  783. .isLower{
  784. width: 100%;
  785. height: 90rpx;
  786. background-color: rgba(255, 191, 162, 0.5);
  787. line-height: 90rpx;
  788. text-align: center;
  789. color: #FFFFFF;
  790. font-size: $font-size-base;
  791. position: fixed;
  792. bottom: 110rpx;
  793. left: 0;
  794. }
  795. .bottom-btn{
  796. width: 100%;
  797. height: 110rpx;
  798. position: fixed;
  799. bottom: 0;
  800. left: 0;
  801. background: #FFFFFF;
  802. z-index: 99;
  803. .bottom-le{
  804. width: 302rpx;
  805. height: 86rpx;
  806. padding:12rpx 24rpx;
  807. float: left;
  808. .item-bt{
  809. width: 86rpx;
  810. height: 100%;
  811. margin-right:22rpx;
  812. display: flex;
  813. float: left;
  814. flex-direction: column;
  815. align-items: center;
  816. font-size: $font-size-sm;
  817. color: $text-color;
  818. line-height: 34rpx;
  819. position: relative;
  820. .animation-num{
  821. font-size:$font-size-lg ;
  822. color: #FF2A2A;
  823. position: absolute;
  824. top: -12rpx;
  825. right: 4rpx;
  826. font-weight: bold;
  827. }
  828. .animation{
  829. animation: showAmnation 2.2s ease-in-out both;
  830. }
  831. .restion{
  832. animation: hideAmnation 1s ease-in-out both;
  833. }
  834. .icon-num{
  835. position: absolute;
  836. right:-12rpx;
  837. top: -9rpx;
  838. }
  839. .icon-num.goleft{
  840. right: 4rpx;
  841. }
  842. &:last-child{
  843. margin-right: 0;
  844. }
  845. image {
  846. width: 40rpx;
  847. height: 40rpx;
  848. margin-bottom: 8rpx;
  849. }
  850. button.contact-btn{
  851. width: 100%;
  852. height: 100%;
  853. margin: 0;
  854. padding: 0;
  855. display: flex;
  856. flex-direction: column;
  857. align-items: center;
  858. box-sizing: border-box;
  859. font-size: $font-size-sm;
  860. text-align: center;
  861. text-decoration: none;
  862. line-height: 34rpx;
  863. border-radius: 0;
  864. -webkit-tap-highlight-color: transparent;
  865. overflow: hidden;
  866. color: $text-color;
  867. background-color:#FFFFFF;
  868. }
  869. }
  870. }
  871. .bottom-ri{
  872. width: 400rpx;
  873. height: 100%;
  874. float: right;
  875. display: flex;
  876. .btn{
  877. flex: 1;
  878. width: 200rpx;
  879. line-height: 110rpx;
  880. text-align: center;
  881. font-size: $font-size-base;
  882. color: #FFFFFF;
  883. }
  884. .btn-cart{
  885. background-color: #EFAF00;
  886. }
  887. .btn-cart.disabled{
  888. background-color: rgba(239, 175, 0, 0.5);
  889. }
  890. .btn-bay{
  891. background:linear-gradient(135deg,rgba(242,143,49,1) 0%,rgba(225,86,22,1) 100%);
  892. }
  893. .btn-bay.disabled{
  894. background-color: linear-gradient(135deg,rgba(242,143,49,0.5) 0%,rgba(225,86,22,0.5) 100%);;
  895. }
  896. }
  897. }
  898. .uni-badge--small {
  899. -webkit-transform: scale(.8);
  900. -ms-transform: scale(.8);
  901. transform: scale(.8);
  902. -webkit-transform-origin: center center;
  903. -ms-transform-origin: center center;
  904. transform-origin: center center;
  905. }
  906. .uni-badge {
  907. font-family: 'Helvetica Neue', Helvetica, sans-serif;
  908. -webkit-box-sizing: border-box;
  909. box-sizing: border-box;
  910. font-size: 12px;
  911. line-height: 1;
  912. display: inline-block;
  913. padding: 3px 6px;
  914. color: #333;
  915. border-radius: 100px;
  916. background-color: #f1f1f1;
  917. }
  918. .uni-badge-error {
  919. color: #fff;
  920. background-color: #dd524d;
  921. }
  922. /* 加入购物模态层*/
  923. @keyframes showPopup {
  924. 0% {
  925. opacity: 0;
  926. }
  927. 100% {
  928. opacity: 1;
  929. }
  930. }
  931. @keyframes hidePopup {
  932. 0% {
  933. opacity: 1;
  934. }
  935. 100% {
  936. opacity: 0;
  937. }
  938. }
  939. @keyframes showLayer {
  940. 0% {
  941. transform: translateY(0);
  942. }
  943. 100% {
  944. transform: translateY(-100%);
  945. }
  946. }
  947. @keyframes hideLayer {
  948. 0% {
  949. transform: translateY(-100%);
  950. }
  951. 100% {
  952. transform: translateY(0);
  953. }
  954. }
  955. @keyframes showAmnation {
  956. 0% {
  957. top: -12rpx;
  958. opacity: 0;
  959. }
  960. 50% {
  961. top: -60rpx;
  962. opacity: 1;
  963. }
  964. 100% {
  965. top: -100rpx;
  966. opacity: 0;
  967. }
  968. }
  969. @keyframes hideAmnation {
  970. 0% {
  971. top: -100rpx;
  972. opacity: 0;
  973. }
  974. 100% {
  975. top: -12rpx;
  976. opacity: 0;
  977. }
  978. }
  979. .popup {
  980. position: fixed;
  981. top: 0;
  982. width: 100%;
  983. height: 100%;
  984. z-index: 999;
  985. display: none;
  986. .mask{
  987. position: fixed;
  988. top: 0;
  989. width: 100%;
  990. height: 100%;
  991. z-index: 21;
  992. background-color: rgba(0, 0, 0, 0.6);
  993. }
  994. .layer {
  995. position: fixed;
  996. z-index: 22;
  997. bottom: -294rpx;
  998. width: 702rpx;
  999. padding: 24rpx 24rpx 36rpx 24rpx;
  1000. height: 236rpx;
  1001. border-radius: 30rpx 30rpx 0 0;
  1002. background-color: #fff;
  1003. display: flex;
  1004. flex-wrap: wrap;
  1005. align-content: space-between;
  1006. .content {
  1007. width: 100%;
  1008. }
  1009. .btn {
  1010. width: 100%;
  1011. height: 88rpx;
  1012. .button {
  1013. width: 100%;
  1014. height: 88rpx;
  1015. color: #fff;
  1016. display: flex;
  1017. align-items: center;
  1018. justify-content: center;
  1019. background: $btn-confirm;
  1020. font-size: $font-size-base;
  1021. border-radius: 14rpx;
  1022. }
  1023. }
  1024. }
  1025. &.show {
  1026. display: block;
  1027. .mask{
  1028. animation: showPopup 0.2s linear both;
  1029. }
  1030. .layer {
  1031. animation: showLayer 0.2s linear both;
  1032. }
  1033. }
  1034. &.hide {
  1035. display: block;
  1036. .mask{
  1037. animation: hidePopup 0.2s linear both;
  1038. }
  1039. .layer {
  1040. animation: hideLayer 0.2s linear both;
  1041. }
  1042. }
  1043. &.none {
  1044. display: none;
  1045. }
  1046. &.service {
  1047. .row {
  1048. margin: 30upx 0;
  1049. .title {
  1050. font-size: 30upx;
  1051. margin: 10upx 0;
  1052. }
  1053. .description {
  1054. font-size: 28upx;
  1055. color: #999;
  1056. }
  1057. }
  1058. }
  1059. .layer-smimg{
  1060. width: 114rpx;
  1061. height: 114rpx;
  1062. float: left;
  1063. border-radius: 10rpx;
  1064. margin-right: 24rpx;
  1065. image{
  1066. width: 114rpx;
  1067. height: 114rpx;
  1068. border-radius: 10rpx;
  1069. }
  1070. }
  1071. .layer-nunbox{
  1072. justify-content: space-between;
  1073. align-items: center;
  1074. width: 536rpx;
  1075. height: 88rpx;
  1076. padding: 13rpx 0 0 0;
  1077. float: left;
  1078. .layer-nunbox-t{
  1079. width: 100%;
  1080. height:44rpx;
  1081. position:relative;
  1082. display: flex;
  1083. .layer-nunbox-text{
  1084. line-height: 44rpx;
  1085. font-size: $font-size-base;
  1086. }
  1087. .number-box{
  1088. display: flex;
  1089. justify-content: center;
  1090. align-items: center;
  1091. .iconfont{
  1092. font-size: $font-size-lg;
  1093. padding:0 20rpx;
  1094. font-size: $text-color;
  1095. }
  1096. .btn-input{
  1097. width: 62rpx;
  1098. height: 48rpx;
  1099. line-height: 48rpx;
  1100. background: #F8F8F8;
  1101. border-radius: 4rpx;
  1102. text-align: center;
  1103. font-size: $font-size-base;
  1104. }
  1105. }
  1106. .product-step{
  1107. position: absolute;
  1108. left: 45rpx;
  1109. bottom: 0;
  1110. height: 44rpx;
  1111. background: #FFFFFF;
  1112. }
  1113. }
  1114. .layer-nunbox-b{
  1115. width: 100%;
  1116. height:44rpx;
  1117. margin-top: 13rpx;
  1118. }
  1119. .text{
  1120. line-height: 44rpx;
  1121. font-size: $font-size-base;
  1122. .p{
  1123. color: #FF2A2A;
  1124. }
  1125. .p:first-child{
  1126. margin-left: 30rpx;
  1127. }
  1128. .p.sm{
  1129. font-size: $font-size-sm;
  1130. }
  1131. }
  1132. }
  1133. }
  1134. /*富文本样式*/
  1135. rich-text.p{
  1136. padding: 0 24rpx;
  1137. }
  1138. rich-text.img{
  1139. width: 100%;
  1140. height: auto;
  1141. }
  1142. </style>