product-details.vue 33 KB

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