product-details.vue 33 KB

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