instrument-details.vue 40 KB

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