product.vue 36 KB

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