product-details.vue 33 KB

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